/* Сайт «Смены».

   Токены — из HANDOFF, раздел 2: те же значения, что в ui/theme/Color.kt.
   Шрифт Onest и иконки Lucide берутся из ресурсов приложения при сборке,
   так что сайт и приложение набраны буквально одними файлами.

   Правила оттуда же, которые здесь тоже действуют:
   — жёлтый никогда не цвет текста на светлом фоне: заливка это accent,
     передний план это accent-ink;
   — крупная жёлтая заливка на странице одна;
   — тёмная тема не инверсия, значения заданы отдельно;
   — все цифры табличные.

   Одно отступление от приложения: под макетом телефона есть мягкая тень.
   В интерфейсе теней нет по правилу, но на странице она нужна, чтобы макет
   читался как устройство, а не как картинка в потоке. Больше теней нигде. */

@font-face {
  font-family: 'Onest';
  src: url('/fonts/onest-400.woff2') format('woff2');
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: 'Onest';
  src: url('/fonts/onest-600.woff2') format('woff2');
  font-weight: 600;
  font-display: swap;
}

@font-face {
  font-family: 'Onest';
  src: url('/fonts/onest-700.woff2') format('woff2');
  font-weight: 700;
  font-display: swap;
}

:root {
  color-scheme: light dark;

  --bg: #ffffff;
  --surface: #f5f6f7;
  --surface-warm: #fff8e3;
  --ink: #101112;
  --muted: #6b7075;
  --hairline: #e6e8ea;
  --accent: #ffc400;
  --accent-ink: #8a6a00;
  --on-accent: #141414;
  --positive: #00a88e;
  --negative: #e5484d;

  --shell: #ffffff;
  --phone-shell: #101112;

  --r-button: 14px;
  --r-tile: 16px;
  --r-panel: 20px;

  --wrap: 1080px;
  --narrow: 720px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f1113;
    --surface: #191c1f;
    --surface-warm: #241f0e;
    --ink: #f2f3f4;
    --muted: #9aa0a6;
    --hairline: #2a2e32;
    --accent: #ffc400;
    --accent-ink: #ffc400;
    --positive: #2bc4a9;
    --negative: #ff6369;

    --shell: #0f1113;
    --phone-shell: #2a2e32;
  }
}

* {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: 'Onest', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  font-size: 16px;
  line-height: 1.65;
  font-variant-numeric: tabular-nums;
  -webkit-font-smoothing: antialiased;
}

/* Деванагари в Onest нет — падаем на системный шрифт, и ему нужен
   увеличенный интерлиньяж, как в макетах (HANDOFF, раздел 2). */
[lang='hi'] {
  font-family: system-ui, 'Noto Sans Devanagari', sans-serif;
  line-height: 1.8;
}

a {
  color: var(--accent-ink);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

h1,
h2,
h3 {
  margin: 0;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

p {
  margin: 0 0 14px;
}

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 24px;
}

.wrap.narrow {
  max-width: var(--narrow);
}

.ico {
  width: 24px;
  height: 24px;
  flex: none;
}

.ico-sm {
  width: 18px;
  height: 18px;
}

.ico-tab {
  width: 20px;
  height: 20px;
}

/* ------------------------------------------------------------------ шапка */

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--hairline);
}

.topbar-inner {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 12px 24px;
  display: flex;
  align-items: center;
  gap: 24px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  color: var(--ink);
}

.brand:hover {
  text-decoration: none;
}

.brand-badge {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 11px;
  background: var(--accent);
  flex: none;
}

.brand-badge.sm {
  width: 30px;
  height: 30px;
  border-radius: 9px;
}

.brand-badge .mark {
  width: 22px;
  height: 22px;
  color: var(--on-accent);
}

.brand-badge.sm .mark {
  width: 17px;
  height: 17px;
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.brand-name {
  font-weight: 700;
  font-size: 18px;
  letter-spacing: -0.01em;
}

.brand-sub {
  font-size: 12px;
  color: var(--muted);
}

.topnav {
  margin-left: auto;
  display: flex;
  gap: 22px;
  font-size: 15px;
}

.topnav a {
  color: var(--muted);
}

.topnav a:hover {
  color: var(--ink);
  text-decoration: none;
}

@media (max-width: 620px) {
  .topnav {
    gap: 14px;
    font-size: 14px;
  }

  .topnav a:first-child {
    display: none;
  }

  .brand-sub {
    display: none;
  }
}

/* -------------------------------------------------------------------- герой */

.hero {
  padding: 72px 0 24px;
  overflow: hidden;
}

.hero-inner {
  display: grid;
  grid-template-columns: 1fr minmax(280px, 340px);
  gap: 56px;
  align-items: center;
}

/* Тёплое пятно за макетом позиционировано, поэтому без этого оно
   всплывает над текстом героя на узких экранах. */
.hero-copy {
  position: relative;
  z-index: 1;
}

.eyebrow {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 18px;
}

.hero h1 {
  font-size: clamp(36px, 5.6vw, 58px);
  font-weight: 700;
  letter-spacing: -0.035em;
  line-height: 1.04;
  margin-bottom: 22px;
}

/* Единственная крупная жёлтая заливка на странице — как в приложении,
   где она одна на экране «Старт». */
.hero h1 em {
  font-style: normal;
  background: var(--accent);
  color: var(--on-accent);
  padding: 0 10px;
  border-radius: 10px;
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
}

.lead {
  font-size: 18px;
  color: var(--muted);
  max-width: 44ch;
  margin-bottom: 26px;
}

.hero-actions {
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
  margin-bottom: 30px;
}

.badge {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--hairline);
  background: var(--surface);
  color: var(--ink);
  border-radius: 999px;
  padding: 9px 18px;
  font-size: 14px;
  font-weight: 600;
}

.text-link {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  font-weight: 600;
  font-size: 15px;
}

.hero-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 22px;
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 14px;
  color: var(--muted);
}

.hero-facts li::before {
  content: '';
  display: inline-block;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent);
  margin-right: 8px;
  vertical-align: 2px;
}

@media (max-width: 860px) {
  .hero-inner {
    grid-template-columns: 1fr;
    gap: 44px;
    justify-items: start;
  }

  .phone {
    justify-self: center;
  }
}

/* ------------------------------------------------------------ макет экрана */

.phone {
  position: relative;
  width: 300px;
}

/* Тёплое пятно за устройством — тот же приём, что в иллюстрациях онбординга. */
.phone::before {
  content: '';
  position: absolute;
  inset: -14% -30% 22% 10%;
  background: var(--surface-warm);
  border-radius: 46% 46% 30% 30%;
  z-index: 0;
}

.phone-screen {
  position: relative;
  z-index: 1;
  border: 9px solid var(--phone-shell);
  border-radius: 40px;
  background: var(--bg);
  overflow: hidden;
  box-shadow: 0 28px 60px -28px rgba(16, 17, 18, 0.45);
}

.phone-status {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 20px 2px;
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
}

.dots {
  width: 34px;
  height: 6px;
  border-radius: 999px;
  background: var(--hairline);
}

.phone-body {
  padding: 14px 18px 20px;
}

.chip {
  display: inline-block;
  border-radius: 999px;
  padding: 4px 12px;
  font-size: 12px;
  font-weight: 600;
}

.chip-live {
  background: var(--accent);
  color: var(--on-accent);
}

.timer {
  font-size: 54px;
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1.1;
  margin: 10px 0 16px;
}

.metrics {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 16px;
}

.metric {
  background: var(--surface);
  border-radius: var(--r-tile);
  padding: 10px 11px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.m-label {
  font-size: 11px;
  color: var(--muted);
}

.m-value {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.m-value.hot {
  color: var(--accent-ink);
}

.row-buttons {
  display: flex;
  gap: 7px;
  margin-bottom: 14px;
}

.pill {
  flex: 1;
  text-align: center;
  border: 1px solid var(--hairline);
  border-radius: var(--r-button);
  padding: 9px 0;
  font-size: 13px;
  font-weight: 600;
}

.cta {
  background: var(--accent);
  color: var(--on-accent);
  border-radius: var(--r-button);
  text-align: center;
  padding: 14px 0;
  font-weight: 700;
  font-size: 15px;
}

.phone-tabs {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-top: 1px solid var(--hairline);
  padding: 9px 0 14px;
}

.phone-tabs span {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  font-size: 10px;
  color: var(--muted);
}

.phone-tabs .on {
  color: var(--ink);
  font-weight: 600;
}

/* ------------------------------------------------------------------ секции */

.section {
  padding: 54px 0;
}

.section-title {
  font-size: clamp(26px, 3.4vw, 34px);
  font-weight: 700;
  margin-bottom: 26px;
}

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 12px;
}

.card {
  border: 1px solid var(--hairline);
  border-radius: var(--r-panel);
  padding: 22px 22px 18px;
  background: var(--shell);
  transition: border-color 0.15s ease;
}

.card:hover {
  border-color: var(--accent);
}

.card-ico {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 13px;
  background: var(--surface);
  color: var(--ink);
  margin-bottom: 16px;
}

.card h3 {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 8px;
}

.card p {
  font-size: 15px;
  color: var(--muted);
  margin: 0;
}

.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
}

.split-copy p {
  color: var(--muted);
  max-width: 46ch;
}

@media (max-width: 860px) {
  .split {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .split.reverse .split-copy {
    order: -1;
  }
}

.stats {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 34px;
  margin: 24px 0 0;
}

.stats div {
  display: flex;
  flex-direction: column;
}

.stats dt {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}

.stats dd {
  margin: 2px 0 0;
  font-size: 19px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

/* ------------------------------------------------------------- график часов */

.chart {
  margin: 0;
  border: 1px solid var(--hairline);
  border-radius: var(--r-panel);
  padding: 24px;
  background: var(--shell);
}

.bars {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 10px;
  align-items: end;
  height: 190px;
}

.bars span {
  position: relative;
  height: var(--h);
  background: var(--surface);
  border-radius: 10px;
}

.bars .peak {
  background: var(--accent);
}

.bars i {
  position: absolute;
  left: 0;
  right: 0;
  bottom: -24px;
  text-align: center;
  font-style: normal;
  font-size: 12px;
  color: var(--muted);
}

.bars .peak i {
  color: var(--ink);
  font-weight: 600;
}

.chart figcaption {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 40px;
  padding-top: 16px;
  border-top: 1px solid var(--hairline);
  font-size: 14px;
  font-weight: 600;
}

.chart figcaption .ico {
  color: var(--accent-ink);
}

/* --------------------------------------------------------------- карта денег */

.money-card {
  margin: 0;
  border: 1px solid var(--hairline);
  border-radius: var(--r-panel);
  padding: 22px 24px;
  background: var(--shell);
}

.money-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
  padding: 9px 0;
  font-size: 15px;
  color: var(--muted);
}

.money-row b {
  font-size: 17px;
  font-weight: 700;
  color: var(--ink);
}

.money-row.minus b {
  color: var(--negative);
}

.money-row.net {
  border-top: 1px solid var(--hairline);
  margin-top: 6px;
  padding-top: 14px;
}

.money-row.net b {
  font-size: 26px;
  letter-spacing: -0.02em;
  color: var(--positive);
}

.money-bar {
  height: 8px;
  border-radius: 999px;
  background: var(--surface);
  overflow: hidden;
  margin: 16px 0 10px;
}

.money-bar i {
  display: block;
  height: 100%;
  width: var(--w);
  border-radius: 999px;
  background: var(--accent);
}

.money-goal,
.money-tax {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  font-size: 14px;
  color: var(--muted);
  padding: 7px 0;
}

.money-goal span,
.money-tax span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.money-goal b,
.money-tax b {
  color: var(--ink);
  font-weight: 700;
}

.money-tax {
  border-top: 1px solid var(--hairline);
  margin-top: 6px;
  padding-top: 14px;
}

/* ------------------------------------------------------------------- плитки */

.tiles {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 10px;
}

.tile {
  display: grid;
  grid-template-columns: auto 1fr;
  grid-template-rows: auto auto;
  column-gap: 14px;
  row-gap: 3px;
  background: var(--surface);
  border-radius: var(--r-tile);
  padding: 18px 20px;
  transition: background 0.15s ease;
}

.tile:hover {
  background: color-mix(in srgb, var(--accent) 14%, var(--surface));
}

.tile .ico {
  grid-row: span 2;
  align-self: start;
  margin-top: 2px;
  width: 22px;
  height: 22px;
  color: var(--accent-ink);
}

.tile b {
  font-size: 15px;
  font-weight: 600;
}

.tile span {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.45;
}

/* ------------------------------------------------------------------ панель */

.panel {
  border-radius: var(--r-panel);
  padding: 36px 38px;
}

.panel.warm {
  background: var(--surface-warm);
}

.panel h2 {
  font-size: 26px;
  font-weight: 700;
  margin-bottom: 14px;
}

.panel p {
  max-width: 62ch;
  color: var(--ink);
}

.panel-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 22px;
  margin: 20px 0 0;
  font-weight: 600;
}

@media (max-width: 620px) {
  .panel {
    padding: 26px 22px;
  }
}

.disclaimer {
  font-size: 15px;
  color: var(--muted);
  max-width: 68ch;
}

/* ------------------------------------------------- страницы с документами */

.page-doc .page-head {
  padding: 56px 0 4px;
}

.page-doc h1 {
  font-size: clamp(30px, 4.6vw, 42px);
  font-weight: 700;
  margin-bottom: 14px;
}

.page-doc .lead {
  font-size: 17px;
}

.lead-en {
  color: var(--muted);
  font-size: 15px;
}

.languages {
  background: var(--surface-warm);
  border-radius: var(--r-panel);
  padding: 10px 14px;
  margin: 26px 0 8px;
  scroll-margin-top: 80px;
}

.languages ol {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0 18px;
  margin: 0;
  padding: 0;
  list-style: none;
}

@media (max-width: 620px) {
  .languages ol {
    grid-template-columns: 1fr;
  }
}

.languages li a {
  display: block;
  padding: 11px 8px;
  border-radius: 12px;
  color: var(--ink);
}

.languages li a:hover {
  background: color-mix(in srgb, var(--accent) 22%, transparent);
  text-decoration: none;
}

.nav-lang {
  font-weight: 600;
  font-size: 15px;
}

.nav-doc {
  display: block;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
  letter-spacing: 0.01em;
}

.doc {
  padding-top: 26px;
  margin-top: 54px;
  border-top: 1px solid var(--hairline);
  scroll-margin-top: 76px;
}

.doc-head {
  margin-bottom: 26px;
}

.doc-head .chip {
  background: var(--accent);
  color: var(--on-accent);
  margin-bottom: 12px;
}

.doc h2 {
  font-size: 25px;
  font-weight: 700;
  line-height: 1.25;
  margin-bottom: 8px;
}

.doc h3 {
  font-size: 16px;
  font-weight: 600;
  margin: 30px 0 8px;
}

.doc .edition {
  color: var(--muted);
  font-size: 15px;
  margin: 0;
}

.doc p {
  overflow-wrap: break-word;
  max-width: 68ch;
}

.to-top {
  margin-top: 28px;
  font-size: 18px;
  color: var(--muted);
}

.next-doc {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 56px;
  padding: 13px 20px;
  border: 1px solid var(--hairline);
  border-radius: var(--r-button);
  font-weight: 600;
  color: var(--ink);
}

.next-doc:hover {
  background: var(--surface);
  text-decoration: none;
}

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

.footer {
  border-top: 1px solid var(--hairline);
  margin-top: 40px;
  padding: 36px 0 56px;
}

.footer-inner {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 24px;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  margin-bottom: 18px;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 24px;
  font-size: 15px;
  margin-bottom: 16px;
}

.lang-switch {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px 14px;
  margin-bottom: 18px;
}

.lang-label {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}

.lang-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 8px;
}

.lang-list a {
  padding: 4px 11px;
  border: 1px solid var(--hairline);
  border-radius: 999px;
  font-size: 14px;
  color: var(--ink);
}

.lang-list a:hover {
  background: var(--surface);
  text-decoration: none;
}

.lang-list a.on {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--on-accent);
  font-weight: 600;
}

.footer-legal {
  font-size: 13px;
  color: var(--muted);
  margin: 0;
}
