/*
 * Летим — сайт в духе «Указателя», как и приложение: табличка навигации аэропорта.
 * Жёлтый — «сейчас», чёрные плитки с жёлтыми пиктограммами, красный — только тревога.
 * Шрифты приложения: Google Sans Flex (латиница, цифры) и Roboto Flex (кириллица) под одним именем.
 * CSP сайта запрещает инлайн-стили: всё оформление здесь.
 */

@font-face {
  font-family: "Letim";
  src: url("/fonts/letim-sans.woff") format("woff");
  font-weight: 400 800;
  font-stretch: 75% 140%;
  font-display: swap;
  unicode-range: U+0000-00FF, U+2000-206F, U+20AC, U+2212;
}

@font-face {
  font-family: "Letim";
  src: url("/fonts/letim-cyr.woff") format("woff");
  font-weight: 400 800;
  font-stretch: 75% 140%;
  font-display: swap;
  unicode-range: U+0400-04FF, U+2116, U+2192, U+20BD;
}

:root {
  --ground: #f4f3ef;
  --raised: #ffffff;
  --ink: #15130e;
  --ink-2: #5b5a55;
  --rule: #dcdad4;
  --sign: #f8c630;
  --sign-ink: #15130e;
  --sign-ink-2: #4b4127;
  --button: #15130e;
  --on-button: #f8c630;
  --alarm: #c0362c;
  --board: #15130e;
  --board-ink: #f2f0ea;
  --board-ink-2: #aba89f;
  --board-rule: rgba(242, 240, 234, 0.14);
  --board-outline: rgba(242, 240, 234, 0.3);
  /* Не меняются в тёмной теме: жёлтое и чёрное на тёмных табличках, рамка телефона. */
  --brand-yellow: #f8c630;
  --brand-black: #15130e;
  --alarm-ink: #fff7ef;
  --shadow: rgba(21, 19, 14, 0.5);
  --column-gap: 64px;
  /* Первый экран: в светлой теме весь жёлтый, как главный в день вылета. */
  --hero-ground: var(--sign);
  --hero-ink: var(--sign-ink);
  --hero-ink-2: var(--sign-ink-2);
  --hero-button: var(--button);
  --font: "Letim", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --margin: max(20px, env(safe-area-inset-left));
  color-scheme: light;
}

/* Тёмная тема — как в приложении: жёлтая табличка панелью на тёмном. */
@media (prefers-color-scheme: dark) {
  :root {
    --ground: #121110;
    --raised: #1d1c1a;
    --ink: #f2f0ea;
    --ink-2: #aba89f;
    --rule: #2e2c28;
    --sign: #e9b92f;
    --button: #2a2824;
    --on-button: #e9b92f;
    --board: #1d1c1a;
    --hero-ground: var(--ground);
    --hero-ink: var(--ink);
    --hero-ink-2: var(--ink-2);
    --hero-button: var(--button);
    --shadow: rgba(0, 0, 0, 0.8);
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }

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

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

body {
  margin: 0;
  overflow-x: clip;
  background: var(--ground);
  color: var(--ink);
  font: 400 18px/1.55 var(--font);
  font-synthesis: none;
  -webkit-font-smoothing: antialiased;
}

img { display: block; max-width: 100%; height: auto; }

a { color: inherit; text-decoration-thickness: 1.5px; text-underline-offset: 3px; }

h1, h2, h3 { margin: 0; text-wrap: balance; }

p { margin: 0; text-wrap: pretty; }

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

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

.skip {
  position: absolute;
  left: 16px;
  top: -64px;
  z-index: 10;
  padding: 10px 16px;
  border-radius: 10px;
  background: var(--ink);
  color: var(--ground);
  font-weight: 600;
}

.skip:focus { top: 16px; }

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

.hero-band :focus-visible { outline-color: var(--hero-ink); }

/* Нажатие: ссылки тускнеют, кнопки чуть проседают. */
a:active, summary:active { opacity: 0.72; }

.lang-switch:active, .privacy .button:active { opacity: 1; transform: translateY(1px); }

.icon { width: 24px; height: 24px; fill: currentColor; flex: none; }

/* Пиктограмма таблички: чёрная плитка, жёлтый знак. */
.picto {
  display: inline-grid;
  place-items: center;
  flex: none;
  width: 48px;
  height: 48px;
  border-radius: 7px;
  background: var(--button);
  color: var(--on-button);
}

.picto .icon { width: 30px; height: 30px; }

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

.site-header {
  display: flex;
  align-items: center;
  gap: 28px;
  padding-block: 18px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin-right: auto;
  font-weight: 800;
  font-stretch: 112%;
  font-size: 22px;
  line-height: 1;
  text-decoration: none;
}

.brand img { width: 36px; height: 36px; border-radius: 9px; }

.nav { display: flex; gap: 28px; font-size: 16px; font-weight: 600; }

.nav a { text-decoration: none; }

.nav a:hover { text-decoration: underline; }

.lang-switch {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 0 14px;
  border: 2px solid currentColor;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
}

.lang-switch:hover { background: var(--hero-ink); color: var(--hero-ground); }

@media (max-width: 900px) {
  .nav { display: none; }
}

/* ---------- Первый экран: табличка ---------- */

.hero-band { background: var(--hero-ground); color: var(--hero-ink); }

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  column-gap: 64px;
  align-items: end;
  padding-block: 28px 80px;
}

/* Табличка — контейнер: номер выхода считается от её ширины, а не от ширины экрана. */
.hero-sign { container-type: inline-size; color: var(--sign-ink); }

.sign-row { display: flex; align-items: center; gap: 14px; }

.sign-label {
  font-weight: 800;
  font-stretch: 125%;
  font-size: 34px;
  line-height: 1.1;
  letter-spacing: -0.01em;
}

/* Метка «был 105»: появляется, когда табличку перевесили. */
.tag {
  margin-left: auto;
  padding: 6px 12px 7px;
  border-radius: 8px;
  background: var(--sign-ink);
  color: var(--brand-yellow);
  font-weight: 800;
  font-stretch: 112%;
  font-size: 20px;
  line-height: 1.2;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

/*
 * Номер выхода — 190 dp в приложении, здесь до 300 px. Сигнатура «Табличку перевесили»:
 * старый номер уходит вверх, новый поднимается снизу, потом появляется метка «был 105».
 */
.numeral-window {
  display: grid;
  overflow: hidden;
  margin: 18px 0 0 -0.045em;
  padding-block: 0.03em;
  font-weight: 800;
  /* «107» шириной около 1,9 кегля: половина ширины таблички — номер помещается целиком. */
  font-size: clamp(120px, 50cqi, 300px);
  line-height: 0.84;
  letter-spacing: -0.032em;
  font-variant-numeric: tabular-nums;
}

.numeral { grid-area: 1 / 1; }

.numeral-old { animation: gate-out 0.18s cubic-bezier(0.4, 0, 1, 1) 1.2s both; }

.numeral-new { animation: gate-in 0.62s cubic-bezier(0.2, 0.9, 0.25, 1.06) 1.26s both; }

.tag-was { animation: tag-in 0.3s ease-out 1.8s both; }

@keyframes gate-out {
  from { transform: none; opacity: 1; }
  to { transform: translateY(-62%); opacity: 0; }
}

@keyframes gate-in {
  from { transform: translateY(40%); opacity: 0; }
  to { transform: none; opacity: 1; }
}

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

@media (prefers-reduced-motion: reduce) {
  .numeral-old { display: none; }
  .numeral-new, .tag-was { animation: none; }
}

.sign-boarding {
  margin-top: 26px;
  font-weight: 800;
  font-stretch: 112%;
  font-size: clamp(24px, 2.6vw, 30px);
  line-height: 1.15;
  font-variant-numeric: tabular-nums;
}

.sign-boarding span { font-weight: 600; font-stretch: 100%; }

/* Время посадки не рвём на «15:15–» и «15:35»: на узком экране оно целиком уходит на вторую строку. */
.sign-boarding time { white-space: nowrap; }

.hero h1 {
  font-weight: 800;
  font-stretch: 108%;
  font-size: clamp(34px, 4.4vw, 54px);
  line-height: 1.05;
  letter-spacing: -0.02em;
}

.lead { margin-top: 20px; max-width: 34em; font-size: 19px; }

/* Четыре таблички — сеткой 2×2: в ряд с переносом на десктопе последняя оставалась одна во втором ряду. */
.stores { display: grid; grid-template-columns: repeat(2, max-content); gap: 12px; margin-top: 30px; }

/* Табличка-ссылка: сторы, APK с сайта и бета в Telegram. */
.store {
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  min-height: 64px;
  padding: 10px 24px;
  border-radius: 14px;
  background: var(--hero-button);
  color: var(--on-button);
  font-weight: 800;
  font-stretch: 112%;
  font-size: 21px;
  line-height: 1.1;
}

.store small { font-size: 13px; font-weight: 600; font-stretch: 100%; line-height: 1.3; opacity: 0.85; }

a.store { text-decoration: none; }

a.store:hover { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 4px; }

.hero-note { margin-top: 16px; font-size: 15px; color: var(--hero-ink-2); }

@media (prefers-color-scheme: dark) {
  .hero-sign { padding: 24px 28px 28px; border-radius: 24px; background: var(--sign); }
}

@media (max-width: 960px) {
  .hero { grid-template-columns: minmax(0, 1fr); row-gap: 40px; padding-block: 16px 56px; }
}

@media (max-width: 420px) {
  .sign-row { gap: 10px; }
  .sign-row .picto { width: 40px; height: 40px; }
  .sign-row .picto .icon { width: 26px; height: 26px; }
  .sign-label { font-size: 24px; }
  .tag { padding-inline: 8px; font-size: 16px; }
  .store { padding-inline: 16px; font-size: 19px; }
}

/* На 320 px две колонки табличек влезают в поля страницы только с меньшими полями и шрифтом. */
@media (max-width: 340px) {
  .store { padding-inline: 12px; font-size: 17px; }
}

/* В тёмной теме табличка — панель с полями: на узком экране поля меньше, иначе метка «был 105» не влезает. */
@media (max-width: 420px) and (prefers-color-scheme: dark) {
  .hero-sign { padding: 18px 16px 22px; }
}

/* ---------- Разделы ---------- */

.section { padding-block: 96px; }

.section + .section { border-top: 1px solid var(--rule); }

@media (max-width: 720px) {
  .section { padding-block: 64px; }
}

h2 {
  max-width: 18em;
  font-weight: 800;
  font-stretch: 106%;
  font-size: clamp(32px, 3.8vw, 46px);
  line-height: 1.08;
  letter-spacing: -0.015em;
}

/* Заголовок раздела — как указатель в терминале: пиктограмма и надпись в одну строку. */
.sign-head { display: flex; align-items: flex-start; gap: 18px; }

/* Плитка — по центру первой строки заголовка. */
.sign-head .picto { width: 52px; height: 52px; margin-top: calc((1.08em - 52px) / 2); }

.sign-head .picto .icon { width: 32px; height: 32px; }

@media (max-width: 720px) {
  .sign-head { gap: 14px; }
  .sign-head .picto { width: 40px; height: 40px; margin-top: calc((1.08em - 40px) / 2); }
  .sign-head .picto .icon { width: 26px; height: 26px; }
}

.section-lead { margin-top: 18px; max-width: 38em; color: var(--ink-2); }

h3 {
  font-weight: 800;
  font-stretch: 110%;
  font-size: 21px;
  line-height: 1.25;
}

/* Способы добавить: как лист «Добавить посадочный» в приложении — значок слева от строки. */
.ways {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 40px var(--column-gap);
  margin-top: 56px;
}

.way { display: grid; grid-template-columns: auto minmax(0, 1fr); column-gap: 20px; align-content: start; }

.way .picto { grid-row: span 2; }

.way > p { margin-top: 8px; font-size: 16px; color: var(--ink-2); }

@media (max-width: 720px) {
  .ways { grid-template-columns: minmax(0, 1fr); gap: 28px; }
  .way { column-gap: 16px; }
}

/* Текст и телефон рядом. */
.split {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  gap: var(--column-gap);
  align-items: center;
}

.split-reverse { grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr); }

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

@media (max-width: 900px) {
  .split, .split-reverse { grid-template-columns: minmax(0, 1fr); gap: 48px; }
  /* На телефоне сначала табличка раздела, потом снимок. */
  .split-reverse .phone { order: 1; }
}

.phone {
  justify-self: center;
  width: min(320px, 80vw);
  margin: 0;
  padding: 10px;
  border-radius: 46px;
  background: var(--brand-black);
  box-shadow: 0 34px 60px -30px var(--shadow);
}

.phone img { width: 100%; border-radius: 36px; }

@media (prefers-color-scheme: dark) {
  .phone { box-shadow: 0 0 0 1px var(--rule), 0 34px 60px -30px var(--shadow); }
}

/* Табло: как экран вылета в терминале, только честное — откуда что берётся. */
.board {
  margin-top: 36px;
  padding: 6px 22px;
  border-radius: 18px;
  background: var(--board);
  color: var(--board-ink);
  font-variant-numeric: tabular-nums;
}

.board-row {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  padding-block: 15px;
  border-top: 1px solid var(--board-rule);
}

.board-row:first-child { border-top: 0; }

.board-code {
  color: var(--brand-yellow);
  font-weight: 800;
  font-stretch: 112%;
  font-size: 22px;
  line-height: 1;
  letter-spacing: 0.03em;
}

.board-name { font-size: 17px; }

.board-source {
  padding: 5px 10px 6px;
  border-radius: 7px;
  background: var(--brand-yellow);
  color: var(--brand-black);
  font-weight: 800;
  font-size: 15px;
  line-height: 1.2;
}

/* Табло без выхода: только статус и время — жёлтая рамка вместо заливки. */
.board-source-status { background: transparent; color: var(--brand-yellow); box-shadow: inset 0 0 0 1.5px var(--brand-yellow); }

.board-source-other { background: transparent; color: var(--board-ink-2); box-shadow: inset 0 0 0 1.5px var(--board-outline); }

@media (max-width: 400px) {
  .board { padding-inline: 14px; }
  .board-row { grid-template-columns: 46px minmax(0, 1fr) auto; gap: 10px; }
  .board-code { font-size: 19px; }
  .board-name { font-size: 15px; overflow-wrap: anywhere; }
  .board-source { font-size: 14px; padding-inline: 8px; }
}

.fine { margin-top: 20px; font-size: 16px; color: var(--ink-2); }

.notes { display: grid; gap: 16px; margin-top: 28px; }

.notes li { display: grid; grid-template-columns: auto minmax(0, 1fr); column-gap: 14px; align-items: start; }

/* На фоне страницы метка — как кнопка: в тёмной теме чёрная плитка слилась бы с фоном. */
.notes .tag { margin: 1px 0 0; padding: 4px 9px 5px; background: var(--button); color: var(--on-button); font-size: 16px; }

.dash {
  display: inline-grid;
  place-items: center;
  width: 54px;
  height: 31px;
  margin-top: 1px;
  border: 2.5px dashed currentColor;
  border-radius: 7px;
  font-weight: 800;
  opacity: 0.6;
}

/* Перед вылетом: три табло-карточки. */
.alerts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--column-gap);
  margin-top: 48px;
}

.alert-visual {
  display: grid;
  place-items: center;
  min-height: 250px;
  padding: 24px;
  border-radius: 22px;
  background: var(--raised);
}

.alert-visual img { border-radius: 22px; box-shadow: 0 18px 36px -24px var(--shadow); }

.alert > h3 { margin-top: 24px; }

.alert > p { margin-top: 10px; font-size: 16px; color: var(--ink-2); }

@media (max-width: 960px) {
  .alerts { grid-template-columns: minmax(0, 1fr); gap: 48px; }
  .alert-visual { min-height: 0; }
}

/* Табличка задержки — как в приложении: красная, белый текст. */
.alarm-sign {
  container-type: inline-size;
  width: min(100%, 320px);
  padding: 18px 22px 20px;
  border-radius: 14px;
  background: var(--alarm);
  color: var(--alarm-ink);
  font-variant-numeric: tabular-nums;
}

.alarm-sign .alarm-title { font-weight: 800; font-stretch: 125%; font-size: 24px; line-height: 1.15; }

/* Время в одну строку при любой ширине карточки: кегль от ширины таблички. */
.alarm-sign .alarm-time { margin-top: 4px; font-weight: 800; font-size: clamp(22px, 13.5cqi, 40px); line-height: 1.05; letter-spacing: -0.02em; white-space: nowrap; }

.alarm-sign .alarm-note { margin-top: 6px; font-size: 15px; opacity: 0.9; }

/* У выхода: список с квадратами, как «■ По расписанию». */
.ticks { display: grid; gap: 16px; margin-top: 32px; }

.ticks li { position: relative; padding-left: 30px; }

.ticks li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 0.52em;
  width: 12px;
  height: 12px;
  background: currentColor;
}

/* Приватность: чёрная табличка, жёлтые цифры. */
.privacy-band { background: var(--board); color: var(--board-ink); }

.privacy-band .picto { background: var(--brand-yellow); color: var(--brand-black); }

.privacy {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  gap: var(--column-gap);
  align-items: center;
}

.privacy p { margin-top: 18px; max-width: 34em; color: var(--board-ink-2); }

.privacy .button {
  display: inline-flex;
  align-items: center;
  min-height: 52px;
  margin-top: 28px;
  padding: 0 22px;
  border: 2px solid var(--brand-yellow);
  border-radius: 12px;
  color: var(--brand-yellow);
  font-weight: 800;
  font-stretch: 108%;
  font-size: 17px;
  text-decoration: none;
  white-space: nowrap;
}

.privacy .button:hover { background: var(--brand-yellow); color: var(--brand-black); }

/* На телефоне кнопка компактнее, чтобы «Политика конфиденциальности» уместилась в строку и на 360 px;
   на самом узком экране — просто «Политика». */
@media (max-width: 400px) {
  .privacy .button { padding-inline: 16px; font-size: 15px; }
}

@media (max-width: 339px) {
  .wide-only { display: none; }
}

.privacy-band :focus-visible { outline-color: var(--brand-yellow); }

.facts { display: grid; gap: 22px; }

.facts li { display: grid; grid-template-columns: 72px minmax(0, 1fr); align-items: center; gap: 18px; }

.facts b {
  color: var(--brand-yellow);
  font-weight: 800;
  font-size: 72px;
  line-height: 0.9;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
}

.facts span { font-size: 17px; }

@media (max-width: 900px) {
  .privacy { grid-template-columns: minmax(0, 1fr); gap: 44px; }
}

/* Вопросы. */
.faq { max-width: 860px; margin-top: 36px; border-top: 1px solid var(--rule); }

.faq details { border-bottom: 1px solid var(--rule); }

.faq summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding-block: 22px;
  cursor: pointer;
  list-style: none;
  font-weight: 800;
  font-stretch: 106%;
  font-size: 20px;
  line-height: 1.3;
}

.faq summary::-webkit-details-marker { display: none; }

/* Шеврон рисуем рамкой: значок через mask и внешний спрайт не везде работает. */
.faq summary::after {
  content: "";
  flex: none;
  width: 11px;
  height: 11px;
  margin-right: 6px;
  border-right: 3px solid currentColor;
  border-bottom: 3px solid currentColor;
  transform: translateY(-3px) rotate(45deg);
  transition: transform 0.2s ease;
}

.faq details[open] summary::after { transform: translateY(3px) rotate(-135deg); }

.faq details p { max-width: 46em; padding-bottom: 24px; color: var(--ink-2); }

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

.site-footer { padding-block: 36px 44px; border-top: 1px solid var(--rule); font-size: 15px; }

.footer-row { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 28px; }

.footer-row a { white-space: nowrap; }

.footer-row .brand { margin-right: 8px; font-size: 18px; }

.footer-row .brand img { width: 28px; height: 28px; border-radius: 7px; }

.footer-copy { margin-left: auto; color: var(--ink-2); }

@media (max-width: 560px) {
  .footer-copy { margin-left: 0; }
}

/* ---------- Политика конфиденциальности ---------- */

.page-header { border-bottom: 1px solid var(--rule); }

.page-header .nav { display: flex; }

/* На узком экране «На главную» не помещается рядом: домой ведёт и название. */
@media (max-width: 560px) {
  .page-header .nav { display: none; }
}

.doc { max-width: 820px; padding-block: 56px 88px; }

.doc h1 {
  font-weight: 800;
  font-stretch: 106%;
  /* «конфиденциальности» — длинное слово: на телефоне кегль меньше, в крайнем случае перенос. */
  font-size: clamp(26px, 7.4vw, 46px);
  hyphens: auto;
  line-height: 1.08;
  letter-spacing: -0.015em;
}

.doc .date { margin-top: 14px; font-size: 16px; color: var(--ink-2); }

/* Главное коротко — жёлтой табличкой. */
.doc .summary {
  margin-top: 36px;
  padding: 24px 28px;
  border-radius: 18px;
  background: var(--sign);
  color: var(--sign-ink);
}

.doc .summary ul { display: grid; gap: 12px; }

.doc .summary li { position: relative; padding-left: 26px; }

.doc .summary li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 10px;
  height: 10px;
  background: currentColor;
}

.doc h2 { margin-top: 48px; max-width: none; font-size: 26px; line-height: 1.25; }

/* Строка — не длиннее 75 знаков: латиница уже кириллицы, поэтому мера в em, а не в ch. */
.doc p { margin-top: 14px; max-width: 35em; }

/* Шаги «Как удалить данные»: номер вместо квадрата, отступ как у пунктов сводки. */
.doc ol { display: grid; gap: 10px; margin-top: 14px; max-width: 35em; counter-reset: step; }

.doc ol li { position: relative; padding-left: 26px; counter-increment: step; }

.doc ol li::before { content: counter(step) "."; position: absolute; left: 0; font-weight: 700; font-variant-numeric: tabular-nums; }
