/* Yacheyka — сайт. Токены из брендбука (Design System «Yacheyka»).
   Сетка: одна колонка до 1080px, разделы разделены space-12, шаг 4px. */

/* шрифты — с нашего сайта (OFL, подмножество: латиница, кириллица, узбекская
   латиница), без запросов к Google: быстрее и кэшируются Cloudflare */
@font-face { font-family: "Unbounded"; font-weight: 700; font-display: swap; src: url("/assets/fonts/Unbounded-Bold.woff2") format("woff2"); }
@font-face { font-family: "Golos Text"; font-weight: 400; font-display: swap; src: url("/assets/fonts/GolosText-Regular.woff2") format("woff2"); }
@font-face { font-family: "Golos Text"; font-weight: 600; font-display: swap; src: url("/assets/fonts/GolosText-SemiBold.woff2") format("woff2"); }
:root {
  --paper: #f3f6f5; --surface: #ffffff; --ink: #111816; --ink-muted: #55625f;
  --line: #d3dcda; --brand: #0b6e78; --on-brand: #ffffff; --saffron: #f2a900;
  --on-saffron: #111816; --success: #1d7a3e;
  --font-display: "Unbounded", "Arial Black", system-ui, sans-serif;
  --font-sans: "Golos Text", "Segoe UI", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "Cascadia Mono", monospace;
  --radius-sm: 4px; --radius-cell: 8px; --radius-lg: 16px;
  --shadow-lift: 0 1px 2px rgba(17,24,22,.08), 0 4px 12px rgba(17,24,22,.06);
  color-scheme: light;
}
/* Тема: светлая по умолчанию, тёмная — переключателем в шапке
   (html[data-theme], выбор хранится в localStorage, см. /assets/theme.js). */
:root[data-theme="dark"] {
  --paper: #0e1514; --surface: #162120; --ink: #e6eeec; --ink-muted: #93a3a0;
  --line: #2a3836; --brand: #43c7c9; --on-brand: #071211; --saffron: #f5b82a;
  --success: #5fd08a; --shadow-lift: 0 1px 2px rgba(0,0,0,.5); color-scheme: dark;
}
.logo-dark { display: none !important; }
:root[data-theme="dark"] .logo-light { display: none !important; }
:root[data-theme="dark"] .logo-dark { display: block !important; }

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { animation: none !important; transition: none !important; } }
body { margin: 0; background: var(--paper); color: var(--ink); font: 400 16px/24px var(--font-sans); -webkit-font-smoothing: antialiased; }
a { color: var(--brand); }
a:focus-visible, button:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; border-radius: var(--radius-sm); }
.wrap { max-width: 1080px; margin: 0 auto; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
h1, h2, h3 { font-family: var(--font-display); font-weight: 700; text-wrap: balance; margin: 0; }
h1 { font-size: clamp(30px, 5vw, 44px); line-height: 1.12; letter-spacing: -.5px; }
h2 { font-size: clamp(24px, 3.4vw, 28px); line-height: 34px; }
h3 { font-size: 17px; line-height: 24px; }
.lead { font-size: 19px; line-height: 28px; color: var(--ink-muted); max-width: 34em; margin: 0; }
.eyebrow { font: 600 12px/16px var(--font-sans); letter-spacing: .08em; text-transform: uppercase; color: var(--ink-muted); }
.muted { color: var(--ink-muted); }
section { padding-block: 48px; }
section + section { border-top: 1px solid var(--line); }

/* шапка */
.top { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 10; background: var(--paper); border-bottom: 1px solid var(--line); }
body::before { content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); z-index: 10; background: var(--paper); }
.top .wrap { display: flex; align-items: center; gap: 16px; min-height: 64px; }
.top img { height: 26px; width: auto; display: block; }
.top nav { display: flex; gap: 20px; margin-left: auto; align-items: center; white-space: nowrap; }
.top nav a { color: var(--ink); text-decoration: none; font-weight: 600; }
.top nav a:hover { color: var(--brand); }
.lang { display: inline-flex; border: 1px solid var(--line); border-radius: var(--radius-cell); overflow: hidden; }
.lang a { padding: 4px 10px; font: 600 13px/20px var(--font-sans); }
.lang a[aria-current] { background: var(--ink); color: var(--paper); }
@media (max-width: 640px) { .top nav .hide-sm { display: none; } .top img { height: 20px; } .top nav { gap: 12px; } }

/* кнопки */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; font: 600 16px/24px var(--font-sans); padding: 12px 24px; border-radius: var(--radius-cell); border: 2px solid transparent; text-decoration: none; cursor: pointer; }
.btn-primary { background: var(--brand); color: var(--on-brand); }
.btn-accent { background: var(--saffron); color: var(--on-saffron); }
.btn-secondary { background: transparent; color: var(--ink); border-color: var(--line); }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; }

/* первый экран */
.hero { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 48px; align-items: center; padding-block: 56px 48px; }
.hero > div { display: grid; gap: 24px; min-width: 0; }
@media (max-width: 860px) { .hero { grid-template-columns: minmax(0, 1fr); gap: 32px; padding-block: 32px; } }
.facts { display: flex; flex-wrap: wrap; gap: 8px 20px; margin: 0; padding: 0; list-style: none; font-size: 14px; color: var(--ink-muted); }
.facts li::before { content: "✓ "; color: var(--success); font-weight: 700; }

/* сцена: полка + этикетка */
.shelf { display: grid; grid-template-columns: repeat(4, 56px); gap: 10px; }
.shelf span { height: 56px; border-radius: var(--radius-cell); background: var(--line); display: grid; place-items: center; font: 700 14px/1 var(--font-display); color: var(--ink-muted); font-variant-numeric: tabular-nums; }
.shelf .found { background: var(--saffron); color: var(--on-saffron); transform: translate(6px, -6px); box-shadow: var(--shadow-lift); }
.label { width: min(320px, 100%); aspect-ratio: 58 / 30; background: #ffffff; color: #000000; border-radius: var(--radius-sm); box-shadow: var(--shadow-lift); padding: 10px 12px; display: flex; flex-direction: column; align-items: center; justify-content: center; animation: printout 1.2s ease-out both; }
.label .num { font: 700 clamp(64px, 14vw, 92px)/.9 var(--font-display); letter-spacing: -2px; font-variant-numeric: tabular-nums; }
.label .lines { margin-top: 6px; font: 600 11px/14px var(--font-sans); text-align: center; }
.label .lines span { display: block; }
@keyframes printout { from { clip-path: inset(0 0 100% 0); } to { clip-path: inset(0 0 0 0); } }

/* шаги и преимущества */
.grid3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 290px), 1fr)); gap: 24px; margin-top: 32px; }
.step { display: grid; gap: 8px; align-content: start; }
.step .n { width: 40px; height: 40px; border-radius: var(--radius-cell); background: var(--ink); color: var(--paper); display: grid; place-items: center; font: 700 16px/1 var(--font-display); }
.step p, .perk p { margin: 0; color: var(--ink-muted); }
.perk { display: grid; gap: 8px; align-content: start; padding: 24px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-cell); }

/* цены */
.prices-head { display: flex; flex-wrap: wrap; gap: 16px; align-items: end; justify-content: space-between; }
.cur { display: inline-flex; border: 1px solid var(--line); border-radius: var(--radius-cell); overflow: hidden; }
.cur button { font: 600 14px/20px var(--font-sans); padding: 6px 14px; background: transparent; color: var(--ink); border: 0; cursor: pointer; }
.cur button[aria-pressed="true"] { background: var(--ink); color: var(--paper); }
.packs { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 16px; margin-top: 24px; }
.pack { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-cell); padding: 20px; display: flex; flex-direction: column; gap: 10px; }
.pack .qty { font: 700 30px/1 var(--font-display); letter-spacing: -1px; font-variant-numeric: tabular-nums; }
.pack .price { align-self: flex-start; font: 600 16px/24px var(--font-sans); padding: 4px 12px; border-radius: var(--radius-sm); background: var(--paper); font-variant-numeric: tabular-nums; }
.pack.hot .price { background: var(--saffron); color: var(--on-saffron); }
.pack .per { font-size: 13px; line-height: 18px; color: var(--ink-muted); font-variant-numeric: tabular-nums; }
.pack .btn { margin-top: auto; padding: 8px 16px; }
.trial { margin-top: 16px; padding: 16px 20px; border: 1px dashed var(--line); border-radius: var(--radius-cell); display: flex; flex-wrap: wrap; gap: 12px 24px; align-items: center; justify-content: space-between; }

/* совместимость, вопросы */
.spec { width: 100%; border-collapse: collapse; margin-top: 24px; }
.spec th, .spec td { text-align: left; padding: 12px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
.spec th { width: 34%; font-weight: 600; padding-right: 16px; }
.tablewrap { overflow-x: auto; }
details { border-bottom: 1px solid var(--line); padding-block: 16px; }
details summary { cursor: pointer; font-weight: 600; list-style-position: outside; }
details p { margin: 8px 0 0; color: var(--ink-muted); max-width: 46em; }
.faq { margin-top: 16px; }
code, .mono { font-family: var(--font-mono); font-size: 14px; }

footer { padding-block: 32px 48px; border-top: 1px solid var(--line); color: var(--ink-muted); font-size: 14px; line-height: 20px; }
footer .wrap { display: grid; gap: 12px; }
footer .row { display: flex; flex-wrap: wrap; gap: 8px 24px; align-items: center; }
footer img { height: 22px; width: auto; }

/* заказ по счёту */
.order { margin-top: 32px; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr); gap: 32px; padding: 24px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-cell); }
@media (max-width: 760px) { .order { grid-template-columns: minmax(0, 1fr); } }
.order > div { display: grid; gap: 12px; align-content: start; min-width: 0; }
.order form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 16px; }
@media (max-width: 520px) { .order form { grid-template-columns: minmax(0, 1fr); } }
.order label { display: grid; gap: 4px; font-size: 13px; line-height: 18px; color: var(--ink-muted); }
.order label.wide, .order .wide { grid-column: 1 / -1; }
.order input, .order select { font: 400 16px/24px var(--font-sans); color: var(--ink); background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 8px 10px; width: 100%; }
.order input:focus-visible, .order select:focus-visible { outline: 2px solid var(--brand); outline-offset: 1px; }
.order .sum { font: 700 22px/28px var(--font-display); font-variant-numeric: tabular-nums; }
.order .err { color: #b42318; min-height: 20px; font-size: 14px; }
:root[data-theme="dark"] .order .err { color: #ff8a7a; }

/* переключатель темы */
.theme { display: inline-grid; place-items: center; width: 36px; height: 36px; border: 1px solid var(--line); border-radius: var(--radius-cell); background: var(--surface); color: var(--ink); cursor: pointer; padding: 0; }
.theme svg { width: 18px; height: 18px; }
.theme .sun { display: none; }
:root[data-theme="dark"] .theme .sun { display: block; }
:root[data-theme="dark"] .theme .moon { display: none; }

/* «работает с WB ПВЗ» */
.works { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; font-size: 14px; line-height: 20px; }
.works .on { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px; background: color-mix(in srgb, var(--success) 14%, var(--surface)); border: 1px solid color-mix(in srgb, var(--success) 35%, transparent); font-weight: 600; }
.works .on::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--success); }
.works .soon { color: var(--ink-muted); }

/* окно программы на первом экране */
.stage { position: relative; display: block; padding-bottom: 150px; }
.appwin { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 12px 40px rgba(17,24,22,.12); overflow: hidden; max-width: 420px; margin-left: auto; }
.appbar { display: flex; align-items: center; gap: 10px; padding: 8px 12px; border-bottom: 1px solid var(--line); font: 600 13px/18px var(--font-sans); color: var(--ink-muted); background: var(--paper); }
.appbar i { display: inline-block; width: 10px; height: 10px; border-radius: 50%; background: var(--line); margin-right: 4px; }
.appbody { padding: 16px 18px 20px; display: grid; gap: 10px; }
.app-status { font-size: 13px; color: var(--ink-muted); display: flex; align-items: center; gap: 8px; }
.app-status::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--success); }
.app-cell { font: 700 76px/1 var(--font-display); text-align: center; letter-spacing: -2px; color: var(--ink); padding: 6px 0; }
.app-bal { display: flex; justify-content: space-between; gap: 8px; flex-wrap: wrap; font-size: 13px; padding: 8px 10px; border-radius: var(--radius-sm); background: var(--paper); }
.app-bal b { font-variant-numeric: tabular-nums; }
.app-log { font: 12px/18px var(--font-mono); color: var(--ink-muted); border-top: 1px solid var(--line); padding-top: 8px; }
.stage .label { position: absolute; left: 0; bottom: 0; width: min(270px, 70%); transform: rotate(-3deg); }
@media (max-width: 860px) { .stage { padding-bottom: 150px; } .appwin { margin: 0 auto; } .stage .label { left: 8px; } }

/* переключатель темы с подписью (на телефоне — только значок) */
.theme { width: auto; height: 36px; padding: 0 10px; gap: 6px; display: inline-flex; align-items: center; font: 600 14px/20px var(--font-sans); }
@media (max-width: 640px) { .theme .theme-label { display: none; } .theme { width: 36px; padding: 0; justify-content: center; } }
.btn.sm { padding: 6px 14px; font-size: 15px; line-height: 22px; }

/* «Как начать»: четыре шага по порядку */
.steps4 { list-style: none; counter-reset: step; margin: 32px 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); gap: 24px; }
.steps4 li { counter-increment: step; display: grid; gap: 8px; align-content: start; }
.steps4 li::before { content: counter(step); width: 40px; height: 40px; border-radius: var(--radius-cell); background: var(--ink); color: var(--paper); display: grid; place-items: center; font: 700 16px/1 var(--font-display); }
.steps4 b { font: 700 17px/24px var(--font-display); }
.steps4 span { color: var(--ink-muted); }
.steps4 a { font-weight: 600; }

/* этикетка: текст + образец */
.two { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 48px; align-items: center; }
.two > div { display: grid; gap: 16px; min-width: 0; }
@media (max-width: 860px) { .two { grid-template-columns: minmax(0, 1fr); gap: 24px; } }
.ticks { margin: 0; padding: 0; list-style: none; display: grid; gap: 8px; }
.ticks li { padding-left: 26px; position: relative; }
.ticks li::before { content: "✓"; position: absolute; left: 0; color: var(--success); font-weight: 700; }
.big-label { width: min(420px, 100%) !important; justify-self: center; animation: none; }
.big-label .num { font-size: clamp(80px, 16vw, 120px); }
.big-label .lines { font-size: 13px; line-height: 17px; }
/* узкий телефон: шапка в одну строку без обрезки */
@media (max-width: 640px) {
  .top .wrap { gap: 8px; }
  .top img { height: 18px; }
  .top nav { gap: 8px; }
  .lang a { padding: 4px 8px; }
  .top .btn.sm { padding: 6px 10px; font-size: 14px; }
}
