/* ============================================================
   MaxCargo — Public website design system
   Light, Apple-like, serious logistics. Russian-first.
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Golos+Text:wght@400;500;600;700;800;900&display=swap');

/* ---------- Tokens ---------- */
:root {
  /* Brand accent — overridable via localStorage */
  --accent: #0B5FD6;
  --accent-press: #084ba8;
  --accent-soft: color-mix(in srgb, var(--accent) 10%, white);
  --accent-tint: color-mix(in srgb, var(--accent) 6%, white);

  /* Neutrals (light) */
  --bg: #ffffff;
  --surface: #f6f7f9;
  --surface-2: #eef0f4;
  --ink: #0c1019;
  --ink-2: #4a5365;
  --ink-3: #79828f;
  --line: #e6e8ee;
  --line-strong: #d7dbe3;
  --white: #ffffff;

  /* Status colors */
  --ok: #11875a;
  --ok-soft: #e6f4ec;
  --warn: #b7791f;

  /* Geometry */
  --radius-sm: 10px;
  --radius: 16px;
  --radius-lg: 22px;
  --radius-xl: 28px;

  /* Spacing rhythm (density-aware) */
  --section-y: 120px;
  --gutter: 24px;
  --maxw: 1200px;

  /* Shadows — soft, Apple-like */
  --shadow-sm: 0 1px 2px rgba(12,16,25,.05), 0 1px 1px rgba(12,16,25,.03);
  --shadow-md: 0 8px 24px rgba(12,16,25,.06), 0 2px 6px rgba(12,16,25,.04);
  --shadow-lg: 0 24px 60px rgba(12,16,25,.10), 0 6px 16px rgba(12,16,25,.05);

  --ease: cubic-bezier(.22,.61,.36,1);

  color-scheme: light;
}

[data-theme="dark"] {
  --accent-soft: color-mix(in srgb, var(--accent) 22%, #11151d);
  --accent-tint: color-mix(in srgb, var(--accent) 14%, #0b0e14);
  --bg: #0a0d13;
  --surface: #11151d;
  --surface-2: #161b25;
  --ink: #f3f5f9;
  --ink-2: #aab3c2;
  --ink-3: #79828f;
  --line: #222936;
  --line-strong: #2c3442;
  --white: #11151d;
  --ok-soft: #11291f;
  --shadow-sm: 0 1px 2px rgba(0,0,0,.4);
  --shadow-md: 0 10px 30px rgba(0,0,0,.45);
  --shadow-lg: 0 30px 70px rgba(0,0,0,.55);
  color-scheme: dark;
}

[data-density="compact"] { --section-y: 88px; }
[data-density="spacious"] { --section-y: 150px; }

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  font-family: 'Golos Text', system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  font-size: 17px;
  letter-spacing: -0.01em;
  overflow-x: hidden;
  transition: background .4s var(--ease), color .4s var(--ease);
}

img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; }

::selection { background: color-mix(in srgb, var(--accent) 22%, transparent); }

/* ---------- Layout ---------- */
.wrap { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: var(--gutter); }
.section { padding-block: var(--section-y); position: relative; }
.section--surface { background: var(--surface); }

/* ---------- Typography ---------- */
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 13px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase;
  color: var(--accent);
}
.eyebrow::before {
  content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--accent);
}
h1, h2, h3 { letter-spacing: -0.03em; line-height: 1.05; font-weight: 700; }
.display {
  font-size: clamp(40px, 6.4vw, 74px);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1.02;
}
.h2 { font-size: clamp(30px, 3.6vw, 48px); font-weight: 700; letter-spacing: -0.035em; }
.h3 { font-size: clamp(20px, 2vw, 24px); font-weight: 600; letter-spacing: -0.02em; }
.lede { font-size: clamp(18px, 1.5vw, 21px); color: var(--ink-2); line-height: 1.5; }
.muted { color: var(--ink-2); }
.section-head { max-width: 720px; }
.section-head .lede { margin-top: 18px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  height: 50px; padding-inline: 24px; border-radius: 999px;
  font-weight: 600; font-size: 16px; letter-spacing: -0.01em;
  border: 1px solid transparent; white-space: nowrap;
  transition: transform .25s var(--ease), background .2s, box-shadow .25s, border-color .2s, color .2s;
}
.btn:active { transform: scale(.975); }
.btn--primary { background: var(--accent); color: #fff; box-shadow: 0 6px 18px color-mix(in srgb, var(--accent) 30%, transparent); }
.btn--primary:hover { background: var(--accent-press); box-shadow: 0 10px 26px color-mix(in srgb, var(--accent) 38%, transparent); }
.btn--ghost { background: transparent; color: var(--ink); border-color: var(--line-strong); }
.btn--ghost:hover { background: var(--surface); border-color: var(--ink-3); }
.btn--light { background: var(--surface-2); color: var(--ink); }
.btn--light:hover { background: var(--line-strong); }
.btn .arrow { transition: transform .25s var(--ease); }
.btn:hover .arrow { transform: translateX(3px); }
.btn--sm { height: 42px; padding-inline: 18px; font-size: 15px; }

/* ---------- App store badges ---------- */
.store-badges { display: flex; flex-wrap: wrap; gap: 12px; }
.store-badge {
  display: inline-flex; align-items: center; gap: 12px; height: 56px; padding: 0 22px;
  border-radius: 14px; background: var(--ink); color: #fff; border: 1px solid var(--ink);
  transition: transform .25s var(--ease), box-shadow .25s, background .2s;
}
.store-badge:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.store-badge:active { transform: scale(.98); }
.store-badge svg { width: 25px; height: 25px; flex: none; }
.store-badge__t { display: flex; flex-direction: column; line-height: 1; }
.store-badge__t small { font-size: 11px; opacity: .78; font-weight: 500; }
.store-badge__t b { font-size: 15.5px; font-weight: 600; letter-spacing: -0.01em; margin-top: 3px; }
[data-theme="dark"] .store-badge { background: #fff; color: #0a0d13; border-color: #fff; }
.store-badge--light { background: #fff; color: var(--ink); border-color: #fff; }
.store-badge--light:hover { background: rgba(255,255,255,.9); }
.hero__hint { display: inline-flex; align-items: center; gap: 7px; margin-top: 18px; font-size: 15px; font-weight: 500; color: var(--ink-2); }
.hero__hint:hover { color: var(--accent); }
.hero__hint .arrow { transition: transform .25s var(--ease); }
.hero__hint:hover .arrow { transform: translateX(3px); }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: color-mix(in srgb, var(--bg) 72%, transparent);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid transparent;
  transition: border-color .3s, background .3s;
}
.site-header.is-scrolled { border-bottom-color: var(--line); }
.nav { display: flex; align-items: center; gap: 28px; height: 68px; }
.brand { display: inline-flex; align-items: center; gap: 11px; font-weight: 700; letter-spacing: -0.03em; font-size: 19px; }
.brand__mark { width: 30px; height: 30px; flex: none; }
.brand b { font-weight: 800; }
.nav__links { display: flex; align-items: center; gap: 4px; margin-left: 14px; }
.nav__links a {
  padding: 8px 13px; border-radius: 999px; font-size: 15px; font-weight: 500; color: var(--ink-2);
  white-space: nowrap; transition: color .2s, background .2s;
}
.nav__links a:hover { color: var(--ink); background: var(--surface); }
.nav__spacer { flex: 1; }
.nav__actions { display: flex; align-items: center; gap: 10px; }
.nav__toggle { display: none; }

/* Mobile nav */
.burger {
  display: none; width: 42px; height: 42px; border-radius: 12px; border: 1px solid var(--line);
  background: var(--bg); align-items: center; justify-content: center; flex: none;
}
.burger span { display: block; width: 18px; height: 1.6px; background: var(--ink); position: relative; transition: .3s var(--ease); }
.burger span::before, .burger span::after { content:""; position: absolute; left: 0; width: 18px; height: 1.6px; background: var(--ink); transition: .3s var(--ease); }
.burger span::before { top: -6px; } .burger span::after { top: 6px; }
.nav__toggle:checked ~ .burger span { background: transparent; }
.nav__toggle:checked ~ .burger span::before { top: 0; transform: rotate(45deg); }
.nav__toggle:checked ~ .burger span::after { top: 0; transform: rotate(-45deg); }

/* ---------- Hero ---------- */
.hero { padding-top: clamp(48px, 7vw, 92px); padding-bottom: var(--section-y); position: relative; overflow: hidden; }
.hero__grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: 56px; align-items: center; }
.hero__copy { max-width: 560px; }
.hero .display { margin-top: 22px; }
.hero .lede { margin-top: 24px; max-width: 500px; }
.hero__cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 34px; }
.hero__meta { display: flex; flex-wrap: wrap; gap: 26px; margin-top: 38px; }
.hero__meta div { display: flex; flex-direction: column; gap: 2px; }
.hero__meta b { font-size: 24px; font-weight: 700; letter-spacing: -0.03em; }
.hero__meta span { font-size: 13.5px; color: var(--ink-3); }

/* decorative backdrop */
.hero__glow {
  position: absolute; inset: -20% -10% auto auto; width: 60vw; height: 60vw; max-width: 820px; max-height: 820px;
  background: radial-gradient(circle at 70% 30%, color-mix(in srgb, var(--accent) 16%, transparent), transparent 60%);
  filter: blur(10px); z-index: -1; pointer-events: none;
}

/* ---------- Product mock (tracking card) ---------- */
.mock {
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg); overflow: hidden; position: relative;
}
.mock__bar { display: flex; align-items: center; gap: 8px; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.mock__dot { width: 10px; height: 10px; border-radius: 50%; background: var(--surface-2); }
.mock__title { margin-left: 8px; font-size: 13px; color: var(--ink-3); font-weight: 500; }
.mock__body { padding: 22px; }
.mock__track { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.mock__track .code { font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: 14px; font-weight: 600; letter-spacing: .02em; }
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 5px 11px; border-radius: 999px; font-size: 12.5px; font-weight: 600; }
.pill--ok { background: var(--ok-soft); color: var(--ok); }
.pill--ok::before { content:""; width: 6px; height: 6px; border-radius: 50%; background: var(--ok); }

.steps-line { margin-top: 24px; display: flex; flex-direction: column; gap: 0; }
.step-row { display: grid; grid-template-columns: 28px 1fr auto; gap: 14px; align-items: start; position: relative; padding-bottom: 20px; }
.step-row:last-child { padding-bottom: 0; }
.step-row__dot { width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--line-strong); background: var(--bg); margin-top: 1px; position: relative; z-index: 1; }
.step-row.done .step-row__dot { background: var(--accent); border-color: var(--accent); }
.step-row.done .step-row__dot::after { content:""; position:absolute; inset:0; margin:auto; width:7px; height:4px; border-left:2px solid #fff; border-bottom:2px solid #fff; transform: rotate(-45deg) translate(0px,-1px); }
.step-row.current .step-row__dot { border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.step-row:not(:last-child)::before { content:""; position:absolute; left: 10px; top: 22px; bottom: 0; width: 2px; background: var(--line); }
.step-row.done:not(:last-child)::before { background: var(--accent); }
.step-row__main b { font-size: 15px; font-weight: 600; display: block; }
.step-row__main span { font-size: 13px; color: var(--ink-3); }
.step-row__time { font-size: 12.5px; color: var(--ink-3); white-space: nowrap; font-variant-numeric: tabular-nums; }

/* ---------- Logo strip ---------- */
.trust-strip { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.trust-strip .wrap { display: flex; align-items: center; flex-wrap: wrap; gap: 14px 30px; padding-block: 22px; }
.trust-strip__label { font-size: 13px; color: var(--ink-3); font-weight: 500; margin-right: 8px; }
.trust-chip { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 500; color: var(--ink-2); }
.trust-chip svg { width: 17px; height: 17px; color: var(--accent); }

/* ---------- How it works ---------- */
.flow { margin-top: 56px; display: grid; grid-template-columns: repeat(6, 1fr); gap: 0; position: relative; }
.flow__line { position: absolute; top: 27px; left: 8%; right: 8%; height: 2px; background: var(--line); z-index: 0; }
.flow__step { position: relative; z-index: 1; padding: 0 12px; text-align: center; }
.flow__num {
  width: 54px; height: 54px; border-radius: 50%; margin: 0 auto 18px;
  display: grid; place-items: center; font-weight: 700; font-size: 19px;
  background: var(--bg); border: 1.5px solid var(--line-strong); color: var(--ink);
  transition: transform .3s var(--ease);
}
.flow__step:hover .flow__num { border-color: var(--accent); color: var(--accent); transform: translateY(-3px); }
.flow__step h3 { font-size: 16px; font-weight: 600; margin-bottom: 6px; letter-spacing: -0.02em; }
.flow__step p { font-size: 14px; color: var(--ink-2); line-height: 1.45; }

/* ---------- Feature cards ---------- */
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-top: 56px; }
.card {
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 28px; transition: transform .3s var(--ease), box-shadow .3s, border-color .3s;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); border-color: var(--line-strong); }
.card__icon {
  width: 48px; height: 48px; border-radius: 13px; display: grid; place-items: center; margin-bottom: 20px;
  background: var(--accent-tint); color: var(--accent);
}
.card__icon svg { width: 24px; height: 24px; }
.card h3 { font-size: 18px; font-weight: 650; margin-bottom: 8px; letter-spacing: -0.02em; }
.card p { font-size: 14.5px; color: var(--ink-2); line-height: 1.5; }

/* ---------- Split (for customers / business) ---------- */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: center; }
.split--reverse .split__visual { order: -1; }
.split__copy { max-width: 480px; }
.split__copy .h2 { margin-top: 18px; }
.split__copy .lede { margin-top: 18px; }
.checklist { margin-top: 28px; display: flex; flex-direction: column; gap: 16px; list-style: none; padding: 0; }
.checklist li { display: grid; grid-template-columns: 24px 1fr; gap: 13px; align-items: start; }
.checklist__mark { width: 24px; height: 24px; border-radius: 50%; background: var(--accent-tint); color: var(--accent); display: grid; place-items: center; margin-top: 1px; }
.checklist__mark svg { width: 13px; height: 13px; }
.checklist b { font-weight: 600; font-size: 16px; display: block; }
.checklist span { font-size: 14.5px; color: var(--ink-2); }

/* generic visual panel */
.panel {
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md); padding: 26px;
}
.panel-soft { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 26px; }

/* mini stat rows inside panels */
.statrow { display: flex; align-items: center; justify-content: space-between; padding: 16px 0; border-bottom: 1px solid var(--line); }
.statrow:last-child { border-bottom: none; }
.statrow__l { display: flex; align-items: center; gap: 12px; }
.statrow__ic { width: 38px; height: 38px; border-radius: 10px; background: var(--surface-2); display: grid; place-items: center; color: var(--accent); }
.statrow__ic svg { width: 19px; height: 19px; }
.statrow b { font-size: 15px; font-weight: 600; display: block; }
.statrow span { font-size: 13px; color: var(--ink-3); }
.statrow__v { font-weight: 700; font-size: 16px; font-variant-numeric: tabular-nums; }

/* ---------- Trust section ---------- */
.trust-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; margin-top: 52px; }
.trust-card { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; }
.trust-card__ic { width: 42px; height: 42px; border-radius: 11px; background: var(--accent-tint); color: var(--accent); display: grid; place-items: center; margin-bottom: 16px; }
.trust-card__ic svg { width: 21px; height: 21px; }
.trust-card h3 { font-size: 16px; font-weight: 600; margin-bottom: 6px; letter-spacing: -0.02em; }
.trust-card p { font-size: 14px; color: var(--ink-2); line-height: 1.45; }

/* ---------- FAQ ---------- */
.faq { max-width: 820px; margin-top: 48px; }
.faq__item { border-bottom: 1px solid var(--line); }
.faq__q {
  width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 20px;
  padding: 24px 4px; text-align: left; background: none; border: none;
  font-size: 18px; font-weight: 600; letter-spacing: -0.02em; color: var(--ink);
}
.faq__q:hover { color: var(--accent); }
.faq__ic { flex: none; width: 26px; height: 26px; position: relative; }
.faq__ic::before, .faq__ic::after { content:""; position: absolute; inset: 0; margin: auto; background: currentColor; border-radius: 2px; }
.faq__ic::before { width: 14px; height: 2px; }
.faq__ic::after { width: 2px; height: 14px; transition: transform .3s var(--ease); }
.faq__item.open .faq__ic::after { transform: rotate(90deg); opacity: 0; }
.faq__a { max-height: 0; overflow: hidden; transition: max-height .4s var(--ease); }
.faq__a-inner { padding: 0 4px 26px; font-size: 16px; color: var(--ink-2); line-height: 1.55; max-width: 680px; }

/* ---------- Contact / CTA ---------- */
.cta-band {
  background: var(--ink); color: #fff; border-radius: var(--radius-xl); padding: clamp(40px, 6vw, 72px);
  position: relative; overflow: hidden;
}
[data-theme="dark"] .cta-band { background: var(--surface-2); border: 1px solid var(--line); }
.cta-band__glow { position: absolute; inset: auto auto -40% -10%; width: 50%; height: 120%; background: radial-gradient(circle, color-mix(in srgb, var(--accent) 60%, transparent), transparent 65%); filter: blur(20px); }
.cta-band .h2 { color: #fff; max-width: 600px; position: relative; }
.cta-band .lede { color: rgba(255,255,255,.72); margin-top: 18px; max-width: 540px; position: relative; }
.cta-band__actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; position: relative; }
.btn--on-dark { background: #fff; color: var(--ink); }
.btn--on-dark:hover { background: rgba(255,255,255,.88); }
.btn--outline-dark { background: transparent; color: #fff; border-color: rgba(255,255,255,.3); }
.btn--outline-dark:hover { border-color: rgba(255,255,255,.6); background: rgba(255,255,255,.06); }

.contact-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: 40px; margin-top: 52px; align-items: start; }
.contact-card { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 30px; box-shadow: var(--shadow-sm); }
.contact-list { display: flex; flex-direction: column; gap: 4px; }
.contact-row { display: flex; align-items: center; gap: 16px; padding: 16px 0; border-bottom: 1px solid var(--line); }
.contact-row:last-child { border-bottom: none; }
.contact-row__ic { width: 44px; height: 44px; border-radius: 12px; background: var(--surface); color: var(--accent); display: grid; place-items: center; flex: none; }
.contact-row__ic svg { width: 20px; height: 20px; }
.contact-row b { font-size: 15px; font-weight: 600; display: block; }
.contact-row span { font-size: 14px; color: var(--ink-3); }
.contact-row .todo { display: inline-block; margin-top: 2px; font-size: 12.5px; font-weight: 600; color: var(--warn); background: color-mix(in srgb, var(--warn) 12%, transparent); padding: 2px 9px; border-radius: 6px; }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--line); padding-block: 64px 40px; background: var(--surface); }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 40px; }
.footer-brand p { margin-top: 16px; font-size: 14.5px; color: var(--ink-2); max-width: 280px; line-height: 1.5; }
.footer-col h4 { font-size: 13px; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; color: var(--ink-3); margin-bottom: 16px; }
.footer-col ul { list-style: none; padding: 0; display: flex; flex-direction: column; gap: 11px; }
.footer-col a { font-size: 14.5px; color: var(--ink-2); }
.footer-col a:hover { color: var(--ink); }
.footer-bottom { margin-top: 48px; padding-top: 28px; border-top: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 16px; }
.footer-bottom p { font-size: 13.5px; color: var(--ink-3); }
.lang { display: inline-flex; gap: 4px; background: var(--bg); border: 1px solid var(--line); border-radius: 999px; padding: 4px; }
.lang button { padding: 5px 12px; border-radius: 999px; border: none; background: none; font-size: 13px; font-weight: 600; color: var(--ink-3); }
.lang button.active { background: var(--accent); color: #fff; }
.lang button:disabled { opacity: .5; cursor: not-allowed; }

/* ---------- Legal pages ---------- */
.legal { padding-block: 72px 100px; max-width: 760px; }
.legal .back { display: inline-flex; align-items: center; gap: 7px; font-size: 14px; font-weight: 500; color: var(--ink-2); margin-bottom: 32px; }
.legal .back:hover { color: var(--accent); }
.legal h1 { font-size: clamp(34px, 5vw, 48px); font-weight: 800; letter-spacing: -0.035em; }
.legal__meta { margin-top: 14px; font-size: 14px; color: var(--ink-3); }
.legal__placeholder {
  margin-top: 40px; padding: 32px; border: 1.5px dashed var(--line-strong); border-radius: var(--radius);
  background: var(--surface); color: var(--ink-2); font-size: 16px; line-height: 1.6;
}
.legal__placeholder b { color: var(--ink); display: block; font-size: 17px; margin-bottom: 8px; }
.legal__placeholder code { font-family: ui-monospace, Menlo, monospace; font-size: 13.5px; background: var(--surface-2); padding: 2px 7px; border-radius: 6px; color: var(--ink); }
.legal__toc { margin-top: 36px; display: flex; flex-direction: column; gap: 2px; }
.legal__toc div { padding: 14px 0; border-bottom: 1px solid var(--line); display: flex; gap: 14px; color: var(--ink-3); font-size: 15px; }
.legal__toc div b { color: var(--ink-2); font-weight: 600; font-variant-numeric: tabular-nums; min-width: 24px; }

/* ---------- Reveal animation ----------
   Content is visible by DEFAULT. JS only "arms" (hides) elements that are
   below the fold, then reveals them on scroll. Anything above the fold is
   never hidden — guaranteed visible even if the animation clock is paused. */
.reveal { transition: opacity .7s var(--ease), transform .7s var(--ease); will-change: opacity, transform; }
.reveal.is-hidden { opacity: 0; transform: translateY(24px); }
.reveal[data-d="1"] { transition-delay: .07s; }
.reveal[data-d="2"] { transition-delay: .14s; }
.reveal[data-d="3"] { transition-delay: .21s; }
.reveal[data-d="4"] { transition-delay: .28s; }
.reveal[data-d="5"] { transition-delay: .35s; }
@media (prefers-reduced-motion: reduce) {
  .reveal { transition: none !important; }
  .reveal.is-hidden { opacity: 1 !important; transform: none !important; }
}

/* ---------- Responsive ---------- */
@media (max-width: 1000px) {
  :root { --section-y: 92px; }
  .hero__grid { grid-template-columns: 1fr; gap: 44px; }
  .hero__copy { max-width: 620px; }
  .flow { grid-template-columns: repeat(3, 1fr); gap: 36px 0; }
  .flow__line { display: none; }
  .cards { grid-template-columns: repeat(2, 1fr); }
  .split { grid-template-columns: 1fr; gap: 40px; }
  .split--reverse .split__visual { order: 0; }
  .trust-grid { grid-template-columns: repeat(2, 1fr); }
  .contact-grid { grid-template-columns: 1fr; gap: 28px; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 36px 24px; }
}

@media (max-width: 940px) {
  .nav__links { display: none; }
  .burger { display: flex; }
  .nav__actions .btn--ghost { display: none; }
  .nav { height: 60px; }
  /* mobile dropdown */
  .nav__mobile {
    position: fixed; inset: 60px 0 auto 0; background: var(--bg); border-bottom: 1px solid var(--line);
    padding: 14px var(--gutter) 24px; display: none; flex-direction: column; gap: 4px;
    box-shadow: var(--shadow-md); z-index: 99;
  }
  .nav__toggle:checked ~ .nav__mobile { display: flex; }
  .nav__mobile a { padding: 13px 14px; border-radius: 12px; font-size: 16px; font-weight: 500; color: var(--ink); }
  .nav__mobile a:hover, .nav__mobile a:active { background: var(--surface); }
  .nav__mobile .btn { margin-top: 10px; }
}
@media (min-width: 941px) { .nav__mobile { display: none !important; } }

@media (max-width: 560px) {
  body { font-size: 16px; }
  .cards { grid-template-columns: 1fr; }
  .flow { grid-template-columns: 1fr 1fr; gap: 30px 8px; }
  .trust-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .hero__meta { gap: 20px; }
  .hero__cta .btn { flex: 1; min-width: 140px; }
}

/* ============================================================
   Legal documents (Privacy / Terms / Refund / Data retention)
   Real prose content — extends the .legal container above.
   ============================================================ */
.legal__updated {
  margin-top: 14px; display: inline-flex; align-items: center; gap: 8px;
  font-size: 13.5px; color: var(--ink-3);
}
.legal__intro {
  margin-top: 28px; font-size: 17px; line-height: 1.7; color: var(--ink-2);
}
.legal__doc { margin-top: 8px; }
.legal__doc h2 {
  margin-top: 44px; font-size: 21px; font-weight: 700; letter-spacing: -0.02em;
  color: var(--ink); scroll-margin-top: 90px;
}
.legal__doc h2 .legal__n {
  font-variant-numeric: tabular-nums; color: var(--accent); font-weight: 700; margin-right: 10px;
}
.legal__doc h3 { margin-top: 26px; font-size: 16.5px; font-weight: 650; color: var(--ink); }
.legal__doc p { margin-top: 14px; font-size: 15.5px; line-height: 1.72; color: var(--ink-2); }
.legal__doc ul, .legal__doc ol { margin-top: 14px; padding-left: 22px; display: flex; flex-direction: column; gap: 9px; }
.legal__doc li { font-size: 15.5px; line-height: 1.65; color: var(--ink-2); }
.legal__doc li::marker { color: var(--ink-3); }
.legal__doc strong, .legal__doc b { color: var(--ink); font-weight: 650; }
.legal__doc a { color: var(--accent); font-weight: 600; }
.legal__doc a:hover { text-decoration: underline; }

/* Owner-to-complete placeholder, rendered distinctly so it can't be mistaken for finalized text. */
.fill {
  display: inline; padding: 1px 8px; border-radius: 6px;
  background: color-mix(in srgb, var(--accent) 12%, transparent);
  border: 1px dashed color-mix(in srgb, var(--accent) 55%, transparent);
  color: var(--ink); font-size: 0.92em; font-weight: 600; white-space: nowrap;
}
@supports not (background: color-mix(in srgb, red, blue)) {
  .fill { background: var(--surface-2); border: 1px dashed var(--line-strong); }
}

/* Callout used at the top of each legal page (draft notice). */
.legal__note {
  margin-top: 28px; padding: 18px 22px; border-radius: var(--radius);
  background: var(--surface); border: 1px solid var(--line); border-left: 3px solid var(--accent);
  font-size: 14.5px; line-height: 1.6; color: var(--ink-2);
}

/* Definition list for "category → retention" tables (data-retention). */
.legal__dl { margin-top: 16px; display: flex; flex-direction: column; gap: 0; }
.legal__dl > div {
  display: grid; grid-template-columns: 1fr auto; gap: 12px 18px; align-items: baseline;
  padding: 14px 0; border-bottom: 1px solid var(--line);
}
.legal__dl dt { font-weight: 600; color: var(--ink); font-size: 15px; }
.legal__dl dd { margin: 0; color: var(--ink-2); font-size: 14.5px; text-align: right; }
@media (max-width: 560px) {
  .legal__dl > div { grid-template-columns: 1fr; gap: 4px; }
  .legal__dl dd { text-align: left; }
}

/* Inline table of contents (anchor links) at the top of a legal doc. */
.legal__nav { margin-top: 30px; display: flex; flex-direction: column; gap: 2px; }
.legal__nav a {
  padding: 12px 0; border-bottom: 1px solid var(--line); display: flex; gap: 14px;
  color: var(--ink-2); font-size: 15px; font-weight: 500;
}
.legal__nav a:hover { color: var(--accent); }
.legal__nav a b { color: var(--ink-3); font-weight: 600; font-variant-numeric: tabular-nums; min-width: 24px; }
