/* Deutsch-Trainer — страница о боте и оплата.
   Мотив: талон электронной очереди и табло в ведомстве. Синий — таблички ведомств, жёлтый — табло вызова,
   бумага — холодная серо-зелёная. Шрифты свои (на сервере), без Google Fonts — так требует DSGVO-практика. */

@font-face { font-family: "Golos"; font-style: normal; font-weight: 400 900; font-display: swap;
  src: url("fonts/golos-text-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: "Golos"; font-style: normal; font-weight: 400 900; font-display: swap;
  src: url("fonts/golos-text-latin-ext-wght-normal.woff2") format("woff2");
  unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF; }
@font-face { font-family: "Golos"; font-style: normal; font-weight: 400 900; font-display: swap;
  src: url("fonts/golos-text-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: "Golos"; font-style: normal; font-weight: 400 900; font-display: swap;
  src: url("fonts/golos-text-cyrillic-ext-wght-normal.woff2") format("woff2");
  unicode-range: U+0460-052F,U+1C80-1C8A,U+20B4,U+2DE0-2DFF,U+A640-A69F,U+FE2E-FE2F; }
@font-face { font-family: "Vazirmatn"; font-style: normal; font-weight: 100 900; font-display: swap;
  src: url("fonts/vazirmatn-arabic-wght-normal.woff2") format("woff2");
  unicode-range: U+0600-06FF,U+0750-077F,U+0870-088E,U+0890-0891,U+0897-08E1,U+08E3-08FF,U+200C-200E,U+2010-2011,U+204F,U+2E41,U+FB50-FDFF,U+FE70-FE74,U+FE76-FEFC; }

:root {
  --ink: #1F2A44;        /* синий табличек ведомств */
  --ink-soft: #3A4766;
  --muted: #5B6577;
  --paper: #EEF2F0;      /* казённая бумага */
  --sheet: #FFFFFF;
  --line: #C9D2CE;
  --signal: #F2C230;     /* табло вызова */
  --signal-soft: #FBEDB5;
  --ok: #2F7D5B;
  --error: #A3312A;
  --font: "Golos", "Vazirmatn", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --step: 1.25;          /* шкала заголовков */
  --radius: 6px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font: 400 1.0625rem/1.55 var(--font);
  font-feature-settings: "tnum" 0;
}
[dir="rtl"] body { line-height: 1.75; }
a { color: inherit; text-underline-offset: 0.18em; }
a:focus-visible, button:focus-visible, input:focus-visible { outline: 3px solid var(--signal); outline-offset: 2px; border-radius: 2px; }
h1, h2, h3 { line-height: 1.15; margin: 0 0 0.6em; letter-spacing: -0.01em; }
[dir="rtl"] h1, [dir="rtl"] h2, [dir="rtl"] h3 { letter-spacing: 0; line-height: 1.4; }
h1 { font-size: clamp(2rem, 6vw, 3.4rem); font-weight: 800; }
h2 { font-size: clamp(1.5rem, 3.4vw, 2.1rem); font-weight: 750; }
h3 { font-size: 1.15rem; font-weight: 700; }
p { margin: 0 0 1em; max-width: 64ch; }

/* ---------- шапка и подвал ---------- */
.top {
  display: flex; flex-wrap: wrap; gap: 12px 24px; align-items: center; justify-content: space-between;
  padding: 16px clamp(16px, 4vw, 48px); max-width: 1200px; margin: 0 auto;
}
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 750; }
.brand-mark {
  background: var(--ink); color: var(--signal); padding: 3px 8px; border-radius: 4px;
  font-weight: 800; font-size: 0.9rem; font-variant-numeric: tabular-nums; letter-spacing: 0.04em;
}
.langs { display: flex; flex-wrap: wrap; gap: 4px; font-size: 0.92rem; }
.langs a { text-decoration: none; padding: 4px 9px; border-radius: 999px; color: var(--muted); }
.langs a:hover { color: var(--ink); background: var(--sheet); }
.langs a[aria-current] { color: var(--ink); background: var(--sheet); box-shadow: inset 0 0 0 1px var(--line); font-weight: 650; }

main { padding: 0 clamp(16px, 4vw, 48px); max-width: 1200px; margin: 0 auto; }
.narrow main { max-width: 720px; }
.foot {
  max-width: 1200px; margin: 64px auto 0; padding: 24px clamp(16px, 4vw, 48px) 40px;
  border-top: 1px solid var(--line); color: var(--muted); font-size: 0.92rem;
  display: flex; flex-wrap: wrap; gap: 8px 32px; justify-content: space-between;
}
.foot p { margin: 0; }
.foot-links { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 18px; }

/* ---------- кнопки ---------- */
.btn {
  display: inline-block; text-decoration: none; font: inherit; font-weight: 700; cursor: pointer;
  padding: 14px 22px; border-radius: var(--radius); border: 0; line-height: 1.2; text-align: center;
}
.btn-primary { background: var(--signal); color: var(--ink); box-shadow: inset 0 -3px 0 rgba(31, 42, 68, 0.18); }
.btn-primary:hover { background: #F6CF52; }
.btn-dark { background: var(--ink); color: var(--sheet); }
.btn-dark:hover { background: var(--ink-soft); }
.btn-plain { background: transparent; box-shadow: inset 0 0 0 2px var(--ink); color: var(--ink); }
.btn-wide { width: 100%; }
.hint { color: var(--muted); font-size: 0.94rem; margin-top: 12px; }

/* ---------- первый экран: разговор ---------- */
.hero { display: grid; gap: 40px; padding: 32px 0 72px; align-items: center; }
@media (min-width: 900px) { .hero { grid-template-columns: 1.1fr 0.9fr; gap: 64px; padding: 56px 0 96px; } }
.hero h1 { max-width: 16ch; }
[dir="rtl"] .hero h1 { max-width: 20ch; }
.lead { font-size: 1.2rem; color: var(--ink-soft); max-width: 46ch; margin-bottom: 28px; }

.call { margin: 0; background: var(--sheet); border-radius: 10px; box-shadow: 0 1px 0 var(--line), 0 18px 40px -24px rgba(31, 42, 68, 0.45); overflow: hidden; }
.call-head { display: flex; align-items: center; gap: 10px; padding: 14px 20px; background: var(--ink); color: var(--sheet); font-weight: 650; font-size: 0.95rem; }
.call-dot { width: 9px; height: 9px; border-radius: 50%; background: #5BD08F; box-shadow: 0 0 0 4px rgba(91, 208, 143, 0.2); }
.call-lines { list-style: none; margin: 0; padding: 8px 20px 16px; }
.line { padding: 14px 0; border-bottom: 1px solid var(--paper); }
.line:last-child { border-bottom: 0; }
.line p { margin: 0; font-size: 1.05rem; }
.who { display: block; font-size: 0.82rem; color: var(--muted); font-weight: 650; margin-bottom: 2px; }
.line.you { padding-inline-start: 18px; }
.line.you p { color: var(--ink-soft); }
.voice { font-weight: 500; margin-inline-start: 6px; font-variant-numeric: tabular-nums; }
.line.better { background: var(--signal-soft); margin: 0 -20px; padding: 12px 20px 12px 38px; border-bottom: 0; }
[dir="rtl"] .line.better { padding: 12px 38px 12px 20px; }
.line.better p { font-weight: 650; }
.line.better .who { color: #7A5B00; }

/* ---------- табло ситуаций ---------- */
.situations { background: var(--ink); color: var(--sheet); border-radius: 12px; padding: clamp(24px, 4vw, 48px); }
.section-head { display: grid; gap: 4px 48px; margin-bottom: 28px; }
@media (min-width: 900px) { .section-head { grid-template-columns: 1fr 1fr; align-items: end; } }
.section-head p { color: #C3CAD9; margin: 0; }
.board { list-style: none; margin: 0; padding: 0; display: grid; border-top: 1px solid rgba(255, 255, 255, 0.14); }
@media (min-width: 700px) { .board { grid-template-columns: 1fr 1fr; column-gap: 40px; } }
.board li { display: flex; justify-content: space-between; gap: 16px; align-items: baseline; padding: 16px 0; border-bottom: 1px solid rgba(255, 255, 255, 0.14); }
.board strong { font-weight: 650; }
.board span { color: var(--signal); font-weight: 600; white-space: nowrap; }
.board li.own { flex-direction: column; gap: 2px; }
.board li.own span { color: #C3CAD9; font-weight: 400; white-space: normal; }

/* ---------- шаги ---------- */
.steps { padding: 80px 0 24px; }
.steps ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 32px; counter-reset: step; }
@media (min-width: 900px) { .steps ol { grid-template-columns: repeat(4, 1fr); } }
.steps li { counter-increment: step; border-top: 3px solid var(--ink); padding-top: 14px; }
.steps li::before { content: counter(step); display: block; font-size: 2.6rem; font-weight: 800; line-height: 1; margin-bottom: 12px; color: var(--ink); font-variant-numeric: tabular-nums; }
.steps p { color: var(--ink-soft); margin: 0; }

/* ---------- талон: цена ---------- */
.price { display: grid; gap: 40px; padding: 72px 0 0; align-items: start; }
@media (min-width: 900px) { .price { grid-template-columns: minmax(0, 520px) 1fr; gap: 72px; } }
.ticket { position: relative; background: var(--sheet); border-radius: 10px; box-shadow: 0 1px 0 var(--line), 0 22px 48px -30px rgba(31, 42, 68, 0.55); }
.ticket-main { padding: 28px 28px 24px; }
.ticket-title { font-size: 1rem; font-weight: 700; color: var(--muted); margin: 0 0 6px; }
.ticket-price { display: flex; align-items: baseline; gap: 10px; margin: 0 0 18px; }
.ticket-price .amount { font-size: clamp(3.6rem, 12vw, 5.2rem); font-weight: 850; letter-spacing: -0.03em; line-height: 1; font-variant-numeric: tabular-nums; }
.ticket-price .per { color: var(--muted); font-weight: 600; }
.ticket ul { list-style: none; margin: 0 0 24px; padding: 0; }
.ticket li { padding: 8px 0 8px 28px; position: relative; border-top: 1px solid var(--paper); }
[dir="rtl"] .ticket li { padding: 8px 28px 8px 0; }
.ticket li::before { content: ""; position: absolute; inset-inline-start: 2px; top: 15px; width: 12px; height: 7px; border-left: 2.5px solid var(--ok); border-bottom: 2.5px solid var(--ok); transform: rotate(-45deg); }
/* линия отрыва: пунктир и полукруглые вырезы по краям */
.ticket-stub {
  position: relative; padding: 18px 28px 20px; background: var(--signal); border-radius: 0 0 10px 10px;
  font-weight: 700; border-top: 2px dashed rgba(31, 42, 68, 0.35);
}
.ticket-stub::before, .ticket-stub::after {
  content: ""; position: absolute; top: -12px; width: 22px; height: 22px; border-radius: 50%; background: var(--paper);
}
.ticket-stub::before { left: -11px; }
.ticket-stub::after { right: -11px; }
.privacy p { color: var(--ink-soft); }

/* ---------- оплата ---------- */
.pay { padding: 24px 0 0; display: grid; gap: 28px; }
.ticket-pay h1.ticket-title { font-size: 1rem; }
.ticket-pay .ticket-stub { font-weight: 600; font-size: 0.95rem; }
.pay-form { background: var(--sheet); border-radius: 10px; padding: 24px 28px; box-shadow: 0 1px 0 var(--line); }
.check { display: flex; gap: 12px; align-items: flex-start; padding: 14px; border-radius: var(--radius); background: var(--paper); cursor: pointer; margin: 0 0 14px; }
.check input { width: 22px; height: 22px; margin: 2px 0 0; flex: none; accent-color: var(--ink); }
.check-error { box-shadow: inset 0 0 0 2px var(--error); }
.form-error { color: var(--error); font-weight: 600; }
.terms { font-size: 0.94rem; color: var(--ink-soft); }

/* ---------- сообщения и тексты ---------- */
.message { background: var(--sheet); border-radius: 10px; padding: 32px 28px; margin-top: 24px; border-top: 6px solid var(--ink); }
.message-ok { border-top-color: var(--ok); }
.message h1 { font-size: clamp(1.8rem, 5vw, 2.4rem); }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 20px; }
.legal { background: var(--sheet); border-radius: 10px; padding: 32px 28px; margin-top: 24px; }
.legal h1 { font-size: 2rem; }
.legal h2 { font-size: 1.3rem; margin-top: 1.6em; }
.legal h3 { margin-top: 1.4em; }

@media (prefers-reduced-motion: no-preference) {
  .btn { transition: background-color 0.15s ease; }
}
@media (max-width: 520px) {
  .board li { flex-direction: column; gap: 2px; }
  .ticket-main, .pay-form { padding: 22px 20px; }
  .ticket-stub { padding: 16px 20px; }
}
