/* ==========================================================================
   CORVISE® — Digital Architecture
   Layout is authored against the 1440px Figma frame: 1 design px = var(--u).
   ========================================================================== */

/* Euclid Circular A — self-hosted (assets/fonts) so phones and every browser get the real typeface.
   Make sure the font licence covers web use before going live. */
@font-face { font-family: "Euclid Circular A"; font-style: italic; font-weight: 400; font-display: swap;
  src: url("../assets/fonts/EuclidCircularA-Italic.woff2?v=e0d0510bcd") format("woff2"); }
@font-face { font-family: "Euclid Circular A"; font-style: italic; font-weight: 500; font-display: swap;
  src: url("../assets/fonts/EuclidCircularA-MediumItalic.woff2?v=b654d42bf3") format("woff2"); }
@font-face { font-family: "Euclid Circular A"; font-style: italic; font-weight: 600; font-display: swap;
  src: url("../assets/fonts/EuclidCircularA-SemiBoldItalic.woff2?v=84be66bacc") format("woff2"); }

:root {
  --u: calc(100vw / 1440);
  --black: #000;
  --white: #fff;
  --line: #272727;
  --grey: #bababa;
  --muted: #3b3b3b;
  --font: "Euclid Circular A", "Plus Jakarta Sans", "Helvetica Neue", Arial, sans-serif;
  --ease: cubic-bezier(.22, 1, .36, 1);
  --ease-io: cubic-bezier(.65, 0, .35, 1);
  --pad: calc(var(--u) * 165);
  color-scheme: dark;
}
@media (min-width: 1920px) { :root { --u: calc(1920px / 1440); } }

*, *::before, *::after { box-sizing: border-box; }
html {
  -webkit-text-size-adjust: 100%; scroll-behavior: smooth;
  /* Layout is sized in vw; a classic scrollbar would make the page a few px wider than the window
     (side scroll) and the page would jump sideways whenever an overlay locks scrolling. Hide it. */
  scrollbar-width: none; overflow-x: clip;
}
html::-webkit-scrollbar, .overlay::-webkit-scrollbar { display: none; }
.overlay { scrollbar-width: none; }
body {
  margin: 0;
  background: var(--black);
  color: var(--white);
  font-family: var(--font);
  font-style: italic;
  font-weight: 400;
  letter-spacing: -0.04em;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}
body.is-locked { overflow: hidden; }
h1, h2, h3, p { margin: 0; font-weight: inherit; }
button { font: inherit; color: inherit; letter-spacing: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
a { color: inherit; text-decoration: none; }
svg { fill: currentColor; }
ul, ol { list-style: none; margin: 0; padding: 0; }
img { display: block; }

.m-br { display: none; }
.svg-sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link { position: fixed; left: 16px; top: -60px; z-index: 200; background: #fff; color: #000; padding: 10px 16px; border-radius: 50px; }
.skip-link:focus { top: 16px; }
:focus-visible { outline: 2px solid #fff; outline-offset: 3px; }
.caps :focus-visible { outline-color: #000; }
.step :focus-visible { outline-color: #fff; }

.micro, .eyebrow {
  font-size: max(11px, calc(var(--u) * 13));
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: -0.04em;
  color: var(--grey);
}
.eyebrow { color: #6b6b6b; }

/* ---------- Pills & CTA ---------- */
.pill {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  height: max(36px, calc(var(--u) * 40));
  padding: 0 max(16px, calc(var(--u) * 20));
  border-radius: 50px;
  font-size: max(11px, calc(var(--u) * 12));
  text-transform: uppercase;
  white-space: nowrap;
  transition: background .4s var(--ease), color .4s var(--ease), border-color .4s var(--ease), transform .4s var(--ease);
}
.pill--ghost { background: var(--black); border: 1px solid var(--line); color: var(--white); }
.pill--ghost:hover { border-color: #fff; }
.pill--solid { background: var(--white); color: var(--black); font-weight: 500; }
.pill--dark { background: #000; color: #fff; border: 1px solid #000; }
.pill--dark:hover { background: #222; }
.pill--light { background: #fff; color: #000; border: 1px solid #eee; }
.pill--light:hover { border-color: #000; }

/* Language switch: EN · RU */
.lang { gap: 10px; }
.lang button { color: currentColor; opacity: .3; text-transform: uppercase; transition: opacity .3s; }
.lang button[aria-pressed="true"], .lang button:hover { opacity: 1; }
.lang-dot { width: 3.3px; height: 3.3px; border-radius: 50%; background: currentColor; opacity: .3; }

.cta { gap: 0; height: auto; font-size: max(12px, calc(var(--u) * 14)); padding: max(11px, calc(var(--u) * 13)) max(22px, calc(var(--u) * 27)); overflow: hidden; }
.cta__arrow { display: inline-block; width: 0; opacity: 0; transform: translateX(-12px); transition: width .45s var(--ease), padding .45s var(--ease), opacity .45s var(--ease), transform .45s var(--ease); }
.cta:hover .cta__arrow, .cta:focus-visible .cta__arrow { width: 1.4em; padding-left: .4em; opacity: 1; transform: none; }
.cta:hover { transform: scale(1.03); }
.cta:active { transform: scale(.97); }
.cta:disabled { opacity: .55; cursor: progress; transform: none; }
.cta--big { height: auto; font-size: max(14px, calc(var(--u) * 18)); padding: max(16px, calc(var(--u) * 22)) max(30px, calc(var(--u) * 44)); }

/* ---------- Loading (the hero itself is the loading screen) ---------- */
body.is-loading { overflow: hidden; }
/* While loading the screen is black edge to edge: nothing below the hero exists yet. */
body.is-loading main > section:not(.hero) { visibility: hidden; }
.loader-pct {
  position: absolute; left: 50%; top: min(calc(var(--u) * 639), calc(100vh - 80px)); z-index: 4;
  font-size: max(13px, calc(var(--u) * 16)); letter-spacing: -0.04em; line-height: 1; text-transform: uppercase;
  font-variant-numeric: tabular-nums;
  translate: -50% 0;
  transition: opacity .6s var(--ease), transform .8s var(--ease);
}
body.is-ready .loader-pct { opacity: 0; transform: translateY(24px); pointer-events: none; }
body.is-loading .flyer, body:not(.flyer-on) .flyer { visibility: hidden; }

/* ---------- Logo ----------
   The crow glyph is drawn by the flyer, which sits exactly on it. While the crow is away,
   the logo closes up into "CORVISE" (Figma spacing) with a plain "I" so it never looks broken. */
.logo-glyph { opacity: 0; }
body:not(.flyer-on) .hero__logo .logo-glyph, body.no-flyer .hero__logo .logo-glyph { opacity: 1; }
.logo-l, .logo-r, .logo-i { transition: transform .6s var(--ease), opacity .35s ease; }
.logo-l { transform: translateX(4.53px); }
.logo-r { transform: translateX(-4.53px); }
.logo-i { transform-box: fill-box; transform-origin: 50% 100%; transition-delay: .12s; }
.logo.is-crow-home .logo-l, .logo.is-crow-home .logo-r,
body:not(.flyer-on) .hero__logo .logo-l, body:not(.flyer-on) .hero__logo .logo-r { transform: none; }
.logo.is-crow-home .logo-i,
body:not(.flyer-on) .hero__logo .logo-i { transform: scaleY(0); opacity: 0; transition-delay: 0s; }

/* ==========================================================================
   01 / HERO
   ========================================================================== */
.hero {
  position: relative;
  height: max(600px, 100vh, calc(var(--u) * 861)); /* the loader always fills the screen */
  overflow: hidden;
  background: #000;
}
.hero__grid { position: absolute; left: calc(var(--u) * 2); top: 0; width: calc(var(--u) * 1438.5); height: auto; pointer-events: none; overflow: visible; }
/* Lines are drawn by JS as loading progresses (stroke-dashoffset 1 → 0). */
.hero__grid .draw { stroke-dasharray: 1; stroke-dashoffset: 1; }
/* Dashed half-circles stay on their half; the dashes flow along the arc
   (one dash period = 16 units, so the loop is seamless). */
.hero__orbit { opacity: var(--orbit, 0); }
.hero__orbit path { animation: dash-flow 1.6s linear infinite; }
.hero__orbit--r path { animation-direction: reverse; }
@keyframes dash-flow { to { stroke-dashoffset: -16; } }
@keyframes strip { to { transform: translateX(-50%); } }

.hero__tag {
  position: absolute; left: var(--pad); top: calc(var(--u) * 85); width: calc(var(--u) * 220); min-width: 190px;
  font-size: max(13px, calc(var(--u) * 16)); text-transform: uppercase;
}
.hero__menu { position: absolute; left: calc(var(--u) * 39); top: calc(var(--u) * 305); z-index: 3; }
.hero__lang { position: absolute; right: calc(var(--u) * 26); top: calc(var(--u) * 305); z-index: 3; }

.hero__logo {
  position: absolute; left: calc(var(--u) * 664); top: calc(var(--u) * 318.2);
  width: calc(var(--u) * 120); z-index: 3; line-height: 0;
}
.hero__logo svg { width: 100%; height: auto; overflow: visible; }
.hero__crow-glyph { opacity: 1; }
body.flyer-on .hero__crow-glyph { opacity: 0; } /* the flyer sits exactly here */


.hero__crow {
  position: absolute; left: calc(var(--u) * 410); bottom: 0;
  width: calc(var(--u) * 620); aspect-ratio: 1100 / 898;
  opacity: 0; transform: translateY(40px);
  transition: opacity 1.6s var(--ease) .2s, transform 1.6s var(--ease) .2s;
}
body.is-ready .hero__crow { opacity: 1; transform: none; }
/* Nine head poses stacked; JS crossfades to the one facing the cursor. */
.hero__crow img {
  position: absolute; inset: 0; width: 100%; height: 100%;
  opacity: 0; transition: opacity .32s ease;
  translate: var(--px, 0) var(--py, 0);
}
.hero__crow img.is-on { opacity: 1; }

.hero__aside {
  position: absolute; left: calc(var(--u) * 1050); top: calc(var(--u) * 534); width: calc(var(--u) * 225); min-width: 200px;
  display: flex; flex-direction: column; align-items: flex-end; gap: calc(var(--u) * 27);
  text-align: right; font-size: max(12px, calc(var(--u) * 14)); z-index: 3;
}
.hero__scroll { position: absolute; left: 50%; bottom: 22px; width: 1px; height: 46px; background: var(--line); overflow: hidden; z-index: 3; }
.hero__scroll span { position: absolute; left: 0; top: -40%; width: 100%; height: 40%; background: #fff; animation: scrollcue 2.2s var(--ease-io) infinite; }
@keyframes scrollcue { to { top: 100%; } }

.intro { opacity: 0; transform: translateY(14px); transition: opacity 1s var(--ease), transform 1s var(--ease); }
body.is-ready .intro { opacity: 1; transform: none; }
body.is-ready .hero__aside { transition-delay: .5s; }
body.is-ready .hero__tag { transition-delay: .25s; }

/* Header hand-off between blocks: each block's menu / logo / language set drops in (--in)
   and later sinks away (--out) while the next block's set takes over. Values come from JS. */
.hero__menu, .hero__logo, .hero__lang, .caps__head > *, .result__head > *, .why__head > *, .final__menu, .final__lang {
  translate: 0 calc((1 - var(--in, 1)) * -28px + var(--out, 0) * 36px);
  filter: opacity(calc(var(--in, 1) * (1 - var(--out, 0)))) blur(calc((1 - var(--in, 1) + var(--out, 0)) * 6px));
}
.is-handed-off { pointer-events: none; visibility: hidden; }

/* ==========================================================================
   02 / CAPABILITIES
   ========================================================================== */
.caps { position: relative; color: #000; height: 300vh; }
/* The white panel pins to the viewport; the five cards rise from below as a stack
   and open into a fan around a pivot far under the panel (Figma: pivot 930 below card 03). */
.caps__sticky {
  position: sticky; top: 0; height: 100vh; height: 100svh; min-height: 620px; overflow: hidden;
  --k: var(--u); /* 1:1 with the Figma frame */
  --cw: calc(var(--k) * 309);
}
.caps__panel {
  position: absolute; inset: 0; overflow: hidden;
  border-radius: 40px;
  background-color: #fff;
  /* Dot grid: 2px dots every 14px */
  background-image: radial-gradient(circle, #e6e6e6 1px, transparent 1.3px);
  background-size: 14px 14px;
  background-position: 7px 7px;
}
.caps__head, .result__head {
  position: absolute; left: calc(var(--u) * 70); right: calc(var(--u) * 70); top: calc(var(--k, var(--u)) * 44); z-index: 30;
  display: flex; align-items: center; justify-content: space-between;
}
.caps__logo svg, .result__logo svg { display: block; width: max(96px, calc(var(--u) * 120)); height: auto; overflow: visible; }
.caps__intro {
  position: absolute; left: 0; right: 0; top: calc(var(--k) * 165);
  opacity: calc(1 - var(--intro, 0)); translate: 0 calc(var(--intro, 0) * -60px);
  display: flex; flex-direction: column; align-items: center; gap: calc(var(--k) * 23);
  text-align: center; text-transform: uppercase; padding: 0 16px;
}
.caps__title { font-size: max(26px, calc(var(--k) * 52)); font-weight: 500; letter-spacing: -0.04em; line-height: 1.1; }
.caps__sub { font-size: max(11px, calc(var(--k) * 13)); }
/* Laid out like the frame; --shift (px, from JS) lifts the fan once the heading has left. */
.caps__cards { position: absolute; left: 50%; top: calc(var(--k) * 603); width: 0; height: 0; translate: 0 calc(var(--shift, 0) * -1px); }
.card {
  position: absolute; left: calc(var(--cw) * -0.5); top: calc(var(--cw) * -0.65);
  width: var(--cw); height: calc(var(--cw) * 1.3);
  will-change: transform; outline: none;
}
.card__in {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; justify-content: space-between;
  padding: calc(var(--cw) * .13);
  border-radius: calc(var(--cw) * .097);
  background: #fff; color: #000; border: 1px solid #000;
  transition: transform .6s var(--ease), background .45s var(--ease), color .45s var(--ease), box-shadow .6s var(--ease);
}
.card__num { font-size: max(12px, calc(var(--cw) * .052)); font-weight: 500; }
.card__title { font-size: max(18px, calc(var(--cw) * .084)); font-weight: 500; text-transform: uppercase; margin-bottom: calc(var(--cw) * .05); }
.card__text { font-size: max(12px, calc(var(--cw) * .052)); line-height: 1.3; }
.card__arrow {
  position: absolute; right: calc(var(--cw) * .13); top: calc(var(--cw) * .11);
  font-size: calc(var(--cw) * .09); font-style: normal;
  opacity: 0; transform: translate(-8px, 8px); transition: opacity .4s var(--ease), transform .4s var(--ease);
}
/* Hover: the card comes to the front, lifts and turns black. */
@media (hover: hover) {
.card.is-landed:hover, .card.is-landed:focus-visible { z-index: 50 !important; }
.card.is-landed:hover .card__in, .card.is-landed:focus-visible .card__in {
  transform: translateY(-22px) rotate(calc(var(--r, 0deg) * -0.4)) scale(1.05);
  background: #000; color: #fff; border-color: #000;
  box-shadow: 0 40px 70px -35px rgba(0,0,0,.55);
}
.card.is-landed:hover .card__arrow, .card.is-landed:focus-visible .card__arrow { opacity: 1; transform: none; }
}
.pill--outline { background: #fff; color: #000; border: 1px solid #eee; font-weight: 500; }
.pill--outline:hover { border-color: #000; }
.caps__cta {
  position: absolute; left: 50%; top: calc(var(--k) * 863); translate: -50% calc(var(--shift, 0) * -1px); z-index: 40;
  height: auto; gap: 0; padding: max(11px, calc(var(--u) * 13)) max(22px, calc(var(--u) * 27));
  font-size: max(12px, calc(var(--u) * 14));
  opacity: var(--cta, 0);
}

/* ==========================================================================
   03 / RESULT — the line runs horizontally with the scroll; four steps pop on top
   ========================================================================== */
.result { position: relative; background: #000; color: #fff; height: 360vh; }
.result__sticky {
  position: sticky; top: 0; height: 100vh; height: 100svh; min-height: 600px; overflow: hidden;
  --divider: max(80px, calc(var(--u) * 104));   /* the divider under the header (Figma: 104) */
  --pill: max(36px, calc(var(--u) * 40));
}
/* Header sits exactly halfway between the top edge and the divider. */
.result__head { top: calc((var(--divider) - var(--pill)) / 2); }
.result__body {
  position: absolute; left: 0; right: 0; top: var(--divider); bottom: 0;
  text-transform: uppercase;
}
/* One caption strip under the header: both phrases, a dot between, hairlines above and below. */
.result__strip {
  position: absolute; left: 0; right: 0; top: 0; overflow: hidden;
  border-top: 1px solid #1a1a1a; border-bottom: 1px solid #1a1a1a;
  padding: max(10px, calc(var(--u) * 12)) 0;
  color: #717171; font-size: max(11px, calc(var(--u) * 13)); white-space: nowrap;
}
.result__strip-track { display: flex; align-items: center; justify-content: center; gap: calc(var(--u) * 12 + 6px); }
.strip-dup { display: none; }
.result__strip i { width: 3px; height: 3px; border-radius: 50%; background: currentColor; flex: none; }
.result__line {
  position: absolute; left: 0; top: 50%; translate: 0 -50%;
  margin: 0; font-size: max(72px, calc(var(--u) * 142)); font-weight: 500; line-height: 1; letter-spacing: -0.04em;
  white-space: nowrap;
}
.result__track { display: inline-block; will-change: transform; }
.result__steps { position: absolute; inset: 0; pointer-events: none; }
.step { position: absolute; width: max(170px, calc(var(--u) * 309)); translate: -50% -50%; will-change: transform; pointer-events: auto; }
.step__in {
  display: flex; flex-direction: column; gap: calc(var(--u) * 12); align-items: center; text-align: center;
  padding: max(20px, calc(var(--u) * 40)) max(22px, calc(var(--u) * 50));
  border-radius: max(24px, calc(var(--u) * 40));
  background: #fff; color: #000;
  transition: transform .5s var(--ease), background .4s, color .4s;
}
.step__in b { font-weight: 500; font-size: max(17px, calc(var(--u) * 26)); text-transform: uppercase; letter-spacing: -0.04em; }
.step__in span { font-size: max(12px, calc(var(--u) * 16)); text-transform: none; }
@media (hover: hover) {
.step:hover .step__in { transform: scale(1.06); background: #111; color: #fff; outline: 1px solid #333; }
}
/* Figma positions (centres, in the 1440 × 861 frame) */
.step--1 { left: calc(var(--u) * 221); top: 43.8%; --r: -15deg; }
.step--2 { left: calc(var(--u) * 548); top: 71.3%; --r: 12.78deg; }
.step--3 { left: calc(var(--u) * 900); top: 43.3%; --r: -15deg; }
.step--4 { left: calc(var(--u) * 1215); top: 71.3%; --r: 12.78deg; }

/* ---------- Block 3 stats ---------- */
.result__stats { position: absolute; inset: 0; pointer-events: none; }
.stat { position: absolute; display: grid; gap: calc(var(--u) * 8); width: max(130px, calc(var(--u) * 174)); will-change: transform, opacity; }
.stat b { font-weight: 400; font-size: max(30px, calc(var(--u) * 46)); letter-spacing: -0.04em; line-height: 1.1; font-variant-numeric: tabular-nums; }
.stat span { font-size: max(12px, calc(var(--u) * 16)); color: #717171; }
/* Figma top-left corners in the 1440 × 861 frame */
.stat--1 { left: calc(var(--u) * 497); top: 28.2%; }
.stat--2 { left: calc(var(--u) * 140); top: 74%; }
.stat--3 { left: calc(var(--u) * 1159); top: 28.8%; }
.stat--4 { left: calc(var(--u) * 813); top: 74%; }

/* ==========================================================================
   04 / WHY CORVISE
   ========================================================================== */
.why { position: relative; color: #000; background: #000; }
.why__panel {
  position: relative; min-height: calc(var(--u) * 1051); padding-bottom: calc(var(--u) * 40);
  border-radius: 40px; overflow: hidden;
  background-color: #fff;
  background-image: radial-gradient(circle, #e6e6e6 1px, transparent 1.3px);
  background-size: 14px 14px; background-position: 7px 7px;
}
.why__head {
  position: absolute; left: calc(var(--u) * 70); right: calc(var(--u) * 70); top: calc(var(--u) * 44); z-index: 5;
  display: flex; align-items: center; justify-content: space-between;
}
.why__logo svg, .foot__logo svg { display: block; width: max(96px, calc(var(--u) * 120)); height: auto; overflow: visible; }
.why__intro {
  padding: calc(var(--u) * 165) 16px 0;
  display: flex; flex-direction: column; align-items: center; gap: calc(var(--u) * 23);
  text-align: center; text-transform: uppercase;
}
.why__title { font-size: max(28px, calc(var(--u) * 52)); font-weight: 500; letter-spacing: -0.04em; line-height: 1.1; }
.why__sub { max-width: calc(var(--u) * 695); font-size: max(11px, calc(var(--u) * 13)); line-height: 1.25; }
.why__list { margin-top: calc(var(--u) * 80); }
.why__row {
  position: relative; isolation: isolate; outline: none;
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  padding: calc(var(--u) * 44) calc(var(--u) * 120);
  border-top: 1px solid #e5e5e5;
  opacity: 0; transform: translateY(40px);
  transition: opacity .9s var(--ease), transform 1s var(--ease), color .45s var(--ease);
}
.why__row.is-in { opacity: 1; transform: none; }
.why__row::before { content: ""; position: absolute; inset: 0; background: #000; transform: scaleY(0); transform-origin: bottom; transition: transform .55s var(--ease); z-index: -1; }
@media (hover: hover) {
.why__row:hover, .why__row:focus-visible { color: #fff; }
.why__row:hover::before, .why__row:focus-visible::before { transform: scaleY(1); transform-origin: top; }
}
.why__name { display: flex; align-items: center; gap: calc(var(--u) * 23); text-transform: uppercase; white-space: nowrap; }
.why__name span { font-size: max(11px, calc(var(--u) * 13)); color: #bababa; font-weight: 500; }
.why__name b { font-size: max(22px, calc(var(--u) * 32)); font-weight: 500; letter-spacing: -0.04em; line-height: 1; transition: transform .55s var(--ease); }
@media (hover: hover) { .why__row:hover .why__name b { transform: translateX(14px); } }
.why__row p { width: max(220px, calc(var(--u) * 300)); font-size: max(12px, calc(var(--u) * 13)); line-height: 1.25; }

/* ==========================================================================
   05 / FINAL CTA — mirrors the hero; the crow looks at you and follows the cursor
   ========================================================================== */
/* Exactly one screen: everything, footer included, fits without extra scroll. */
.final { position: relative; height: 100vh; height: 100svh; min-height: 620px; overflow: hidden; background: #000; color: #fff;
  --crow: min(calc(var(--u) * 640), 76vh); }
.final__grid { position: absolute; left: calc(var(--u) * 2); top: 0; width: calc(var(--u) * 1438.5); height: auto; pointer-events: none; }
.final__grid .hero__orbit { opacity: 1; }
.final__toplogo { display: none; }
.final__menu { position: absolute; left: calc(var(--u) * 39); top: calc(var(--u) * 308); z-index: 5; }
.final__lang { position: absolute; right: calc(var(--u) * 26); top: calc(var(--u) * 308); z-index: 5; }
.final__crow {
  position: absolute; left: 50%; bottom: calc(var(--crow) * -0.14); width: var(--crow); aspect-ratio: 1100 / 898;
  translate: -50% 0;
}
.final__crow img { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; transition: opacity .32s ease; translate: var(--px, 0) var(--py, 0); }
.final__crow img.is-on { opacity: 1; }
.final__intro {
  position: absolute; left: 0; right: 0; top: calc(var(--u) * 137); z-index: 4;
  display: flex; flex-direction: column; align-items: center; gap: calc(var(--u) * 23);
  text-align: center; text-transform: uppercase; padding: 0 16px;
  pointer-events: none; /* full-width layer must not cover the side menu / language pills */
}
.final__intro > * { pointer-events: auto; }
.final__title { font-size: max(28px, calc(var(--u) * 52)); font-weight: 500; letter-spacing: -0.04em; line-height: 1.1; }
.final__sub { font-size: max(11px, calc(var(--u) * 13)); }
.foot {
  position: absolute; left: calc(var(--u) * 100); right: calc(var(--u) * 100); bottom: max(24px, calc(var(--u) * 35)); z-index: 4;
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 16px;
  font-size: max(11px, calc(var(--u) * 13)); text-transform: uppercase;
}
.foot > :last-child { justify-self: end; }

/* ==========================================================================
   Flyer — the crow. (x, y) is where its feet are; poses hang from that point.
   ========================================================================== */
.flyer {
  position: fixed; left: 0; top: 0; z-index: 70; width: 0; height: 0;
  pointer-events: none; color: #fff;
  mix-blend-mode: difference; /* white on black, black on white */
  will-change: transform;
}
.flyer__body { position: absolute; left: 0; top: 0; will-change: transform; }
.flyer__pose, .flyer__glyph { position: absolute; display: none; max-width: none; }
.flyer__pose.is-on, .flyer__glyph.is-on { display: block; }
body.no-flyer .flyer, body.overlay-open .flyer { opacity: 0; }

/* ==========================================================================
   Overlays
   ========================================================================== */
.overlay {
  position: fixed; inset: 0; z-index: 100; background: #000; color: #fff;
  display: flex; flex-direction: column; overflow-y: auto;
  padding: 16px calc(var(--u) * 20) 32px;
  clip-path: inset(0 0 100% 0);
  transition: clip-path .8s var(--ease-io);
}
.overlay.is-open { clip-path: inset(0 0 0 0); }
.overlay:focus { outline: none; }
/* Touch screens: no focus ring / outline effect after a tap */
@media (hover: none) { .menu__nav > *:focus-visible { outline: none; padding-left: 4px; } .menu__nav > *:focus-visible b { color: #fff; -webkit-text-stroke: 0; } }
.overlay__top { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; }
.overlay__top > :last-child { justify-self: end; }
.overlay__top--end { display: flex; justify-content: flex-end; }
.brief__eyebrow { margin-bottom: 18px; }
.overlay__logo { width: max(96px, calc(var(--u) * 120)); }
.menu__nav { margin: auto 0; display: grid; }
.menu__nav > * {
  display: flex; align-items: baseline; gap: 24px; padding: 10px calc(var(--u) * 145); width: 100%; text-align: left;
  border-bottom: 1px solid var(--line);
  font-size: clamp(36px, min(calc(var(--u) * 96), 11vh), 150px); font-weight: 500; line-height: 1; text-transform: uppercase; letter-spacing: -0.05em;
  opacity: 0; transform: translateY(30px);
  transition: opacity .6s var(--ease), transform .6s var(--ease), color .3s, padding .5s var(--ease);
}
.menu__nav > * span { font-size: 13px; color: #666; letter-spacing: 0; }
/* Hover: the word turns into a white outline */
/* Stroke is painted under a black fill, so only the outer edge shows — no inner contour
   lines from overlapping glyph shapes (that is what looked jagged on iOS). */
.menu__nav b { transition: color .35s var(--ease); paint-order: stroke fill; }
.menu__nav > *:focus-visible { padding-left: calc(var(--u) * 175); }
.menu__nav > *:focus-visible b { color: #000; -webkit-text-stroke: 2.5px #fff; }
@media (hover: hover) {
  .menu__nav > *:hover { padding-left: calc(var(--u) * 175); }
  .menu__nav > *:hover b { color: #000; -webkit-text-stroke: 2.5px #fff; }
}
.overlay.is-open .menu__nav > * { opacity: 1; transform: none; }
.overlay.is-open .menu__nav > *:nth-child(1) { transition-delay: .3s; }
.overlay.is-open .menu__nav > *:nth-child(2) { transition-delay: .36s; }
.overlay.is-open .menu__nav > *:nth-child(3) { transition-delay: .42s; }
.overlay.is-open .menu__nav > *:nth-child(4) { transition-delay: .48s; }
.overlay.is-open .menu__nav > *:nth-child(5) { transition-delay: .54s; }
.menu__foot { text-align: center; }

.brief { width: min(920px, 100%); margin: 6vh auto 0; }
.brief__title { font-size: max(34px, calc(var(--u) * 72)); font-weight: 500; line-height: .95; text-transform: uppercase; letter-spacing: -0.05em; max-width: 14ch; }
.brief__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0 28px; margin-top: 48px; }
.field { display: grid; gap: 8px; padding: 18px 0 10px; border-bottom: 1px solid var(--line); transition: border-color .3s; }
.field--wide { grid-column: 1 / -1; }
.field:focus-within { border-color: #fff; }
.field > span { font-size: 12px; text-transform: uppercase; color: #8a8a8a; }
.field input, .field textarea { background: none; border: 0; color: #fff; font: inherit; font-size: 20px; letter-spacing: -0.03em; outline: none; resize: vertical; padding: 4px 0; }
.field.is-invalid { border-color: #ff5a4f; }
.field--hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.budget { border: 0; padding: 0; margin: 34px 0 40px; display: flex; flex-wrap: wrap; gap: 10px; }
.budget legend { font-size: 12px; text-transform: uppercase; color: #8a8a8a; margin-bottom: 14px; padding: 0; }
.budget label { position: relative; }
.budget input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.budget span { display: inline-block; padding: 11px 22px; border: 1px solid var(--line); border-radius: 50px; transition: all .3s var(--ease); }
.budget input:checked + span { background: #fff; color: #000; border-color: #fff; }
.budget input:focus-visible + span { outline: 2px solid #fff; outline-offset: 3px; }
.brief__status { margin-top: 20px; min-height: 1.4em; color: var(--grey); }

/* ---------- 404 (404.html) ---------- */
.nf { position: relative; min-height: 100vh; min-height: 100svh; overflow: hidden; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 28px; padding: 32px 16px; text-align: center; text-transform: uppercase; }
.nf .final__grid { opacity: .7; }
.nf__code, .nf__text, .nf .cta { position: relative; } /* above the grid */
.nf__logo { position: absolute; left: 50%; top: max(28px, calc(var(--u) * 44)); width: max(96px, calc(var(--u) * 120)); translate: -50% 0; }
.nf__code { font-size: clamp(96px, calc(var(--u) * 260), 320px); font-weight: 500; line-height: .85; letter-spacing: -0.06em; }
.nf__text { display: grid; gap: 8px; font-size: max(13px, calc(var(--u) * 16)); }
.nf__text span:last-child { color: var(--grey); }

/* ---------- Scroll reveal ---------- */
[data-reveal] { opacity: 0; transform: translateY(36px) scale(.985); transition: opacity 1s var(--ease), transform 1.1s var(--ease); }
[data-reveal].is-in { opacity: 1; transform: none; }

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 1023px) {
  :root { --pad: 32px; }
}

@media (max-width: 767px) {
  /* ===== Mobile — Figma frame «mob» (390 wide). 1 design px = var(--m). ===== */
  :root { --pad: 16px; --m: calc(100vw / 390); }

  /* Header pills + logo are the same on every block */
  .hero__menu, .final__menu { left: calc(var(--m) * 15); top: 28px; }
  .hero__lang, .final__lang { right: calc(var(--m) * 15); top: 28px; }
  .caps__head, .why__head { left: calc(var(--m) * 15); right: calc(var(--m) * 15); top: 32px; }
  .result__head { left: calc(var(--m) * 15); right: calc(var(--m) * 15); top: 28px; }
  .caps__logo svg, .result__logo svg, .why__logo svg, .foot__logo svg { width: calc(var(--m) * 120); }
  /* Mobile headings: SemiBold Italic */
  .hero__tag, .caps__title, .why__title, .final__title, .brief__title { font-weight: 600; }
  .m-br { display: inline; }

  /* ---------- 1 / HERO ---------- */
  /* lvh: the tallest the viewport can get, so the white block 2 never peeks in below */
  /* Taller than the screen: iOS Safari's translucent bars show what lies beneath them,
     and that must stay black (not the white block 2). */
  .hero { height: calc(100vh + 96px); height: calc(100lvh + 96px); min-height: 640px; }
  .hero__grid {
    left: calc(var(--m) * -383); top: 0; width: calc(var(--m) * 1156);
    transition: transform 1.3s var(--ease-io) .15s;
  }
  .hero__logo {
    left: 50%; top: 39px; width: calc(var(--m) * 120);
    transform: translateX(-50%); transform-origin: 50% 50%;
    transition: transform 1.3s var(--ease-io) .15s;
  }
  /* Loading screen (Figma «Загрузка» mobile): logo big in the middle, the grid centred on it.
     On load both glide up into place — logo into the header, lines to where the hero has them. */
  body.is-loading .hero__logo { transform: translateX(-50%) translateY(calc(50svh - 48px)) scale(1.45); }
  body.is-loading .hero__grid { transform: translateY(calc(49.4svh - var(--m) * 263.6)); }
  /* relative to the visible screen (the hero itself is taller than it) */
  .loader-pct { top: calc(100svh - 96px); bottom: auto; }
  .hero__tag {
    left: calc(var(--m) * 18); right: calc(var(--m) * 18); top: 158px; width: auto; min-width: 0;
    text-align: center; font-size: calc(var(--m) * 37); line-height: 1.297; letter-spacing: -0.04em;
  }
  .hero__aside {
    left: calc(var(--m) * 29); right: calc(var(--m) * 29); top: calc(158px + var(--m) * 192 + 27px); bottom: auto;
    width: auto; min-width: 0; align-items: center; text-align: center; gap: 27px; font-size: 14px;
  }
  .hero__crow { left: 50%; bottom: 0; width: calc(var(--m) * 416.5); margin-left: calc(var(--m) * -214); z-index: 1; }
  /* the text arrives after the logo has settled */
  body.is-ready .hero__tag { transition-delay: .9s; }
  body.is-ready .hero__aside { transition-delay: 1.05s; }
  body.is-ready .hero__menu, body.is-ready .hero__lang { transition-delay: .8s; }
  .hero__scroll { display: none; }

  /* ---------- 2 / WHAT WE BUILD — pinned; vertical scroll drives the card row sideways ---------- */
  /* extra height = how far the row has to travel (5 cards − one screen) */
  .caps { height: calc(100vh + var(--m) * 1181); height: calc(100svh + var(--m) * 1181); }
  .caps__sticky {
    position: sticky; top: 0; height: 100vh; height: 100svh; min-height: 0; overflow: hidden;
    /* everything above/below the row: paddings, eyebrow, 3-line title, sub, button, bottom gap */
    --cw: min(calc(var(--m) * 309), calc((100svh - 330px - min(var(--m) * 144, 20.4svh)) / 1.3));
  }
  .caps__panel { position: absolute; inset: 0; border-radius: 0; padding: 108px 0 0; display: flex; flex-direction: column; }
  .caps__intro { position: static; padding: 0 calc(var(--m) * 15); gap: 16px; opacity: 1; translate: none; }
  .caps__title { font-size: min(calc(var(--m) * 38), 5.4svh); line-height: 1.26; }
  .caps__sub { max-width: calc(var(--m) * 264); font-size: 13px; line-height: 1.25; }
  .caps__cards {
    position: static; width: max-content; height: auto; translate: none;
    display: flex; margin-top: 28px; padding: 0 calc(var(--m) * 15);
    will-change: transform;
  }
  .card { position: relative; left: auto; top: auto; flex: 0 0 var(--cw); height: calc(var(--cw) * 1.3); margin-right: -1px; transform: none !important; }
  .card__in { padding: calc(var(--cw) * .13); border-radius: calc(var(--cw) * .097); }
  /* type scales with the card, so it also fits on short phones */
  .card__num { font-size: max(11px, calc(var(--cw) * .052)); } .card__title { font-size: max(15px, calc(var(--cw) * .084)); margin-bottom: calc(var(--cw) * .05); } .card__text { font-size: max(10.5px, calc(var(--cw) * .052)); line-height: 1.25; }
  .caps__cta {
    position: static; translate: none; display: flex; opacity: 1; pointer-events: auto !important;
    width: calc(100% - var(--m) * 30); margin: 20px auto 32px; padding: 14px; font-size: 14px; flex: none;
  }

  /* ---------- 3 / RESULT ---------- */
  .result__sticky { --divider: 84px; }
  .result__head { top: 28px; }
  /* the strip is wider than a phone: let it run as a ticker */
  .result__strip { font-size: 13px; padding: 12px 0; }
  .result__strip-track { justify-content: flex-start; width: max-content; gap: 18px; animation: strip 22s linear infinite; }
  .strip-dup { display: block; }
  /* The big line sits between the two pairs of rows */
  .result__body { top: 0; }
  .result__strip { top: 84px; }
  .result__line { top: calc((365px + 100% - 249px) / 2); font-size: calc(var(--m) * 142); }
  /* Steps hug the screen edges, numbers sit beside them (rows at 153 / 271 from the top, 595 / 713 → from the bottom) */
  .step { width: auto; translate: none; }
  .step__in { padding: 22px 33px; gap: 5px; border-radius: 0 30px 30px 0; align-items: flex-start; text-align: center; white-space: nowrap; }
  .step__in b { font-size: 20px; width: 100%; } .step__in span { font-size: 16px; width: 100%; }
  .step--1 { left: -10px; top: 153px; }
  .step--3 { left: auto; right: -10px; top: 271px; }
  .step--2 { left: -10px; top: auto; bottom: 155px; }
  .step--4 { left: auto; right: -10px; top: auto; bottom: 37px; }
  .step--3 .step__in, .step--4 .step__in { border-radius: 30px 0 0 30px; padding-right: 43px; }
  .step--1 .step__in, .step--2 .step__in { padding-left: 43px; }
  .stat { width: calc(var(--m) * 150); gap: 3px; }
  .stat b { font-size: 36px; } .stat span { font-size: 14px; }
  .stat--1 { left: calc(var(--m) * 251); top: 167px; }
  .stat--3 { left: calc(var(--m) * 29); top: 285px; }
  .stat--2 { left: calc(var(--m) * 244); top: auto; bottom: 168px; }
  .stat--4 { left: calc(var(--m) * 29); top: auto; bottom: 50px; }

  /* ---------- 4 / BUILT DIFFERENT ---------- */
  .why__panel { border-radius: 0; min-height: 0; padding-bottom: 20px; }
  .why__intro { padding: 128px calc(var(--m) * 15) 0; gap: 16px; }
  .why__title { font-size: calc(var(--m) * 38); line-height: 1.26; }
  .why__sub { font-size: 13px; max-width: none; line-height: 1.25; }
  .why__list { margin-top: 48px; }
  .why__row { flex-direction: column; align-items: flex-start; padding: 46px 20px; gap: 14px; }
  .why__name { gap: 20px; white-space: normal; }
  .why__name span { font-size: 13px; } .why__name b { font-size: 24px; }
  .why__row p { width: auto; max-width: 300px; font-size: 13px; }

  /* ---------- 5 / FINAL ---------- */
  .final { --crow: calc(var(--m) * 416.5); min-height: 700px; }
  .final__grid { left: calc(var(--m) * -383); width: calc(var(--m) * 1156); }
  .final__toplogo { display: block; position: absolute; left: 50%; top: 39px; width: calc(var(--m) * 120); height: auto; translate: -50% 0; z-index: 3; }
  .final__intro { top: 118px; gap: 23px; padding: 0 calc(var(--m) * 29); }
  .final__title { font-size: calc(var(--m) * 38); line-height: 1.26; }
  .final__sub { max-width: 259px; font-size: 13px; line-height: 1.25; }
  .final__crow { bottom: 0; margin-left: calc(var(--m) * -6); }
  .foot {
    left: 0; right: 0; bottom: 26px; display: flex; flex-direction: column; align-items: center; gap: 0;
    font-size: 13px; text-align: center; line-height: 1.25;
  }
  .foot__logo { order: -1; margin-bottom: 12px; }
  .foot > :last-child { justify-self: auto; }

  /* ---------- Overlays ---------- */
  .overlay__top .overlay__logo { display: none; }
  .menu__nav > * { padding: 12px 4px; }
  .menu__nav > *:focus-visible { padding-left: 16px; }
  .overlay__top { display: flex; justify-content: flex-end; }
  .brief__grid { grid-template-columns: 1fr; }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; transition-delay: 0s !important; }
}
