/* Красные кеды · сайт · базовая система
   Концепция «обувная коробка»: красная крышка (hero, заявка) открывается на белые листы,
   у каждого раздела слева бирка с артикулом, ночные разделы — тёмный фасад, на котором видно свет.
   Один визуальный мир бренда (без тёмной темы по системе): цвета заданы явно. */

:root {
  /* Цвет: красный «Кед», белый «Шнурок», чёрный «Наконечник» (60 / 30 / 10) */
  --red: #FF0000;
  --red-press: #E00000;
  --ink: #161113;
  --paper: #FFFFFF;
  --soft: #F6F2F2;
  --line: #E6DEDF;
  --muted: #6C6265;
  --wall: #191315;
  --wall-2: #231B1E;
  --wall-line: #3A2F33;
  --on-dark: #F4EFF0;
  --on-dark-muted: #A99DA0;
  --led-warm: #FFE3B3;

  /* Шрифты */
  --f-display: "Unbounded", "Arial Black", "Segoe UI", system-ui, sans-serif;
  --f-body: "Golos Text", "Segoe UI", system-ui, -apple-system, sans-serif;
  --f-mono: "JetBrains Mono", ui-monospace, "Cascadia Mono", Consolas, monospace;

  /* Шкала */
  --fs-hero: clamp(2.6rem, 7.4vw, 7.25rem);
  /* потолок 56 px: «Семь направлений.» и «Примерьте вывеску» помещаются в колонку .section-head одной строкой на 1280–1440 */
  --fs-h2: clamp(2rem, 4.2vw, 3.5rem);
  --fs-h3: clamp(1.25rem, 1.8vw, 1.6rem);
  --fs-lead: clamp(1.075rem, 1.35vw, 1.3rem);
  --fs-body: 1.0625rem;
  --fs-small: 0.9375rem;
  --fs-label: 0.75rem;

  /* Сетка и ритм */
  --wrap: 1320px;
  --gutter: clamp(16px, 4vw, 48px);
  --section-y: clamp(72px, 10vw, 144px);
  --header-h: 76px;
  --r-s: 10px;
  --r-m: 18px;
  --r-pill: 999px;
  --ease-out: cubic-bezier(.2, .7, .2, 1);
  --ease-io: cubic-bezier(.65, 0, .35, 1);

  /* Поверхность по умолчанию (белый лист) — разделы переопределяют */
  --s-bg: var(--paper);
  --s-fg: var(--ink);
  --s-muted: var(--muted);
  --s-line: var(--line);
  --s-accent: var(--red);

  color-scheme: light;
}

/* Поверхности. Компоненты берут цвета только из --s-* */
.surface-paper { --s-bg: var(--paper); --s-fg: var(--ink); --s-muted: var(--muted); --s-line: var(--line); --s-accent: var(--red); }
.surface-soft  { --s-bg: var(--soft);  --s-fg: var(--ink); --s-muted: var(--muted); --s-line: var(--line); --s-accent: var(--red); }
.surface-red   { --s-bg: var(--red);   --s-fg: var(--paper); --s-muted: rgba(255,255,255,.82); --s-line: rgba(255,255,255,.34); --s-accent: var(--ink); }
.surface-night { --s-bg: var(--wall);  --s-fg: var(--on-dark); --s-muted: var(--on-dark-muted); --s-line: var(--wall-line); --s-accent: var(--red); color-scheme: dark; }
.surface-ink   { --s-bg: var(--ink);   --s-fg: var(--on-dark); --s-muted: var(--on-dark-muted); --s-line: var(--wall-line); --s-accent: var(--red); color-scheme: dark; }
[class*="surface-"] { background: var(--s-bg); color: var(--s-fg); }

/* Сброс */
*, *::before, *::after { box-sizing: border-box; }
/* overflow-x: clip у html и body: страница никогда не прокручивается вбок, даже если блок вылез за край */
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--header-h) + 12px); overflow-x: clip; }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--f-body);
  font-size: var(--fs-body);
  line-height: 1.6;
  font-feature-settings: "kern", "liga";
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}
img, video, canvas, svg { display: block; max-width: 100%; }
img, video { height: auto; }
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: .18em; }
p { margin: 0; }
h1, h2, h3, h4 { margin: 0; font-family: var(--f-display); line-height: 1.04; text-wrap: balance; letter-spacing: -0.01em; }
ul, ol { margin: 0; padding: 0; }
figure { margin: 0; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid var(--s-accent, var(--red)); outline-offset: 3px; border-radius: 4px; }
.surface-red :focus-visible { outline-color: var(--paper); }
::selection { background: var(--red); color: var(--paper); }
.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip-link { position: absolute; left: 12px; top: -60px; z-index: 100; background: var(--ink); color: var(--paper); padding: 10px 16px; border-radius: var(--r-s); text-decoration: none; }
.skip-link:focus { top: 12px; }

/* Контейнер и секции */
.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gutter); }
.section { position: relative; padding-block: var(--section-y); }
.section > .wrap > * + * { margin-top: 0; }

/* Типографика */
.display { font-family: var(--f-display); font-weight: 900; text-transform: uppercase; font-size: var(--fs-hero); line-height: .94; letter-spacing: -0.025em; }
.h2 { font-family: var(--f-display); font-weight: 900; text-transform: uppercase; font-size: var(--fs-h2); line-height: .98; letter-spacing: -0.02em; }
.h3 { font-family: var(--f-display); font-weight: 700; font-size: var(--fs-h3); line-height: 1.15; letter-spacing: -0.005em; }
.lead { font-size: var(--fs-lead); line-height: 1.5; color: var(--s-muted); max-width: 58ch; }
.muted { color: var(--s-muted); }
.mono { font-family: var(--f-mono); font-size: var(--fs-label); font-weight: 600; letter-spacing: .08em; text-transform: uppercase; }
.num { font-variant-numeric: tabular-nums; }
.accent { color: var(--s-accent); }

/* Бирка раздела: как этикетка на обувной коробке — артикул, название, штрихкод */
.tag {
  display: inline-grid;
  grid-template-columns: auto auto;
  align-items: stretch;
  border: 1.5px solid currentColor;
  border-radius: 6px;
  font-family: var(--f-mono);
  font-size: var(--fs-label);
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  line-height: 1;
  color: var(--s-fg);
  overflow: hidden;
  width: max-content;
  max-width: 100%;
}
.tag__code { background: var(--s-fg); color: var(--s-bg); padding: 8px 10px; display: flex; align-items: center; }
.tag__name { padding: 8px 12px 8px 10px; display: flex; align-items: center; gap: 10px; }
.tag__name::after {
  content: "";
  width: 34px; height: 12px;
  background: repeating-linear-gradient(90deg, currentColor 0 1.5px, transparent 1.5px 3px, currentColor 3px 4px, transparent 4px 6.5px, currentColor 6.5px 9px, transparent 9px 10px);
  opacity: .9;
}

/* Шапка раздела: бирка слева, заголовок и подводка справа */
.section-head {
  display: grid;
  grid-template-columns: minmax(0, 3fr) minmax(0, 9fr);
  gap: 20px clamp(20px, 4vw, 64px);
  align-items: start;
  margin-bottom: clamp(40px, 6vw, 80px);
}
.section-head__text { display: grid; gap: 20px; min-width: 0; }
@media (max-width: 860px) {
  .section-head { grid-template-columns: minmax(0, 1fr); }
}

/* Кнопки: капсула-наконечник шнурка */
.btn {
  --b-bg: var(--ink); --b-fg: var(--paper); --b-bd: var(--b-bg);
  position: relative;
  display: inline-flex; align-items: center; justify-content: center; gap: 12px;
  min-height: 56px;
  padding: 0 28px;
  border: 2px solid var(--b-bd);
  border-radius: var(--r-pill);
  background: var(--b-bg);
  color: var(--b-fg);
  font-family: var(--f-body);
  font-weight: 600;
  font-size: 1rem;
  line-height: 1.1;
  text-decoration: none;
  white-space: nowrap;
  overflow: hidden;
  isolation: isolate;
  transition: transform .25s var(--ease-out), background-color .2s, color .2s, border-color .2s;
  -webkit-tap-highlight-color: transparent;
}
/* блик, как на пластиковом наконечнике */
.btn::before {
  content: ""; position: absolute; z-index: -1; inset: 0;
  background: linear-gradient(105deg, transparent 30%, rgba(255,255,255,.28) 46%, transparent 60%);
  transform: translateX(-120%);
  transition: transform .7s var(--ease-out);
}
.btn:hover::before { transform: translateX(120%); }
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0) scale(.98); }
.btn__arrow { width: 18px; height: 18px; flex: none; transition: transform .25s var(--ease-out); }
.btn:hover .btn__arrow { transform: translateX(4px); }
.btn--ink   { --b-bg: var(--ink);   --b-fg: var(--paper); }
/* Красная кнопка с чёрным текстом: белый 15–16 px на --red даёт 4,0:1 (SPEC §5 — «иначе --ink»),
   чёрный на красном 4,7:1 при любом размере. Ховер без затемнения: на --red-press чёрный теряет контраст. */
.btn--red   { --b-bg: var(--red);   --b-fg: var(--ink); }
.btn--paper { --b-bg: var(--paper); --b-fg: var(--ink); }
.btn--ghost { --b-bg: transparent; --b-fg: var(--s-fg); --b-bd: currentColor; }
.btn--ghost::before { background: linear-gradient(105deg, transparent 30%, color-mix(in srgb, currentColor 14%, transparent) 46%, transparent 60%); }
.btn--sm { min-height: 44px; padding: 0 20px; font-size: .9375rem; }
.btn--block { width: 100%; }
@media (max-width: 420px) { .btn { white-space: normal; text-align: center; } }

/* Ссылка-стрелка */
.link-arrow { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; text-decoration: none; border-bottom: 2px solid currentColor; padding-bottom: 2px; }
.link-arrow:hover { color: var(--s-accent); }

/* Чипы: радио/чекбоксы в виде капсул */
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { position: relative; display: inline-flex; }
.chip input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.chip span, .chip-btn {
  display: inline-flex; align-items: center; gap: 8px;
  min-height: 40px; padding: 0 16px;
  border: 1.5px solid var(--s-line);
  border-radius: var(--r-pill);
  font-size: .9375rem; font-weight: 500;
  background: transparent; color: var(--s-fg);
  transition: background-color .2s, color .2s, border-color .2s;
  user-select: none;
}
.chip:hover span, .chip-btn:hover { border-color: var(--s-fg); }
.chip input:checked + span, .chip-btn[aria-pressed="true"] { background: var(--s-fg); color: var(--s-bg); border-color: var(--s-fg); }
.chip input:focus-visible + span { outline: 3px solid var(--s-accent); outline-offset: 2px; }

/* Поля формы */
.field { display: grid; gap: 8px; min-width: 0; }
.field__label { font-size: var(--fs-small); font-weight: 600; }
.field__hint { font-size: .875rem; color: var(--s-muted); }
.input, .textarea {
  width: 100%;
  min-height: 56px;
  padding: 14px 18px;
  border: 2px solid var(--s-line);
  border-radius: 14px;
  background: var(--s-bg);
  color: var(--s-fg);
  font-size: 1.0625rem;
  transition: border-color .2s, box-shadow .2s;
}
.textarea { min-height: 112px; resize: vertical; line-height: 1.5; }
.input::placeholder, .textarea::placeholder { color: var(--s-muted); opacity: .8; }
.input:hover, .textarea:hover { border-color: color-mix(in srgb, var(--s-fg) 40%, var(--s-line)); }
.input:focus, .textarea:focus { outline: none; border-color: var(--s-fg); box-shadow: 0 0 0 4px color-mix(in srgb, var(--s-accent) 18%, transparent); }
.input[aria-invalid="true"] { border-color: var(--red); }
/* --red-press на белом 5,0:1 (чистый --red мелким текстом — 4,0:1) */
.field__error { font-size: .875rem; font-weight: 600; color: var(--red-press); }

/* Появление при прокрутке: элемент виден всегда (без opacity: 0), анимируется только сдвиг.
   main.js добавляет .is-in, когда элемент попадает в экран. data-reveal-delay="1..6" — ступенька 80 мс. */
[data-reveal] { transition: transform 1s var(--ease-out); }
.js [data-reveal]:not(.is-in) { transform: translateY(36px); }
.js [data-reveal].is-in { transform: none; }
[data-reveal-delay="1"] { transition-delay: 80ms; }
[data-reveal-delay="2"] { transition-delay: 160ms; }
[data-reveal-delay="3"] { transition-delay: 240ms; }
[data-reveal-delay="4"] { transition-delay: 320ms; }
[data-reveal-delay="5"] { transition-delay: 400ms; }
[data-reveal-delay="6"] { transition-delay: 480ms; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; transition-delay: 0s !important; }
  .js [data-reveal]:not(.is-in) { transform: none; }
}
