:root {
    --deep-umber: #2A1F14;
    --burnt-sienna: #6B3A2A;
    --raw-ochre: #C48A3F;
    --terracotta: #A0522D;
    --parchment-sand: #E8D5B7;
    --antique-gold: #D4A847;
    --tidal-teal: #2E6B62;
    --ink-black: #0F0B07;

    --muted-sand: #C4A882;
    --deep-umber-text: #3B2F1E;

    --font-display: 'Cormorant Garamond', serif;
    --font-body: 'Libre Baskerville', serif;
    --font-accent: 'Noto Serif JP', serif;
}

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

html {
    scroll-behavior: smooth;
    overflow-x: hidden;
}

body {
    font-family: var(--font-body);
    background: var(--deep-umber);
    color: var(--parchment-sand);
    line-height: 1.75;
    overflow-x: hidden;
}

/* ===============================
   DEPTH LAYERS
   =============================== */

.depth-layer {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
}

.depth-layer--bg {
    z-index: 0;
}

.depth-layer--fg {
    z-index: 10;
}

/* ===============================
   BACKGROUND FISH (Layer 0)
   =============================== */

.fish--angel {
    position: absolute;
    width: 120px;
    height: 80px;
    opacity: 0.12;
    clip-path: polygon(
        0% 50%,
        15% 20%,
        25% 5%,
        40% 0%,
        55% 10%,
        70% 25%,
        85% 35%,
        100% 50%,
        85% 65%,
        70% 75%,
        55% 90%,
        40% 100%,
        25% 95%,
        15% 80%
    );
    background: var(--antique-gold);
    animation: fishDrift linear infinite;
}

.fish--1 {
    top: 15%;
    width: 140px;
    height: 90px;
    opacity: 0.08;
    animation-duration: 55s;
    animation-delay: 0s;
}

.fish--2 {
    top: 35%;
    width: 100px;
    height: 65px;
    opacity: 0.15;
    animation-duration: 42s;
    animation-delay: -12s;
}

.fish--3 {
    top: 60%;
    width: 160px;
    height: 100px;
    opacity: 0.06;
    animation-duration: 60s;
    animation-delay: -25s;
}

.fish--4 {
    top: 80%;
    width: 90px;
    height: 60px;
    opacity: 0.1;
    animation-duration: 38s;
    animation-delay: -8s;
}

.fish--5 {
    top: 45%;
    width: 130px;
    height: 85px;
    opacity: 0.07;
    animation-duration: 50s;
    animation-delay: -35s;
}

.fish--6 {
    top: 25%;
    width: 110px;
    height: 70px;
    opacity: 0.09;
    animation-duration: 45s;
    animation-delay: -18s;
}

@keyframes fishDrift {
    0% {
        transform: translateX(calc(100vw + 200px)) scaleX(-1);
    }
    100% {
        transform: translateX(-300px) scaleX(-1);
    }
}

/* Star field (dots constellation) */
.star-field {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.star {
    position: absolute;
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: var(--antique-gold);
    opacity: 0.3;
}

/* ===============================
   FOREGROUND LAYER (Layer 2)
   =============================== */

.fg-line {
    position: absolute;
    height: 1px;
    background: var(--antique-gold);
    opacity: 0.2;
}

.fg-line--1 {
    top: 30%;
    left: -10%;
    width: 40%;
    transform: rotate(-2deg);
    animation: fgLineDrift1 25s linear infinite;
}

.fg-line--2 {
    top: 70%;
    right: -10%;
    width: 30%;
    transform: rotate(1.5deg);
    animation: fgLineDrift2 30s linear infinite;
}

@keyframes fgLineDrift1 {
    0% { transform: translateX(0) rotate(-2deg); }
    50% { transform: translateX(60px) rotate(-1deg); }
    100% { transform: translateX(0) rotate(-2deg); }
}

@keyframes fgLineDrift2 {
    0% { transform: translateX(0) rotate(1.5deg); }
    50% { transform: translateX(-50px) rotate(2deg); }
    100% { transform: translateX(0) rotate(1.5deg); }
}

.fg-mark {
    position: absolute;
    width: 12px;
    height: 12px;
    border: 1px solid var(--antique-gold);
    opacity: 0.15;
    transform: rotate(45deg);
}

.fg-mark--1 {
    top: 20%;
    left: 85%;
    animation: markFloat 20s ease-in-out infinite;
}

.fg-mark--2 {
    top: 55%;
    left: 10%;
    animation: markFloat 25s ease-in-out infinite reverse;
}

.fg-mark--3 {
    top: 80%;
    left: 60%;
    animation: markFloat 22s ease-in-out infinite;
    animation-delay: -8s;
}

@keyframes markFloat {
    0%, 100% { transform: rotate(45deg) translateY(0); }
    50% { transform: rotate(45deg) translateY(-30px); }
}

.fg-koi {
    position: absolute;
    opacity: 0.25;
}

.fg-koi--1 {
    top: 40%;
    left: 92%;
    animation: koiDrift 35s linear infinite;
}

.fg-koi--2 {
    top: 65%;
    left: 5%;
    animation: koiDrift 28s linear infinite reverse;
}

@keyframes koiDrift {
    0%, 100% { transform: translateX(0) translateY(0); }
    25% { transform: translateX(-40px) translateY(-15px); }
    50% { transform: translateX(-20px) translateY(10px); }
    75% { transform: translateX(-60px) translateY(-5px); }
}

/* ===============================
   GOLDEN RATIO LINE
   =============================== */

.golden-line {
    position: fixed;
    top: 61.8%;
    left: 0;
    width: 100%;
    height: 1px;
    background: var(--antique-gold);
    opacity: 0.12;
    z-index: 5;
    pointer-events: none;
}

/* ===============================
   CURSOR LIGHT
   =============================== */

.cursor-light {
    position: fixed;
    width: 600px;
    height: 600px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(212, 168, 71, 0.04) 0%, transparent 70%);
    pointer-events: none;
    z-index: 6;
    transform: translate(-50%, -50%);
    transition: left 0.15s ease-out, top 0.15s ease-out;
}

/* ===============================
   SCROLL INDICATOR
   =============================== */

.scroll-indicator {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    width: 40px;
    height: 40px;
    z-index: 20;
    cursor: pointer;
}

.scroll-indicator__svg {
    width: 100%;
    height: 100%;
}

.scroll-indicator__track {
    fill: none;
    stroke: var(--antique-gold);
    stroke-width: 1;
}

.scroll-indicator__fill {
    fill: var(--raw-ochre);
    opacity: 0.6;
}

/* ===============================
   NAVIGATION OVERLAY
   =============================== */

.nav-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 11, 7, 0.92);
    backdrop-filter: blur(20px);
    z-index: 30;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

.nav-overlay.is-open {
    opacity: 1;
    visibility: visible;
}

.nav-overlay__list {
    list-style: none;
    padding: 0;
}

.nav-overlay__item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 18px 0;
    font-family: var(--font-accent);
    font-weight: 200;
    font-size: clamp(0.85rem, 1.2vw, 1.1rem);
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--parchment-sand);
    cursor: pointer;
    opacity: 0.6;
    transition: opacity 0.3s ease, color 0.3s ease;
}

.nav-overlay__item:hover {
    opacity: 1;
    color: var(--antique-gold);
}

.nav-overlay__fish {
    flex-shrink: 0;
}

/* ===============================
   CONTENT PLANE (Layer 1)
   =============================== */

.content-plane {
    position: relative;
    z-index: 2;
}

/* ===============================
   CHAMBERS (General)
   =============================== */

.chamber {
    min-height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
}

.chamber__grid {
    display: grid;
    grid-template-columns: clamp(80px, 25vw, 300px) 1fr;
    gap: clamp(24px, 4vw, 64px);
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 4rem clamp(24px, 4vw, 64px);
    min-height: 100vh;
    align-items: center;
}

.chamber__grid--centered {
    grid-template-columns: 1fr;
    justify-items: center;
    text-align: center;
}

/* Rotated vertical label (left column) */
.chamber__label {
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    min-height: 200px;
}

.chamber__label-text {
    font-family: var(--font-accent);
    font-weight: 200;
    font-size: clamp(0.75rem, 1vw, 1rem);
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--muted-sand);
    writing-mode: vertical-rl;
    transform: rotate(180deg);
    opacity: 0.5;
}

/* Chamber content */
.chamber__content {
    max-width: 800px;
}

.chamber__heading {
    font-family: var(--font-display);
    font-weight: 300;
    font-size: clamp(1.8rem, 4vw, 3.5rem);
    letter-spacing: 0.03em;
    line-height: 1.15;
    color: var(--parchment-sand);
    margin-bottom: 2.5rem;
}

.chamber__paragraph {
    font-family: var(--font-body);
    font-weight: 400;
    font-size: clamp(1rem, 1.1vw + 0.5rem, 1.25rem);
    line-height: 1.75;
    letter-spacing: 0.01em;
    color: var(--muted-sand);
    margin-bottom: 2rem;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.7s ease, transform 0.7s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.chamber__paragraph.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* ===============================
   BETTA FIN DIVIDERS
   =============================== */

.betta-divider {
    width: 100%;
    height: 24px;
    margin: 1rem 0 2rem;
    position: relative;
    opacity: 0.3;
}

.betta-divider::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    width: 100%;
    height: 1px;
    background: linear-gradient(
        90deg,
        transparent 0%,
        var(--antique-gold) 10%,
        var(--terracotta) 30%,
        var(--antique-gold) 50%,
        var(--terracotta) 70%,
        var(--antique-gold) 90%,
        transparent 100%
    );
}

.betta-divider::after {
    content: '';
    position: absolute;
    top: calc(50% - 4px);
    left: 0;
    width: 100%;
    height: 9px;
    background: repeating-linear-gradient(
        90deg,
        transparent 0px,
        transparent 8px,
        rgba(212, 168, 71, 0.08) 8px,
        rgba(212, 168, 71, 0.08) 10px
    );
    clip-path: polygon(
        0% 50%,
        5% 20%, 10% 50%, 15% 80%, 20% 50%,
        25% 15%, 30% 50%, 35% 85%, 40% 50%,
        45% 20%, 50% 50%, 55% 80%, 60% 50%,
        65% 15%, 70% 50%, 75% 85%, 80% 50%,
        85% 20%, 90% 50%, 95% 80%, 100% 50%
    );
}

/* ===============================
   CHAMBER 1: THE WATER (Hero)
   =============================== */

.chamber--water {
    background: var(--deep-umber);
}

.chamber__content--hero {
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    align-items: flex-start;
    min-height: 60vh;
}

.hero-title {
    font-family: var(--font-display);
    font-weight: 300;
    font-size: clamp(2.5rem, 7vw + 0.5rem, 6.5rem);
    letter-spacing: 0.03em;
    line-height: 1.15;
    color: var(--parchment-sand);
}

.hero-line {
    display: block;
}

.hero-tagline {
    font-family: var(--font-body);
    font-weight: 400;
    font-size: clamp(1rem, 1.1vw + 0.5rem, 1.25rem);
    line-height: 1.75;
    color: var(--muted-sand);
    margin-top: 2rem;
    max-width: 500px;
    opacity: 0;
    transform: translateY(12px);
    transition: opacity 0.8s ease 2s, transform 0.8s ease 2s;
}

.hero-tagline.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* ===============================
   CHAMBER 2: THE FORM
   =============================== */

.chamber--form {
    background: linear-gradient(180deg, var(--deep-umber) 0%, var(--burnt-sienna) 50%, var(--burnt-sienna) 100%);
}

/* ===============================
   CHAMBER 3: THE PRACTICE
   =============================== */

.chamber--practice {
    background: linear-gradient(180deg, var(--burnt-sienna) 0%, #4A2A1E 50%, var(--deep-umber) 100%);
}

.practice-cards {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin-top: 1rem;
}

.practice-card {
    padding: 2.5rem;
    background: rgba(42, 31, 20, 0.7);
    border: 1px solid rgba(212, 168, 71, 0.1);
    position: relative;
    transition: transform 0.1s ease-out, border-color 0.3s ease;
    box-shadow:
        0 2px 4px rgba(15, 11, 7, 0.3),
        0 8px 16px rgba(15, 11, 7, 0.2),
        0 16px 32px rgba(15, 11, 7, 0.15),
        0 32px 64px rgba(15, 11, 7, 0.1);
    backdrop-filter: blur(8px);
}

.practice-card:hover {
    border-color: rgba(212, 168, 71, 0.3);
}

.practice-card__number {
    display: block;
    font-family: var(--font-accent);
    font-weight: 200;
    font-size: 0.7rem;
    letter-spacing: 0.3em;
    color: var(--terracotta);
    margin-bottom: 1rem;
}

.practice-card__title {
    font-family: var(--font-display);
    font-weight: 600;
    font-size: clamp(1.2rem, 1.5vw, 1.6rem);
    color: var(--parchment-sand);
    margin-bottom: 1rem;
    letter-spacing: 0.03em;
}

.practice-card__text {
    font-family: var(--font-body);
    font-weight: 400;
    font-size: clamp(0.85rem, 0.9vw + 0.3rem, 1rem);
    line-height: 1.75;
    color: var(--muted-sand);
}

/* ===============================
   CHAMBER 4: THE FLOW
   =============================== */

.chamber--flow {
    background: var(--deep-umber);
    position: relative;
}

.chamber--flow::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 120%;
    height: 120%;
    transform: translate(-50%, -50%);
    background: radial-gradient(circle, rgba(46, 107, 98, 0.08) 0%, transparent 60%);
    pointer-events: none;
}

.chamber__content--flow {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 60vh;
    position: relative;
}

/* Flow chamber fish */
.flow-fish {
    position: absolute;
    opacity: 0.1;
    clip-path: polygon(
        0% 50%,
        15% 20%,
        25% 5%,
        40% 0%,
        55% 10%,
        70% 25%,
        85% 35%,
        100% 50%,
        85% 65%,
        70% 75%,
        55% 90%,
        40% 100%,
        25% 95%,
        15% 80%
    );
    background: var(--tidal-teal);
    animation: fishDrift linear infinite;
}

.flow-fish--1 {
    top: 10%;
    width: 100px;
    height: 65px;
    animation-duration: 35s;
    animation-delay: 0s;
    opacity: 0.12;
}

.flow-fish--2 {
    top: 25%;
    width: 80px;
    height: 52px;
    animation-duration: 40s;
    animation-delay: -10s;
    opacity: 0.08;
}

.flow-fish--3 {
    top: 45%;
    width: 120px;
    height: 78px;
    animation-duration: 50s;
    animation-delay: -20s;
    opacity: 0.1;
}

.flow-fish--4 {
    top: 65%;
    width: 70px;
    height: 45px;
    animation-duration: 32s;
    animation-delay: -5s;
    opacity: 0.14;
}

.flow-fish--5 {
    top: 78%;
    width: 110px;
    height: 72px;
    animation-duration: 45s;
    animation-delay: -28s;
    opacity: 0.06;
}

.flow-fish--6 {
    top: 35%;
    width: 90px;
    height: 58px;
    animation-duration: 38s;
    animation-delay: -15s;
    opacity: 0.09;
}

/* Flow quote (word-by-word reveal) */
.flow-quote {
    font-family: var(--font-display);
    font-weight: 600;
    font-size: clamp(1.8rem, 4vw, 3.5rem);
    line-height: 1.4;
    color: var(--parchment-sand);
    text-align: center;
    max-width: 700px;
    position: relative;
    z-index: 2;
}

.flow-word {
    display: inline-block;
    opacity: 0;
    transform: translateY(8px);
    transition: opacity 0.4s ease, transform 0.4s ease;
    margin-right: 0.25em;
}

.flow-word.is-revealed {
    opacity: 1;
    transform: translateY(0);
}

/* ===============================
   CHAMBER 5: THE REST
   =============================== */

.chamber--rest {
    background: linear-gradient(180deg, var(--deep-umber) 0%, var(--raw-ochre) 40%, var(--terracotta) 100%);
    min-height: 100vh;
}

.chamber__content--rest {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 60vh;
    text-align: center;
}

.rest-domain {
    font-family: var(--font-display);
    font-weight: 300;
    font-size: clamp(1rem, 1.5vw, 1.4rem);
    letter-spacing: 0.1em;
    color: var(--deep-umber);
    opacity: 0.7;
    margin-bottom: 3rem;
}

.rest-line {
    width: 0;
    height: 1px;
    background: var(--antique-gold);
    transition: width 1.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.rest-line.is-extended {
    width: 100vw;
}

/* ===============================
   RESPONSIVE
   =============================== */

@media (max-width: 768px) {
    .chamber__grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        padding: 3rem 1.5rem;
    }

    .chamber__label {
        min-height: auto;
    }

    .chamber__label-text {
        writing-mode: horizontal-tb;
        transform: none;
    }

    .practice-cards {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .chamber__content--hero {
        min-height: 40vh;
    }

    .fg-line, .fg-mark, .fg-koi {
        display: none;
    }

    .golden-line {
        opacity: 0.06;
    }

    .cursor-light {
        display: none;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: clamp(2rem, 12vw, 4rem);
    }

    .practice-card {
        padding: 1.5rem;
    }

    .flow-quote {
        font-size: clamp(1.4rem, 6vw, 2.2rem);
    }
}
