:root {
  --bg: #f7f9fc;
  --surface: #ffffff;
  --surface-soft: #edf4ff;
  --text: #0d1830;
  --muted: #647089;
  --line: #dce4f0;
  --primary: #0b5bd3;
  --primary-2: #17b9ef;
  --dark: #07162d;
  --success: #127a4c;
  --warning: #9c5a06;
  --danger: #ae2f38;
  --shadow: 0 22px 70px rgba(8, 33, 75, 0.12);
  --radius: 24px;
  --container: 1180px;
}

[data-theme="dark"] {
  --bg: #07101f;
  --surface: #0e1a2e;
  --surface-soft: #142640;
  --text: #f2f6ff;
  --muted: #a9b5ca;
  --line: #263956;
  --dark: #020812;
  --shadow: 0 22px 70px rgba(0,0,0,.3);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
body.nav-open { overflow: hidden; }
a { color: inherit; }
button, input, select { font: inherit; }
button { cursor: pointer; }
img { max-width: 100%; }
.container { width: min(calc(100% - 32px), var(--container)); margin-inline: auto; }
.hidden { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }
.skip-link { position: fixed; left: 16px; top: -100px; z-index: 1000; background: var(--surface); padding: 10px 14px; border-radius: 10px; }
.skip-link:focus { top: 16px; }

.site-header { position: sticky; top: 0; z-index: 100; background: color-mix(in srgb, var(--surface) 92%, transparent); backdrop-filter: blur(16px); border-bottom: 1px solid var(--line); }
.nav-wrap { min-height: 78px; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.brand { display: inline-flex; align-items: center; gap: 11px; text-decoration: none; }
.brand span { display: flex; gap: 7px; font-size: 1.25rem; letter-spacing: -.03em; }
.brand b { font-weight: 760; }
.site-nav { display: flex; align-items: center; gap: 25px; }
.site-nav a, .site-nav button { border: 0; background: none; text-decoration: none; color: var(--muted); font-weight: 700; }
.site-nav a:hover, .site-nav button:hover { color: var(--primary); }
.nav-button { padding: 10px 15px !important; border: 1px solid var(--line) !important; border-radius: 12px !important; color: var(--text) !important; }
.icon-button { width: 42px; height: 42px; border-radius: 50% !important; background: var(--surface-soft) !important; color: var(--text) !important; }
.menu-toggle { display: none; width: 44px; height: 44px; padding: 10px; border: 1px solid var(--line); background: var(--surface); border-radius: 12px; }
.menu-toggle span { display: block; height: 2px; background: var(--text); margin: 5px 0; transition: .2s ease; }

.hero { position: relative; overflow: hidden; padding: 76px 0 84px; background: radial-gradient(circle at 78% 16%, rgba(23,185,239,.2), transparent 28%), linear-gradient(145deg, #edf5ff 0%, var(--bg) 55%); }
[data-theme="dark"] .hero { background: radial-gradient(circle at 78% 16%, rgba(23,185,239,.14), transparent 28%), linear-gradient(145deg, #102441 0%, var(--bg) 55%); }
.hero::before { content: ""; position: absolute; width: 460px; height: 460px; border: 1px solid rgba(11,91,211,.12); border-radius: 50%; right: -160px; top: -200px; box-shadow: 0 0 0 80px rgba(11,91,211,.03), 0 0 0 160px rgba(11,91,211,.02); }
.hero-grid { position: relative; display: grid; grid-template-columns: 1.05fr .95fr; gap: 62px; align-items: center; }
.eyebrow { display: inline-block; color: var(--primary); font-size: .78rem; font-weight: 850; letter-spacing: .13em; text-transform: uppercase; }
.eyebrow.light { color: #7cd9ff; }
h1, h2, h3, p { margin-top: 0; }
h1 { font-size: clamp(2.75rem, 7vw, 5.4rem); line-height: .98; letter-spacing: -.065em; margin: 16px 0 24px; max-width: 770px; }
h2 { font-size: clamp(2rem, 4vw, 3.25rem); line-height: 1.05; letter-spacing: -.045em; margin: 10px 0 14px; }
h3 { letter-spacing: -.025em; }
.hero-copy > p { max-width: 650px; font-size: 1.12rem; color: var(--muted); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin: 30px 0; }
.button { display: inline-flex; justify-content: center; align-items: center; min-height: 52px; padding: 0 22px; border-radius: 14px; border: 1px solid transparent; text-decoration: none; font-weight: 800; transition: transform .2s ease, box-shadow .2s ease, background .2s ease; }
.button:hover { transform: translateY(-2px); }
.button.primary { color: white; background: linear-gradient(120deg, var(--primary), var(--primary-2)); box-shadow: 0 12px 28px rgba(11,91,211,.24); }
.button.secondary { color: var(--text); background: var(--surface); border-color: var(--line); }
.button.full { width: 100%; }
.button.compact { min-height: 44px; padding-inline: 16px; }
.trust-row { display: flex; flex-wrap: wrap; gap: 18px; color: var(--muted); font-size: .92rem; font-weight: 700; }
.search-card, .alert-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 28px; }
.card-heading { display: flex; justify-content: space-between; gap: 20px; align-items: flex-start; }
.card-heading h2 { font-size: 2rem; }
.plane-badge { display: grid; place-items: center; width: 52px; height: 52px; border-radius: 16px; background: var(--surface-soft); color: var(--primary); font-size: 1.4rem; }
.trip-toggle { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; background: var(--surface-soft); padding: 5px; border-radius: 12px; margin: 14px 0 20px; }
.trip-toggle button { border: 0; border-radius: 9px; background: transparent; color: var(--muted); padding: 9px; font-weight: 800; }
.trip-toggle button.active { background: var(--surface); color: var(--text); box-shadow: 0 3px 10px rgba(10,32,70,.08); }
label { display: grid; gap: 7px; font-weight: 750; }
label span small { color: var(--muted); font-weight: 600; }
input, select { width: 100%; min-height: 50px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); color: var(--text); padding: 0 14px; outline: none; }
input:focus, select:focus { border-color: var(--primary); box-shadow: 0 0 0 4px rgba(11,91,211,.1); }
.route-fields { display: grid; grid-template-columns: 1fr auto 1fr; align-items: end; gap: 10px; }
.swap-button { width: 42px; height: 42px; margin-bottom: 4px; border: 1px solid var(--line); border-radius: 50%; background: var(--surface-soft); color: var(--primary); font-weight: 900; }
.search-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin: 14px 0 18px; }
.form-note { color: var(--muted); font-size: .8rem; text-align: center; margin: 14px 0 0; }

.section { padding: 96px 0; }
.section-tint { background: var(--surface-soft); }
.section-dark { background: var(--dark); color: white; }
.section-heading { margin-bottom: 34px; }
.section-heading p { color: var(--muted); max-width: 700px; }
.section-heading.split { display: flex; align-items: end; justify-content: space-between; gap: 24px; }
.section-heading.centered { text-align: center; }
.section-heading.centered p { margin-inline: auto; }
.board-shell { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.board-tabs { display: grid; grid-template-columns: 1fr 1fr; padding: 8px; background: var(--surface-soft); }
.board-tabs button { min-height: 58px; border: 0; border-radius: 14px; background: transparent; color: var(--muted); font-weight: 850; font-size: 1.05rem; }
.board-tabs button.active { background: linear-gradient(120deg, var(--primary), var(--primary-2)); color: white; }
.board-controls { display: grid; grid-template-columns: 1fr 210px; gap: 12px; padding: 20px; border-bottom: 1px solid var(--line); }
.flight-list { display: grid; }
.flight-row { display: grid; grid-template-columns: 115px 1.2fr 1fr 1fr 120px; gap: 18px; align-items: center; padding: 20px 24px; border-bottom: 1px solid var(--line); }
.flight-row:last-child { border-bottom: 0; }
.flight-time strong { display: block; font-size: 1.28rem; }
.flight-time span, .flight-airline span, .flight-route span, .flight-meta span { color: var(--muted); font-size: .87rem; }
.flight-airline strong, .flight-route strong, .flight-meta strong { display: block; }
.status { justify-self: end; display: inline-flex; padding: 7px 10px; border-radius: 999px; font-size: .78rem; font-weight: 850; }
.status.on-time, .status.landed { color: var(--success); background: rgba(18,122,76,.11); }
.status.delayed { color: var(--danger); background: rgba(174,47,56,.11); }
.status.boarding { color: var(--warning); background: rgba(156,90,6,.12); }
.empty-state { padding: 48px 20px; text-align: center; color: var(--muted); }
.empty-state strong { display: block; color: var(--text); margin-bottom: 6px; }
.tool-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.tool-card { background: var(--surface); border: 1px solid var(--line); border-radius: 20px; padding: 24px; }
.tool-icon { display: grid; place-items: center; width: 50px; height: 50px; border-radius: 15px; background: var(--surface-soft); color: var(--primary); font-size: 1.3rem; font-weight: 900; }
.tool-card h3 { margin: 20px 0 8px; }
.tool-card p { color: var(--muted); }
.tool-card a, .tool-card button { border: 0; padding: 0; background: none; color: var(--primary); text-decoration: none; font-weight: 850; }
.alert-layout { display: grid; grid-template-columns: 1fr .8fr; gap: 70px; align-items: center; }
.alert-layout > div > p { color: var(--muted); font-size: 1.05rem; }
.check-list { list-style: none; padding: 0; display: grid; gap: 12px; }
.check-list li::before { content: "✓"; color: var(--primary); font-weight: 900; margin-right: 9px; }
.alert-card { display: grid; gap: 16px; }
.consent-row { grid-template-columns: auto 1fr; align-items: start; font-weight: 500; color: var(--muted); font-size: .88rem; }
.consent-row input { width: 18px; min-height: auto; margin-top: 3px; }
.success-message { padding: 12px; border-radius: 10px; background: rgba(18,122,76,.12); color: var(--success); font-weight: 750; }
.guide-grid { display: grid; grid-template-columns: .7fr 1.3fr; gap: 70px; }
.guide-grid > div:first-child p { color: #a9b5ca; }
.guide-list { display: grid; gap: 12px; }
details { border: 1px solid rgba(255,255,255,.14); border-radius: 16px; padding: 17px 20px; background: rgba(255,255,255,.04); }
summary { cursor: pointer; font-weight: 800; }
details p { color: #b7c3d7; margin: 12px 0 0; }

.site-footer { padding: 64px 0 24px; background: var(--surface); border-top: 1px solid var(--line); }
.footer-grid { display: grid; grid-template-columns: 1.4fr .7fr .7fr 1fr; gap: 45px; }
.footer-grid h3 { font-size: .95rem; }
.footer-grid p, .footer-grid a, .footer-grid button { color: var(--muted); }
.footer-grid a, .footer-grid button { display: block; border: 0; background: none; padding: 0; margin: 9px 0; text-decoration: none; }
.footer-brand { margin-bottom: 16px; }
.footer-bottom { display: flex; justify-content: space-between; gap: 20px; border-top: 1px solid var(--line); margin-top: 42px; padding-top: 22px; color: var(--muted); font-size: .9rem; }
.modal { border: 0; padding: 0; background: transparent; max-width: 520px; width: calc(100% - 30px); }
.modal::backdrop { background: rgba(0, 9, 24, .68); backdrop-filter: blur(4px); }
.modal-card { position: relative; background: var(--surface); color: var(--text); border-radius: 22px; padding: 30px; display: grid; gap: 15px; }
.modal-card h2 { font-size: 2rem; }
.modal-card p { color: var(--muted); }
.modal-close { position: absolute; right: 15px; top: 15px; width: 38px; height: 38px; border: 0; border-radius: 50%; background: var(--surface-soft); color: var(--text); font-size: 1.5rem; }
.tracker-result { border: 1px solid var(--line); border-radius: 14px; padding: 14px; }
.toast { position: fixed; left: 50%; bottom: 22px; transform: translate(-50%, 120px); z-index: 300; background: var(--dark); color: white; padding: 12px 18px; border-radius: 999px; box-shadow: var(--shadow); transition: .25s ease; }
.toast.show { transform: translate(-50%, 0); }

@media (max-width: 960px) {
  .menu-toggle { display: block; }
  .site-nav { position: fixed; inset: 78px 16px auto; display: none; flex-direction: column; align-items: stretch; padding: 20px; border: 1px solid var(--line); border-radius: 18px; background: var(--surface); box-shadow: var(--shadow); }
  .site-nav.open { display: flex; }
  .site-nav a, .site-nav button { text-align: left; padding: 11px 8px; }
  .icon-button { width: 100%; border-radius: 12px !important; }
  .hero-grid, .alert-layout, .guide-grid { grid-template-columns: 1fr; }
  .hero { padding-top: 58px; }
  .hero-copy { text-align: center; }
  .hero-copy > p { margin-inline: auto; }
  .hero-actions, .trust-row { justify-content: center; }
  .tool-grid { grid-template-columns: repeat(2, 1fr); }
  .flight-row { grid-template-columns: 90px 1fr 1fr 110px; }
  .flight-meta { display: none; }
  .footer-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 640px) {
  .container { width: min(calc(100% - 22px), var(--container)); }
  .nav-wrap { min-height: 70px; }
  .site-nav { inset-top: 70px; }
  .brand img { width: 38px; height: 45px; }
  .brand span { font-size: 1.08rem; }
  .hero { padding: 42px 0 58px; }
  h1 { font-size: clamp(2.55rem, 15vw, 4rem); }
  .hero-actions { display: grid; }
  .button { width: 100%; }
  .search-card, .alert-card { padding: 20px; border-radius: 20px; }
  .route-fields { grid-template-columns: 1fr; }
  .swap-button { margin: -2px auto; transform: rotate(90deg); }
  .search-grid { grid-template-columns: 1fr; }
  .section { padding: 70px 0; }
  .section-heading.split { align-items: stretch; flex-direction: column; }
  .section-heading.split .button { width: auto; align-self: flex-start; }
  .board-controls { grid-template-columns: 1fr; padding: 14px; }
  .flight-row { grid-template-columns: 68px 1fr auto; gap: 10px; padding: 17px 15px; }
  .flight-route { display: none; }
  .flight-time strong { font-size: 1.05rem; }
  .status { font-size: .7rem; padding: 6px 8px; }
  .tool-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: 26px; }
  .footer-bottom { flex-direction: column; }
  .modal-card { padding: 24px 19px; }
}
