/* ============================================================
   DATE INVITATION — CoD-BRIEFING STYLE v2
   Smooth scroll, varied layout, proper layering
   + Block 1 Dashboard + Two-phase scroll
   ============================================================ */

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

/* ---------- VARIABLES ---------- */
:root {
    --bg: #070809;
    --bg-deep: #040506;
    --accent: #f7d362;
    --accent-light: #ffebad;
    --pink: #8e98aa;
    --pink-light: #c1c8d5;
    --gold: #d6b45a;
    --text: #f4f1ea;
    --text-muted: rgba(244, 241, 234, 0.58);
    --mono: 'JetBrains Mono', monospace;
    --serif: 'Cormorant Garamond', serif;
    --sans: 'Manrope', sans-serif;
}

/* ---------- BASE ---------- */
html { overscroll-behavior: contain; }

body {
    font-family: var(--sans);
    background:
        radial-gradient(1200px 700px at 15% -10%, rgba(247,211,98,0.07), transparent 60%),
        radial-gradient(900px 620px at 85% 120%, rgba(135,148,172,0.09), transparent 58%),
        linear-gradient(155deg, #050607 0%, var(--bg) 52%, var(--bg-deep) 100%);
    color: var(--text);
    overflow-y: auto;
    -webkit-font-smoothing: antialiased;
}

/* Two-phase: journey mode locks scroll */
body.journey-active {
    overflow: hidden;
    height: 100vh;
    height: 100dvh;
}

/* Phase visibility toggling */
body:not(.journey-active) #map-layer,
body:not(.journey-active) .event-section,
body:not(.journey-active) #briefing-overlay,
body:not(.journey-active) #transition-flash,
body:not(.journey-active) .progress-bar {
    display: none;
}

body.journey-active #dashboard {
    display: none;
}

/* Noise overlay — topmost, never blocks clicks */
body::before {
    content: '';
    position: fixed;
    inset: 0;
    z-index: 9999;
    pointer-events: none;
    opacity: 0.018;
    filter: url(#noiseFilter);
}


/* ============================================================
   Z-INDEX MAP (bottom -> top)
   1  map-layer (background map)
   5  map HUD
   10 event sections
   20 transition flash
   25 briefing overlay
   30 progress bar
   ============================================================ */


/* ============================================================
   BLOCK 1 — DASHBOARD
   ============================================================ */
#dashboard {
    position: relative;
    min-height: 100vh;
    min-height: 100dvh;
    padding: 3rem 1.5rem 4rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    background:
        radial-gradient(140% 90% at 50% 0%, rgba(255,255,255,0.03), transparent 55%),
        linear-gradient(180deg, rgba(9,10,12,0.96) 0%, rgba(6,7,8,1) 100%);
}

.dashboard-header {
    text-align: center;
    margin-bottom: 2.6rem;
    max-width: 720px;
}

.dashboard-eyebrow {
    font-family: var(--mono);
    font-size: 0.58rem;
    letter-spacing: 0.28em;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 1rem;
}

.dashboard-title {
    font-family: var(--sans);
    font-size: clamp(2rem, 7vw, 3.8rem);
    font-weight: 650;
    letter-spacing: 0.01em;
    color: var(--text);
    line-height: 1.05;
    margin-bottom: 0.75rem;
}

/* --- Grid --- */
.dashboard-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.8rem;
    width: 100%;
    max-width: 540px;
}

.dash-card--wide {
    grid-column: span 1;
}

/* --- Card base --- */
.dash-card {
    position: relative;
    background: linear-gradient(160deg, rgba(27,30,36,0.95) 0%, rgba(16,18,23,0.98) 100%);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 30px;
    padding: 1.1rem 1.15rem;
    padding-bottom: calc(1.1rem + var(--ill-safe, 0px));
    overflow: hidden;
    opacity: 0;
    transform: translateY(22px);
    transition: box-shadow 0.35s ease, transform 0.35s ease, border-color 0.35s ease;
    display: flex;
    flex-direction: column;
    min-height: 218px;
    box-shadow:
        0 28px 55px rgba(0,0,0,0.5),
        inset 0 1px 0 rgba(255,255,255,0.07);
}

.dash-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 45%;
    background: linear-gradient(180deg, rgba(255,255,255,0.04), rgba(255,255,255,0));
    pointer-events: none;
    z-index: 0;
}

/* Subtle accent glow behind illustration area */
.dash-card::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 0;
    width: 72%;
    height: 88%;
    background: radial-gradient(ellipse at bottom right, var(--card-glow, rgba(255,255,255,0.04)), transparent 72%);
    pointer-events: none;
    z-index: 0;
}

.dash-card:hover {
    border-color: rgba(247,211,98,0.28);
    box-shadow:
        0 28px 62px rgba(0,0,0,0.58),
        inset 0 1px 0 rgba(255,255,255,0.1);
    transform: translateY(-4px);
}

.dash-card.revealed {
    opacity: 1;
    transform: translateY(0);
}

.dash-card__chip {
    width: fit-content;
    padding: 0.25rem 0.52rem;
    border-radius: 999px;
    border: 1px solid rgba(255,255,255,0.16);
    background: rgba(7,8,9,0.6);
    color: rgba(244,241,234,0.82);
    font-family: var(--mono);
    font-size: 0.54rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin-bottom: 0.72rem;
    position: relative;
    z-index: 2;
}

.dash-card__chip--accent {
    background: rgba(247,211,98,0.18);
    border-color: rgba(247,211,98,0.52);
    color: var(--accent-light);
}

.dash-card__title {
    font-family: var(--sans);
    font-size: clamp(1.2rem, 4vw, 1.7rem);
    font-weight: 650;
    letter-spacing: 0.01em;
    color: var(--text);
    line-height: 1.12;
    position: relative;
    z-index: 2;
}

.dash-card__title--caption {
    font-family: var(--mono);
    font-size: 0.58rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: rgba(255,232,165,0.9);
}

.dash-card__metric {
    font-family: var(--sans);
    font-size: clamp(1.65rem, 6.2vw, 2.8rem);
    font-weight: 700;
    letter-spacing: -0.01em;
    color: #f4f5f8;
    line-height: 1;
    margin-top: 0.15rem;
    position: relative;
    z-index: 2;
}

.dash-card__sub {
    font-size: 0.74rem;
    color: var(--text-muted);
    font-weight: 450;
    line-height: 1.55;
    margin-top: 0.52rem;
    max-width: 29ch;
    position: relative;
    z-index: 2;
}

.dash-card--weather .dash-card__sub,
.dash-card--taxi .dash-card__sub,
.dash-card--restaurant .dash-card__sub,
.dash-card--dresscode .dash-card__sub {
    max-width: 52ch;
}

.dash-card--restaurant .dash-card__sub {
    font-size: 0.69rem;
    line-height: 1.48;
}

.dash-card__link {
    color: var(--accent);
    text-decoration: none;
    font-weight: 550;
    border-bottom: 1px solid rgba(247,211,98,0.3);
    transition: color 0.2s, border-color 0.2s;
}

.dash-card__link:hover {
    color: var(--accent-light);
    border-color: rgba(255,235,173,0.7);
}

/* --- Illustration (bottom-right of card, like T-Bank Hub) --- */
.dash-card__illustration {
    position: absolute;
    left: var(--ill-left, auto);
    right: var(--ill-right, -14px);
    top: var(--ill-top, auto);
    bottom: var(--ill-bottom, -18px);
    pointer-events: none;
    z-index: 1;
    display: flex;
    justify-content: flex-end;
    align-items: flex-end;
    width: var(--ill-w, min(78%, 250px));
    height: var(--ill-h, 168px);
    opacity: var(--ill-opacity, 1);
    transform: translate(var(--ill-tx, 0), var(--ill-ty, 0)) rotate(var(--ill-rot, 0deg)) scale(var(--ill-scale, 1));
    transform-origin: 70% 90%;
}

.dash-card__illustration svg {
    display: block;
    width: 100%;
    height: auto;
    filter: saturate(1.08) contrast(1.12) brightness(1.03) drop-shadow(0 10px 18px rgba(0,0,0,0.42));
}

.dash-card__illustration img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center bottom;
    filter: saturate(1.08) contrast(1.12) brightness(1.03) drop-shadow(0 10px 18px rgba(0,0,0,0.42));
    position: relative;
    z-index: 1;
}

.dash-card--taxi .dash-card__illustration svg,
.dash-card--restaurant .dash-card__illustration svg {
    filter: saturate(1.12) contrast(1.15) brightness(1.04) drop-shadow(0 11px 22px rgba(0,0,0,0.5));
}

.dash-card--taxi .dash-card__illustration img,
.dash-card--restaurant .dash-card__illustration img {
    filter: saturate(1.12) contrast(1.15) brightness(1.04) drop-shadow(0 11px 22px rgba(0,0,0,0.5));
}

/* --- Wide card illustrations --- */
.dash-card--wide .dash-card__illustration {
    width: min(76%, 232px);
}

.dash-card--hero {
    --ill-w: min(120%, 440px);
    --ill-h: 240px;
    --ill-bottom: -40px;
    --ill-right: -70px;
    --ill-opacity: 0.92;
    --ill-safe: 126px;
}

.dash-card--hero .dash-card__img {
    -webkit-mask-image: linear-gradient(180deg, rgba(0,0,0,0) 0%, rgba(0,0,0,0.55) 25%, rgba(0,0,0,1) 60%);
    mask-image: linear-gradient(180deg, rgba(0,0,0,0) 0%, rgba(0,0,0,0.55) 25%, rgba(0,0,0,1) 60%);
}

.dash-card--restaurant .dash-card__illustration {
    --ill-w: min(118%, 430px);
    --ill-h: 240px;
    --ill-right: -78px;
    --ill-bottom: -42px;
}

/* --- Half cards --- */
.dash-card--walk,
.dash-card--shopping {
    min-height: 248px;
}

.dash-card--walk .dash-card__illustration,
.dash-card--shopping .dash-card__illustration {
    --ill-w: min(88%, 280px);
    --ill-h: 176px;
}

.dash-card--dresscode .dash-card__illustration {
    --ill-w: min(86%, 280px);
    --ill-h: 182px;
}

/* --- Per-card accent glows --- */
.dash-card--weather {
    --card-glow: rgba(176,193,224,0.16);
    --ill-w: min(82%, 252px);
    --ill-h: 160px;
    --ill-bottom: -22px;
    --ill-right: -18px;
    --ill-rot: -2deg;
    --ill-safe: 98px;
}
.dash-card--taxi {
    --card-glow: rgba(247,211,98,0.16);
    --ill-rot: 1deg;
}
.dash-card--walk {
    --card-glow: rgba(137,150,170,0.16);
    --ill-left: -18px;
    --ill-right: auto;
    --ill-bottom: -20px;
    --ill-rot: 1.5deg;
    --ill-safe: 108px;
}
.dash-card--shopping {
    --card-glow: rgba(232,196,88,0.18);
    --ill-left: 50%;
    --ill-right: auto;
    --ill-tx: -50%;
    --ill-bottom: -20px;
    --ill-rot: -1deg;
    --ill-safe: 108px;
}
.dash-card--restaurant {
    --card-glow: rgba(199,203,212,0.16);
}
.dash-card--dresscode {
    --card-glow: rgba(170,178,191,0.16);
    --ill-bottom: -22px;
    --ill-right: -26px;
    --ill-rot: -1deg;
    --ill-safe: 112px;
}

.dash-card--taxi .dash-card__title {
    font-family: var(--sans);
    font-size: clamp(1.45rem, 4.8vw, 2.1rem);
    font-weight: 640;
}

.dash-card--taxi .dash-card__title--caption {
    font-family: var(--mono);
    font-size: 0.56rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: rgba(255,232,165,0.88);
    margin-bottom: 0.3rem;
}

.dash-card--taxi .dash-card__metric {
    font-size: clamp(1.8rem, 6vw, 2.5rem);
    color: var(--accent-light);
    margin-top: 0;
}

.dash-card--taxi .dash-card__sub {
    font-family: var(--mono);
    font-size: 0.62rem;
    letter-spacing: 0.08em;
    color: rgba(255,232,165,0.6);
    margin-top: 0.35rem;
}

/* --- Shopping gold title --- */
.dash-card--shopping .dash-card__title {
    font-size: clamp(1.3rem, 4.2vw, 1.8rem);
    font-weight: 640;
}

.dash-card--shopping .dash-card__metric {
    background: linear-gradient(135deg, var(--gold), var(--accent-light));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* --- Scroll cue (dashboard) --- */
.dashboard-scroll-cue {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.6rem;
    margin-top: 2.5rem;
}

.dashboard-scroll-cue .scroll-cue-label {
    font-size: 0.56rem;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--text-muted);
}

#dashboard-sentinel {
    height: 100px;
    pointer-events: none;
}


/* ============================================================
   LAYER 1 — MAP
   ============================================================ */
#map-layer {
    position: fixed;
    inset: 0;
    z-index: 1;
    background: var(--bg);
}

.map-vignette {
    position: absolute;
    inset: 0;
    z-index: 2;
    pointer-events: none;
    background:
        radial-gradient(ellipse at 20% 15%, rgba(247,211,98,0.08), transparent 52%),
        radial-gradient(ellipse at 80% 20%, rgba(145,158,180,0.08), transparent 48%),
        radial-gradient(ellipse at center, transparent 25%, rgba(5,3,8,0.6) 100%);
}

.map-scanlines {
    position: absolute;
    inset: 0;
    z-index: 3;
    pointer-events: none;
    background: repeating-linear-gradient(
        0deg,
        transparent,
        transparent 2px,
        rgba(0,0,0,0.02) 2px,
        rgba(0,0,0,0.02) 4px
    );
}

.map-viewport {
    position: absolute;
    inset: 0;
    z-index: 1;
    overflow: hidden;
    transform: translateZ(0);
    -webkit-transform: translateZ(0);
}

#moscow-map {
    position: absolute;
    width: 100%;
    height: 100%;
}

/* Map elements */
.map-mkad {
    fill: none;
    stroke: rgba(247,211,98,0.12);
    stroke-width: 2;
    stroke-dasharray: 12 8;
}

.map-garden-ring {
    fill: none;
    stroke: rgba(247,211,98,0.15);
    stroke-width: 1.5;
    stroke-dasharray: 6 6;
}

.map-boulevard-ring {
    fill: none;
    stroke: rgba(247,211,98,0.1);
    stroke-width: 1;
    stroke-dasharray: 4 6;
}

.map-river {
    fill: none;
    stroke: url(#riverGrad);
    stroke-width: 8;
    stroke-linecap: round;
    opacity: 0.7;
}

.map-roads path {
    fill: none;
    stroke: rgba(255,239,196,0.12);
    stroke-width: 1.5;
    stroke-linecap: round;
}

/* Route segments */
.route-segment {
    fill: none;
    stroke: url(#routeGrad);
    stroke-width: 3.5;
    stroke-linecap: round;
    stroke-linejoin: round;
    filter: url(#routeGlow);
    opacity: 0;
}

.route-segment.visible {
    opacity: 1;
}

/* Stop markers */
.stop-marker {
    fill: var(--bg);
    stroke: rgba(255,232,165,0.72);
    stroke-width: 2;
    opacity: 0;
    transition: opacity 0.6s, fill 0.4s;
}

.stop-marker.revealed { opacity: 1; }
.stop-marker.active { fill: var(--accent); stroke: #fff4e0; }

.stop-marker-ring {
    fill: none;
    stroke: rgba(247,211,98,0.25);
    stroke-width: 1;
    opacity: 0;
    transition: opacity 0.6s;
}

.stop-marker-ring.revealed { opacity: 1; }
.stop-marker-ring.active {
    stroke: rgba(255,232,165,0.56);
    animation: markerPulse 2s ease-in-out infinite;
}

.stop-icon {
    opacity: 0;
    transition: opacity 0.35s ease;
    filter: drop-shadow(0 3px 7px rgba(0,0,0,0.45));
}

.stop-icon.revealed {
    opacity: 0.82;
}

.stop-icon.active {
    opacity: 1;
}

.stop-icon__halo {
    fill: url(#mapPinHalo);
}

.stop-icon__bg {
    fill: url(#mapPinBody);
    stroke: rgba(255,232,165,0.32);
    stroke-width: 1;
}

.stop-icon__gloss {
    fill: rgba(255,255,255,0.22);
}

.stop-icon__stroke {
    fill: none;
    stroke: rgba(255,238,189,0.9);
    stroke-width: 1.2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.stop-icon__dot {
    fill: rgba(255,238,189,0.92);
}

.stop-icon.active .stop-icon__bg {
    stroke: rgba(255,232,165,0.72);
}

@keyframes markerPulse {
    0%, 100% { opacity: 0.5; }
    50% { opacity: 0; }
}


/* ============================================================
   LAYER 5 — MAP HUD
   ============================================================ */
.map-hud {
    position: fixed;
    inset: 0;
    z-index: 5;
    pointer-events: none;
    padding: 1.5rem;
    font-family: var(--mono);
    opacity: 0;
    transition: opacity 0.6s ease;
}

.map-hud.visible { opacity: 1; }

.hud-top-left { position: absolute; top: 1.5rem; left: 1.5rem; }
.hud-label {
    font-size: 0.6rem;
    letter-spacing: 0.3em;
    text-transform: uppercase;
    color: rgba(255,232,165,0.58);
    margin-bottom: 0.25rem;
}
.hud-date {
    font-size: 0.55rem;
    color: rgba(255,232,165,0.36);
    letter-spacing: 0.1em;
    margin-top: 0.2rem;
}

.hud-top-right { position: absolute; top: 1.5rem; right: 1.5rem; }
.hud-compass {
    width: 28px; height: 28px;
    border: 1px solid rgba(255,232,165,0.2);
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 0.55rem;
    color: rgba(255,232,165,0.5);
}

.hud-bottom-left { position: absolute; bottom: 1.5rem; left: 1.5rem; }
.hud-coords {
    font-size: 0.55rem;
    color: rgba(255,232,165,0.3);
    letter-spacing: 0.05em;
}

.hud-bottom-right { position: absolute; bottom: 1.5rem; right: 1.5rem; }
.hud-transport {
    font-size: 0.6rem;
    color: rgba(255,232,165,0.5);
    letter-spacing: 0.1em;
    text-transform: uppercase;
}


/* ============================================================
   LAYER 10 — EVENT SECTIONS
   ============================================================ */
.event-section {
    position: fixed;
    inset: 0;
    z-index: 10;
    display: flex;
    padding: 4rem 2.5rem;
    opacity: 0;
    pointer-events: none;
    will-change: transform, opacity, filter;
}

.event-section.visible {
    pointer-events: auto;
}

/* ---------- ALIGNMENT VARIANTS ---------- */

/* Center (hero, finale) */
.event-section[data-align="center"] {
    align-items: center;
    justify-content: center;
    text-align: center;
}

/* Left (khodynka, restaurant) */
.event-section[data-align="left"] {
    align-items: flex-start;
    justify-content: center;
    padding-left: 8%;
}

/* Right (aviapark) */
.event-section[data-align="right"] {
    align-items: flex-end;
    justify-content: center;
    padding-right: 8%;
    text-align: right;
}

.event-inner {
    position: relative;
    z-index: 5;
    max-width: 620px;
    width: 100%;
    padding: 1.7rem 1.9rem;
    border-radius: 28px;
    border: 1px solid rgba(255,255,255,0.08);
    background: linear-gradient(150deg, rgba(17,20,25,0.92), rgba(9,11,14,0.88));
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow:
        0 20px 48px rgba(0,0,0,0.35),
        inset 0 1px 0 rgba(255,255,255,0.08);
}

.event-section[data-align="center"] .event-inner {
    max-width: 760px;
}

.event-section[data-align="center"] .hero-inner {
    padding: 0.4rem 0.6rem;
    border: 0;
    border-radius: 0;
    background: transparent;
    backdrop-filter: none;
    box-shadow: none;
}

/* ---------- Event typography ---------- */
.event-header {
    display: flex;
    align-items: baseline;
    gap: 1rem;
    margin-bottom: 1rem;
}

/* Right-aligned sections: flip header */
.event-section[data-align="right"] .event-header {
    justify-content: flex-end;
}

.event-number {
    font-family: var(--sans);
    font-size: clamp(3rem, 10vw, 5.5rem);
    font-weight: 700;
    color: rgba(247,211,98,0.78);
    line-height: 0.85;
    opacity: 0.2;
}

.event-time {
    font-family: var(--mono);
    font-size: 0.63rem;
    letter-spacing: 0.18em;
    color: rgba(255,232,165,0.9);
    text-transform: uppercase;
}

.event-eyebrow {
    font-size: 0.58rem;
    letter-spacing: 0.28em;
    text-transform: uppercase;
    color: rgba(255,232,165,0.86);
    margin-bottom: 0.75rem;
}

.event-title {
    font-family: var(--sans);
    font-size: clamp(1.6rem, 5vw, 3rem);
    font-weight: 620;
    letter-spacing: 0.01em;
    line-height: 1.12;
    margin-bottom: 0.9rem;
    color: var(--text);
}

.event-title em {
    font-family: var(--serif);
    font-style: normal;
    font-weight: 600;
    color: var(--accent-light);
}

.event-desc {
    font-size: 0.86rem;
    color: var(--text-muted);
    line-height: 1.72;
    font-weight: 420;
    max-width: 38ch;
}

.event-link {
    color: var(--accent);
    text-decoration: none;
    font-weight: 400;
    transition: color 0.2s;
}
.event-link:hover { color: var(--accent-light); }

.event-section[data-align="right"] .event-desc {
    margin-left: auto;
}

.event-visual { margin-top: 2rem; }

.event-section[data-align="right"] .event-visual {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}


/* ============================================================
   E0 — HERO (center)
   ============================================================ */
.hero-inner {
    text-align: center;
    max-width: 800px;
}

.hero-eyebrow {
    font-size: 0.58rem;
    letter-spacing: 0.28em;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 2rem;
    opacity: 0;
}

.hero-title {
    font-family: var(--sans);
    font-size: clamp(2.5rem, 8vw, 5.5rem);
    font-weight: 650;
    line-height: 1.04;
    margin-bottom: 1.5rem;
    letter-spacing: 0.01em;
}

.hero-title .char {
    display: inline-block;
    opacity: 0;
    transform: translateY(40px);
}

.hero-title em {
    font-family: var(--serif);
    font-style: normal;
    color: var(--accent-light);
}

.hero-sub {
    font-size: 0.82rem;
    color: var(--text-muted);
    font-weight: 430;
    letter-spacing: 0.02em;
    opacity: 0;
}

.scroll-cue {
    position: absolute;
    bottom: -5rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.6rem;
}

.scroll-cue-dot {
    width: 6px; height: 6px;
    border-radius: 50%;
    background: var(--accent);
    position: relative;
}

.scroll-cue-dot::before {
    content: '';
    position: absolute;
    inset: -7px;
    border-radius: 50%;
    border: 1px solid var(--accent);
    opacity: 0.4;
    animation: cuePulse 2s ease-in-out infinite;
}

@keyframes cuePulse {
    0%, 100% { transform: scale(1); opacity: 0.4; }
    50% { transform: scale(2); opacity: 0; }
}

.scroll-cue-label {
    font-size: 0.55rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--text-muted);
    opacity: 0;
}


/* ============================================================
   E1 — KHODYNKA (left)
   ============================================================ */
.walk-visual {
    max-width: 500px;
    border-radius: 16px;
    overflow: hidden;
}

.walk-visual svg { width: 100%; height: auto; display: block; }

.walk-trail {
    fill: none;
    stroke: var(--accent-light);
    stroke-width: 3;
    stroke-linecap: round;
    stroke-dasharray: 600;
    stroke-dashoffset: 600;
}

.walk-trail-glow {
    stroke-dasharray: 600;
    stroke-dashoffset: 600;
}

.walk-figure { opacity: 0; }

/* Fairy lights twinkling */
.fairy-light {
    opacity: 0.4;
    animation: twinkle 2s ease-in-out infinite;
}

.fairy-light:nth-child(2n) { animation-delay: 0.3s; }
.fairy-light:nth-child(3n) { animation-delay: 0.7s; }
.fairy-light:nth-child(5n) { animation-delay: 1.2s; }

@keyframes twinkle {
    0%, 100% { opacity: 0.3; }
    50% { opacity: 1; }
}

/* Snow falling */
.snow {
    animation: snowfall 3s linear infinite;
}

.snow:nth-child(2n) { animation-duration: 3.5s; animation-delay: 0.5s; }
.snow:nth-child(3n) { animation-duration: 4s; animation-delay: 1s; }
.snow:nth-child(4n) { animation-duration: 3.2s; animation-delay: 0.3s; }

@keyframes snowfall {
    0% { transform: translateY(0); opacity: 0.6; }
    100% { transform: translateY(240px); opacity: 0; }
}

/* Floating hearts */
.heart-float {
    opacity: 0;
    animation: floatHeart 3s ease-in-out infinite;
}

.heart-float:nth-child(2n) { animation-delay: 0.8s; }
.heart-float:nth-child(3n) { animation-delay: 1.6s; }
.heart-float:nth-child(4n) { animation-delay: 2.4s; }

@keyframes floatHeart {
    0%, 100% { opacity: 0; transform: translateY(0) scale(0.8); }
    20% { opacity: 0.6; }
    50% { opacity: 0.8; transform: translateY(-15px) scale(1); }
    80% { opacity: 0.4; }
}

/* Sparkles */
.sparkle {
    opacity: 0;
    animation: sparkleAnim 2s ease-in-out infinite;
}

.sparkle:nth-child(2n) { animation-delay: 0.5s; }
.sparkle:nth-child(3n) { animation-delay: 1s; }
.sparkle:nth-child(4n) { animation-delay: 1.5s; }

@keyframes sparkleAnim {
    0%, 100% { opacity: 0; transform: scale(0); }
    50% { opacity: 1; transform: scale(1.2); }
}


/* ============================================================
   E2 — AVIAPARK (right)
   ============================================================ */
.shop-visual {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.event-section[data-align="right"] .shop-visual {
    align-items: flex-end;
}

.budget-display {
    font-family: var(--serif);
    font-size: clamp(3rem, 10vw, 5rem);
    font-weight: 400;
    background: linear-gradient(135deg, var(--gold), var(--accent-light));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1;
}

.budget-currency { font-size: 0.35em; }

.shop-bags {
    display: flex;
    gap: 0.8rem;
}

.shop-bags svg {
    opacity: 0;
    transform: translateY(20px);
}


/* ============================================================
   E3 — RESTAURANT (left)
   ============================================================ */
.restaurant-visual {
    display: flex;
    align-items: center;
    gap: 2.5rem;
}

.candle-wrap {
    position: relative;
    flex-shrink: 0;
}

.candle-glow {
    position: absolute;
    width: 180px; height: 180px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(247,211,98,0.14) 0%, transparent 70%);
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    pointer-events: none;
}

.candle-flame {
    transform-origin: bottom center;
    animation: flameFlicker 0.3s ease-in-out infinite alternate;
}

@keyframes flameFlicker {
    0% { transform: scaleX(1) scaleY(1); }
    33% { transform: scaleX(0.92) scaleY(1.04); }
    66% { transform: scaleX(1.06) scaleY(0.95); }
    100% { transform: scaleX(0.95) scaleY(1.03); }
}


/* ============================================================
   E4 — FINALE (center)
   ============================================================ */
.finale-inner { text-align: center; max-width: 500px; }

.heart-container {
    width: 120px; height: 110px;
    margin: 0 auto 1.5rem;
}
.heart-container svg { width: 100%; height: 100%; }

.heart-outline {
    fill: none;
    stroke: var(--accent);
    stroke-width: 2;
    stroke-linecap: round;
    stroke-dasharray: 320;
    stroke-dashoffset: 320;
}

.heart-fill { fill: var(--accent); opacity: 0; }

.finale-particles {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.petal { position: absolute; font-size: 1rem; opacity: 0; }

/* Invitation text */
.finale-invitation {
    font-family: var(--serif);
    font-size: clamp(1.1rem, 3.5vw, 1.5rem);
    font-weight: 400;
    line-height: 1.6;
    color: var(--text);
    max-width: 32ch;
    margin: 0 auto 2rem;
    opacity: 0;
    transform: translateY(20px);
}

/* CTA buttons */
.finale-cta {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
}

.cta-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    font-family: var(--sans);
    font-size: 0.88rem;
    font-weight: 500;
    letter-spacing: 0.02em;
    border-radius: 999px;
    padding: 0.85rem 2rem;
    min-width: 220px;
    min-height: 48px;
    transition: transform 0.2s, box-shadow 0.2s;
    opacity: 0;
    transform: translateY(15px);
}

.cta-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.3);
}

.cta-btn--yes {
    background: linear-gradient(135deg, var(--accent-light), var(--gold));
    color: #090a0d;
    font-weight: 600;
}

.cta-btn--no {
    background: transparent;
    border: 1px solid rgba(255,255,255,0.15);
    color: var(--text-muted);
    font-weight: 400;
    font-size: 0.78rem;
}

.cta-btn--no:hover {
    border-color: rgba(255,255,255,0.3);
    color: var(--text);
}


/* ============================================================
   LAYER 20 — TRANSITION FLASH
   ============================================================ */
#transition-flash {
    position: fixed;
    inset: 0;
    z-index: 20;
    pointer-events: none;
    opacity: 0;
    background: radial-gradient(ellipse at center, rgba(247,211,98,0.17), transparent 60%);
}


/* ============================================================
   LAYER 25 — BRIEFING OVERLAY
   ============================================================ */
#briefing-overlay {
    position: fixed;
    z-index: 25;
    pointer-events: none;
    opacity: 0;
    will-change: opacity;
}

/* Position varies per transition — JS sets left/bottom/right/top */
/* Default: bottom-left */
#briefing-overlay {
    left: 2.5rem;
    bottom: 2.5rem;
}

.briefing-card {
    max-width: 480px;
    padding: 1.3rem 1.6rem 1.1rem;
    border-radius: 16px;
    background: linear-gradient(135deg, rgba(14,17,21,0.9), rgba(8,10,13,0.82));
    border: 1px solid rgba(255,238,189,0.15);
    border-left: 3px solid var(--accent);
    backdrop-filter: blur(16px);
    box-shadow:
        0 16px 48px rgba(0,0,0,0.5),
        inset 0 0 0 1px rgba(255,255,255,0.03);
}

.briefing-card--compact {
    max-width: 360px;
    padding: 0.72rem 0.9rem 0.68rem;
    border-radius: 12px;
    border-left-width: 2px;
    box-shadow:
        0 10px 28px rgba(0,0,0,0.35),
        inset 0 0 0 1px rgba(255,255,255,0.02);
}

.briefing-card--compact .briefing-stage,
.briefing-card--compact .briefing-divider,
.briefing-card--compact .briefing-text,
.briefing-card--compact .briefing-progress {
    display: none;
}

.briefing-card--compact .briefing-title {
    font-family: var(--sans);
    font-size: 0.95rem;
    font-weight: 620;
    margin-bottom: 0.24rem;
    line-height: 1.25;
}

.briefing-card--compact .briefing-meta {
    font-size: 0.52rem;
    letter-spacing: 0.11em;
    margin-bottom: 0;
    color: rgba(255,232,165,0.86);
}

.briefing-stage {
    font-family: var(--mono);
    font-size: 0.58rem;
    letter-spacing: 0.35em;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 0.4rem;
}

.briefing-divider {
    width: 36px; height: 1px;
    background: linear-gradient(90deg, var(--accent), transparent);
    margin-bottom: 0.6rem;
}

.briefing-title {
    font-family: var(--serif);
    font-size: clamp(1.3rem, 2.5vw, 1.8rem);
    font-weight: 400;
    color: #fff4e0;
    margin-bottom: 0.5rem;
    line-height: 1.2;
}

.briefing-meta {
    font-family: var(--mono);
    font-size: 0.6rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 0.5rem;
}

.briefing-sep { margin: 0 0.4em; opacity: 0.4; }

.briefing-text {
    font-size: 0.82rem;
    color: rgba(240,236,226,0.65);
    line-height: 1.65;
    font-weight: 300;
    max-width: 42ch;
}

.briefing-progress {
    margin-top: 0.8rem;
    height: 2px;
    background: rgba(255,238,189,0.12);
    border-radius: 1px;
    overflow: hidden;
}

.briefing-progress-fill {
    height: 100%; width: 0%;
    background: linear-gradient(90deg, var(--accent), var(--accent-light));
}


/* ============================================================
   LAYER 30 — PROGRESS BAR
   ============================================================ */
.progress-bar {
    position: fixed;
    top: 0; left: 0; right: 0;
    height: 3px;
    background: rgba(255,238,189,0.16);
    z-index: 30;
}

.progress-bar-fill {
    position: absolute;
    top: 0; left: 0;
    height: 100%; width: 0%;
    background: linear-gradient(90deg, var(--gold), var(--accent), var(--accent-light));
    transition: width 0.4s ease;
}

.progress-dots {
    position: absolute;
    top: -4px;
    left: 0; right: 0;
    height: 11px;
    pointer-events: none;
}

.progress-dot {
    position: absolute;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 7px; height: 7px;
    border-radius: 50%;
    background: var(--bg);
    border: 1.5px solid rgba(255,238,189,0.34);
    transition: all 0.4s ease;
    z-index: 31;
}

.progress-dot.active {
    background: var(--accent);
    border-color: var(--accent);
    box-shadow: 0 0 8px rgba(247,211,98,0.45);
}

.progress-dot.passed {
    background: var(--gold);
    border-color: var(--gold);
}


/* ============================================================
   DESKTOP (>=768)
   ============================================================ */
@media (min-width: 768px) {
    #dashboard { padding: 4.5rem 3.2rem 5.2rem; }

    .dashboard-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
        max-width: 720px;
    }

    .dash-card {
        padding: 1.25rem 1.35rem;
    }

    .dash-card--wide {
        min-height: 230px;
    }

    .dash-card--walk,
    .dash-card--shopping {
        min-height: 292px;
    }

    .dash-card__title {
        font-size: clamp(1.2rem, 2.1vw, 1.6rem);
    }

    .dash-card__metric {
        font-size: clamp(2rem, 3.3vw, 2.7rem);
    }

    .event-section { padding: 4rem 4rem; }
    .event-section[data-align="left"] { padding-left: 10%; }
    .event-section[data-align="right"] { padding-right: 10%; }

    .heart-container { width: 140px; height: 130px; }

    .cta-btn { min-width: 260px; }

    /* Vertical progress bar */
    .progress-bar {
        left: 2rem; top: 0; bottom: 0;
        right: auto; width: 2px; height: 100%;
    }
    .progress-bar-fill {
        width: 100%; height: 0%;
        background: linear-gradient(180deg, var(--gold), var(--accent), var(--accent-light));
        transition: height 0.4s ease;
    }
    .progress-dots {
        top: 0; left: -4px; right: auto;
        width: 11px; height: 100%;
    }
    .progress-dot {
        left: 50%; top: auto;
    }

    #briefing-overlay {
        left: 4rem;
        bottom: 3rem;
    }
}


/* ============================================================
   MOBILE (<=767)
   ============================================================ */
@media (max-width: 767px) {
    #dashboard { padding: 2.1rem 1rem 3rem; }

    .dashboard-grid {
        gap: 0.6rem;
        grid-template-columns: 1fr 1fr;
    }

    .dash-card {
        border-radius: 24px;
        padding: 0.95rem 1rem;
        min-height: 214px;
    }

    .dash-card--wide {
        min-height: 242px;
    }

    .dash-card--walk,
    .dash-card--shopping {
        min-height: 244px;
    }

    .dash-card__title {
        font-size: 1.26rem;
    }

    .dash-card__sub {
        font-size: 0.72rem;
    }

    .event-section { padding: 2.5rem 1.5rem; }
    .event-section[data-align="left"] { padding-left: 1.5rem; }
    .event-section[data-align="right"] { padding-right: 1.5rem; }

    .event-inner {
        padding: 1.35rem 1.2rem;
        border-radius: 22px;
    }

    .event-number { font-size: 3rem; }

    .map-hud { padding: 0.8rem; }
    .hud-label { font-size: 0.48rem; }

    #briefing-overlay { left: 1rem; bottom: 1rem; right: 1rem; }
    .briefing-card { padding: 1rem 1.1rem 0.85rem; }
    .briefing-title { font-size: 1.15rem; }
    .briefing-card--compact {
        max-width: 280px;
        padding: 0.62rem 0.72rem;
    }
    .briefing-card--compact .briefing-title {
        font-size: 0.86rem;
    }

    .restaurant-visual {
        flex-direction: column;
        align-items: flex-start;
        gap: 1.5rem;
        justify-content: center;
    }

    .hero-title { font-size: clamp(2rem, 9vw, 4rem); }

    .cta-btn { min-width: 180px; padding: 0.75rem 1.5rem; }

    /* Performance: hide scanlines on mobile */
    .map-scanlines { display: none; }

    /* Performance: disable expensive effects on mobile */
    .event-inner {
        backdrop-filter: none;
        -webkit-backdrop-filter: none;
        background: linear-gradient(150deg, rgba(17,20,25,0.96), rgba(9,11,14,0.94));
    }

    .briefing-card {
        backdrop-filter: none;
        -webkit-backdrop-filter: none;
        background: linear-gradient(135deg, rgba(14,17,21,0.96), rgba(8,10,13,0.94));
    }

    /* GPU compositing hints for smooth scroll */
    .event-section {
        will-change: transform, opacity;
        transform: translateZ(0);
        -webkit-transform: translateZ(0);
    }

    #moscow-map {
        will-change: auto;
        transform: translateZ(0);
        -webkit-transform: translateZ(0);
    }

    /* Simplify SVG filters on mobile */
    .route-segment {
        filter: none;
    }

    .stop-icon {
        filter: none;
    }
}

/* Extra-small mobile */
@media (max-width: 359px) {
    .dashboard-grid {
        grid-template-columns: 1fr;
    }
    .dash-card--wide {
        grid-column: span 1;
    }
}

/* Safe area insets for iPhone */
@supports (padding-bottom: env(safe-area-inset-bottom)) {
    #dashboard { padding-bottom: calc(3rem + env(safe-area-inset-bottom)); }
    #briefing-overlay { bottom: calc(1rem + env(safe-area-inset-bottom)); }
}


/* ============================================================
   REDUCED MOTION
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    .hero-title .char,
    .event-header, .event-eyebrow, .event-title, .event-desc,
    .event-visual, .hero-eyebrow, .hero-sub,
    .walk-figure, .shop-bags svg,
    .budget-display, .scroll-cue-label, .dash-card__title,
    .dash-card, .finale-invitation, .cta-btn {
        opacity: 1 !important;
        transform: none !important;
    }

    .walk-trail, .walk-trail-glow { stroke-dashoffset: 0 !important; }
    .heart-outline { stroke-dashoffset: 0 !important; }
    .heart-fill { opacity: 1 !important; }
    .candle-flame { animation: none !important; }
    .route-segment { opacity: 1 !important; }
    .stop-marker, .stop-marker-ring { opacity: 1 !important; }
    .petal { display: none !important; }
    .map-scanlines { display: none !important; }
    .fairy-light, .snow, .heart-float, .sparkle { animation: none !important; opacity: 0.6 !important; }
}
