/* Токены — с листа «Система» дизайн-канваса и из client/lib/theme.dart.
   Правило то же, что в клиенте: цифр стилей в разметке быть не должно. */
:root {
  color-scheme: light;

  --bg: #F4F5F7;
  --surface: #FFFFFF;
  --quiet: #EAECEF;
  --border: #E4E7EB;
  --hairline: #EDEFF2;

  --ink: #12151A;
  --ink-2: #4A5158;
  --ink-3: #6B7280;
  --ink-4: #9AA1AA;

  --accent: #2E6B5E;
  --accent-dark: #1F4C42;
  --accent-bg: #E8F0EE;
  --on-accent-quiet: #C8DCD6;

  --lapse: #C9CFD6;
  --done: #B7C9C4;
  --empty: #DEE2E7;

  --r-button: 8px;
  --r-card: 12px;
  --r-pill: 999px;

  --tap: 48px;
  --tap-min: 44px;

  --gutter: clamp(20px, 5vw, 80px);
  --section: clamp(48px, 7vw, 88px);
}

@font-face {
  font-family: 'Onest';
  /* Вариативный файл, тот же, что в приложении: вес задаётся осью wght. */
  src: url('/static/font/Onest.ttf') format('truetype');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: 'Onest', system-ui, -apple-system, 'Segoe UI', sans-serif;
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-dark); text-decoration: underline; }

.wrap { max-width: 1120px; margin: 0 auto; padding-inline: var(--gutter); }
.section { padding-block: var(--section); }
.section--surface { background: var(--surface); border-block: 1px solid var(--border); }
.section--quiet { background: var(--quiet); }

.eyebrow {
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin: 0 0 14px;
}
.eyebrow--accent { color: var(--accent); }

h1, h2, h3 { margin: 0; text-wrap: pretty; }
h1 {
  font-size: clamp(36px, 6.4vw, 60px);
  font-weight: 600;
  line-height: 1.04;
  letter-spacing: -0.032em;
}
h2 {
  font-size: clamp(27px, 3.4vw, 36px);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.025em;
}
h3 { font-size: 17px; font-weight: 500; line-height: 1.4; }

p { margin: 0; text-wrap: pretty; }
.lead { font-size: clamp(17px, 1.6vw, 19px); line-height: 1.55; color: var(--ink-2); }
.body { font-size: 16px; line-height: 1.6; color: var(--ink-2); }
.small { font-size: 14px; line-height: 1.6; color: var(--ink-3); }
.tiny { font-size: 13px; line-height: 1.6; color: var(--ink-3); }
.faint { color: var(--ink-4); }
.num { font-variant-numeric: tabular-nums; }

/* Высокий столбик из знака: короткий серый перерыв, высокий зелёный возврат. */
.mark-stop { display: inline-block; margin-left: 0.28em; white-space: nowrap; vertical-align: -0.2em; }
.mark-stop i { display: inline-block; width: 0.23em; border-radius: 3px; vertical-align: bottom; }
.mark-stop i:first-child { height: 0.5em; background: var(--lapse); }
.mark-stop i:last-child { height: 1.1em; background: var(--accent); margin-left: 0.12em; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: var(--tap);
  padding-inline: 24px;
  border-radius: var(--r-button);
  border: 1px solid transparent;
  font: inherit;
  font-size: 16px;
  font-weight: 500;
  cursor: pointer;
  text-decoration: none;
}
.btn:hover { text-decoration: none; }
.btn--primary { background: var(--accent); color: #FFFFFF; }
.btn--primary:hover { background: var(--accent-dark); color: #FFFFFF; }
.btn--ghost { background: var(--surface); border-color: var(--border); color: var(--ink-2); font-weight: 400; }
.btn--ghost:hover { border-color: var(--ink-4); color: var(--ink); }
.btn--onaccent { background: #FFFFFF; color: var(--accent-dark); }
.btn--onaccent:hover { background: var(--accent-bg); color: var(--accent-dark); }
.btn--small { min-height: var(--tap-min); padding-inline: 20px; font-size: 15px; }
.btn--block { width: 100%; }

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-card);
  padding: 24px;
}
.card--accent { border-color: var(--accent); }

.grid { display: grid; gap: 16px; }
.grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.stack { display: flex; flex-direction: column; }
.row { display: flex; align-items: center; }

/* Шапка */
.top {
  display: flex;
  align-items: center;
  gap: clamp(16px, 3vw, 40px);
  padding-block: 20px;
  border-bottom: 1px solid var(--border);
}
.brand { display: flex; align-items: center; gap: 10px; font-size: 17px; font-weight: 600; letter-spacing: -0.01em; color: var(--ink); }
.brand:hover { text-decoration: none; color: var(--ink); }
.top nav { flex: 1; display: flex; gap: 28px; font-size: 15px; }
.top nav a { color: var(--ink-2); }

/* Герой */
.hero { position: relative; overflow: hidden; padding-block: clamp(40px, 6vw, 88px) clamp(40px, 5vw, 72px); }
.hero-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
  -webkit-mask-image: linear-gradient(to right, rgba(0,0,0,0) 12%, rgba(0,0,0,1) 54%);
  mask-image: linear-gradient(to right, rgba(0,0,0,0) 12%, rgba(0,0,0,1) 54%);
}
.hero-bg img { width: 100%; height: 100%; object-fit: cover; transform: scaleX(-1); opacity: 0.9; }
.hero-inner { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: clamp(24px, 5vw, 72px); align-items: center; }
.hero-copy { display: flex; flex-direction: column; gap: 24px; align-items: flex-start; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.hero-trust { display: flex; flex-wrap: wrap; gap: 10px; font-size: 13px; color: var(--ink-3); }
.hero-trust span[aria-hidden] { color: var(--lapse); }
.hero-shot { justify-self: center; width: 320px; border: 1px solid var(--border); border-radius: 30px; overflow: hidden; }

/* Полоса дней */
.band { display: block; width: 100%; height: auto; }

/* Шаги */
.step { display: flex; gap: 20px; align-items: flex-start; }
.step-n {
  flex: 0 0 auto;
  width: 32px; height: 32px;
  display: grid; place-items: center;
  border-radius: var(--r-pill);
  background: var(--accent-bg);
  color: var(--accent);
  font-size: 14px; font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.split { display: grid; grid-template-columns: 380px minmax(0, 1fr); gap: clamp(28px, 5vw, 72px); align-items: start; }

.figure img { border: 1px solid var(--border); border-radius: var(--r-card); object-fit: cover; }
.figure--tall img { height: 220px; width: 100%; }
.figure--wide img { height: 220px; width: 100%; }

.screens img { width: 100%; max-width: 280px; border: 1px solid var(--border); border-radius: 22px; }

.check { display: flex; gap: 16px; align-items: flex-start; background: var(--bg); border-radius: var(--r-card); padding: 22px 24px; }
.check svg { flex: 0 0 auto; margin-top: 3px; }

.plan { display: flex; flex-direction: column; gap: 20px; padding: 32px; }
.plan ul { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 10px; font-size: 15px; color: var(--ink-2); }
.field {
  width: 100%;
  min-height: var(--tap-min);
  padding: 0 14px;
  border: 1px solid var(--border);
  border-radius: var(--r-button);
  background: var(--surface);
  font: inherit;
  font-size: 15px;
  color: var(--ink);
}
.field:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.price { font-size: 34px; font-weight: 600; letter-spacing: -0.02em; }
.tag { display: inline-flex; align-items: center; padding: 4px 10px; border-radius: var(--r-pill); background: var(--accent-bg); color: var(--accent); font-size: 12px; }

.cta { background: var(--accent); color: #FFFFFF; }
.cta h2 { color: #FFFFFF; }
.cta .body { color: var(--on-accent-quiet); }
.cta-inner { display: flex; flex-wrap: wrap; gap: 32px; align-items: center; justify-content: space-between; }

/* Подвал */
.foot { padding-block: 48px 56px; }
.foot-cols { display: grid; grid-template-columns: 230px minmax(0, 1fr) 400px; gap: clamp(24px, 4vw, 56px); align-items: start; }
.foot h2 { font-size: 12px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-4); font-weight: 400; margin-bottom: 10px; }
.foot-links { display: flex; flex-direction: column; gap: 10px; font-size: 14px; }
.foot-links a { color: var(--ink-2); }
.foot-links span { color: var(--ink-4); }
.req { display: flex; flex-direction: column; gap: 3px; }
.req div { display: flex; gap: 12px; font-size: 13px; line-height: 1.55; }
.req dt { flex: 0 0 150px; color: var(--ink-4); margin: 0; }
.req dd { flex: 1; margin: 0; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.age { display: inline-flex; align-items: center; min-height: 26px; padding-inline: 10px; border: 1px solid var(--border); border-radius: var(--r-pill); font-size: 12px; color: var(--ink-3); }
.foot-legal { margin-top: 32px; padding-top: 24px; border-top: 1px solid var(--border); display: flex; flex-direction: column; gap: 10px; }

/* Документы */
.doc { max-width: 760px; padding-block: clamp(32px, 5vw, 64px); }
.doc h1 { font-size: clamp(28px, 4vw, 38px); margin-bottom: 12px; }
.doc h2 { font-size: 21px; margin-top: 36px; margin-bottom: 10px; }
.doc p, .doc li { font-size: 16px; line-height: 1.65; color: var(--ink-2); }
.doc p + p, .doc ul, .doc ol { margin-top: 12px; }
.doc ul, .doc ol { padding-left: 22px; display: flex; flex-direction: column; gap: 8px; }
.doc .meta { color: var(--ink-4); font-size: 14px; }
.doc address { font-style: normal; font-size: 14px; line-height: 1.7; color: var(--ink-2); font-variant-numeric: tabular-nums; }

@media (max-width: 1000px) {
  .hero-inner { grid-template-columns: minmax(0, 1fr); }
  .hero-shot { justify-self: start; width: min(300px, 78vw); }
  .hero-bg { -webkit-mask-image: linear-gradient(to bottom, rgba(0,0,0,0.55), rgba(0,0,0,0)); mask-image: linear-gradient(to bottom, rgba(0,0,0,0.55), rgba(0,0,0,0)); }
  .split { grid-template-columns: minmax(0, 1fr); }
  .grid--3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .foot-cols { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .foot-cols > :last-child { grid-column: 1 / -1; }
  .top nav { display: none; }
}

@media (max-width: 680px) {
  .grid--3, .grid--2 { grid-template-columns: minmax(0, 1fr); }
  .foot-cols { grid-template-columns: minmax(0, 1fr); }
  .cta-inner { flex-direction: column; align-items: stretch; }
  .cta-inner .btn { width: 100%; }
  .req div { flex-direction: column; gap: 1px; }
  .req dt { flex: none; font-size: 12px; }
  .screens img { max-width: 260px; }
}
