/* ============================================================
   QIYQIRIQ — clip campaign platform
   «Jasur» visual language (app reja/08, 2026-10-28): cream paper, 2px ink
   lines, hard offset shadows, fire + lime accents, tilted stickers.
   Fonts: Unbounded (display) + Space Grotesk (body), self-hosted
          Montserrat covers Cyrillic, which Space Grotesk lacks
   ============================================================ */

/* ---------- Fonts ---------- */
@font-face {
  font-family: 'Unbounded';
  font-style: normal;
  font-weight: 200 900;
  font-display: swap;
  src: url('fonts/unbounded-var-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Unbounded';
  font-style: normal;
  font-weight: 200 900;
  font-display: swap;
  src: url('fonts/unbounded-var-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Unbounded';
  font-style: normal;
  font-weight: 200 900;
  font-display: swap;
  src: url('fonts/unbounded-var-cyrillic.woff2') format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
/* Space Grotesk — body (variable, latin + latin-ext). U+02BB (oʻ) is in latin. */
@font-face {
  font-family: 'Space Grotesk';
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
  src: url('fonts/space-grotesk-var-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Space Grotesk';
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
  src: url('fonts/space-grotesk-var-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* Cyrillic companion for Space Grotesk (RU only) — variable 400–800 so it
   covers every weight the body text uses */
@font-face {
  font-family: 'Montserrat';
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url('fonts/montserrat-var-cyrillic.woff2') format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}

/* ---------- Tokens ---------- */
:root {
  /* «Jasur» — the same tokens as the app's `.jasur` world (globals.css) */
  --bg: #FFF3E6;          /* krem */
  --bg-2: #FFFAF4;        /* krem-2 */
  --surface: #FFFFFF;
  --surface-2: #FFFAF4;
  --ink: #111111;         /* siyoh — lines, text, hard shadows */
  --line: #E8D9C8;        /* soft inner divider only */
  --line-strong: var(--ink);
  --text: #111111;
  --muted: #574B40;       /* sokin — 7.6:1 on krem */
  --primary: #FF5C1A;     /* olov */
  --primary-2: #FF5C1A;
  --primary-soft: rgba(255, 92, 26, 0.16);
  --on-primary: #111111;
  --lime: #C4F25C;        /* laym — success / sticker */
  --sky: #3FB9C9;         /* mijoz */
  --on-ink-muted: #C9BBAA; /* secondary text on the ink footer */
  --hard: 5px 5px 0 var(--ink);
  --hard-s: 3px 3px 0 var(--ink);
  --hard-fire: 4px 4px 0 var(--primary);
  --stroke: 2px solid var(--ink);
  --font-d: 'Unbounded', 'Arial Black', sans-serif;
  --font-b: 'Space Grotesk', 'Montserrat', 'Segoe UI', sans-serif; /* Space Grotesk is latin-only; cyrillic falls through to Montserrat */
  --font-eyebrow: var(--font-b);
  --r-card: 22px;
  --container: 1240px;
  --nav-h: 66px;
  --phw: clamp(220px, 24vw, 352px); /* centre phone width — the fan scales off it */
  --ease-out: cubic-bezier(0.2, 0.7, 0.2, 1);
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--nav-h) + 40px);
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-b);
  font-size: 16px;
  line-height: 1.6;
  background: var(--bg);
  color: var(--text);
  overflow-x: clip;
}

img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
ul, ol { list-style: none; }
em { font-style: normal; }

::selection { background: var(--primary); color: var(--on-primary); }

:focus-visible { outline: 2px solid var(--primary); outline-offset: 3px; border-radius: 4px; }

.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }

.skip-link {
  position: fixed;
  top: -60px;
  left: 20px;
  z-index: 3000;
  padding: 10px 18px;
  background: var(--primary);
  color: var(--on-primary);
  border-radius: 999px;
  font-weight: 700;
  transition: top 0.2s;
}
.skip-link:focus { top: 14px; }

.container {
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: clamp(20px, 4vw, 32px);
}
.container--narrow { max-width: 800px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 22px;
  border-radius: 14px;
  border: var(--stroke);
  font-family: var(--font-b);
  font-weight: 700;
  font-size: 0.95rem;
  line-height: 1.2;
  white-space: nowrap;
  transition: transform 0.15s var(--ease-out), box-shadow 0.15s, background 0.2s, color 0.2s;
}
/* «Jasur» press: the button sinks into its own hard shadow */
.btn:active { transform: translate(3px, 3px); box-shadow: none; }
.btn__ic { width: 17px; height: 17px; fill: currentColor; flex: 0 0 auto; }

.btn--primary {
  background: var(--ink);
  color: var(--bg);
  box-shadow: var(--hard-fire);
}
.btn--primary:hover { background: var(--primary); color: var(--ink); }

.btn--ghost {
  color: var(--text);
  background: var(--surface);
  box-shadow: var(--hard-s);
}
.btn--ghost:hover { background: var(--lime); }

.btn--big { padding: 16px 30px; font-size: 1rem; }
.btn--huge { padding: 21px 46px; font-size: 1.15rem; }
.btn--huge .btn__ic { width: 21px; height: 21px; }

/* ---------- Eyebrow ---------- */
.eyebrow,
.hero__eyebrow {
  display: inline-block;
  font-family: var(--font-eyebrow);
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: 0.01em;
  color: var(--muted);
}
.hero__eyebrow { color: var(--ink); }

/* ============================================================
   NAV
   ============================================================ */
.nav {
  position: sticky;
  position: -webkit-sticky;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: var(--bg);
  border-bottom: var(--stroke);
}
.nav__pill {
  max-width: var(--container);
  margin-inline: auto;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding-inline: clamp(14px, 3vw, 28px);
  border: 0;
  border-radius: 0;
  background: transparent;
}

.nav__brand { display: inline-flex; align-items: center; gap: 10px; }
.nav__mark {
  width: 22px;
  height: 22px;
  color: var(--primary);
  transform: rotate(-8deg);
  transition: transform 0.4s var(--ease-out);
}
.nav__brand:hover .nav__mark { transform: rotate(82deg) scale(1.12); }
.nav__name {
  font-family: var(--font-d);
  font-weight: 700;
  font-size: 0.92rem;
  letter-spacing: 0.02em;
}
.nav__links { display: flex; gap: 26px; }
.nav__links a {
  font-weight: 600;
  font-size: 0.93rem;
  color: var(--muted);
}

/* ---------- per-letter swap (nav links + nav CTA) ----------
   Each glyph slides away while its duplicate rises into the same slot,
   staggered left-to-right by --i. Both copies are pseudo-elements so each can
   move on its own — the real character is left transparent and only holds the
   layout width. script.js splits .txtfx into .txtfx__c on every language
   change; without JS the plain label just renders as-is. */
.txtfx {
  display: inline-block;
  white-space: nowrap;
  --fx-out: var(--muted);
  --fx-in: var(--text);
  --fx-shift: 0.7em;
}
.txtfx__c {
  display: inline-block;
  position: relative;
  color: transparent;
}
.txtfx__c::before,
.txtfx__c::after {
  content: attr(data-ch);
  position: absolute;
  left: 0;
  top: 0;
  white-space: pre;
  transition: transform 0.5s var(--ease-out), opacity 0.45s var(--ease-out);
  transition-delay: calc(var(--i, 0) * 26ms);
}
.txtfx__c::before { color: var(--fx-out); }
.txtfx__c::after {
  color: var(--fx-in);
  transform: translateY(var(--fx-shift));
  opacity: 0;
}

:is(.nav__links a, .nav__cta):is(:hover, :focus-visible) .txtfx__c::before {
  transform: translateY(calc(var(--fx-shift) * -1));
  opacity: 0;
}
:is(.nav__links a, .nav__cta):is(:hover, :focus-visible) .txtfx__c::after {
  transform: none;
  opacity: 1;
}

/* on the orange pill both copies stay white — only the movement reads */
.nav__cta .txtfx { --fx-out: var(--bg); --fx-in: var(--bg); }
.nav__cta:hover .txtfx { --fx-out: var(--ink); --fx-in: var(--ink); }

@media (prefers-reduced-motion: reduce) {
  .txtfx__c::before,
  .txtfx__c::after { transition: color 0.2s; transition-delay: 0s; }
  .txtfx__c::after { display: none; }
  :is(.nav__links a, .nav__cta):is(:hover, :focus-visible) .txtfx__c::before {
    transform: none;
    opacity: 1;
    color: var(--fx-in);
  }
}

.nav__right { display: flex; align-items: center; gap: 10px; }

/* language dropdown */
.langdd { position: relative; }

.langdd__trigger {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 13px 9px 12px;
  border-radius: 12px;
  border: var(--stroke);
  background: var(--surface);
  color: var(--text);
  font-weight: 700;
  font-size: 0.8rem;
  letter-spacing: 0.02em;
  transition: border-color 0.2s, background 0.2s;
}
.langdd__trigger:hover,
.langdd.is-open .langdd__trigger { background: var(--lime); }

.langdd__globe { width: 15px; height: 15px; color: var(--muted); flex: 0 0 auto; }
.langdd__current { min-width: 1.4em; text-align: left; }
.langdd__chev {
  width: 11px;
  height: 11px;
  color: var(--muted);
  flex: 0 0 auto;
  transition: transform 0.3s var(--ease-out), color 0.2s;
}
.langdd.is-open .langdd__chev { transform: rotate(180deg); color: var(--ink); }

/* --dd-x centers the panel for the mobile (--big) instance; the nav instance
   stays right-aligned under its right-edge trigger */
.langdd__menu {
  --dd-x: 0%;
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  z-index: 50;
  min-width: 178px;
  padding: 6px;
  border-radius: 16px;
  border: var(--stroke);
  background: var(--surface);
  box-shadow: var(--hard);
  transform-origin: top right;
  transform: translate(var(--dd-x), -8px) scale(0.96);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.2s var(--ease-out), transform 0.2s var(--ease-out), visibility 0.2s;
}
.langdd.is-open .langdd__menu {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translate(var(--dd-x), 0) scale(1);
}

.langdd__opt {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 9px 10px;
  border-radius: 10px;
  font-size: 0.87rem;
  font-weight: 600;
  color: var(--muted);
  text-align: left;
  transition: background 0.15s, color 0.15s;
}
.langdd__opt:hover { background: var(--bg); color: var(--text); }
.langdd__opt.is-active { color: var(--bg); background: var(--ink); }
.langdd__code {
  flex: 0 0 auto;
  width: 24px;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.03em;
  color: var(--muted);
}
.langdd__opt.is-active .langdd__code { color: var(--primary); }
.langdd__name { flex: 1; }

/* mobile-menu instance: bigger touch target, panel centered under the trigger */
.langdd--big .langdd__trigger { padding: 12px 18px 12px 16px; font-size: 0.95rem; }
.langdd--big .langdd__globe { width: 18px; height: 18px; }
.langdd--big .langdd__chev { width: 13px; height: 13px; }
.langdd--big .langdd__menu {
  --dd-x: -50%;
  left: 50%;
  right: auto;
  min-width: 210px;
  transform-origin: top center;
}
.langdd--big .langdd__opt { padding: 12px; font-size: 0.95rem; }

.nav__burger {
  display: none;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  border: var(--stroke);
  background: var(--surface);
  box-shadow: var(--hard-s);
  position: relative;
}
.nav__burger span {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 18px;
  height: 2px;
  border-radius: 2px;
  background: var(--text);
  transition: transform 0.3s var(--ease-out);
}
.nav__burger span:first-child { transform: translate(-50%, -4px); }
.nav__burger span:last-child { transform: translate(-50%, 3px); }
.nav__burger.is-open span:first-child { transform: translate(-50%, -1px) rotate(45deg); }
.nav__burger.is-open span:last-child { transform: translate(-50%, -1px) rotate(-45deg); }

/* mobile menu */
.mmenu {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 34px;
  background: var(--bg);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.35s, visibility 0.35s;
}
.mmenu.is-open { opacity: 1; visibility: visible; }
.mmenu__links { display: flex; flex-direction: column; align-items: center; gap: 20px; }
.mmenu__links a {
  font-family: var(--font-d);
  font-weight: 700;
  font-size: clamp(1.5rem, 6.5vw, 2.2rem);
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.4s var(--ease-out), transform 0.4s var(--ease-out), color 0.2s;
}
.mmenu.is-open .mmenu__links a { opacity: 1; transform: none; }
.mmenu.is-open .mmenu__links a:nth-child(1) { transition-delay: 0.05s; }
.mmenu.is-open .mmenu__links a:nth-child(2) { transition-delay: 0.1s; }
.mmenu.is-open .mmenu__links a:nth-child(3) { transition-delay: 0.15s; }
.mmenu.is-open .mmenu__links a:nth-child(4) { transition-delay: 0.2s; }
.mmenu__links a:hover { color: var(--primary); }
body.menu-open { overflow: hidden; }

/* ============================================================
   HERO
   ============================================================ */
.hero {
  position: relative;
  overflow: clip;
  /* nav is sticky (in-flow), so it already occupies its own height above */
  padding-top: clamp(64px, 9vh, 110px);
  padding-bottom: clamp(56px, 8vh, 110px);
  background: var(--bg);
}

.hero__inner {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  /* the fan gets a row of its own — five cards are far wider than the centre
     column, so it must never share a row with anything else */
  grid-template-areas:
    'eyebrow eyebrow eyebrow'
    'title   title   title'
    'visual  visual  visual'
    'flow    flow    flow'
    'video   video   video';
  align-items: end;
  column-gap: clamp(24px, 4vw, 56px);
}

.hero__eyebrow {
  grid-area: eyebrow;
  justify-self: center;
  margin-bottom: clamp(18px, 3vh, 30px);
  /* a tilted «Jasur» sticker, not a tinted line of text */
  padding: 4px 12px;
  border: var(--stroke);
  border-radius: 10px;
  background: var(--primary);
  transform: rotate(-3deg);
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

/* headline — size adapts per language (word lengths differ) */
.hero__title {
  grid-area: title;
  position: relative;
  z-index: 1;
  text-align: center;
  font-family: var(--font-d);
  font-weight: 800;
  font-size: clamp(2.5rem, 10.5vw, 8.4rem);
  line-height: 0.98;
  letter-spacing: -0.005em;
  text-transform: uppercase;
  margin-bottom: -0.06em; /* the phone cluster tucks just under the last line */
  color: var(--text);
}
/* three lines now carry a full sentence per language, so each gets its own
   tuned ceiling instead of sharing one clamp — longest line per language
   (line 1 for EN/RU, line 2 for UZ) is what sets the limit */
/* two-point fluid scale (390px -> 1440px) per language, not a single vw
   coefficient — these sentences are long enough that a mobile-safe fit and
   the approved desktop size need genuinely different slopes */
/* fitted against the LONGEST rotating word per language (podcast /
   koʻrsatuvingizni / подкастом), so a swap can never overflow the line */
html[data-lang='en'] .hero__title { font-size: clamp(1.4rem, calc(8.06vw - 3.4px), 6.2rem); }
html[data-lang='uz'] .hero__title { font-size: clamp(1.22rem, calc(6.99vw - 2.87px), 5.4rem); }
html[data-lang='ru'] .hero__title { font-size: clamp(1.25rem, calc(7.22vw - 3px), 5.55rem); }

.hero__line { display: block; overflow: clip; padding-bottom: 0.06em; margin-bottom: -0.06em; }
/* the clip mask is only needed for the load-in slide; drop it once the words have
   landed so a dragged .hero__logo can travel outside its line box */
@keyframes hero-unclip { to { overflow: visible; } }
body.is-loaded .hero__line { animation: hero-unclip 0.01s linear 1.3s forwards; }
.hero__word {
  display: inline-block;
  white-space: nowrap; /* fail loud (visible overflow) instead of silently wrapping and
                           losing the 2nd line under .hero__line's overflow:clip mask */
  color: var(--text);
  transform: translateY(0);
  transition: transform 1s var(--ease-out);
}
body:not(.is-loaded) .hero__word { transform: translateY(112%); }
.hero__line:nth-child(2) .hero__word { transition-delay: 0.1s; }
.hero__line:nth-child(3) .hero__word { transition-delay: 0.2s; }

/* full-colour app icons standing in for the words "YouTube" / "Instagram".
   Draggable — initDraggableLogos() writes an inline transform while a pull is
   in flight and clears it once the spring settles back on this rule. */
.hero__logo {
  display: inline-block;
  width: 1.02em;
  height: 1.02em;
  vertical-align: -0.16em;
  margin-inline: 0.06em;
  position: relative;
  z-index: 1; /* a pulled icon rides over the other headline, never under it */
  transform: rotate(5deg);
  /* hard ink shadow («Jasur»), so the tile reads as sitting above
     the letter it overlaps. em-based so it tracks the headline's size, and on
     `filter` rather than `box-shadow` to follow the squircle's real alpha. */
  filter: drop-shadow(0.05em 0.05em 0 var(--ink));
  touch-action: none; /* we own the gesture — no scroll/zoom hijack mid-drag */
  cursor: grab;
  -webkit-user-select: none;
  user-select: none;
}
.hero__logo.is-grabbed { cursor: grabbing; }

/* leading icon tucks into the letter that follows it (the V of VIDEO).
   Overlap comes from a negative margin, never transform — the drag physics
   owns transform and would wipe it on the first pull. */
.hero__logo--lead { margin-right: -0.17em; }
/* …and the mirror, for a tile that trails the word it belongs to */
.hero__logo--trail { margin-left: -0.17em; }

/* ---------- rotating headline word ---------- */
.rot {
  display: inline-block;
  position: relative;
  /* JS sets the width per word; animating it keeps the rest of the
     (centre-aligned) line from snapping around on every swap */
  /* eased at both ends (not var(--ease-out), which snaps off the mark) so the
     line drifts to its new width instead of lurching */
  transition: width 0.8s cubic-bezier(0.45, 0, 0.25, 1);
}
/* holds the longest word in flow so the box keeps a correct height + baseline */
.rot__sizer { visibility: hidden; }
.rot__w {
  position: absolute;
  left: 0;
  top: 0;
  white-space: nowrap;
  opacity: 0;
  /* Sequential, not a cross-dissolve: the old word clears before the new one
     arrives. Overlapping them in place superimposed two words into mush, and
     the old vertical slide added a second axis of motion on top of the line
     re-centering — between them, that is what made the swap tiring. */
  transition: opacity 0.34s ease;
}
.rot__w.is-in {
  opacity: 1;
  transition-delay: 0.38s; /* hold until the outgoing word has fully gone */
}
.rot__w.is-out { opacity: 0; }
/* the rotating word is the one fire-coloured thing in the headline; a hard
   ink offset keeps it legible on cream */
.rot__w { color: var(--primary); text-shadow: 0.045em 0.045em 0 var(--ink); }

/* the fan's anchor: one --phw-wide box in the middle of its own row, with the
   four side cards hanging outside it */
.hero__visual {
  grid-area: visual;
  position: relative;
  z-index: 2;
  justify-self: center;
  width: var(--phw);
  margin-bottom: clamp(26px, 4vh, 48px);
  transition: opacity 0.9s var(--ease-out) 0.4s, transform 0.9s var(--ease-out) 0.4s;
}
body:not(.is-loaded) .hero__visual { opacity: 0; transform: translateY(64px); }

/* the five-card fan. Only the centre card is in flow — it sets the cluster
   height; the other four hang off it, positioned in --phw units so the whole
   arrangement scales from one variable.
   --w  width, as a share of --phw
   --x  horizontal offset from centre, in --phw units
   --top  how far the card is pushed down the centre card's height */
.fan { position: relative; width: 100%; }

.fan__card {
  --w: 1;
  --x: 0;
  --rot: 0deg;
  --top: 0%;
  position: absolute;
  top: var(--top);
  left: 50%;
  z-index: 1;
  width: calc(var(--phw) * var(--w));
  /* --py is the parallax offset written by initParallax(); --dx/--dy is the
     pull written by initDraggableCards(). Both are composed here rather than
     overwriting transform, so neither can wipe the layout half of it. The pull
     lands before rotate() — a dragged card follows the pointer in screen space,
     not along its own tilted axis. */
  transform: translateX(-50%) translateX(calc(var(--phw) * var(--x)))
    translate(var(--dx, 0px), var(--dy, 0px)) rotate(var(--rot))
    translateY(var(--py, 0px));
  will-change: transform;
}
.fan__card--main {
  position: relative;
  left: auto;
  top: auto;
  z-index: 5;
  width: 100%;
  transform: translateY(var(--py, 0px));
}
/* --top keeps every side card's bottom edge above the centre card's: the four
   are absolutely positioned, so anything hanging lower would spill into the
   lead row underneath without adding any height of its own */
/* --hx/--hy/--hr is where the card leans when the fan opens on hover */
.fan__card--l1 { --w: 0.86; --x: -0.79; --rot: -6deg; --top: 13%; --hx: -5%; --hy: -12px; --hr: -1.6deg; z-index: 3; }
.fan__card--r1 { --w: 0.86; --x: 0.79; --rot: 6deg; --top: 13%; --hx: 5%; --hy: -12px; --hr: 1.6deg; z-index: 3; }
.fan__card--l2 { --w: 0.74; --x: -1.45; --rot: -11deg; --top: 22%; --hx: -9%; --hy: -7px; --hr: -2.6deg; z-index: 2; }
.fan__card--r2 { --w: 0.74; --x: 1.45; --rot: 11deg; --top: 22%; --hx: 9%; --hy: -7px; --hr: 2.6deg; z-index: 2; }

/* frameless cards — the screen itself is the card */
.fan__card--side {
  cursor: grab;
  /* pan-y, not none: a vertical swipe still scrolls the page, and the browser
     claiming that gesture fires pointercancel, which springs the card home */
  touch-action: pan-y;
  -webkit-user-select: none;
  user-select: none;
}
.fan__card--side.is-grabbed { cursor: grabbing; }
.fan__card--side .reel {
  aspect-ratio: 9 / 16;
  border-radius: clamp(16px, 2vw, 26px);
  border: var(--stroke);
  box-shadow: var(--hard);
}
/* nothing inside a side card is a target — only the card itself, for the drag */
.fan__card--side .reel > * { pointer-events: none; }

/* ---------- hover: touch one card, all five answer ----------
   The response rides on the inner element (.reel / .phone__frame), never on
   .fan__card itself — that transform belongs to the scroll parallax and the
   drag, and a transition there would smear both. Nothing here touches z-index:
   the fan opens, it does not reshuffle. */
@media (hover: hover) and (pointer: fine) {
  .fan__card--side .reel,
  .fan__card--main .phone__frame {
    transition: transform 0.55s var(--ease-out), box-shadow 0.55s var(--ease-out);
  }

  /* any card — the phone or any of the four — opens the whole fan */
  .fan:has(.fan__card:hover) .fan__card--side .reel {
    transform: translate(var(--hx), var(--hy)) rotate(var(--hr)) scale(1.03);
  }
  .fan:has(.fan__card:hover) .fan__card--main .phone__frame {
    transform: translateY(-12px) scale(1.015);
    box-shadow: 9px 9px 0 var(--primary);
  }

  /* the one actually under the pointer leans out further — these need the :has() prefix too, or the group pose above
     outranks them and the hovered card moves like all the others */
  .fan:has(.fan__card:hover) .fan__card--side:hover .reel {
    transform: translate(calc(var(--hx) * 1.7), calc(var(--hy) * 1.7)) rotate(calc(var(--hr) * 1.5)) scale(1.06);
  }
  .fan:has(.fan__card:hover) .fan__card--main:hover .phone__frame { transform: translateY(-20px) scale(1.03); }

  /* a card in hand answers to the pointer, not to the hover pose */
  .fan:has(.fan__card:hover) .fan__card--side.is-loose .reel,
  .fan__card--side.is-loose .reel { transform: none; }
}

/* a right-hand card is overlapped on its left edge — exactly where the username
   sits — and how much gets covered changes with every breakpoint. Anchoring the
   handle to the card's right edge instead keeps it on the visible half at any
   size, and mirrors the left-hand cards. */
.fan__card--r1 .reel__meta,
.fan__card--r2 .reel__meta {
  left: 17cqw;
  right: 4.4cqw;
  align-items: flex-end;
  text-align: right;
}

.phone__frame {
  position: relative;
  border-radius: clamp(30px, 3.6vw, 46px);
  background: var(--ink);
  padding: 9px;
  box-shadow: 7px 7px 0 var(--primary);
}
.phone__notch {
  position: absolute;
  top: 17px;
  left: 50%;
  transform: translateX(-50%);
  width: 32%;
  height: 21px;
  border-radius: 999px;
  background: #0F0C0B;
  z-index: 6;
}

/* reel screens. The gradient stands in until (or instead of) a real clip: a
   <video> with a missing source paints nothing, so .reel__bg shows through.
   Every overlay size below is in cqw, so one card's UI scales with its width —
   the same markup reads correctly at 170px and at 330px. */
.reel {
  position: relative;
  overflow: hidden;
  border-radius: clamp(22px, 2.8vw, 38px);
  aspect-ratio: 9 / 18.6;
  background: #151110;
  /* a reel is a video screen — its overlay text stays white on the cream page */
  color: #FFFFFF;
  container-type: inline-size;
}
.reel__bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  animation: reel-drift 20s ease-in-out infinite alternate;
}
@keyframes reel-drift {
  from { transform: scale(1.02); }
  to { transform: scale(1.14) translateY(-2%); }
}
.reel__vid {
  position: absolute;
  inset: 0;
  z-index: 1;
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: transparent;
}
.reel--v1 .reel__bg {
  background:
    radial-gradient(120% 85% at 72% 16%, rgba(255, 122, 69, 0.85) 0%, transparent 46%),
    radial-gradient(130% 110% at 12% 88%, rgba(179, 48, 15, 0.9) 0%, transparent 55%),
    conic-gradient(from 210deg at 55% 45%, #241511, #3A1B0F, #190F0B, #241511);
}
.reel--v2 .reel__bg {
  background:
    radial-gradient(100% 70% at 20% 12%, rgba(250, 70, 22, 0.5) 0%, transparent 50%),
    linear-gradient(200deg, #221713 0%, #120E0C 55%, #1D110B 100%);
}
.reel--v3 .reel__bg {
  background:
    radial-gradient(110% 80% at 80% 85%, rgba(255, 92, 43, 0.75) 0%, transparent 52%),
    linear-gradient(160deg, #191210 0%, #2A130A 70%, #120D0B 100%);
}
.reel--v4 .reel__bg {
  background:
    radial-gradient(130% 90% at 50% -10%, rgba(255, 106, 53, 0.9) 0%, transparent 55%),
    linear-gradient(180deg, #35180C 0%, #170F0C 75%);
}
.reel--v5 .reel__bg {
  background:
    radial-gradient(90% 60% at 80% 12%, rgba(247, 242, 237, 0.22) 0%, transparent 55%),
    radial-gradient(120% 90% at 15% 95%, rgba(250, 70, 22, 0.4) 0%, transparent 55%),
    linear-gradient(200deg, #1C1613 0%, #100D0C 100%);
}
.reel--v6 .reel__bg {
  background:
    conic-gradient(from 140deg at 30% 30%, #2B140C, #3F1E0E, #1A100C, #2B140C),
    #1a100c;
}
.reel__shade {
  position: absolute;
  inset: 0;
  z-index: 2;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.38) 0%, transparent 28%, transparent 52%, rgba(0, 0, 0, 0.78) 100%);
}

/* scrubber sits along the bottom, as in the app — and out of the notch's way */
.reel__progress {
  position: absolute;
  bottom: 2.6cqw;
  left: 4.2cqw;
  right: 4.2cqw;
  height: max(2px, 1cqw);
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.22);
  overflow: hidden;
  z-index: 4;
}
.reel__progress i {
  display: block;
  height: 100%;
  width: 100%;
  border-radius: 3px;
  background: #fff;
  transform: scaleX(0.55);
  transform-origin: left;
  animation: watch 9s ease-in-out infinite alternate;
}
@keyframes watch {
  from { transform: scaleX(0.55); }
  to { transform: scaleX(1); }
}
/* once a real clip is playing, JS drives the bar from timeupdate instead */
.reel.is-tracking .reel__progress i { animation: none; }

.reel__badge {
  position: absolute;
  top: 16cqw;
  left: 4.4cqw;
  z-index: 4;
  display: inline-flex;
  align-items: center;
  gap: 2.4cqw;
  padding: 2.4cqw 4cqw;
  border-radius: 999px;
  background: rgba(10, 8, 7, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.reel__badge svg { width: clamp(10px, 4.8cqw, 15px); height: clamp(10px, 4.8cqw, 15px); color: var(--primary-2); }
.reel__badge b {
  font-size: clamp(9px, 4.2cqw, 13px);
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.02em;
}

.reel__rail {
  position: absolute;
  right: 3.4cqw;
  bottom: 28cqw;
  z-index: 5;
  display: flex;
  flex-direction: column;
  gap: 5cqw;
}
.reel__act {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.4cqw;
  line-height: 1;
}
.reel__act svg { width: clamp(14px, 7.4cqw, 24px); height: clamp(14px, 7.4cqw, 24px); color: #fff; filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.5)); }
.reel__act b { font-size: clamp(8px, 3.4cqw, 12px); font-weight: 700; color: rgba(255, 255, 255, 0.9); }
.reel__rail--bare .reel__act svg { width: clamp(13px, 8cqw, 22px); height: clamp(13px, 8cqw, 22px); }

.reel__meta {
  position: absolute;
  left: 4.4cqw;
  right: 17cqw;
  bottom: 7cqw; /* clears the scrubber */
  z-index: 5;
  display: flex;
  flex-direction: column;
  gap: 2.4cqw;
}
.reel__user { display: flex; align-items: center; gap: 2.4cqw; font-size: clamp(9px, 4.3cqw, 14px); font-weight: 700; line-height: 1.2; }
.reel__ava {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: clamp(15px, 7.4cqw, 24px);
  height: clamp(15px, 7.4cqw, 24px);
  border-radius: 50%;
  background: linear-gradient(160deg, var(--primary-2), var(--primary));
  color: var(--on-primary);
  font-size: clamp(8px, 3.6cqw, 12px);
  font-weight: 800;
  font-style: normal;
  flex: 0 0 auto;
}
.reel__cap {
  font-size: clamp(9px, 4.1cqw, 13px);
  color: rgba(255, 255, 255, 0.88);
  line-height: 1.4;
}
.reel__music { display: flex; align-items: center; gap: 2cqw; overflow: hidden; }
.reel__music svg { width: clamp(8px, 3.6cqw, 12px); height: clamp(8px, 3.6cqw, 12px); color: rgba(255, 255, 255, 0.75); flex: 0 0 auto; }
.reel__music em { font-size: clamp(8px, 3.5cqw, 12px); color: rgba(255, 255, 255, 0.72); white-space: nowrap; }

/* ---------- the one live reel: tap, like, unmute ---------- */
/* full-screen play/pause target. Sits under the rail so the heart keeps its
   own hit area, and over the video so a tap anywhere else lands here. */
.reel__tap {
  position: absolute;
  inset: 0;
  z-index: 3;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.reel__tap:focus-visible { outline-offset: -4px; }

.reel__state {
  position: absolute;
  inset: 0;
  z-index: 4;
  display: grid;
  place-items: center;
  pointer-events: none;
  opacity: 0;
  transform: scale(1.25);
  transition: opacity 0.28s var(--ease-out), transform 0.28s var(--ease-out);
}
.reel__state svg {
  width: 17cqw;
  height: 17cqw;
  color: rgba(255, 255, 255, 0.94);
  filter: drop-shadow(0 6px 20px rgba(0, 0, 0, 0.6));
}
.reel__state-pause { display: none; }
/* paused: the play glyph stays put. Playing: a pause glyph blinks once. */
.reel.is-paused .reel__state { opacity: 1; transform: scale(1); }
.reel.is-flashing .reel__state { animation: reel-flash 0.62s var(--ease-out) forwards; }
.reel.is-flashing .reel__state-play { display: none; }
.reel.is-flashing .reel__state-pause { display: block; }
@keyframes reel-flash {
  0% { opacity: 0; transform: scale(0.7); }
  22% { opacity: 1; transform: scale(1); }
  100% { opacity: 0; transform: scale(1.35); }
}

.reel__burst {
  position: absolute;
  inset: 0;
  z-index: 7;
  display: grid;
  place-items: center;
  pointer-events: none;
  opacity: 0;
}
.reel__burst svg {
  width: 34cqw;
  height: 34cqw;
  color: #fff;
  filter: drop-shadow(0 8px 26px rgba(0, 0, 0, 0.55));
}
.reel.is-bursting .reel__burst { animation: reel-burst 0.95s var(--ease-out) forwards; }
@keyframes reel-burst {
  0% { opacity: 0; transform: scale(0.35) rotate(-14deg); }
  18% { opacity: 1; transform: scale(1.12) rotate(6deg); }
  34% { transform: scale(0.94) rotate(-2deg); }
  46% { transform: scale(1) rotate(0deg); }
  74% { opacity: 1; }
  100% { opacity: 0; transform: scale(1.06) translateY(-9%); }
}

.reel__sound {
  position: absolute;
  top: 4cqw;
  right: 4cqw;
  z-index: 6;
  display: grid;
  place-items: center;
  width: 11cqw;
  height: 11cqw;
  min-width: 26px;
  min-height: 26px;
  border-radius: 50%;
  background: rgba(10, 8, 7, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: background 0.2s, transform 0.2s var(--ease-out);
}
.reel__sound:hover { background: rgba(10, 8, 7, 0.78); transform: scale(1.07); }
.reel__sound svg { grid-area: 1 / 1; width: clamp(12px, 5.4cqw, 18px); height: clamp(12px, 5.4cqw, 18px); color: #fff; }
.reel.is-muted .reel__sndic--on,
.reel:not(.is-muted) .reel__sndic--off { display: none; }

.reel__act--btn { cursor: pointer; transition: transform 0.18s var(--ease-out); }
.reel__act--btn:hover { transform: scale(1.1); }
.reel__act--btn:active { transform: scale(0.94); }
.reel__hearts { position: relative; display: grid; place-items: center; }
.reel__heart { grid-area: 1 / 1; transition: opacity 0.18s, transform 0.24s var(--ease-out); }
.reel__heart--f { opacity: 0; transform: scale(0.4); color: #FF3040; }
.reel.is-liked .reel__heart--f { opacity: 1; transform: scale(1); color: #FF3040; }
.reel.is-liked .reel__heart--o { opacity: 0; }
.reel.is-liked .js-reellike b { color: #fff; }
.reel__act--btn.is-popping .reel__hearts { animation: heart-pop 0.42s var(--ease-out); }
@keyframes heart-pop {
  0% { transform: scale(1); }
  40% { transform: scale(1.32); }
  70% { transform: scale(0.92); }
  100% { transform: scale(1); }
}

/* a paused reel freezes its stand-in animations too, so the state reads as
   paused even before any real clip is dropped in */
.reel.is-paused .reel__bg,
.reel.is-paused .reel__progress i { animation-play-state: paused; }

/* ---------- hero flow diagram ---------- */
/* the band between the fan and the video. It owns the whole gap: the node
   hangs at its bottom edge, and drawFlow() fills the rest with the curves. */
.hero__flow {
  grid-area: flow;
  position: relative;
  width: 100%;
  height: 320px;
  display: grid;
  place-items: end center;
  padding-bottom: 30px;
}

.flow__lines {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}
.flow__lines path {
  fill: none;
  stroke: url(#flowfade);
  stroke-width: 2;
  stroke-linecap: round;
}
/* stop-color has to come from CSS, not a presentation attribute — var() is
   not resolved inside SVG attributes */
.flow__lines .flow__stop { stop-color: var(--ink); }
/* the travelling dashes ride a duplicate of each curve, so the line underneath
   stays solid and continuous */
.flow__lines .flow__pulse {
  stroke: var(--primary-2);
  stroke-width: 3;
  /* a long gap — dense dashes turn the curve into a dotted line and lose the
     shape; a few widely spaced sparks read as travel along a solid one */
  stroke-dasharray: 4 62;
  /* the boost animation idles paused and is additive — switching it on when
     the node is hovered speeds the sparks up without the position jump that
     changing animation-duration mid-flight would cause */
  animation: flowPulse 2.4s linear infinite, flowPulseBoost 0.8s linear infinite;
  animation-composition: replace, add;
  animation-play-state: running, paused;
}
/* dashes run against the drawn direction — the curves are authored fan-inward,
   while the product flows video → platform → Reels */
@keyframes flowPulse { to { stroke-dashoffset: 66; } }
@keyframes flowPulseBoost { to { stroke-dashoffset: 66; } }

/* a junction the lines pass through, not a label — the nav already carries the
   wordmark, so the mark alone is enough to say whose platform this is */
.flow__node {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 96px;
  height: 96px;
  border-radius: 50%;
  border: var(--stroke);
  background: var(--primary);
  box-shadow: var(--hard);
}
.flow__mark {
  width: 46px;
  height: 46px;
  color: var(--on-primary);
  transform: rotate(-8deg);
  /* same paused-additive trick as .flow__pulse: the boost rotation composes
     on top of the base spin, so hover speeds it up from wherever it is and
     un-hover freezes the extra rotation instead of snapping back */
  animation: nodeSpin 9s linear infinite, nodeSpinBoost 1.6s linear infinite;
  animation-composition: replace, add;
  animation-play-state: running, paused;
}
@keyframes nodeSpin { to { transform: rotate(352deg); } }
@keyframes nodeSpinBoost { to { transform: rotate(360deg); } }

/* hover the logo → the mark spins faster and the sparks race. The pulses live
   in a sibling that precedes the node in the DOM, so :has() does the reaching */
.flow__node:hover .flow__mark { animation-play-state: running, running; }
.hero__flow:has(.flow__node:hover) .flow__pulse { animation-play-state: running, running; }

@media (prefers-reduced-motion: reduce) {
  .flow__lines .flow__pulse, .flow__mark { animation: none; }
}

/* ---------- hero source video ---------- */
.hero__video {
  grid-area: video;
  justify-self: center;
  width: 100%;
  max-width: 780px;
}

/* the 16:9 box is the wrapper's job, not the child's — the poster button and
   the iframe that replaces it are both absolutely filled into it, so the swap
   on play cannot shift the page */
.ytframe {
  position: relative;
  aspect-ratio: 16 / 9;
  border-radius: var(--r-card);
  overflow: hidden;
  background: var(--ink);
  border: var(--stroke);
  box-shadow: var(--hard);
  transition: box-shadow 0.2s;
}
.ytframe:hover { box-shadow: 7px 7px 0 var(--primary); }

.ytframe__btn, .ytframe__player { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.ytframe__btn { display: block; cursor: pointer; }

.ytframe__poster {
  width: 100%;
  height: 100%;
  object-fit: cover;
  /* YouTube posters run brighter than the page — knock them back so the play
     button and the headline above stay the loudest things in the hero */
  filter: brightness(0.82) saturate(0.95);
  transition: filter 0.4s var(--ease-out), transform 0.6s var(--ease-out);
}
.ytframe__btn:hover .ytframe__poster { filter: brightness(0.95) saturate(1); transform: scale(1.02); }

.ytframe__play {
  position: absolute;
  top: 50%;
  left: 50%;
  translate: -50% -50%;
  display: grid;
  place-items: center;
  width: clamp(58px, 7vw, 76px);
  height: clamp(40px, 4.9vw, 53px);
  border-radius: 14px;
  border: var(--stroke);
  background: var(--primary);
  box-shadow: var(--hard-s);
  transition: transform 0.35s var(--ease-out), background 0.35s;
}
/* square box — the symbol is 24×24, and a non-square one would letterbox the
   triangle off the button's optical centre */
.ytframe__play svg { width: clamp(20px, 2.4vw, 26px); height: clamp(20px, 2.4vw, 26px); color: var(--on-primary); }
.ytframe__btn:hover .ytframe__play { transform: scale(1.09); background: var(--primary-2); }
.ytframe__btn:focus-visible { outline: 2px solid var(--primary-2); outline-offset: 3px; }

/* ============================================================
   MARQUEE
   ============================================================ */
.marquee {
  overflow: clip;
  border-top: var(--stroke);
  border-bottom: var(--stroke);
  padding: 17px 0;
  background: var(--ink);
  color: var(--bg);
}
.marquee__track {
  display: inline-flex;
  align-items: center;
  gap: 44px;
  white-space: nowrap;
  animation: marq 30s linear infinite;
}
.marquee__track > span {
  font-family: var(--font-d);
  font-weight: 800;
  font-size: clamp(0.95rem, 1.8vw, 1.35rem);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.marquee__track > span:nth-child(4n + 3) {
  color: var(--primary);
  -webkit-text-stroke: 0;
}
.marquee__track > i { color: var(--primary); font-style: normal; font-size: 1.1rem; }
@keyframes marq {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

/* ============================================================
   SECTIONS — shared
   ============================================================ */
.section { padding: clamp(84px, 12vh, 150px) 0; position: relative; }

.section__head { max-width: 720px; margin-bottom: clamp(40px, 6vh, 64px); }
.section__head .eyebrow { margin-bottom: 18px; }
.section__title {
  font-family: var(--font-d);
  font-weight: 800;
  font-size: clamp(1.7rem, 3.6vw, 2.9rem);
  line-height: 1.12;
  letter-spacing: -0.005em;
  text-wrap: balance;
}
.section__sub { margin-top: 16px; color: var(--muted); font-size: 1.02rem; max-width: 560px; }
.section__head--row {
  max-width: none;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
}

/* ============================================================
   HOW IT WORKS
   ============================================================ */
/* Sticky sticker pile: the headline holds the left column while
   the step cards scroll and pin on the right, each card slapping
   down onto the previous one — ending on the orange payoff card.
   Each card tilts a touch like a hand-slapped sticker, the number
   is a rotated badge hanging off the corner, icons sit in tinted
   squircles. Pure CSS: position: sticky, no scroll listeners. */
.how__grid {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: clamp(36px, 6vw, 90px);
  align-items: start;
}
.how__head {
  position: sticky;
  top: calc(var(--nav-h) + clamp(40px, 12vh, 120px));
  margin-bottom: 0;
}
.steps { padding-bottom: 4vh; counter-reset: step; }
.step {
  --tilt: -1.6deg;
  position: sticky;
  top: calc(var(--nav-h) + 24px + var(--i) * 30px);
  width: min(560px, 100%);
  margin: 0 0 16vh;
  padding: 30px 32px 34px;
  border-radius: var(--r-card);
  background: var(--surface);
  border: var(--stroke);
  box-shadow: var(--hard);
  transform: rotate(var(--tilt));
  transition: transform 0.35s var(--ease-out), border-color 0.35s, box-shadow 0.35s;
}
.step:nth-child(2n) { --tilt: 1.4deg; }
.step:nth-child(1) { --i: 0; }
.step:nth-child(2) { --i: 1; }
.step:nth-child(3) { --i: 2; }
.step:nth-child(4) { --i: 3; }
.step:last-child { margin-bottom: 0; }
.step:hover {
  transform: rotate(0deg) translateY(-6px);
  box-shadow: 9px 9px 0 var(--ink);
}
.step__num {
  position: absolute;
  top: -12px;
  right: 12px;
  padding: 5px 11px;
  border-radius: 12px;
  font-family: var(--font-d);
  font-weight: 800;
  font-size: 1rem;
  line-height: 1;
  color: var(--ink);
  background: var(--lime);
  border: var(--stroke);
  box-shadow: var(--hard-s);
  transform: rotate(6deg);
}
.step__icon {
  width: 56px;
  height: 56px;
  padding: 15px;
  margin-bottom: 26px;
  border-radius: 16px;
  border: var(--stroke);
  background: var(--bg);
  color: var(--ink);
  box-shadow: var(--hard-s);
}
/* the payoff card goes loud */
.step:last-child {
  background: var(--primary);
  color: var(--on-primary);
}
.step:last-child p { color: var(--ink); }
.step:last-child .step__icon { background: var(--surface); }
.step:last-child .step__num { background: var(--surface); }
.step h3 {
  font-family: var(--font-d);
  font-weight: 700;
  font-size: 1.15rem;
  line-height: 1.35;
  margin-bottom: 10px;
}
.step p { color: var(--muted); font-size: 0.98rem; line-height: 1.65; max-width: 46ch; }

/* ============================================================
   WHY — ember rail
   Glass cards on a full-bleed horizontal snap rail. Like the clips
   showcase, the track lives outside .container and runs edge to
   edge; scroll-padding aligns the first card with the container.
   The .js-drag class wires it to initDrag in script.js.
   ============================================================ */
.why {
  overflow: clip;
  /* the one lime band on the page — «Jasur» sections are separated by a
     colour block and an ink rule, not by a fading glow */
  background: var(--lime);
  border-block: var(--stroke);
}
.bento {
  counter-reset: whyc;
  display: flex;
  gap: 18px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  /* snapport must start where the padding ends, or the first card snaps flush to the edge */
  scroll-padding-inline: max(24px, calc((100vw - var(--container)) / 2 + 24px));
  padding: 10px max(24px, calc((100vw - var(--container)) / 2 + 24px)) 26px;
  cursor: grab;
  scrollbar-width: none;
}
.bento::-webkit-scrollbar { display: none; }
.bento.is-drag { cursor: grabbing; scroll-snap-type: none; }
.bcard {
  counter-increment: whyc;
  position: relative;
  flex: 0 0 min(440px, 84vw);
  scroll-snap-align: start;
  display: flex;
  flex-direction: column;
  min-height: 330px;
  border-radius: var(--r-card);
  padding: 30px 28px;
  background: var(--surface);
  border: var(--stroke);
  box-shadow: var(--hard);
  transition: transform 0.25s var(--ease-out), box-shadow 0.25s var(--ease-out);
}
.bcard:hover {
  transform: translateY(-5px);
  box-shadow: 9px 9px 0 var(--ink);
}
.bcard--viz { flex-basis: min(560px, 88vw); }
.bcard__icon {
  width: 48px;
  height: 48px;
  padding: 11px;
  margin-bottom: 20px;
  border-radius: 14px;
  color: var(--ink);
  background: var(--primary);
  border: var(--stroke);
  box-shadow: var(--hard-s);
}
.bcard h3 {
  font-family: var(--font-d);
  font-weight: 700;
  font-size: 1.08rem;
  line-height: 1.35;
  margin-bottom: 10px;
}
.bcard h3::before {
  content: counter(whyc, decimal-leading-zero) ' / 05';
  display: block;
  margin-bottom: 12px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.3em;
  color: var(--muted);
}
.bcard p { color: var(--muted); font-size: 0.95rem; max-width: 44ch; }
/* the stat card anchors its big ink digits to the bottom edge;
   the "h" keeps its own fire colour */
.bcard--stat .bcard__big {
  display: block;
  order: 3;
  margin-top: auto;
  padding-top: 18px;
  font-family: var(--font-d);
  font-weight: 800;
  font-size: clamp(3rem, 5vw, 4.4rem);
  line-height: 1;
  color: var(--ink);
}
.bcard--stat .bcard__big i { color: var(--primary); font-style: normal; font-size: 0.55em; }

/* mini bar viz */
.viz { margin-top: 26px; display: flex; flex-direction: column; gap: 14px; }
.viz__row { display: grid; grid-template-columns: minmax(96px, 150px) 1fr; align-items: center; gap: 14px; }
.viz__label { font-size: 0.82rem; font-weight: 700; color: var(--muted); }
.viz__label--hot { color: var(--ink); }
.viz__bar {
  position: relative;
  height: 34px;
  border-radius: 10px;
  border: var(--stroke);
  background: var(--bg);
  display: flex;
  align-items: center;
  overflow: hidden;
}
.viz__bar i {
  position: absolute;
  inset: 0;
  width: var(--w);
  border-radius: 0;
  border-right: var(--stroke);
  background: var(--line);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 1s var(--ease-out) 0.25s;
}
.viz__bar--hot i { background: var(--primary); }
.is-in .viz__bar i { transform: scaleX(1); }
.viz__bar b {
  position: relative;
  z-index: 1;
  margin-left: auto;
  padding-right: 12px;
  font-size: 0.85rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}
.viz__note { font-size: 0.76rem; color: var(--muted); }
/* sheen sweeping across the hot bar */
.viz__bar--hot i { overflow: hidden; }
.viz__bar--hot i::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(105deg, transparent 32%, rgba(255, 255, 255, 0.45) 50%, transparent 68%);
  transform: translateX(-100%);
  animation: ember-sheen 3s var(--ease-out) 1.4s infinite;
}
@keyframes ember-sheen {
  45%, 100% { transform: translateX(100%); }
}

/* ============================================================
   CLIPS — horizontal showcase
   ============================================================ */
.clips { overflow: clip; }
.clips__track {
  display: flex;
  gap: 20px;
  overflow-x: auto;
  /* proximity, not mandatory: mandatory re-snaps after every scroll event, so a
     vertical page scroll over the rail — or letting go of a drag — gets held
     while the browser animates the rail back to a card */
  scroll-snap-type: x proximity;
  /* a horizontal fling stops at the ends instead of chaining to the page or the
     browser's back gesture */
  overscroll-behavior-x: contain;
  /* the pointer owns the horizontal axis, the page keeps the vertical one */
  touch-action: pan-x pan-y;
  /* snapport must start where the padding ends, or the first card snaps flush to the edge */
  scroll-padding-inline: max(24px, calc((100vw - var(--container)) / 2 + 24px));
  cursor: grab;
  padding: 8px max(24px, calc((100vw - var(--container)) / 2 + 24px)) 20px;
  scrollbar-width: none;
}
.clips__track::-webkit-scrollbar { display: none; }
.clips__track.is-drag { scroll-snap-type: none; cursor: grabbing; }
.clipcard {
  flex: 0 0 clamp(198px, 21vw, 252px);
  scroll-snap-align: start;
}
.phone--card { width: 100%; }
.phone--card .phone__frame { padding: 7px; border-radius: 30px; box-shadow: var(--hard); }
.phone--card .reel { border-radius: 24px; }
.clipcard__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 13px;
  padding-inline: 4px;
}
.clipcard__tag {
  font-size: 0.74rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink);
  background: var(--surface);
  border: var(--stroke);
  border-radius: 8px;
  padding: 3px 9px;
  transform: rotate(-2deg);
}
.clipcard__views {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-d);
  font-weight: 800;
  font-size: 0.88rem;
}
.clipcard__views svg { width: 15px; height: 15px; color: var(--primary); }

/* ============================================================
   FAQ
   ============================================================ */
.qa {
  margin-bottom: 12px;
  border: var(--stroke);
  border-radius: 16px;
  background: var(--surface);
  box-shadow: var(--hard-s);
}
.qa[open] { box-shadow: var(--hard); }
.qa summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  padding: 18px 20px;
  cursor: pointer;
  font-family: var(--font-d);
  font-weight: 700;
  font-size: 1rem;
  line-height: 1.4;
  list-style: none;
  transition: color 0.2s;
}
.qa summary::-webkit-details-marker { display: none; }
.qa summary:hover { color: var(--primary); }
.qa__ic {
  flex: 0 0 auto;
  width: 19px;
  height: 19px;
  color: var(--muted);
  transition: transform 0.35s var(--ease-out), color 0.2s;
}
.qa[open] .qa__ic { transform: rotate(45deg); color: var(--ink); }
.qa__body { overflow: hidden; }
.qa__body p { color: var(--muted); font-size: 0.97rem; padding: 0 20px 20px; max-width: 640px; }

/* ============================================================
   FINAL CTA
   ============================================================ */
.last {
  overflow: clip;
  text-align: center;
  /* the closing call is a fire block — the page ends on its loudest colour */
  background: var(--primary);
  border-top: var(--stroke);
}
.last__inner { position: relative; }
.last__title {
  font-family: var(--font-d);
  font-weight: 800;
  /* the two lines are full sentences now, not two words — sized so each one
     holds on a single line on desktop, and wraps cleanly when it can't */
  font-size: clamp(1.9rem, 5.6vw, 4.4rem);
  line-height: 1.04;
  text-transform: uppercase;
  letter-spacing: -0.01em;
  text-wrap: balance;
}
html[data-lang='uz'] .last__title { font-size: clamp(1.8rem, 5.2vw, 4rem); }
html[data-lang='ru'] .last__title { font-size: clamp(1.6rem, 4.4vw, 3.4rem); }
.last__hot {
  display: inline-block;
  margin-top: 0.12em;
  padding: 0.04em 0.28em 0.08em;
  border: var(--stroke);
  border-radius: 0.3em;
  background: var(--bg);
  color: var(--ink);
  box-shadow: 0.08em 0.08em 0 var(--ink);
  transform: rotate(-1.5deg);
}
.last__note { color: var(--ink); max-width: 480px; margin: 24px auto 38px; }

/* ============================================================
   FOOTER
   ============================================================ */
.footer { border-top: var(--stroke); background: var(--ink); color: var(--bg); padding: 52px 0 26px; }
.footer__grid {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 36px;
}
.footer__brand p { color: var(--on-ink-muted); font-size: 0.92rem; max-width: 320px; margin-top: 14px; }
.footer__nav { display: flex; flex-direction: column; gap: 11px; }
.footer__nav a { color: var(--on-ink-muted); font-size: 0.93rem; font-weight: 600; transition: color 0.2s; }
.footer__nav a:hover { color: var(--primary); }
.footer__base {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 40px;
  padding-top: 24px;
  border-top: 1px solid rgba(255, 243, 230, 0.2);
  color: var(--on-ink-muted);
  font-size: 0.82rem;
}

/* ============================================================
   REVEAL
   `translate` (not `transform`) so it never fights hover lifts
   ============================================================ */
.reveal {
  opacity: 0;
  translate: 0 26px;
  transition: opacity 0.7s ease var(--rd, 0ms), translate 0.7s var(--ease-out) var(--rd, 0ms);
}
.reveal.is-in { opacity: 1; translate: 0 0; }

/* soft cross-fade when switching languages */
#main { transition: opacity 0.2s ease; }
body.lang-fade #main { opacity: 0.35; }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1020px) {
  /* Til tanlagich sarlavhada qoladi: burger ortiga yashirilsa odam uni
     umuman topmaydi, holbuki sahifa uch tilda. */
  .nav__links, .nav__cta { display: none; }
  .nav__burger { display: block; }

  .hero__inner {
    grid-template-columns: 1fr;
    grid-template-areas:
      'eyebrow'
      'title'
      'visual'
      'flow'
      'video';
    justify-items: center;
    text-align: center;
  }
  .hero__title { margin-bottom: -0.06em; }
  /* stacked here, so the video's own top margin owns the gap */
  .hero__visual { --phw: clamp(210px, 28vw, 280px); width: var(--phw); margin-bottom: 0; }
  .hero__flow { height: 210px; padding-bottom: 22px; }
  .flow__node { width: 74px; height: 74px; }
  .flow__mark { width: 35px; height: 35px; }
  /* the outer pair hangs past the screen edge here, and a handle sliced in half
     by the viewport reads as a bug rather than as depth */
  .fan__card--l2 .reel__meta,
  .fan__card--r2 .reel__meta { display: none; }

  /* One column: the headline pins to the top of the screen and the pile stacks
     under it, mid-viewport, instead of jamming against the nav. A block (not a
     grid row) is what lets the sticky head hold — its containing block has to
     span the steps, and a grid item's does not. flow-root rather than block so
     no child margin can collapse out and move the very edge the sticky bounds
     are measured from. */
  .how__grid {
    display: flow-root;
    /* 72px = the first card's 12px gap under the header + the 3 × 20px cascade
       down to the last one; --how-last-h is that last card, from script.js.
       Declared here because both .how__head and .steps read it. */
    --how-tail: calc(72px + var(--how-last-h, 320px));
  }
  /* A sticky box is released when its container's bottom catches its own bottom,
     so of two boxes in one container the taller one lets go first. That is the
     whole overlap: the pile sits a card lower than the header, releases that
     much earlier, and rides up through the headline while the header holds.
     The fix is to make the header exactly that much taller — an invisible tail
     under the text — so both let go on the same pixel and leave as one block.
     .how__head__in is the part that is actually seen and measured; the tail is
     ::after, and .steps pulls back up over it so the layout is unchanged. */
  .how__head {
    position: sticky;
    top: var(--nav-h);
    z-index: 5;
    margin: 0;
    /* the tail covers the cards; only the visible half may take the pointer */
    pointer-events: none;
  }
  .how__head::after { content: ''; display: block; height: var(--how-tail); }
  .how__head__in {
    position: relative;
    padding: 16px 0 20px;
    pointer-events: auto;
  }
  /* cards pass behind the headline, never across it: an opaque backdrop, full
     bleed because a card's shadow is wider than the container, feathered over
     the last few px so a card dissolves instead of being cut by a hard edge */
  .how__head__in::before {
    content: '';
    position: absolute;
    inset: -1px calc(50% - 50vw) 0;
    z-index: -1;
    background: linear-gradient(180deg, var(--bg) 0 calc(100% - 16px), transparent 100%);
  }
  .step {
    margin-inline: auto;
    /* --how-head-h is the visible header, measured in script.js; the fallback
       covers the first frame and any browser without ResizeObserver */
    top: calc(var(--nav-h) + var(--how-head-h, 168px) + 12px + var(--i) * 20px);
  }
  /* climbs back over the header's tail — without this the pile would start a
     whole card-height further down the page. No padding-bottom: the cards' own
     release point is measured off this box's bottom edge. */
  .steps {
    margin-top: calc(16px - var(--how-tail));
    padding-bottom: 0;
  }
}

@media (max-width: 640px) {
  .hero { padding-top: 48px; }
  /* the outer pair is allowed to bleed off both edges — body is overflow-x: clip */
  .hero__visual { --phw: clamp(170px, 42vw, 240px); }
  .fan__card--l1, .fan__card--r1 { --w: 0.8; --top: 10%; }
  .fan__card--l1 { --x: -0.6; }
  .fan__card--r1 { --x: 0.6; }
  .fan__card--l2, .fan__card--r2 { --w: 0.66; --top: 18%; }
  .fan__card--l2 { --x: -1.08; }
  .fan__card--r2 { --x: 1.08; }
  .step { padding: 26px 22px 30px; }
  /* narrower than the screen so the next card's edge stays visible — that slice
     is the only cue that the rail scrolls sideways */
  .bcard { flex-basis: 76vw; padding: 26px 22px; }
  .bcard--viz { flex-basis: 82vw; }
  .section__head--row { flex-direction: column; align-items: flex-start; }
  .footer__grid { flex-direction: column; }
  .footer__base { flex-direction: column; align-items: flex-start; gap: 6px; }
}

/* ============================================================
   REDUCED MOTION
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    transition-delay: 0ms !important;
  }
  .reveal, body:not(.is-loaded) .hero__word, body:not(.is-loaded) .hero__visual {
    opacity: 1;
    transform: none;
    translate: none;
  }
  .viz__bar i { transform: scaleX(1); }
  .marquee__track { animation: none; }
}

