/* ============================================================
   MidiBG · Кино — a documentary film in scroll form
   Palette: abyss blue-greens, foam white, shell-gold.
   ============================================================ */

:root {
    --abyss: #050b10;
    --deep: #0a1620;
    --sea: #10222c;
    --foam: #eaf2f0;
    --mist: #8fa6a6;
    --gold: #d9a05b;
    --glass: #74c7b2;
    --font-display: 'Unbounded', sans-serif;
    --font-body: 'Manrope', sans-serif;
    --font-mono: 'IBM Plex Mono', monospace;
    --pad: clamp(1.25rem, 4vw, 4rem);
}

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

html { scrollbar-color: var(--sea) var(--abyss); }
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }

body {
    background: var(--abyss);
    color: var(--foam);
    font-family: var(--font-body);
    font-weight: 300;
    font-size: clamp(1rem, 1.05vw + .6rem, 1.2rem);
    line-height: 1.65;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

::selection { background: var(--gold); color: var(--abyss); }

a { color: inherit; }

.mono {
    font-family: var(--font-mono);
    font-size: .72rem;
    font-weight: 500;
    letter-spacing: .22em;
    text-transform: uppercase;
}

/* ---------- film grain ---------- */
.grain {
    position: fixed; inset: -100px; z-index: 90; pointer-events: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.5'/%3E%3C/svg%3E");
    opacity: .07;
    animation: grain 1.2s steps(6) infinite;
}
@keyframes grain {
    0%   { transform: translate(0, 0); }
    25%  { transform: translate(-40px, 30px); }
    50%  { transform: translate(30px, -50px); }
    75%  { transform: translate(-30px, -20px); }
    100% { transform: translate(40px, 40px); }
}

/* ---------- opening curtain ---------- */
.curtain {
    position: fixed; left: 0; right: 0; height: 51vh; z-index: 80;
    background: #01050a; pointer-events: none;
    animation: curtain-open 1.05s cubic-bezier(.77, 0, .18, 1) .25s forwards;
}
.curtain--top { top: 0; transform-origin: top; }
.curtain--bottom { bottom: 0; transform-origin: bottom; }
@keyframes curtain-open { to { transform: scaleY(0); } }

.curtain-title {
    position: fixed; top: 50%; left: 50%; transform: translate(-50%, -50%);
    z-index: 81; pointer-events: none;
    font-family: var(--font-mono); font-size: .72rem;
    letter-spacing: .5em; text-transform: uppercase; color: var(--mist);
    animation: curtain-title-out .45s ease .2s forwards;
}
@keyframes curtain-title-out { to { opacity: 0; } }

/* ---------- HUD ---------- */
.hud {
    position: fixed; top: 0; left: 0; right: 0; z-index: 70;
    display: flex; align-items: baseline; justify-content: space-between;
    padding: 1.2rem var(--pad);
    mix-blend-mode: difference;
}
.hud__brand {
    font-family: var(--font-display); font-weight: 800;
    font-size: 1.05rem; text-decoration: none; letter-spacing: .02em;
}
.hud__brand span { color: var(--glass); }
.hud__film, .hud__scene {
    font-family: var(--font-mono); font-size: .62rem;
    letter-spacing: .3em; text-transform: uppercase; color: var(--mist);
}
button.hud__scene {
    background: none; border: 0; padding: .4rem 0; cursor: pointer;
    transition: color .3s ease;
}
button.hud__scene:hover, button.hud__scene:focus-visible { color: var(--gold); }
.hud__count.is-hidden { display: none; }
.hud__glyph { margin-left: .6rem; opacity: .8; }

/* ---------- scene index overlay ---------- */
.scene-index {
    position: fixed; inset: 0; z-index: 85;
    display: flex; flex-direction: column;
    align-items: center; justify-content: center;
    gap: .3rem;
    background: rgba(3, 7, 11, .96);
    backdrop-filter: blur(10px);
    opacity: 0; visibility: hidden;
    transition: opacity .35s ease, visibility 0s linear .35s;
}
.scene-index.is-open {
    opacity: 1; visibility: visible;
    transition: opacity .35s ease;
}
.scene-index__title { color: var(--gold); margin-bottom: 1.6rem; }
.scene-index__item {
    display: flex; align-items: baseline; gap: 1.1rem;
    background: none; border: 0; cursor: pointer;
    font-family: var(--font-display); font-weight: 500;
    font-size: clamp(1.05rem, 4vw, 1.5rem);
    text-transform: uppercase; letter-spacing: .02em;
    color: var(--foam); opacity: .7;
    padding: .45rem 1rem;
    transition: opacity .25s ease, color .25s ease, letter-spacing .25s ease;
}
.scene-index__item:hover, .scene-index__item:focus-visible {
    opacity: 1; letter-spacing: .05em;
}
.scene-index__item.is-here { color: var(--gold); opacity: 1; }
.scene-index__num { font-size: .62rem; color: var(--glass); letter-spacing: .2em; min-width: 1.5rem; }
.scene-index__item.is-here .scene-index__num { color: var(--gold); }
.scene-index__close {
    position: absolute; top: 1.4rem; right: var(--pad);
    background: none; border: 0; cursor: pointer;
    color: var(--mist); padding: .5rem;
}
.scene-index__close:hover { color: var(--gold); }
.hud__film { display: none; }
@media (min-width: 720px) { .hud__film { display: block; } }

/* ---------- depth gauge ---------- */
.gauge {
    position: fixed; right: calc(var(--pad) / 2); top: 50%;
    transform: translateY(-50%); z-index: 70;
    display: none; flex-direction: column; align-items: center; gap: .8rem;
}
@media (min-width: 960px) { .gauge { display: flex; } }
/* During a scene cut the curtain (z-80) would cover the rail. Lift the gauge
   above it once the film is live — .curtain--live is added only after the
   opening finishes, so the opening curtain still reveals over the rail.
   Applies to both the desktop rail and the mobile pill. */
.curtain--live ~ .gauge { z-index: 82; }
.gauge__cap {
    font-family: var(--font-mono); font-size: .58rem;
    letter-spacing: .3em; text-transform: uppercase; color: var(--mist);
    writing-mode: vertical-rl;
}
.gauge__track {
    position: relative; width: 3px; height: 38vh;
    background: linear-gradient(var(--mist), var(--mist)) center / 3px 100% no-repeat;
    opacity: .9;
}
.gauge__dot {
    position: absolute; left: 50%; top: 0;
    width: 9px; height: 9px; border-radius: 50%;
    background: var(--gold);
    transform: translate(-50%, -50%);
    box-shadow: 0 0 12px rgba(217, 160, 91, .8);
    pointer-events: none;
    transition: top .9s cubic-bezier(.65, 0, .18, 1);
    z-index: 2;
}

/* clickable scene ticks */
.gauge__tick {
    position: absolute; left: 50%; top: 0;
    width: 20px; height: 20px;
    transform: translate(-50%, -50%);
    background: transparent; border: 0; padding: 0;
    cursor: pointer;
}
.gauge__tick::before {
    content: ''; position: absolute; left: 50%; top: 50%;
    width: 5px; height: 5px; border-radius: 50%;
    transform: translate(-50%, -50%);
    background: rgba(143, 166, 166, .55);
    transition: background .3s ease, transform .3s ease;
}
.gauge__tick:hover::before, .gauge__tick:focus-visible::before {
    background: var(--glass);
    transform: translate(-50%, -50%) scale(1.8);
}
.gauge__tick.is-here::before { background: var(--gold); }
.gauge__tick:focus-visible { outline: 1px solid var(--gold); outline-offset: 3px; }

.gauge__tick span {
    position: absolute; right: 26px; top: 50%;
    transform: translate(8px, -50%);
    font-family: var(--font-mono); font-size: .56rem; font-weight: 500;
    letter-spacing: .25em; text-transform: uppercase;
    color: var(--foam); white-space: nowrap;
    background: rgba(8, 18, 25, .92);
    border: 1px solid rgba(116, 199, 178, .18);
    padding: .4rem .7rem;
    opacity: 0; pointer-events: none;
    transition: opacity .25s ease, transform .25s ease;
}
.gauge__tick:hover span, .gauge__tick:focus-visible span {
    opacity: 1;
    transform: translate(0, -50%);
}

/* sub-navigation: beats of the active scene, notched left of the track */
.gauge__sub {
    position: absolute;
    right: 16px;
    width: 16px;
    opacity: 0; transform: translateX(8px);
    animation: sub-in .45s ease .3s forwards;
}
@keyframes sub-in { to { opacity: 1; transform: none; } }

.gauge__subtick {
    position: absolute; right: 0;
    width: 20px; height: 14px;
    transform: translateY(-50%);
    background: transparent; border: 0; padding: 0;
    cursor: pointer;
}
.gauge__subtick::before {
    content: ''; position: absolute; right: 0; top: 50%;
    width: 9px; height: 2px;
    transform: translateY(-50%);
    background: rgba(143, 166, 166, .5);
    transition: background .25s ease, width .25s ease;
}
.gauge__subtick:hover::before, .gauge__subtick:focus-visible::before {
    background: var(--glass); width: 14px;
}
.gauge__subtick.is-here::before { background: var(--gold); width: 15px; }
.gauge__subtick:focus-visible { outline: 1px solid var(--gold); outline-offset: 2px; }

.gauge__subtick span {
    position: absolute; right: 28px; top: 50%;
    transform: translate(8px, -50%);
    font-family: var(--font-mono); font-size: .56rem; font-weight: 500;
    letter-spacing: .25em; text-transform: uppercase;
    color: var(--foam); white-space: nowrap;
    background: rgba(8, 18, 25, .92);
    border: 1px solid rgba(217, 160, 91, .22);
    padding: .4rem .7rem;
    opacity: 0; pointer-events: none;
    transition: opacity .25s ease, transform .25s ease;
}
.gauge__subtick:hover span, .gauge__subtick:focus-visible span {
    opacity: 1;
    transform: translate(0, -50%);
}
.gauge__depth {
    font-family: var(--font-mono); font-size: .55rem;
    color: var(--gold); letter-spacing: .16em; text-transform: uppercase;
    text-align: center; max-width: 7rem; line-height: 1.35;
}

/* ---------- subtitles ---------- */
.subs {
    position: fixed; top: 3.6rem; left: 50%; transform: translateX(-50%);
    z-index: 70; max-width: min(80vw, 42rem); text-align: center;
    font-size: .95rem; font-weight: 400; color: #fff;
    text-shadow: 0 1px 8px rgba(0, 0, 0, .9), 0 0 2px rgba(0, 0, 0, .9);
    opacity: 0; transition: opacity .45s ease;
    pointer-events: none; font-style: italic;
}
.subs.is-on { opacity: .92; }
/* on stepped scenes the scene marker leads at the top, so the subtitle
   drops below it (other scenes keep it at the top on its own) */
body:has([data-steps].is-stage) .subs { top: clamp(6.2rem, 12vh, 8.5rem); }

/* ---------- shared: reveals ---------- */
.reveal, .reveal-load {
    opacity: 0; transform: translateY(28px);
    transition: opacity .9s cubic-bezier(.2, .6, .2, 1) var(--d, 0s),
                transform .9s cubic-bezier(.2, .6, .2, 1) var(--d, 0s);
}
.reveal.is-in, .reveal-load.is-in { opacity: 1; transform: none; }

.reveal-clip {
    clip-path: inset(12% 8% 12% 8%);
    opacity: .35;
    transition: clip-path 1.2s cubic-bezier(.65, 0, .18, 1) var(--d, 0s),
                opacity 1.2s ease var(--d, 0s);
}
.reveal-clip.is-in { clip-path: inset(0 0 0 0); opacity: 1; }

.marker { color: var(--gold); margin-bottom: 1.4rem; }

h1, h2 {
    font-family: var(--font-display);
    font-weight: 500;
    line-height: 1.04;
    text-transform: uppercase;
    letter-spacing: .01em;
}
h2 { font-size: clamp(1.8rem, 4.2vw, 3.6rem); margin-bottom: 1.2rem; }

/* ============================================================
   HERO — pinned; the shell opens as you scroll
   ============================================================ */
.hero-pin { position: relative; }
.hero-pin.is-scrub .hero { position: sticky; top: 0; }

.hero {
    position: relative; height: 100svh; min-height: 560px;
    display: flex; align-items: flex-end;
    overflow: hidden;
}
.hero__video {
    position: absolute; inset: 0; width: 100%; height: 100%;
    object-fit: cover; filter: saturate(.9) brightness(.85);
}
.hero__shade {
    position: absolute; inset: 0;
    background:
        linear-gradient(to top, var(--abyss) 2%, transparent 45%),
        linear-gradient(to bottom, rgba(5, 11, 16, .55), transparent 30%),
        radial-gradient(120% 90% at 50% 100%, transparent 40%, rgba(5, 11, 16, .35));
}
.hero__content {
    position: relative; z-index: 2;
    padding: 0 var(--pad) 14vh;
    will-change: transform, opacity;
}
.hero__kicker { color: var(--glass); margin-bottom: 1.6rem; }
.hero__title {
    font-size: clamp(2.5rem, 8.5vw, 7.5rem);
    font-weight: 800;
}
.hero__title .line {
    display: block; overflow: hidden;
}
.hero__title .line > span {
    display: block; transform: translateY(110%);
    transition: transform 1.1s cubic-bezier(.16, 1, .3, 1) var(--d, 0s);
}
.hero__title .line.is-in > span { transform: none; }
.hero__title .line--accent { color: var(--glass); }
.hero__tag {
    margin-top: 1.6rem; max-width: 30rem;
    color: var(--mist); font-weight: 400;
}
.hero__cue {
    position: absolute; left: 50%; transform: translateX(-50%); bottom: 9vh; z-index: 2;
    display: flex; flex-direction: column; align-items: center; gap: 1rem;
    color: var(--mist);
}
.hero__cue .mono { writing-mode: vertical-rl; letter-spacing: .4em; font-size: .6rem; }
.hero__cue-line {
    width: 1px; height: 64px; overflow: hidden; position: relative;
    background: rgba(143, 166, 166, .25);
}
.hero__cue-line::after {
    content: ''; position: absolute; left: 0; top: -50%;
    width: 100%; height: 50%; background: var(--gold);
    animation: cue 2s cubic-bezier(.65, 0, .35, 1) infinite;
}
@keyframes cue { to { top: 110%; } }

/* ============================================================
   SCENES 01 / 02 — full-bleed parallax bands
   ============================================================ */
.scene { position: relative; }

.scene--farm, .scene--coast { padding: clamp(6rem, 14vh, 11rem) 0; }

.bleed {
    position: relative; height: clamp(420px, 78vh, 780px);
    overflow: hidden;
}
.bleed .media {
    position: absolute; left: 0; top: -12%;
    width: 100%; height: 124%;
    will-change: transform;
}
.bleed::after {
    content: ''; position: absolute; inset: 0;
    box-shadow: inset 0 0 140px 40px var(--abyss);
    pointer-events: none;
}

/* still + ambient video living inside a parallax wrapper */
.media { position: relative; }
.media img, .media video {
    position: absolute; inset: 0;
    width: 100%; height: 100%;
    object-fit: cover;
    filter: saturate(.92);
}
.media video {
    opacity: 0;
    transition: opacity 1.2s ease;
}
.media video.is-live { opacity: 1; }

.scene__panel {
    position: relative; z-index: 2;
    max-width: 34rem;
    margin: -9rem var(--pad) 0;
    padding: clamp(1.8rem, 3.5vw, 3rem);
    background: rgba(8, 18, 25, .88);
    backdrop-filter: blur(6px);
    border: 1px solid rgba(116, 199, 178, .14);
}
.scene__panel--right { margin-left: auto; }
.scene__panel p { color: var(--mist); font-weight: 400; }
.scene__panel a { color: var(--glass); text-decoration-color: rgba(116, 199, 178, .4); }

/* ============================================================
   SCENE 03 — the catch (collage + facts)
   ============================================================ */
.scene--catch { padding: clamp(6rem, 16vh, 12rem) var(--pad); }
.catch {
    max-width: 74rem; margin: 0 auto;
    display: grid; gap: clamp(2rem, 5vw, 4rem);
    align-items: center;
}
@media (min-width: 861px) {
    .catch { grid-template-columns: 4.4fr 7fr; }
}
.catch__text .marker { margin-bottom: 1.4rem; }
.catch__lead {
    color: var(--mist); font-weight: 400;
    max-width: 23rem; margin-top: 1.3rem;
}

.catch__collage {
    position: relative;
    display: grid;
    grid-template-columns: repeat(12, 1fr);
}
.catch__img { overflow: hidden; position: relative; }
.catch__img img { display: block; width: 100%; height: 100%; object-fit: cover; will-change: transform; }
.slate {
    position: absolute; left: 0; bottom: 0; right: 0;
    padding: 1.6rem 1rem .7rem;
    background: linear-gradient(to top, rgba(4, 9, 13, .85), transparent);
    color: var(--mist); font-size: .58rem;
}
.catch__img--dock { grid-column: 1 / 9; grid-row: 1; aspect-ratio: 3 / 2; }
.catch__img--macro {
    grid-column: 7 / 13; grid-row: 1;
    aspect-ratio: 4 / 3; align-self: end;
    margin-bottom: -14%;
    z-index: 2;
    border: 1px solid rgba(234, 242, 240, .1);
    box-shadow: 0 40px 80px rgba(0, 0, 0, .55);
}

/* ============================================================
   Scroll-stepped stages (facts intertitles, offer deck)
   Default (no JS): items flow normally. With .is-steps the
   section pins and scroll swaps the active item.
   ============================================================ */
.steps-stage {
    position: relative;
    display: flex; flex-direction: column; align-items: center;
    gap: clamp(2.5rem, 6vw, 4rem);
    padding: clamp(5rem, 12vh, 8rem) var(--pad);
}
.steps-stage .marker { text-align: center; }
.steps-counter { display: none; color: var(--mist); letter-spacing: .35em; }
.steps-counter [data-step-current] { color: var(--gold); }

[data-steps].is-steps .steps-stage {
    position: sticky; top: 0;
    height: 100svh;
    display: grid; place-items: center;
    padding: 0 var(--pad);
    overflow: hidden;
    gap: 0;
}
[data-steps].is-steps .steps-stage .marker {
    /* on stepped scenes the marker leads at the top; the subtitle follows */
    position: absolute; top: clamp(3.8rem, 7vh, 5rem); left: 0; right: 0;
    margin: 0;
    z-index: 3;
}
[data-steps].is-steps .steps-counter {
    display: block;
    position: absolute; bottom: clamp(4rem, 9vh, 6rem); left: 0; right: 0;
    text-align: center;
    z-index: 3;
}
[data-steps].is-steps .step-item {
    grid-area: 1 / 1;
    max-width: 100%;
    min-width: 0;
    opacity: 0;
    transform: translateY(56px);
    transition: opacity .65s cubic-bezier(.2, .6, .2, 1),
                transform .65s cubic-bezier(.2, .6, .2, 1);
    pointer-events: none;
}
[data-steps].is-steps .step-item.is-active {
    opacity: 1; transform: none;
    pointer-events: auto;
}
[data-steps].is-steps .step-item.is-past {
    opacity: 0; transform: translateY(-44px) scale(.97);
}

/* ============================================================
   SCENE 04 — интересни факти (intertitles)
   ============================================================ */
.scene--facts {
    background:
        radial-gradient(70% 50% at 50% 0%, rgba(116, 199, 178, .05), transparent 70%),
        var(--abyss);
}
.facts__slide {
    max-width: 46rem;
    text-align: center;
}
.facts__lead {
    font-size: clamp(1.7rem, 6vw, 4.6rem);
    font-weight: 300;
    overflow-wrap: break-word;
}
.facts__sub {
    color: var(--mist); font-weight: 400;
    max-width: 28rem; margin: 1.4rem auto 0;
}
.fact__num {
    display: block;
    font-size: clamp(1.8rem, 3.4vw, 2.8rem);
    color: var(--gold); letter-spacing: .1em;
    margin-bottom: 1.2rem;
}
.facts__slide h3 {
    font-family: var(--font-display); font-weight: 500;
    font-size: clamp(1.5rem, 3.6vw, 2.8rem);
    text-transform: uppercase;
    margin-bottom: 1.1rem;
}
.facts__slide > p { color: var(--mist); font-weight: 400; max-width: 34rem; margin-left: auto; margin-right: auto; }
.facts__coda {
    font-style: italic; font-size: clamp(1.15rem, 2.4vw, 1.7rem);
    color: var(--glass); font-weight: 400;
    max-width: 30rem;
}

/* ============================================================
   SCENE 06 — какво предлагаме (poster cards)
   ============================================================ */
.offer .card { width: min(32rem, 100%); }
[data-steps].is-steps .offer .card {
    max-height: min(72svh, 620px);
    min-height: clamp(380px, 62svh, 560px);
}
.card {
    position: relative; overflow: hidden;
    display: flex; flex-direction: column; justify-content: flex-end;
    min-height: clamp(420px, 58vh, 560px);
    padding: clamp(1.6rem, 3vw, 2.4rem);
    padding-top: 5.5rem;
    background: var(--deep);
    border: 1px solid rgba(116, 199, 178, .16);
    transition: transform .45s cubic-bezier(.2, .6, .2, 1), border-color .45s ease;
}
.card:hover { transform: translateY(-8px); border-color: rgba(217, 160, 91, .5); }

.card__bg {
    position: absolute; inset: 0; z-index: 0;
    width: 100%; height: 100%; object-fit: cover;
    filter: saturate(.85) brightness(.8);
    transform: scale(1.03);
    transition: transform 1.1s cubic-bezier(.2, .6, .2, 1);
}
.card:hover .card__bg { transform: scale(1.1); }
.card::after {
    content: ''; position: absolute; inset: 0; z-index: 1;
    background: linear-gradient(to top,
        rgba(4, 9, 13, .94) 18%,
        rgba(4, 9, 13, .55) 52%,
        rgba(4, 9, 13, .12) 78%,
        rgba(4, 9, 13, .35) 100%);
    pointer-events: none;
}
.card > *:not(.card__bg) { position: relative; z-index: 2; }

.card .card__kicker {
    position: absolute; top: clamp(1.6rem, 3vw, 2.4rem); left: clamp(1.6rem, 3vw, 2.4rem);
    color: var(--gold);
}
.card__icon { display: block; width: 52px; height: 52px; margin-bottom: 1.2rem; }
.card__icon svg { width: 100%; height: 100%; }
.card__icon svg * { stroke: var(--glass) !important; }
.card h3 {
    font-family: var(--font-display); font-weight: 500;
    font-size: 1.25rem; text-transform: uppercase;
    margin-bottom: .8rem;
}
.card > p { color: var(--mist); font-weight: 400; }
.card__stats {
    display: flex; gap: 1.6rem;
    margin-top: .4rem; padding-top: 1.2rem;
    border-top: 1px solid rgba(143, 166, 166, .2);
}
.card__stats dt {
    font-family: var(--font-display); font-weight: 800;
    font-size: 1.5rem; color: var(--gold); line-height: 1;
    margin-bottom: .35rem;
}
.card__stats dd {
    color: var(--mist); font-weight: 400; font-size: .78rem;
    max-width: 7rem;
}

/* ============================================================
   SCENE 07 — рецепти (recipe deck; reuses the offer card treatment)
   ============================================================ */
.recipe__ing {
    font-family: var(--font-mono);
    font-size: .62rem; font-weight: 500;
    letter-spacing: .06em; text-transform: none;
    color: var(--glass);
    max-width: none; opacity: 1;
    margin: 0 0 1rem;
}
body.paged .scene--recipes .card > p { max-width: 34rem; }

/* ============================================================
   SCENE 04 — the table
   ============================================================ */
.scene--table { padding: clamp(4rem, 12vh, 9rem) var(--pad); }
.table {
    max-width: 74rem; margin: 0 auto;
    display: grid; gap: clamp(2rem, 6vw, 5rem);
    align-items: center;
}
@media (min-width: 860px) { .table { grid-template-columns: 5fr 6fr; } }
.table__img { overflow: hidden; aspect-ratio: 4 / 5; max-height: 82vh; position: relative; }
.table__img .media {
    position: absolute; left: 0; top: -6%;
    width: 100%; height: 112%;
    will-change: transform;
}
.table__panel p { color: var(--mist); font-weight: 400; max-width: 30rem; }
.table__note { color: var(--gold); margin-top: 1.6rem; }

/* ============================================================
   SCENE 05 — film strip schedule (pinned horizontal)
   ============================================================ */
.strip-wrap { position: relative; }
.strip-stage {
    position: sticky; top: 0; height: 100svh;
    display: flex; flex-direction: column; justify-content: center;
    overflow: hidden;
    padding-left: var(--pad);
}
.strip-stage > .marker { margin-bottom: 2.2rem; }

.strip {
    display: flex; gap: clamp(1rem, 2vw, 1.8rem);
    width: max-content;
    will-change: transform;
    padding: 26px 40vw 26px 0;
    position: relative;
}
/* sprocket holes */
.strip::before, .strip::after {
    content: ''; position: absolute; left: 0; right: 0; height: 10px;
    background-image: radial-gradient(circle at 5px 5px, var(--sea) 3px, transparent 3.5px);
    background-size: 26px 10px;
}
.strip::before { top: 0; }
.strip::after { bottom: 0; }

.frame {
    width: clamp(240px, 26vw, 330px);
    min-height: clamp(320px, 46vh, 430px);
    padding: 1.6rem;
    display: flex; flex-direction: column;
    background: var(--deep);
    border: 1px solid rgba(116, 199, 178, .16);
}
.frame--rest { opacity: .45; background: transparent; border-style: dashed; }
.frame__num {
    font-size: clamp(2.4rem, 4vw, 3.4rem); letter-spacing: 0;
    color: var(--glass); line-height: 1;
}
.frame--rest .frame__num { color: var(--mist); }
.frame__day {
    font-family: var(--font-display); font-weight: 500;
    font-size: 1.15rem; text-transform: uppercase;
    margin-top: .4rem;
}
.frame__month { color: var(--mist); font-size: .62rem; margin-top: .3rem; }
.frame__cities { list-style: none; margin-top: auto; padding-top: 2rem; }
.frame__cities li {
    padding: .45rem 0; font-weight: 400; color: var(--foam);
    border-bottom: 1px solid rgba(143, 166, 166, .18);
}
.frame__rest { margin-top: auto; padding-top: 2rem; color: var(--mist); font-style: italic; }
.frame__call {
    margin-top: 1.4rem; color: var(--gold); text-decoration: none;
    font-size: .66rem;
}
.frame__call:hover { text-decoration: underline; }

/* ============================================================
   FINALE
   ============================================================ */
.finale {
    min-height: 92svh;
    position: relative;
    display: flex; flex-direction: column; justify-content: center; align-items: center;
    text-align: center;
    padding: 5rem var(--pad);
    background:
        radial-gradient(90% 60% at 50% 110%, rgba(116, 199, 178, .08), transparent 70%),
        var(--abyss);
}
.finale__phone {
    font-family: var(--font-display); font-weight: 800;
    font-size: clamp(1.7rem, 6.5vw, 5.2rem);
    text-decoration: none; line-height: 1.1;
    color: var(--foam);
    transition: color .35s ease, letter-spacing .35s ease;
}
.finale__phone:hover { color: var(--gold); letter-spacing: .04em; }
.finale__mail { margin-top: 1.6rem; color: var(--mist); font-weight: 400; }
.finale__mail a { color: var(--glass); text-decoration-color: rgba(116, 199, 178, .4); }
.finale__socials {
    list-style: none; display: flex; gap: 2.4rem; margin-top: 3rem;
}
.finale__socials a {
    font-family: var(--font-mono); font-size: .68rem;
    letter-spacing: .25em; text-transform: uppercase;
    color: var(--foam); text-decoration: none;
    border-bottom: 1px solid rgba(234, 242, 240, .25);
    padding-bottom: .3rem;
    transition: color .3s, border-color .3s;
}
.finale__socials a:hover { color: var(--gold); border-color: var(--gold); }
.finale__end {
    position: absolute; bottom: clamp(1.4rem, 4vh, 2.5rem); left: 0; right: 0;
    color: var(--mist); font-size: .6rem; line-height: 1.9;
}
.finale__by {
    display: block; opacity: .85; letter-spacing: .28em;
    color: inherit; text-decoration: none;
    pointer-events: auto; transition: opacity .25s ease;
}
.finale__by:hover, .finale__by:focus-visible { opacity: 1; }
.finale__ganvo { color: var(--gold); }
.finale__by:hover .finale__ganvo, .finale__by:focus-visible .finale__ganvo { text-decoration: underline; text-underline-offset: .22em; }

/* ============================================================
   Traveling companion shell
   ============================================================ */
#companion {
    position: fixed; left: 0; top: 0;
    width: 132px; height: 132px;
    z-index: 60;
    pointer-events: none;
    opacity: 0;
    will-change: transform, opacity;
    filter: drop-shadow(0 0 14px rgba(116, 199, 178, .25));
}
@media (max-width: 959px) {
    #companion { width: 76px; height: 76px; }
}

/* ============================================================
   Paged mode — no scrolling; scenes swap behind a curtain cut
   (dormant: the paged controller was replaced by free scroll)
   ============================================================ */
html.paged, body.paged { overflow: hidden; height: 100svh; }

.page-hidden { display: none !important; }

body.paged .hero-pin { height: 100svh; }
body.paged .hero { height: 100svh; }

body.paged .scene--farm, body.paged .scene--coast {
    height: 100svh; padding: 0;
    position: relative; overflow: hidden;
}
body.paged .scene--farm .bleed, body.paged .scene--coast .bleed {
    height: 100svh;
}
body.paged .scene__panel {
    position: absolute; z-index: 2;
    bottom: clamp(1.5rem, 6vh, 4rem); left: 0;
    margin: 0 var(--pad);
}
body.paged .scene__panel--right { left: auto; right: 0; }

body.paged .scene--catch {
    height: 100svh; overflow: hidden;
    display: grid; place-items: center;
    padding: 0 var(--pad);
}
body.paged .catch { width: min(74rem, 100%, 150svh); }
body.paged .is-stage .catch__img img {
    animation: kenburns 18s ease-in-out infinite alternate;
}
@keyframes kenburns {
    from { transform: scale(1); }
    to   { transform: scale(1.07); }
}

body.paged .scene--table {
    height: 100svh; overflow: hidden;
    display: grid; place-items: center;
    padding: 0 var(--pad);
}
body.paged .table { width: 100%; }
body.paged .table__img { max-height: 70svh; }

body.paged [data-steps] { height: 100svh; }
body.paged .strip-wrap { height: 100svh; }

/* Scene 06 in paged mode: editorial split — contained image + content */
body.paged .scene--offer .card {
    position: relative;
    width: min(68rem, 100%);
    height: auto; min-height: min(64svh, 540px); max-height: none;
    padding: 0 0 0 calc(42% + clamp(2rem, 4vw, 3.5rem));
    display: flex; flex-direction: column; justify-content: center;
    background: transparent; border: 0; overflow: visible;
}
body.paged .scene--offer .card:hover { transform: none; }
body.paged .scene--offer .step-item { transform: scale(1.03); }
body.paged .scene--offer .step-item.is-active { transform: none; }
body.paged .scene--offer .step-item.is-past { transform: scale(.99); }
body.paged .scene--offer .card::after { display: none; }

body.paged .scene--offer .card__bg {
    position: absolute; inset: auto; left: 0; top: 50%;
    transform: translateY(-50%);
    width: 42%; height: 100%;
    max-height: min(64svh, 540px);
    object-fit: cover;
    filter: saturate(.88) brightness(.9);
    border: 1px solid rgba(234, 242, 240, .1);
    box-shadow: 0 30px 70px rgba(0, 0, 0, .5);
}

body.paged .scene--offer .card .card__kicker {
    position: static;
    margin-bottom: 1.4rem;
}
body.paged .scene--offer .card__icon {
    width: 54px; height: 54px;
    margin-bottom: 1.4rem;
}
body.paged .scene--offer .card h3 {
    font-size: clamp(1.9rem, 4vw, 3.2rem);
    margin-bottom: 1rem;
}
body.paged .scene--offer .card > p {
    max-width: 30rem;
    color: var(--mist);
}
body.paged .scene--offer .card__stats {
    gap: clamp(1.6rem, 3vw, 2.8rem);
    margin-top: 1.8rem; padding-top: 1.4rem;
}
body.paged .scene--offer .card__stats dt {
    font-size: clamp(1.5rem, 2.6vw, 2.2rem);
}

@media (max-width: 860px) {
    body.paged .scene--offer .card {
        padding: 0; min-height: 0;
        width: min(30rem, 100%);
    }
    /* story-style promise: the portrait shot fills the stage,
       content sits on a scrim at the bottom — like the film scenes */
    body.paged .scene--offer .steps-stage { padding: 0; }
    body.paged .scene--offer .card.step-item {
        position: absolute; inset: 0;
        width: 100%; height: auto;
        min-height: 0; max-height: none;
        padding: 0 var(--pad) clamp(7.5rem, 15vh, 10rem);
        justify-content: flex-end;
    }
    body.paged .scene--offer .card__bg {
        position: absolute; inset: 0; transform: none;
        width: 100%; height: 100%; max-height: none;
        object-fit: cover;
        margin: 0; border: 0; box-shadow: none;
        filter: saturate(.88) brightness(.88);
    }
    body.paged .scene--offer .card::after {
        display: block;
        background: linear-gradient(to top,
            rgba(4, 9, 13, .92) 10%,
            rgba(4, 9, 13, .42) 42%,
            rgba(4, 9, 13, .05) 68%,
            rgba(4, 9, 13, .32) 100%);
    }
    body.paged .scene--offer .card .card__kicker { margin-bottom: 1rem; }
    body.paged .scene--offer .card__icon {
        width: 40px; height: 40px; margin-bottom: .9rem;
    }
    body.paged .scene--offer .card h3 { font-size: 1.9rem; }
    body.paged .scene--offer .card > p { color: var(--foam); opacity: .85; }
    body.paged .scene--offer .card__stats {
        margin-top: 1rem; padding-top: .9rem;
        gap: 1.4rem;
        border-top: 1px solid rgba(234, 242, 240, .18);
    }
    body.paged .scene--offer .card__stats dt { font-size: 1.3rem; }
    body.paged .scene--offer .card__stats dd { font-size: .72rem; max-width: 8rem; }
}
body.paged .strip {
    transition: transform .75s cubic-bezier(.65, 0, .18, 1);
}

body.paged .finale { height: 100svh; min-height: 0; }

/* curtain cut, JS-driven after the opening keyframes */
.curtain--live {
    animation: none;
    transform: scaleY(0);
    transition: transform .48s cubic-bezier(.77, 0, .18, 1);
}
body.curtains-closed .curtain--live { transform: scaleY(1); }

.curtain-title--live {
    animation: none;
    opacity: 0;
    transition: opacity .32s ease .12s;
}
body.curtains-closed .curtain-title--live { opacity: 1; }

/* ============================================================
   Mobile
   ============================================================ */
@media (max-width: 959px) {
    /* compact frosted rail: same gauge, condensed into a designed pill */
    .gauge {
        display: flex;
        right: 10px;
        /* ride above the curtain cut (80/81) so the nav stays visible
           during a scene transition; still under the ☰ index (85) + grain (90) */
        z-index: 82;
        gap: .45rem;
        padding: .8rem .25rem;
        background: rgba(8, 18, 25, .55);
        -webkit-backdrop-filter: blur(8px);
        backdrop-filter: blur(8px);
        border: 1px solid rgba(116, 199, 178, .14);
        border-radius: 999px;
        /* sleeps between interactions; wakes while navigating —
           floats over content, so no layout clearance needed */
        opacity: 0;
        transform: translateY(-50%) translateX(14px);
        pointer-events: none;
        transition: opacity .35s ease, transform .35s ease;
    }
    .gauge.is-awake {
        opacity: .88;
        transform: translateY(-50%);
        pointer-events: auto;
    }
    .gauge__cap { display: none; }
    .gauge__track { height: 24vh; }
    .gauge__depth {
        writing-mode: horizontal-tb;
        font-size: .46rem;
        letter-spacing: .08em;
        text-align: center;
        white-space: nowrap;
        /* fixed width keeps the pill a constant size across scenes; sized to
           fit the widest name ("трапезата", ~46px) with a small margin */
        width: 48px;
        line-height: 1.3;
        color: var(--gold);
    }
    .gauge__tick { width: 18px; height: 18px; }
    .gauge__tick::before { width: 4px; height: 4px; }
    .gauge__tick span { display: none; }
    .gauge__dot { width: 8px; height: 8px; }

    /* beat notches: visible on mobile, compact, labels off */
    .gauge__sub { right: 13px; width: 12px; }
    .gauge__subtick { width: 14px; height: 13px; }
    .gauge__subtick::before { width: 6px; }
    .gauge__subtick.is-here::before { width: 9px; }
    .gauge__subtick span { display: none; }


    .subs { font-size: .82rem; top: 3.2rem; max-width: 84vw; }
    /* coast: panel sits at the top (keeping the boat in the lower half);
       catch: the title block leads at the top — both drop the subtitle to
       the bottom so it doesn't crowd the top */
    body:has(.scene--coast.is-stage) .subs,
    body:has(.scene--catch.is-stage) .subs { top: auto; bottom: 1rem; }

    /* the cue joins the content flow — the floating vertical one collides */
    .hero { flex-direction: column; justify-content: flex-end; align-items: stretch; }
    .hero__content { position: relative; z-index: 2; padding-bottom: 0; }
    .hero__cue {
        position: static; transform: none;
        flex-direction: row; align-items: center; gap: .8rem;
        margin: 1.5rem var(--pad) 11vh;
        z-index: 2;
    }
    .hero__cue .mono { writing-mode: horizontal-tb; letter-spacing: .3em; font-size: .56rem; }
    .hero__cue-line { width: 44px; height: 1px; }
    .hero__cue-line::after {
        top: 0; left: -50%;
        width: 50%; height: 100%;
        animation: cue-x 2s cubic-bezier(.65, 0, .35, 1) infinite;
    }
    @keyframes cue-x { to { left: 110%; } }

    /* softer edge vignette on narrow screens */
    .bleed::after { box-shadow: inset 0 0 70px 12px var(--abyss); }
}

@media (max-width: 860px) {
    /* keep the film subtitle clear of the scene panels */
    body.paged .scene__panel {
        bottom: 6.5rem;
        padding: 1.3rem 1.2rem;
    }

    /* the boat sits at ~70% frame height — right where a bottom panel
       lands. Panel moves up into the empty fog; crop centres the boat. */
    body.paged .scene--coast .scene__panel {
        bottom: auto; top: 5.4rem;
        left: 0; right: auto;
    }
    .scene--coast .media img,
    .scene--coast .media video { object-position: 42% 50%; }

    /* breathing room between marker / stepped content / counter;
       the rail auto-hides, so it may overlap content while awake */
    [data-steps].is-steps .steps-stage { padding: 13vh var(--pad) 12vh; }

    body.paged .table { grid-template-columns: 1fr; gap: 1.5rem; }
    body.paged .table__img {
        aspect-ratio: 16 / 10;
        max-height: 30svh;
        width: 100%;
    }
    body.paged .scene--offer .card__stats { flex-wrap: wrap; }

    .frame { width: clamp(220px, 64vw, 300px); }

    .finale__socials {
        flex-wrap: wrap; justify-content: center;
        gap: 1.2rem 1.8rem;
    }
}

@media (max-width: 860px) {
    /* catch on mobile: text above, a compact side-by-side diptych below
       (the desktop overlap is too cramped on a phone) */
    .catch { grid-template-columns: 1fr; gap: 1.4rem; text-align: center; }
    .catch__text .marker { margin-bottom: 1rem; }
    .catch__lead { max-width: 30rem; margin-left: auto; margin-right: auto; }
    .catch__collage {
        display: grid; grid-template-columns: 1fr 1fr; gap: .55rem;
    }
    .catch__img--dock, .catch__img--macro {
        grid-column: auto; grid-row: auto;
        aspect-ratio: 3 / 4; margin: 0; align-self: auto;
        box-shadow: none; border: 0;
    }
    .catch__img .slate { font-size: .5rem; padding: 1.1rem .55rem .5rem; }
}

/* ============================================================
   Reduced motion
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
    .grain, .curtain, .curtain-title, .hero__cue-line::after { animation: none; }
    .curtain { display: none; }
    .reveal, .reveal-load, .reveal-clip,
    .hero__title .line > span { opacity: 1; transform: none; transition: none; clip-path: none; }
}
