/* medlet.ru — русская страница Medlet и оплата Pro (ADR-0066, ADR-0067).
   Палитра — роли приложения (src/ui/tokens.ts): день — лён и шкафчик, ночь — «шкафчик с лампой». Заголовки — Literata,
   как в русском интерфейсе; текст — системный. Фирменные детали — полка под телефоном и наклейки срока, как в приложении. */

@font-face {
  font-family: 'Literata';
  src: url('/fonts/Literata-SemiBold.woff') format('woff');
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #F5EFE6;
  --bg-deep: #EFE6D8;
  --surface: #FFFBF4;
  --line: #E6DBC9;
  --text: #1F2A2E;
  --muted: #5B6468;
  --accent: #0E6B63;
  --accent-hover: #0B5952;
  --on-accent: #FFFFFF;
  --shelf-top: #E9D9BF;
  --shelf-bottom: #CDB48F;
  --chip: #E8DDCB;
  --lamp: #F2A65A;
  --ok-bg: #DDF0E8; --ok-fg: #145C45;
  --soon-bg: #FCE8CC; --soon-fg: #7A3E00;
  --bad-bg: #F9DEDC; --bad-fg: #8C1D18;
  /* Подложка кадров: тот же градиент, что у фона кадров стора (#F5EFE6 → #E1D6C5) — кадр сливается с карточкой. */
  --shot-top: #F5EFE6;
  --shot-bottom: #E1D6C5;
  --shadow: 0 1px 2px rgb(31 42 46 / 0.06), 0 18px 40px rgb(31 42 46 / 0.10);
  --display: 'Literata', 'PT Serif', Georgia, serif;
  --body: -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --mono: ui-monospace, 'SF Mono', SFMono-Regular, Menlo, Consolas, monospace;
  --gutter: 20px;
  --section: clamp(72px, 9vw, 120px);
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #15181B;
    --bg-deep: #1B1E21;
    --surface: #23262A;
    --line: #34302B;
    --text: #F3EDE4;
    --muted: #B9B2A8;
    --accent: #7FD1C4;
    --accent-hover: #9BDDD2;
    --on-accent: #0B2A27;
    --shelf-top: #6A5540;
    --shelf-bottom: #4A3A2B;
    --chip: #2B2926;
    --lamp: #F2C98B;
    --ok-bg: #1E3A31; --ok-fg: #9FE0C6;
    --soon-bg: #4A3314; --soon-fg: #F6C98A;
    --bad-bg: #4A1F1C; --bad-fg: #F4B4AE;
    --shot-top: #2A2C2E;
    --shot-bottom: #1E2022;
    --shadow: 0 1px 2px rgb(0 0 0 / 0.3), 0 18px 40px rgb(0 0 0 / 0.35);
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 84px; }
body { margin: 0; background: var(--bg); color: var(--text); font: 17px/1.6 var(--body); }
/* Полки и наклейки выступают за телефон — вбок страница не едет. */
main { overflow-x: clip; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent); text-underline-offset: 0.18em; }
a:focus-visible, button:focus-visible, input:focus-visible, summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }
h1, h2, h3 { font-family: var(--display); font-weight: 600; line-height: 1.18; margin: 0; text-wrap: balance; letter-spacing: -0.012em; }
h1 { font-size: clamp(34px, 4.8vw, 54px); }
h2 { font-size: clamp(28px, 3.6vw, 42px); }
h3 { font-size: clamp(22px, 2.2vw, 28px); }
p { margin: 0; }
.num { font-variant-numeric: tabular-nums; }

.wrap { max-width: 1120px; margin: 0 auto; padding-inline: var(--gutter); }
.eyebrow { font-size: 13px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--accent); }
.lede { font-size: clamp(18px, 1.9vw, 20px); color: var(--muted); max-width: 36em; }
.section-head { display: grid; gap: 14px; max-width: 760px; }

/* Кнопки */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; font: 600 16px/1 var(--body); text-decoration: none;
  min-height: 48px; padding: 0 22px; border-radius: 14px; border: 1px solid transparent; background: var(--accent); color: var(--on-accent);
  cursor: pointer; transition: background-color 0.15s ease, transform 0.15s ease; }
.btn:hover { background: var(--accent-hover); }
.btn:active { transform: translateY(1px); }
.btn-small { min-height: 40px; padding: 0 16px; font-size: 15px; border-radius: 12px; }
.btn-ghost { background: transparent; color: var(--text); border-color: var(--line); }
.btn-ghost:hover { background: var(--chip); }
button:disabled, .btn:disabled { opacity: 0.45; cursor: not-allowed; transform: none; }

/* Шапка */
.site-header { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 10; background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(1.4) blur(14px); -webkit-backdrop-filter: saturate(1.4) blur(14px); border-bottom: 1px solid color-mix(in srgb, var(--line) 70%, transparent); }
.bar { display: flex; align-items: center; gap: 28px; min-height: 64px; }
.brand img { width: 104px; }
.nav { display: flex; gap: 24px; margin-left: auto; font-size: 15px; }
.nav a { color: var(--muted); text-decoration: none; }
.nav a:hover { color: var(--text); }

/* Первый экран */
.hero { display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(0, 0.92fr); gap: clamp(32px, 6vw, 80px); align-items: center;
  padding-block: clamp(40px, 7vw, 96px) var(--section); }
.hero-copy { display: grid; gap: 22px; align-content: start; }
.cta-row { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; margin-top: 6px; }
.badge img { width: 150px; }
.link-cta { font-weight: 600; text-decoration: none; }
.link-cta:hover { text-decoration: underline; }
.ticks { list-style: none; margin: 4px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 10px 22px; color: var(--muted); font-size: 15px; }
.ticks li { display: flex; align-items: center; gap: 8px; }
.ticks li::before { content: '✓'; display: grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; background: var(--ok-bg);
  color: var(--ok-fg); font-size: 12px; font-weight: 700; }

.hero-visual { position: relative; margin: 0; justify-self: center; width: min(330px, 100%); padding-bottom: 18px; }
/* Полка, на которой стоит телефон, — как на сайте medlet.pirog.app и в приложении. */
.hero-visual::after { content: ''; position: absolute; left: -10%; right: -10%; bottom: 0; height: 18px; border-radius: 5px;
  background: linear-gradient(var(--shelf-top), var(--shelf-bottom)); box-shadow: 0 10px 24px rgb(31 42 46 / 0.18); }
.sticker { position: absolute; display: inline-flex; align-items: center; gap: 6px; padding: 7px 12px; border-radius: 10px; font-size: 14px;
  font-weight: 600; box-shadow: 0 6px 18px rgb(31 42 46 / 0.14); white-space: nowrap; }
.sticker.ok { background: var(--ok-bg); color: var(--ok-fg); }
.sticker.soon { background: var(--soon-bg); color: var(--soon-fg); }
.sticker.bad { background: var(--bad-bg); color: var(--bad-fg); }
.s1 { left: -12%; top: 22%; transform: rotate(-4deg); }
.s2 { right: -10%; top: 44%; transform: rotate(3deg); }
.s3 { left: -6%; top: 68%; transform: rotate(-2deg); }

/* Возможности: кадр и текст, ряды чередуются */
.features { display: grid; gap: clamp(56px, 8vw, 104px); padding-bottom: var(--section); }
.feature { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(32px, 6vw, 88px); align-items: center; }
.feature:nth-of-type(even) .stage { order: 2; }
.feature-copy { display: grid; gap: 14px; max-width: 30em; }
.feature-copy p:not(.eyebrow) { color: var(--muted); font-size: 18px; }
/* iPhone целиком: рамка как в design/store/mockup.html (1080 × 2273, металл 12 px, экран 32 px от края, скругление 170 px).
   Экран — настоящий снимок приложения 1206 × 2622, в тёмной схеме — тёмный. */
.device { position: relative; width: 100%; aspect-ratio: 1080 / 2273; border-radius: 15.7% / 7.5%;
  background: linear-gradient(155deg, #3A4150, #1B1F27 40%, #2B313C); box-shadow: 0 2px 4px rgb(0 0 0 / 0.12), 0 28px 56px rgb(31 42 46 / 0.24); }
.device::before { content: ''; position: absolute; inset: 0.53% 1.11%; border-radius: 15% / 7%; background: #020304; }
.screen { position: absolute; inset: 1.41% 2.96%; border-radius: 13.6% / 6.25%; overflow: hidden; background: #000; }
.screen picture, .screen img { display: block; width: 100%; height: 100%; }
.screen img { object-fit: cover; }
.island { position: absolute; top: 1.36%; left: 50%; width: 31.3%; height: 4.16%; transform: translateX(-50%); border-radius: 999px; background: #000; }

/* Каждый телефон стоит на полке — фирменная деталь Medlet. */
.stage { position: relative; margin: 0; justify-self: center; width: min(290px, 78%); padding-bottom: 16px; }
.stage::after { content: ''; position: absolute; left: -22%; right: -22%; bottom: 0; height: 16px; border-radius: 5px;
  background: linear-gradient(var(--shelf-top), var(--shelf-bottom)); box-shadow: 0 10px 22px rgb(31 42 46 / 0.16); }

/* Pro и цены */
.pro-band { background: var(--bg-deep); border-block: 1px solid var(--line); padding-block: var(--section); }
.pro-band .section-head { margin-bottom: clamp(32px, 5vw, 56px); }
.pro-grid { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr); gap: clamp(24px, 4vw, 48px); align-items: start; }
.compare { background: var(--surface); border: 1px solid var(--line); border-radius: 22px; overflow: hidden; }
.compare-row { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr) minmax(0, 1fr); gap: 12px; align-items: center;
  padding: 14px 20px; border-top: 1px solid var(--line); font-size: 15px; }
.compare-row > :first-child { color: var(--text); }
.compare-row > :not(:first-child) { color: var(--muted); }
.compare-row > :last-child { color: var(--text); font-weight: 600; }
.compare-head { border-top: 0; background: var(--chip); font-size: 13px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; }
.compare-head > span { color: var(--muted) !important; }
.compare-head > :last-child { color: var(--accent) !important; }
.yes { color: var(--ok-fg); font-weight: 700; }
.no { color: var(--muted); }
.plans { display: grid; gap: 16px; }
.plan { background: var(--surface); border: 1px solid var(--line); border-radius: 22px; padding: 24px; display: grid; gap: 6px; }
.plan-best { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent), var(--shadow); }
.plan-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.pill { font-size: 12px; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; padding: 5px 10px; border-radius: 999px;
  background: var(--accent); color: var(--on-accent); white-space: nowrap; }
.price { font-family: var(--display); font-size: 40px; line-height: 1.1; margin-top: 6px; }
.per { color: var(--muted); font-size: 15px; }
.plan-note { font-size: 15px; color: var(--muted); margin-bottom: 12px; }
.plan .btn { width: 100%; }

/* Оплата */
.pay { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(32px, 6vw, 80px); align-items: start; padding-block: var(--section); }
.pay-copy { display: grid; gap: 24px; }
.steps { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 20px; counter-reset: step; }
.steps li { position: relative; padding-left: 54px; display: grid; gap: 4px; counter-increment: step; }
.steps li::before { content: counter(step); position: absolute; left: 0; top: -2px; width: 36px; height: 36px; border-radius: 50%;
  background: var(--accent); color: var(--on-accent); display: grid; place-items: center; font-weight: 700; }
.steps b { font-size: 18px; }
.steps span { color: var(--muted); }
.trust { display: grid; gap: 12px; padding-top: 20px; border-top: 1px solid var(--line); color: var(--muted); font-size: 15px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips span { background: var(--chip); color: var(--text); border-radius: 999px; padding: 6px 12px; font-size: 14px; font-weight: 600; }

.card { background: var(--surface); border: 1px solid var(--line); border-radius: 24px; padding: clamp(20px, 3vw, 30px); display: grid; gap: 18px; box-shadow: var(--shadow); }
.buy { position: sticky; top: 88px; }
.field { display: grid; gap: 8px; }
.field label, legend { font-weight: 600; font-size: 15px; }
.row { display: flex; gap: 10px; }
.row input { flex: 1 1 auto; min-width: 0; }
input[type='text'] { font: 15px/1.3 var(--mono); min-height: 48px; padding: 0 14px; border-radius: 14px; border: 1px solid var(--line); background: var(--bg); color: var(--text); }
input[type='text']::placeholder { font-family: var(--body); color: var(--muted); }
fieldset { border: 0; padding: 0; margin: 0; display: grid; gap: 10px; }
legend { padding: 0; margin-bottom: 8px; }
.choice { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 14px; align-items: center; padding: 14px 16px; border: 1px solid var(--line);
  border-radius: 14px; cursor: pointer; background: var(--bg); }
.choice:has(input:checked) { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); background: var(--surface); }
.choice b { font-variant-numeric: tabular-nums; }
.choice span { display: grid; gap: 2px; font-weight: 600; }
.choice small { color: var(--muted); font-size: 14px; font-weight: 400; }
input[type='radio'], input[type='checkbox'] { accent-color: var(--accent); width: 20px; height: 20px; margin: 0; }
.consent { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 10px; align-items: start; font-size: 15px; color: var(--muted); }
.btn-pay { width: 100%; min-height: 58px; font-size: 18px; border-radius: 16px; }
.secure { text-align: center; font-size: 13px; color: var(--muted); }
.status { font-size: 15px; padding: 12px 14px; border-radius: 12px; }
.status.ok { background: var(--ok-bg); color: var(--ok-fg); }
.status.soon { background: var(--soon-bg); color: var(--soon-fg); }
.status.bad { background: var(--bad-bg); color: var(--bad-fg); }

/* Вопросы */
.faq-section { padding-bottom: var(--section); display: grid; gap: clamp(28px, 4vw, 44px); }
.faq { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; align-items: start; }
details { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 4px 20px; }
summary { cursor: pointer; font-weight: 600; padding-block: 16px; list-style: none; display: flex; justify-content: space-between; gap: 16px; }
summary::-webkit-details-marker { display: none; }
summary::after { content: '+'; color: var(--accent); font-size: 22px; line-height: 1; font-weight: 400; }
details[open] summary::after { content: '−'; }
details p { padding-bottom: 18px; color: var(--muted); }

/* Финал */
.closing { text-align: center; display: grid; justify-items: center; gap: 18px; padding-bottom: var(--section); }
.closing .lede { margin-inline: auto; }

/* Подвал */
.site-footer { border-top: 1px solid var(--line); padding-block: 36px 48px; color: var(--muted); font-size: 14px; }
.footer-grid { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.4fr) minmax(0, 0.8fr); gap: 28px; align-items: start; }
.footer-grid > div { display: grid; gap: 8px; }
.footer-grid img { width: 96px; }
.footer-grid nav { display: grid; gap: 8px; justify-items: start; }
.footer-grid nav a { color: var(--muted); }

/* Документы: оферта, политика, «спасибо» */
.top { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-block: 18px; }
.top nav { display: flex; gap: 18px; flex-wrap: wrap; font-size: 15px; }
.top nav a { color: var(--muted); text-decoration: none; }
.doc-main { padding-block: 24px 72px; }
.doc { max-width: 760px; display: grid; gap: 18px; }
.doc h1 { font-size: clamp(30px, 4.6vw, 44px); }
.doc h2 { font-size: 22px; margin-top: 14px; }
.doc ol, .doc ul { margin: 0; padding-left: 22px; display: grid; gap: 8px; }
.doc .muted { color: var(--muted); font-size: 15px; }
.doc .lede { color: var(--text); }
.doc-footer { border-top: 1px solid var(--line); padding-block: 24px 40px; color: var(--muted); font-size: 14px; }
.doc-footer nav { display: flex; gap: 16px; flex-wrap: wrap; }
.muted { color: var(--muted); }

@media (max-width: 980px) {
  .pro-grid { grid-template-columns: minmax(0, 1fr); }
  .plans { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .faq { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 860px) {
  .hero, .feature, .pay { grid-template-columns: minmax(0, 1fr); }
  .feature:nth-of-type(even) .stage { order: 0; }
  .hero-visual { width: min(270px, 70%); }
  .buy { position: static; }
  .nav { display: none; }
  .bar { justify-content: space-between; }
  .footer-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 560px) {
  :root { --gutter: 18px; }
  .plans { grid-template-columns: minmax(0, 1fr); }
  .compare-row { grid-template-columns: minmax(0, 1.3fr) minmax(0, 0.9fr) minmax(0, 0.9fr); padding: 12px 14px; font-size: 14px; gap: 8px; }
  .compare-head { text-transform: none; letter-spacing: 0; font-size: 13px; }
  .s1 { left: -6%; } .s2 { right: -6%; } .s3 { left: -4%; }
  .sticker { font-size: 13px; padding: 6px 10px; }
  .row { flex-direction: column; }
  .row .btn { width: 100%; }
  .stage::after { left: -12%; right: -12%; }
  .hero-visual::after { left: -8%; right: -8%; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn { transition: none; }
}
