/* ============================================================
   Captain Egghead — Light, Playful Theme
   ============================================================ */

:root {
  --bg:            #EFF6FF;
  --bg-card:       #FFFFFF;
  --bg-card-hover: #F5F9FF;
  --accent:        #F5A623;
  --accent-dark:   #D4891A;
  --accent-dim:    rgba(245, 166, 35, 0.12);
  --accent-border: rgba(245, 166, 35, 0.55);
  --navy:          #1A2B4A;
  --text:          #1A2B4A;
  --text-muted:    #6B7A99;
  --border:        rgba(26, 43, 74, 0.08);
  --border-strong: rgba(26, 43, 74, 0.14);
  --shadow-sm:     0 2px 8px rgba(26, 43, 74, 0.07);
  --shadow:        0 4px 16px rgba(26, 43, 74, 0.10);
  --shadow-lg:     0 8px 32px rgba(26, 43, 74, 0.13);
  --radius:        18px;
  --radius-sm:     12px;
  --radius-pill:   999px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  line-height: 1.6;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent-dark); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ── SPLASH ────────────────────────────────────────────────── */
#splash {
  position: fixed;
  inset: 0;
  background: var(--bg);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  gap: 12px;
  transition: opacity 0.5s ease;
}
#splash.hidden { opacity: 0; pointer-events: none; }
#splash .splash-logo {
  width: 130px;
  height: auto;
  animation: eggBounce 1s ease infinite;
}
#splash h1 {
  font-size: 2rem;
  font-weight: 900;
  color: var(--navy);
  letter-spacing: -0.5px;
}
#splash p { color: var(--text-muted); font-size: 1rem; }

@keyframes eggBounce {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(-10px); }
}

/* ── ONLINE / OFFLINE PILL ─────────────────────────────────── */
#online-pill {
  position: fixed;
  top: 12px;
  right: 12px;
  z-index: 100;
  font-size: 0.78rem;
  font-weight: 600;
  padding: 5px 12px;
  border-radius: var(--radius-pill);
  background: var(--bg-card);
  border: 1px solid var(--border-strong);
  box-shadow: var(--shadow-sm);
  pointer-events: none;
}
#online-pill.online  { color: #16A34A; }
#online-pill.offline { color: #D97706; }
/* Hide the green online pill when the A2HS banner is showing — they overlap.
   Still show the offline pill (more important). */
body:has(#a2hs-banner.show) #online-pill.online { opacity: 0; }

/* ── APP SHELL ─────────────────────────────────────────────── */
#app-root {
  max-width: 680px;
  margin: 0 auto;
  padding: 16px 16px 140px;
}

/* ── APP HEADER ────────────────────────────────────────────── */
.app-header {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 20px 0 4px;
  margin-bottom: 4px;
}
.app-header .logo-wrap {
  background: var(--navy);
  border-radius: 16px;
  padding: 8px;
  box-shadow: var(--shadow);
  flex-shrink: 0;
}
.app-header .logo-wrap img { width: 48px; height: auto; display: block; }
.app-header .header-text .title {
  font-size: 1.35rem;
  font-weight: 900;
  color: var(--navy);
  letter-spacing: -0.3px;
  line-height: 1.2;
}
.app-header .header-text .tagline {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-style: italic;
}

/* ── TABS ──────────────────────────────────────────────────── */
.tabs {
  display: flex;
  gap: 6px;
  margin: 16px 0;
  background: var(--bg-card);
  padding: 5px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}
.tab-btn {
  flex: 1;
  padding: 11px 8px;
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 0.9rem;
  font-weight: 700;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.2s;
  -webkit-tap-highlight-color: transparent;
}
.tab-btn.active {
  background: var(--accent);
  color: var(--navy);
  box-shadow: 0 2px 8px rgba(245,166,35,0.35);
}
.tab-btn:not(.active):hover {
  background: var(--bg-card-hover);
  color: var(--text);
}

/* ── PANELS ─────────────────────────────────────────────────── */
.panel { display: none; }
.panel.active { display: block; }

/* ── IATA INPUTS ────────────────────────────────────────────── */
.route-inputs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 14px;
}
.input-group { position: relative; }
.input-group label {
  display: block;
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-bottom: 6px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.iata-input {
  width: 100%;
  background: var(--bg-card);
  border: 2px solid var(--border-strong);
  color: var(--navy);
  font-size: 1.6rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  padding: 14px 16px;
  border-radius: var(--radius);
  text-transform: uppercase;
  transition: border-color 0.2s, box-shadow 0.2s;
  box-shadow: var(--shadow-sm);
  -webkit-appearance: none;
}
.iata-input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-dim), var(--shadow-sm);
}
.iata-input::placeholder {
  color: var(--border-strong);
  font-weight: 400;
  font-size: 1.1rem;
  letter-spacing: 0;
}

.airport-confirm {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-top: 6px;
  min-height: 1.2em;
  padding: 0 2px;
}
.airport-confirm.found     { color: #16A34A; font-weight: 600; }
.airport-confirm.not-found { color: #DC2626; }

/* Typeahead */
.typeahead-dropdown {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  background: var(--bg-card);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  z-index: 50;
  max-height: 230px;
  overflow-y: auto;
  box-shadow: var(--shadow-lg);
}
.typeahead-item {
  padding: 10px 14px;
  cursor: pointer;
  border-bottom: 1px solid var(--border);
  transition: background 0.12s;
}
.typeahead-item:last-child { border-bottom: none; }
.typeahead-item:hover, .typeahead-item.focused {
  background: var(--bg-card-hover);
}
.typeahead-iata  { font-weight: 900; color: var(--accent-dark); margin-right: 8px; }
.typeahead-name  { font-size: 0.88rem; color: var(--text); }
.typeahead-city  { font-size: 0.78rem; color: var(--text-muted); }

/* ── BUTTONS ─────────────────────────────────────────────────── */
.btn-primary {
  width: 100%;
  background: var(--accent);
  color: var(--navy);
  border: none;
  font-size: 1.1rem;
  font-weight: 900;
  padding: 17px;
  border-radius: var(--radius);
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(245,166,35,0.40);
  transition: filter 0.15s, transform 0.1s, box-shadow 0.15s;
  -webkit-tap-highlight-color: transparent;
  letter-spacing: 0.01em;
}
.btn-primary:hover {
  filter: brightness(1.06);
  box-shadow: 0 6px 20px rgba(245,166,35,0.50);
}
.btn-primary:active  { transform: scale(0.98); }
.btn-primary:disabled { opacity: 0.45; cursor: not-allowed; }

.btn-secondary {
  background: var(--bg-card);
  color: var(--text);
  border: 1.5px solid var(--border-strong);
  font-size: 0.9rem;
  font-weight: 700;
  padding: 9px 18px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
  box-shadow: var(--shadow-sm);
}
.btn-secondary:hover {
  background: var(--bg-card-hover);
  border-color: var(--accent);
}

/* ── SAVED ROUTE CHIPS ──────────────────────────────────────── */
.saved-routes-wrap { margin-top: 18px; }
.saved-routes-wrap h4 {
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 700;
}
.route-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.route-chip {
  background: var(--bg-card);
  border: 1.5px solid var(--border-strong);
  color: var(--navy);
  font-size: 0.88rem;
  font-weight: 800;
  padding: 7px 14px;
  border-radius: var(--radius-pill);
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: border-color 0.15s, box-shadow 0.15s;
}
.route-chip:hover { border-color: var(--accent); box-shadow: var(--shadow); }

/* ── SEARCH INPUT ───────────────────────────────────────────── */
.search-wrap { position: relative; margin-bottom: 16px; }
.search-input {
  width: 100%;
  background: var(--bg-card);
  border: 2px solid var(--border-strong);
  color: var(--navy);
  font-size: 1.05rem;
  padding: 16px 52px 16px 18px;
  border-radius: var(--radius);
  transition: border-color 0.2s, box-shadow 0.2s;
  box-shadow: var(--shadow-sm);
  -webkit-appearance: none;
}
.search-input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-dim), var(--shadow-sm);
}
.search-input::placeholder { color: var(--text-muted); }
.search-icon {
  position: absolute;
  right: 18px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.2rem;
  pointer-events: none;
}

/* ── FACTS HEADER ───────────────────────────────────────────── */
.facts-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  flex-wrap: wrap;
  gap: 8px;
}
.facts-header h2 { font-size: 1.05rem; font-weight: 800; color: var(--navy); }
.facts-header .back-btn {
  font-size: 0.88rem;
  color: var(--accent-dark);
  cursor: pointer;
  background: none;
  border: none;
  font-weight: 700;
  padding: 0;
}

/* ── FACT CARDS ─────────────────────────────────────────────── */
.facts-grid { display: flex; flex-direction: column; gap: 10px; margin-bottom: 16px; }

.fact-card {
  background: var(--bg-card);
  border: 2px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 18px 14px;
  cursor: pointer;
  transition: border-color 0.18s, box-shadow 0.18s, background 0.18s;
  position: relative;
  box-shadow: var(--shadow-sm);
  -webkit-tap-highlight-color: transparent;
}
.fact-card:hover {
  border-color: var(--border-strong);
  box-shadow: var(--shadow);
}
.fact-card.selected {
  border-color: var(--accent);
  background: var(--accent-dim);
  box-shadow: 0 0 0 4px var(--accent-dim), var(--shadow-sm);
}
.fact-text     { font-size: 1.0rem; line-height: 1.6; color: var(--text); }
.fact-location { font-size: 0.8rem; color: var(--text-muted); margin-top: 10px; font-weight: 600; }

.fact-actions { position: absolute; top: 12px; right: 12px; display: flex; gap: 4px; }
.star-btn {
  background: none;
  border: none;
  font-size: 1.15rem;
  cursor: pointer;
  opacity: 0.3;
  transition: opacity 0.18s, transform 0.15s;
  padding: 3px;
  -webkit-tap-highlight-color: transparent;
  line-height: 1;
}
.star-btn:hover     { opacity: 0.8; }
.star-btn.starred   { opacity: 1; }
.star-btn:active    { transform: scale(1.35); }

/* ── EMPTY STATES ───────────────────────────────────────────── */
.empty-state {
  text-align: center;
  padding: 48px 24px;
  color: var(--text-muted);
  font-size: 1rem;
  line-height: 1.7;
}
.empty-state .big-emoji { font-size: 3rem; margin-bottom: 12px; display: block; }
.empty-state img.mascot-empty {
  width: 100px;
  height: auto;
  margin: 0 auto 16px;
  display: block;
  opacity: 0.75;
}

/* ── ADD TO HOME SCREEN ─────────────────────────────────────── */
#a2hs-banner {
  background: var(--accent-dim);
  border: 1.5px solid var(--accent-border);
  border-radius: var(--radius);
  padding: 14px 16px;
  margin-bottom: 14px;
  font-size: 0.88rem;
  color: var(--navy);
  position: relative;
  display: none;
}
#a2hs-banner.show { display: block; }
#a2hs-close {
  position: absolute;
  top: 10px;
  right: 12px;
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 1.05rem;
}

/* ── STICKY SELECTION PANEL ─────────────────────────────────── */
#selection-panel {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--bg-card);
  border-top: 3px solid var(--accent);
  border-radius: 24px 24px 0 0;
  padding: 20px 20px 28px;
  z-index: 200;
  transform: translateY(100%);
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  max-height: 55vh;
  overflow-y: auto;
  box-shadow: 0 -8px 40px rgba(26, 43, 74, 0.15);
}
#selection-panel.visible { transform: translateY(0); }

.panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
}
.panel-header h3 { font-size: 0.95rem; font-weight: 800; color: var(--accent-dark); }
.panel-close {
  background: var(--bg);
  border: none;
  color: var(--text-muted);
  font-size: 1.1rem;
  cursor: pointer;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.selected-bullets { list-style: none; padding: 0; margin-bottom: 16px; }
.selected-bullets li {
  font-size: 0.97rem;
  line-height: 1.55;
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
  display: flex;
  gap: 10px;
  color: var(--text);
}
.selected-bullets li:last-child { border-bottom: none; }
.bullet-num {
  color: var(--accent-dark);
  font-weight: 900;
  font-size: 0.9rem;
  min-width: 20px;
  padding-top: 1px;
  flex-shrink: 0;
}

.panel-actions { display: flex; gap: 10px; }
.panel-actions .btn-primary  { padding: 13px; font-size: 0.95rem; }
.panel-actions .btn-secondary { flex-shrink: 0; padding: 13px 18px; }

/* ── FAVOURITES ─────────────────────────────────────────────── */
.fav-actions { margin-bottom: 14px; text-align: right; }
.clear-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 0.82rem;
  cursor: pointer;
  text-decoration: underline;
}
.clear-btn:hover { color: #DC2626; }


/* ============================================================
   LANDING PAGE
   ============================================================ */

.lp-nav {
  max-width: 980px;
  margin: 0 auto;
  padding: 20px 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.lp-nav-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 900;
  font-size: 1.1rem;
  color: var(--navy);
  text-decoration: none;
}
.lp-nav-brand .nav-logo-wrap {
  background: var(--navy);
  border-radius: 12px;
  padding: 5px 6px 3px;
}
.lp-nav-brand .nav-logo-wrap img { width: 28px; height: auto; display: block; }
.lp-nav-links { display: flex; gap: 18px; align-items: center; font-size: 0.9rem; }
.lp-nav-links a { color: var(--text-muted); font-weight: 600; }
.lp-nav-links a:hover { color: var(--text); text-decoration: none; }

/* Sections */
.lp-section {
  max-width: 980px;
  margin: 0 auto;
  padding: 72px 28px;
}
.lp-section.hero {
  padding-top: 56px;
  padding-bottom: 64px;
  text-align: center;
}

/* Hero mascot block */
.hero-mascot-wrap {
  width: 160px;
  height: 160px;
  background: var(--navy);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 28px;
  box-shadow: 0 12px 40px rgba(26, 43, 74, 0.2), 0 0 0 8px rgba(245,166,35,0.18);
}
.hero-mascot-wrap img { width: 110px; height: auto; }

.hero-headline {
  font-size: clamp(2.6rem, 6vw, 4.2rem);
  font-weight: 900;
  letter-spacing: -1.5px;
  line-height: 1.05;
  margin-bottom: 14px;
  color: var(--navy);
}
.hero-tagline {
  font-size: clamp(1.1rem, 3vw, 1.4rem);
  color: var(--accent-dark);
  font-weight: 700;
  margin-bottom: 16px;
  font-style: italic;
}
.hero-sub {
  font-size: 1.1rem;
  color: var(--text-muted);
  max-width: 480px;
  margin: 0 auto 32px;
}
.cta-btn {
  display: inline-block;
  background: var(--accent);
  color: var(--navy);
  font-size: 1.15rem;
  font-weight: 900;
  padding: 18px 44px;
  border-radius: var(--radius);
  cursor: pointer;
  border: none;
  box-shadow: 0 6px 24px rgba(245,166,35,0.45);
  transition: filter 0.18s, transform 0.1s, box-shadow 0.18s;
  text-decoration: none;
  letter-spacing: 0.01em;
}
.cta-btn:hover {
  filter: brightness(1.07);
  box-shadow: 0 8px 32px rgba(245,166,35,0.55);
  text-decoration: none;
}
.cta-btn:active { transform: scale(0.98); }

.cta-sub  { font-size: 0.85rem; color: var(--text-muted); margin-top: 10px; }
.cta-whis {
  margin-top: 20px;
  font-size: 0.88rem;
  color: var(--text-muted);
  font-style: italic;
}

.lp-divider {
  border: none;
  border-top: 1px solid var(--border);
  max-width: 980px;
  margin: 0 auto;
}

/* Section typography */
.section-label {
  font-size: 0.76rem;
  color: var(--accent-dark);
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 10px;
}
.section-heading {
  font-size: clamp(1.7rem, 4vw, 2.6rem);
  font-weight: 900;
  margin-bottom: 20px;
  line-height: 1.15;
  color: var(--navy);
  letter-spacing: -0.5px;
}
.section-body {
  font-size: 1.05rem;
  color: var(--text-muted);
  line-height: 1.75;
  max-width: 600px;
}
.section-body strong { color: var(--text); }
.section-body p + p { margin-top: 14px; }

/* How it works */
.how-steps { display: flex; flex-direction: column; gap: 24px; margin-top: 32px; }
.how-step  { display: flex; gap: 18px; align-items: flex-start; }
.how-step-icon {
  font-size: 2rem;
  flex-shrink: 0;
  width: 56px;
  height: 56px;
  background: var(--bg-card);
  border: 2px solid var(--border-strong);
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-sm);
}
.how-step-text h3 { font-size: 1.05rem; font-weight: 800; margin-bottom: 4px; color: var(--navy); }
.how-step-text p  { font-size: 0.95rem; color: var(--text-muted); line-height: 1.6; }

/* Demo facts */
.demo-facts  { margin-top: 28px; }
.demo-label  { font-size: 0.82rem; color: var(--text-muted); margin-bottom: 14px; font-weight: 600; }
.demo-card {
  background: var(--bg-card);
  border: 1.5px solid var(--border-strong);
  border-radius: var(--radius);
  padding: 18px 20px;
  margin-bottom: 10px;
  font-size: 0.98rem;
  line-height: 1.6;
  color: var(--text);
  box-shadow: var(--shadow-sm);
}
.demo-card-location { font-size: 0.8rem; color: var(--text-muted); margin-top: 8px; font-weight: 600; }

/* Mascot section divider */
.mascot-divider {
  text-align: center;
  margin: -20px 0;
  position: relative;
  z-index: 1;
}
.mascot-divider .inner {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  background: var(--bg);
  padding: 0 24px;
}
.mascot-divider img { width: 48px; height: auto; opacity: 0.7; }
.mascot-divider span { font-size: 0.8rem; color: var(--text-muted); font-style: italic; font-weight: 600; }

/* Offline section */
.offline-features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 14px;
  margin-top: 28px;
}
.offline-feature {
  background: var(--bg-card);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 18px;
  box-shadow: var(--shadow-sm);
}
.offline-feature .icon { font-size: 1.6rem; margin-bottom: 8px; }
.offline-feature h4 { font-size: 0.95rem; font-weight: 800; margin-bottom: 4px; color: var(--navy); }
.offline-feature p  { font-size: 0.85rem; color: var(--text-muted); line-height: 1.5; }

/* Pricing */
.pricing-wrap { display: flex; justify-content: center; }
.pricing-card {
  background: var(--bg-card);
  border: 2.5px solid var(--accent-border);
  border-radius: 24px;
  padding: 44px 52px;
  text-align: center;
  max-width: 440px;
  width: 100%;
  box-shadow: 0 12px 48px rgba(245,166,35,0.12), var(--shadow);
}
.pricing-card h3 { font-size: 1.5rem; font-weight: 900; margin-bottom: 4px; color: var(--navy); }
.pricing-card .mascot-price { width: 72px; height: auto; margin: 0 auto 16px; display: block; }
.pricing-card .price { font-size: 3.2rem; font-weight: 900; color: var(--accent-dark); line-height: 1; margin: 14px 0 4px; }
.pricing-card .price-sub { color: var(--text-muted); font-size: 0.88rem; margin-bottom: 26px; }
.pricing-features { list-style: none; text-align: left; margin-bottom: 28px; }
.pricing-features li { padding: 8px 0; border-bottom: 1px solid var(--border); font-size: 0.96rem; color: var(--text); }
.pricing-features li:last-child { border-bottom: none; }
.pricing-whisper { margin-top: 14px; font-size: 0.83rem; color: var(--text-muted); font-style: italic; }

/* Reviews */
.reviews-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
  margin-top: 28px;
}
.review-card {
  background: var(--bg-card);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  box-shadow: var(--shadow-sm);
}
.review-stars  { color: var(--accent); margin-bottom: 10px; font-size: 1rem; }
.review-text   { font-size: 0.95rem; line-height: 1.65; margin-bottom: 12px; color: var(--text-muted); font-style: italic; }
.review-author { font-size: 0.88rem; font-weight: 800; color: var(--navy); }
.review-airline { font-size: 0.8rem; color: var(--text-muted); }

/* Footer */
.lp-footer-wrap {
  background: var(--navy);
  margin-top: 0;
}
.lp-footer {
  max-width: 980px;
  margin: 0 auto;
  padding: 36px 28px;
  text-align: center;
  color: rgba(255,255,255,0.5);
  font-size: 0.88rem;
  line-height: 1.7;
}
.lp-footer .footer-logo {
  width: 48px;
  height: auto;
  margin: 0 auto 12px;
  display: block;
  opacity: 0.8;
}
.lp-footer p { color: rgba(255,255,255,0.5); }
.lp-footer .footer-tagline { color: rgba(255,255,255,0.75); font-size: 0.95rem; margin-bottom: 6px; }
.lp-footer .footer-copy { font-size: 0.82rem; margin-top: 0; }
.lp-footer-links { display: flex; justify-content: center; gap: 20px; margin-top: 12px; }
.lp-footer-links a { color: rgba(255,255,255,0.5); font-size: 0.88rem; }
.lp-footer-links a:hover { color: rgba(255,255,255,0.85); text-decoration: none; }


/* ============================================================
   AUTH PAGES
   ============================================================ */

.auth-wrap {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: var(--bg);
}
.auth-card {
  background: var(--bg-card);
  border: 1.5px solid var(--border-strong);
  border-radius: 24px;
  padding: 44px 40px;
  width: 100%;
  max-width: 440px;
  box-shadow: var(--shadow-lg);
}
.auth-logo { text-align: center; margin-bottom: 28px; }
.auth-logo .auth-logo-wrap {
  width: 80px;
  height: 80px;
  background: var(--navy);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 14px;
  box-shadow: var(--shadow);
}
.auth-logo .auth-logo-wrap img { width: 52px; height: auto; }
.auth-logo h1 { font-size: 1.5rem; font-weight: 900; color: var(--navy); }
.auth-logo p  { font-size: 0.9rem; color: var(--text-muted); }

.form-group { margin-bottom: 20px; }
.form-group label {
  display: block;
  font-size: 0.82rem;
  font-weight: 700;
  margin-bottom: 7px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.form-group input {
  width: 100%;
  background: var(--bg);
  border: 2px solid var(--border-strong);
  color: var(--navy);
  font-size: 1rem;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  transition: border-color 0.18s, box-shadow 0.18s;
  -webkit-appearance: none;
}
.form-group input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-dim);
}
.form-group .help-text  { font-size: 0.78rem; color: var(--text-muted); margin-top: 5px; }
.form-group .errorlist  { color: #DC2626; font-size: 0.83rem; margin-top: 4px; list-style: none; padding: 0; }

.auth-error {
  background: rgba(220, 38, 38, 0.06);
  border: 1.5px solid rgba(220, 38, 38, 0.2);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  color: #DC2626;
  font-size: 0.88rem;
  margin-bottom: 20px;
}
.auth-footer-link { text-align: center; margin-top: 20px; font-size: 0.9rem; color: var(--text-muted); }
.auth-offline-note { text-align: center; margin-top: 14px; font-size: 0.78rem; color: var(--text-muted); opacity: 0.75; }

/* ── LEGAL PAGES (privacy / terms) ─────────────────────────── */
.legal-wrap {
  min-height: 100vh;
  padding: 40px 20px 80px;
  max-width: 720px;
  margin: 0 auto;
}
.legal-card { background: var(--bg-card); border-radius: var(--radius); padding: 40px 44px; box-shadow: var(--shadow); }
.legal-back { display: inline-block; font-size: 0.88rem; font-weight: 700; color: var(--text-muted); margin-bottom: 28px; }
.legal-back:hover { color: var(--text); text-decoration: none; }
.legal-card h1 { font-size: 1.9rem; font-weight: 900; color: var(--navy); margin-bottom: 6px; }
.legal-date { font-size: 0.82rem; color: var(--text-muted); margin-bottom: 28px; }
.legal-card h2 { font-size: 1.05rem; font-weight: 800; color: var(--navy); margin: 28px 0 10px; }
.legal-card p { color: var(--text-muted); line-height: 1.75; margin-bottom: 14px; }
.legal-card ul { color: var(--text-muted); line-height: 1.75; padding-left: 22px; margin-bottom: 14px; }
.legal-card li { margin-bottom: 6px; }
.legal-card a { color: var(--accent-dark); }
@media (max-width: 600px) {
  .legal-card { padding: 28px 22px; }
}

/* ── ACCOUNT BUTTON ─────────────────────────────────────────── */
.account-btn {
  margin-left: auto;
  background: none;
  border: 1.5px solid var(--border-strong);
  border-radius: var(--radius-pill);
  width: 38px;
  height: 38px;
  font-size: 1.1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  -webkit-tap-highlight-color: transparent;
  transition: background 0.15s;
}
.account-btn:hover { background: var(--bg-card-hover); }

/* ── ACCOUNT SHEET OVERLAY ──────────────────────────────────── */
.account-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(10, 17, 40, 0.45);
  z-index: 200;
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
}
.account-overlay.open { display: block; }

/* Bottom sheet on mobile */
.account-sheet {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--bg-card);
  border-radius: 24px 24px 0 0;
  padding: 0 0 max(24px, env(safe-area-inset-bottom));
  box-shadow: var(--shadow-lg);
  z-index: 201;
  transform: translateY(100%);
  transition: transform 0.28s cubic-bezier(0.32, 0.72, 0, 1);
}
.account-overlay.open .account-sheet {
  transform: translateY(0);
}

/* Drag handle */
.account-sheet-handle {
  width: 36px;
  height: 4px;
  background: var(--border-strong);
  border-radius: 2px;
  margin: 14px auto 6px;
}

.account-sheet-inner {
  padding: 16px 24px 8px;
}

.account-email {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
  word-break: break-all;
}
.account-sub {
  font-size: 0.85rem;
  color: #16A34A;
  font-weight: 600;
  margin-top: 4px;
}

/* Menu rows */
.account-menu {
  margin-top: 20px;
  border-top: 1px solid var(--border);
}
.account-menu-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 0;
  border-bottom: 1px solid var(--border);
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
  text-decoration: none;
  cursor: pointer;
  background: none;
  border-left: none;
  border-right: none;
  border-radius: 0;
  width: 100%;
  text-align: left;
  -webkit-tap-highlight-color: transparent;
}
.account-menu-item:last-child { border-bottom: none; }
.account-menu-item:hover { color: var(--accent-dark); text-decoration: none; }
.account-menu-icon { font-size: 1.2rem; width: 28px; text-align: center; flex-shrink: 0; }
.account-menu-item.danger { color: #DC2626; }

/* On wider screens keep it as a simple inline card instead */
@media (min-width: 600px) {
  .account-overlay { background: transparent; backdrop-filter: none; -webkit-backdrop-filter: none; }
  .account-sheet {
    position: absolute;
    bottom: auto;
    top: 56px;
    right: 16px;
    left: auto;
    width: 260px;
    border-radius: var(--radius);
    transform: translateY(-8px);
    opacity: 0;
    pointer-events: none;
    transition: transform 0.18s ease, opacity 0.18s ease;
    box-shadow: var(--shadow-lg);
  }
  .account-overlay.open .account-sheet {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
  }
  .account-sheet-handle { display: none; }
  .account-sheet-inner { padding: 18px 20px 8px; }
  .account-menu { margin-top: 14px; }
  .account-menu-item { padding: 12px 0; font-size: 0.92rem; }
}

/* ── PWA / SAFE AREA INSETS ─────────────────────────────────── */
/* When running as installed PWA (standalone), status bar overlays content
   with black-translucent. Push content below the safe area. */
@supports (padding-top: env(safe-area-inset-top)) {
  @media (display-mode: standalone) {
    body {
      padding-top: env(safe-area-inset-top);
    }
    #online-pill {
      top: calc(12px + env(safe-area-inset-top));
    }
    /* Landing page nav */
    .lp-nav {
      padding-top: calc(20px + env(safe-area-inset-top));
    }
  }
}

/* ── RESPONSIVE ─────────────────────────────────────────────── */
@media (max-width: 480px) {
  .route-inputs { grid-template-columns: 1fr; }
  .iata-input   { font-size: 1.35rem; }
  .pricing-card { padding: 28px 22px; }
  .auth-card    { padding: 30px 22px; }
  .lp-section   { padding: 48px 18px; }
  .how-step-icon { width: 44px; height: 44px; font-size: 1.6rem; }
}
