@font-face {
    font-family: 'Roboto Flex';
    src: url('../assets/fonts/RobotoFlex.ttf') format('truetype-variations'),
         url('../assets/fonts/RobotoFlex.ttf') format('truetype');
    font-weight: 100 1000;
    font-stretch: 25% 151%;
    font-style: oblique 0deg 10deg;
    font-display: block;
}

:root {
    --bg: #09152f;
    --accent: #427bff;
    --on-accent: #09152f;
    /* Scale unit — content scales to fit both viewport dims of the 1728x1117 design canvas. */
    --u: min(calc(100vw / 1728), calc(100vh / 1117));
    /* Horizontal gutter when the viewport is wider than the design ratio. */
    --gutter-x: max(0px, calc((100vw - 1728 * var(--u)) / 2));
    /* Inset value such that an element with `margin-x: var(--side-pad)` ends up
       40px from the viewport edge regardless of gutter. Goes negative on wide
       viewports so the element extends past the stage box; relies on the
       parent allowing overflow visible. */
    --side-pad: calc(40px - var(--gutter-x));

    --roboto-flex-axes:
        'GRAD' 0, 'XOPQ' 96, 'XTRA' 468,
        'YOPQ' 79, 'YTAS' 750, 'YTDE' -203,
        'YTFI' 738, 'YTLC' 514, 'YTUC' 712,
        'wdth' 25;
}

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

html, body {
    background: var(--bg);
    color: var(--accent);
    font-family: 'Golos Text', -apple-system, BlinkMacSystemFont, sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: clip;
}

/* Reserve scrollbar gutter on every page so navigating between pages doesn't
   shift content horizontally when one page is taller than the viewport and
   another isn't. */
html { scrollbar-gutter: stable; }

a { color: inherit; text-decoration: none; }
ul { list-style: none; }

/* ─── Block (full-viewport section) ───────────────────────────────────
   Single-cell grid: topbar and stage stack on top of each other, each
   anchoring to its own edge. No absolute positioning at this level. */

.block {
    display: grid;
    grid-template-areas: "stack";
    width: 100vw;
    height: 100vh;
    background: var(--bg);
    overflow: hidden;
    isolation: isolate;
}

.block > * { grid-area: stack; min-width: 0; min-height: 0; }

.block-pin {
    position: relative;
    height: 250vh;
}

.block-pin > .block {
    position: sticky;
    top: 0;
}

.block--orange { --bg: #2a0f08; --accent: #ff6b3d; --on-accent: #2a0f08; }
.block--green  { --bg: #002717; --accent: #00d383; --on-accent: #002717; }

/* ─── Topbar ─────────────────────────────────────────────────────────
   3-column grid (logo | nav | actions). Pinned to top of the block,
   horizontally to viewport edges via 40px padding. */

.topbar {
    align-self: start;
    width: 100%;
    z-index: 50;
    display: grid;
    /* 1fr auto 1fr: nav (auto column) sits dead-center between equal-width
       1fr flanks → nav is screen-centered regardless of logo / actions widths. */
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    column-gap: calc(40 * var(--u));
    padding: calc(32 * var(--u)) 40px 0;
    pointer-events: none;
}

.topbar > * { pointer-events: auto; }

.logo {
    width: calc(132.464 * var(--u));
    height: calc(58.392 * var(--u));
    display: block;
    /* Inline SVG inside .logo uses fill="currentColor" — color follows
       --accent on each page (cobalt, coral, green) without filters or masks. */
    color: var(--accent);
}

.logo svg { width: 100%; height: 100%; display: block; }
.logo img { display: none; }

.nav {
    display: flex;
    align-items: center;
    gap: calc(70 * var(--u));
    font-family: 'Golos Text', sans-serif;
    font-weight: 500;
    font-size: calc(20 * var(--u));
    line-height: 1;
    white-space: nowrap;
}

.nav a { color: var(--accent); }

.topbar-actions {
    justify-self: end;
    display: flex;
    align-items: center;
    gap: calc(12 * var(--u));
}

/* ─── Language switcher ─────────────────────────────────────────────── */

.lang {
    position: relative;
    font-family: 'Golos Text', sans-serif;
    font-weight: 500;
    line-height: 1;
}

.lang__toggle {
    display: inline-flex;
    align-items: center;
    gap: calc(10 * var(--u));
    height: calc(44 * var(--u));
    padding: calc(12 * var(--u)) calc(20 * var(--u));
    background: transparent;
    border: 1px solid var(--accent);
    border-radius: calc(46 * var(--u));
    color: var(--accent);
    font: inherit;
    font-size: calc(20 * var(--u));
    cursor: pointer;
    transition: opacity 0.15s ease;
}

.lang__toggle:hover { opacity: 0.85; }

.lang__current { text-transform: uppercase; }

.lang__chevron {
    width: calc(12 * var(--u));
    height: calc(8 * var(--u));
    transition: transform 0.25s ease;
}

.lang[aria-expanded="true"] .lang__chevron { transform: rotate(180deg); }

.lang__menu {
    position: absolute;
    top: calc(100% + calc(10 * var(--u)));
    right: 0;
    min-width: calc(180 * var(--u));
    margin: 0;
    padding: calc(8 * var(--u));
    list-style: none;
    background: var(--bg);
    border: 1px solid var(--accent);
    border-radius: calc(24 * var(--u));
    opacity: 0;
    transform: translateY(calc(-6 * var(--u)));
    pointer-events: none;
    transition: opacity 0.18s ease, transform 0.18s ease;
    z-index: 220;
}

.lang[aria-expanded="true"] .lang__menu {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.lang__menu button {
    display: block;
    width: 100%;
    padding: calc(12 * var(--u)) calc(18 * var(--u));
    background: transparent;
    border: 0;
    border-radius: calc(46 * var(--u));
    color: var(--accent);
    font: inherit;
    font-size: calc(18 * var(--u));
    text-align: left;
    cursor: pointer;
    transition: background-color 0.15s ease, color 0.15s ease;
}

.lang__menu button:hover {
    background: color-mix(in srgb, var(--accent) 10%, transparent);
}

.lang__menu button[aria-selected="true"] {
    background: var(--accent);
    color: var(--on-accent);
}

/* ─── Buttons ───────────────────────────────────────────────────────── */

.btn {
    height: calc(44 * var(--u));
    padding: calc(12 * var(--u)) calc(20 * var(--u));
    border-radius: calc(46 * var(--u));
    font-family: 'Golos Text', sans-serif;
    font-weight: 500;
    font-size: calc(20 * var(--u));
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    white-space: nowrap;
    cursor: pointer;
    transition: opacity 0.15s ease;
}

.btn:hover { opacity: 0.85; }

.btn--outline {
    border: 1px solid var(--accent);
    color: var(--accent);
    background: transparent;
}

.btn--filled {
    background: var(--accent);
    color: var(--on-accent);
    border: 1px solid var(--accent);
}

/* ─── Stage (design canvas, 1728×1117 in --u units) ──────────────────
   Centered inside .block. Internal layout uses CSS Grid with explicit
   tracks at design landmarks. overflow:visible so edge-pinned items can
   extend into the gutter on wide viewports via negative margins. */

.block__stage {
    width: calc(1728 * var(--u));
    height: calc(1117 * var(--u));
    justify-self: center;
    align-self: center;
    overflow: visible;
    position: relative;
}

/* ─── Hero stage layout ─────────────────────────────────────────────── */

.hero-stage {
    display: grid;
    /* Columns: stage-l..date-r (x=325) ..stage-r (x=1728)
       Date right edge anchors to date-r; full-width items span stage-l..stage-r */
    grid-template-columns:
        [stage-l] calc(325 * var(--u))
        [date-r]  1fr
        [stage-r];
    /* Rows correspond to design Y-landmarks. Items overflow visually into
       the next track when content exceeds the track size — that's intended. */
    grid-template-rows:
        [stage-t]      calc(479 * var(--u))   /* top region (topbar overlays this) */
        [badge-t]      calc(111 * var(--u))   /* hero-badge */
        [badge-b]      calc(43  * var(--u))   /* gap */
        [title-t]      calc(196 * var(--u))   /* title region */
        [distances-t]  calc(203 * var(--u))   /* distances region */
        [date-t]       calc(85  * var(--u))   /* date region */
        [stage-b];
}

.hero-badge {
    grid-column: stage-l / stage-r;
    grid-row: badge-t / badge-b;
    justify-self: center;
    align-self: stretch;
    width: calc(250 * var(--u));
    border: 1px solid var(--accent);
    border-radius: calc(76 * var(--u));
    overflow: hidden;
    pointer-events: none;
}

.hero-badge video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.hero .title {
    grid-column: stage-l / stage-r;
    grid-row: title-t / stage-b;
    justify-self: center;
    align-self: start;
    width: calc(1256.644 * var(--u));
    font-size: calc(276.957 * var(--u));
    text-align: center;
}

.hero .hero-actions {
    grid-column: stage-l / stage-r;
    grid-row: distances-t / stage-b;
    justify-self: end;
    align-self: start;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: calc(28 * var(--u));
    margin-right: var(--side-pad);
    margin-top: calc(-40 * var(--u));
}

.hero .hero-actions .distances {
    align-items: flex-end;
    text-align: right;
}

.hero .hero-cta {
    animation: btn-pulse 2s ease-out infinite;
}

.hero .date {
    grid-column: stage-l / date-r;
    grid-row: date-t / stage-b;
    justify-self: end;
    align-self: start;
    text-align: right;
    margin-top: calc(-45 * var(--u));
}

.hero-slider { display: none; }

/* ─── Block-stage layout (orange & green) ────────────────────────────
   Columns: stage-l..stage-r — items use justify-self with margin to pin
   to either viewport edge or stage edge.
   Rows: explicit tracks at every design Y-landmark; items use align-self
   start with translateY(-50%) where the design specifies a Y-center. */

.block-stage {
    display: grid;
    grid-template-columns: [stage-l] 1fr [stage-r];
}

.block--orange .block-stage {
    grid-template-rows:
        [topbar-t]   calc(52 * var(--u))             /* 0-52 (top space) */
        [topbar-row] calc((730.5 - 52) * var(--u))   /* 52..730.5 */
        [date-c]     calc((921 - 730.5) * var(--u))  /* 730.5..921 */
        [title-c]    calc((956 - 921) * var(--u))    /* 921..956 */
        [desc-c]     calc((1117 - 956) * var(--u))   /* 956..1117 */
        [stage-b];
    background-image: url('../assets/bg-issykkul.svg');
    background-position: calc(335.26 * var(--u)) calc(286.665 * var(--u));
    background-size: calc(1229 * var(--u)) calc(429 * var(--u));
    background-repeat: no-repeat;
}

.block--green .block-stage {
    grid-template-rows:
        [topbar-t]   calc(52 * var(--u))
        [topbar-row] calc((587.5 - 52) * var(--u))   /* 52..587.5 */
        [date-c]     calc((956 - 587.5) * var(--u))  /* 587.5..956 */
        [desc-c]     calc((1064 - 956) * var(--u))   /* 956..1064 */
        [title-b]    calc((1117 - 1064) * var(--u))  /* 1064..1117 (title bottom anchor) */
        [stage-b];
    background-image:
        linear-gradient(to bottom, transparent 55%, var(--bg) 100%),
        url('../assets/bg-bishkek.svg');
    background-position:
        calc(441 * var(--u)) calc(100 * var(--u)),
        calc(441 * var(--u)) calc(100 * var(--u));
    background-size:
        calc(847 * var(--u)) calc(747.16 * var(--u)),
        calc(847 * var(--u)) calc(747.16 * var(--u));
    background-repeat: no-repeat;
}

/* Distances (left, top edge) */
.block--orange .distances,
.block--green .distances {
    grid-column: stage-l / stage-r;
    grid-row: topbar-row / stage-b;
    justify-self: start;
    align-self: start;
    align-items: flex-start;
    text-align: left;
    margin-left: var(--side-pad);
}

/* Подробнее button (right, top edge) */
.block--orange .btn--filled,
.block--green .btn--filled {
    grid-column: stage-l / stage-r;
    grid-row: topbar-row / stage-b;
    justify-self: end;
    align-self: start;
    margin-right: var(--side-pad);
    animation: btn-pulse 2s ease-out infinite;
}

/* Date (left, vertically centered on its design Y) */
.block--orange .date,
.block--green .date {
    grid-column: stage-l / stage-r;
    grid-row: date-c / stage-b;
    justify-self: start;
    align-self: start;
    margin-left: var(--side-pad);
    transform: translateY(-50%);
    text-align: left;
}

/* Green block: pin the date directly above the title (stacked left column). */
.block--green .date {
    grid-row: topbar-t / title-b;
    align-self: end;
    transform: none;
    /* Title height ≈ font-size 178.519u × line-height 0.8 × 2 lines + ~16u gap */
    margin-bottom: calc(302 * var(--u));
}

/* Title — orange centered on Y=921, green anchored to bottom 53u from stage end */
.block--orange .title,
.block--green .title {
    grid-column: stage-l / stage-r;
    justify-self: start;
    width: calc(810 * var(--u));
    margin-left: var(--side-pad);
    font-size: calc(178.519 * var(--u));
    text-align: left;
}

.block--orange .title {
    grid-row: title-c / stage-b;
    align-self: start;
    transform: translateY(-50%);
}

.block--green .title {
    /* Anchor title bottom at the title-b grid line (y=1064 = 53u from stage bottom).
       Span from the top so align-self: end can pull the bottom edge to title-b. */
    grid-row: topbar-t / title-b;
    align-self: end;
}

/* Description (right, bottom edge aligned with title bottom) */
.description {
    grid-column: stage-l / stage-r;
    grid-row: topbar-t / stage-b;
    justify-self: end;
    align-self: end;
    width: calc(617 * var(--u));
    margin-right: var(--side-pad);
    margin-top: 0;
    font-family: 'Roboto Flex', sans-serif;
    font-weight: 600;
    font-stretch: 25%;
    font-size: calc(38.485 * var(--u));
    line-height: 1.05;
    text-align: right;
    text-transform: uppercase;
    color: var(--accent);
    font-variation-settings: var(--roboto-flex-axes);
}

.block--orange .description {
    margin-bottom: calc(53 * var(--u));
}

.block--green .description {
    margin-bottom: calc(53 * var(--u));
}

/* ─── Typography (Roboto Flex display titles, dates, distances) ────── */

.title {
    font-family: 'Roboto Flex', sans-serif;
    font-weight: 600;
    font-stretch: 25%;
    line-height: 0.8;
    text-transform: uppercase;
    color: var(--accent);
    font-variation-settings: var(--roboto-flex-axes), 'slnt' 0;
}

.title__italic {
    font-variation-settings: var(--roboto-flex-axes), 'slnt' -10;
}

/* Slanted glyphs extend past their nominal bounding box on the right.
   When the italic span is the final piece of a title, the overhang lands
   outside the title and gets clipped by ancestors with overflow:hidden.
   Scoping to :last-child keeps titles like "ШОС марафон 2026" unshifted. */
.title__italic:last-child {
    padding-right: 0.08em;
}

.date {
    font-family: 'Roboto Flex', sans-serif;
    font-weight: 600;
    font-stretch: 25%;
    font-size: calc(38.485 * var(--u));
    line-height: 0.8;
    text-transform: uppercase;
    color: var(--accent);
    white-space: nowrap;
    font-variation-settings: var(--roboto-flex-axes);
}

.date__line { display: block; line-height: 1; }
.date[data-countdown-active] { opacity: 0; }

.is-animating .date[data-countdown-active] {
    animation: countdown-in 0.85s cubic-bezier(0.2, 0.7, 0.15, 1) 0.25s both;
}

@keyframes countdown-in {
    0% { opacity: 0; }
    100% { opacity: 1; }
}

.distances {
    display: flex;
    flex-direction: column;
    gap: calc(12 * var(--u));
    font-family: 'Roboto Flex', sans-serif;
    font-weight: 600;
    font-stretch: 25%;
    font-size: calc(38.485 * var(--u));
    line-height: 0.8;
    text-transform: uppercase;
    color: var(--accent);
    font-variation-settings: var(--roboto-flex-axes);
}

.distances li { white-space: nowrap; }
.distances li:first-child { line-height: 0.9; } /* "ДЕТСКИЙ ЗАБЕГ" wraps to 2 lines */

/* ─── Letter-by-letter intro animation ───────────────────────────── */

.word { display: inline-block; white-space: nowrap; }

.letter {
    display: inline-block;
    opacity: 0;
    transform: translateX(0.4em);
    will-change: transform, opacity, font-variation-settings;
}

.is-animating .letter {
    animation: letter-in 0.85s cubic-bezier(0.2, 0.7, 0.15, 1) both;
}

.is-animating .letter--italic { animation-name: letter-in-italic; }

/* Scroll-scrubbed animation: paused; JS sets per-letter animation-delay
   based on scroll progress to drive the keyframe position. */
.scroll-anim .letter {
    animation: letter-in 1s linear paused both;
}

.scroll-anim .letter--italic { animation-name: letter-in-italic; }

@keyframes letter-in {
    0% {
        opacity: 0;
        transform: translateX(0.4em);
        font-variation-settings: var(--roboto-flex-axes), 'slnt' -10;
    }
    100% {
        opacity: 1;
        transform: translateX(0);
        font-variation-settings: var(--roboto-flex-axes), 'slnt' 0;
    }
}

@keyframes letter-in-italic {
    0% {
        opacity: 0;
        transform: translateX(0.4em);
        font-variation-settings: var(--roboto-flex-axes), 'slnt' -10;
    }
    100% {
        opacity: 1;
        transform: translateX(0);
        font-variation-settings: var(--roboto-flex-axes), 'slnt' -10;
    }
}

@keyframes btn-pulse {
    0% {
        box-shadow: 0 0 0 0 color-mix(in srgb, var(--accent) 55%, transparent);
    }
    70% {
        box-shadow: 0 0 0 calc(14 * var(--u)) color-mix(in srgb, var(--accent) 0%, transparent);
    }
    100% {
        box-shadow: 0 0 0 0 color-mix(in srgb, var(--accent) 0%, transparent);
    }
}

/* ─── Cursor video (floating overlay — fixed to viewport) ──────────── */

.cursor-video {
    position: fixed;
    top: 0;
    left: 0;
    width: 340px;
    height: 340px;
    border-radius: 52px;
    border: 3px solid var(--accent);
    overflow: hidden;
    pointer-events: none;
    z-index: 100;
    transform: translate3d(-50%, -50%, 0) scale(0);
    will-change: transform;
    opacity: 0;
    transition: opacity 0.4s ease;
    background: var(--bg);
}

.cursor-video.is-visible { opacity: 1; }

.cursor-video__clip {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    opacity: 0;
    transition: opacity 0.25s ease;
}

.cursor-video__clip.is-active { opacity: 1; }

@media (hover: none) {
    .cursor-video { display: none; }
}

/* ─── Sponsors band ────────────────────────────────────────────────── */

.block--sponsors {
    display: block;          /* override the .block grid */
    height: auto;
    min-height: calc(360 * var(--u));
    padding: calc(80 * var(--u)) 0;
}

.sponsors {
    width: 100%;
    padding: 0 40px;
    display: flex;
    align-items: center;
    gap: calc(80 * var(--u));
}

.sponsors__group {
    display: flex;
    align-items: center;
    gap: calc(40 * var(--u));
}

.sponsors__group--multi { flex: 1; min-width: 0; }

.sponsors__label {
    font-family: 'Roboto Flex', sans-serif;
    font-weight: 600;
    font-stretch: 25%;
    font-size: calc(28 * var(--u));
    line-height: 0.9;
    text-transform: uppercase;
    color: var(--accent);
    white-space: nowrap;
    font-variation-settings: var(--roboto-flex-axes);
}

.sponsors__divider {
    flex: 0 0 auto;
    width: 1px;
    height: calc(140 * var(--u));
    background: var(--accent);
    opacity: 0.35;
}

.sponsors__logos {
    flex: 1;
    display: flex;
    gap: calc(20 * var(--u));
    flex-wrap: wrap;
}

.sponsor-slot {
    display: block;
    width: calc(220 * var(--u));
    height: calc(110 * var(--u));
    border: 1px solid var(--accent);
    border-radius: calc(24 * var(--u));
    background: transparent;
    transition: background-color 0.2s ease, transform 0.2s ease;
}

.sponsor-slot:hover {
    background-color: color-mix(in srgb, var(--accent) 8%, transparent);
    transform: translateY(calc(-2 * var(--u)));
}

.sponsor-slot--lead {
    width: calc(320 * var(--u));
    height: calc(160 * var(--u));
    border-radius: calc(36 * var(--u));
}

/* ─── Footer ───────────────────────────────────────────────────────── */

.footer {
    background: var(--bg);
    color: var(--accent);
    padding: calc(96 * var(--u)) 0 calc(40 * var(--u));
    border-top: 1px solid color-mix(in srgb, var(--accent) 22%, transparent);
}

.footer__stage {
    width: 100%;
    padding: 0 40px;
}

.footer__top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: calc(80 * var(--u));
}

.footer__logo {
    display: block;
    width: calc(132.464 * var(--u));
    height: calc(58.392 * var(--u));
}

.footer__logo { color: var(--accent); }
.footer__logo svg { width: 100%; height: 100%; display: block; }
.footer__logo img { width: 100%; height: 100%; display: block; }

.footer__cols {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: calc(60 * var(--u));
    padding-bottom: calc(60 * var(--u));
}

.footer__col {
    display: flex;
    flex-direction: column;
    gap: calc(14 * var(--u));
}

.footer__heading {
    font-family: 'Roboto Flex', sans-serif;
    font-weight: 600;
    font-stretch: 25%;
    font-size: calc(28 * var(--u));
    line-height: 0.9;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: calc(10 * var(--u));
    font-variation-settings: var(--roboto-flex-axes);
}

.footer__col a,
.footer__col span {
    font-family: 'Golos Text', sans-serif;
    font-weight: 500;
    font-size: calc(20 * var(--u));
    line-height: 1.2;
    color: var(--accent);
    transition: opacity 0.15s ease;
}

.footer__col a:hover { opacity: 0.7; }

.footer__muted { opacity: 0.55; }

.footer__bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: calc(32 * var(--u));
    border-top: 1px solid color-mix(in srgb, var(--accent) 18%, transparent);
    font-family: 'Golos Text', sans-serif;
    font-weight: 500;
    font-size: calc(16 * var(--u));
    color: var(--accent);
}

/* ─── Burger (hidden on desktop) ───────────────────────────────────── */

.burger {
    display: none;
    width: 44px;
    height: 44px;
    padding: 0;
    background: transparent;
    border: 1px solid var(--accent);
    border-radius: 999px;
    cursor: pointer;
    z-index: 210;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 5px;
}

.burger span {
    display: block;
    width: 18px;
    height: 1.5px;
    background: var(--accent);
    border-radius: 2px;
    transition: transform 0.25s ease, opacity 0.2s ease;
}

body.menu-open .burger span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
body.menu-open .burger span:nth-child(2) { opacity: 0; }
body.menu-open .burger span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

.nav__btn { display: none; }

/* ─── Mobile (≤768px) — flow layout ────────────────────────────────── */

@media (max-width: 768px) {
    :root { --side-pad: 20px; }

    /* Reliable iOS scroll lock: JS pins body via position:fixed + top:-scrollY
       so the underlying page can't scroll while the menu drawer is open. */
    html.menu-open { overflow: hidden; }
    body.menu-open {
        position: fixed;
        left: 0;
        right: 0;
        width: 100%;
        overflow: hidden;
        overscroll-behavior: contain;
    }

    /* Block reverts to normal block layout, content stacks vertically.
       overflow:visible + isolation:auto so the fixed topbar's z-index escapes
       the hero block and stacks above sibling blocks (sponsors, etc), and so
       slanted italic title glyphs aren't clipped at the block edge. */
    .block {
        display: block;
        height: auto;
        min-height: 100svh;
        overflow: visible;
        isolation: auto;
    }

    /* Topbar becomes a fixed strip at the top, just logo + burger */
    .topbar {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        width: 100%;
        padding: 16px 16px 12px 20px;
        grid-template-columns: auto 1fr auto auto;
        align-items: center;
        gap: 8px;
        background: transparent;
        z-index: 200;
    }

    .topbar > .logo {
        grid-column: 1;
        height: 44px;
        width: auto;
        aspect-ratio: 132.464 / 58.392;
        margin: 0;
    }

    .topbar-actions {
        grid-column: 3;
        margin: 0;
    }

    .burger {
        display: flex;
        grid-column: 4;
    }

    /* Hide desktop nav by default; show as full-screen drawer when open */
    .nav {
        position: fixed;
        inset: 0;
        background: var(--bg);
        flex-direction: column;
        justify-content: center;
        align-items: stretch;
        gap: 18px;
        padding: 88px 20px 32px;
        margin: 0;
        z-index: 199;
        transform: translateX(100%);
        transition: transform 0.32s cubic-bezier(0.2, 0.7, 0.15, 1);
        pointer-events: none;
    }

    body.menu-open .nav {
        transform: translateX(0);
        pointer-events: auto;
    }

    .nav > a:not(.nav__btn) {
        font-family: 'Roboto Flex', sans-serif;
        font-weight: 600;
        font-stretch: 25%;
        font-size: clamp(40px, 12vw, 64px);
        line-height: 0.9;
        text-transform: uppercase;
        text-align: center;
        color: var(--accent);
        font-variation-settings: var(--roboto-flex-axes);
    }

    /* Show login/register inside the drawer; hide their desktop counterparts */
    .topbar-actions .btn--outline,
    .topbar-actions .btn--filled { display: none; }

    .nav__btn {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 100%;
        height: 60px;
        padding: 0 24px;
        border-radius: 999px;
        font-family: 'Roboto Flex', sans-serif;
        font-weight: 600;
        font-stretch: 25%;
        font-size: 22px;
        line-height: 1;
        text-transform: uppercase;
        font-variation-settings: var(--roboto-flex-axes);
    }

    .nav a.nav__btn--outline {
        border: 1px solid var(--accent);
        color: var(--accent);
        background: transparent;
        margin-top: 18px;
    }

    .nav a.nav__btn--filled {
        background: var(--accent);
        color: #09152F;
        border: 1px solid var(--accent);
    }

    /* Lang switcher in mobile topbar */
    .lang__toggle {
        height: 44px;
        padding: 0 18px;
        gap: 10px;
        font-size: 15px;
        background: transparent;
        border-radius: 999px;
    }

    .lang__chevron { width: 11px; height: 7px; }

    .lang__menu {
        top: calc(100% + 8px);
        right: 0;
        min-width: 180px;
        padding: 8px;
        border-radius: 22px;
    }

    .lang__menu button {
        padding: 12px 18px;
        font-size: 15px;
        border-radius: 999px;
        text-align: left;
    }

    /* Stage becomes a normal flex column */
    .block__stage {
        width: 100%;
        height: auto;
        min-height: 100svh;
        display: flex;
        flex-direction: column;
        gap: 28px;
        padding: 84px 20px 32px;
        background: none;
    }

    .hero-stage { justify-content: center; gap: 12px; }

    .block-pin { height: auto; }
    .block-pin > .block { position: static; }

    .btn {
        position: static;
        height: 48px;
        padding: 0 22px;
        border-radius: 999px;
        font-size: 16px;
        width: 100%;
    }

    /* Hero video stack slider — visible only on mobile */
    .hero .title {
        order: 2;
        text-align: center;
        font-size: clamp(56px, 16vw, 112px);
        line-height: 0.85;
        width: 100%;
        margin: 0;
        padding: 0.05em 0.25em 0.05em 0.25em;
        overflow: visible;
    }

    .title .word,
    .title .letter { overflow: visible; }

    /* On mobile, drop the slide-in transform on letters */
    .letter { transform: none; }

    @keyframes letter-in {
        0% { opacity: 0; transform: none;
             font-variation-settings: var(--roboto-flex-axes), 'slnt' -10; }
        100% { opacity: 1; transform: none;
               font-variation-settings: var(--roboto-flex-axes), 'slnt' 0; }
    }

    @keyframes letter-in-italic {
        0% { opacity: 0; transform: none;
             font-variation-settings: var(--roboto-flex-axes), 'slnt' -10; }
        100% { opacity: 1; transform: none;
               font-variation-settings: var(--roboto-flex-axes), 'slnt' -10; }
    }

    .hero .date {
        order: 3;
        align-self: center;
        font-size: 22px;
        text-align: center;
        margin: 0;
    }

    .hero .distances { display: none; }

    .hero .hero-actions {
        order: 5;
        align-self: stretch;
        width: 100%;
        gap: 0;
    }

    .hero .hero-cta { width: 100%; }

    .hero-badge {
        order: 1;
        align-self: center;
        width: 132px;
        height: 60px;
        border-radius: 999px;
        margin: 0;
    }

    .hero-slider {
        display: block;
        position: relative;
        width: 300px;
        height: 300px;
        margin: 32px auto 0;
        align-self: center;
        order: 4;
        touch-action: pan-y;
        user-select: none;
        -webkit-user-select: none;
    }

    .hero-slider__card {
        position: absolute;
        inset: 0;
        border: 4px solid var(--accent);
        border-radius: 24px;
        overflow: hidden;
        background: var(--bg);
        box-shadow: 0 12px 30px rgba(0, 0, 0, 0.35);
        transform-origin: 50% 50%;
        transition: transform 0.5s cubic-bezier(0.2, 0.7, 0.15, 1);
        will-change: transform;
        cursor: grab;
    }

    .hero-slider__card:active { cursor: grabbing; }

    .hero-slider__card video {
        width: 100%;
        height: 100%;
        object-fit: cover;
        display: block;
        pointer-events: none;
    }

    .hero-slider__card[data-pos="0"] { transform: translate3d(0, 0, 0) rotate(-4deg) scale(1); z-index: 4; }
    .hero-slider__card[data-pos="1"] { transform: translate3d(6px, 8px, 0) rotate(3deg) scale(0.96); z-index: 3; }
    .hero-slider__card[data-pos="2"] { transform: translate3d(12px, 14px, 0) rotate(-2deg) scale(0.92); z-index: 2; }
    .hero-slider__card[data-pos="3"] { transform: translate3d(18px, 20px, 0) rotate(4deg) scale(0.88); z-index: 1; }

    .hero-slider__card.is-dragging { transition: none; }

    /* Orange & green blocks on mobile — left-aligned vertical stack */
    .block--orange .block-stage,
    .block--green .block-stage {
        background-image: var(--mobile-bg-image, none);
        background-position: center center;
        background-size: 140% auto;
        background-repeat: no-repeat;
        position: relative;
    }

    .block--orange .block-stage { --mobile-bg-image: url('../assets/bg-issykkul.svg'); }
    .block--green .block-stage  { --mobile-bg-image: url('../assets/bg-bishkek.svg'); }

    .block--orange .block-stage::before,
    .block--green .block-stage::before {
        content: '';
        position: absolute;
        inset: 0;
        background: var(--bg);
        opacity: 0.78;
        z-index: 0;
        pointer-events: none;
    }

    .block--orange .block-stage > *,
    .block--green .block-stage > * {
        position: relative;
        z-index: 1;
        margin: 0;
        width: 100%;
        transform: none;
    }

    .block--orange .block-stage,
    .block--green .block-stage {
        padding-top: 84px;
        padding-bottom: 40px;
        gap: 10px;
    }

    .block--orange .date,
    .block--green .date {
        order: 1;
        font-size: 22px;
        text-align: left;
    }

    .block--orange .title,
    .block--green .title {
        order: 2;
        font-size: clamp(48px, 13vw, 88px);
        text-align: left;
    }

    .block--orange .description,
    .block--green .description {
        order: 3;
        font-family: 'Golos Text', sans-serif;
        font-weight: 500;
        font-size: 15px;
        line-height: 1.2;
        text-align: left;
        text-transform: none;
    }

    /* Distances styled as a divided list on mobile */
    .block--orange .distances,
    .block--green .distances {
        order: 4;
        align-items: stretch;
        gap: 0;
        font-family: 'Golos Text', sans-serif;
        font-weight: 500;
        font-stretch: normal;
        font-size: 16px;
        line-height: 1.4;
        text-transform: none;
        font-variation-settings: normal;
        border-top: 1px solid color-mix(in srgb, var(--accent) 28%, transparent);
        margin-top: 18px;
    }

    .block--orange .distances li,
    .block--green .distances li {
        padding: 14px 0;
        border-bottom: 1px solid color-mix(in srgb, var(--accent) 28%, transparent);
        line-height: 1.3;
        white-space: normal;
    }

    .block--orange .distances li:first-child,
    .block--green .distances li:first-child { line-height: 1.3; }

    .block--orange .distances br,
    .block--green .distances br { display: none; }

    .block--orange .btn--filled,
    .block--green .btn--filled {
        order: 5;
        align-self: stretch;
        margin-top: auto;
    }

    /* Make scroll-anim letters visible on mobile (no JS scrub there) */
    .scroll-anim .letter {
        opacity: 1;
        transform: none;
        animation: none;
    }

    /* Sponsors */
    .block--sponsors {
        min-height: 0;
        padding: 56px 0;
    }

    .sponsors {
        flex-direction: column;
        align-items: stretch;
        gap: 32px;
        padding: 0 20px;
        width: 100%;
    }

    .sponsors__group {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }

    .sponsors__divider { width: 100%; height: 1px; }

    .sponsors__label { font-size: 18px; line-height: 1.2; }

    .sponsors__logos { gap: 12px; width: 100%; }

    .sponsor-slot {
        width: calc(50% - 6px);
        height: 88px;
        border-radius: 18px;
    }

    .sponsor-slot--lead {
        width: 100%;
        height: 140px;
        border-radius: 24px;
    }

    /* Footer */
    .footer { padding: 48px 0 32px; }
    .footer__stage { padding: 0 20px; }
    .footer__top {
        flex-direction: column;
        align-items: stretch;
        gap: 24px;
        margin-bottom: 40px;
    }
    .footer__logo {
        width: 96px;
        height: auto;
        aspect-ratio: 132.464 / 58.392;
    }
    .footer__cols {
        grid-template-columns: 1fr;
        gap: 32px;
        padding-bottom: 32px;
    }
    .footer__col { gap: 12px; }
    .footer__heading { font-size: 22px; margin-bottom: 4px; }
    .footer__col a,
    .footer__col span { font-size: 16px; }
    .footer__bottom {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
        padding-top: 24px;
        font-size: 13px;
    }

    .cursor-video { display: none; }

    @keyframes btn-pulse {
        0%   { box-shadow: 0 0 0 0   color-mix(in srgb, var(--accent) 50%, transparent); }
        70%  { box-shadow: 0 0 0 10px color-mix(in srgb, var(--accent) 0%,  transparent); }
        100% { box-shadow: 0 0 0 0   color-mix(in srgb, var(--accent) 0%,  transparent); }
    }
}
