/* Layout concept: a film-lit night stage — full-bleed athlete film, a pinned 3D product stage with a narrow copy rail,
   then a cream race-bib signup sheet. One brand heat (orange→amber) used only for action and the towel's stopper. */
:root {
  --ink: #141416;        /* stage black, faint warm-violet bias */
  --ink-2: #1c1c20;      /* raised surfaces */
  --line: #2e2d31;       /* hairlines on dark */
  --cream: #f7f3ee;      /* brand cream: text on dark, bib paper */
  --paper-ink: #1d1b19;  /* text on cream */
  --mute: #a39d95;       /* secondary text on dark */
  --mute-2: #5c5752;     /* secondary text on cream (5.8:1 on the sign-up background) */
  --heat: #ff6a3d;       /* brand orange */
  --heat-2: #ff9a1f;     /* brand amber */
  --heat-ink: #a63a12;   /* brand orange darkened for small text and links on cream (AA contrast) */
  --display: "Karantina", "Oswald", "Reem Kufi", "Arial Narrow", sans-serif;
  --body: "Rubik", "Segoe UI", system-ui, sans-serif;
  /* Plex Mono has no Hebrew or Arabic letters: Rubik and the system UI font fill those in instead of a typewriter font */
  --mono: "IBM Plex Mono", "Rubik", "Segoe UI", system-ui, ui-monospace, monospace;
  --gut: max(16px, env(safe-area-inset-left, 0px));
  --gut-r: max(16px, env(safe-area-inset-right, 0px));
  --nav-h: 64px;
  color-scheme: dark;
}
:lang(ru) { --display: "Oswald", "Arial Narrow", sans-serif; }
:lang(ar) { --display: "Reem Kufi", "Rubik", sans-serif; }

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body { margin: 0; background: var(--ink); color: var(--cream); font: 400 17px/1.6 var(--body); overflow-x: hidden; }
img, video, canvas { display: block; max-width: 100%; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--heat-2); outline-offset: 3px; border-radius: 6px; }
[hidden] { display: none !important; }

.wrap { width: 100%; max-width: 1240px; margin-inline: auto; padding-left: var(--gut); padding-right: var(--gut-r); }
.display { font-family: var(--display); font-weight: 700; line-height: .92; letter-spacing: .005em; text-wrap: balance; margin: 0; }
:lang(ar) .display { line-height: 1.15; }
:lang(ru) .display { line-height: 1; text-transform: uppercase; letter-spacing: .01em; }
.eyebrow { font: 500 13px/1.3 var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--heat-2); margin: 0 0 18px; }
:lang(he) .eyebrow, :lang(ar) .eyebrow { font-family: var(--body); letter-spacing: .04em; font-size: 14px; }

/* ---------- buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 52px; padding: 0 26px; border: 0; border-radius: 999px;
  font: 700 17px/1 var(--body); text-decoration: none; color: #1a1210; cursor: pointer;
  background: linear-gradient(100deg, var(--heat), var(--heat-2)); box-shadow: 0 10px 30px -12px rgba(255, 106, 61, .65);
  transition: transform .2s ease, box-shadow .2s ease; }
.btn:hover { transform: translateY(-2px); box-shadow: 0 16px 34px -12px rgba(255, 106, 61, .8); }
.btn-sm { min-height: 40px; padding: 0 18px; font-size: 15px; }
.btn-ghost { background: transparent; color: var(--cream); box-shadow: inset 0 0 0 1.5px rgba(247, 243, 238, .45); }
.btn-ghost:hover { box-shadow: inset 0 0 0 1.5px var(--cream); }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .6; cursor: progress; transform: none; }

/* ---------- nav ---------- */
body::before { content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); z-index: 60; background: var(--ink); }
.nav { position: fixed; top: env(safe-area-inset-top, 0px); inset-inline: 0; z-index: 50; transition: background .3s ease, backdrop-filter .3s ease; }
/* keeps the menu readable over the bright sky of the film (in English/Russian the links sit right over it) */
.nav:not(.solid) { background: linear-gradient(rgba(20, 20, 22, .66), rgba(20, 20, 22, .3) 62%, rgba(20, 20, 22, 0)); }
.nav:not(.solid) .nav-links a { text-shadow: 0 1px 10px rgba(0, 0, 0, .5); }
.nav.solid { background: rgba(20, 20, 22, .94); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); box-shadow: 0 1px 0 var(--line); }
.nav-in { height: var(--nav-h); display: flex; align-items: center; gap: 28px; max-width: 1240px; margin-inline: auto; padding-left: var(--gut); padding-right: var(--gut-r); }
.nav-logo img { height: 28px; width: auto; }
.nav-links { display: flex; gap: 26px; }
.nav-links a { text-decoration: none; font-size: 15px; color: rgba(247, 243, 238, .84); transition: color .2s; }
.nav-links a:hover { color: var(--cream); }
.nav-end { margin-inline-start: auto; display: flex; align-items: center; gap: 14px; }
.lang { display: flex; background: rgba(20, 20, 22, .55); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .08); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border-radius: 999px; padding: 3px; }
.lang button { border: 0; background: none; color: #c9c3ba; font: 500 13px/1 var(--body); padding: 8px 10px; border-radius: 999px; cursor: pointer; }
.lang button:hover { color: var(--cream); }
.lang button.on { background: var(--cream); color: var(--paper-ink); }
.lang-select, .sticky-cta { display: none; }   /* phone-only controls, switched on in the 760px block below */

/* ---------- hero ---------- */
.hero { position: relative; min-height: min(100vh, 980px); min-height: min(100svh, 980px); display: flex; align-items: flex-end; overflow: hidden; isolation: isolate; }
/* the runner sits in the film's left third, so the copy always lives on the physical right, in every language */
.hero-film { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 28% 50%; z-index: -2; }
.hero-shade { position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(to top, var(--ink) 2%, rgba(20,20,22,.5) 30%, rgba(20,20,22,0) 58%),
              linear-gradient(to left, rgba(20,20,22,.8) 0%, rgba(20,20,22,.35) 42%, rgba(20,20,22,0) 64%); }
.hero-in { padding-block: calc(var(--nav-h) + 32px) 56px; }
.hero-copy { max-width: 640px; margin-left: auto; margin-right: 0; }
/* left-to-right languages: the block is only as wide as its content, so the text hugs the right edge and clears the runner */
@media (min-width: 761px) { [dir="ltr"] .hero-copy { width: fit-content; } }
/* the line above the title sits on a dark glass chip, readable over any frame of the film */
.hero .eyebrow { display: inline-block; align-self: flex-start; padding: 7px 14px; border-radius: 999px; font-family: var(--body);
  background: rgba(20, 20, 22, .55); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
[dir="ltr"] .hero .eyebrow { font-size: 12.5px; letter-spacing: .08em; }
/* sized by the screen's height too, so the sign-up button is always on the first screen of a laptop */
.hero-title { font-size: clamp(64px, min(13vw, 14.5vh), 196px); margin-bottom: 26px; }
:lang(ar) .hero-title { font-size: clamp(52px, min(11vw, 11.5vh), 160px); }
:lang(ru) .hero-title { font-size: clamp(52px, min(10vw, 11.5vh), 150px); }   /* "ВЫТИРАЙ." is long: a bit smaller keeps it clear of the runner */
/* brand rule: in a headline the name REWYND is always the logo artwork, never typed in a font.
   The wordmark SVG is used as a mask over the brand gradient, so it can take any colour. */
.wordmark { display: block; width: 3.1em; max-width: 100%; aspect-ratio: 822 / 100; margin-top: .2em;
  background: linear-gradient(100deg, var(--heat), var(--heat-2));
  -webkit-mask: url(../assets/brand/rewynd-wordmark.svg) center / contain no-repeat;
          mask: url(../assets/brand/rewynd-wordmark.svg) center / contain no-repeat; }
:lang(ar) .hero-title .wordmark { width: 3.6em; }   /* the Arabic title is set smaller, so the mark gets a little more em */
.lead { font-size: clamp(18px, 1.7vw, 21px); max-width: 34ch; color: #e7e1d8; margin: 0 0 32px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.counter { display: inline-flex; align-items: center; gap: 10px; margin: 26px 0 0; font: 500 14px/1.2 var(--body); color: var(--mute); }
.counter b { color: var(--cream); font-family: var(--mono); font-weight: 500; }
.pulse { width: 8px; height: 8px; border-radius: 50%; background: var(--heat); box-shadow: 0 0 0 0 rgba(255,106,61,.7); animation: pulse 2s infinite; }
@keyframes pulse { 70% { box-shadow: 0 0 0 10px rgba(255,106,61,0); } 100% { box-shadow: 0 0 0 0 rgba(255,106,61,0); } }

/* ---------- specs ---------- */
.specs { border-block: 1px solid var(--line); background: var(--ink); }
.specs-in { display: grid; grid-template-columns: repeat(4, 1fr); }
.spec { display: flex; flex-direction: column; gap: 4px; padding-block: 22px; padding-inline: 20px; border-inline-start: 1px solid var(--line); }
.spec:first-child { border-inline-start: 0; padding-inline-start: 0; }
.spec b { font: 500 clamp(16px, 1.6vw, 20px)/1.2 var(--mono); color: var(--cream); font-variant-numeric: tabular-nums; }
.spec span { font-size: 13px; color: var(--mute); }
:lang(he) .spec b, :lang(ar) .spec b { font-family: var(--body); font-size: clamp(17px, 1.7vw, 22px); }

/* ---------- story (pinned 3D) ---------- */
.story { position: relative; height: 440vh; background: radial-gradient(ellipse 80% 60% at 50% 45%, #232226 0%, var(--ink) 70%); }
.story-pin { position: sticky; top: 0; height: 100vh; height: 100svh; overflow: hidden; }
.story-canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.story-copy { position: absolute; inset-block: 0; inset-inline-start: 0; width: min(440px, 40%); display: grid; align-items: center;
  padding-inline-start: max(var(--gut), calc((100vw - 1240px) / 2 + 16px)); pointer-events: none; }
.step { grid-area: 1 / 1; opacity: 0; transform: translateY(26px); transition: opacity .45s ease, transform .55s cubic-bezier(.2,.7,.2,1); }
.step.is-on { opacity: 1; transform: none; }
.step-k { display: flex; align-items: center; gap: 10px; font: 500 13px/1 var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--heat-2); margin-bottom: 18px; }
:lang(he) .step-k, :lang(ar) .step-k { font-family: var(--body); letter-spacing: .03em; font-size: 14px; }
.step-k i { font-style: normal; font-family: var(--mono); color: var(--mute); }
.step h2 { font-size: clamp(48px, 5.6vw, 92px); margin-bottom: 18px; }
.step p { margin: 0; color: #d9d3ca; max-width: 34ch; }
.story-rail { position: absolute; inset-inline-end: max(var(--gut), 24px); top: 50%; width: 2px; height: 160px; transform: translateY(-50%); background: var(--line); border-radius: 2px; }
.story-fill { position: absolute; inset-inline: 0; top: 0; height: 0; background: linear-gradient(var(--heat), var(--heat-2)); border-radius: 2px; }
.story-hint { position: absolute; bottom: 28px; inset-inline: 0; margin: 0; text-align: center; font: 500 12px/1 var(--mono); letter-spacing: .2em; text-transform: uppercase; color: var(--mute); transition: opacity .4s; }
.story-hint::after { content: ""; display: block; width: 1px; height: 34px; margin: 10px auto 0; background: linear-gradient(var(--mute), transparent); animation: drip 1.8s ease-in-out infinite; }
:lang(he) .story-hint, :lang(ar) .story-hint, :lang(he) .cfg-drag, :lang(ar) .cfg-drag { font-family: var(--body); font-size: 13px; letter-spacing: .03em; }
@keyframes drip { 0% { transform: scaleY(0); transform-origin: top; } 50% { transform: scaleY(1); transform-origin: top; } 51% { transform-origin: bottom; } 100% { transform: scaleY(0); transform-origin: bottom; } }

/* 3D fades in once it is ready; without WebGL the story becomes a plain list beside a photo */
.story-canvas, .cfg-stage canvas { opacity: 0; transition: opacity .8s ease; }
.is-3d .story-canvas, .is-3d .cfg-stage canvas { opacity: 1; }
.story-fallback, .cfg-fallback { display: none; }
.no-3d .story { height: auto; padding-block: 110px; }
.no-3d .story-pin { position: static; height: auto; overflow: visible; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 56px; align-items: start;
  max-width: 1240px; margin-inline: auto; padding-left: var(--gut); padding-right: var(--gut-r); }
.no-3d .story-canvas, .no-3d .story-rail, .no-3d .story-hint { display: none; }
.no-3d .story-fallback { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; object-position: 30% 50%; border-radius: 22px; position: sticky; top: calc(var(--nav-h) + 24px); }
.no-3d .story-copy { position: static; width: auto; height: auto; display: grid; gap: 56px; padding: 0; background: none; }
.no-3d .step { grid-area: auto; opacity: 1; transform: none; }
.no-3d .step h2 { font-size: clamp(40px, 4.4vw, 64px); }
.no-3d .cfg-stage canvas, .no-3d .cfg-pull, .no-3d .cfg-drag { display: none; }
.no-3d .cfg-fallback { display: block; width: 100%; height: 100%; object-fit: cover; }

/* ---------- section heads ---------- */
.sec-head { margin-bottom: 44px; }
.sec-title { font-size: clamp(54px, 7vw, 112px); }
.sec-lead { margin: 18px 0 0; max-width: 52ch; color: var(--mute); font-size: 18px; }

/* ---------- field ---------- */
.field { padding-block: 130px 120px; }
.field-grid { display: grid; grid-template-columns: repeat(6, 1fr); grid-auto-rows: clamp(150px, 17vw, 230px); gap: 14px; }
.tile { position: relative; margin: 0; overflow: hidden; border-radius: 22px; background: var(--ink-2); grid-column: span 2; grid-row: span 2; }
.tile-wide { grid-column: span 4; }
.tile-tall { grid-column: span 2; grid-row: span 2; }
.tile:nth-child(3), .tile:nth-child(4) { grid-column: span 3; }    /* the middle pair shares the full row: no gap */
.tile:nth-child(5) { grid-column: span 6; grid-row: span 2; }
.tile img, .tile video { width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s cubic-bezier(.2,.7,.2,1); }
.tile:hover img, .tile:hover video { transform: scale(1.04); }
.tile figcaption { position: absolute; inset-inline-start: 16px; bottom: 14px; padding: 7px 12px; border-radius: 999px; font-size: 14px; font-weight: 500;
  background: rgba(20, 20, 22, .62); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }

/* ---------- configurator ---------- */
.design { padding-block: 40px 130px; }
.cfg { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr); gap: 18px; align-items: start; }
.cfg-stage { position: relative; aspect-ratio: 4 / 3.4; max-width: 100%; border-radius: 26px; overflow: hidden;
  background: radial-gradient(ellipse at 50% 40%, #2c2b30 0%, #19191c 60%, #121214 100%); border: 1px solid var(--line); }
.cfg-stage canvas { width: 100%; height: 100%; cursor: grab; touch-action: pan-y; }
.cfg-stage canvas:active { cursor: grabbing; }
.cfg-pull { position: absolute; bottom: 16px; inset-inline-start: 16px; }
.cfg-drag { position: absolute; bottom: 26px; inset-inline-end: 18px; font: 500 12px/1 var(--mono); letter-spacing: .1em; color: var(--mute); }
.cfg-panel { background: var(--ink-2); border: 1px solid var(--line); border-radius: 26px; padding: 22px; display: grid; gap: 20px; }
.cfg-h { margin: 0 0 10px; font: 500 13px/1.2 var(--body); color: var(--mute); letter-spacing: .02em; }
.cfg-hint { margin: 8px 0 0; font-size: 13px; color: var(--mute); }
.cfg-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.slots { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; position: relative; padding-top: 12px; }
.slots::before { content: ""; position: absolute; top: 4px; inset-inline: 4%; height: 2px; background: repeating-linear-gradient(90deg, var(--line) 0 8px, transparent 8px 12px); }
.slot { position: relative; display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 10px 2px; border-radius: 12px; border: 1px solid var(--line);
  background: transparent; color: var(--mute); font: 500 11px/1.15 var(--body); cursor: pointer; min-height: 64px; }
.slot::before { content: ""; width: 10px; height: 10px; border-radius: 50%; background: #6c6f75; box-shadow: inset 0 -2px 0 rgba(0,0,0,.35); }
.slot.filled { color: var(--cream); background: rgba(255, 255, 255, .05); }
.slot.filled::before { background: var(--heat); }
.slot.sel { border-color: var(--heat-2); box-shadow: 0 0 0 1px var(--heat-2); }
.slot small { font: 500 10px/1 var(--mono); color: var(--mute); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chips button { border: 1px solid #3a393e; background: transparent; color: var(--cream); font: 500 14px/1 var(--body); padding: 10px 14px; border-radius: 999px; cursor: pointer; }
.chips button.on { background: var(--cream); color: var(--paper-ink); border-color: var(--cream); }
.chips button[disabled] { opacity: .35; cursor: not-allowed; }
.swatches { display: flex; flex-wrap: wrap; gap: 8px; }
.swatches button { width: 34px; height: 34px; border-radius: 50%; border: 2px solid #3a393e; cursor: pointer; padding: 0; background-size: cover; background-position: center; }
.swatches button.on { border-color: var(--cream); box-shadow: 0 0 0 2px var(--heat); }
.swatches .cover-sw { overflow: hidden; }
.swatches .cover-sw canvas { display: block; width: 100%; height: 100%; border-radius: 50%; pointer-events: none; }
.cfg-use { width: 100%; }
.cfg-tabs { display: none; }   /* phone-only, see the 760px block */

/* ---------- signup: cream race bib ---------- */
.signup { background: #ece6dc; color: var(--paper-ink); padding-block: 120px; }
.signup .eyebrow { color: var(--heat-ink); }
.signup .sec-lead { color: var(--mute-2); }
.signup-in { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: 56px; align-items: start; }
.signup-head { position: sticky; top: calc(var(--nav-h) + 40px); }
.counter-dark { color: var(--mute-2); }
.counter-dark b { color: var(--paper-ink); }
.bib { position: relative; background: var(--cream); border-radius: 18px; padding: 30px 30px 34px; box-shadow: 0 30px 60px -30px rgba(40, 25, 10, .35), 0 1px 0 rgba(0,0,0,.04);
  background-image: radial-gradient(rgba(0,0,0,.025) 1px, transparent 1px); background-size: 6px 6px; }
.pin { position: absolute; width: 14px; height: 14px; border-radius: 50%; background: #ece6dc; box-shadow: inset 0 2px 3px rgba(0,0,0,.25); }
.pin:nth-of-type(1) { top: 14px; left: 14px; } .pin:nth-of-type(2) { top: 14px; right: 14px; }
.pin:nth-of-type(3) { bottom: 14px; left: 14px; } .pin:nth-of-type(4) { bottom: 14px; right: 14px; }
.bib-top { display: flex; align-items: center; gap: 16px; background: linear-gradient(100deg, var(--heat), var(--heat-2)); color: #1a1210; border-radius: 12px; padding: 16px 20px; margin-bottom: 26px; }
.bib-top img { width: 38px; height: auto; filter: brightness(0) saturate(100%) invert(9%) sepia(8%) saturate(1000%) hue-rotate(330deg); }
.bib-num { display: grid; gap: 2px; }
.bib-num small { font-size: 13px; font-weight: 500; opacity: .75; }
.bib-num b { font: 500 clamp(40px, 5vw, 58px)/1 var(--mono); letter-spacing: .02em; font-variant-numeric: tabular-nums; direction: ltr; text-align: start; }
.bib-num b.is-next { color: transparent; -webkit-text-stroke: 1.5px rgba(26, 18, 16, .6); }   /* a preview, not yet yours */
.bib-wait { font-size: 12px; opacity: .7; }
.form { display: grid; gap: 18px; }
.hp { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.field-l { display: grid; gap: 7px; border: 0; padding: 0; margin: 0; min-width: 0; font-size: 14px; font-weight: 500; color: var(--mute-2); }
.field-l legend { padding: 0; margin-bottom: 7px; }
.field-l input, .field-l select { width: 100%; height: 50px; border-radius: 12px; border: 1.5px solid #d9d1c4; background: #fffdf9; color: var(--paper-ink);
  font: 400 16px/1 var(--body); padding: 0 14px; transition: border-color .2s; color-scheme: light; }
.field-l input:focus, .field-l select:focus { outline: none; border-color: var(--heat); }
.field-l.bad input, .field-l.bad select { border-color: #c23a1d; }
.field-l.bad .pills span { border-color: #c23a1d; }
.pills { display: flex; flex-wrap: wrap; gap: 8px; }
.pills label { position: relative; }
.pills input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.pills span { display: inline-block; padding: 11px 15px; border-radius: 999px; border: 1.5px solid #d9d1c4; background: #fffdf9; color: var(--paper-ink); font-size: 15px; font-weight: 400; cursor: pointer; transition: all .15s; }
.pills input:checked + span { background: var(--paper-ink); color: var(--cream); border-color: var(--paper-ink); }
.pills input:focus-visible + span { outline: 2px solid var(--heat); outline-offset: 2px; }
.design-summary { margin: 0; padding: 12px 14px; border-radius: 12px; background: #f1ebe1; color: var(--paper-ink); font-size: 14px; font-weight: 400; line-height: 1.5; }
.design-summary a { color: var(--heat-ink); font-weight: 500; }
.consent { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; color: var(--mute-2); cursor: pointer; }
.consent input { width: 20px; height: 20px; margin: 2px 0 0; accent-color: var(--heat); flex: none; color-scheme: light; }
.err { font-style: normal; font-size: 13px; color: #c23a1d; min-height: 0; }
.err:empty { display: none; }
.form-msg { margin: 0; font-size: 14px; color: #c23a1d; min-height: 1em; }
.form-msg:empty { display: none; }
.form-note { margin: -4px 0 0; font-size: 13px; color: var(--mute-2); text-align: center; }
.demo-note { color: var(--heat-ink); }
.form-note a { color: var(--heat-ink); font-weight: 500; text-underline-offset: 3px; }
.ok { text-align: start; padding: 10px 4px; }
.ok h3 { font-size: clamp(56px, 7vw, 90px); margin-bottom: 12px; }
.ok p { margin: 0; font-size: 18px; color: var(--mute-2); }

/* ---------- patent: copy beside the real FIG. 1 on a blueprint panel, with a seal stamped on its corner ---------- */
.patent { padding-block: 130px 30px; }
.patent-in { display: grid; grid-template-columns: minmax(0, .82fr) minmax(0, 1.18fr); gap: 56px; align-items: center; }
.patent-copy .sec-title { margin-bottom: 0; }
.patent-fig { position: relative; margin: 0; padding: 34px 30px 22px; border: 1px solid var(--line); border-radius: 26px;
  background-color: #18181b;
  background-image: linear-gradient(rgba(247, 243, 238, .045) 1px, transparent 1px), linear-gradient(90deg, rgba(247, 243, 238, .045) 1px, transparent 1px);
  background-size: 28px 28px; background-position: -1px -1px; }
.patent-fig > img { width: 100%; height: auto; opacity: .92; }
.patent-fig figcaption { margin-top: 14px; font: 500 12px/1.4 var(--mono); letter-spacing: .08em; color: var(--mute); }
:lang(he) .patent-fig figcaption, :lang(ar) .patent-fig figcaption { font-family: var(--body); font-size: 13px; letter-spacing: .02em; }
.seal { position: absolute; top: -34px; inset-inline-end: -26px; width: 128px; height: 128px; transform: rotate(-12deg);
  filter: drop-shadow(0 14px 22px rgba(0, 0, 0, .45)); }
.seal svg { position: absolute; inset: 0; width: 100%; height: 100%; direction: ltr; }
.seal-text { font: 500 11.5px var(--mono); letter-spacing: 1.2px; fill: #1a1210; }
.seal img { position: absolute; inset: 0; margin: auto; width: 44%; height: auto; }
.faq { padding-block: 110px 120px; }
.faq-in { display: grid; grid-template-columns: minmax(0, .7fr) minmax(0, 1.3fr); gap: 40px; }
.faq-list details { border-bottom: 1px solid var(--line); }
.faq-list summary { list-style: none; cursor: pointer; padding: 22px 0; font-size: 19px; font-weight: 500; display: flex; justify-content: space-between; gap: 16px; }
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary::after { content: "+"; font: 400 26px/1 var(--mono); color: var(--heat-2); transition: transform .25s; }
.faq-list details[open] summary::after { transform: rotate(45deg); }
.faq-list p { margin: 0 0 22px; color: var(--mute); max-width: 60ch; }
/* ---------- closing: one last sign-up moment (copy on the start side, photo on the end side) ---------- */
.closing { padding-block: 0 120px; }
.closing-card { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); border-radius: 26px; overflow: hidden;
  background: var(--ink-2); border: 1px solid var(--line); }
.closing-copy { padding: clamp(36px, 5vw, 72px); display: flex; flex-direction: column; justify-content: center; align-items: flex-start; }
.closing-title { font-size: clamp(56px, 6.4vw, 104px); margin-bottom: 32px; }
.closing-media { position: relative; min-height: 480px; }
.closing-media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 55% 45%; }
/* the photo melts into the card on the side that touches the copy */
.closing-media::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to right, var(--ink-2), rgba(28, 28, 32, 0) 32%); }
[dir="rtl"] .closing-media::after { background: linear-gradient(to left, var(--ink-2), rgba(28, 28, 32, 0) 32%); }
.foot { border-top: 1px solid var(--line); padding-block: 30px calc(30px + env(safe-area-inset-bottom, 0px)); }
.foot-in { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; font-size: 13px; color: var(--mute); }
.foot img { height: 22px; width: auto; }
.foot a { color: var(--mute); text-underline-offset: 3px; transition: color .2s; }
.foot a:hover { color: var(--cream); }

/* ---------- responsive ---------- */
@media (max-width: 980px) {
  .nav-links { display: none; }
  .cfg, .signup-in, .faq-in, .patent-in { grid-template-columns: minmax(0, 1fr); }
  .patent-in { gap: 64px; }
  .signup-head { position: static; }
  .field-grid { grid-template-columns: repeat(2, 1fr); grid-auto-rows: clamp(160px, 40vw, 300px); }
  .tile, .tile-wide, .tile-tall, .tile:nth-child(5) { grid-column: span 2; grid-row: span 1; }
  .tile-tall { grid-row: span 2; }
  .tile:nth-child(3), .tile:nth-child(4) { grid-column: span 1; }
}
@media (max-width: 760px) {
  :root { --nav-h: 58px; }
  body { font-size: 16px; }
  .nav-end .btn { display: none; }
  /* one compact language picker instead of four buttons */
  .lang { display: none; }
  .lang-select { display: block; height: 36px; padding-block: 0; padding-inline: 14px 32px; border: 0; border-radius: 999px; cursor: pointer;
    -webkit-appearance: none; appearance: none; color-scheme: dark; color: var(--cream); font: 500 14px/1 var(--body);
    background: rgba(20, 20, 22, .55) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%23f7f3ee' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat right 13px center / 10px 6px;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .12); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
  [dir="rtl"] .lang-select { background-position: left 13px center; }
  /* sign-up bar: slides up from the bottom edge (main.js decides when) */
  .sticky-cta { display: flex; position: fixed; z-index: 45; left: 12px; right: 12px; bottom: calc(12px + env(safe-area-inset-bottom, 0px));
    min-height: 52px; font-size: 16px; box-shadow: 0 16px 36px -12px rgba(0, 0, 0, .75), 0 10px 30px -12px rgba(255, 106, 61, .6);
    translate: 0 calc(100% + 40px); transition: translate .35s cubic-bezier(.2, .7, .2, 1), transform .2s ease; }
  .sticky-cta.show { translate: none; }
  /* phone hero: headline at the top, text and buttons at the bottom, and a clear band between them
     where the belt and the towel box sit in the film */
  .hero { align-items: stretch; min-height: 100vh; min-height: 100svh; }
  .hero-film { transform: scale(1.32); transform-origin: 32% 100%; }   /* lifts the waist into the clear band; the head is under the headline anyway */
  .hero-in { display: flex; padding-block: calc(var(--nav-h) + 18px) 22px; }
  .hero-copy { display: flex; flex-direction: column; width: 100%; max-width: none; }
  .hero-copy .eyebrow { margin-bottom: 12px; font-size: 13px; }
  /* on a phone the top of the film is already shaded, so the chip is not needed (and would wrap into a block) */
  .hero .eyebrow { padding: 0; border-radius: 0; background: none; backdrop-filter: none; -webkit-backdrop-filter: none; }
  [dir="ltr"] .hero .eyebrow { font-size: 12px; letter-spacing: .05em; }
  .hero-title { font-size: clamp(54px, 16.5vw, 74px); margin-bottom: 0; }
  :lang(ar) .hero-title { font-size: clamp(44px, 13vw, 60px); }
  :lang(ru) .hero-title { font-size: clamp(42px, 12.5vw, 58px); }
  .hero .lead { margin: auto 0 18px; font-size: 16px; max-width: none; }
  .hero-actions { gap: 8px; }
  .hero-actions .btn { min-height: 48px; padding: 0 18px; font-size: 15px; flex: 1 1 auto; }
  .hero .counter { margin-top: 14px; }
  .hero-shade { background: linear-gradient(to bottom, rgba(20,20,22,.72) 0%, rgba(20,20,22,.3) 30%, rgba(20,20,22,0) 40%, rgba(20,20,22,0) 56%,
    rgba(20,20,22,.78) 70%, var(--ink) 100%); }
  .no-3d .story-pin { grid-template-columns: minmax(0, 1fr); gap: 36px; }
  .no-3d .story-fallback { position: static; }
  .specs-in { grid-template-columns: repeat(2, 1fr); }
  .spec { padding-inline: 14px; border-top: 1px solid var(--line); }
  .spec:nth-child(odd) { border-inline-start: 0; padding-inline-start: 0; }
  .spec:nth-child(-n+2) { border-top: 0; }
  .story { height: 400vh; }
  .story-copy { inset: auto 0 0 0; width: auto; height: 42%; align-items: start; padding: 22px var(--gut-r) 0 var(--gut);
    background: linear-gradient(to top, var(--ink) 60%, rgba(20,20,22,0)); }
  .step h2 { font-size: clamp(40px, 11vw, 60px); margin-bottom: 10px; }
  .step p { font-size: 15px; }
  .story-rail { display: none; }
  .story-hint { display: none; }
  .cfg-grid, .row2 { grid-template-columns: minmax(0, 1fr); }
  /* configurator: the model stays pinned under the menu while the options scroll beneath it */
  .cfg-stage { position: sticky; top: calc(var(--nav-h) + env(safe-area-inset-top, 0px) + 8px); z-index: 3;
    aspect-ratio: auto; height: min(38vh, 330px); box-shadow: 0 22px 30px -16px rgba(0, 0, 0, .9); }
  .cfg-tabs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4px; padding: 4px; border-radius: 999px;
    background: rgba(255, 255, 255, .04); box-shadow: inset 0 0 0 1px var(--line); }
  .cfg-tabs button { border: 0; background: none; color: var(--mute); font: 500 14px/1 var(--body); padding: 11px 6px; border-radius: 999px; cursor: pointer; }
  .cfg-tabs button[aria-pressed="true"] { background: var(--cream); color: var(--paper-ink); }
  .cfg-panel[data-tab="1"] [data-pane]:not([data-pane~="1"]),
  .cfg-panel[data-tab="2"] [data-pane]:not([data-pane~="2"]),
  .cfg-panel[data-tab="3"] [data-pane]:not([data-pane~="3"]) { display: none; }
  .slots { gap: 4px; }
  .slot { font-size: 10px; min-height: 56px; }
  .bib { padding: 24px 18px 28px; }
  .patent { padding-block: 90px 10px; }
  .patent-fig { padding: 26px 14px 16px; }
  .seal { width: 92px; height: 92px; top: -30px; inset-inline-end: -6px; }
  .field, .signup { padding-block: 90px; }
  .closing { padding-bottom: 90px; }
  .closing-card { grid-template-columns: minmax(0, 1fr); }
  .closing-media { order: -1; min-height: 0; aspect-ratio: 4 / 3; }
  .closing-media::after, [dir="rtl"] .closing-media::after { background: linear-gradient(to top, var(--ink-2), rgba(28, 28, 32, 0) 35%); }
  .closing-copy { padding: 8px 22px 30px; }
  .closing-title { font-size: clamp(48px, 14vw, 64px); margin-bottom: 24px; }
}
@media (prefers-reduced-motion: reduce) {
  .step, .tile img, .tile video, .btn, .sticky-cta { transition: none; }
  .pulse, .story-hint::after { animation: none; }
}
