:root {
    /* Foundation */
    --foundation-dark: #0d0d0f;
    --foundation-light: #faf7f2;
    /* Candy Accents */
    --candy-pink: #ff3d8f;
    --candy-mint: #00e5a0;
    --candy-orange: #ff8a2b;
    --candy-violet: #b347ff;
    /* Neutrals */
    --mid-gray: #2a2a30;
    --warm-gray: #e8e3db;
    /* Spacing */
    --space-unit: 4px;
    /* Animation */
    --morph-duration: 16s;
    --fade-in: 0.4s;
    --bokeh-hover: 0.6s;
}

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

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

body {
    background-color: var(--foundation-dark);
    color: var(--foundation-light);
    font-family: 'IBM Plex Mono', monospace;
    font-weight: 400;
    font-size: clamp(0.875rem, 1.2vw, 1.05rem);
    line-height: 1.75;
    letter-spacing: 0.01em;
    overflow-x: hidden;
}

/* ========================================
   ACT I — HERO
   ======================================== */

.act-hero {
    position: relative;
    width: 100%;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background-color: var(--foundation-dark);
}

.hero-bokeh {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle 120px at 15% 25%, rgba(255,61,143,0.18), transparent),
        radial-gradient(circle 180px at 75% 50%, rgba(0,229,160,0.14), transparent),
        radial-gradient(circle 90px at 45% 75%, rgba(179,71,255,0.12), transparent),
        radial-gradient(circle 150px at 85% 15%, rgba(255,138,43,0.10), transparent),
        radial-gradient(circle 60px at 30% 60%, rgba(255,61,143,0.08), transparent),
        radial-gradient(circle 100px at 60% 30%, rgba(0,229,160,0.06), transparent);
    mix-blend-mode: screen;
    animation: heroBokehDrift 20s ease-in-out infinite alternate;
}

@keyframes heroBokehDrift {
    0% { transform: scale(1) translate(0, 0); }
    50% { transform: scale(1.05) translate(-10px, 5px); }
    100% { transform: scale(1) translate(5px, -5px); }
}

.hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
}

.hero-kanji {
    font-family: 'Space Mono', monospace;
    font-weight: 700;
    font-size: clamp(8rem, 20vw, 16rem);
    letter-spacing: -0.03em;
    line-height: 1;
    animation: kanjiColorCycle 8s ease-in-out infinite;
    text-shadow: 0 0 80px rgba(255,61,143,0.3), 0 0 160px rgba(0,229,160,0.15);
}

@keyframes kanjiColorCycle {
    0%, 100% { color: var(--candy-pink); }
    25% { color: var(--candy-mint); }
    50% { color: var(--candy-orange); }
    75% { color: var(--candy-violet); }
}

.hero-tagline {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 14px;
    letter-spacing: 0.08em;
    color: var(--warm-gray);
    margin-top: calc(var(--space-unit) * 6);
}

/* Botanical Floats — populated by JS */
.botanical-float {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 1;
    overflow: hidden;
}

.petal {
    position: absolute;
    width: 12px;
    height: 12px;
    background: rgba(255, 61, 143, 0.2);
    border-radius: 50% 0 50% 0;
    animation: petalDrift 40s linear infinite;
}

@keyframes petalDrift {
    0% {
        transform: translate(-20px, -20px) rotate(0deg);
        opacity: 0;
    }
    10% { opacity: 1; }
    90% { opacity: 1; }
    100% {
        transform: translate(calc(100vw + 40px), calc(100vh + 40px)) rotate(720deg);
        opacity: 0;
    }
}

.bamboo-line {
    position: absolute;
    width: 2px;
    background: rgba(0, 229, 160, 0.3);
    animation: bambooGrow 30s ease-in-out infinite alternate;
}

.bamboo-node {
    position: absolute;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(0, 229, 160, 0.2);
    left: -3px;
}

.maple-leaf {
    position: absolute;
    width: 14px;
    height: 14px;
    background: rgba(255, 138, 43, 0.25);
    clip-path: polygon(50% 0%, 80% 30%, 100% 50%, 80% 70%, 50% 100%, 20% 70%, 0% 50%, 20% 30%);
    animation: leafDrift 35s linear infinite;
}

@keyframes leafDrift {
    0% {
        transform: translate(-20px, -20px) rotate(0deg);
        opacity: 0;
    }
    10% { opacity: 1; }
    90% { opacity: 1; }
    100% {
        transform: translate(calc(100vw + 40px), calc(100vh + 40px)) rotate(540deg);
        opacity: 0;
    }
}

.snowflake {
    position: absolute;
    width: 10px;
    height: 10px;
    background: rgba(179, 71, 255, 0.15);
    clip-path: polygon(50% 0%, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%);
    animation: snowDrift 45s linear infinite;
}

@keyframes snowDrift {
    0% {
        transform: translate(0, -20px) rotate(0deg);
        opacity: 0;
    }
    10% { opacity: 1; }
    90% { opacity: 1; }
    100% {
        transform: translate(50px, calc(100vh + 40px)) rotate(360deg);
        opacity: 0;
    }
}

@keyframes bambooGrow {
    0% { height: 30vh; }
    100% { height: 70vh; }
}

/* Hero scroll fade */
.act-hero.scrolled .hero-content {
    transform: scale(1.05);
    opacity: 0;
    transition: transform 0.8s ease, opacity 0.6s ease;
}

/* ========================================
   ACT II — MASONRY
   ======================================== */

.act-masonry {
    position: relative;
    padding: calc(var(--space-unit) * 8) calc(var(--space-unit) * 4);
    min-height: 200vh;
}

.masonry-grid {
    display: grid;
    grid-template-columns: 3fr 4fr 3fr;
    gap: 12px;
    max-width: 1400px;
    margin: 0 auto;
}

.masonry-block {
    position: relative;
    padding: clamp(1.5rem, 3vw, 3rem);
    border-radius: 4px;
    overflow: hidden;
    contain: layout paint;
    opacity: 0;
    transform: translateY(24px);
    transition: opacity var(--fade-in) ease-out, transform var(--fade-in) ease-out;
}

.masonry-block.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Block Heights */
.block-tall {
    min-height: 520px;
}

.block-medium {
    min-height: 340px;
}

.block-short {
    min-height: 220px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

/* Block Themes */
.block-dark {
    background-color: var(--mid-gray);
    color: var(--foundation-light);
}

.block-light {
    background-color: var(--foundation-light);
    color: var(--foundation-dark);
}

/* Block Bokeh Backgrounds */
.block-bokeh {
    position: absolute;
    inset: 0;
    mix-blend-mode: screen;
    transition: transform var(--bokeh-hover) ease, opacity var(--bokeh-hover) ease;
    opacity: 0.7;
}

.masonry-block:hover .block-bokeh {
    transform: scale(1.08);
    opacity: 1;
}

.bokeh-variant-1 {
    background:
        radial-gradient(circle 80px at 20% 30%, rgba(255,61,143,0.15), transparent),
        radial-gradient(circle 120px at 70% 60%, rgba(0,229,160,0.12), transparent),
        radial-gradient(circle 60px at 50% 80%, rgba(179,71,255,0.10), transparent);
}

.bokeh-variant-2 {
    background:
        radial-gradient(circle 100px at 80% 20%, rgba(0,229,160,0.16), transparent),
        radial-gradient(circle 70px at 30% 70%, rgba(255,138,43,0.12), transparent),
        radial-gradient(circle 50px at 60% 40%, rgba(255,61,143,0.08), transparent);
}

.bokeh-variant-3 {
    background:
        radial-gradient(circle 90px at 40% 25%, rgba(255,138,43,0.14), transparent),
        radial-gradient(circle 130px at 75% 70%, rgba(179,71,255,0.12), transparent),
        radial-gradient(circle 55px at 15% 60%, rgba(0,229,160,0.10), transparent);
}

.bokeh-variant-4 {
    background:
        radial-gradient(circle 110px at 60% 35%, rgba(179,71,255,0.16), transparent),
        radial-gradient(circle 80px at 20% 75%, rgba(255,61,143,0.10), transparent),
        radial-gradient(circle 60px at 85% 55%, rgba(255,138,43,0.08), transparent);
}

.bokeh-variant-5 {
    background:
        radial-gradient(circle 70px at 30% 40%, rgba(255,61,143,0.14), transparent),
        radial-gradient(circle 100px at 80% 25%, rgba(0,229,160,0.11), transparent),
        radial-gradient(circle 140px at 50% 80%, rgba(179,71,255,0.09), transparent);
}

.bokeh-variant-6 {
    background:
        radial-gradient(circle 95px at 70% 30%, rgba(255,138,43,0.15), transparent),
        radial-gradient(circle 75px at 25% 65%, rgba(255,61,143,0.11), transparent),
        radial-gradient(circle 110px at 55% 50%, rgba(0,229,160,0.09), transparent);
}

/* Block Typography */
.block-label {
    font-family: 'Space Mono', monospace;
    font-weight: 400;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    display: inline-block;
    margin-bottom: calc(var(--space-unit) * 4);
    position: relative;
    z-index: 1;
    color: var(--warm-gray);
}

.block-label.accent-mint { color: var(--candy-mint); }
.block-label.accent-orange { color: var(--candy-orange); }
.block-label.accent-violet { color: var(--candy-violet); }
.block-label.accent-pink { color: var(--candy-pink); }

.block-title {
    font-family: 'Space Mono', monospace;
    font-weight: 700;
    font-size: clamp(2.8rem, 6vw, 5.5rem);
    letter-spacing: -0.03em;
    text-transform: uppercase;
    line-height: 1.05;
    margin-bottom: calc(var(--space-unit) * 6);
    position: relative;
    z-index: 1;
}

.block-subtitle {
    font-family: 'Noto Sans JP', sans-serif;
    font-weight: 500;
    font-size: clamp(1.6rem, 3vw, 2.4rem);
    margin-bottom: calc(var(--space-unit) * 4);
    position: relative;
    z-index: 1;
}

.block-body {
    position: relative;
    z-index: 1;
    max-width: 480px;
}

.block-poem {
    font-family: 'Space Mono', monospace;
    font-weight: 700;
    font-size: clamp(1.4rem, 2.5vw, 2rem);
    letter-spacing: -0.02em;
    line-height: 1.5;
    text-align: center;
}

/* Morph animation on blocks */
.masonry-block.morphing::after {
    content: '';
    position: absolute;
    top: -20%;
    right: -20%;
    width: 60%;
    height: 60%;
    background: radial-gradient(ellipse at center, rgba(255,61,143,0.06), transparent);
    animation: morph var(--morph-duration) ease-in-out infinite;
    pointer-events: none;
}

@keyframes morph {
    0%   { border-radius: 40% 60% 60% 40% / 60% 30% 70% 40%; }
    50%  { border-radius: 60% 40% 30% 70% / 40% 60% 40% 60%; }
    100% { border-radius: 40% 60% 60% 40% / 60% 30% 70% 40%; }
}

/* ========================================
   ACT III — SEASON
   ======================================== */

.act-season {
    position: relative;
    width: 100%;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background-color: var(--foundation-dark);
    padding: calc(var(--space-unit) * 16) calc(var(--space-unit) * 4);
}

.season-botanical {
    position: absolute;
    inset: 0;
    pointer-events: none;
    overflow: hidden;
}

.season-content {
    position: relative;
    z-index: 2;
    text-align: center;
    max-width: 1000px;
}

.season-kanji {
    font-family: 'Noto Sans JP', sans-serif;
    font-weight: 300;
    font-size: clamp(6rem, 15vw, 12rem);
    line-height: 1;
    margin-bottom: calc(var(--space-unit) * 2);
    animation: kanjiColorCycle 8s ease-in-out infinite;
}

.season-name {
    font-family: 'Space Mono', monospace;
    font-weight: 400;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--warm-gray);
    margin-bottom: calc(var(--space-unit) * 16);
}

.season-cocktails {
    display: flex;
    gap: calc(var(--space-unit) * 12);
    justify-content: center;
    align-items: flex-start;
}

.season-drink {
    flex: 1;
    max-width: 280px;
    text-align: left;
}

.drink-border {
    display: block;
    width: 100%;
    height: 2px;
    margin-bottom: calc(var(--space-unit) * 4);
}

.accent-border-pink { background-color: var(--candy-pink); }
.accent-border-mint { background-color: var(--candy-mint); }
.accent-border-orange { background-color: var(--candy-orange); }

.drink-name {
    font-family: 'Space Mono', monospace;
    font-weight: 700;
    font-size: clamp(1rem, 1.5vw, 1.2rem);
    text-transform: uppercase;
    letter-spacing: -0.02em;
    margin-bottom: calc(var(--space-unit) * 2);
}

.drink-desc {
    font-size: 0.85rem;
    color: var(--warm-gray);
    line-height: 1.6;
}

/* ========================================
   NAVIGATION PILL
   ======================================== */

.nav-pill {
    position: fixed;
    bottom: 16px;
    right: 16px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 12px 8px;
    border-radius: 20px;
    background: rgba(255, 61, 143, 0.12);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    z-index: 100;
    border: 1px solid rgba(255, 61, 143, 0.15);
}

.nav-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    border: 2px solid var(--warm-gray);
    background: transparent;
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 0;
}

.nav-dot.active {
    background: var(--candy-pink);
    border-color: var(--candy-pink);
    box-shadow: 0 0 8px rgba(255, 61, 143, 0.5);
}

.nav-dot:hover {
    border-color: var(--candy-mint);
}

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

@media (max-width: 1024px) {
    .masonry-grid {
        grid-template-columns: 1fr 1fr;
    }

    .block-title {
        font-size: clamp(2rem, 5vw, 3.5rem);
    }

    .season-cocktails {
        gap: calc(var(--space-unit) * 8);
    }
}

@media (max-width: 640px) {
    .masonry-grid {
        grid-template-columns: 1fr;
    }

    .block-tall {
        min-height: 400px;
    }

    .block-medium {
        min-height: 280px;
    }

    .block-short {
        min-height: 180px;
    }

    .hero-kanji {
        font-size: clamp(5rem, 18vw, 10rem);
    }

    .season-cocktails {
        flex-direction: column;
        align-items: center;
        gap: calc(var(--space-unit) * 8);
    }

    .season-drink {
        max-width: 100%;
        width: 100%;
    }

    .season-kanji {
        font-size: clamp(5rem, 18vw, 9rem);
    }
}

/* ========================================
   REDUCED MOTION
   ======================================== */

@media (prefers-reduced-motion: reduce) {
    .hero-kanji,
    .season-kanji {
        animation: none;
        color: var(--candy-pink);
    }

    .hero-bokeh {
        animation: none;
    }

    .petal,
    .maple-leaf,
    .snowflake,
    .bamboo-line {
        animation: none;
    }

    .masonry-block {
        opacity: 1;
        transform: none;
        transition: none;
    }

    .masonry-block.morphing::after {
        animation: none;
    }

    .block-bokeh {
        transition: none;
    }
}

/* ========================================
   LIGHT MODE
   ======================================== */

@media (prefers-color-scheme: light) {
    body {
        background-color: var(--foundation-light);
        color: var(--foundation-dark);
    }

    .act-hero,
    .act-season {
        background-color: var(--foundation-light);
    }

    .block-dark {
        background-color: var(--warm-gray);
        color: var(--foundation-dark);
    }

    .block-light {
        background-color: #fff;
        color: var(--foundation-dark);
    }

    .hero-tagline,
    .season-name,
    .drink-desc {
        color: var(--mid-gray);
    }

    .block-label {
        color: var(--mid-gray);
    }
}
