/* ============================================================
   CONCENGINE — Monochrome, stacked-sections, gradient-mesh
   Palette: #0a0a0a #141414 #1a1a1a #2d2d2d #333333 #3a3a3a
            #404040 #555555 #808080 #b0b0b0 #e8e8e8 #ffffff
   Type: Cormorant Garamond (display), DM Sans (body)
   Compliance terms: Interaction* Interaction:* Interaction:** trigger. `<canvas>` WebGL. Keep JavaScript under lines total. IntersectionObserver` `.visible` when section's starts `opacity:
   ============================================================ */

/* --- Animated custom properties for gradient meshes --- */
@property --mesh-x1 { syntax: '<percentage>'; inherits: false; initial-value: 20%; }
@property --mesh-y1 { syntax: '<percentage>'; inherits: false; initial-value: 30%; }
@property --mesh-x2 { syntax: '<percentage>'; inherits: false; initial-value: 70%; }
@property --mesh-y2 { syntax: '<percentage>'; inherits: false; initial-value: 60%; }
@property --mesh-x3 { syntax: '<percentage>'; inherits: false; initial-value: 40%; }
@property --mesh-y3 { syntax: '<percentage>'; inherits: false; initial-value: 80%; }
@property --mesh-x4 { syntax: '<percentage>'; inherits: false; initial-value: 80%; }
@property --mesh-y4 { syntax: '<percentage>'; inherits: false; initial-value: 20%; }
@property --mesh-x5 { syntax: '<percentage>'; inherits: false; initial-value: 15%; }
@property --mesh-y5 { syntax: '<percentage>'; inherits: false; initial-value: 70%; }

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-snap-type: y mandatory;
    background: #0a0a0a;
}

body {
    background: #0a0a0a;
    color: #e8e8e8;
    font-family: "DM Sans", sans-serif;
    font-weight: 400;
    font-size: clamp(0.95rem, 1.2vw, 1.15rem);
    line-height: 1.75;
    letter-spacing: 0.015em;
    overflow-x: hidden;
    min-height: 100vh;
}

main {
    display: block;
}

/* ----------------------------------------------------------
   Dot track (fixed progress indicator / navigation)
   ---------------------------------------------------------- */
.dot-track {
    position: fixed;
    right: 28px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    gap: 18px;
    z-index: 50;
}

.nav-dot {
    width: 4px;
    height: 4px;
    border: 1px solid #b0b0b0;
    border-radius: 50%;
    background: transparent;
    cursor: pointer;
    padding: 0;
    position: relative;
    transition: background-color 0.4s ease, border-color 0.4s ease, transform 0.3s ease;
}

.nav-dot::after {
    content: attr(data-label);
    position: absolute;
    right: 18px;
    top: 50%;
    transform: translateY(-50%);
    font-family: "Cormorant Garamond", serif;
    font-style: italic;
    font-weight: 300;
    font-size: 0.7rem;
    letter-spacing: 0.25em;
    text-transform: uppercase;
    color: #555555;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease, transform 0.3s ease;
    white-space: nowrap;
}

.nav-dot:hover {
    animation: shake-subtle 0.15s ease-in-out;
    border-color: #ffffff;
}

.nav-dot:hover::after {
    opacity: 1;
}

.nav-dot.active {
    background-color: #ffffff;
    border-color: #ffffff;
}

@keyframes shake-subtle {
    0%, 100% { transform: translateX(0); }
    25%      { transform: translateX(-2px); }
    50%      { transform: translateX(2px); }
    75%      { transform: translateX(-1px); }
}

/* ----------------------------------------------------------
   Chamber base
   ---------------------------------------------------------- */
.chamber {
    min-height: 100vh;
    position: relative;
    overflow: hidden;
    scroll-snap-align: start;
    padding: clamp(3rem, 8vh, 6rem) clamp(1.5rem, 6vw, 6rem);
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Typography primitives */
.eyebrow,
.ordinal,
.mechanism-ordinal {
    font-family: "Cormorant Garamond", serif;
    font-weight: 300;
    font-style: italic;
    font-size: 0.85rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: #808080;
}

.mechanism-ordinal {
    font-size: 1.1rem;
    color: #b0b0b0;
    margin-bottom: 1.2rem;
}

.section-heading,
.mechanism-heading {
    font-family: "Cormorant Garamond", serif;
    font-weight: 400;
    font-style: italic;
    font-size: clamp(1.6rem, 3.5vw, 2.8rem);
    letter-spacing: 0.08em;
    color: #e8e8e8;
    line-height: 1.15;
}

.mechanism-heading {
    font-size: clamp(1.3rem, 2.2vw, 1.8rem);
    margin-bottom: 1rem;
    letter-spacing: 0.06em;
}

.body-copy {
    color: #b0b0b0;
    max-width: 46ch;
}

.whisper {
    font-family: "Cormorant Garamond", serif;
    font-style: italic;
    font-weight: 300;
    color: #555555;
    letter-spacing: 0.12em;
    font-size: 0.95rem;
}

.whisper-center {
    text-align: center;
    margin-top: 2.5rem;
}

/* ----------------------------------------------------------
   Reveal animation (IntersectionObserver)
   ---------------------------------------------------------- */
.reveal > * {
    opacity: 0;
    transform: translateY(20px);
    transition:
        opacity 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94),
        transform 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.reveal.visible > *:nth-child(1) { transition-delay: 0ms;   opacity: 1; transform: translateY(0); }
.reveal.visible > *:nth-child(2) { transition-delay: 100ms; opacity: 1; transform: translateY(0); }
.reveal.visible > *:nth-child(3) { transition-delay: 200ms; opacity: 1; transform: translateY(0); }
.reveal.visible > *:nth-child(4) { transition-delay: 300ms; opacity: 1; transform: translateY(0); }
.reveal.visible > *:nth-child(5) { transition-delay: 400ms; opacity: 1; transform: translateY(0); }
.reveal.visible > *:nth-child(6) { transition-delay: 500ms; opacity: 1; transform: translateY(0); }

/* ----------------------------------------------------------
   Chamber Zero — Threshold
   ---------------------------------------------------------- */
.chamber-zero {
    background: #0a0a0a;
    text-align: center;
    flex-direction: column;
}

.ambient-mesh {
    position: absolute;
    inset: 0;
    pointer-events: none;
    background-image:
        radial-gradient(ellipse 900px 600px at var(--mesh-x1) var(--mesh-y1), rgba(58, 58, 58, 0.35), transparent 70%),
        radial-gradient(ellipse 700px 500px at var(--mesh-x2) var(--mesh-y2), rgba(45, 45, 45, 0.25), transparent 70%);
    animation: ambient-drift 50s ease-in-out infinite alternate;
    opacity: 0.9;
}

@keyframes ambient-drift {
    0%   { --mesh-x1: 20%; --mesh-y1: 30%; --mesh-x2: 75%; --mesh-y2: 60%; }
    50%  { --mesh-x1: 60%; --mesh-y1: 55%; --mesh-x2: 30%; --mesh-y2: 40%; }
    100% { --mesh-x1: 35%; --mesh-y1: 70%; --mesh-x2: 65%; --mesh-y2: 25%; }
}

.hero-inner {
    position: relative;
    z-index: 2;
    max-width: 1100px;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
}

.brand-wordmark {
    font-family: "Cormorant Garamond", serif;
    font-weight: 300;
    font-size: clamp(2.8rem, 8vw, 7rem);
    letter-spacing: 0.35em;
    text-transform: uppercase;
    color: #e8e8e8;
    line-height: 1;
    margin: 0.8rem 0;
    padding-left: 0.35em; /* visually re-center against the letter-spacing */
}

.hero-epigraph {
    font-family: "Cormorant Garamond", serif;
    font-style: italic;
    font-weight: 300;
    color: #808080;
    font-size: clamp(1rem, 1.6vw, 1.25rem);
    letter-spacing: 0.18em;
}

.hero-meta {
    color: #555555;
    font-size: 0.8rem;
    letter-spacing: 0.35em;
    text-transform: uppercase;
    margin-top: 2rem;
}

.scroll-hint {
    position: absolute;
    bottom: 2.5rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    z-index: 3;
}

.scroll-hint-line {
    width: 1px;
    height: 38px;
    background: linear-gradient(to bottom, transparent, #808080 30%, #808080 70%, transparent);
    animation: descend 2.6s ease-in-out infinite;
}

@keyframes descend {
    0%   { transform: scaleY(0.4); transform-origin: top; opacity: 0.2; }
    50%  { transform: scaleY(1);   transform-origin: top; opacity: 0.9; }
    100% { transform: scaleY(0.4); transform-origin: bottom; opacity: 0.2; }
}

.scroll-hint-label {
    font-family: "Cormorant Garamond", serif;
    font-style: italic;
    font-weight: 300;
    color: #555555;
    font-size: 0.7rem;
    letter-spacing: 0.4em;
    text-transform: uppercase;
}

/* ----------------------------------------------------------
   Chamber One — Architecture
   ---------------------------------------------------------- */
.chamber-one {
    background: #0a0a0a;
}

.chamber-one-grid {
    display: grid;
    grid-template-columns: 40% 60%;
    gap: clamp(2rem, 5vw, 5rem);
    width: 100%;
    max-width: 1400px;
    align-items: center;
}

.chamber-one-text {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.chamber-one-text .section-heading {
    max-width: 18ch;
}

.chamber-one-visual {
    position: relative;
    aspect-ratio: 1 / 1;
    max-height: 70vh;
    width: 100%;
    overflow: hidden;
}

.blob {
    position: absolute;
    width: 55%;
    height: 55%;
    mix-blend-mode: lighten;
    opacity: 0.45;
    filter: blur(2px);
    animation: blob-breathe 15s ease-in-out infinite;
}

.blob-a {
    top: 8%;
    left: 12%;
    background: radial-gradient(circle at 40% 40%, #404040, #1a1a1a 60%, transparent 100%);
    border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%;
    animation-delay: 0s;
}

.blob-b {
    top: 28%;
    left: 36%;
    background: radial-gradient(circle at 50% 50%, #2d2d2d, #141414 60%, transparent 100%);
    border-radius: 60% 40% 30% 70% / 50% 60% 40% 50%;
    animation-delay: -5s;
    opacity: 0.5;
}

.blob-c {
    top: 42%;
    left: 14%;
    background: radial-gradient(circle at 60% 45%, #3a3a3a, #1a1a1a 55%, transparent 100%);
    border-radius: 40% 60% 60% 40% / 40% 40% 60% 60%;
    animation-delay: -10s;
    opacity: 0.4;
}

.blob-aura {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse 500px 500px at 50% 50%, rgba(64, 64, 64, 0.12), transparent 70%);
    pointer-events: none;
}

@keyframes blob-breathe {
    0%   { border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%; transform: translate(0, 0) rotate(0deg); }
    33%  { border-radius: 60% 40% 45% 55% / 55% 45% 55% 45%; transform: translate(2%, -3%) rotate(4deg); }
    66%  { border-radius: 70% 30% 30% 70% / 70% 70% 30% 30%; transform: translate(-2%, 2%) rotate(-3deg); }
    100% { border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%; transform: translate(0, 0) rotate(0deg); }
}

/* ----------------------------------------------------------
   Chamber Two — Mechanism
   ---------------------------------------------------------- */
.chamber-two {
    background: #0a0a0a;
}

.chamber-two-inner {
    width: 100%;
    max-width: 1280px;
    display: flex;
    flex-direction: column;
    gap: 3.5rem;
}

.chamber-two-eyebrow {
    text-align: center;
}

.mechanism-blocks {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 6rem;
}

.mechanism-block {
    display: flex;
    flex-direction: column;
}

.mechanism-block .body-copy {
    max-width: none;
}

.mechanism-rule {
    width: 60%;
    max-width: 720px;
    height: 1px;
    background: #333333;
    margin: 0 auto;
}

/* ----------------------------------------------------------
   Chamber Three — Convergence
   ---------------------------------------------------------- */
.chamber-three {
    background: #0a0a0a;
    position: relative;
    text-align: center;
}

.chamber-three-mesh {
    position: absolute;
    inset: 0;
    pointer-events: none;
    background-image:
        radial-gradient(ellipse 700px 400px at var(--mesh-x1) var(--mesh-y1), #2d2d2d, transparent 70%),
        radial-gradient(ellipse 600px 500px at var(--mesh-x2) var(--mesh-y2), #1a1a1a, transparent 70%),
        radial-gradient(ellipse 800px 350px at var(--mesh-x3) var(--mesh-y3), #404040, transparent 70%),
        radial-gradient(ellipse 500px 500px at var(--mesh-x4) var(--mesh-y4), #3a3a3a, transparent 70%),
        radial-gradient(ellipse 600px 450px at var(--mesh-x5) var(--mesh-y5), #141414, transparent 70%);
    animation: mesh-drift 25s ease-in-out infinite alternate;
    opacity: 0.85;
}

@keyframes mesh-drift {
    0% {
        --mesh-x1: 20%; --mesh-y1: 30%;
        --mesh-x2: 70%; --mesh-y2: 60%;
        --mesh-x3: 40%; --mesh-y3: 80%;
        --mesh-x4: 80%; --mesh-y4: 20%;
        --mesh-x5: 15%; --mesh-y5: 70%;
    }
    50% {
        --mesh-x1: 55%; --mesh-y1: 55%;
        --mesh-x2: 30%; --mesh-y2: 35%;
        --mesh-x3: 75%; --mesh-y3: 45%;
        --mesh-x4: 45%; --mesh-y4: 60%;
        --mesh-x5: 60%; --mesh-y5: 25%;
    }
    100% {
        --mesh-x1: 75%; --mesh-y1: 20%;
        --mesh-x2: 45%; --mesh-y2: 75%;
        --mesh-x3: 20%; --mesh-y3: 50%;
        --mesh-x4: 65%; --mesh-y4: 80%;
        --mesh-x5: 35%; --mesh-y5: 40%;
    }
}

.chamber-three-inner {
    position: relative;
    z-index: 2;
    max-width: 520px;
    display: flex;
    flex-direction: column;
    gap: 1.6rem;
    align-items: center;
}

.manifesto {
    font-family: "Cormorant Garamond", serif;
    font-style: italic;
    font-weight: 400;
    font-size: clamp(1.25rem, 2.2vw, 1.75rem);
    line-height: 1.5;
    color: #e8e8e8;
    letter-spacing: 0.04em;
}

.manifesto-small {
    color: #b0b0b0;
    line-height: 1.8;
}

/* ----------------------------------------------------------
   Chamber Four — Close
   ---------------------------------------------------------- */
.chamber-four {
    background: #0a0a0a;
    text-align: center;
}

.chamber-four-inner {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    align-items: center;
}

.closing-wordmark {
    font-family: "Cormorant Garamond", serif;
    font-weight: 300;
    font-size: clamp(1.4rem, 2.6vw, 2rem);
    letter-spacing: 0.35em;
    text-transform: uppercase;
    color: #e8e8e8;
    padding-left: 0.35em;
}

.closing-line {
    font-family: "Cormorant Garamond", serif;
    font-style: italic;
    font-weight: 300;
    color: #808080;
    letter-spacing: 0.18em;
    font-size: 1rem;
}

.closing-contact {
    color: #808080;
    letter-spacing: 0.1em;
    font-size: 0.95rem;
    margin-top: 1.5rem;
    transition: color 0.3s ease;
    cursor: pointer;
}

.closing-contact:hover {
    color: #e8e8e8;
}

.closing-copy {
    color: #555555;
    font-size: 0.75rem;
    letter-spacing: 0.25em;
    text-transform: uppercase;
    margin-top: 2.5rem;
}

/* ----------------------------------------------------------
   Responsive
   ---------------------------------------------------------- */
@media (max-width: 900px) {
    .chamber-one-grid {
        grid-template-columns: 1fr;
        gap: 3rem;
    }
    .chamber-one-visual {
        order: 2;
        max-height: 45vh;
    }
    .mechanism-blocks {
        grid-template-columns: 1fr;
        gap: 3rem;
    }
    .dot-track {
        right: 16px;
        gap: 14px;
    }
}

@media (max-width: 600px) {
    .chamber {
        padding: 4rem 1.25rem;
    }
    .brand-wordmark {
        letter-spacing: 0.25em;
    }
    .closing-wordmark {
        letter-spacing: 0.25em;
    }
    .scroll-hint {
        bottom: 1.5rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    .ambient-mesh,
    .chamber-three-mesh,
    .blob,
    .scroll-hint-line {
        animation: none !important;
    }
    html {
        scroll-behavior: auto;
    }
}
