/* Roflan Airlines — общие стили сайта (лендинг, /privacy, /terms) */

:root {
  --bg: #070B16;
  --bg-2: #0B101E;
  --card: #0F1526;
  --card-border: #222B45;
  --field: #151D33;
  --field-border: #2A3555;
  --line: #1A2238;
  --text: #EEF1F8;
  --muted: #A3ACC2;
  --soft: #C9D0E0;
  --accent: #FFC93C;
  --accent-hover: #FFE08A;
  --on-accent: #0A0E1A;
  --blue: #5AA9F0;
  --green: #4ADE80;
  --orange: #FF8A65;

  --f-logo: 'Pixelify Sans', monospace;
  --f-head: 'Unbounded', sans-serif;
  --f-body: 'Onest', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --f-mono: 'JetBrains Mono', ui-monospace, monospace;

  --gutter: 24px;
  --header-h: 72px;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { margin: 0; min-height: 100vh; background: var(--bg); color: var(--text); font-family: var(--f-body); line-height: 1.4; }
img { max-width: 100%; height: auto; }
a { color: var(--accent); }
a:hover { color: var(--accent-hover); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
[id] { scroll-margin-top: calc(var(--header-h) + 16px); }
.page { overflow-x: clip; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

@media (max-width: 420px) { :root { --gutter: 16px; } }

.wrap { max-width: 1200px; margin: 0 auto; padding-left: var(--gutter); padding-right: var(--gutter); }
.wrap--narrow { max-width: 860px; }
.section { padding-top: 40px; padding-bottom: 96px; display: flex; flex-direction: column; gap: 40px; }
.section__head { display: flex; flex-direction: column; gap: 12px; }
.h2 { margin: 0; font-family: var(--f-head); font-weight: 700; font-size: clamp(28px, 5vw, 40px); line-height: 1.15; }
.lead { margin: 0; font-size: clamp(16px, 2vw, 18px); line-height: 1.55; color: var(--muted); max-width: 680px; }
.card { background: var(--card); border: 1px solid var(--card-border); border-radius: 20px; }
.ok { color: var(--green); }
.no { color: var(--orange); }

@media (max-width: 720px) { .section { padding-bottom: 64px; gap: 28px; } }

/* ---------- кнопки ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 48px; padding: 0 20px; border-radius: 12px;
  border: 1px solid var(--field-border); background: var(--field); color: var(--text);
  font: inherit; font-weight: 600; text-decoration: none; cursor: pointer;
  transition: transform .15s ease, filter .15s ease;
}
.btn:hover { color: var(--text); transform: translateY(-2px); filter: brightness(1.08); }
.btn--accent { background: var(--accent); border-color: var(--accent); color: var(--on-accent); font-weight: 700; }
.btn--accent:hover { color: var(--on-accent); }
.btn--ghost { background: transparent; }
.btn--lg { min-height: 56px; padding: 0 28px; border-radius: 14px; font-size: 17px; }
.btn--block { width: 100%; min-height: 52px; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn, .btn:hover { transition: none; transform: none; }
}

/* ---------- шапка ---------- */
.site-header {
  position: sticky; top: 0; z-index: 20;
  background: rgba(7, 11, 22, .92);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.site-header__in { position: relative; max-width: 1200px; margin: 0 auto; padding: 14px var(--gutter); display: flex; align-items: center; gap: 12px; }
.brand { display: flex; flex: none; align-items: center; gap: 12px; margin-right: auto; color: var(--text); text-decoration: none; }
.brand:hover { color: var(--text); }
.brand img { width: 40px; height: 40px; flex: none; }
.brand span { font-family: var(--f-logo); font-size: 22px; font-weight: 700; letter-spacing: .08em; white-space: nowrap; }
.site-nav { display: flex; align-items: center; gap: 28px; margin-right: 16px; font-size: 15px; font-weight: 500; }
.site-nav a { color: var(--muted); text-decoration: none; }
.site-nav a:hover { color: #fff; }
.header-cab { min-height: 44px; padding: 0 18px; background: transparent; }
.burger {
  display: none; flex: none; width: 44px; height: 44px; padding: 0;
  align-items: center; justify-content: center;
  border-radius: 12px; border: 1px solid var(--field-border); background: transparent; color: var(--text); cursor: pointer;
}
.burger .i-close { display: none; }
.burger[aria-expanded="true"] .i-open { display: none; }
.burger[aria-expanded="true"] .i-close { display: block; }

@media (max-width: 860px) {
  .burger { display: inline-flex; }
  .site-nav {
    display: none; position: absolute; top: 100%; left: 0; right: 0; margin: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    padding: 4px var(--gutter) 12px; background: var(--bg); border-bottom: 1px solid var(--line);
  }
  .site-nav.is-open { display: flex; }
  .site-nav a { padding: 14px 2px; font-size: 17px; border-bottom: 1px solid var(--line); }
  .site-nav a:last-child { border-bottom: 0; }
}
@media (max-width: 640px) {
  .header-cab { width: 44px; padding: 0; }
  .header-cab .label { display: none; }
}
@media (max-width: 420px) {
  .brand { gap: 10px; }
  .brand img { width: 32px; height: 32px; }
  .brand span { font-size: 17px; }
}
@media (max-width: 350px) {
  .brand span { font-size: 15px; letter-spacing: .05em; }
}

/* ---------- подвал ---------- */
.site-footer { border-top: 1px solid var(--line); }
.site-footer__in { max-width: 1200px; margin: 0 auto; padding: 40px var(--gutter); display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 24px; }
.footer-brand { display: flex; align-items: center; gap: 14px; }
.footer-brand img { width: 56px; height: 56px; border-radius: 50%; }
.footer-brand div { display: flex; flex-direction: column; gap: 4px; }
.footer-brand b { font-family: var(--f-logo); font-size: 18px; font-weight: 700; letter-spacing: .08em; }
.footer-brand small { font-size: 14px; color: var(--muted); }
.footer-nav { display: flex; flex-wrap: wrap; gap: 4px 24px; font-size: 15px; }
.footer-nav a { padding: 8px 0; }

/* ---------- хиро ---------- */
.hero { display: flex; flex-wrap: wrap; align-items: center; gap: 48px; padding-top: 96px; padding-bottom: 80px; }
.hero__text { flex: 999 1 520px; min-width: 0; display: flex; flex-direction: column; gap: 28px; }
.pill { align-self: flex-start; display: inline-flex; align-items: center; gap: 10px; padding: 8px 14px; border-radius: 999px; background: var(--card); border: 1px solid var(--card-border); font-size: 14px; color: var(--muted); }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--green); }
.hero h1 { margin: 0; font-family: var(--f-head); font-weight: 700; font-size: clamp(32px, 5vw, 60px); line-height: 1.1; }
.hero h1 em { font-style: normal; color: var(--accent); }
.hero__sub { margin: 0; font-size: clamp(17px, 2.2vw, 20px); line-height: 1.55; color: var(--muted); max-width: 520px; }
.actions { display: flex; flex-wrap: wrap; gap: 14px; }
.tags { display: flex; flex-wrap: wrap; gap: 10px; margin: 0; padding: 0; list-style: none; font-size: 14px; color: var(--muted); }
.tags li { padding: 6px 12px; border-radius: 8px; background: var(--card); }

.hero__art { --art: clamp(300px, 34vw, 400px); flex: 1 1 360px; position: relative; display: flex; justify-content: center; align-items: center; min-height: calc(var(--art) + 20px); }
.hero__glow, .hero__ring { position: absolute; border-radius: 50%; }
.hero__glow { width: calc(var(--art) * .95); height: calc(var(--art) * .95); background: radial-gradient(circle, rgba(255, 201, 60, .28) 0%, rgba(90, 169, 240, .12) 45%, transparent 70%); }
.hero__ring { width: var(--art); height: var(--art); border: 2px dashed var(--card-border); }
.hero__art picture { position: relative; display: block; width: calc(var(--art) * .75); }
.hero__art img { display: block; width: 100%; }
@keyframes rf-float { 0%, 100% { transform: translateY(0) rotate(-3deg); } 50% { transform: translateY(-14px) rotate(3deg); } }
.rf-float { animation: rf-float 5s ease-in-out infinite; }
@media (prefers-reduced-motion: reduce) { .rf-float { animation: none; } }

@media (max-width: 720px) {
  .hero { padding-top: 48px; padding-bottom: 40px; gap: 24px; }
  .hero__text { gap: 22px; }
  .hero__art { --art: min(280px, 76vw); flex-basis: 100%; }
  .actions .btn { flex: 1 1 100%; }
}

/* ---------- табло ---------- */
.board { background: var(--bg-2); border: 1px solid var(--line); border-radius: 20px; overflow: hidden; }
.board__head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 12px; padding: 20px 28px; border-bottom: 1px solid var(--line); }
.board__head h2 { margin: 0; font-family: var(--f-mono); font-size: 22px; letter-spacing: .08em; color: var(--accent); }
.board__head span { font-family: var(--f-mono); font-size: 15px; color: var(--muted); }
.board table { width: 100%; border-collapse: collapse; font-family: var(--f-mono); font-size: 17px; }
.board th { padding: 14px 28px; color: var(--muted); font-size: 13px; font-weight: 500; text-align: left; }
.board td { padding: 18px 28px; border-top: 1px solid var(--line); vertical-align: top; }
.board .c-flight { color: var(--accent); white-space: nowrap; }
.board .c-status { text-align: right; font-weight: 700; white-space: nowrap; }
@media (max-width: 720px) {
  .board__head { padding: 16px 18px; }
  .board__head h2 { font-size: 18px; }
  .board table { font-size: 14px; }
  .board th, .board td { padding: 12px 8px; }
  .board th:first-child, .board td:first-child { padding-left: 18px; }
  .board th:last-child, .board td:last-child { padding-right: 18px; }
}

/* ---------- тарифы-талоны ---------- */
.tickets { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 500px), 1fr)); gap: 28px; }
.ticket { container: ticket / inline-size; position: relative; background: var(--card); border: 1px solid var(--card-border); border-radius: 20px; }
.ticket--best { border: 2px solid var(--accent); }
.ticket__in { display: flex; flex-wrap: wrap; }
.ticket__badge { position: absolute; z-index: 1; top: -15px; left: 28px; padding: 5px 12px; border-radius: 8px; background: var(--accent); color: var(--on-accent); font-size: 13px; font-weight: 700; letter-spacing: .04em; }
.ticket__main { container: tmain / inline-size; flex: 1 1 260px; min-width: 0; padding: 32px; display: flex; flex-direction: column; gap: 22px; }
.ticket__top { display: flex; justify-content: space-between; align-items: center; gap: 12px; font-size: 13px; color: var(--muted); letter-spacing: .12em; }
.ticket__route { display: flex; align-items: center; gap: 14px; font-family: var(--f-head); font-size: clamp(15px, 7cqi, 22px); font-weight: 500; white-space: nowrap; }
.ticket__route b { font-weight: 500; color: var(--accent); }
.ticket__route svg { flex: none; }
.ticket__meta { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin: 0; font-size: 13px; color: var(--muted); }
.ticket__meta div { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.ticket__meta dt { margin: 0; }
.ticket__meta dd { margin: 0; font-family: var(--f-mono); font-size: 17px; font-weight: 500; color: var(--text); }
.barcode { height: 40px; opacity: .5; border-radius: 4px; background: repeating-linear-gradient(90deg, #EEF1F8 0 2px, transparent 2px 4px, #EEF1F8 4px 7px, transparent 7px 9px, #EEF1F8 9px 10px, transparent 10px 13px); }
.ticket__stub { flex: 0 0 220px; position: relative; padding: 32px 28px; display: flex; flex-direction: column; justify-content: space-between; gap: 20px; border-left: 2px dashed var(--field-border); }
.ticket__stub::before, .ticket__stub::after { content: ""; position: absolute; left: -13px; width: 24px; height: 24px; border-radius: 50%; background: var(--bg); }
.ticket__stub::before { top: -13px; }
.ticket__stub::after { bottom: -13px; }
.price-box { display: flex; flex-direction: column; gap: 6px; }
.price-box small { font-size: 14px; color: var(--muted); }
.price { font-family: var(--f-head); font-weight: 700; font-size: 44px; line-height: 1; white-space: nowrap; }
.ticket--best .price { color: var(--accent); }

@container tmain (max-width: 300px) {
  .ticket__route { gap: 10px; }
  .ticket__route svg { width: 30px; }
  .ticket__meta dd { font-size: 15px; }
}
/* корешок уходит вниз, когда талон уже 480px (а не по ширине экрана) */
@container ticket (max-width: 481px) {
  .ticket__main { padding: 28px 20px 24px; }
  .ticket__stub { flex: 1 1 100%; padding: 24px 20px; border-left: 0; border-top: 2px dashed var(--field-border); flex-direction: row; flex-wrap: wrap; align-items: flex-end; }
  .ticket__stub .btn { flex: 1 1 140px; }
  .ticket__stub::before, .ticket__stub::after { top: -13px; bottom: auto; }
  .ticket__stub::before { left: -14px; }
  .ticket__stub::after { left: auto; right: -14px; }
  .price { font-size: 38px; }
}

/* ---------- шаги, «что храним», FAQ ---------- */
.grid { display: grid; gap: 24px; }
.grid--steps { grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); }
.grid--two { grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr)); }
.step, .store { padding: 32px; display: flex; flex-direction: column; gap: 16px; }
.step__n { font-family: var(--f-mono); font-weight: 700; font-size: 36px; color: var(--accent); }
.step h3, .store h3 { margin: 0; font-size: 21px; }
.step p { margin: 0; color: var(--muted); line-height: 1.55; }
.store { gap: 18px; }
.store__head { display: flex; align-items: center; gap: 12px; }
.store__icon { display: inline-flex; flex: none; width: 40px; height: 40px; border-radius: 12px; align-items: center; justify-content: center; }
.store__icon--no { background: rgba(255, 138, 101, .14); }
.store__icon--ok { background: rgba(90, 169, 240, .14); }
.store ul { margin: 0; padding: 0 0 0 20px; display: flex; flex-direction: column; gap: 10px; color: var(--soft); line-height: 1.5; }
.note { margin: 0; font-size: 14px; color: var(--muted); }
@media (max-width: 720px) {
  .grid { gap: 16px; }
  .step, .store { padding: 24px 20px; }
  .step { gap: 10px; }
  .step__n { font-size: 30px; }
}

.faq { display: flex; flex-direction: column; gap: 14px; }
.faq details { background: var(--card); border: 1px solid var(--card-border); border-radius: 16px; padding: 22px 26px; }
.faq summary { display: flex; justify-content: space-between; align-items: center; gap: 16px; cursor: pointer; list-style: none; font-size: 18px; font-weight: 600; }
.faq summary::-webkit-details-marker { display: none; }
.faq .plus { flex: none; font-size: 28px; line-height: 1; color: var(--accent); transition: transform .2s ease; }
.faq details[open] .plus { transform: rotate(45deg); }
.faq details p { margin: 16px 0 0; color: var(--muted); line-height: 1.6; }
@media (max-width: 720px) {
  .faq details { padding: 18px 20px; }
  .faq summary { font-size: 17px; }
}

/* ---------- юридические страницы ---------- */
.doc { max-width: 820px; margin: 0 auto; padding: 56px var(--gutter) 96px; }
.doc h1 { margin: 0 0 12px; font-family: var(--f-head); font-weight: 700; font-size: clamp(28px, 5vw, 40px); line-height: 1.15; }
.doc .updated { margin: 0 0 40px; color: var(--muted); font-size: 15px; }
.doc h2 { margin: 40px 0 14px; font-family: var(--f-head); font-weight: 500; font-size: clamp(19px, 3vw, 22px); line-height: 1.3; }
.doc p, .doc li { color: var(--soft); font-size: 16px; line-height: 1.65; }
.doc p { margin: 0 0 12px; }
.doc ul, .doc ol { margin: 0 0 12px; padding-left: 22px; display: flex; flex-direction: column; gap: 6px; }
.doc strong { color: var(--text); }
.doc .box { margin: 16px 0; padding: 20px 22px; background: var(--card); border: 1px solid var(--card-border); border-radius: 16px; }
.doc .box p:last-child, .doc .box ul:last-child { margin-bottom: 0; }
.doc table { width: 100%; border-collapse: collapse; margin: 8px 0 16px; font-size: 15px; }
.doc th, .doc td { padding: 12px 10px; border-bottom: 1px solid var(--line); text-align: left; color: var(--soft); vertical-align: top; }
.doc th { color: var(--muted); font-weight: 500; font-size: 13px; }
.back { display: inline-flex; align-items: center; gap: 8px; margin-bottom: 28px; color: var(--muted); text-decoration: none; font-size: 15px; }
.back:hover { color: var(--text); }

/* Заглушки, которые нужно заменить перед запуском. Найти: grep -rn 'class="todo"' */
.todo { background: rgba(255, 201, 60, .18); color: var(--accent); border-radius: 4px; padding: 0 4px; font-style: normal; }

/* =========================================================
   Анимации. Всё выключается при prefers-reduced-motion.
   ========================================================= */

/* появление при скролле: класс js-anim ставит инлайн-скрипт в <head> */
.js-anim [data-reveal] { opacity: 0; translate: 0 28px; transition: opacity .7s ease, translate .7s cubic-bezier(.2, .7, .2, 1); transition-delay: calc(var(--i, 0) * 90ms); }
.js-anim [data-reveal].is-in { opacity: 1; translate: 0 0; }

/* зелёная точка «онлайн» */
.dot { animation: rf-pulse 2.2s ease-out infinite; }
@keyframes rf-pulse { 0% { box-shadow: 0 0 0 0 rgba(74, 222, 128, .55); } 80%, 100% { box-shadow: 0 0 0 9px rgba(74, 222, 128, 0); } }

/* самолётик на орбите вокруг смайлика */
.hero__ring { animation: rf-spin 90s linear infinite reverse; }
.hero__orbit { position: absolute; width: var(--art); height: var(--art); animation: rf-spin 14s linear infinite; pointer-events: none; }
.hero__plane { position: absolute; top: 0; left: 50%; width: 34px; height: 34px; margin: -17px 0 0 -17px; color: var(--accent); filter: drop-shadow(0 0 10px rgba(255, 201, 60, .55)); }
.hero__plane svg { display: block; width: 100%; height: 100%; transform: rotate(45deg); }
.hero__trail { position: absolute; top: -1px; right: 50%; width: 70px; height: 2px; margin-right: 12px; border-radius: 2px; background: linear-gradient(90deg, transparent, rgba(255, 201, 60, .7)); }
@keyframes rf-spin { to { transform: rotate(360deg); } }

/* смайлик: клик = ржака */
.hero__art img { cursor: pointer; -webkit-tap-highlight-color: transparent; }
.hero__art img.is-rofl { animation: rf-rofl .9s cubic-bezier(.3, 1.6, .5, 1); }
@keyframes rf-rofl { 0% { transform: scale(1) rotate(0); } 30% { transform: scale(1.12) rotate(-14deg); } 55% { transform: scale(.94) rotate(12deg); } 80% { transform: scale(1.04) rotate(-5deg); } 100% { transform: scale(1) rotate(0); } }
.rofl-pop { position: absolute; z-index: 2; left: 50%; top: 40%; font-family: var(--f-logo); font-size: 26px; font-weight: 700; letter-spacing: .08em; color: var(--accent); pointer-events: none; animation: rf-pop 1.1s ease-out forwards; text-shadow: 0 2px 0 #0A0E1A; }
@keyframes rf-pop { 0% { opacity: 0; transform: translate(-50%, 0) scale(.6); } 20% { opacity: 1; transform: translate(calc(-50% + var(--dx)), -30px) scale(1.1); } 100% { opacity: 0; transform: translate(calc(-50% + var(--dx) * 2), -120px) scale(1); } }

/* табло: часы с мигающим двоеточием и перелистывание букв */
.board__clock .colon { animation: rf-blink 1s steps(1) infinite; }
@keyframes rf-blink { 50% { opacity: 0; } }
.board td[data-flap] { white-space: pre-wrap; }
.board .is-flapping { color: var(--soft); }
.board tbody tr { transition: background .2s ease; }
.board tbody tr:hover { background: rgba(255, 201, 60, .04); }

/* талоны: подъём и скан штрихкода при наведении */
.ticket { transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease; }
.ticket:hover { transform: translateY(-4px); box-shadow: 0 22px 44px -24px rgba(255, 201, 60, .4); }
.ticket:not(.ticket--best):hover { border-color: var(--field-border); }
.barcode { position: relative; overflow: hidden; opacity: 1; background: repeating-linear-gradient(90deg, rgba(238, 241, 248, .5) 0 2px, transparent 2px 4px, rgba(238, 241, 248, .5) 4px 7px, transparent 7px 9px, rgba(238, 241, 248, .5) 9px 10px, transparent 10px 13px); }
.barcode::after { content: ""; position: absolute; top: -6px; bottom: -6px; left: -4px; width: 3px; background: var(--accent); box-shadow: 0 0 14px 3px rgba(255, 201, 60, .8); opacity: 0; }
.ticket:hover .barcode::after, .barcode.is-scan::after { animation: rf-scan 1.1s ease-in-out; }
@keyframes rf-scan { 0% { left: -4px; opacity: 1; } 90% { opacity: 1; } 100% { left: 100%; opacity: 0; } }

/* блик на главных кнопках */
.btn--shine { position: relative; overflow: hidden; isolation: isolate; }
.btn--shine::after { content: ""; position: absolute; z-index: -1; top: 0; bottom: 0; left: -60%; width: 40%; background: linear-gradient(100deg, transparent, rgba(255, 255, 255, .55), transparent); transform: skewX(-20deg); animation: rf-shine 4.5s ease-in-out infinite; }
@keyframes rf-shine { 0%, 65% { left: -60%; } 100% { left: 130%; } }

/* шаги: цифра подсвечивается при наведении */
.step { transition: border-color .25s ease, transform .25s ease; }
.step:hover { border-color: var(--field-border); transform: translateY(-3px); }
.step__n { transition: text-shadow .25s ease; }
.step:hover .step__n { text-shadow: 0 0 18px rgba(255, 201, 60, .55); }

/* FAQ: плавное раскрытие (Chrome 131+, в остальных просто открывается) */
:root { interpolate-size: allow-keywords; }
.faq details::details-content { block-size: 0; overflow: clip; transition: block-size .3s ease, content-visibility .3s allow-discrete; }
.faq details[open]::details-content { block-size: auto; }
.faq details { transition: border-color .2s ease; }
.faq details:hover, .faq details[open] { border-color: var(--field-border); }

@media (prefers-reduced-motion: reduce) {
  .js-anim [data-reveal] { opacity: 1; translate: none; transition: none; }
  .dot, .hero__ring, .hero__orbit, .board__clock .colon, .btn--shine::after, .rf-float { animation: none; }
  .hero__orbit { display: none; }
  .ticket, .ticket:hover, .step, .step:hover { transform: none; transition: none; }
  .ticket:hover .barcode::after, .barcode.is-scan::after, .hero__art img.is-rofl { animation: none; }
  .faq details::details-content { transition: none; }
}
