/* ============================================================
   monopole.cloud --- CSS Stylesheet
   ============================================================ */

/* Reset & Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    background: linear-gradient(to bottom, #E8E4DE 0%, #F0EDE8 50%, #E8E4DE 100%);
    color: #3A3630;
    font-family: 'Libre Baskerville', Georgia, serif;
    font-weight: 400;
    line-height: 1.75;
    letter-spacing: 0.01em;
    overflow-x: hidden;
}

/* ============================================================
   HUD Overlay Elements
   ============================================================ */

.hud-left,
.hud-right {
    position: fixed;
    top: 0;
    height: 100vh;
    z-index: 100;
    pointer-events: none;
    opacity: 0;
    animation: hudFadeIn 600ms ease-out 400ms forwards;
}

@keyframes hudFadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 0.3;
    }
}

.hud-left {
    left: 5vw;
    width: 2px;
    background: #9A9488;
}

.altitude-marker {
    position: relative;
    width: 100%;
    height: 100%;
}

.altitude-ticks {
    position: absolute;
    width: 100%;
    height: 100%;
    background-image:
        repeating-linear-gradient(
            to bottom,
            #9A9488 0px,
            #9A9488 1px,
            transparent 1px,
            transparent 40px
        );
    background-size: 100% 40px;
    background-position: 0 0;
}

.altitude-label {
    position: absolute;
    top: 20px;
    left: 12px;
    font-family: 'Fira Code', monospace;
    font-size: 9px;
    letter-spacing: 0.12em;
    color: #9A9488;
    opacity: 0.5;
    text-transform: uppercase;
    white-space: nowrap;
}

.hud-right {
    right: 4vw;
}

.section-label {
    position: absolute;
    top: 20px;
    right: 0;
    font-family: 'Fira Code', monospace;
    font-size: 8px;
    letter-spacing: 0.12em;
    color: #9A9488;
    text-transform: uppercase;
    writing-mode: vertical-rl;
    transform: rotate(180deg);
    opacity: 0.5;
    white-space: nowrap;
}

/* ============================================================
   Main Content Layout
   ============================================================ */

main {
    width: 100%;
}

.section {
    width: 100%;
    padding: 0;
}

/* Section 0: The Chamber */
.chamber {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: radial-gradient(ellipse at center, #F0EDE8 0%, #D8D4CE 100%);
    position: relative;
}

.cloud-chamber {
    position: relative;
    width: 680px;
    max-width: 90vw;
    height: 60vh;
    background: radial-gradient(ellipse at center, #F0EDE8 0%, #D8D4CE 100%);
    border-radius: 8px;
    box-shadow: inset 0 0 60px rgba(0, 0, 0, 0.08);
    display: flex;
    align-items: center;
    justify-content: center;
}

.particle-trail {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
}

.particle-trail path {
    stroke-dasharray: 1000;
    stroke-dashoffset: 1000;
    animation: drawTrail 2000ms ease-in-out 1200ms forwards;
}

@keyframes drawTrail {
    from {
        stroke-dashoffset: 1000;
    }
    to {
        stroke-dashoffset: 0;
    }
}

.domain-name {
    font-family: 'Libre Baskerville', Georgia, serif;
    font-size: clamp(1.8rem, 4vw, 3.2rem);
    font-weight: 400;
    font-style: italic;
    letter-spacing: 0.08em;
    color: #3A3630;
    opacity: 0;
    transform: translateY(8px);
    animation: fadeInUp 800ms ease-out 3200ms forwards;
    text-align: center;
    white-space: nowrap;
    z-index: 10;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Section 1: The Theory */
.theory {
    background: linear-gradient(to bottom, #E8E4DE 0%, #F0EDE8 50%, #E8E4DE 100%);
    padding: 120px 0;
    min-height: 150vh;
    position: relative;
}

.theory-content {
    max-width: 680px;
    margin: 0 auto;
    padding: 0 40px;
    background-image:
        radial-gradient(circle, #D0CCC4 1px, transparent 1px),
        radial-gradient(circle, #D0CCC4 1px, transparent 1px);
    background-size: 40px 40px;
    background-position: 0 0, 20px 20px;
    background-attachment: local;
    position: relative;
    color: #4A4640;
}

.theory-content p {
    font-size: clamp(0.95rem, 1.2vw, 1.1rem);
    text-align: justify;
    margin-bottom: 2em;
    text-indent: 1.5em;
}

.theory-content p:first-child {
    text-indent: 0;
}

.pull-quote {
    margin-left: -120px;
    margin-right: 0;
    margin-bottom: 2em;
    padding-left: 20px;
}

.annotation {
    font-family: 'Caveat', cursive;
    font-size: clamp(1rem, 1.6vw, 1.4rem);
    font-weight: 400;
    color: #7A7568;
    line-height: 1.5;
    transform: rotate(-1deg);
    margin: 0;
    text-align: left;
    text-indent: 0;
    font-style: italic;
}

/* Section 2: The Evidence */
.evidence {
    background: linear-gradient(to bottom, #E8E4DE 0%, #F0EDE8 50%, #E0DDD7 100%);
    padding: 120px 0;
    min-height: 200vh;
}

.evidence-container {
    max-width: 680px;
    margin: 0 auto;
    padding: 0 40px;
}

.photographic-plate {
    background: linear-gradient(135deg, #2A2824 0%, #4A4840 50%, #8A8478 100%);
    border-radius: 4px;
    padding: 40px;
    margin-bottom: 80px;
    opacity: 0;
    transform: translateY(60px);
    animation: slideReveal 600ms ease-out forwards;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    position: relative;
}

.photographic-plate:nth-child(1) { animation-delay: 0ms; }
.photographic-plate:nth-child(2) { animation-delay: 150ms; }
.photographic-plate:nth-child(3) { animation-delay: 300ms; }
.photographic-plate:nth-child(4) { animation-delay: 450ms; }
.photographic-plate:nth-child(5) { animation-delay: 600ms; }

@keyframes slideReveal {
    from {
        opacity: 0;
        transform: translateY(60px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.photographic-plate.paused {
    animation-play-state: paused;
}

.isometric-icon {
    width: 100%;
    height: auto;
    max-width: 320px;
    display: block;
    margin: 0 auto 20px;
}

.plate-label {
    font-family: 'Fira Code', monospace;
    font-size: 10px;
    letter-spacing: 0.12em;
    color: #C8C2B8;
    text-transform: uppercase;
    text-align: center;
    margin: 0;
    opacity: 0.7;
}

/* Section 3: The Archive */
.archive {
    background: linear-gradient(to bottom, #E0DDD7 0%, #F0EDE8 50%, #E8E4DE 100%);
    padding: 120px 0;
    min-height: 150vh;
    position: relative;
}

.archive-container {
    max-width: 680px;
    margin: 0 auto;
    padding: 0 40px;
    position: relative;
    height: 600px;
}

.archive-item {
    position: absolute;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}

.notebook {
    width: 280px;
    height: 380px;
    top: 80px;
    left: 60px;
    background: #F5F0E6;
    padding: 24px;
    border-radius: 2px;
    transform: rotate(-2deg);
    will-change: transform;
}

.notebook-margin {
    position: absolute;
    left: 20px;
    top: 0;
    width: 2px;
    height: 100%;
    background: #E84C3D;
}

.notebook-lines {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: repeating-linear-gradient(
        to bottom,
        transparent 0px,
        transparent 23px,
        #6A9FD8 23px,
        #6A9FD8 24px
    );
    background-position: 0 12px;
    pointer-events: none;
}

.notebook-text {
    position: relative;
    z-index: 2;
    font-family: 'Libre Baskerville', Georgia, serif;
    font-size: 14px;
    color: #3A3630;
    margin: 0;
    line-height: 24px;
}

.photograph {
    width: 260px;
    height: 340px;
    top: 120px;
    right: 40px;
    background: linear-gradient(135deg, #A09880 0%, #6A6458 100%);
    transform: rotate(1.5deg);
    border-radius: 2px;
    will-change: transform;
}

.glass-slide {
    width: 240px;
    height: 200px;
    bottom: 80px;
    left: 40%;
    background: rgba(240, 237, 232, 0.85);
    backdrop-filter: blur(4px);
    border: 1px solid rgba(255, 255, 255, 0.4);
    transform: rotate(-0.8deg);
    display: flex;
    align-items: center;
    justify-content: center;
    will-change: transform;
}

.slide-text {
    font-family: 'Fira Code', monospace;
    font-size: 9px;
    letter-spacing: 0.12em;
    color: #7A7568;
    text-transform: uppercase;
    margin: 0;
    opacity: 0.6;
}

.paper-clip {
    width: 24px;
    height: 60px;
    top: 160px;
    right: 80px;
    background: linear-gradient(to right, #A09060 0%, #C4B085 50%, #A09060 100%);
    border-radius: 12px;
    box-shadow:
        2px 0 4px rgba(0, 0, 0, 0.2) inset,
        -2px 0 4px rgba(255, 255, 255, 0.3) inset;
    will-change: transform;
}

/* Section 4: The Observation */
.observation {
    background: linear-gradient(to bottom, #E8E4DE 0%, #F0EDE8 50%, #E8E4DE 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.observation::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background:
        radial-gradient(circle at 20% 30%, #B8B2A8 0%, transparent 25%),
        radial-gradient(circle at 60% 70%, #C8C2BC 0%, transparent 25%),
        radial-gradient(circle at 80% 20%, #A8A298 0%, transparent 20%);
    opacity: 0.3;
    z-index: 0;
}

.observation-content {
    position: relative;
    z-index: 1;
    text-align: center;
    max-width: 680px;
    padding: 0 40px;
}

.observation-text {
    font-family: 'Libre Baskerville', Georgia, serif;
    font-size: clamp(1.2rem, 2.5vw, 2rem);
    font-weight: 400;
    font-style: italic;
    color: #5A5548;
    letter-spacing: 0.06em;
    margin: 0 0 40px 0;
    line-height: 1.6;
}

.theoretical-particle {
    width: 100px;
    height: 100px;
    margin: 0 auto;
    display: block;
}

.theoretical-particle circle {
    animation: pulse 4000ms ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% {
        opacity: 0.3;
    }
    50% {
        opacity: 0.8;
    }
}

/* ============================================================
   Parallax Effect for Archive Section
   ============================================================ */

.notebook {
    --scroll-offset: 0px;
}

.photograph {
    --scroll-offset: 0px;
}

.glass-slide {
    --scroll-offset: 0px;
}

/* ============================================================
   Responsive Design
   ============================================================ */

@media (max-width: 768px) {
    .hud-left,
    .hud-right {
        display: none;
    }

    .theory-content,
    .evidence-container,
    .archive-container {
        padding: 0 20px;
    }

    .pull-quote {
        margin-left: 0;
        margin-right: 0;
        padding: 20px;
        background: rgba(232, 228, 222, 0.5);
        border-left: 3px solid #7A7568;
    }

    .photographic-plate {
        padding: 30px 20px;
        margin-bottom: 60px;
    }

    .archive-container {
        height: auto;
    }

    .archive-item {
        position: static;
        margin: 40px auto;
        transform: none !important;
        display: block;
    }

    .notebook {
        width: 100%;
        max-width: 280px;
        margin: 40px auto;
    }

    .photograph {
        width: 100%;
        max-width: 260px;
        margin: 40px auto;
    }

    .glass-slide {
        width: 100%;
        max-width: 240px;
        margin: 40px auto;
    }

    .paper-clip {
        display: none;
    }
}

@media (max-width: 480px) {
    .chamber {
        height: 80vh;
    }

    .theory,
    .evidence,
    .archive {
        padding: 60px 0;
    }

    .theory-content,
    .evidence-container,
    .archive-container {
        padding: 0 16px;
    }

    .theory-content p {
        font-size: 1rem;
    }

    .annotation {
        font-size: 1rem;
    }

    .pull-quote {
        margin-left: 0;
        margin-top: 1.5em;
        margin-bottom: 1.5em;
    }

    .photographic-plate {
        margin-bottom: 40px;
        padding: 20px;
    }

    .isometric-icon {
        max-width: 280px;
    }
}

/* ============================================================
   Print Styles (Hide Unnecessary Elements)
   ============================================================ */

@media print {
    .hud-left,
    .hud-right {
        display: none;
    }
}
