/* ============================================
   double-standard.org — Warm Pop-Art Bento
   ============================================ */

/* -- CSS Custom Properties -- */
:root {
    --umber-night: #2B1810;
    --terracotta-blush: #C4553A;
    --burnt-coral: #E07A5F;
    --amber-glow: #F2A65A;
    --cream-dawn: #FAF0E6;
    --warm-stone: #A68A7B;
    --solar-gold: #F4C430;
    --dried-rose: #8B4049;
    --cell-gap: 8px;
    --cell-radius: 16px;
}

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

html {
    scroll-behavior: smooth;
    cursor: none;
}

body {
    font-family: 'Quicksand', sans-serif;
    font-weight: 400;
    font-size: clamp(1rem, 1.2vw, 1.25rem);
    line-height: 1.7;
    letter-spacing: 0.01em;
    color: var(--umber-night);
    background-color: var(--cream-dawn);
    overflow-x: hidden;
    cursor: none;
}

/* -- Custom Cursor -- */
#custom-cursor {
    position: fixed;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--burnt-coral);
    pointer-events: none;
    z-index: 10000;
    transform: translate(-50%, -50%);
    transition: width 0.2s ease, height 0.2s ease, opacity 0.2s ease;
    mix-blend-mode: difference;
    opacity: 0.8;
}

#custom-cursor.cursor-hover {
    width: 48px;
    height: 48px;
    opacity: 0.6;
}

/* -- Navigation Pill -- */
#nav-pill {
    position: fixed;
    top: 24px;
    right: 24px;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--cream-dawn);
    border: 2px solid var(--warm-stone);
    z-index: 9000;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: none;
    transition: transform 0.3s ease, background 0.3s ease;
}

#nav-pill:hover {
    transform: scale(1.1);
    background: var(--burnt-coral);
}

#nav-pill:hover .nav-pill-grid span {
    background: var(--cream-dawn);
}

.nav-pill-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4px;
    width: 16px;
    height: 16px;
}

.nav-pill-grid span {
    width: 6px;
    height: 6px;
    border-radius: 2px;
    background: var(--umber-night);
    transition: background 0.3s ease;
}

/* -- Navigation Overlay -- */
#nav-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(43, 24, 16, 0.95);
    z-index: 8000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.5s ease;
}

#nav-overlay.active {
    opacity: 1;
    pointer-events: all;
}

.nav-overlay-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: repeat(2, 1fr);
    gap: var(--cell-gap);
    width: 60vw;
    max-width: 700px;
    height: 40vh;
}

.nav-cell {
    background: var(--terracotta-blush);
    border-radius: var(--cell-radius);
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: transform 0.3s ease, background 0.3s ease;
    cursor: none;
}

.nav-cell:hover {
    transform: scale(1.05);
    background: var(--burnt-coral);
}

.nav-cell-large {
    grid-column: span 2;
}

.nav-cell-wide {
    grid-column: span 3;
}

.nav-label {
    font-family: 'Nunito', sans-serif;
    font-weight: 900;
    font-size: clamp(0.9rem, 2vw, 1.4rem);
    color: var(--cream-dawn);
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

/* -- Shared: Act Sections -- */
.act {
    position: relative;
    width: 100%;
}

/* -- Shared: Bento Grid -- */
.bento-grid {
    display: grid;
    gap: var(--cell-gap);
    padding: var(--cell-gap);
    width: 100%;
}

.bento-cell {
    border-radius: var(--cell-radius);
    position: relative;
    overflow: hidden;
    opacity: 0;
    transform: scale(0.85);
    transition: opacity 0.6s ease, transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.bento-cell.revealed {
    opacity: 1;
    transform: scale(1);
}

/* -- Watermark Numerals -- */
.watermark-numeral {
    position: absolute;
    font-family: 'Nunito', sans-serif;
    font-weight: 700;
    font-size: clamp(6rem, 15vw, 12rem);
    opacity: 0.08;
    color: var(--umber-night);
    bottom: -0.1em;
    right: 0.05em;
    line-height: 1;
    pointer-events: none;
    user-select: none;
}

.watermark-light {
    color: var(--cream-dawn);
}

.watermark-dark {
    color: var(--umber-night);
}

/* -- Halftone Overlay -- */
.halftone-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: radial-gradient(circle, var(--terracotta-blush) 25%, transparent 26%);
    background-size: 16px 16px;
    opacity: 0.12;
    mix-blend-mode: multiply;
    pointer-events: none;
}

.halftone-hero {
    background-image: radial-gradient(circle, var(--terracotta-blush) 30%, transparent 31%);
    background-size: 16px 16px;
    animation: hueShift 10s ease-in-out infinite;
}

.halftone-small {
    background-image: radial-gradient(circle, var(--terracotta-blush) 25%, transparent 26%);
    background-size: 6px 6px;
    opacity: 0.15;
}

.halftone-breathe {
    background-image: radial-gradient(circle, var(--terracotta-blush) 25%, transparent 26%);
    background-size: 8px 8px;
    animation: halftoneBreathe 8s ease-in-out infinite;
    opacity: 0.15;
}

@keyframes hueShift {
    0%, 100% { filter: hue-rotate(0deg); }
    50% { filter: hue-rotate(30deg); }
}

@keyframes halftoneBreathe {
    0%, 100% { background-size: 4px 4px; opacity: 0.1; }
    50% { background-size: 20px 20px; opacity: 0.18; }
}

/* -- Caption/Label -- */
.caption-label {
    font-family: 'Quicksand', sans-serif;
    font-weight: 600;
    font-size: 0.75rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--warm-stone);
}

/* ============================================
   ACT 1: The Split Sky (Hero)
   ============================================ */
.act-hero {
    min-height: 100vh;
}

.hero-grid {
    grid-template-columns: repeat(12, 1fr);
    grid-template-rows: repeat(3, minmax(120px, 1fr));
    min-height: 100vh;
}

.hero-title-cell {
    grid-column: 1 / 9;
    grid-row: 1 / 3;
    background: linear-gradient(135deg, var(--cream-dawn) 0%, var(--burnt-coral) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-headline {
    font-family: 'Nunito', sans-serif;
    font-weight: 900;
    font-size: clamp(3rem, 8vw, 7rem);
    letter-spacing: -0.03em;
    line-height: 0.95;
    color: var(--umber-night);
    text-align: center;
    position: relative;
    z-index: 2;
}

.hero-star-cell {
    grid-column: 9 / 13;
    grid-row: 1 / 2;
    background: var(--umber-night);
    display: flex;
    align-items: center;
    justify-content: center;
}

.star {
    border-radius: 50%;
    position: absolute;
}

.star-large {
    width: 12px;
    height: 12px;
    background: var(--solar-gold);
    box-shadow: 0 0 6px 2px rgba(244, 196, 48, 0.4);
    animation: orbit 20s linear infinite, pulse 4s ease-in-out infinite alternate;
}

.star-small {
    width: 6px;
    height: 6px;
    background: var(--terracotta-blush);
    box-shadow: 0 0 4px 2px rgba(196, 85, 58, 0.3);
    animation: orbitReverse 15s linear infinite, pulse 3s ease-in-out infinite alternate;
}

@keyframes orbit {
    0% { transform: translate(0, 0) rotate(0deg) translateX(40px) rotate(0deg); }
    100% { transform: translate(0, 0) rotate(360deg) translateX(40px) rotate(-360deg); }
}

@keyframes orbitReverse {
    0% { transform: translate(0, 0) rotate(360deg) translateX(25px) rotate(-360deg); }
    100% { transform: translate(0, 0) rotate(0deg) translateX(25px) rotate(0deg); }
}

@keyframes pulse {
    0% { opacity: 0.6; }
    100% { opacity: 1; }
}

.constellation-line {
    position: absolute;
    width: 1px;
    height: 60px;
    background: var(--warm-stone);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) rotate(30deg);
    opacity: 0.5;
}

.hero-nature-cell {
    grid-column: 9 / 13;
    grid-row: 2 / 3;
    background: var(--amber-glow);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.branch-silhouette {
    width: 100%;
    height: 100%;
    opacity: 0.6;
}

.hero-gradient-cell {
    grid-column: 1 / 5;
    grid-row: 3 / 4;
    background: linear-gradient(135deg, var(--umber-night) 0%, var(--terracotta-blush) 45%, var(--amber-glow) 100%);
}

.hero-accent-cell {
    grid-column: 5 / 9;
    grid-row: 3 / 4;
    background: var(--burnt-coral);
    display: flex;
    align-items: center;
    justify-content: center;
}

.seed-pod-pattern {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: conic-gradient(
        var(--amber-glow) 0deg,
        var(--burnt-coral) 60deg,
        var(--amber-glow) 120deg,
        var(--burnt-coral) 180deg,
        var(--amber-glow) 240deg,
        var(--burnt-coral) 300deg,
        var(--amber-glow) 360deg
    );
    opacity: 0.5;
}

.hero-text-cell {
    grid-column: 9 / 13;
    grid-row: 3 / 4;
    background: var(--cream-dawn);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
}

/* ============================================
   ACT 2: The Duality Grid
   ============================================ */
.act-duality {
    min-height: 150vh;
    padding: 60px 0;
}

.duality-grid {
    grid-template-columns: repeat(12, 1fr);
    grid-auto-rows: minmax(120px, auto);
}

.duality-cell {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    min-height: 180px;
}

.duality-word-cell {
    grid-column: span 4;
    background: var(--cream-dawn);
    border: 1px solid var(--warm-stone);
}

.duality-antonym-cell {
    grid-column: span 4;
    background: var(--umber-night);
}

.duality-star-connector {
    grid-column: span 4;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    overflow: visible;
}

.constellation-svg {
    width: 100%;
    height: 80px;
}

.constellation-draw {
    stroke-dasharray: 200;
    stroke-dashoffset: 200;
    transition: stroke-dashoffset 1.5s ease;
}

.bento-cell.revealed .constellation-draw {
    stroke-dashoffset: 0;
}

.duality-word {
    font-family: 'Nunito', sans-serif;
    font-size: clamp(2rem, 5vw, 4rem);
    letter-spacing: -0.02em;
    line-height: 1;
}

.duality-bold {
    font-weight: 900;
    color: var(--umber-night);
}

.duality-light {
    font-weight: 400;
    font-family: 'Quicksand', sans-serif;
    color: var(--cream-dawn);
    font-size: clamp(1.8rem, 4vw, 3.5rem);
}

.duality-color-block {
    grid-column: span 4;
    min-height: 120px;
    position: relative;
}

.duality-coral-block {
    background: var(--burnt-coral);
}

.duality-amber-block {
    background: var(--amber-glow);
}

/* ============================================
   ACT 3: The Celestial Map
   ============================================ */
.act-celestial {
    min-height: 100vh;
}

.celestial-grid {
    grid-template-columns: 1fr;
    grid-template-rows: 1fr;
    min-height: 100vh;
}

.celestial-cell {
    background: radial-gradient(ellipse at 30% 70%, var(--cream-dawn) 0%, var(--burnt-coral) 60%, var(--umber-night) 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.star-field {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.star-field .field-star {
    position: absolute;
    border-radius: 50%;
    background: var(--solar-gold);
    animation: pulse 4s ease-in-out infinite alternate;
}

.constellation-map {
    position: relative;
    width: 90%;
    max-width: 1000px;
    height: auto;
    z-index: 2;
}

.map-star {
    animation: pulse 4s ease-in-out infinite alternate;
}

/* ============================================
   ACT 4: The Botanical Zoom
   ============================================ */
.act-botanical {
    min-height: auto;
    padding: 60px 0;
}

.botanical-grid {
    grid-template-columns: repeat(6, 1fr);
    grid-template-rows: repeat(3, minmax(200px, auto));
}

.botanical-cell {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    overflow: hidden;
}

.botanical-leaf {
    grid-column: span 3;
    grid-row: span 2;
    background: var(--cream-dawn);
    border: 1px solid var(--warm-stone);
    aspect-ratio: 3/4;
}

.botanical-petal {
    grid-column: span 3;
    background: var(--burnt-coral);
    aspect-ratio: 1;
}

.botanical-seed {
    grid-column: span 3;
    background: var(--umber-night);
    aspect-ratio: 1;
}

.botanical-branch {
    grid-column: span 2;
    background: var(--amber-glow);
    aspect-ratio: 1;
}

.botanical-mirror {
    grid-column: span 2;
    background: var(--cream-dawn);
    border: 1px solid var(--warm-stone);
    aspect-ratio: 3/4;
}

.botanical-accent {
    grid-column: span 2;
    background: var(--terracotta-blush);
    min-height: 150px;
}

.botanical-svg {
    width: 80%;
    height: 80%;
    opacity: 0.7;
}

.leaf-vein {
    stroke-dasharray: 500;
    stroke-dashoffset: 500;
    transition: stroke-dashoffset 2s ease;
}

.bento-cell.revealed .leaf-vein {
    stroke-dashoffset: 0;
}

/* Zoom effect for botanical cells */
.botanical-cell[data-zoom] .botanical-svg,
.botanical-cell[data-zoom] .petal-pattern,
.botanical-cell[data-zoom] .seed-rings {
    transform: scale(3);
    transition: transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.botanical-cell[data-zoom].zoomed .botanical-svg,
.botanical-cell[data-zoom].zoomed .petal-pattern,
.botanical-cell[data-zoom].zoomed .seed-rings {
    transform: scale(1);
}

/* Petal Pattern (conic gradient) */
.petal-pattern {
    width: 160px;
    height: 160px;
    border-radius: 50%;
    background: conic-gradient(
        var(--burnt-coral) 0deg,
        var(--amber-glow) 45deg,
        var(--burnt-coral) 90deg,
        var(--amber-glow) 135deg,
        var(--burnt-coral) 180deg,
        var(--amber-glow) 225deg,
        var(--burnt-coral) 270deg,
        var(--amber-glow) 315deg,
        var(--burnt-coral) 360deg
    );
    opacity: 0.8;
}

/* Seed pod rings */
.seed-rings {
    position: relative;
    width: 160px;
    height: 160px;
}

.seed-ring {
    position: absolute;
    border-radius: 50%;
    border: 2px solid;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.ring-1 {
    width: 30px;
    height: 30px;
    border-color: var(--solar-gold);
}

.ring-2 {
    width: 60px;
    height: 60px;
    border-color: var(--amber-glow);
}

.ring-3 {
    width: 90px;
    height: 90px;
    border-color: var(--burnt-coral);
}

.ring-4 {
    width: 120px;
    height: 120px;
    border-color: var(--terracotta-blush);
}

.ring-5 {
    width: 150px;
    height: 150px;
    border-color: var(--warm-stone);
}

/* ============================================
   ACT 5: The Return (Finale)
   ============================================ */
.act-finale {
    min-height: 100vh;
}

.finale-grid {
    grid-template-columns: 1fr;
    grid-template-rows: 1fr;
    min-height: 100vh;
}

.finale-cell {
    background: var(--cream-dawn);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.finale-headline {
    font-family: 'Nunito', sans-serif;
    font-weight: 900;
    font-size: clamp(3rem, 10vw, 8rem);
    letter-spacing: -0.03em;
    line-height: 0.95;
    color: var(--umber-night);
    text-align: center;
    position: relative;
    z-index: 2;
}

/* Finale inverted styling added by JS */
.act-finale.inverted .finale-cell {
    background: var(--umber-night);
}

.act-finale.inverted .finale-headline {
    color: var(--cream-dawn);
}

.act-finale.inverted .watermark-dark {
    color: var(--cream-dawn);
}

/* Finale stillness: remove all animations */
.act-finale.still .halftone-breathe {
    animation: none;
}

/* ============================================
   Stagger Delays for Bento Cells
   ============================================ */
.hero-grid .bento-cell:nth-child(1) { transition-delay: 0ms; }
.hero-grid .bento-cell:nth-child(2) { transition-delay: 120ms; }
.hero-grid .bento-cell:nth-child(3) { transition-delay: 240ms; }
.hero-grid .bento-cell:nth-child(4) { transition-delay: 360ms; }
.hero-grid .bento-cell:nth-child(5) { transition-delay: 480ms; }
.hero-grid .bento-cell:nth-child(6) { transition-delay: 600ms; }

.duality-grid .bento-cell:nth-child(1) { transition-delay: 0ms; }
.duality-grid .bento-cell:nth-child(2) { transition-delay: 80ms; }
.duality-grid .bento-cell:nth-child(3) { transition-delay: 160ms; }
.duality-grid .bento-cell:nth-child(4) { transition-delay: 240ms; }
.duality-grid .bento-cell:nth-child(5) { transition-delay: 320ms; }
.duality-grid .bento-cell:nth-child(6) { transition-delay: 400ms; }
.duality-grid .bento-cell:nth-child(7) { transition-delay: 480ms; }
.duality-grid .bento-cell:nth-child(8) { transition-delay: 560ms; }
.duality-grid .bento-cell:nth-child(9) { transition-delay: 640ms; }
.duality-grid .bento-cell:nth-child(10) { transition-delay: 720ms; }
.duality-grid .bento-cell:nth-child(11) { transition-delay: 800ms; }
.duality-grid .bento-cell:nth-child(12) { transition-delay: 880ms; }

.botanical-grid .bento-cell:nth-child(1) { transition-delay: 0ms; }
.botanical-grid .bento-cell:nth-child(2) { transition-delay: 120ms; }
.botanical-grid .bento-cell:nth-child(3) { transition-delay: 240ms; }
.botanical-grid .bento-cell:nth-child(4) { transition-delay: 360ms; }
.botanical-grid .bento-cell:nth-child(5) { transition-delay: 480ms; }
.botanical-grid .bento-cell:nth-child(6) { transition-delay: 600ms; }

/* ============================================
   Responsive: Mobile (< 768px)
   ============================================ */
@media (max-width: 768px) {
    #custom-cursor {
        display: none;
    }

    html, body {
        cursor: auto;
    }

    .hero-grid {
        grid-template-columns: 1fr;
        grid-template-rows: auto;
    }

    .hero-title-cell {
        grid-column: 1;
        grid-row: auto;
        min-height: 50vh;
    }

    .hero-star-cell {
        grid-column: 1;
        grid-row: auto;
        min-height: 200px;
    }

    .hero-nature-cell {
        grid-column: 1;
        grid-row: auto;
        min-height: 200px;
    }

    .hero-gradient-cell {
        grid-column: 1;
        grid-row: auto;
        min-height: 150px;
    }

    .hero-accent-cell {
        grid-column: 1;
        grid-row: auto;
        min-height: 150px;
    }

    .hero-text-cell {
        grid-column: 1;
        grid-row: auto;
        min-height: 80px;
    }

    .duality-grid {
        grid-template-columns: 1fr;
    }

    .duality-word-cell,
    .duality-antonym-cell,
    .duality-star-connector,
    .duality-color-block {
        grid-column: 1;
    }

    .botanical-grid {
        grid-template-columns: 1fr;
    }

    .botanical-leaf,
    .botanical-petal,
    .botanical-seed,
    .botanical-branch,
    .botanical-mirror,
    .botanical-accent {
        grid-column: 1;
        grid-row: auto;
    }

    .nav-overlay-grid {
        grid-template-columns: 1fr;
        grid-template-rows: repeat(5, 1fr);
        width: 80vw;
        height: 60vh;
    }

    .nav-cell-large,
    .nav-cell-wide {
        grid-column: 1;
    }
}
