/* HaoHao — сайт. «Бумага, тушь, киноварь»: цвета и шрифты приложения.
   Порядок: шрифты → знаки (tokens) → основа → компоненты → разделы → движение. */

/* ───────── Шрифты ───────── */
@font-face { font-family: "Golos Text"; src: url("fonts/GolosText.woff2") format("woff2"); font-weight: 400 900; font-display: swap; }
/* Каллиграфический шрифт: лёгкий набор знаков сайта; полный файл подгрузится сам, если в тексте появится новый иероглиф. */
@font-face { font-family: "HaoHao Kai"; src: url("fonts/HaoHaoKai-site.woff2") format("woff2"); font-display: swap; }
@font-face { font-family: "HaoHao Kai Full"; src: url("fonts/TianziKai-Medium.woff2") format("woff2"); font-display: swap; }

/* ───────── Знаки ───────── */
:root {
  --paper: #F4EEE2; --surface: #FFFBF4; --raised: #EDE5D5;
  --ink: #1F1B16; --ink-soft: #6F675B; --line: #E2D8C5;
  --seal: #C8372D; --jade: #2B7A68; --ochre: #B27A14; --indigo: #2F5FA8;
  --seal-brand: #C8372D; --on-seal: #FFFFFF;         /* печать и главная кнопка одинаковы в обеих темах */
  --tone1: #C8372D; --tone2: #B27A14; --tone3: #2B7A68; --tone4: #2F5FA8; --tone0: #8A8275;
  /* те же тона, затемнённые для мелкого текста на светлом фоне (контраст не ниже 4,5:1) */
  --tone1-sm: #B32F26; --tone2-sm: #8A5E08; --tone3-sm: #226556; --tone4-sm: #2A569A; --tone0-sm: #6F675B;
  --bezel: #1B1814; --shadow: 31 27 22;

  --font-ui: "Golos Text", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-zh: "HaoHao Kai", "HaoHao Kai Full", "Kaiti SC", STKaiti, KaiTi, "Noto Serif CJK SC", serif;

  /* шкала текста: шаг ≈ 1,25 */
  --fs-xs: .8125rem; --fs-sm: .9375rem; --fs-md: 1.0625rem; --fs-lg: 1.25rem;
  --fs-xl: clamp(1.45rem, 1.1rem + 1.4vw, 1.9rem);
  --fs-2xl: clamp(1.75rem, 1.2rem + 2.4vw, 2.6rem);
  --fs-3xl: clamp(2.25rem, 1.3rem + 4.6vw, 4.1rem);

  /* шкала отступов: 4 · 8 · 12 · 16 · 24 · 32 · 48 · 72 */
  --s1: 4px; --s2: 8px; --s3: 12px; --s4: 16px; --s5: 24px; --s6: 32px; --s7: 48px; --s8: 72px;
  --section: clamp(64px, 5vw + 44px, 128px);
  --gutter: clamp(20px, 5vw, 40px);
  --r-sm: 10px; --r-md: 16px; --r-lg: 24px; --r-xl: 32px;
  --ease: cubic-bezier(.2, .7, .2, 1);
}
@media (prefers-color-scheme: dark) {
  :root {
    --paper: #141210; --surface: #1E1B17; --raised: #29251F;
    --ink: #F0E8DA; --ink-soft: #A59C8D; --line: #342F28;
    --seal: #E5604F; --jade: #5FB9A3; --ochre: #E0A94A; --indigo: #82A9EA;
    --tone1: #EE7264; --tone2: #E0A94A; --tone3: #5FB9A3; --tone4: #82A9EA; --tone0: #A59C8D;
    --tone1-sm: #EE7264; --tone2-sm: #E0A94A; --tone3-sm: #5FB9A3; --tone4-sm: #82A9EA; --tone0-sm: #A59C8D;
    --bezel: #3A342C; --shadow: 0 0 0;
  }
}

/* ───────── Основа ───────── */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 76px; }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font: 400 var(--fs-md)/1.6 var(--font-ui); font-feature-settings: "kern", "liga";
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; overflow-x: hidden;
}
h1, h2, h3, p, ul, ol, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
img, svg { display: block; max-width: 100%; }
img { height: auto; }
a { color: inherit; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
b { font-weight: 600; }
[hidden] { display: none !important; }
.sprite { position: absolute; }
.icon { width: 1.25em; height: 1.25em; fill: currentColor; flex: none; }
:focus-visible { outline: 3px solid var(--indigo); outline-offset: 3px; border-radius: 6px; }

/* два языка в одной странице */
html[data-lang="ru"] .t[lang="en"], html[data-lang="en"] .t[lang="ru"] { display: none; }

.zh { font-family: var(--font-zh); font-weight: 500; line-height: 1.15; }
.py { font-family: var(--font-zh); letter-spacing: .01em; }
.tone1 { color: var(--tone1); } .tone2 { color: var(--tone2); } .tone3 { color: var(--tone3); }
.tone4 { color: var(--tone4); } .tone0 { color: var(--tone0); }
.py--sm .tone1 { color: var(--tone1-sm); } .py--sm .tone2 { color: var(--tone2-sm); } .py--sm .tone3 { color: var(--tone3-sm); }
.py--sm .tone4 { color: var(--tone4-sm); } .py--sm .tone0 { color: var(--tone0-sm); }

.wrap { width: 100%; max-width: 1160px; margin-inline: auto; padding-inline: var(--gutter); }
.wrap--narrow { max-width: 820px; }
.skip { position: absolute; left: var(--s4); top: -100px; z-index: 20; padding: var(--s3) var(--s4); background: var(--ink); color: var(--paper); border-radius: var(--r-sm); }
.skip:focus { top: var(--s3); }

h1, h2, h3 { font-weight: 600; letter-spacing: -.022em; text-wrap: balance; }
h1 { font-size: var(--fs-3xl); line-height: 1.04; letter-spacing: -.035em; }
h2 { font-size: var(--fs-2xl); line-height: 1.12; }
h3 { font-size: var(--fs-lg); line-height: 1.25; }
p { text-wrap: pretty; }
.eyebrow { font-size: var(--fs-xs); font-weight: 600; letter-spacing: .09em; text-transform: uppercase; color: var(--seal); }
@media (prefers-color-scheme: light) { .eyebrow { color: #B32F26; } }

/* ───────── Компоненты ───────── */

/* печать: знак 好 и бейджи уровней */
.seal { display: inline-grid; place-items: center; flex: none; background: var(--seal-brand); color: var(--on-seal); border-radius: 24%; }
.seal svg { width: 100%; height: 100%; fill: currentColor; }
.seal--s { width: 34px; height: 34px; }
.seal--m { width: 44px; height: 44px; border-radius: 12px; font-size: 1.5rem; }
.seal--m .zh { line-height: 1; transform: translateY(-.04em); }
.seal--stamp { position: absolute; width: clamp(56px, 9vw, 84px); aspect-ratio: 1; transform: rotate(-7deg); box-shadow: 0 10px 24px -10px rgb(200 55 45 / .55); }

/* кнопки: главная, тёмная, «скоро» */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--s2);
  min-height: 54px; padding: 0 var(--s5); border-radius: 999px;
  font-weight: 600; font-size: var(--fs-md); line-height: 1.1; text-decoration: none; white-space: nowrap;
  transition: transform .2s var(--ease), box-shadow .2s var(--ease), background-color .2s;
}
.btn--primary { background: var(--seal-brand); color: var(--on-seal); box-shadow: 0 12px 26px -14px rgb(200 55 45 / .9); }
.btn--primary:hover { background: #B32F26; transform: translateY(-2px); box-shadow: 0 18px 30px -14px rgb(200 55 45 / .9); }
.btn--primary:active { transform: translateY(0); }
.btn--ink { background: var(--ink); color: var(--paper); width: 100%; border-radius: var(--r-md); }
.btn--ink:hover { opacity: .9; }
.btn--soon { border: 1.5px dashed var(--line); color: var(--ink-soft); cursor: default; gap: var(--s3); border-color: color-mix(in srgb, var(--ink-soft) 45%, transparent); }

.chip {
  display: inline-flex; align-items: center; padding: 3px 10px; border-radius: 999px;
  font-size: var(--fs-xs); font-weight: 600; line-height: 1.4; white-space: nowrap;
  background: var(--raised); color: var(--ink);
}
.chip--jade { background: color-mix(in srgb, var(--jade) 18%, var(--surface)); }
.chip--ochre { background: color-mix(in srgb, var(--ochre) 22%, var(--surface)); }
.chip--indigo { background: color-mix(in srgb, var(--indigo) 16%, var(--surface)); }

/* список с киноварными отметками */
.ticks { display: grid; gap: var(--s3); }
.ticks li { position: relative; padding-left: 26px; color: var(--ink-soft); }
.ticks li b { color: var(--ink); }
.ticks li::before { content: ""; position: absolute; left: 2px; top: .62em; width: 9px; height: 9px; border-radius: 2.5px; background: var(--seal); transform: rotate(45deg); }

/* клетка тянь-цзы-гэ */
.grid-cell {
  position: relative; display: block; width: 100%; aspect-ratio: 1; padding: 0; overflow: hidden;
  background: var(--surface); border: 2px solid var(--line); border-radius: var(--r-lg); color: var(--ink);
}
.grid-cell--seal { border-color: color-mix(in srgb, var(--seal) 55%, var(--line)); }
.grid-cell::before, .grid-cell::after { content: ""; position: absolute; inset: 0; margin: auto; pointer-events: none; }
.grid-cell::before { width: 0; height: 100%; border-left: 1.5px dashed color-mix(in srgb, var(--seal) 32%, transparent); }
.grid-cell::after { height: 0; width: 100%; border-top: 1.5px dashed color-mix(in srgb, var(--seal) 32%, transparent); }
.grid-cell__fallback { position: absolute; inset: 0; display: grid; place-items: center; font-size: min(62cqw, 300px); container-type: normal; }
.grid-cell { container-type: inline-size; }
.grid-cell svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.grid-cell.is-ready::before, .grid-cell.is-ready::after, .grid-cell.is-ready .grid-cell__fallback { display: none; }
.gc-guide { fill: none; stroke: var(--seal); stroke-opacity: .3; stroke-width: 3; stroke-dasharray: 16 14; }
.gc-ghost { fill: var(--ink); fill-opacity: .09; }
.gc-stroke { fill: none; stroke: var(--seal); stroke-width: 190; stroke-linecap: round; stroke-linejoin: round; transition: stroke .5s ease; }
.gc-stroke.is-done { stroke: var(--ink); }

/* рамка телефона вокруг снимка */
.phone { flex: none; width: clamp(200px, 56vw, 248px); }
.phone img { width: 100%; aspect-ratio: 9 / 20; object-fit: cover; background: var(--raised); border: 7px solid var(--bezel); border-radius: 34px; box-shadow: 0 30px 50px -28px rgb(var(--shadow) / .45), 0 2px 0 rgb(255 255 255 / .06) inset; }
.phone figcaption { margin-top: var(--s4); text-align: center; font-size: var(--fs-sm); color: var(--ink-soft); }

/* ───────── Шапка ───────── */
.site-header { position: sticky; top: 0; z-index: 10; background: color-mix(in srgb, var(--paper) 86%, 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: var(--s5); min-height: 68px; }
.brand { display: inline-flex; align-items: center; gap: var(--s3); min-height: 44px; text-decoration: none; }
.brand__name { font-weight: 700; font-size: 1.2rem; letter-spacing: -.02em; }
.nav { display: none; gap: var(--s5); margin-left: auto; font-size: var(--fs-sm); }
.nav a { display: inline-flex; align-items: center; min-height: 44px; min-width: 44px; justify-content: center; text-decoration: none; color: var(--ink-soft); transition: color .2s; }
.nav a:hover { color: var(--ink); }
.lang { display: inline-flex; margin-left: auto; padding: 3px; background: var(--raised); border-radius: 999px; }
.lang button { min-width: 46px; min-height: 44px; padding: 0 var(--s3); border-radius: 999px; font-size: var(--fs-xs); font-weight: 700; letter-spacing: .06em; color: color-mix(in srgb, var(--ink) 55%, var(--ink-soft)); transition: background-color .2s, color .2s; }
.lang button[aria-pressed="true"] { background: var(--surface); color: var(--ink); box-shadow: 0 1px 2px rgb(var(--shadow) / .14); }
@media (min-width: 860px) { .nav { display: flex; } .lang { margin-left: 0; } }

/* ───────── Первый экран ───────── */
.hero { position: relative; padding-block: clamp(36px, 6vw, 88px) var(--section); overflow-x: clip; }
.hero::before { /* тёплое пятно света за листом */
  content: ""; position: absolute; inset: -10% -20% auto auto; width: min(900px, 110vw); aspect-ratio: 1; pointer-events: none;
  background: radial-gradient(closest-side, color-mix(in srgb, var(--seal) 13%, transparent), transparent 70%); z-index: -1;
}
.hero__grid { display: grid; gap: var(--s7); align-items: center; }
.hero__text > * + * { margin-top: var(--s5); }
.lead { font-size: var(--fs-lg); line-height: 1.5; color: var(--ink-soft); max-width: 34em; }
.cta { display: flex; flex-wrap: wrap; gap: var(--s3); margin-top: var(--s6) !important; }
.cta--center { justify-content: center; }
.hero__note { font-size: var(--fs-sm); color: var(--ink-soft); margin-top: var(--s4) !important; }
.hero__art { width: 100%; max-width: 440px; margin-inline: auto; }
.sheet { position: relative; padding: clamp(16px, 4vw, 26px); background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-xl); box-shadow: 0 40px 70px -40px rgb(var(--shadow) / .4), 0 2px 6px rgb(var(--shadow) / .05); transform: rotate(1.2deg); }
.sheet .seal--stamp { right: -14px; top: -18px; }
.sheet__cap { padding: var(--s5) var(--s2) var(--s2); display: grid; gap: var(--s2); }
.sheet__reading { display: flex; align-items: baseline; gap: var(--s3); font-size: var(--fs-lg); font-weight: 600; }
.sheet__reading .py { font-size: 2rem; line-height: 1; font-weight: 400; }
.sheet__dot { color: var(--ink-soft); }
.sheet__saying { display: flex; flex-wrap: wrap; align-items: baseline; gap: var(--s2) var(--s3); padding-top: var(--s3); border-top: 1px dashed var(--line); color: var(--ink-soft); font-size: var(--fs-sm); }
.sheet__saying .zh { font-size: 1.5rem; color: var(--ink); }
.sheet__saying .py { font-size: 1.25rem; }
@media (min-width: 900px) {
  .hero__grid { grid-template-columns: minmax(0, 1.08fr) minmax(0, .92fr); gap: var(--s8); }
  .hero__art { margin-right: 0; }
}

/* ───────── Разделы ───────── */
.section { padding-block: var(--section); }
.section--tint { background: color-mix(in srgb, var(--raised) 55%, var(--paper)); }
.section--tight { padding-block: calc(var(--section) * .55); }
.head { max-width: 46rem; display: grid; gap: var(--s4); margin-bottom: var(--s7); }
.head p:not(.eyebrow) { color: var(--ink-soft); font-size: var(--fs-lg); line-height: 1.5; }

.split { display: grid; gap: var(--s7); align-items: center; }
.split__text { display: grid; gap: var(--s5); max-width: 34rem; }
.split__text > p:not(.eyebrow) { color: var(--ink-soft); }
.split__demo { width: 100%; max-width: 440px; margin-inline: auto; }
@media (min-width: 900px) {
  .split { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--s8); }
  .split--flip .split__text { order: 2; }
}
.demo-label { font-size: var(--fs-sm); color: var(--ink-soft); margin-bottom: var(--s3); text-align: center; }
.demo-note { min-height: 1.6em; margin-top: var(--s3); font-size: var(--fs-sm); color: var(--ink-soft); text-align: center; }

/* карточка */
.card { display: flex; flex-direction: column; min-height: 500px; padding: var(--s4); background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-xl); box-shadow: 0 40px 70px -44px rgb(var(--shadow) / .42); }
.card__top { display: flex; justify-content: space-between; align-items: center; }
.card__count { font-size: var(--fs-xs); font-weight: 600; color: var(--ink-soft); font-variant-numeric: tabular-nums; }
.card__body { flex: 1; display: grid; align-content: center; justify-items: center; gap: var(--s4); padding: var(--s5) var(--s2); text-align: center; }
.card__hanzi { display: flex; gap: var(--s2); }
.mini-cell { position: relative; display: grid; place-items: center; width: 104px; aspect-ratio: 1; font-size: 4.4rem; background: var(--paper); border: 1.5px solid var(--line); border-radius: var(--r-md); }
.mini-cell::before, .mini-cell::after { content: ""; position: absolute; inset: 0; margin: auto; }
.mini-cell::before { width: 0; height: 100%; border-left: 1px dashed color-mix(in srgb, var(--seal) 26%, transparent); }
.mini-cell::after { height: 0; width: 100%; border-top: 1px dashed color-mix(in srgb, var(--seal) 26%, transparent); }
.card__hint { font-size: var(--fs-sm); color: var(--ink-soft); }
.card__reading { display: flex; align-items: center; justify-content: center; gap: var(--s2); font-size: 2rem; line-height: 1.1; }
.sound { display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; color: var(--seal); transition: background-color .2s, transform .2s; }
.sound:hover { background: color-mix(in srgb, var(--seal) 12%, transparent); }
.sound.is-playing { transform: scale(1.12); }
.card__meaning { font-size: var(--fs-lg); font-weight: 600; margin-top: var(--s2); }
.card__example { margin-top: var(--s4); padding-top: var(--s4); border-top: 1px solid var(--line); display: grid; gap: 2px; width: 100%; }
.card__example .zh { font-size: 1.5rem; }
.card__example .py { font-size: 1.15rem; }
.card__ex-tr { font-size: var(--fs-sm); color: var(--ink-soft); }
.card[data-state="front"] .card__answer, .card[data-state="front"] .grade { display: none; }
.card[data-state="back"] .card__hint, .card[data-state="back"] .card__show { display: none; }
.card.is-leaving .card__body { opacity: 0; transform: translateY(-10px); }
.card__body { transition: opacity .25s ease, transform .25s ease; }
.grade { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--s2); }
.grade__btn { display: grid; gap: 2px; min-height: 58px; padding: var(--s2) var(--s1); border-radius: var(--r-md); text-align: center; transition: transform .15s var(--ease), filter .2s; background: color-mix(in srgb, var(--c) 16%, var(--surface)); color: var(--c-ink); }
.grade__btn b { font-size: var(--fs-sm); font-weight: 700; }
.grade__btn small { font-size: var(--fs-xs); font-weight: 500; }
.grade__btn:hover { transform: translateY(-2px); filter: saturate(1.2); }
.grade__btn--again { --c: var(--seal); --c-ink: #98231B; }
.grade__btn--hard { --c: var(--ochre); --c-ink: #6B4704; }
.grade__btn--good { --c: var(--jade); --c-ink: #19574A; }
@media (prefers-color-scheme: dark) {
  .grade__btn--again { --c-ink: #F08C80; } .grade__btn--hard { --c-ink: #E8B865; } .grade__btn--good { --c-ink: #7CCDB8; }
}

/* письмо */
.writing { position: relative; max-width: 520px; display: grid; }
.writing__pad { position: relative; z-index: 1; width: min(100%, 360px); padding: var(--s4); background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-xl); box-shadow: 0 40px 70px -44px rgb(var(--shadow) / .42); }
.writing__reading { display: flex; align-items: baseline; justify-content: center; gap: var(--s3); margin-bottom: var(--s3); }
.writing__reading .py { font-size: 1.9rem; line-height: 1; }
.writing__tr { color: var(--ink-soft); font-size: var(--fs-sm); }
.verdict { display: flex; gap: var(--s3); align-items: flex-start; margin-top: var(--s3); padding: var(--s3) var(--s4); border-radius: var(--r-md); background: color-mix(in srgb, var(--jade) 14%, var(--surface)); font-size: var(--fs-sm); line-height: 1.45; }
.verdict .icon { width: 22px; height: 22px; color: var(--jade); margin-top: 1px; }
.verdict b { display: block; }
.js .verdict { opacity: 0; transform: translateY(6px); transition: opacity .5s ease, transform .5s var(--ease); }
.js .verdict.is-on { opacity: 1; transform: none; }
.writing__replay { display: flex; align-items: center; justify-content: center; gap: var(--s2); margin-top: var(--s3); font-size: var(--fs-xs); color: var(--ink-soft); }
.writing__replay .icon { width: 15px; height: 15px; }
.phone--tilt { display: none; }
@media (min-width: 520px) {
  .writing { grid-template-columns: 1fr; min-height: 520px; align-items: start; }
  .phone--tilt { display: block; position: absolute; right: 0; top: 40px; width: 230px; transform: rotate(5deg); }
  .writing__pad { margin-top: 0; }
}

/* тоны */
.tones { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--s3); }
.tone-card { position: relative; display: grid; justify-items: center; gap: 2px; padding: var(--s5) var(--s3) var(--s4); background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); transition: transform .2s var(--ease), border-color .2s, box-shadow .2s; }
.tone-card:hover, .tone-card.is-playing { transform: translateY(-3px); border-color: var(--c); box-shadow: 0 18px 30px -22px var(--c); }
.tone-card__num { position: absolute; left: 12px; top: 12px; display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; font-size: var(--fs-xs); font-weight: 700; color: var(--paper); background: var(--ink-soft); }
.tone-card .zh { font-size: 2.7rem; }
.tone-card .py { font-size: 1.5rem; line-height: 1.1; }
.tone-card__tr { font-size: var(--fs-sm); color: var(--ink-soft); }
.tones__legend { display: flex; justify-content: center; gap: var(--s3); margin-top: var(--s5); font-family: var(--font-zh); font-size: 1.6rem; line-height: 1; }
.tones__legend span { display: grid; place-items: center; width: 46px; height: 46px; border-radius: 50%; color: var(--c); background: color-mix(in srgb, var(--c) 13%, transparent); }

/* уровни */
.levels { display: grid; gap: var(--s2); }
.level { display: grid; grid-template-columns: 44px minmax(0, 1fr) auto; gap: 4px var(--s4); align-items: center; padding: var(--s3) var(--s4); background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); }
.level__main { display: grid; gap: 7px; }
.level__bar { display: block; height: 6px; width: var(--w); min-width: 12px; border-radius: 999px; background: var(--seal); transform-origin: left; }
.level__n { font-weight: 600; font-variant-numeric: tabular-nums; text-align: right; }
.level .chip { grid-column: 2 / -1; justify-self: start; }
.level .seal { grid-row: span 2; }
.level--soon .seal { background: transparent; color: var(--ink-soft); box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--ink-soft) 55%, transparent); }
.level--soon .level__bar { background: repeating-linear-gradient(90deg, color-mix(in srgb, var(--ink-soft) 60%, transparent) 0 6px, transparent 6px 11px); }
.levels__sum { margin-top: var(--s5); color: var(--ink-soft); max-width: 46rem; }
.levels__sum b { color: var(--ink); }
@media (min-width: 640px) {
  .level { grid-template-columns: 44px minmax(0, 1fr) 76px 136px; padding-block: var(--s3); }
  .level .chip { grid-column: 4; grid-row: 1; justify-self: end; }
  .level .seal { grid-row: auto; }
}
.js .reveal .level__bar { transform: scaleX(0); transition: transform 1s var(--ease); }
.js .reveal.is-in .level__bar { transform: scaleX(1); }
.js .reveal.is-in .level:nth-child(n+3) .level__bar { transition-delay: .1s; }
.js .reveal.is-in .level:nth-child(n+5) .level__bar { transition-delay: .2s; }
.js .reveal.is-in .level:nth-child(n+7) .level__bar { transition-delay: .3s; }

/* лента снимков */
.shots { display: flex; gap: clamp(16px, 3vw, 32px); overflow-x: auto; padding: var(--s2) max(var(--gutter), calc((100vw - 1160px) / 2 + var(--gutter))) var(--s6); scroll-snap-type: x proximity; scrollbar-width: thin; scrollbar-color: var(--line) transparent; -webkit-overflow-scrolling: touch; }
.shots .phone { scroll-snap-align: center; }
.shots .phone:nth-child(even) { margin-top: var(--s6); }

/* четыре коротких довода */
.perks { display: grid; gap: var(--s5) var(--s6); grid-template-columns: repeat(2, minmax(0, 1fr)); }
.perks li { padding-top: var(--s4); border-top: 2px solid var(--ink); font-size: var(--fs-sm); color: var(--ink-soft); display: grid; gap: var(--s1); align-content: start; }
.perks b { font-size: var(--fs-md); color: var(--ink); }
@media (min-width: 860px) { .perks { grid-template-columns: repeat(4, minmax(0, 1fr)); } }

/* цены */
.plans { display: grid; gap: var(--s4); }
.plan { position: relative; display: grid; align-content: start; gap: var(--s4); padding: var(--s6) var(--s5); background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); }
.plan__price { font-size: var(--fs-2xl); font-weight: 700; letter-spacing: -.03em; line-height: 1; font-variant-numeric: tabular-nums; }
.plan--accent { border: 2px solid var(--seal-brand); }
.seal--corner { right: 18px; top: -22px; width: 58px; }
.plans__note { margin-top: var(--s5); color: var(--ink-soft); font-size: var(--fs-sm); max-width: 46rem; }
@media (min-width: 860px) { .plans { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

/* вопросы */
.faq { border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary { display: flex; justify-content: space-between; align-items: center; gap: var(--s4); padding: var(--s5) 0; font-size: var(--fs-lg); font-weight: 600; line-height: 1.3; cursor: pointer; list-style: none; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: ""; flex: none; width: 14px; height: 14px; background: linear-gradient(var(--seal), var(--seal)) center / 100% 2px no-repeat, linear-gradient(var(--seal), var(--seal)) center / 2px 100% no-repeat; transition: transform .3s var(--ease); }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { padding: 0 var(--s6) var(--s5) 0; color: var(--ink-soft); max-width: 44rem; }

/* финал */
.final { position: relative; overflow: hidden; padding-block: var(--section); text-align: center; background: var(--ink); color: var(--paper); }
.final__in { position: relative; display: grid; justify-items: center; gap: var(--s4); }
.final .final__zh { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -54%); width: max-content; max-width: none; font-size: clamp(6rem, 24vw, 19rem); line-height: 1; white-space: nowrap; opacity: .06; pointer-events: none; user-select: none; }
.final h2, .final p, .final .cta { position: relative; }
.final p { max-width: 34rem; opacity: .78; }
.final .btn--soon { color: inherit; opacity: .75; border-color: currentColor; }
.final .chip { background: rgb(255 255 255 / .14); color: inherit; }
.final__note { font-size: var(--fs-sm); }
@media (prefers-color-scheme: dark) { .final { background: var(--surface); color: var(--ink); border-top: 1px solid var(--line); } .final .chip { background: var(--raised); } }

/* подвал */
.site-footer { padding-block: var(--s7); font-size: var(--fs-sm); color: var(--ink-soft); }
.foot { display: grid; gap: var(--s5); }
.foot__brand { display: grid; gap: var(--s3); }
.foot__brand .brand { color: var(--ink); }
.foot__links { display: grid; gap: 0; justify-items: start; }
.foot__links a { display: inline-flex; align-items: center; min-height: 44px; text-underline-offset: 3px; text-decoration-color: color-mix(in srgb, currentColor 40%, transparent); }
.foot__links a:hover { color: var(--ink); }
.foot__credits { font-size: var(--fs-xs); line-height: 1.6; max-width: 60rem; padding-top: var(--s5); border-top: 1px solid var(--line); }
.foot__copy { font-size: var(--fs-xs); }
@media (min-width: 760px) { .foot { grid-template-columns: 1fr auto; } .foot__credits, .foot__copy { grid-column: 1 / -1; } }

/* страницы документов */
.doc { padding-block: var(--s7) var(--section); }
.doc h1 { font-size: var(--fs-2xl); letter-spacing: -.025em; margin-bottom: var(--s5); }
.doc h2 { font-size: var(--fs-lg); margin: var(--s6) 0 var(--s3); }
.doc p, .doc li { color: var(--ink-soft); margin-bottom: var(--s3); }
.doc .stub { padding: var(--s5); border: 1.5px dashed color-mix(in srgb, var(--ink-soft) 45%, transparent); border-radius: var(--r-md); color: var(--ink); }
.doc a { color: var(--ink); }

/* ───────── Движение ───────── */
@media (prefers-reduced-motion: no-preference) {
  .js .reveal { opacity: 0; transform: translateY(22px); transition: opacity .8s var(--ease), transform .8s var(--ease); }
  .js .reveal.is-in { opacity: 1; transform: none; }
  .js .hero__text > * { animation: rise .8s var(--ease) both; }
  .js .hero__text > :nth-child(2) { animation-delay: .06s; } .js .hero__text > :nth-child(3) { animation-delay: .12s; }
  .js .hero__text > :nth-child(4) { animation-delay: .18s; } .js .hero__text > :nth-child(5) { animation-delay: .24s; }
  .js .hero__art { animation: rise 1s var(--ease) .15s both; }
  @keyframes rise { from { opacity: 0; transform: translateY(20px); } }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; }
}
