/*
 * Сайт-визитка keldik.kz.
 *
 * Без внешних картинок и скриптов, шрифты — свои, из каталога fonts/ этого сайта: страница
 * не обращается ни к каким сторонним сайтам. Заголовок Content-Security-Policy в
 * deploy/Caddyfile это не пропустил бы, поэтому в разметке нет ни style="…", ни встроенных
 * скриптов — только этот файл и main.js.
 *
 * Все цвета и шрифты — переменные в начале файла. Тема выбирается системной настройкой
 * устройства (prefers-color-scheme); ни куки, ни localStorage сайт не использует.
 */

/*
 * Шрифты: Manrope (название и заголовки) и Inter (весь остальной текст и цифры). Оба —
 * переменные, лицензия SIL OFL (тексты лицензий лежат рядом, в fonts/). Файлы разбиты по
 * письменностям: браузер скачивает только те, символы которых есть на странице (русский текст
 * и латиница). Для казахской версии понадобятся ещё cyrillic-ext — буквы ә, ғ, қ, ң, ө, ұ, ү, һ, і.
 * Файлы взяты из пакетов npm @fontsource-variable/manrope и @fontsource-variable/inter 5.3.0.
 */
@font-face {
  font-family: 'Manrope';
  font-style: normal;
  font-weight: 200 800;
  font-display: swap;
  src: url(/fonts/manrope-cyrillic-wght-normal.woff2) format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}

@font-face {
  font-family: 'Manrope';
  font-style: normal;
  font-weight: 200 800;
  font-display: swap;
  src: url(/fonts/manrope-latin-wght-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;
}

@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');
  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');
  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;
}

:root {
  /*
   * Шрифты — вся типографика меняется здесь (так же, как в apps/web/src/app/globals.css):
   *   --font-sans    — весь текст, цифры времени и таблицы (Inter);
   *   --font-display — название и заголовки (Manrope; главный заголовок — ExtraBold, 800);
   *   --font-mono    — на странице не используется, оставлена для единообразия.
   * Если файлы шрифтов не загрузились, подставляется системный шрифт из списка.
   * (taste-skill-ignore: переменная нужна по договорённости о трёх шрифтах, не для вёрстки.)
   */
  --font-sans:
    'Inter', ui-sans-serif, system-ui, -apple-system, 'Segoe UI Variable Text', 'Segoe UI',
    Roboto, 'Helvetica Neue', Arial, sans-serif;
  --font-display: 'Manrope', var(--font-sans);
  --font-mono: ui-monospace, SFMono-Regular, Consolas, monospace; /* taste-skill-ignore */

  color-scheme: light dark;

  /* Светлая тема */
  --bg: #eff0f1;
  --surface: #e3e4e6;
  --stage: #d3d5d8;
  --ink: #18191b;
  --muted: #4d5055;
  --accent: #ff4a1f;
  --accent-hover: #ff6238;
  --accent-press: #e6411a;
  --accent-ink: #18191b;

  /* Обратное поле: в светлой теме тёмное, в тёмной — светлое */
  --field: #18191b;
  --field-ink: #eff0f1;
  --field-muted: #a8abb0;
  --field-soft: #2a2c30;

  /* Фрагменты продукта (образцы экранов) */
  --frag: #ffffff;
  --frag-ink: #18191b;
  --frag-muted: #55585d;
  --frag-soft: #eceef0;

  --focus: var(--ink);

  --gutter: clamp(20px, 5vw, 48px);
  --max: 1200px;
  --section: clamp(72px, 12vw, 160px);
  --radius: 16px;
  --radius-sm: 10px;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #18191b;
    --surface: #222427;
    --stage: #2d2f33;
    --ink: #eff0f1;
    --muted: #a3a6ab;

    --field: #eff0f1;
    --field-ink: #18191b;
    --field-muted: #484b50;
    --field-soft: #dcdde0;

    --frag: #3b3e44;
    --frag-ink: #eff0f1;
    --frag-muted: #b4b7bd;
    --frag-soft: #2c2e32;
  }
}

/* ---- Основа ------------------------------------------------------------------------ */

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

[hidden] {
  display: none !important;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-padding-top: 16px;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 1.0625rem;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* Цифры времени, таблиц и значений — одной ширины, чтобы строки не «прыгали» при смене числа */
time,
output,
table,
.phone-time,
.tile-big {
  font-variant-numeric: tabular-nums;
}

h1,
h2,
h3,
p,
ul,
ol,
dl,
dd,
figure {
  margin: 0;
}

ul,
ol {
  padding: 0;
  list-style: none;
}

img,
svg {
  display: block;
  max-width: 100%;
}

button {
  font: inherit;
  color: inherit;
  cursor: pointer;
}

a {
  color: inherit;
}

p a,
.hint a {
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
}

::selection {
  background: var(--accent);
  color: var(--accent-ink);
}

:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}

.skip {
  position: absolute;
  left: 12px;
  top: -80px;
  z-index: 10;
  padding: 12px 18px;
  background: var(--ink);
  color: var(--bg);
  font-weight: 600;
  text-decoration: none;
}

.skip:focus {
  top: 12px;
}

.wrap {
  width: 100%;
  max-width: var(--max);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

h1,
h2,
h3 {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.02;
  text-wrap: balance;
}

h2 {
  font-size: clamp(2rem, 1.3rem + 3.2vw, 4rem);
}

h3 {
  font-size: clamp(1.625rem, 1.2rem + 1.8vw, 2.5rem);
  line-height: 1.08;
}

/* ---- Кнопки ----------------------------------------------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 0 28px;
  border: 2px solid transparent;
  border-radius: 0;
  font-family: var(--font-sans);
  font-size: 1.0625rem;
  font-weight: 600;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  white-space: nowrap;
  transition:
    background-color 0.15s,
    color 0.15s,
    border-color 0.15s,
    transform 0.15s var(--ease);
}

.btn:active {
  transform: translateY(2px);
}

.btn-accent {
  background: var(--accent);
  color: var(--accent-ink);
}

.btn-accent:hover {
  background: var(--accent-hover);
}

.btn-accent:active {
  background: var(--accent-press);
}

.btn-line {
  border-color: currentColor;
  color: var(--ink);
}

.btn-line:hover {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--bg);
}

/* ---- Шапка ------------------------------------------------------------------------ */

.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  max-width: var(--max);
  margin-inline: auto;
  padding: 14px var(--gutter);
}

/* Одна сплошная полоса акцента поперёк всей страницы */
body::before {
  content: '';
  display: block;
  height: 8px;
  background: var(--accent);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  text-decoration: none;
}

.brand-mark {
  width: 32px;
  height: 32px;
}

.brand-name {
  font-family: var(--font-display);
  font-size: 1.375rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.top .btn {
  min-height: 44px;
  padding: 0 20px;
}

.wide {
  display: none;
}

@media (min-width: 420px) {
  .wide {
    display: inline;
    white-space: pre;
  }
}

/* ---- Первый экран ----------------------------------------------------------------- */

.hero {
  display: grid;
  gap: 48px;
  max-width: var(--max);
  margin-inline: auto;
  padding: clamp(32px, 6vw, 72px) var(--gutter) var(--section);
}

h1 {
  font-size: clamp(2.5rem, 12.4vw, 4.5rem);
  font-weight: 800;
  line-height: 0.96;
  letter-spacing: -0.04em;
}

h1 .line {
  display: block;
  overflow: hidden;
  padding-bottom: 0.1em;
  margin-bottom: -0.1em;
}

h1 .line > span {
  display: block;
}

.lead {
  max-width: 32em;
  margin-top: 28px;
  font-size: clamp(1.125rem, 1.05rem + 0.4vw, 1.375rem);
  line-height: 1.5;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 32px;
}

.hero .btn {
  flex: 1 1 100%;
}

.hint {
  max-width: 34em;
  margin-top: 20px;
  color: var(--muted);
  font-size: 0.9375rem;
}

@media (min-width: 560px) {
  .hero .btn {
    flex: 0 0 auto;
  }
}

@media (min-width: 900px) {
  .hero {
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
    align-items: center;
    gap: 64px;
    min-height: min(720px, 82svh);
  }

  h1 {
    font-size: clamp(4rem, 6.4vw, 6rem);
  }
}

/* Образец экрана отметки */

.hero-demo figcaption,
.f-note {
  font-size: 0.8125rem;
  line-height: 1.45;
  color: var(--muted);
}

.hero-demo figcaption {
  margin-top: 14px;
  text-align: center;
}

.phone {
  width: min(100%, 340px);
  margin-inline: auto;
  padding: 22px;
  border-radius: 28px;
  background: var(--frag);
  color: var(--frag-ink);
  font-size: 0.9375rem;
}

.phone-point {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-weight: 600;
}

.phone-near {
  padding: 4px 10px;
  border-radius: 99px;
  background: var(--frag-soft);
  font-size: 0.8125rem;
  font-weight: 600;
}

.seg {
  display: flex;
  gap: 4px;
  margin-top: 18px;
  padding: 4px;
  border-radius: var(--radius-sm);
  background: var(--frag-soft);
}

.seg-btn {
  flex: 1;
  min-height: 44px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  font-weight: 600;
  transition:
    background-color 0.15s,
    color 0.15s;
}

.seg-btn:hover {
  background: color-mix(in srgb, var(--frag-ink) 10%, transparent);
}

.seg-btn[aria-pressed='true'] {
  background: var(--frag-ink);
  color: var(--frag);
}

.phone-time {
  margin-top: 22px;
  font-family: var(--font-display);
  font-size: clamp(3.75rem, 3rem + 4vw, 5rem);
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.phone-date {
  margin-top: 8px;
  color: var(--frag-muted);
}

.phone-status {
  display: inline-block;
  margin-top: 20px;
  padding: 10px 16px;
  border-radius: var(--radius-sm);
  background: var(--accent);
  color: var(--accent-ink);
  font-weight: 700;
}

.phone-note {
  margin-top: 14px;
  color: var(--frag-muted);
}

/* ---- Как это работает ------------------------------------------------------------- */

.how {
  background: var(--surface);
  padding-block: var(--section);
}

.stages {
  display: grid;
  gap: 72px;
  margin-top: clamp(32px, 5vw, 56px);
}

.stage {
  display: grid;
  gap: 24px;
}

.stage-text p {
  max-width: 28em;
  margin-top: 16px;
}

/* Слово с дефисом не рвётся по строкам: «QR-» и «код» врозь читаются плохо */
.nb {
  white-space: nowrap;
}

.stage-demo {
  display: grid;
  place-items: center;
  padding: 28px 16px;
  background: var(--stage);
}

/* Со скриптом шаги переключаются ползунком */
.how-body.is-slider .stage {
  display: none;
}

.how-body.is-slider .stage.is-active {
  display: grid;
}

.how-body.is-slider .stage-demo {
  order: -1;
  min-height: 340px;
}

.stepper {
  margin-top: 28px;
  --thumb: 36px;
}

.stepper-track {
  position: relative;
  height: var(--thumb);
}

.rail,
.rail-fill {
  position: absolute;
  left: 0;
  top: calc(50% - 4px);
  height: 8px;
}

.rail {
  right: 0;
  background: var(--stage);
}

.rail-fill {
  width: calc(var(--thumb) / 2);
  background: var(--ink);
}

[data-stage='2'] .rail-fill {
  width: calc(var(--thumb) / 2 + (100% - var(--thumb)) * 0.5);
}

[data-stage='3'] .rail-fill {
  width: 100%;
}

.stepper-range {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  background: transparent;
  -webkit-appearance: none;
  appearance: none;
  cursor: pointer;
}

.stepper-range::-webkit-slider-runnable-track {
  height: var(--thumb);
  background: transparent;
}

.stepper-range::-moz-range-track {
  height: var(--thumb);
  background: transparent;
}

.stepper-range::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: var(--thumb);
  height: var(--thumb);
  border: 0;
  border-radius: 0;
  background: var(--accent);
  transition: transform 0.15s var(--ease);
}

.stepper-range::-moz-range-thumb {
  width: var(--thumb);
  height: var(--thumb);
  border: 0;
  border-radius: 0;
  background: var(--accent);
  transition: transform 0.15s var(--ease);
}

.stepper-range:hover::-webkit-slider-thumb {
  transform: scale(1.12);
}

.stepper-range:hover::-moz-range-thumb {
  transform: scale(1.12);
}

.stepper-range:active::-webkit-slider-thumb {
  transform: scale(0.94);
}

.stepper-range:active::-moz-range-thumb {
  transform: scale(0.94);
}

.stops {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  margin-top: 6px;
}

.stop {
  min-height: 44px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 0.9375rem;
  font-weight: 500;
  text-align: center;
}

.stop:first-child {
  text-align: left;
}

.stop:last-child {
  text-align: right;
}

.stop[aria-pressed='true'] {
  color: var(--ink);
  font-weight: 700;
}

.stop:hover {
  color: var(--ink);
}

@media (min-width: 900px) {
  .stage {
    grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
    gap: 48px;
    align-items: center;
  }

  .stage-demo {
    padding: 48px 32px;
    min-height: 420px;
  }

  .how-body.is-slider .stage-demo {
    order: 0;
    min-height: 460px;
  }
}

/* ---- Образцы интерфейса ----------------------------------------------------------- */

.frag {
  width: 100%;
  max-width: 440px;
  padding: 22px;
  border-radius: var(--radius);
  background: var(--frag);
  color: var(--frag-ink);
  font-size: 0.9375rem;
  line-height: 1.45;
}

.frag .f-note {
  color: var(--frag-muted);
}

.f-title {
  font-size: 1.0625rem;
  font-weight: 700;
  line-height: 1.3;
}

.f-note {
  margin-top: 14px;
}

/* Лист с QR-кодом */
.qr {
  display: grid;
  justify-items: center;
  gap: 16px;
  max-width: 320px;
  text-align: center;
}

.qr .f-note {
  margin: 0;
}

.qr-svg {
  width: min(100%, 220px);
  height: auto;
  color: var(--frag-ink);
  shape-rendering: crispEdges;
}

/* Проверка места */
.radius {
  max-width: 340px;
}

.radius-svg {
  width: 100%;
  height: auto;
  margin-top: 8px;
}

.radius-svg .zone {
  fill: var(--frag-soft);
}

.radius-svg .kpp {
  fill: var(--accent);
}

.radius-svg .me {
  fill: var(--frag-ink);
}

.radius-svg .far {
  fill: var(--frag-muted);
}

.legend {
  display: grid;
  gap: 8px;
  margin-top: 10px;
}

.legend li {
  display: flex;
  align-items: center;
  gap: 10px;
}

.legend li::before {
  content: '';
  flex: none;
  width: 12px;
  height: 12px;
  border-radius: 50%;
}

.legend .ok::before {
  background: var(--frag-ink);
}

.legend .no::before {
  background: var(--frag-muted);
}

/* Табель */
.sheet {
  max-width: 560px;
  padding: 18px;
  overflow-x: auto;
}

.sheet table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 3px;
  font-variant-numeric: tabular-nums;
}

.sheet caption {
  padding: 4px 4px 10px;
  text-align: left;
  font-size: 1.0625rem;
  font-weight: 700;
}

.sheet th,
.sheet td {
  padding: 8px 4px;
  text-align: center;
  font-size: 0.875rem;
  font-weight: 500;
}

.sheet thead th {
  color: var(--frag-muted);
  font-weight: 600;
}

.sheet tbody th {
  min-width: 78px;
  padding-inline: 0;
  text-align: left;
  font-weight: 600;
  white-space: nowrap;
}

.sheet td {
  min-width: 30px;
  border-radius: 6px;
  background: var(--frag-soft);
}

.sheet td.off {
  color: var(--frag-muted);
}

.sheet td.late {
  background: var(--accent);
  color: var(--accent-ink);
  font-weight: 700;
}

.sheet td.sum {
  background: transparent;
  font-weight: 700;
}

.sheet .f-note {
  margin: 8px 4px 0;
}

/* ---- Правила расчёта -------------------------------------------------------------- */

.rules {
  padding-block: var(--section);
}

.feat {
  display: grid;
  gap: 24px;
  margin-top: clamp(40px, 7vw, 88px);
}

.feat-text p {
  max-width: 26em;
  margin-top: 14px;
}

@media (min-width: 900px) {
  .feat {
    grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
    gap: 48px;
    align-items: center;
  }
}

.stepnum {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 12px;
}

.stepnum-btn {
  width: 48px;
  height: 48px;
  border: 0;
  border-radius: var(--radius-sm);
  background: var(--frag-soft);
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1;
  transition:
    background-color 0.15s,
    transform 0.15s var(--ease);
}

.stepnum-btn:hover {
  background: var(--frag-ink);
  color: var(--frag);
}

.stepnum-btn:active {
  transform: scale(0.92);
}

.stepnum-val {
  min-width: 4.5ch;
  text-align: center;
  font-size: 1.75rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}

.rule-static {
  margin-top: 12px;
  font-size: 1.75rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.js .rule-static {
  display: none;
}

.rule-result {
  display: inline-block;
  margin-top: 14px;
  padding: 10px 16px;
  border-radius: var(--radius-sm);
  background: var(--accent);
  color: var(--accent-ink);
  font-weight: 700;
}

.rule-result[data-state='ok'] {
  background: var(--frag-soft);
  color: var(--frag-ink);
}

.revs {
  max-width: 520px;
}

.revs li {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 4px 16px;
  margin-top: 10px;
  padding: 14px 16px;
  border-radius: var(--radius-sm);
  background: var(--frag-soft);
}

.revs .now {
  background: var(--accent);
  color: var(--accent-ink);
  font-weight: 700;
}

.codes {
  max-width: 380px;
}

.codes ul {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.codes li {
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  background: var(--frag-soft);
}

.codes b {
  margin-right: 6px;
  font-weight: 700;
}

/* ---- Для работодателей ------------------------------------------------------------ */

.connect {
  --focus: var(--field-ink);
  padding-block: var(--section);
  background: var(--field);
  color: var(--field-ink);
}

.connect-lead {
  max-width: 34em;
  margin-top: 24px;
  font-size: clamp(1.25rem, 1.1rem + 0.7vw, 1.625rem);
  line-height: 1.45;
}

.contacts {
  margin-top: clamp(40px, 6vw, 72px);
}

.contacts-row {
  display: grid;
  gap: 4px 32px;
  padding: 20px var(--gutter);
  margin-inline: calc(var(--gutter) * -1);
}

.contacts-row:nth-child(odd) {
  background: var(--field-soft);
}

.contacts dt {
  color: var(--field-muted);
  font-size: 0.9375rem;
}

.contacts dd {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 1rem + 2.4vw, 2.75rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.15;
}

@media (min-width: 700px) {
  .contacts-row {
    grid-template-columns: 200px 1fr;
    align-items: baseline;
  }
}

/* Явная заглушка: контакты ещё не выданы. Класс todo убирается вместе с подстановкой значения. */
.todo {
  display: inline-block;
  padding: 2px 14px 4px;
  background: var(--accent);
  color: var(--accent-ink);
  font-family: var(--font-sans);
  font-size: 0.6em;
  font-weight: 600;
  letter-spacing: 0;
}

.tile-mail .todo {
  font-size: 0.9375rem;
}

.connect-aside {
  margin-top: 32px;
  color: var(--field-ink);
}

/* ---- Для сотрудников -------------------------------------------------------------- */

/* Спокойное поле без заливки акцентом: оранжевым здесь остаются кнопка и рамка камеры. */
.mark {
  padding-block: var(--section);
}

.mark-grid {
  display: grid;
  gap: 48px;
}

.mark-lead {
  max-width: 30em;
  margin-top: 24px;
  font-size: clamp(1.25rem, 1.1rem + 0.7vw, 1.625rem);
  line-height: 1.45;
}

.mark .actions {
  margin-top: 36px;
}

.mark .btn {
  flex: 1 1 100%;
}

.mark-note {
  max-width: 32em;
  margin-top: 20px;
  color: var(--muted);
  font-size: 1rem;
}

.scan {
  max-width: 380px;
  margin-inline: auto;
  padding: 18px;
}

.scan-svg {
  width: 100%;
  height: auto;
  border-radius: var(--radius-sm);
}

.scan-bg {
  fill: #101112;
}

.scan-qr {
  fill: #e9eaec;
}

.scan-frame {
  fill: none;
  stroke: var(--accent);
  stroke-width: 8;
  stroke-linecap: square;
}

.scan .f-note {
  margin-top: 14px;
  text-align: center;
}

@media (min-width: 560px) {
  .mark .btn {
    flex: 0 0 auto;
    min-width: 260px;
  }
}

@media (min-width: 900px) {
  .mark-grid {
    grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
    gap: 64px;
    align-items: center;
  }

  .scan {
    margin-inline: 0 auto;
  }
}

/* ---- Подвал ----------------------------------------------------------------------- */

.foot {
  padding: 8px;
}

.tiles {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 6px;
  max-width: 1440px;
  margin-inline: auto;
}

.tile {
  min-height: 160px;
  padding: 20px;
  background: var(--surface);
  font-size: 1rem;
}

.tile-small {
  color: var(--muted);
  font-size: 0.875rem;
}

.tile-big {
  margin-top: 6px;
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
}

.tile-about {
  grid-column: 1 / -1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 24px;
  order: 6;
  font-size: 1.375rem;
  line-height: 1.3;
}

.tile-nav {
  order: 3;
}

.tile-nav ul {
  display: grid;
  gap: 2px;
}

.tile-nav a {
  display: inline-block;
  padding: 8px 0;
}

.tile-mail {
  order: 4;
}

.tile-time {
  order: 5;
  grid-column: 1 / -1;
}

.tile-word {
  grid-column: 1 / -1;
  order: 1;
  display: grid;
  place-items: center;
  background: var(--ink);
  color: var(--bg);
  font-family: var(--font-display);
  font-size: clamp(3.5rem, 9vw, 9rem);
  font-weight: 800;
  letter-spacing: -0.045em;
  line-height: 1;
  margin: 0;
  min-height: 160px;
}

.tile-go {
  grid-column: 1 / -1;
  order: 2;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 24px;
  background: var(--accent);
  color: var(--accent-ink);
  font-family: var(--font-display);
  font-size: 1.75rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.1;
  text-decoration: none;
  transition: background-color 0.15s;
  --focus: var(--accent-ink);
}

.tile-go:hover {
  background: var(--accent-hover);
}

.tile-go svg {
  align-self: flex-end;
  transition: transform 0.25s var(--ease);
}

.tile-go:hover svg {
  transform: translateX(6px);
}

.tile-go:focus-visible {
  outline-offset: -8px;
}

@media (min-width: 900px) {
  .foot {
    padding: 12px;
  }

  .tiles {
    grid-template-columns: repeat(12, 1fr);
    gap: 8px;
  }

  .tile {
    min-height: 220px;
  }

  .tile-about {
    grid-column: span 5;
    order: 1;
  }

  .tile-nav {
    grid-column: span 3;
    order: 2;
  }

  .tile-time {
    grid-column: span 2;
    order: 3;
  }

  .tile-mail {
    grid-column: span 2;
    order: 4;
  }

  .tile-word {
    grid-column: span 8;
    order: 5;
    min-height: 320px;
  }

  .tile-go {
    grid-column: span 4;
    order: 6;
    min-height: 320px;
  }
}

/* ---- Движение: только когда человек его не отключил ------------------------------- */

@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }

  @keyframes line-rise {
    from {
      transform: translateY(108%);
    }
    to {
      transform: none;
    }
  }

  @keyframes fade-up {
    from {
      opacity: 0;
      transform: translateY(20px);
    }
    to {
      opacity: 1;
      transform: none;
    }
  }

  @keyframes stage-in {
    from {
      opacity: 0;
      transform: translateY(12px);
    }
    to {
      opacity: 1;
      transform: none;
    }
  }

  h1 .line > span {
    animation: line-rise 900ms var(--ease) both;
  }

  h1 .line:nth-child(2) > span {
    animation-delay: 110ms;
  }

  .hero .lead,
  .hero .actions,
  .hero .hint {
    animation: fade-up 700ms var(--ease) 380ms both;
  }

  .hero .actions {
    animation-delay: 440ms;
  }

  .hero .hint {
    animation-delay: 500ms;
  }

  .hero-demo {
    animation: fade-up 800ms var(--ease) 300ms both;
  }

  .how-body.is-slider .stage.is-active {
    animation: stage-in 300ms var(--ease) both;
  }

  /* Появление по мере прокрутки (где браузер умеет): без этого блоки просто стоят на месте */
  @supports (animation-timeline: view()) {
    @keyframes reveal {
      from {
        opacity: 0;
        transform: translateY(28px);
      }
      to {
        opacity: 1;
        transform: none;
      }
    }

    .reveal {
      animation: reveal linear both;
      animation-timeline: view();
      animation-range: entry 4% entry 40%;
    }

    .feat-demo.reveal,
    .contacts.reveal {
      animation-range: entry 10% entry 50%;
    }
  }
}
