/* ===========================================
   bcd.day - Chrome Boutique / Zen Contemplative
   Street-style aesthetic | Magazine-spread layout
   Rounded-sans typography | Chrome-metallic palette
   Water-bubbles imagery | Floral-botanical motifs
   =========================================== */

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Quicksand', sans-serif;
    font-weight: 400;
    color: #3A3A3E;
    background: #C8C8CA;
    overflow: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* --- Color Variables --- */
:root {
    --chrome-base: #C8C8CA;
    --chrome-highlight: #EAEAEC;
    --chrome-shadow: #6B6B6F;
    --chrome-depth: #3A3A3E;
    --botanical-accent: #7FA87F;
    --water-accent: #94B8D4;
    --petal-whisper: #D4A0A0;
    --pure-light: #F5F5F7;
    --deep-ground: #1E1E22;
    --chrome-mid: #A0A0A0;
    --chrome-light: #C0C0C0;
    --chrome-soft: #E8E8E8;
}

/* --- Scroll Container --- */
#scroll-container {
    height: 100vh;
    overflow-y: scroll;
    scroll-snap-type: y mandatory;
    scroll-behavior: smooth;
    -ms-overflow-style: none;
    scrollbar-width: none;
}

#scroll-container::-webkit-scrollbar {
    display: none;
}

/* --- Spreads --- */
.spread {
    min-height: 100vh;
    scroll-snap-align: start;
    position: relative;
    overflow: hidden;
}

/* --- Vertical Navigation Strip --- */
#nav-strip {
    position: fixed;
    left: 0;
    top: 0;
    width: 16px;
    height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
    z-index: 1000;
    background: transparent;
}

#nav-eucalyptus {
    position: fixed;
    left: 0;
    top: 0;
    width: 16px;
    height: 100vh;
    z-index: 999;
    pointer-events: none;
    opacity: 0.6;
}

#nav-eucalyptus svg {
    width: 100%;
    height: 100%;
}

.nav-indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: radial-gradient(circle at 35% 35%, #EAEAEC, #C8C8CA 60%, #6B6B6F);
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    box-shadow: 0 1px 3px rgba(30,30,34,0.2);
    position: relative;
}

.nav-indicator:hover {
    transform: scale(1.4);
    box-shadow: 0 1px 8px rgba(148,184,212,0.4);
}

.nav-indicator.active {
    animation: navPulse 2.5s ease-in-out infinite;
    box-shadow: 0 0 8px rgba(148,184,212,0.5);
}

.nav-label {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    font-family: 'Comfortaa', sans-serif;
    font-weight: 300;
    font-size: 0.6rem;
    letter-spacing: 0.15em;
    color: var(--chrome-shadow);
    opacity: 0;
    transition: opacity 0.3s ease;
    white-space: nowrap;
    pointer-events: none;
}

.nav-indicator:hover .nav-label {
    opacity: 0.7;
}

@keyframes navPulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.3); opacity: 0.75; }
}

/* --- Shake Animation --- */
@keyframes gentleShake {
    0%, 100% { transform: translateX(0); }
    15% { transform: translateX(-3px); }
    30% { transform: translateX(2px); }
    45% { transform: translateX(-2px); }
    60% { transform: translateX(1px); }
}

.shake {
    animation: gentleShake 400ms ease-out;
}

/* --- Chrome Shimmer for Text --- */
@keyframes chromeShift {
    0% { background-position: 0% 50%; }
    100% { background-position: 200% 50%; }
}

/* ===========================================
   SPREAD 0: Opening
   =========================================== */
.spread-opening {
    background: linear-gradient(135deg, #C0C0C0 0%, #E8E8E8 30%, #A0A0A0 55%, #C8C8CA 75%, #EAEAEC 90%, #6B6B6F 100%);
    display: flex;
    align-items: center;
    justify-content: center;
}

.fern-bg-watermark {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    z-index: 1;
}

.fern-bg-watermark svg {
    width: 60%;
    height: 80%;
    opacity: 0.8;
}

.opening-content {
    text-align: center;
    position: relative;
    z-index: 10;
}

.domain-title {
    font-family: 'Nunito', sans-serif;
    font-weight: 900;
    font-size: clamp(4rem, 12vw, 12rem);
    letter-spacing: -0.04em;
    line-height: 0.95;
    text-transform: none;
    background: linear-gradient(135deg, #3A3A3E 0%, #C8C8CA 20%, #EAEAEC 40%, #94B8D4 55%, #EAEAEC 65%, #6B6B6F 80%, #3A3A3E 100%);
    background-size: 200% 200%;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: chromeShift 15s linear infinite;
    display: inline-block;
}

.domain-title .letter {
    display: inline-block;
    opacity: 0;
    transform: scale(0.8);
    animation: letterReveal 0.5s ease-out forwards;
    animation-delay: var(--letter-delay, 1.2s);
}

@keyframes letterReveal {
    0% {
        opacity: 0;
        transform: scale(0.8);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

.opening-rules {
    margin-top: 3rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.rule {
    height: 1px;
    width: 0;
    opacity: 0;
}

.rule-1 {
    background: linear-gradient(90deg, transparent, #6B6B6F, transparent);
    animation: ruleGrow1 1.2s ease-out forwards;
    animation-delay: 3s;
}

.rule-2 {
    background: linear-gradient(90deg, transparent, #C8C8CA, transparent);
    animation: ruleGrow2 1.2s ease-out forwards;
    animation-delay: 3.15s;
}

.rule-3 {
    background: linear-gradient(90deg, transparent, #EAEAEC, transparent);
    animation: ruleGrow3 1.2s ease-out forwards;
    animation-delay: 3.3s;
}

@keyframes ruleGrow1 {
    0% { width: 0; opacity: 0; }
    100% { width: 60vw; opacity: 1; }
}

@keyframes ruleGrow2 {
    0% { width: 0; opacity: 0; }
    100% { width: 40vw; opacity: 1; }
}

@keyframes ruleGrow3 {
    0% { width: 0; opacity: 0; }
    100% { width: 20vw; opacity: 1; }
}

/* ===========================================
   BUBBLE SYSTEM
   =========================================== */
.bubble-field {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    overflow: hidden;
    z-index: 5;
}

.bubble {
    position: absolute;
    border-radius: 50%;
    background: radial-gradient(circle at 30% 30%, rgba(255,255,255,0.6), rgba(148,184,212,0.2) 50%, rgba(200,200,202,0.1) 100%);
    box-shadow: inset 0 -4px 8px rgba(30,30,34,0.08), 0 2px 12px rgba(148,184,212,0.15);
    pointer-events: auto;
    opacity: 0;
    animation: bubbleFadeIn 2s ease-out forwards, bubbleFloat var(--float-duration, 25s) ease-in-out infinite;
    animation-delay: var(--bubble-delay, 0s), var(--bubble-delay, 0s);
    transition: transform 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
    will-change: transform, opacity;
}

.bubble::before {
    content: '';
    position: absolute;
    top: 18%;
    left: 20%;
    width: 32%;
    height: 28%;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255,255,255,0.85) 0%, rgba(255,255,255,0) 100%);
}

.bubble::after {
    content: '';
    position: absolute;
    bottom: 22%;
    right: 25%;
    width: 15%;
    height: 10%;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255,255,255,0.35) 0%, rgba(255,255,255,0) 100%);
}

@keyframes bubbleFadeIn {
    0% { opacity: 0; transform: scale(0.6); }
    100% { opacity: 1; transform: scale(1); }
}

@keyframes bubbleFloat {
    0% {
        transform: translateY(0) scale(1) rotate(0deg);
    }
    25% {
        transform: translateY(-8vh) scale(1.03) rotate(1deg);
    }
    50% {
        transform: translateY(-15vh) scale(1.05) rotate(0deg);
    }
    75% {
        transform: translateY(-22vh) scale(0.98) rotate(-1deg);
    }
    100% {
        transform: translateY(-30vh) scale(0.95) rotate(0deg);
        opacity: 0;
    }
}

/* Bubble size variants for visual depth */
.bubble.bubble-tiny {
    box-shadow: inset 0 -2px 4px rgba(30,30,34,0.06), 0 1px 6px rgba(148,184,212,0.1);
}

.bubble.bubble-large {
    box-shadow: inset 0 -6px 12px rgba(30,30,34,0.1), 0 3px 18px rgba(148,184,212,0.2);
}

/* ===========================================
   EDITORIAL SPREADS
   =========================================== */
.spread-editorial {
    background: var(--pure-light);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 3.2rem;
}

.spread-editorial::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(ellipse at 70% 50%, rgba(148,184,212,0.04) 0%, transparent 55%),
                radial-gradient(ellipse at 20% 80%, rgba(127,168,127,0.03) 0%, transparent 45%);
    pointer-events: none;
    z-index: 0;
}

.spread-grid {
    display: grid;
    grid-template-columns: 1fr 1.618fr 1fr 1fr 1.618fr 1fr;
    gap: 3.2rem;
    width: 100%;
    max-width: 1400px;
    height: 80vh;
    align-items: center;
    position: relative;
    z-index: 1;
}

.image-zone {
    position: relative;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background: radial-gradient(ellipse at 50% 50%, rgba(234,234,236,0.3) 0%, transparent 70%);
    border-radius: 2px;
}

.spread-grid .image-zone.left-zone {
    grid-column: 1 / 4;
}

.spread-grid .text-zone.right-zone {
    grid-column: 4 / 7;
    padding: 2rem 3rem;
}

.spread-grid.reverse .text-zone.left-zone {
    grid-column: 1 / 4;
    padding: 2rem 3rem;
}

.spread-grid.reverse .image-zone.right-zone {
    grid-column: 4 / 7;
}

.spread-number {
    font-family: 'Comfortaa', sans-serif;
    font-weight: 300;
    font-size: 0.75rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--chrome-shadow);
    display: block;
    margin-bottom: 1.5rem;
    opacity: 0.7;
}

.spread-headline {
    font-family: 'Nunito', sans-serif;
    font-weight: 700;
    font-size: clamp(2rem, 4vw, 3.6rem);
    letter-spacing: 0em;
    line-height: 1.1;
    color: var(--chrome-depth);
    text-transform: none;
    margin-bottom: 2rem;
}

.spread-body {
    font-family: 'Quicksand', sans-serif;
    font-weight: 400;
    font-size: clamp(1rem, 1.4vw, 1.25rem);
    letter-spacing: 0.01em;
    line-height: 1.85;
    color: var(--chrome-depth);
    max-width: 42ch;
    margin-bottom: 1.5rem;
}

.spread-body:last-child {
    margin-bottom: 0;
}

/* ===========================================
   BOTANICAL SVG ELEMENTS
   =========================================== */
.botanical-peony {
    position: absolute;
    width: 350px;
    height: 350px;
    z-index: 2;
}

.peony-1 {
    top: 10%;
    left: 10%;
}

.peony-2 {
    bottom: 10%;
    right: 10%;
}

.interstitial-peony {
    position: relative;
    width: 300px;
    height: 300px;
}

.peony-path {
    stroke-dasharray: 2000;
    stroke-dashoffset: 2000;
    transition: stroke-dashoffset 3s ease-in-out;
}

.peony-path.petal-accent {
    transition: stroke-dashoffset 3.5s ease-in-out 0.3s;
}

.peony-path.drawn {
    stroke-dashoffset: 0;
}

.botanical-eucalyptus {
    width: 160px;
    height: 400px;
}

.eucalyptus-path {
    stroke-dasharray: 1500;
    stroke-dashoffset: 1500;
    transition: stroke-dashoffset 2s ease-in-out;
}

.eucalyptus-path.leaf {
    transition: stroke-dashoffset 1.8s ease-in-out 0.5s;
}

.eucalyptus-path.leaf-shape {
    transition: stroke-dashoffset 1.5s ease-in-out 0.8s;
}

.eucalyptus-path.drawn {
    stroke-dashoffset: 0;
}

.botanical-fern {
    position: absolute;
    width: 300px;
    height: 380px;
    z-index: 2;
    top: 15%;
    left: 15%;
}

.fern-draw-path {
    stroke-dasharray: 1000;
    stroke-dashoffset: 1000;
    transition: stroke-dashoffset 2.5s ease-in-out;
}

.fern-draw-path.drawn {
    stroke-dashoffset: 0;
}

.fern-watermark {
    position: absolute;
    width: 300px;
    height: 500px;
    top: 5%;
    left: 20%;
    z-index: 1;
    pointer-events: none;
}

.fern-watermark .fern-path {
    opacity: 0.06;
}

.water-lily {
    position: absolute;
    width: 80px;
    height: 80px;
    bottom: 15%;
    right: 20%;
    z-index: 3;
    opacity: 0.8;
}

.water-lily-2 {
    bottom: 20%;
    right: 15%;
}

.water-lily-3 {
    width: 50px;
    height: 50px;
    bottom: 30%;
    right: 30%;
    opacity: 0.5;
}

/* ===========================================
   INTERSTITIAL SECTIONS
   =========================================== */
.interstitial {
    min-height: 20vh;
    background: linear-gradient(135deg, #C8C8CA 0%, #EAEAEC 40%, #C8C8CA 60%, #6B6B6F 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    scroll-snap-align: start;
    position: sticky;
    z-index: 2;
}

/* ===========================================
   SPREAD 6: Closing
   =========================================== */
.spread-closing {
    background: var(--deep-ground);
    display: flex;
    align-items: flex-end;
    justify-content: flex-end;
}

.closing-bubbles {
    z-index: 1;
}

.closing-fern-watermark {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    z-index: 0;
}

.closing-fern-watermark svg {
    width: 50%;
    height: 70%;
}

.closing-content {
    position: relative;
    z-index: 10;
    padding: 3rem;
}

.closing-domain {
    font-family: 'Nunito', sans-serif;
    font-weight: 700;
    font-size: clamp(1.5rem, 3vw, 2.5rem);
    letter-spacing: -0.02em;
    background: linear-gradient(135deg, #C8C8CA 0%, #EAEAEC 20%, #94B8D4 45%, #EAEAEC 65%, #C8C8CA 85%, #6B6B6F 100%);
    background-size: 200% 200%;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: chromeShift 15s linear infinite;
    display: inline-block;
}

/* ===========================================
   CLOSING BUBBLE SPECIAL STYLING
   =========================================== */
.closing-bubbles .bubble {
    background: radial-gradient(circle at 30% 30%, rgba(255,255,255,0.3), rgba(148,184,212,0.15) 50%, rgba(200,200,202,0.05) 100%);
    box-shadow: inset 0 -3px 6px rgba(30,30,34,0.12), 0 2px 8px rgba(148,184,212,0.1);
}

.closing-bubbles .bubble::before {
    background: radial-gradient(circle, rgba(255,255,255,0.5) 0%, rgba(255,255,255,0) 100%);
}

/* ===========================================
   RESPONSIVE
   =========================================== */
@media (max-width: 900px) {
    .spread-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
        height: auto;
        padding: 2rem 0;
    }

    .spread-grid .image-zone.left-zone,
    .spread-grid .text-zone.right-zone,
    .spread-grid.reverse .text-zone.left-zone,
    .spread-grid.reverse .image-zone.right-zone {
        grid-column: 1 / -1;
    }

    .image-zone {
        height: 40vh;
    }

    .spread-editorial {
        padding: 0 1.5rem;
    }

    .text-zone {
        padding: 1.5rem !important;
    }

    .botanical-peony {
        width: 220px;
        height: 220px;
    }

    .botanical-fern {
        width: 180px;
        height: 240px;
    }

    #nav-strip,
    #nav-eucalyptus {
        display: none;
    }
}

@media (max-width: 600px) {
    .domain-title {
        font-size: clamp(3rem, 15vw, 6rem);
    }

    .spread-headline {
        font-size: clamp(1.6rem, 6vw, 2.4rem);
    }

    .spread-body {
        font-size: 1rem;
        line-height: 1.7;
    }

    .spread-editorial {
        padding: 0 1rem;
    }

    .botanical-peony {
        width: 160px;
        height: 160px;
    }

    .interstitial-peony {
        width: 200px;
        height: 200px;
    }

    .interstitial {
        min-height: 15vh;
    }
}

/* ===========================================
   CONTEXT MENU / SELECTION PREVENTION
   =========================================== */
body.no-select {
    user-select: none;
    -webkit-user-select: none;
}

/* ===========================================
   REDUCED MOTION PREFERENCE
   =========================================== */
@media (prefers-reduced-motion: reduce) {
    .bubble {
        animation: bubbleFadeIn 2s ease-out forwards;
    }

    .domain-title {
        animation: none;
        background-position: 50% 50%;
    }

    .domain-title .letter {
        animation: none;
        opacity: 1;
        transform: scale(1);
    }

    .rule {
        animation: none;
        opacity: 1;
    }

    .rule-1 { width: 60vw; }
    .rule-2 { width: 40vw; }
    .rule-3 { width: 20vw; }

    .closing-domain {
        animation: none;
    }

    .nav-indicator.active {
        animation: none;
    }
}
