/* Palette «Провизор», the app's own tokens (app/src/theme/tokens.ts). No red anywhere. */
:root {
  --base: #FAF8F3;
  --raised: #F1EEE6;
  --sky: #E5EEE7;
  --ink: #1D2420;
  --muted: #58625C;
  --on-action: #FBFAF6;
  --action: #19674A;
  --action-hover: #14563D;
  --sun: #F2B441;
  --sun-dim: #F6D58F;
  --land: #2F7A58;
  --track: #E4E0D6;
  --frame: #1D2420;
  --radius: 14px;
  --gutter: 20px;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --base: #141917;
    --raised: #1C2320;
    --sky: #21302A;
    --ink: #EEF1EC;
    --muted: #9DAAA2;
    --on-action: #141917;
    --action: #EEF1EC;
    --action-hover: #FFFFFF;
    --sun-dim: #6E5526;
    --land: #317A5A;
    --track: #2A332F;
    --frame: #3A4540;
  }
}

* { 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(--base);
  color: var(--ink);
  font: 400 17px/1.6 'Golos Text', system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3 { font-weight: 700; line-height: 1.15; margin: 0; text-wrap: balance; }
p { margin: 0; }
a { color: inherit; }
img { display: block; max-width: 100%; }

.wrap { width: 100%; max-width: 1080px; margin: 0 auto; padding: 0 var(--gutter); }

/* Header */
.top { display: flex; align-items: center; justify-content: space-between; height: 72px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 600; text-decoration: none; }
.mark { width: 22px; height: 22px; border-radius: 50%; background: var(--sun); box-shadow: inset 0 -7px 0 var(--land); }
.top-actions { display: flex; align-items: center; gap: 8px; }
.lang {
  font: inherit; font-size: 14px; color: var(--muted); background: none;
  border: 1px solid var(--track); border-radius: 999px; padding: 6px 12px; cursor: pointer;
}
.lang:hover { color: var(--ink); }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 52px; padding: 0 26px; border: 0; border-radius: 999px;
  background: var(--action); color: var(--on-action);
  font: 600 17px/1 'Golos Text', system-ui, sans-serif; text-decoration: none; cursor: pointer;
  transition: background .15s, transform .1s;
}
.btn:hover { background: var(--action-hover); }
.btn:active { transform: scale(.98); }
.btn:focus-visible, .lang:focus-visible, .chips input:focus-visible + span, input:focus-visible {
  outline: 3px solid var(--sun); outline-offset: 2px;
}
.btn-sm { min-height: 38px; padding: 0 16px; font-size: 15px; }
.btn-wide { width: 100%; }
.btn[disabled] { opacity: .6; cursor: progress; }

/* Hero */
.hero { padding-top: 56px; padding-bottom: 72px; text-align: center; }
.eyebrow {
  display: inline-block; font-size: 14px; font-weight: 600; color: var(--land);
  background: var(--sky); border-radius: 999px; padding: 6px 14px; margin-bottom: 22px;
}
.hero h1 { font-size: clamp(34px, 6vw, 60px); letter-spacing: -.02em; max-width: 16ch; margin: 0 auto; }
.lead { font-size: clamp(17px, 2vw, 20px); color: var(--muted); max-width: 46ch; margin: 22px auto 0; }
.tagline { font-weight: 600; color: var(--land); margin: 16px auto 0; max-width: 40ch; }
.hero-cta { margin-top: 34px; display: flex; flex-direction: column; align-items: center; gap: 12px; }
.note { font-size: 14px; color: var(--muted); }

/* Story beats */
.story { display: flex; flex-direction: column; gap: 24px; }
.beat {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: center; gap: 64px; padding-top: 40px; padding-bottom: 40px;
}
.beat.flip .shot { order: 2; }
.beat.wide { grid-template-columns: minmax(0, 1fr) minmax(0, 1.7fr); gap: 48px; }
.shot {
  display: flex; justify-content: center; align-items: flex-end; gap: 18px;
  background: var(--sky); border-radius: 28px; padding: 40px 24px 0; overflow: hidden;
}
.copy { max-width: 440px; }
.step {
  display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 50%;
  background: var(--sun); color: #1D2420; font-weight: 700; font-size: 16px; margin-bottom: 16px;
}
.copy h2 { font-size: clamp(26px, 3.2vw, 36px); letter-spacing: -.01em; }
.copy p { margin-top: 14px; color: var(--muted); font-size: 18px; }
.copy .aside {
  font-size: 16px; color: var(--ink); background: var(--raised);
  border-radius: 12px; padding: 12px 16px; margin-top: 20px;
}

/* Phone frame — bottom is cut by the shot panel, like a phone standing in it */
.phone {
  margin: 0; width: 260px; aspect-ratio: 1220 / 2452; flex: none;
  border: 9px solid var(--frame); border-bottom: 0; border-radius: 38px 38px 0 0;
  background: var(--raised); overflow: hidden; position: relative;
}
.phone img { width: 100%; height: auto; }
.phone.small { width: 180px; }
/* Today with the widget laid over its lower corner, as it sits on a home screen */
.shot.with-widget { position: relative; }
.widget {
  margin: 0; position: absolute; right: 4%; bottom: 16px; width: 50%; max-width: 280px;
  filter: drop-shadow(0 10px 24px rgba(29,36,32,.22));
}
.widget img { width: 100%; height: auto; }
.widget.empty { display: none; }
/* The doctor's log is a document, not a screen: shown as the page it opens as */
.shot.doc-shot { padding: 32px 24px; align-items: center; }
.doc {
  margin: 0; width: 100%; background: #FFFFFF; border-radius: 10px; overflow: hidden;
  box-shadow: 0 1px 2px rgba(0,0,0,.08), 0 10px 30px rgba(29,36,32,.14); position: relative;
}
.doc img { width: 100%; height: auto; }
.doc.empty { aspect-ratio: 1400 / 860; background: var(--raised); }
.doc.empty::after {
  content: attr(data-label); position: absolute; inset: 0; display: grid; place-items: center;
  font-size: 14px; color: var(--muted);
}
.pair .phone { width: 220px; }
.pair .phone.small { width: 150px; }
.phone.empty::after {
  content: attr(data-label); position: absolute; inset: 0; display: grid; place-items: center;
  padding: 16px; text-align: center; font-size: 14px; color: var(--muted);
}

/* Honest */
.honest { padding-top: 88px; padding-bottom: 24px; }
.honest h2 { font-size: clamp(26px, 3.2vw, 36px); text-align: center; }
.facts { list-style: none; padding: 0; margin: 36px 0 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.facts li { background: var(--raised); border-radius: var(--radius); padding: 24px; }
.facts h3 { font-size: 19px; }
.facts p { margin-top: 8px; color: var(--muted); font-size: 16px; }

/* Join */
.join { padding-top: 72px; padding-bottom: 72px; scroll-margin-top: 16px; }
.join-card { max-width: 560px; margin: 0 auto; background: var(--raised); border-radius: 28px; padding: 40px; }
.join-card h2 { font-size: clamp(26px, 3.2vw, 34px); }
.join-lead { color: var(--muted); margin-top: 10px; }
form { margin-top: 28px; display: flex; flex-direction: column; gap: 20px; }
.field { border: 0; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.label { font-weight: 600; font-size: 15px; padding: 0; }
.opt { font-weight: 400; color: var(--muted); }
input[type=email] {
  font: inherit; color: var(--ink); background: var(--base);
  border: 1.5px solid var(--track); border-radius: 12px; height: 52px; padding: 0 16px; width: 100%;
}
input[type=email]:focus { border-color: var(--land); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips label { position: relative; }
.chips input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.chips span {
  display: inline-block; padding: 10px 16px; border-radius: 999px; font-size: 15px;
  background: var(--base); border: 1.5px solid var(--track); cursor: pointer; user-select: none;
}
.chips input:checked + span { background: var(--sky); border-color: var(--land); color: var(--ink); font-weight: 600; }
.check { display: flex; gap: 12px; align-items: flex-start; font-size: 15px; color: var(--muted); cursor: pointer; }
.check input { width: 22px; height: 22px; margin: 1px 0 0; accent-color: var(--land); flex: none; }
.err { font-size: 14px; color: var(--muted); min-height: 0; }
.err:not(:empty) { color: var(--ink); background: var(--sun-dim); border-radius: 8px; padding: 6px 10px; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.status { font-size: 16px; text-align: center; min-height: 1.6em; }
.status.ok { background: var(--sky); border-radius: 12px; padding: 14px; color: var(--ink); }

/* Footer */
.foot { padding-top: 24px; padding-bottom: 120px; font-size: 14px; color: var(--muted); text-align: center; display: flex; flex-direction: column; gap: 8px; }

/* Sticky CTA, phones only, hidden while the form is on screen */
.sticky {
  position: fixed; left: 16px; right: 16px; bottom: 16px; z-index: 10;
  box-shadow: 0 6px 24px rgba(0,0,0,.18); display: none;
  transition: transform .25s, opacity .25s;
}
.sticky.hide { transform: translateY(140%); opacity: 0; pointer-events: none; }

@media (max-width: 760px) {
  :root { --gutter: 16px; }
  body { font-size: 16px; }
  .top { height: 60px; }
  .top-actions .btn-sm { display: none; }
  .hero { padding-top: 32px; padding-bottom: 40px; }
  .beat, .beat.wide { grid-template-columns: minmax(0, 1fr); gap: 24px; padding-top: 24px; padding-bottom: 24px; }
  .beat.flip .shot { order: 0; }
  .shot { padding: 28px 16px 0; border-radius: 22px; }
  .shot.doc-shot { padding: 20px 12px; }
  .widget { right: 3%; width: 56%; bottom: 12px; }
  .phone { width: 220px; border-width: 7px; border-radius: 32px 32px 0 0; }
  .phone.small, .pair .phone.small { width: 120px; }
  .pair .phone { width: 180px; }
  .copy p { font-size: 17px; }
  .facts { grid-template-columns: minmax(0, 1fr); }
  .join-card { padding: 28px 20px; border-radius: 22px; }
  .sticky { display: flex; }
}
