/* =====================================================
   eesugi.com — Frutiger Aero × Earth Tones
   Compliance notes: IntersectionObserver — no scroll-velocity calculations.
   IntersectionObserver` — NOT parallax or scroll-triggered animation libraries.
   Each content element that should fade in receives `class="reveal"` and starts with `opacity: 0`.
   IntersectionObserver` fade-reveal. Lora" (Google Fonts named in design; standard CSS fallbacks used locally.
   ===================================================== */

/* ---------- Tokens ---------- */
:root {
    --deep-earth: #3B2F1E;
    --warm-clay: #A0694B;
    --golden-amber: #D4A853;
    --sage-green: #7A9E7E;
    --moss-shadow: #3D5241;
    --mist: #F4EDE4;
    --sky-gloss: #B8D4E3;
    --charcoal: #2A2420;

    --grad-hero: linear-gradient(165deg, #D4A853 0%, #A0694B 40%, #7A9E7E 100%);
    --grad-clearing: linear-gradient(180deg, #A0694B 0%, #7A9E7E 50%, #F4EDE4 100%);
    --grad-grove: linear-gradient(180deg, #F4EDE4 0%, #E8DDC9 50%, #D9CFB6 100%);
    --grad-meadow: linear-gradient(180deg, #7A9E7E 0%, #A0694B 60%, #3B2F1E 100%);

    --glass-bg: rgba(244, 237, 228, 0.55);
    --glass-border: rgba(255, 255, 255, 0.35);
    --glass-shadow:
        0 8px 32px rgba(59, 47, 30, 0.10),
        inset 0 1px 0 rgba(255, 255, 255, 0.40),
        0 0 0 1px rgba(255, 255, 255, 0.30);

    --font-display: "Outfit", system-ui, sans-serif;
    --font-body: "Lora", Georgia, serif;
    --font-jp: "Zen Kaku Gothic New", "Hiragino Sans", "Noto Sans JP", sans-serif;

    --ease-out-aero: cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

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

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

body {
    font-family: var(--font-body);
    color: var(--charcoal);
    background: var(--mist);
    line-height: 1.72;
    min-height: 100vh;
    overflow-x: hidden;
}

img, svg {
    display: block;
    max-width: 100%;
}

em {
    font-style: italic;
    color: var(--warm-clay);
}

strong {
    font-weight: 600;
    color: var(--deep-earth);
}

/* ---------- Narrative wrapper ---------- */
.narrative {
    display: flex;
    flex-direction: column;
    width: 100%;
}

.zone {
    position: relative;
    width: 100%;
    min-height: 100vh;
    padding-inline: clamp(2rem, 8vw, 8rem);
    padding-block: clamp(4rem, 10vh, 9rem);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

/* =====================================================
   CANOPY — Hero Zone
   ===================================================== */
.zone--canopy {
    background: var(--grad-hero);
    justify-content: flex-start;
    min-height: 100vh;
}

.canopy-sky {
    position: absolute;
    inset: 0;
    z-index: 0;
    overflow: hidden;
    animation: breathe 14s ease-in-out infinite;
}

@keyframes breathe {
    0%, 100% { transform: scale(1); }
    50%      { transform: scale(1.02); }
}

.hills {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 72%;
    filter: drop-shadow(0 -20px 40px rgba(59, 47, 30, 0.15));
}

.hill--far { animation: driftX 28s ease-in-out infinite; transform-origin: center bottom; }
.hill--mid { animation: driftX 22s ease-in-out infinite reverse; transform-origin: center bottom; }
.hill--near { animation: driftX 36s ease-in-out infinite; transform-origin: center bottom; }

@keyframes driftX {
    0%, 100% { transform: translateX(0); }
    50%      { transform: translateX(-1.4%); }
}

/* Aero spheres — shared system */
.aero-field {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 1;
}

.aero-sphere {
    position: absolute;
    width: var(--size, 60px);
    height: var(--size, 60px);
    left: var(--x, 50%);
    top: var(--y, 50%);
    border-radius: 50%;
    background: radial-gradient(circle at 35% 35%,
        rgba(244, 237, 228, 0.85) 0%,
        rgba(184, 212, 227, 0.55) 25%,
        rgba(184, 212, 227, 0.15) 60%,
        transparent 100%);
    box-shadow:
        inset 0 0 18px rgba(255, 255, 255, 0.4),
        0 6px 22px rgba(184, 212, 227, 0.25);
    animation: sphere-float var(--dur, 6s) ease-in-out infinite;
    animation-delay: var(--delay, 0s);
    will-change: transform;
    filter: blur(0.3px);
}

.aero-sphere::after {
    content: "";
    position: absolute;
    top: 14%;
    left: 22%;
    width: 30%;
    height: 22%;
    border-radius: 50%;
    background: radial-gradient(ellipse at center,
        rgba(255, 255, 255, 0.85) 0%,
        rgba(255, 255, 255, 0) 70%);
}

@keyframes sphere-float {
    0%, 100% { transform: translateY(0) scale(1); }
    50%      { transform: translateY(-20px) scale(1.05); }
}

/* Canopy content */
.canopy-content {
    position: relative;
    z-index: 2;
    margin-top: 18vh;
    margin-inline-start: clamp(0rem, 4vw, 6rem);
    max-width: 60ch;
}

.eyebrow {
    font-family: var(--font-display);
    font-weight: 500;
    font-size: 0.75rem;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--mist);
    opacity: 0.85;
    margin-bottom: 1.5rem;
    text-shadow: 0 1px 2px rgba(59, 47, 30, 0.2);
}

.wordmark {
    font-family: var(--font-display);
    font-weight: 300;
    font-size: clamp(3.5rem, 9vw, 8rem);
    letter-spacing: 0.04em;
    line-height: 1;
    color: rgba(244, 237, 228, 0.78);
    text-shadow:
        0 2px 30px rgba(244, 237, 228, 0.35),
        0 1px 0 rgba(255, 255, 255, 0.35);
    -webkit-background-clip: text;
    background-clip: text;
    margin-bottom: 0.5rem;
}

.kanji {
    font-family: var(--font-jp);
    font-weight: 400;
    font-size: clamp(1.2rem, 2.5vw, 2rem);
    color: var(--mist);
    letter-spacing: 0.1em;
    filter: drop-shadow(0 0 14px rgba(244, 237, 228, 0.45));
    margin-bottom: 2rem;
}

.tagline {
    font-family: var(--font-body);
    font-style: italic;
    font-size: clamp(1rem, 1.6vw, 1.2rem);
    color: rgba(244, 237, 228, 0.9);
    max-width: 36ch;
    line-height: 1.65;
    text-shadow: 0 1px 3px rgba(59, 47, 30, 0.25);
}

.scroll-hint {
    position: absolute;
    bottom: clamp(1.5rem, 4vh, 3rem);
    left: 50%;
    transform: translateX(-50%);
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    opacity: 0.7;
}

.scroll-hint__label {
    font-family: var(--font-display);
    font-size: 0.7rem;
    letter-spacing: 0.24em;
    text-transform: uppercase;
    color: var(--mist);
}

.scroll-hint__line {
    display: block;
    width: 1px;
    height: 48px;
    background: linear-gradient(to bottom, transparent, var(--mist));
    animation: line-pulse 3s ease-in-out infinite;
}

@keyframes line-pulse {
    0%, 100% { transform: scaleY(0.6); opacity: 0.4; }
    50%      { transform: scaleY(1);   opacity: 1; }
}

/* =====================================================
   CLEARING — Introduction
   ===================================================== */
.zone--clearing {
    background: var(--grad-clearing);
    min-height: 100vh;
    align-items: center;
    justify-content: center;
}

.contours {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
}

.clearing-content {
    position: relative;
    z-index: 2;
    text-align: center;
    max-width: 46ch;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2.5rem;
}

.leaf-divider {
    display: inline-block;
    width: clamp(60px, 8vw, 96px);
    opacity: 0.9;
    animation: leaf-sway 7s ease-in-out infinite;
    transform-origin: bottom center;
}

@keyframes leaf-sway {
    0%, 100% { transform: rotate(-2deg); }
    50%      { transform: rotate(2deg); }
}

.clearing-paragraph {
    font-family: var(--font-body);
    font-size: clamp(1.05rem, 1.8vw, 1.35rem);
    line-height: 1.78;
    color: var(--deep-earth);
    max-width: 38ch;
    margin: 0 auto;
}

.clearing-paragraph em {
    font-style: italic;
    color: var(--warm-clay);
}

/* =====================================================
   GROVE — Content Panels
   ===================================================== */
.zone--grove {
    background: var(--grad-grove);
    padding-block: clamp(6rem, 14vh, 12rem);
    gap: clamp(4rem, 10vh, 8rem);
    justify-content: flex-start;
}

.grove-atmosphere {
    position: absolute;
    inset: 0;
    z-index: 0;
    overflow: hidden;
    pointer-events: none;
}

.dot-grid {
    position: absolute;
    inset: 0;
    background-image: radial-gradient(circle, rgba(59, 47, 30, 0.18) 1.2px, transparent 1.4px);
    background-size: 24px 24px;
    opacity: 0.35;
    mix-blend-mode: multiply;
}

.aero-field--grove .aero-sphere {
    background: radial-gradient(circle at 35% 35%,
        rgba(184, 212, 227, 0.7) 0%,
        rgba(184, 212, 227, 0.25) 45%,
        transparent 100%);
    box-shadow:
        inset 0 0 14px rgba(255, 255, 255, 0.5),
        0 4px 18px rgba(184, 212, 227, 0.2);
}

.glass-panel {
    position: relative;
    z-index: 2;
    background: var(--glass-bg);
    backdrop-filter: blur(16px) saturate(1.4);
    -webkit-backdrop-filter: blur(16px) saturate(1.4);
    border-radius: 1.5rem;
    border: 1px solid var(--glass-border);
    box-shadow: var(--glass-shadow);
    padding: clamp(2rem, 5vw, 4rem);
    display: grid;
    grid-template-columns: 1fr 1.4fr;
    gap: clamp(2rem, 4vw, 4rem);
    align-items: center;
    max-width: 960px;
    width: min(100%, 960px);
    transition: transform 0.6s var(--ease-out-aero),
                box-shadow 0.6s var(--ease-out-aero);
}

.glass-panel:hover {
    transform: translateY(-4px);
    box-shadow:
        0 16px 44px rgba(59, 47, 30, 0.16),
        inset 0 1px 0 rgba(255, 255, 255, 0.5),
        0 0 0 1px rgba(255, 255, 255, 0.4);
}

.glass-panel--left {
    margin-inline-start: clamp(0rem, 4vw, 4rem);
    margin-inline-end: auto;
}

.glass-panel--right {
    margin-inline-start: auto;
    margin-inline-end: clamp(0rem, 4vw, 4rem);
    grid-template-columns: 1.4fr 1fr;
}

.glass-panel--center {
    margin-inline: auto;
    grid-template-columns: 1fr;
    max-width: 720px;
    text-align: center;
}

/* Corner + alignment marks */
.corner {
    position: absolute;
    font-family: var(--font-display);
    font-size: 0.85rem;
    font-weight: 400;
    color: var(--warm-clay);
    opacity: 0.4;
    line-height: 1;
    user-select: none;
}
.corner--tl { top: 10px; left: 14px; }
.corner--tr { top: 10px; right: 14px; }
.corner--bl { bottom: 10px; left: 14px; }
.corner--br { bottom: 10px; right: 14px; }

.panel-visual {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 240px;
}

.vine {
    width: min(100%, 200px);
    height: auto;
}

.vine__trace path {
    stroke-dasharray: 500;
    stroke-dashoffset: 500;
    transition: stroke-dashoffset 2.4s var(--ease-out-aero);
}

.glass-panel.revealed .vine__trace path {
    stroke-dashoffset: 0;
}

.vine__nodes circle,
.vine__leaves ellipse {
    opacity: 0;
    transition: opacity 0.6s ease 1.6s;
}

.glass-panel.revealed .vine__nodes circle,
.glass-panel.revealed .vine__leaves ellipse {
    opacity: 1;
}

.panel-text {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.panel-text--wide {
    text-align: center;
    align-items: center;
    max-width: 52ch;
    margin: 0 auto;
}

.panel-label {
    font-family: var(--font-display);
    font-weight: 500;
    font-size: 0.72rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--warm-clay);
}

.panel-heading {
    font-family: var(--font-display);
    font-weight: 400;
    font-size: clamp(1.6rem, 3.2vw, 2.4rem);
    letter-spacing: -0.01em;
    color: var(--deep-earth);
    line-height: 1.2;
}

.panel-body {
    font-family: var(--font-body);
    font-size: clamp(1rem, 1.4vw, 1.1rem);
    line-height: 1.72;
    color: var(--charcoal);
}

/* Circuit divider */
.circuit-hr {
    position: relative;
    z-index: 2;
    width: min(100%, 600px);
    margin: 0 auto;
}

.circuit-hr svg {
    width: 100%;
    height: 24px;
    opacity: 0.7;
}

/* =====================================================
   MEADOW — Footer zone
   ===================================================== */
.zone--meadow {
    background: var(--grad-meadow);
    min-height: 100vh;
    align-items: center;
    justify-content: center;
    text-align: center;
    overflow: hidden;
}

.contours--meadow {
    opacity: 0.8;
}

.meadow-content {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
    max-width: 40ch;
}

.meadow-kanji {
    font-family: var(--font-jp);
    font-weight: 300;
    font-size: clamp(2.5rem, 5vw, 4rem);
    letter-spacing: 0.14em;
    color: var(--mist);
    filter: drop-shadow(0 0 22px rgba(244, 237, 228, 0.45));
}

.meadow-whisper {
    font-family: var(--font-body);
    font-style: italic;
    font-size: clamp(1rem, 1.5vw, 1.15rem);
    color: rgba(244, 237, 228, 0.85);
    line-height: 1.7;
}

.watermark {
    position: absolute;
    bottom: -2vh;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1;
    font-family: var(--font-display);
    font-weight: 300;
    font-size: clamp(8rem, 22vw, 22rem);
    letter-spacing: 0.02em;
    color: var(--mist);
    opacity: 0.15;
    pointer-events: none;
    line-height: 0.85;
    white-space: nowrap;
}

/* =====================================================
   Reveal animation primitives
   ===================================================== */
.reveal {
    opacity: 0;
    transform: translateY(2rem);
    transition:
        opacity 0.9s var(--ease-out-aero),
        transform 0.9s var(--ease-out-aero);
    transition-delay: calc(var(--reveal-index, 0) * 0.12s);
}

.reveal.revealed {
    opacity: 1;
    transform: translateY(0);
}

/* =====================================================
   Responsive refinements
   ===================================================== */
@media (max-width: 860px) {
    .glass-panel,
    .glass-panel--right,
    .glass-panel--left {
        grid-template-columns: 1fr;
        margin-inline: auto;
        text-align: center;
    }

    .panel-visual {
        min-height: 180px;
    }

    .panel-text {
        align-items: center;
    }

    .panel-text--wide {
        max-width: 40ch;
    }

    .canopy-content {
        margin-top: 14vh;
    }

    .watermark {
        font-size: clamp(5rem, 26vw, 12rem);
    }
}

@media (max-width: 560px) {
    .zone {
        padding-inline: clamp(1.25rem, 6vw, 3rem);
    }

    .glass-panel {
        padding: clamp(1.5rem, 6vw, 2.5rem);
        border-radius: 1.25rem;
    }
}

/* =====================================================
   Motion-reduced fallback — respects user preference
   ===================================================== */
@media (prefers-reduced-motion: reduce) {
    .canopy-sky,
    .hill--far, .hill--mid, .hill--near,
    .aero-sphere,
    .leaf-divider,
    .scroll-hint__line {
        animation: none;
    }

    .reveal {
        opacity: 1;
        transform: none;
        transition: none;
    }

    .vine__trace path {
        stroke-dashoffset: 0;
    }

    .vine__nodes circle,
    .vine__leaves ellipse {
        opacity: 1;
    }
}
