/* ==========================================================================
   Fonts — self-hosted, subset by fontsource (Playfair Display + Inter)
   ========================================================================== */

/* Playfair Display 500 normal */
@font-face {
  font-family: 'Playfair Display';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url(../fonts/playfair-display-cyrillic-500-normal.woff2) format('woff2');
  unicode-range: U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116;
}
@font-face {
  font-family: 'Playfair Display';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url(../fonts/playfair-display-latin-500-normal.woff2) format('woff2');
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
}

/* Playfair Display 600 normal */
@font-face {
  font-family: 'Playfair Display';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url(../fonts/playfair-display-cyrillic-600-normal.woff2) format('woff2');
  unicode-range: U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116;
}
@font-face {
  font-family: 'Playfair Display';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url(../fonts/playfair-display-latin-600-normal.woff2) format('woff2');
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
}

/* Playfair Display 500 italic */
@font-face {
  font-family: 'Playfair Display';
  font-style: italic;
  font-weight: 500;
  font-display: swap;
  src: url(../fonts/playfair-display-cyrillic-500-italic.woff2) format('woff2');
  unicode-range: U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116;
}
@font-face {
  font-family: 'Playfair Display';
  font-style: italic;
  font-weight: 500;
  font-display: swap;
  src: url(../fonts/playfair-display-latin-500-italic.woff2) format('woff2');
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
}

/* Inter variable — normal */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url(../fonts/inter-cyrillic-wght-normal.woff2) format('woff2-variations');
  unicode-range: U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116;
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url(../fonts/inter-latin-wght-normal.woff2) format('woff2-variations');
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
}

/* ==========================================================================
   Base — вариант A «Журнал» (токены, layout, компоненты)
   ========================================================================== */

:root {
  color-scheme: light;
  --paper: #F7F1E9;
  --surface: #FFFDFA;
  --ink: #231A12;
  --ink-soft: #5C4F45;
  --ink-mute: #756757;
  --line: #EAE0D3;
  --line-strong: #D9CCBB;
  --clay: #B4593E;
  --clay-deep: #93482F;
  --clay-tint: #F3E0D6;
  --gold: #7E5F38;
  --gold-bright: #C7A264;
  --sage: #6E7F65;
  --sage-tint: #E7EBE2;
  --plate: #F2EBE1;
  --shadow-soft: 0 1px 2px rgba(60,42,30,.05), 0 10px 28px -14px rgba(60,42,30,.18);
  --shadow-lift: 0 2px 4px rgba(60,42,30,.07), 0 20px 48px -20px rgba(60,42,30,.30);
  --shadow-cta: 0 10px 22px -10px rgba(180,89,62,.7);
  --font-body: 'Inter', system-ui, sans-serif;
  --font-display: 'Playfair Display', Georgia, serif;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  font-family: var(--font-body);
  background: var(--paper);
  color: var(--ink);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
::selection { background: var(--clay-tint); color: var(--clay-deep); }
h1, h2, h3 { font-family: var(--font-display); font-weight: 500; letter-spacing: -0.015em; text-wrap: balance; }
em.brand { font-style: italic; color: var(--clay-deep); }
a { color: inherit; }
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 24px; }
.eyebrow {
  font-size: 11px; font-weight: 600; text-transform: uppercase;
  letter-spacing: .16em; color: var(--gold); line-height: 1.3;
}
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  font: 600 15px/1 var(--font-body);
  padding: 15px 26px; border-radius: 999px; border: 0;
  cursor: pointer; text-decoration: none; transition: background .2s, transform .2s, box-shadow .2s;
}
.btn:focus-visible, a:focus-visible { outline: 2px solid var(--clay); outline-offset: 3px; border-radius: 4px; }
.btn-clay { background: var(--clay); color: #fff; box-shadow: var(--shadow-cta); }
.btn-clay:hover { background: var(--clay-deep); transform: translateY(-1px); }
.btn-ghost { background: transparent; color: var(--ink); border: 1px solid var(--line-strong); }
.btn-ghost:hover { border-color: var(--ink-soft); background: var(--surface); }

/* ---------- header ---------- */
header.site {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.nav { display: flex; align-items: center; justify-content: space-between; height: 68px; }
.logo { font: 600 22px var(--font-display); letter-spacing: -0.01em; text-decoration: none; }
.logo span { color: var(--clay); }
.nav-links { display: flex; gap: 28px; }
.nav-links a { font-size: 14px; color: var(--ink-soft); text-decoration: none; }
.nav-links a:hover { color: var(--ink); }
.nav-cta { display: flex; gap: 10px; align-items: center; }
.nav-cta .login { font-size: 14px; color: var(--ink-soft); text-decoration: none; padding: 8px 4px; }
.nav-cta .btn { padding: 11px 20px; font-size: 14px; box-shadow: none; }
@media (max-width: 860px) { .nav-links { display: none; } }
/* ≤640px: «Войти» и CTA дублируются в бургер-панели — в шапке остаются логотип и бургер */
@media (max-width: 640px) { .nav-cta { display: none; } }

/* ---------- hero ---------- */
.hero { padding: 72px 0 88px; overflow: hidden; }
.hero-grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: 56px; align-items: center; }
@media (max-width: 900px) { .hero-grid { grid-template-columns: 1fr; gap: 48px; } .hero { padding: 48px 0 64px; } }
.hero h1 {
  font-size: clamp(38px, 5.2vw, 62px);
  line-height: 1.08;
  margin: 18px 0 22px;
}
.hero .lede { font-size: 18px; color: var(--ink-soft); max-width: 46ch; margin-bottom: 32px; }
.hero-ctas { display: flex; gap: 14px; flex-wrap: wrap; align-items: center; }
.hero-note { margin-top: 18px; font-size: 13px; color: var(--ink-mute); display: flex; align-items: center; gap: 8px; }
.hero-note svg { color: var(--sage); flex: none; }

/* hero: реальный скрин приложения в раме телефона */
.hero-shot { position: relative; display: flex; justify-content: center; padding: 12px 0; }
.phone {
  width: min(330px, 82vw); background: var(--ink); border-radius: 44px; padding: 10px;
  box-shadow: var(--shadow-lift); transform: rotate(1.5deg);
}
.phone img { display: block; width: 100%; height: auto; border-radius: 35px; }
.chip-ai {
  position: absolute; z-index: 4; display: inline-flex; align-items: center; gap: 7px;
  background: var(--ink); color: var(--paper); font-size: 12px; font-weight: 600;
  padding: 9px 14px; border-radius: 999px; box-shadow: var(--shadow-lift);
}
.chip-ai.a { right: 2%; top: 26px; transform: rotate(2deg); }
.chip-ai.b { left: 2%; bottom: 78px; background: var(--surface); color: var(--ink); border: 1px solid var(--line); transform: rotate(-2deg); }
.chip-ai.b b { color: var(--sage); font-weight: 600; }
@media (max-width: 480px) {
  .chip-ai.a { right: -6px; top: 8px; }
  .chip-ai.b { left: -6px; bottom: 48px; }
}

/* ---------- ticker ---------- */
.ticker { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 16px 0; overflow: hidden; background: var(--surface); }
.ticker-track { display: flex; gap: 48px; width: max-content; animation: tick 30s linear infinite; }
@keyframes tick { to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) { .ticker-track { animation: none; } }
.ticker span { font-size: 12px; font-weight: 600; letter-spacing: .18em; text-transform: uppercase; color: var(--ink-mute); display: flex; align-items: center; gap: 48px; white-space: nowrap; }
.ticker i { font-style: normal; color: var(--gold-bright); }

/* ---------- pain (рестайл из варианта B под токены A) ---------- */
.pain { padding: 0 0 8px; }
.pain-head { max-width: 620px; margin-bottom: 40px; }
.pain-head h2 { font-size: clamp(30px, 3.6vw, 44px); line-height: 1.12; margin-top: 14px; }
.pain-head p { margin-top: 16px; color: var(--ink-soft); font-size: 17px; }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
@media (max-width: 780px) { .stats { grid-template-columns: 1fr; max-width: 420px; margin: 0 auto; } }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: 20px; padding: 30px 28px; }
.stat .num { font: 500 clamp(40px, 6vw, 52px)/1 var(--font-display); color: var(--clay); font-variant-numeric: tabular-nums; }
.stat .lbl { font-size: 15px; font-weight: 600; margin-top: 12px; color: var(--ink); }
.stat .sub { font-size: 13.5px; color: var(--ink-mute); margin-top: 4px; }

/* ---------- sections ---------- */
section.block { padding: 96px 0; }
@media (max-width: 900px) { section.block { padding: 64px 0; } }
.sec-head { max-width: 620px; margin-bottom: 56px; }
.sec-head h2 { font-size: clamp(30px, 3.6vw, 44px); line-height: 1.12; margin-top: 14px; }
.sec-head p { margin-top: 16px; color: var(--ink-soft); font-size: 17px; }

/* how it works */
.steps { border-top: 1px solid var(--line-strong); }
.step {
  display: grid; grid-template-columns: 72px 1fr 1.1fr; gap: 32px;
  padding: 36px 0; border-bottom: 1px solid var(--line); align-items: baseline;
}
@media (max-width: 780px) { .step { grid-template-columns: 48px 1fr; } .step .step-note { grid-column: 2; } }
.step-num { font: 500 28px var(--font-display); color: var(--gold-bright); font-variant-numeric: tabular-nums; }
.step h3 { font-size: 24px; }
.step h3 small { display: block; font: 500 13px/1.5 var(--font-body); color: var(--ink-mute); margin-top: 6px; letter-spacing: 0; }
.step-note { color: var(--ink-soft); font-size: 15px; max-width: 52ch; }

/* features editorial rows */
.feat {
  display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: center;
  padding: 72px 0; border-bottom: 1px solid var(--line);
}
.feat:last-child { border-bottom: 0; }
.feat:nth-child(even) .feat-visual { order: -1; }
@media (max-width: 860px) { .feat { grid-template-columns: 1fr; gap: 36px; padding: 48px 0; } .feat:nth-child(even) .feat-visual { order: 0; } }
.feat h3 { font-size: clamp(24px, 2.6vw, 32px); margin: 12px 0 14px; }
.feat p { color: var(--ink-soft); max-width: 48ch; }
.feat .more { display: inline-flex; align-items: center; gap: 6px; margin-top: 20px; font-size: 14px; font-weight: 600; color: var(--clay-deep); text-decoration: none; }
.feat .more:hover { gap: 10px; } .feat .more { transition: gap .2s; }
.feat-visual {
  position: relative; border-radius: 24px; background: var(--plate); border: 1px solid var(--line);
  aspect-ratio: 5 / 4; overflow: hidden;
}
/* скрин приложения в раме, обрезается нижним краем блока */
.shot-phone {
  position: absolute; left: 50%; top: 9%; transform: translateX(-50%);
  width: min(58%, 250px); background: var(--ink); border-radius: 28px 28px 0 0; padding: 7px 7px 0;
  box-shadow: var(--shadow-lift);
}
.shot-phone img { display: block; width: 100%; height: auto; border-radius: 22px 22px 0 0; }
.badge-premium { position: absolute; top: 16px; left: 16px; z-index: 2; font-size: 11px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--gold); background: #FBF6EC; border: 1px solid var(--gold-bright); border-radius: 999px; padding: 6px 12px; }

/* ---------- pricing ---------- */
.pricing { background: var(--surface); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.plans { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; align-items: stretch; }
@media (max-width: 860px) { .plans { grid-template-columns: 1fr; max-width: 420px; margin: 0 auto; } }
.plan { border: 1px solid var(--line); border-radius: 24px; padding: 32px 28px; background: var(--paper); display: flex; flex-direction: column; }
.plan.pro { background: var(--ink); color: var(--paper); border-color: var(--ink); box-shadow: var(--shadow-lift); position: relative; }
.plan.pro .plan-note, .plan.pro li { color: #C6B7A8; }
.plan-tag { position: absolute; top: -12px; left: 28px; background: var(--clay); color: #fff; font-size: 11px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; padding: 5px 12px; border-radius: 999px; }
.plan h3 { font-size: 22px; }
.plan .price { font: 500 40px var(--font-display); margin: 14px 0 2px; font-variant-numeric: tabular-nums; }
.plan .price small { font: 400 14px var(--font-body); color: inherit; opacity: .65; }
.plan-note { font-size: 13px; color: var(--ink-mute); margin-bottom: 22px; }
.plan ul { list-style: none; display: grid; gap: 10px; font-size: 14px; color: var(--ink-soft); margin-bottom: 28px; }
.plan li { display: flex; gap: 10px; align-items: flex-start; }
.plan li svg { flex: none; margin-top: 3px; color: var(--sage); }
.plan.pro li svg { color: var(--gold-bright); }
.plan .btn { margin-top: auto; justify-content: center; }
.plan.free .btn { background: var(--clay-tint); color: var(--clay-deep); }
.plan.free .btn:hover { background: #EAD2C4; }
.plan.premium .gold-lbl { color: var(--gold); font-size: 11px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; margin-bottom: 8px; display: block; }
.plan.premium .btn { background: transparent; border: 1px solid var(--gold-bright); color: var(--gold); }
.plan.premium .btn:hover { background: #FBF6EC; }

/* ---------- faq (двухколоночный, decision #4) ---------- */
.faq-grid { display: grid; grid-template-columns: minmax(260px, 320px) 1fr; gap: 64px; align-items: start; }
.faq-aside { position: sticky; top: 100px; }
.faq-list details { border-bottom: 1px solid var(--line); }
.faq-list summary {
  cursor: pointer; list-style: none; display: flex; justify-content: space-between; gap: 20px;
  padding: 24px 4px; font: 500 19px var(--font-display); align-items: center;
}
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary .ind { flex: none; width: 28px; height: 28px; border-radius: 999px; border: 1px solid var(--line-strong); display: flex; align-items: center; justify-content: center; transition: transform .25s; color: var(--ink-soft); }
.faq-list details[open] summary .ind { transform: rotate(45deg); border-color: var(--clay); color: var(--clay); }
.faq-list .ans { padding: 0 4px 26px; color: var(--ink-soft); max-width: 64ch; font-size: 15px; }
@media (max-width: 860px) {
  .faq-grid { grid-template-columns: 1fr; gap: 32px; }
  .faq-aside { position: static; }
}

/* ---------- final cta ---------- */
.final { padding: 110px 0; text-align: center; background: linear-gradient(180deg, var(--paper), var(--clay-tint)); }
.final h2 { font-size: clamp(34px, 4.6vw, 56px); line-height: 1.1; max-width: 18ch; margin: 14px auto 18px; }
.final p { color: var(--ink-soft); margin-bottom: 34px; }

/* ---------- footer ---------- */
footer.site { border-top: 1px solid var(--line); padding: 48px 0 40px; background: var(--surface); }
.foot { display: flex; justify-content: space-between; gap: 32px; flex-wrap: wrap; }
.foot nav { display: flex; gap: 24px; flex-wrap: wrap; }
.foot a { font-size: 13px; color: var(--ink-mute); text-decoration: none; }
.foot a:hover { color: var(--ink); }
.foot .cr { font-size: 13px; color: var(--ink-mute); }

/* ---------- mobile nav / burger (decision #5) ---------- */
.nav-toggle {
  display: none;
  align-items: center; justify-content: center;
  width: 44px; height: 44px;
  background: transparent; border: 1px solid var(--line-strong); border-radius: 12px;
  color: var(--ink); cursor: pointer; flex: none;
}
.nav-toggle svg { pointer-events: none; }
@media (max-width: 860px) { .nav-toggle { display: inline-flex; } }
.mobile-panel {
  display: none;
  flex-direction: column;
  gap: 4px;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  padding: 12px 24px 20px;
}
.mobile-panel[data-open="true"] { display: flex; }
.mobile-panel a {
  font-size: 15px; color: var(--ink-soft); text-decoration: none;
  padding: 12px 4px; min-height: 44px; display: flex; align-items: center;
  border-bottom: 1px solid var(--line);
}
.mobile-panel a:last-child { border-bottom: 0; }
.mobile-panel a:hover { color: var(--ink); }
.mobile-panel .btn { margin-top: 8px; justify-content: center; width: 100%; }
@media (min-width: 861px) { .mobile-panel { display: none !important; } }

/* reveal */
.rv { opacity: 0; transform: translateY(16px); transition: opacity .6s ease, transform .6s ease; }
.rv.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .rv { opacity: 1; transform: none; transition: none; } }
