/* Лендинг «Японская ходьба». Направление — «полевой дневник прогулки»:
   светлая бумага, тёмный набор, тёплый быстрый и оливковый спокойный.
   Контраст проверен по WCAG AA: светлый текст на --fast/--slow не проходит,
   поэтому на цветных сегментах только тёмный текст. */

:root {
  --paper: #F2EEE5;
  --paper-2: #ECE7DC;      /* панель цены; --muted на ней 5.45:1 */
  --ink: #171913;
  --ink-2: #2A2D24;
  --muted: #5A5D52;        /* на --paper 5.81:1 */
  --muted-on-ink: #B5AF9F; /* на --ink 8.1:1 */
  --fast: #F45A36;
  --slow: #8B9D70;
  --slow-stripe: #96A77C; /* штриховка спокойной фазы */
  --rule: #D2CDBF;
  --accent-text: #B93822;  /* на --paper 4.97:1 */

  --sans: 'Onest', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --display: 'Unbounded', 'Onest', system-ui, sans-serif;

  --max: 1184px;
  --gutter: 16px;
  --section: 56px;
  --radius: 10px;
  --sticky-h: 0px;
}

@media (min-width: 600px) { :root { --gutter: 24px; --section: 72px; } }
@media (min-width: 1024px) { :root { --gutter: 32px; --section: 104px; } }

*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-padding-top: 16px;
  scroll-padding-bottom: calc(var(--sticky-h) + 16px);
}
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-wrap: break-word;
  padding-bottom: var(--sticky-h);
}
@media (min-width: 600px) { body { font-size: 18px; } }

img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-underline-offset: 0.18em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
p { margin: 0 0 16px; text-wrap: pretty; }
h1, h2, h3 { margin: 0; text-wrap: balance; }
h2 {
  font-size: clamp(28px, 3.3vw, 48px);
  line-height: 1.1;
  font-weight: 700;
  letter-spacing: -0.015em;
}
h3 { font-size: 22px; line-height: 1.25; font-weight: 700; }
b, strong { font-weight: 650; }

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }
.muted { color: var(--muted); }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; border-radius: 4px; }

.skip {
  position: absolute; left: 8px; top: -100px; z-index: 30;
  background: var(--ink); color: var(--paper);
  padding: 12px 16px; border-radius: var(--radius); text-decoration: none;
}
.skip:focus { top: 8px; }

/* ---------- кнопки ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 52px; padding: 12px 22px;
  border-radius: var(--radius); border: 1.5px solid var(--ink);
  font: inherit; font-size: 17px; font-weight: 600; line-height: 1.2;
  text-decoration: none; text-align: center; cursor: pointer;
  transition: background-color 160ms ease, color 160ms ease, border-color 160ms ease;
}
.btn-primary { background: var(--ink); color: var(--paper); }
.btn-primary:hover { background: var(--ink-2); border-color: var(--ink-2); }
.btn-secondary { background: transparent; color: var(--ink); }
.btn-secondary:hover { background: rgba(23, 25, 19, 0.07); }
.btn-compact { min-height: 48px; padding: 10px 16px; font-size: 16px; }
.btn[hidden] { display: none; }

.text-link {
  display: inline-flex; align-items: center; min-height: 48px;
  font-weight: 600; color: var(--ink);
}

.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }

/* ---------- шапка ---------- */
.site-header { border-bottom: 1px solid var(--rule); }
.header-row { display: flex; align-items: center; gap: 24px; min-height: 72px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; margin-right: auto; min-height: 48px; }
.brand-mark {
  font-family: var(--display); font-weight: 700; font-size: 15px;
  font-variant-numeric: tabular-nums;
  padding: 5px 7px; border: 1.5px solid var(--ink); border-radius: 6px; line-height: 1;
}
.brand-name { font-weight: 700; font-size: 18px; }
.header-nav { display: none; gap: 8px; }
.header-nav a {
  display: inline-flex; align-items: center; min-height: 48px; padding: 0 10px;
  text-decoration: none; font-size: 16px; color: var(--muted); border-radius: 6px;
  transition: color 160ms ease;
}
.header-nav a:hover { color: var(--ink); text-decoration: underline; }
@media (min-width: 900px) { .header-nav { display: flex; } }
@media (max-width: 419px) {
  .header-row { gap: 12px; }
  .brand { gap: 8px; }
  .brand-name { font-size: 16px; white-space: nowrap; }
  .brand-mark { font-size: 14px; }
}

/* ---------- первый экран ---------- */
.hero { padding: 28px 0 var(--section); }
.hero-grid { display: grid; gap: 32px; }
.eyebrow { font-size: 15px; font-weight: 600; color: var(--muted); margin-bottom: 12px; }
h1 {
  font-size: clamp(38px, 5.2vw, 72px);
  line-height: 1.04;
  font-weight: 700;
  letter-spacing: -0.025em;
  max-width: 13ch;
}
.lead { font-size: 18px; margin: 20px 0 24px; max-width: 34em; }
@media (min-width: 600px) { .lead { font-size: 20px; } }
.hero .actions .btn { flex: 1 1 100%; }
@media (min-width: 600px) { .hero .actions .btn { flex: 0 0 auto; } }
.terms { margin: 16px 0 6px; font-size: 16px; }
.terms a { font-weight: 600; }
.platform-note { font-size: 15px; color: var(--muted); margin: 0; }
.platform-note a { color: var(--ink); font-weight: 600; }

.device {
  margin: 0;
  justify-self: center;
  width: min(78vw, 100%);
  max-width: 340px;
}
.device picture {
  display: block; background: #141110; padding: 8px; border-radius: 30px;
  box-shadow: 0 1px 0 rgba(23, 25, 19, 0.06), 0 18px 40px -24px rgba(23, 25, 19, 0.45);
}
.device img { border-radius: 23px; }
.device figcaption, .use-fig figcaption { font-size: 14px; color: var(--muted); margin-top: 12px; }
.hero-shot figcaption { text-align: center; }

@media (min-width: 1024px) {
  .hero { padding-top: 56px; }
  .hero-grid { grid-template-columns: repeat(12, minmax(0, 1fr)); align-items: center; }
  .hero-copy { grid-column: 1 / span 7; }
  .hero-shot { grid-column: 8 / span 5; width: 100%; max-width: 380px; }
}

/* Телефон в горизонтальном положении: кнопки первого экрана — без прокрутки. */
@media (max-height: 500px) and (orientation: landscape) {
  .header-row { min-height: 56px; }
  .hero { padding-top: 12px; }
  .eyebrow { margin-bottom: 6px; }
  .lead { margin: 12px 0 16px; }
}

/* ---------- схема 3/3 ---------- */
.section { padding: var(--section) 0; border-top: 1px solid var(--rule); }
.how-head { display: grid; gap: 16px; margin-bottom: 32px; }
.how-text { max-width: 36em; }
@media (min-width: 1024px) {
  .how-head { grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 32px; align-items: end; }
  .how-head h2 { grid-column: 1 / span 6; }
  .how-text { grid-column: 8 / span 5; }
  .how-text p:last-child { margin-bottom: 0; }
}

.ratio { display: flex; align-items: flex-start; gap: 16px; margin: 0 0 32px; }
.ratio-item { display: grid; gap: 10px; }
.ratio-num {
  font-family: var(--display); font-weight: 700;
  font-size: clamp(64px, 11vw, 148px); line-height: 0.95;
  font-variant-numeric: tabular-nums; letter-spacing: -0.02em;
}
.ratio-slash { font-family: var(--display); font-weight: 500; font-size: clamp(56px, 9vw, 120px); line-height: 1; color: var(--muted); }
.ratio-label { display: flex; align-items: center; gap: 8px; font-size: 15px; line-height: 1.25; color: var(--muted); }
.ratio-label::before { content: ""; flex: none; width: 22px; height: 8px; border-radius: 2px; }
.ratio-fast::before { background: var(--fast); }
.ratio-slow::before { background: var(--slow); }

.ribbon { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.cycle {
  display: grid; grid-template-columns: 64px 1fr 1fr; align-items: end; gap: 6px;
}
.cycle-n { font-size: 14px; color: var(--muted); align-self: center; }
.seg {
  display: flex; flex-direction: column; justify-content: flex-end;
  padding: 6px 10px; border-radius: 6px; color: var(--ink);
  font-size: 14px; line-height: 1.2;
}
.seg b { font-weight: 650; }
.seg-fast { background: var(--fast); min-height: 64px; }
/* Фаза различается не только цветом: подпись, высота «ступени» и штриховка. */
.seg-slow {
  min-height: 44px;
  background: repeating-linear-gradient(135deg, var(--slow) 0 9px, var(--slow-stripe) 9px 12px);
}
.ribbon-scale { display: none; }

@media (min-width: 900px) {
  .ribbon { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 4px; }
  .cycle { grid-template-columns: 1fr 1fr; grid-template-rows: auto auto; gap: 4px; }
  .cycle-n { grid-column: 1 / -1; align-self: end; padding-bottom: 4px; }
  .seg-fast { min-height: 96px; }
  .seg-slow { min-height: 60px; }
  .ribbon-scale {
    display: flex; justify-content: space-between; margin-top: 8px;
    font-size: 14px; color: var(--muted); font-variant-numeric: tabular-nums;
  }
}

/* ---------- демо ---------- */
.demo {
  margin-top: 48px; background: var(--ink); color: var(--paper);
  border-radius: 14px; padding: 24px 16px;
  display: grid; gap: 24px;
}
.demo:focus { outline: none; }
.demo :focus-visible { outline-color: var(--paper); }
.demo h3 { font-size: 22px; margin-bottom: 12px; }
.demo-note { font-size: 17px; margin-bottom: 12px; }
.demo-tempo, .demo-hint { color: var(--muted-on-ink); font-size: 15px; }
.demo-tempo { margin-bottom: 0; }
.demo-nojs { margin: 0; color: var(--paper); }
.demo-nojs a { color: var(--paper); }

.demo-ui { display: grid; gap: 20px; }
.demo-ui[hidden] { display: none; }
.demo-phase {
  font-size: 15px; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase;
  margin: 0 0 4px; color: var(--paper);
}
.demo-ui[data-phase="fast"] .demo-phase { color: var(--fast); }
.demo-ui[data-phase="slow"] .demo-phase { color: var(--slow); }
.demo-time {
  font-family: var(--display); font-weight: 600; margin: 0 0 16px;
  font-size: clamp(56px, 9vw, 104px); line-height: 1;
  font-variant-numeric: tabular-nums;
}
.demo-track { position: relative; display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding-top: 14px; }
.demo-seg {
  display: flex; flex-direction: column; justify-content: flex-end;
  color: var(--ink); font-size: 14px; line-height: 1.2; padding: 6px 10px; border-radius: 6px;
}
.demo-seg-fast { background: var(--fast); min-height: 56px; }
.demo-seg-slow { min-height: 40px; align-self: end; background: repeating-linear-gradient(135deg, var(--slow) 0 9px, var(--slow-stripe) 9px 12px); }
.demo-pointer {
  position: absolute; top: 0; bottom: -6px; left: 0; width: 3px; margin-left: -1.5px;
  background: var(--paper); border-radius: 2px;
}
.demo-pointer::before {
  content: ""; position: absolute; top: 0; left: 50%; transform: translateX(-50%);
  border: 7px solid transparent; border-top-color: var(--paper); border-bottom: 0;
}
.demo-ui[data-state="idle"] .demo-pointer { opacity: 0.55; }
.demo-hint { margin: 16px 0 0; }

.demo-controls { display: flex; flex-wrap: wrap; gap: 12px; }
.demo-controls .btn { flex: 1 1 auto; }
.demo .btn-primary { background: var(--paper); color: var(--ink); border-color: var(--paper); }
.demo .btn-primary:hover { background: #FFFFFF; border-color: #FFFFFF; }
.demo .btn-secondary, .demo .btn-toggle { background: transparent; color: var(--paper); border-color: var(--muted-on-ink); }
.demo .btn-secondary:hover, .demo .btn-toggle:hover { background: rgba(242, 238, 229, 0.1); }
.toggle-state {
  display: inline-block; min-width: 3.4em; padding: 2px 8px; border-radius: 999px;
  font-size: 14px; border: 1px solid var(--muted-on-ink); color: var(--muted-on-ink);
}
.btn-toggle[aria-pressed="true"] .toggle-state { background: var(--slow); border-color: var(--slow); color: var(--ink); }

.demo-done { border-top: 1px solid #3A3D33; padding-top: 20px; }
.demo-done[hidden] { display: none; }
.demo-done p { font-size: 18px; font-weight: 600; }

@media (min-width: 600px) { .demo { padding: 32px; } }
@media (min-width: 1024px) {
  .demo { grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 32px; padding: 40px; }
  .demo-intro { grid-column: 1 / span 5; }
  .demo noscript, .demo-ui { grid-column: 6 / span 7; }
}

/* ---------- сценарии ---------- */
.uses h2 { margin-bottom: 40px; }
.use { display: grid; gap: 20px; padding: 32px 0; border-top: 1px solid var(--rule); }
.use:first-of-type { border-top: 0; padding-top: 0; }
.use-k { font-family: var(--display); font-weight: 600; font-size: 15px; color: var(--muted); margin-bottom: 8px; }
.use-text h3 { font-size: clamp(24px, 2.4vw, 32px); margin-bottom: 12px; }
.use-text p:last-child { margin-bottom: 0; }
.use-fig { margin: 0; max-width: 560px; }
.use-fig picture { display: block; background: #141110; border-radius: 12px; padding: 8px; }
.use-fig img { border-radius: 8px; }
@media (min-width: 900px) {
  .use { grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 32px; align-items: center; padding: 48px 0; }
  .use-text { grid-column: 1 / span 5; }
  .use-fig { grid-column: 7 / span 6; max-width: none; }
  .use-reverse .use-text { grid-column: 8 / span 5; grid-row: 1; }
  .use-reverse .use-fig { grid-column: 1 / span 6; grid-row: 1; }
}

/* ---------- экраны ---------- */
.screens-head { max-width: 40em; margin-bottom: 40px; }
.screens-head h2 { margin-bottom: 16px; }
.screens-grid { display: grid; gap: 40px; justify-items: center; }
@media (min-width: 720px) {
  .screens-grid { grid-template-columns: 1fr 1fr; align-items: start; }
}
.pulse { margin-top: 48px; padding-left: 20px; border-left: 3px solid var(--ink); max-width: 44em; }
.pulse h3 { font-size: 20px; margin-bottom: 8px; }
.pulse p { margin: 0; }

/* ---------- метод ---------- */
.method-grid { display: grid; gap: 20px; }
.method-text { max-width: 38em; }
.method-text a { font-weight: 600; }
@media (min-width: 1024px) {
  .method-grid { grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 32px; }
  .method-grid h2 { grid-column: 1 / span 5; }
  .method-text { grid-column: 7 / span 6; }
}

/* ---------- цена ---------- */
.price-panel {
  background: var(--paper-2); border: 1px solid var(--rule); border-radius: 14px;
  padding: 24px 16px; max-width: 760px;
}
@media (min-width: 600px) { .price-panel { padding: 40px; } }
.price-panel h2 { margin-bottom: 20px; }
.price-main { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 16px; margin-bottom: 16px; }
.price-num { font-size: clamp(48px, 6vw, 72px); font-weight: 700; line-height: 1; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.price-what { font-size: 20px; font-weight: 600; }
.price-list { margin: 0 0 24px; padding: 0; list-style: none; }
.price-list li { padding: 10px 0; border-top: 1px solid var(--rule); }

/* ---------- вопросы ---------- */
.faq-grid { display: grid; gap: 24px; }
@media (min-width: 1024px) {
  .faq-grid { grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 32px; }
  .faq-grid h2 { grid-column: 1 / span 4; }
  .faq-list { grid-column: 5 / span 8; }
}
.faq-list details { border-top: 1px solid var(--rule); }
.faq-list details:last-child { border-bottom: 1px solid var(--rule); }
.faq-list summary {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  min-height: 56px; padding: 12px 0; cursor: pointer; list-style: none;
  font-size: 19px; font-weight: 650;
}
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary::after { content: "+"; font-size: 26px; font-weight: 400; line-height: 1; color: var(--muted); flex: none; }
.faq-list details[open] summary::after { content: "−"; }
.faq-list details p { margin: 0 0 20px; max-width: 40em; }
.faq-list details a { font-weight: 600; }

/* ---------- финал и подвал ---------- */
.final { background: var(--ink); color: var(--paper); border-top: 0; }
.final h2 { margin-bottom: 28px; max-width: 16ch; }
.final .btn-primary { background: var(--paper); color: var(--ink); border-color: var(--paper); }
.final .btn-primary:hover { background: #FFFFFF; border-color: #FFFFFF; }
.final .text-link { color: var(--paper); }
.final :focus-visible { outline-color: var(--paper); }

.site-footer { padding: 32px 0 40px; font-size: 15px; color: var(--muted); }
.footer-row { display: grid; gap: 12px; }
.footer-brand { margin: 0; }
.footer-links { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0 20px; }
.footer-links a { display: inline-flex; align-items: center; min-height: 48px; color: var(--ink); }

/* ---------- нижняя кнопка на телефоне ---------- */
.sticky-cta {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 20;
  padding: 10px var(--gutter) calc(10px + env(safe-area-inset-bottom));
  background: var(--paper); border-top: 1px solid var(--rule);
}
.sticky-cta .btn { width: 100%; }
.sticky-cta[hidden] { display: none; }
@media (min-width: 600px) { .sticky-cta { display: none; } }

/* ---------- панель согласия на аналитику (только при включённом счётчике) ---------- */
.consent {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 25;
  background: var(--paper); border-top: 1.5px solid var(--ink);
  padding: 16px var(--gutter) calc(16px + env(safe-area-inset-bottom));
}
.consent-inner { max-width: var(--max); margin: 0 auto; display: grid; gap: 12px; }
.consent p { margin: 0; font-size: 16px; }
.consent .actions .btn { flex: 1 1 auto; }
@media (min-width: 900px) {
  .consent-inner { grid-template-columns: 1fr auto; align-items: center; gap: 24px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
