/* ==========================================================================
   Cardly — base.css
   Tokens (light + dark), reset, type, layout, header, footer, buttons,
   forms, reveal, story engine, device mocks. Page styles live next to it.
   ========================================================================== */

@font-face {
  font-family: "Inter";
  src: url("../fonts/InterVariable.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

/* ---------- Tokens ------------------------------------------------------ */

:root {
  color-scheme: light dark;

  /* neutrals — light */
  --bg: #ffffff;
  --bg-alt: #f5f5f7;
  --surface: #ffffff;
  --surface-2: #f5f5f7;
  --surface-3: #e8e8ed;
  --text: #1d1d1f;
  --text-2: #6e6e73;
  --text-3: #86868b;
  --line: rgba(0, 0, 0, 0.1);
  --line-strong: rgba(0, 0, 0, 0.18);
  --shadow-1: 0 1px 2px rgba(0, 0, 0, 0.04), 0 4px 16px rgba(0, 0, 0, 0.06);
  --shadow-2: 0 2px 6px rgba(0, 0, 0, 0.05), 0 24px 60px rgba(0, 0, 0, 0.12);
  --header-bg: rgba(255, 255, 255, 0.72);
  --device-frame: #1d1d1f;
  --device-ring: rgba(0, 0, 0, 0.08);

  /* theme accents (overridden per page) */
  --accent: #2b7199;
  --accent-ink: #2b7199;
  --on-accent: #ffffff;
  --accent-soft: rgba(43, 113, 153, 0.1);
  --tint: #f2f7fa;
  --grad: linear-gradient(135deg, #9dc1d4, #50bcff);

  /* icon palette — decorative only, never small text */
  --c-orange: #f5aa42;
  --c-coral: #eb624e;
  --c-sky: #50bcff;
  --c-sky-light: #89ddff;
  --c-steel: #9dc1d4;

  /* type */
  --font: "Inter", -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --fs-hero: clamp(36px, 8.6vw, 92px);
  --fs-h2: clamp(30px, 6.4vw, 60px);
  --fs-h3: clamp(22px, 2.4vw, 28px);
  --fs-lead: clamp(19px, 2.1vw, 25px);
  --fs-body: 17px;
  --fs-small: 14px;
  --fs-fine: 12px;

  /* layout */
  --max: 980px;
  --max-wide: 1200px;
  --gutter: 16px;
  --header-h: 52px;
  /* iOS: the strip under the status bar / notch (0 elsewhere) */
  --safe-top: env(safe-area-inset-top, 0px);
  --header-bottom: calc(var(--safe-top) + var(--header-h));
  /* Viewport height for the scroll stories. On touch screens site.js pins it
     to the tallest viewport seen, so toolbars sliding in and out don't
     resize anything. */
  --vh: var(--vh-lock, 100svh);
  --section-y: clamp(88px, 12vw, 168px);
  --radius: 28px;
  --radius-sm: 18px;
  --radius-xs: 12px;

  /* motion */
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
  --ease-spring: cubic-bezier(0.34, 1.4, 0.64, 1);
  --dur: 0.6s;
}

@media (min-width: 734px) {
  :root { --gutter: 32px; }
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #000000;
    --bg-alt: #0f0f11;
    --surface: #1c1c1e;
    --surface-2: #161618;
    --surface-3: #2c2c2e;
    --text: #f5f5f7;
    --text-2: #a1a1a6;
    --text-3: #86868b;
    --line: rgba(255, 255, 255, 0.12);
    --line-strong: rgba(255, 255, 255, 0.22);
    --shadow-1: 0 1px 2px rgba(0, 0, 0, 0.4), 0 4px 16px rgba(0, 0, 0, 0.3);
    --shadow-2: 0 2px 6px rgba(0, 0, 0, 0.4), 0 24px 60px rgba(0, 0, 0, 0.55);
    --header-bg: rgba(22, 22, 24, 0.72);
    --device-frame: #2c2c2e;
    --device-ring: rgba(255, 255, 255, 0.14);

    --accent-ink: #8ccbea;
    --accent-soft: rgba(140, 203, 234, 0.14);
    --tint: #10171b;
  }
}

/* Apple-style dark band. In dark mode it becomes an elevated surface. */
.section--inverse {
  --bg: #000000;
  --bg-alt: #111113;
  --surface: #1c1c1e;
  --surface-2: #161618;
  --surface-3: #2c2c2e;
  --text: #f5f5f7;
  --text-2: #a1a1a6;
  --text-3: #86868b;
  --line: rgba(255, 255, 255, 0.12);
  --line-strong: rgba(255, 255, 255, 0.22);
  --device-frame: #2c2c2e;
  --device-ring: rgba(255, 255, 255, 0.14);
  --accent-ink: var(--accent-ink-dark, #8ccbea);
  --accent-soft: var(--accent-soft-dark, rgba(140, 203, 234, 0.14));
  color-scheme: dark;
  background: var(--bg);
  color: var(--text);
}

@media (prefers-color-scheme: dark) {
  .section--inverse {
    --bg: #111113;
    --surface: #1f1f22;
    --surface-2: #19191b;
  }
}

/* ---------- Page themes ------------------------------------------------- */

.theme-personal {
  --accent: #c9452f;
  --accent-ink: #b93c29;
  --accent-ink-dark: #ff8f75;
  --accent-soft: rgba(235, 98, 78, 0.1);
  --accent-soft-dark: rgba(255, 143, 117, 0.16);
  --tint: #fff5ee;
  --grad: linear-gradient(135deg, #f5aa42 0%, #eb624e 100%);
}

.theme-business {
  --accent: #0b6fd0;
  --accent-ink: #0a66c2;
  --accent-ink-dark: #6cc4ff;
  --accent-soft: rgba(11, 111, 208, 0.09);
  --accent-soft-dark: rgba(108, 196, 255, 0.15);
  --tint: #eef6fd;
  --grad: linear-gradient(135deg, #89ddff 0%, #50bcff 45%, #0b6fd0 100%);
}

.theme-about {
  --accent: #2b7199;
  --accent-ink: #2b7199;
  --accent-ink-dark: #8ccbea;
  --tint: #f2f7fa;
  --grad: linear-gradient(135deg, #dbe8ef 0%, #9dc1d4 45%, #50bcff 100%);
}

@media (prefers-color-scheme: dark) {
  .theme-personal { --accent-ink: #ff8f75; --accent-soft: rgba(255, 143, 117, 0.16); --tint: #1a1210; }
  .theme-business { --accent-ink: #6cc4ff; --accent-soft: rgba(108, 196, 255, 0.15); --tint: #0b141e; }
  .theme-about { --accent-ink: #8ccbea; --tint: #10171b; }
}

/* ---------- Reset ------------------------------------------------------- */

*,
*::before,
*::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: calc(var(--header-bottom) + 16px);
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: var(--fs-body);
  line-height: 1.47;
  letter-spacing: -0.011em;
  font-optical-sizing: auto;
  font-feature-settings: "cv11", "ss01";
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}

[hidden] { display: none !important; }
img, svg, video { display: block; max-width: 100%; }
img { height: auto; }
button, input, select, textarea { font: inherit; color: inherit; letter-spacing: inherit; }
button { cursor: pointer; }
h1, h2, h3, h4, p, ul, ol, figure, blockquote, dl, dd { margin: 0; }
:where(ul[role="list"], ol[role="list"]) { list-style: none; padding: 0; }
a { color: inherit; text-decoration: none; }
a:hover { text-decoration: none; }
strong, b { font-weight: 600; }

:focus-visible {
  outline: 2px solid var(--accent-ink);
  outline-offset: 3px;
  border-radius: 6px;
}

::selection { background: var(--accent-soft); }

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0);
  white-space: nowrap; border: 0;
}

.skip-link {
  position: fixed;
  top: 8px; left: 8px;
  z-index: 1000;
  padding: 10px 16px;
  border-radius: 999px;
  background: var(--text);
  color: var(--bg);
  font-size: var(--fs-small);
  transform: translateY(-200%);
}
.skip-link:focus { transform: none; }

/* ---------- Typography -------------------------------------------------- */

.eyebrow {
  display: block;
  margin-bottom: 14px;
  color: var(--accent-ink);
  font-size: clamp(15px, 1.6vw, 19px);
  font-weight: 600;
  letter-spacing: -0.01em;
}

.headline,
.h2,
.h3 {
  font-weight: 700;
  text-wrap: balance;
}

.headline {
  font-size: var(--fs-hero);
  line-height: 1.04;
  letter-spacing: -0.035em;
}

.h2 {
  font-size: var(--fs-h2);
  line-height: 1.07;
  letter-spacing: -0.03em;
}

.h3 {
  font-size: var(--fs-h3);
  line-height: 1.16;
  letter-spacing: -0.02em;
  font-weight: 650;
}

.lead {
  font-size: var(--fs-lead);
  line-height: 1.32;
  letter-spacing: -0.017em;
  font-weight: 500;
  color: var(--text);
  text-wrap: pretty;
}

/* Apple pattern: grey paragraph with key phrases in full-strength ink */
.copy {
  color: var(--text-2);
  font-size: clamp(17px, 1.7vw, 21px);
  line-height: 1.42;
  font-weight: 500;
  letter-spacing: -0.016em;
  text-wrap: pretty;
}
.copy strong { color: var(--text); font-weight: 600; }
.copy + .copy { margin-top: 0.9em; }

.small { font-size: var(--fs-small); color: var(--text-2); }
.fine { font-size: var(--fs-fine); line-height: 1.5; color: var(--text-3); letter-spacing: 0; }

.gradient-text {
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.tabular { font-variant-numeric: tabular-nums; }

sup.fn {
  font-size: 0.55em;
  line-height: 0;
  vertical-align: super;
  font-weight: 500;
}
sup.fn a { color: inherit; opacity: 0.7; padding: 0 1px; }
sup.fn a:hover { opacity: 1; }

/* ---------- Layout ------------------------------------------------------ */

.container {
  width: min(100% - 2 * var(--gutter), var(--max));
  margin-inline: auto;
}
.container--wide { width: min(100% - 2 * var(--gutter), var(--max-wide)); }
.container--narrow { width: min(100% - 2 * var(--gutter), 720px); }

.section {
  position: relative;
  padding-block: var(--section-y);
}
.section--alt { background: var(--bg-alt); }
.section--tint { background: var(--tint); }
.section--tight { padding-block: calc(var(--section-y) * 0.6); }
.section--flush-top { padding-top: 0; }

.section-head {
  max-width: 820px;
  margin-bottom: clamp(40px, 6vw, 72px);
}
.section-head--center {
  margin-inline: auto;
  text-align: center;
}
.section-head .copy,
.section-head .lead { margin-top: 20px; }
.section-head--center .copy { margin-inline: auto; max-width: 680px; }

.center { text-align: center; }

.grid-2 {
  display: grid;
  gap: 20px;
}
.grid-3 {
  display: grid;
  gap: 20px;
}
@media (min-width: 734px) {
  .grid-2 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 1068px) {
  .grid-3 { grid-template-columns: repeat(3, 1fr); }
}

.split {
  display: grid;
  gap: clamp(40px, 6vw, 80px);
  align-items: center;
}
@media (min-width: 1068px) {
  .split { grid-template-columns: 1fr 1fr; }
  .split--media-first > :first-child { order: 2; }
}

/* ---------- Header ------------------------------------------------------ */

.site-header {
  position: sticky;
  /* stick where the page starts on iOS, below the status bar, so the header
     doesn't first travel up behind the notch */
  top: var(--safe-top);
  z-index: 100;
  height: var(--header-h);
  background: var(--header-bg);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s var(--ease);
  view-transition-name: site-header;
}
.site-header.is-scrolled { border-bottom-color: var(--line); }

.site-header__inner {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 12px;
  height: 100%;
  width: min(100% - 2 * var(--gutter), var(--max-wide));
  margin-inline: auto;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  justify-self: start;
  font-weight: 700;
  font-size: 19px;
  letter-spacing: -0.03em;
}
.brand img { width: 28px; height: 28px; border-radius: 7px; }

/* Segmented switch: «Для себя | Для бизнеса» */
.switch {
  position: relative;
  display: inline-grid;
  grid-auto-flow: column;
  grid-auto-columns: 1fr;
  padding: 3px;
  border-radius: 999px;
  background: var(--surface-3);
  isolation: isolate;
}
.switch__opt {
  position: relative;
  z-index: 1;
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: -0.01em;
  text-align: center;
  white-space: nowrap;
  color: var(--text-2);
  transition: color 0.3s var(--ease);
}
.switch__opt:hover { color: var(--text); }
.switch__opt[aria-current="page"] { color: var(--on-accent); }
.switch__pill {
  position: absolute;
  z-index: 0;
  top: 3px;
  bottom: 3px;
  left: 3px;
  width: calc(50% - 3px);
  border-radius: 999px;
  background: var(--accent);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
  opacity: 0;
}
/* Page transitions: the pill is only captured while it is visible, so moving
   between «Для себя» and «Для бизнеса» slides it, and leaving for any other
   page fades it out in place. The labels get their own layers so they stay
   above the sliding pill. */
.switch:has(.switch__opt:first-child[aria-current="page"]) .switch__pill {
  opacity: 1;
  view-transition-name: switch-pill;
}
.switch:has(.switch__opt:nth-child(2)[aria-current="page"]) .switch__pill {
  opacity: 1;
  transform: translateX(100%);
  view-transition-name: switch-pill;
}
.switch__opt:first-child { view-transition-name: switch-label-personal; }
.switch__opt:nth-child(2) { view-transition-name: switch-label-business; }

.site-nav {
  display: none;
  justify-self: end;
  align-items: center;
  gap: 24px;
  font-size: 14px;
  font-weight: 500;
}
.site-nav a { white-space: nowrap; }
.site-nav a:not(.btn) { color: var(--text-2); transition: color 0.2s; }
.site-nav a:not(.btn):hover { color: var(--text); }

.menu-btn {
  justify-self: end;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  margin-right: -8px;
  border: 0;
  border-radius: 50%;
  background: transparent;
}
.menu-btn span {
  display: block;
  width: 18px;
  height: 1.5px;
  background: var(--text);
  border-radius: 2px;
  transition: transform 0.35s var(--ease), opacity 0.2s;
  grid-area: 1 / 1;
}
.menu-btn span:first-child { transform: translateY(-4px); }
.menu-btn span:last-child { transform: translateY(4px); }
.menu-btn[aria-expanded="true"] span:first-child { transform: rotate(45deg); }
.menu-btn[aria-expanded="true"] span:last-child { transform: rotate(-45deg); }

.menu-sheet {
  position: fixed;
  inset: var(--header-bottom) 0 0;
  z-index: 99;
  padding: 24px var(--gutter) 40px;
  background: var(--bg);
  overflow-y: auto;
  opacity: 0;
  transform: translateY(-8px);
  transition: opacity 0.3s var(--ease), transform 0.3s var(--ease), visibility 0s 0.3s;
  visibility: hidden;
}
.menu-sheet.is-open {
  opacity: 1;
  transform: none;
  visibility: visible;
  transition: opacity 0.3s var(--ease), transform 0.3s var(--ease);
}
.menu-sheet__links {
  display: grid;
  gap: 4px;
  margin-bottom: 32px;
}
.menu-sheet__links a {
  padding: 8px 0;
  font-size: 28px;
  font-weight: 650;
  letter-spacing: -0.03em;
}
.menu-sheet__cta { display: grid; gap: 12px; }

@media (max-width: 733px) {
  .brand__name { display: none; }
  .switch__opt { padding: 6px 12px; font-size: 13.5px; }
}
/* Touch screens (phones, tablets): no bar behind the header, just floating
   controls. Computers keep the bar at any window width. The menu
   button is a circle as tall as the switch (38px), so both share a radius. */
@media (hover: none) and (pointer: coarse) {
  .site-header,
  .site-header.is-scrolled {
    background: none;
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
    border-bottom-color: transparent;
  }
  .switch,
  .menu-btn {
    background: var(--surface-3);
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
  }
  .switch__opt { line-height: 20px; }
  .menu-btn { width: 38px; height: 38px; margin-right: 0; }
  .menu-sheet { inset: 0; padding-top: calc(var(--header-bottom) + 24px); }
}
@media (min-width: 1024px) {
  .site-nav { display: inline-flex; }
  .menu-btn,
  .menu-sheet { display: none; }
}

body.menu-open { overflow: hidden; }

/* The page fades out under the header: fully gone at the header's top edge
   (and above it, under the status bar), faster in the lower half
   (opacity 1 − (1 − t)², t from the header's bottom edge to its top). On
   computers it sits under the frosted bar. */
body::before {
  content: "";
  position: fixed;
  z-index: 99;
  inset: 0 0 auto;
  height: var(--header-bottom);
  pointer-events: none;
  background: linear-gradient(
    to bottom,
    var(--bg) var(--safe-top),
    color-mix(in srgb, var(--bg) 93.75%, transparent) calc(var(--safe-top) + var(--header-h) * 0.25),
    color-mix(in srgb, var(--bg) 75%, transparent) calc(var(--safe-top) + var(--header-h) * 0.5),
    color-mix(in srgb, var(--bg) 43.75%, transparent) calc(var(--safe-top) + var(--header-h) * 0.75),
    transparent var(--header-bottom)
  );
}

/* ---------- Buttons & links -------------------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 12px 24px;
  border: 1px solid transparent;
  border-radius: 999px;
  background: var(--accent);
  color: var(--on-accent);
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.015em;
  line-height: 1.1;
  white-space: nowrap;
  transition: transform 0.2s var(--ease), filter 0.2s, background-color 0.2s;
}
.btn:hover { filter: brightness(1.08); }
.btn:active { transform: scale(0.97); }

.btn--secondary {
  background: transparent;
  color: var(--accent-ink);
  border-color: currentColor;
}
.btn--secondary:hover { background: var(--accent-soft); filter: none; }

.btn--quiet {
  background: var(--surface-3);
  color: var(--text);
}

.btn--sm {
  min-height: 32px;
  padding: 6px 14px;
  font-size: 14px;
}

.btn-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 16px;
}
.center .btn-row,
.btn-row--center { justify-content: center; }

.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--accent-ink);
  font-weight: 500;
}
.link-arrow::after {
  content: "›";
  font-size: 1.2em;
  line-height: 1;
  transform: translateY(-1px);
  transition: transform 0.2s var(--ease);
}
.link-arrow:hover::after { transform: translate(3px, -1px); }
.link-arrow--ext::after { content: "↗"; font-size: 0.95em; transform: none; }
.link-arrow--ext:hover::after { transform: translate(2px, -2px); }

/* «Скоро в App Store» — placeholder pills until launch (swap via data-store-url) */
.stores {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.center .stores { justify-content: center; }
.store {
  display: inline-grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  column-gap: 10px;
  min-height: 52px;
  padding: 7px 18px 7px 14px;
  border: 1px solid var(--line-strong);
  border-radius: 14px;
  background: var(--surface);
  color: var(--text);
  text-align: left;
  transition: border-color 0.2s, transform 0.2s var(--ease);
  /* both buttons equally wide: half the row, at most 200px */
  width: min(calc((100% - 10px) / 2), 200px);
}
.store:hover { border-color: var(--text-3); }
.store:active { transform: scale(0.97); }
.store svg { grid-row: span 2; width: 22px; height: 22px; color: var(--text-2); }
.store small {
  font-size: 11px;
  line-height: 1.1;
  color: var(--text-2);
  font-weight: 500;
  letter-spacing: 0;
}
.store b {
  font-size: 17px;
  line-height: 1.15;
  font-weight: 650;
  letter-spacing: -0.02em;
}

/* ---------- Cards ------------------------------------------------------- */

.card {
  position: relative;
  border-radius: var(--radius);
  background: var(--surface);
  padding: clamp(24px, 3.4vw, 40px);
  overflow: hidden;
}
.section--alt .card,
.section--tint .card { box-shadow: none; }
.section:not(.section--alt):not(.section--tint):not(.section--inverse) .card { background: var(--surface-2); }

.card .h3 + .copy,
.card .h3 + p { margin-top: 12px; }
.card .copy { font-size: 17px; }

.icon-badge {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  margin-bottom: 18px;
  border-radius: 12px;
  background: var(--accent-soft);
  color: var(--accent-ink);
}
.icon-badge svg { width: 24px; height: 24px; }

/* ---------- Rail (horizontal scroll-snap gallery) ----------------------- */

.rail {
  --rail-card: min(84vw, 380px);
  position: relative;
}
.rail__track {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: var(--rail-card);
  gap: 20px;
  padding-inline: max(var(--gutter), (100vw - var(--max-wide)) / 2);
  padding-block: 8px 24px;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory;
  scroll-padding-inline: max(var(--gutter), (100vw - var(--max-wide)) / 2);
  scrollbar-width: none;
}
.rail__track::-webkit-scrollbar { display: none; }
.rail__track > * { scroll-snap-align: start; }
.rail__controls {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  width: min(100% - 2 * var(--gutter), var(--max-wide));
  margin: 8px auto 0;
}
.rail__btn {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 50%;
  background: var(--surface-3);
  color: var(--text);
  transition: opacity 0.2s, background-color 0.2s;
}
.rail__btn:hover { background: var(--line-strong); }
.rail__btn:disabled { opacity: 0.35; cursor: default; }
.rail__btn svg { width: 16px; height: 16px; }

/* ---------- Forms (waitlist) ------------------------------------------- */

.waitlist {
  display: grid;
  gap: 14px;
  width: min(100%, 560px);
  margin-inline: auto;
  text-align: left;
}
.waitlist__row {
  display: grid;
  gap: 10px;
}
@media (min-width: 734px) {
  .waitlist__row { grid-template-columns: 1fr auto; }
}
.field {
  width: 100%;
  min-height: 52px;
  padding: 14px 20px;
  border: 1px solid var(--line-strong);
  border-radius: 14px;
  background: var(--surface);
  color: var(--text);
  font-size: 17px;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.field::placeholder { color: var(--text-3); }
.field:focus {
  outline: none;
  border-color: var(--accent-ink);
  box-shadow: 0 0 0 4px var(--accent-soft);
}
.field[aria-invalid="true"] { border-color: #d70015; }
.waitlist .btn { min-height: 52px; border-radius: 14px; }

.check {
  display: grid;
  grid-template-columns: 22px 1fr;
  gap: 10px;
  align-items: start;
  font-size: 13px;
  line-height: 1.45;
  color: var(--text-2);
  cursor: pointer;
}
.check input {
  appearance: none;
  width: 20px;
  height: 20px;
  margin: 0;
  border: 1.5px solid var(--line-strong);
  border-radius: 6px;
  background: var(--surface);
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: background-color 0.2s, border-color 0.2s;
}
.check input::after {
  content: "";
  width: 10px;
  height: 6px;
  border: 2px solid var(--on-accent);
  border-top: 0;
  border-right: 0;
  transform: rotate(-45deg) translate(1px, -1px) scale(0);
  transition: transform 0.2s var(--ease-spring);
}
.check input:checked { background: var(--accent); border-color: var(--accent); }
.check input:checked::after { transform: rotate(-45deg) translate(1px, -1px) scale(1); }
.check input[aria-invalid="true"] { border-color: #d70015; }
.check a { color: var(--accent-ink); text-decoration: underline; text-underline-offset: 2px; }

.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

.form-status {
  min-height: 1.4em;
  font-size: 14px;
  color: var(--text-2);
}
.form-status[data-state="error"] { color: #d70015; }
@media (prefers-color-scheme: dark) {
  .form-status[data-state="error"] { color: #ff6961; }
  .field[aria-invalid="true"],
  .check input[aria-invalid="true"] { border-color: #ff6961; }
}

.waitlist-done {
  display: grid;
  justify-items: center;
  gap: 10px;
  padding: 28px;
  border-radius: var(--radius);
  background: var(--accent-soft);
  text-align: center;
}
.waitlist-done__icon {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--accent);
  color: var(--on-accent);
}
.waitlist-done__icon svg { width: 26px; height: 26px; }

/* ---------- Waitlist section ---------------------------------------------------- */
.waitlist-section__icon {
  width: 88px;
  height: 88px;
  margin: 0 auto 28px;
  border-radius: 20px;
  box-shadow: 0 14px 40px rgba(235, 98, 78, 0.25);
}
.waitlist-section__copy { max-width: 580px; margin: 18px auto 36px; }
.waitlist-wrap { max-width: 560px; margin-inline: auto; }
.waitlist-section__stores { justify-content: center; margin-top: 36px; }
.bwait__dash { margin-top: 28px; }

.step__n {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--accent);
  color: var(--on-accent);
  font-size: 14px;
  font-weight: 700;
}

/* ---------- Footer ------------------------------------------------------ */

.site-footer {
  padding: 40px 0 28px;
  background: var(--bg-alt);
  color: var(--text-2);
  font-size: var(--fs-fine);
  line-height: 1.5;
}
.site-footer a { color: var(--text-2); }
.site-footer a:hover { color: var(--text); text-decoration: underline; }

.footnotes {
  display: grid;
  gap: 10px;
  padding-bottom: 20px;
  margin-bottom: 20px;
  border-bottom: 1px solid var(--line);
}
.footnotes ol {
  display: grid;
  gap: 8px;
  margin: 0;
  padding-left: 1.4em;
}
.footnotes p,
.footnotes li { max-width: 900px; }

.footer-cols {
  display: grid;
  gap: 0;
  margin-bottom: 24px;
}
.footer-col summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 11px 0;
  border-bottom: 1px solid var(--line);
  color: var(--text);
  font-weight: 600;
  list-style: none;
  cursor: pointer;
}
.footer-col summary::-webkit-details-marker { display: none; }
.footer-col summary::after {
  content: "";
  width: 7px;
  height: 7px;
  border: solid var(--text-2);
  border-width: 0 1.5px 1.5px 0;
  transform: rotate(45deg) translateY(-2px);
  transition: transform 0.25s var(--ease);
}
.footer-col[open] summary::after { transform: rotate(-135deg) translateY(-2px); }
.footer-col ul {
  display: grid;
  gap: 8px;
  padding: 12px 0 16px 12px;
  margin: 0;
  list-style: none;
}

@media (min-width: 734px) {
  .footer-cols {
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
  }
  .footer-col summary {
    padding: 0 0 8px;
    border: 0;
    pointer-events: none;
  }
  .footer-col summary::after { display: none; }
  .footer-col ul { padding: 0; }
}

.footer-legal {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 20px;
  justify-content: space-between;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}
.footer-legal__launch { color: var(--text); font-weight: 600; }

/* ---------- Reveal on scroll ------------------------------------------- */

html.js .reveal {
  opacity: 0;
  transform: translateY(20px);
  transition:
    opacity 0.7s var(--ease) var(--d, 0s),
    transform 0.7s var(--ease) var(--d, 0s);
}
html.js .reveal.is-in {
  opacity: 1;
  transform: none;
}
html.js .reveal--scale { transform: scale(0.96) translateY(16px); }

/* While the page-to-page fade runs (html.vt, set in each page's <head>),
   the new page holds still: Safari draws that fade from its own copy of the
   page, so anything animating underneath would jump when the fade ends.
   Fade-ins stay hidden and load animations wait, then both play. */
html.js.vt .reveal.is-in { opacity: 0; transform: translateY(20px); }
html.js.vt .reveal--scale.is-in { transform: scale(0.96) translateY(16px); }
html.vt *,
html.vt *::before,
html.vt *::after { animation-play-state: paused !important; }

/* ---------- Story engine (scroll-driven sticky sections) --------------- */
/* JS sets data-step / --p / --sp on [data-story]. Without JS or with
   reduced motion the story renders as a static vertical sequence. */

.story { position: relative; }

html.js .story[data-story-ready] {
  height: calc(var(--steps, 4) * var(--step-len, var(--vh) * 0.75) + var(--vh) - var(--header-bottom));
}
html.js .story[data-story-ready] .story__stage {
  position: sticky;
  top: var(--header-bottom);
  height: calc(var(--vh) - var(--header-bottom));
  overflow: hidden;
}

/* progress dots, built by story.js */
.story__dots {
  position: absolute;
  z-index: 5;
  right: max(var(--gutter), (100vw - var(--max-wide)) / 2 - 40px);
  top: 50%;
  display: grid;
  gap: 10px;
  transform: translateY(-50%);
}
.story__dots button {
  width: 8px;
  height: 8px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: var(--line-strong);
  transition: height 0.35s var(--ease), background-color 0.35s var(--ease);
}
.story__dots button[aria-current="step"] {
  height: 26px;
  background: var(--accent-ink);
}
@media (max-width: 733px) {
  .story__dots {
    top: auto;
    right: 50%;
    bottom: 14px;
    grid-auto-flow: column;
    transform: translateX(50%);
  }
  .story__dots button[aria-current="step"] { width: 26px; height: 8px; }
}

/* ---------- Controls: segmented, switch, swatches, chips --------------- */

.seg {
  display: inline-flex;
  padding: 3px;
  border-radius: 999px;
  background: var(--surface-3);
}
.seg button {
  padding: 7px 15px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--text-2);
  font-size: 14px;
  font-weight: 600;
  transition: background-color 0.25s var(--ease), color 0.25s var(--ease), box-shadow 0.25s;
}
.seg button[aria-checked="true"] {
  background: var(--surface);
  color: var(--text);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.18);
}
.section--inverse .seg button[aria-checked="true"] { background: #48484a; }

.toggle {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 4px 0;
  border: 0;
  background: transparent;
  color: var(--text);
  font-size: 14px;
  font-weight: 600;
}
.toggle__knob {
  position: relative;
  width: 46px;
  height: 28px;
  border-radius: 999px;
  background: var(--surface-3);
  transition: background-color 0.25s var(--ease);
}
.toggle__knob::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.25);
  transition: transform 0.3s var(--ease-spring);
}
.toggle[aria-checked="true"] .toggle__knob { background: #34c759; }
.toggle[aria-checked="true"] .toggle__knob::after { transform: translateX(18px); }

.swatches {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}
.swatch {
  position: relative;
  width: 38px;
  height: 38px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: var(--sw);
  box-shadow: inset 0 0 0 1px var(--line-strong);
  transition: transform 0.2s var(--ease);
}
.swatch:hover { transform: scale(1.08); }
.swatch[aria-pressed="true"]::after {
  content: "";
  position: absolute;
  inset: -5px;
  border-radius: 50%;
  border: 2px solid var(--text);
}
.swatch--picker {
  display: grid;
  place-items: center;
  background: conic-gradient(#eb624e, #f5aa42, #ffe066, #34c759, #50bcff, #8e7cc3, #eb624e);
}
/* once a custom colour is picked, the swatch shows it inside a rainbow rim */
.swatch--picker.is-set {
  background:
    radial-gradient(circle, var(--sw) 0 62%, transparent 63%),
    conic-gradient(#eb624e, #f5aa42, #ffe066, #34c759, #50bcff, #8e7cc3, #eb624e);
}
.swatch--picker input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 15px 8px 11px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: transparent;
  color: var(--text-2);
  font-size: 14px;
  font-weight: 600;
  transition: background-color 0.2s, color 0.2s, border-color 0.2s;
}
.chip::before {
  content: "";
  width: 15px;
  height: 15px;
  border-radius: 50%;
  border: 1.5px solid currentColor;
  transition: background-color 0.2s, box-shadow 0.2s;
}
.chip[aria-pressed="true"] {
  border-color: transparent;
  background: var(--accent-soft);
  color: var(--accent-ink);
}
.chip[aria-pressed="true"]::before {
  background: currentColor;
  box-shadow: inset 0 0 0 3px var(--bg);
}

/* ---------- Device mocks ----------------------------------------------- */

/* Proportions of the baseline iPhone 17: body 71.5 × 149.6 mm, 6.3″
   2622 × 1206 display (402 × 874 pt) → 2.45 mm bezel = 3.43% of the width.
   Corner radii and the Dynamic Island (≈126 × 37 pt) are approximations. */
.phone {
  --w: 300px;
  position: relative;
  width: var(--w);
  aspect-ratio: 71.5 / 149.6;
  padding: calc(var(--w) * 0.0343);
  border-radius: calc(var(--w) * 0.177);
  background: var(--device-frame);
  box-shadow: 0 0 0 1px var(--device-ring), var(--shadow-2);
  flex: none;
}
.phone__screen {
  position: relative;
  height: 100%;
  overflow: hidden;
  border-radius: calc(var(--w) * 0.143);
  background: var(--app-bg, #f2f2f7);
  color: var(--app-text, #1d1d1f);
  font-size: calc(var(--w) * 0.044);
  line-height: 1.3;
  letter-spacing: -0.01em;
  isolation: isolate;
}
.phone__status {
  position: relative;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: calc(var(--w) * 0.144);
  padding: 0 calc(var(--w) * 0.075) 0 calc(var(--w) * 0.09);
  font-size: calc(var(--w) * 0.048);
  font-weight: 600;
}
.phone__island {
  position: absolute;
  top: calc(var(--w) * 0.0255);
  left: 50%;
  width: calc(var(--w) * 0.292);
  height: calc(var(--w) * 0.086);
  border-radius: 999px;
  background: #000;
  transform: translateX(-50%);
}
.phone__icons {
  display: inline-flex;
  align-items: center;
  gap: calc(var(--w) * 0.015);
}
.phone__icons i {
  display: block;
  font-style: normal;
}
.sig {
  display: inline-flex;
  align-items: flex-end;
  gap: 1.5px;
  height: calc(var(--w) * 0.035);
}
.sig b {
  width: calc(var(--w) * 0.01);
  background: currentColor;
  border-radius: 1px;
}
.sig b:nth-child(1) { height: 30%; }
.sig b:nth-child(2) { height: 55%; }
.sig b:nth-child(3) { height: 78%; }
.sig b:nth-child(4) { height: 100%; }
.batt {
  width: calc(var(--w) * 0.075);
  height: calc(var(--w) * 0.037);
  border: 1.5px solid currentColor;
  border-radius: calc(var(--w) * 0.012);
  padding: 1px;
  opacity: 0.9;
}
.batt::before {
  content: "";
  display: block;
  width: 80%;
  height: 100%;
  border-radius: 1px;
  background: currentColor;
}

/* The guest's card is a QR code (same as on the Apple/Google Wallet pass).
   Decorative pattern — swap for real art later. */
.qr {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 1;
  color: #111;
  shape-rendering: crispEdges;
}

.browser {
  position: relative;
  border-radius: 14px;
  background: var(--surface);
  box-shadow: 0 0 0 1px var(--line), var(--shadow-2);
  overflow: hidden;
}
.browser__bar {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 36px;
  padding: 0 14px;
  border-bottom: 1px solid var(--line);
  background: var(--surface-2);
}
.browser__bar i {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: var(--surface-3);
}
.browser__url {
  margin-inline: auto;
  padding: 3px 40px;
  border-radius: 7px;
  background: var(--surface-3);
  color: var(--text-2);
  font-size: 11px;
  font-weight: 500;
}

/* Mock caption chip («иллюстрация») */
.mock-note {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 16px;
  color: var(--text-3);
  font-size: 12px;
}

/* ---------- Cross-link tile -------------------------------------------- */

.crosslink {
  display: grid;
  gap: 18px;
  align-items: center;
  padding: clamp(28px, 5vw, 56px);
  border-radius: var(--radius);
  color: #fff;
  overflow: hidden;
  position: relative;
  isolation: isolate;
}
.crosslink::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: var(--x-grad);
}
.crosslink .h2 { font-size: clamp(28px, 4vw, 44px); }
.crosslink p { color: rgba(255, 255, 255, 0.85); font-size: 19px; font-weight: 500; }
.crosslink .btn { background: #fff; color: #111; justify-self: start; }
@media (min-width: 734px) {
  .crosslink { grid-template-columns: 1fr auto; }
}

/* ---------- FAQ --------------------------------------------------------- */

.faq { border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 22px 0;
  font-size: clamp(18px, 2vw, 21px);
  font-weight: 600;
  letter-spacing: -0.02em;
  list-style: none;
  cursor: pointer;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+";
  flex: none;
  color: var(--accent-ink);
  font-size: 28px;
  font-weight: 300;
  line-height: 1;
  transition: transform 0.3s var(--ease);
}
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details > div {
  padding: 0 0 24px;
  max-width: 760px;
  color: var(--text-2);
}
.faq details > div p + p { margin-top: 10px; }

/* ---------- Page transitions (progressive enhancement) ----------------- */

@view-transition { navigation: auto; }
::view-transition-old(root),
::view-transition-new(root) { animation-duration: 0.35s; }
::view-transition-group(switch-pill),
::view-transition-group(switch-label-personal),
::view-transition-group(switch-label-business) { animation-duration: 0.45s; animation-timing-function: var(--ease); }

/* ---------- Reduced motion --------------------------------------------- */

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
  html.js .reveal { opacity: 1; transform: none; }
  @view-transition { navigation: none; }
}
