/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

/* ── Tokens ── */
:root {
  --bg:      #090909;
  --surf:    #131313;
  --surf2:   #1A1A1A;
  --surf3:   #222222;
  --border:  rgba(255,255,255,0.07);
  --border2: rgba(255,255,255,0.13);
  --text:    #FFFFFF;
  --text2:   rgba(255,255,255,0.55);
  --text3:   rgba(255,255,255,0.28);
  --accent:  #4CAF50;
  --orange:  #FF9800;
  --green:   #4CAF50;
  --red:     #F44336;
  --blue:    #2196F3;
  --r:       14px;
  --r-sm:    8px;
}

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, 'Inter', 'Segoe UI', sans-serif;
  font-size: 15px;
  line-height: 1.55;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
}

/* ── Nav ── */
nav {
  position: sticky;
  top: 0;
  z-index: 200;
  height: 58px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 28px;
  gap: 16px;
  background: rgba(14,14,14,0.88);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 9px;
  text-decoration: none;
  color: var(--text);
  flex-shrink: 0;
}
.nav-logo svg { width: 26px; height: 26px; }
.nav-logo-img { width: 32px; height: 32px; border-radius: 8px; object-fit: cover; }
.nav-wordmark {
  font-size: 17px;
  font-weight: 800;
  letter-spacing: -0.3px;
}

.nav-links {
  display: flex;
  list-style: none;
  gap: 2px;
}
.nav-links a {
  color: var(--text2);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  padding: 6px 13px;
  border-radius: var(--r-sm);
  transition: color .15s, background .15s;
}
.nav-links a:hover  { color: var(--text); background: var(--surf2); }
.nav-links a.active { color: var(--text); }

.nav-right {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}
.nav-badge {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 6px 13px;
  background: var(--surf2);
  border: 1px solid var(--border2);
  border-radius: var(--r-sm);
  color: var(--text);
  text-decoration: none;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
  transition: background .15s;
}
.nav-badge:hover { background: var(--surf3); }
.nav-badge svg { flex-shrink: 0; }
.nav-badge .nb-sub { display: block; font-size: 9px; font-weight: 400; color: var(--text2); line-height: 1; }
.nav-badge .nb-main { display: block; font-size: 12px; font-weight: 700; line-height: 1.2; }

@media (max-width: 680px) {
  nav { padding: 0 16px; }
  .nav-links { display: none; }
  .nav-badge .nb-sub { display: none; }
}
@media (max-width: 420px) {
  .nav-badge:last-child { display: none; }
}

/* ── Hero ── */
.hero {
  padding: 64px 24px 48px;
  text-align: center;
  background: radial-gradient(ellipse 80% 40% at 50% 0%, rgba(76,175,80,.08) 0%, transparent 70%);
  flex-shrink: 0;
  position: relative;
  z-index: 1;
}
.hero-logo {
  width: 80px; height: 80px;
  border-radius: 22px;
  object-fit: cover;
  margin-bottom: 20px;
  display: block;
  margin-left: auto;
  margin-right: auto;
}
.hero-brand {
  font-size: clamp(42px, 8vw, 68px);
  font-weight: 800;
  letter-spacing: -2px;
  line-height: 1;
  margin-bottom: 12px;
}
.hero-tagline {
  font-size: 17px;
  color: var(--text2);
  margin: 0 auto 40px;
  line-height: 1.5;
}

/* ── Search bar ── */
.search-form {
  display: flex;
  max-width: 540px;
  margin: 0 auto;
  background: var(--surf);
  border: 1.5px solid var(--border2);
  border-radius: 16px;
  overflow: hidden;
  transition: border-color .2s;
}
.search-form:focus-within { border-color: var(--accent); }

.search-form input {
  flex: 1;
  background: none;
  border: none;
  outline: none;
  color: var(--text);
  font-size: 17px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  padding: 17px 20px;
  min-width: 0;
}
.search-form input::placeholder {
  color: var(--text3);
  font-weight: 400;
  font-size: 15px;
  letter-spacing: 0;
  text-transform: none;
}
.search-form button {
  flex-shrink: 0;
  background: var(--accent);
  border: none;
  color: #000;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: .5px;
  padding: 0 26px;
  cursor: pointer;
  transition: opacity .15s;
  white-space: nowrap;
}
.search-form button:hover { opacity: .85; }

/* ── Results wrapper ── */
#results-area {
  max-width: 900px;
  width: 100%;
  margin: 0 auto;
  padding: 0 20px 72px;
  flex: 1;
}

/* ── States ── */
.state { padding: 64px 0; text-align: center; }
.hidden { display: none !important; }

.spinner {
  width: 34px; height: 34px;
  border: 3px solid var(--border2);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin .75s linear infinite;
  margin: 0 auto 16px;
}
@keyframes spin { to { transform: rotate(360deg); } }
.state p { color: var(--text2); font-size: 15px; }

.err-icon {
  width: 48px; height: 48px;
  border-radius: 50%;
  background: rgba(244,67,54,.12);
  color: var(--red);
  display: flex; align-items: center; justify-content: center;
  font-size: 20px; font-weight: 700;
  margin: 0 auto 14px;
}

/* ── Flight card ── */
.flight-card {
  background: var(--surf);
  border: 1px solid var(--border);
  border-radius: var(--r);
  overflow: hidden;
  margin-bottom: 10px;
}

.card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 22px;
  border-bottom: 1px solid var(--border);
  gap: 12px;
}
.airline-row {
  display: flex;
  align-items: center;
  gap: 12px;
}
.airline-logo {
  width: 38px; height: 38px;
  border-radius: 9px;
  background: var(--surf2);
  object-fit: contain;
  padding: 4px;
}
.airline-name { font-size: 15px; font-weight: 600; }
.airline-num  { font-size: 12px; color: var(--text2); margin-top: 1px; }

/* chips */
.chip {
  font-size: 11px; font-weight: 800;
  letter-spacing: .4px;
  padding: 5px 13px;
  border-radius: 20px;
  white-space: nowrap;
}
.chip-live   { background: rgba(76,175,80,.14);  color: #4CAF50; }
.chip-sched  { background: rgba(255,152,0,.14);  color: #FF9800; }
.chip-landed { background: rgba(33,150,243,.14); color: #2196F3; }
.chip-cancel { background: rgba(244,67,54,.14);  color: #F44336; }
.chip-def    { background: rgba(255,255,255,.08); color: var(--text2); }

/* route */
.route-row {
  display: flex;
  align-items: center;
  padding: 22px 22px 18px;
  gap: 8px;
}
.rp { flex: 1; }
.rp-right { text-align: right; }
.rp-iata  { font-size: 34px; font-weight: 800; letter-spacing: -1.5px; line-height: 1; }
.rp-city  { font-size: 12px; color: var(--text2); margin-top: 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 160px; }
.rt-time  { font-size: 19px; font-weight: 700; margin-top: 10px; }
.rt-sched { font-size: 11px; color: var(--text3); margin-top: 2px; }
.rp-lbl   { font-size: 10px; color: var(--text3); text-transform: uppercase; letter-spacing: .6px; margin-top: 4px; }

.route-mid {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 0 10px;
  flex-shrink: 0;
}
.route-line {
  width: 80px;
  border-top: 1.5px dashed;
  opacity: .55;
}
.delay-pill {
  font-size: 10px; font-weight: 700;
  color: var(--orange);
  background: rgba(255,152,0,.12);
  border: 1px solid rgba(255,152,0,.2);
  padding: 2px 8px;
  border-radius: 20px;
  white-space: nowrap;
}

/* progress bar */
.prog-wrap { padding: 4px 22px 18px; }
.prog-bar { height: 3px; background: var(--surf2); border-radius: 3px; overflow: hidden; margin-bottom: 6px; }
.prog-fill { height: 100%; border-radius: 3px; transition: width .5s; }
.prog-labels { display: flex; justify-content: space-between; font-size: 11px; color: var(--text3); }

/* info grid */
.info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  border-top: 1px solid var(--border);
  gap: 0;
}
.info-cell {
  padding: 13px 18px;
  border-right: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.info-cell:nth-child(3n) { border-right: none; }
.info-lbl { font-size: 10px; color: var(--text3); text-transform: uppercase; letter-spacing: .6px; margin-bottom: 4px; }
.info-val { font-size: 14px; font-weight: 600; }

/* ── Map ── */
.map-wrap {
  height: 65vh;
  min-height: 420px;
  border-radius: var(--r);
  overflow: hidden;
  border: 1px solid var(--border);
  margin-bottom: 10px;
  position: relative;
}
#map { width: 100%; height: 100%; }

/* Map markers */
.apt-marker { display: flex; flex-direction: column; align-items: center; gap: 4px; pointer-events: none; }
.apt-dot { width: 9px; height: 9px; background: #fff; border-radius: 50%; border: 2px solid rgba(0,0,0,.6); }
.apt-code { font-size: 10px; font-weight: 800; color: #fff; text-shadow: 0 1px 4px rgba(0,0,0,.9); letter-spacing: .5px; }

.plane-marker { position: relative; width: 14px; height: 14px; pointer-events: none; }
.plane-ring { position: absolute; inset: -4px; border-radius: 50%; opacity: .25; animation: ppulse 2s ease-out infinite; }
.plane-dot  { position: absolute; inset: 0; border-radius: 50%; }
@keyframes ppulse { 0%,100% { transform: scale(1); opacity: .25; } 50% { transform: scale(2); opacity: 0; } }

/* ── App CTA ── */
.app-cta {
  background: var(--surf);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 32px 28px;
  text-align: center;
}
.app-cta h3 { font-size: 18px; font-weight: 700; margin-bottom: 6px; }
.app-cta p  { font-size: 14px; color: var(--text2); margin-bottom: 24px; max-width: 400px; margin-left: auto; margin-right: auto; }

.store-badges { display: flex; justify-content: center; gap: 12px; flex-wrap: wrap; }
.store-badge {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 20px;
  background: var(--surf2);
  border: 1px solid var(--border2);
  border-radius: 12px;
  color: var(--text);
  text-decoration: none;
  transition: background .15s, border-color .15s;
  min-width: 150px;
}
.store-badge:hover { background: var(--surf3); border-color: var(--border2); }
.store-badge svg { flex-shrink: 0; }
.sb-text .sb-sub  { display: block; font-size: 9px; color: var(--text2); line-height: 1; margin-bottom: 2px; text-transform: uppercase; letter-spacing: .5px; }
.sb-text .sb-main { display: block; font-size: 14px; font-weight: 700; line-height: 1.2; }

/* ── Page layout (about / support / privacy) ── */
.page-wrap {
  max-width: 740px;
  margin: 0 auto;
  padding: 52px 24px 80px;
  flex: 1;
}
.page-title { font-size: 34px; font-weight: 800; letter-spacing: -1px; margin-bottom: 6px; }
.page-sub   { font-size: 16px; color: var(--text2); margin-bottom: 48px; }

.prose-section { margin-bottom: 44px; }
.prose-section h2 { font-size: 19px; font-weight: 700; margin-bottom: 14px; color: var(--text); }
.prose-section p  { color: var(--text2); line-height: 1.75; margin-bottom: 12px; font-size: 15px; }
.prose-section p:last-child { margin-bottom: 0; }
.prose-section a  { color: var(--accent); text-decoration: none; }
.prose-section a:hover { text-decoration: underline; }
.prose-section ul { list-style: none; padding: 0; display: flex; flex-direction: column; gap: 8px; margin-top: 4px; }
.prose-section li { display: flex; gap: 10px; color: var(--text2); font-size: 14px; line-height: 1.6; }
.prose-section li::before { content: '—'; color: var(--text3); flex-shrink: 0; }

/* About features grid */
.feature-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 16px;
}
.feat-card {
  background: var(--surf);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  padding: 14px 16px;
  font-size: 14px;
  color: var(--text2);
  display: flex;
  gap: 10px;
  align-items: flex-start;
}
.feat-dot {
  width: 6px; height: 6px;
  background: var(--accent);
  border-radius: 50%;
  margin-top: 5px;
  flex-shrink: 0;
}
@media (max-width: 480px) { .feature-grid { grid-template-columns: 1fr; } }

.no-bs-row {
  display: flex;
  gap: 10px;
  margin-top: 16px;
  flex-wrap: wrap;
}
.no-bs-item {
  flex: 1;
  min-width: 140px;
  background: var(--surf);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  padding: 16px;
  text-align: center;
}
.no-bs-item strong { display: block; font-size: 13px; font-weight: 700; margin-bottom: 4px; }
.no-bs-item span   { font-size: 12px; color: var(--text2); }

/* Divider */
.divider {
  height: 1px;
  background: var(--border);
  margin: 40px 0;
}

/* Support / FAQ */
.faq-item { padding: 20px 0; border-bottom: 1px solid var(--border); }
.faq-q { font-size: 15px; font-weight: 600; margin-bottom: 8px; }
.faq-a { font-size: 14px; color: var(--text2); line-height: 1.75; }
.faq-a a { color: var(--accent); text-decoration: none; }

.contact-card {
  display: flex;
  align-items: center;
  gap: 16px;
  background: var(--surf);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 22px;
  text-decoration: none;
  color: var(--text);
  margin-top: 32px;
  transition: border-color .15s;
}
.contact-card:hover { border-color: rgba(76,175,80,.4); }
.cc-icon { font-size: 26px; flex-shrink: 0; }
.cc-title { font-size: 15px; font-weight: 600; }
.cc-sub   { font-size: 13px; color: var(--text2); margin-top: 2px; }

/* ── Footer ── */
footer {
  border-top: 1px solid var(--border);
  padding: 24px 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  flex-shrink: 0;
}
.footer-left { font-size: 13px; color: var(--text3); }
.footer-support { font-size: 13px; color: var(--accent); text-decoration: none; font-weight: 500; transition: opacity .15s; }
.footer-support:hover { opacity: .75; }
.footer-links { display: flex; gap: 20px; flex-wrap: wrap; }
.footer-links a { font-size: 13px; color: var(--text2); text-decoration: none; transition: color .15s; }
.footer-links a:hover { color: var(--text); }

@media (max-width: 480px) { footer { flex-direction: column; align-items: flex-start; } }

/* ── Hero collapsed (results active) ── */
.hero-support-hint {
  margin-top: 16px;
  font-size: 13px;
  color: var(--text3);
}
.hero-support-hint a { color: var(--accent); text-decoration: none; font-weight: 500; }
.hero-support-hint a:hover { opacity: .75; }

.hero--collapsed { padding: 14px 24px; background: none; }
.hero--collapsed .hero-logo,
.hero--collapsed .hero-brand,
.hero--collapsed .hero-tagline,
.hero--collapsed .hero-support-hint { display: none; }
.hero--collapsed .search-form { max-width: 100%; }

/* ── Utility ── */
.mt-32 { margin-top: 32px; }
