/* AirDrive — Midnight Flight Deck brand system.
   Shared across the landing, guide, premium and privacy pages.
   Palette lifted verbatim from theme/tokens.js "dark" + the transactional
   email templates, so the public site reads as the same product as the app
   and the emails a pilot already gets. Deliberately single-theme (dark) —
   this is the brand, not a UI surface that should flip with OS setting. */

@import url('https://fonts.googleapis.com/css2?family=Sora:wght@500;600;700;800&family=IBM+Plex+Sans:wght@400;500;600&family=IBM+Plex+Mono:wght@400;500;600&display=swap');

:root {
  --bg: #0B1220;
  --bg-raised: #0E1826;
  --card: #16233A;
  --card-alt: #22334F;
  --border: #25334B;
  --border-strong: #3A4C68;
  --text: #EEF4FB;
  --text-muted: #8FA3BB;
  --text-faint: #64778F;
  --accent: #4DA3FF;
  --accent-ink: #06101E;
  --accent-dim: #1B3A5C;
  --success: #3DD68C;
  --gold: #FBBF24;
  --gold-ink: #241a02;
  --shadow-card: 0 1px 2px rgba(0,0,0,0.3), 0 8px 24px rgba(0,0,0,0.25);
}

* { box-sizing: border-box; }

/* Any element toggled by the language switcher (data-i18n + [hidden]) must
   actually disappear even when it also carries a class like .btn that sets
   its own `display` — an author rule at equal specificity beats the
   browser's built-in `[hidden]{display:none}`, which is what let the ES/EN
   CTA buttons render side by side. */
[hidden] { display: none !important; }

html { color-scheme: dark; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'IBM Plex Sans', -apple-system, 'Segoe UI', Roboto, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  padding: 0 20px;
}

.mono { font-family: 'IBM Plex Mono', ui-monospace, SFMono-Regular, monospace; }

h1, h2, h3 { font-family: 'Sora', 'IBM Plex Sans', sans-serif; color: var(--text); text-wrap: balance; margin: 0; }

a { color: var(--accent); }

img { max-width: 100%; }

/* ---------- shell ---------- */

.shell { max-width: 1080px; margin: 0 auto; }
.narrow { max-width: 760px; margin: 0 auto; }

/* ---------- nav ---------- */

.sitenav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-block: 20px;
  flex-wrap: wrap;
}
.sitenav .brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}
.sitenav .brand img { width: 30px; height: 30px; border-radius: 8px; display: block; }
.sitenav .brand span {
  font-family: 'Sora', sans-serif;
  font-weight: 700;
  font-size: 16px;
  color: var(--text);
  letter-spacing: -0.01em;
}
.sitenav .links { display: flex; gap: 4px; flex-wrap: wrap; }
.sitenav .links a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  padding: 8px 12px;
  border-radius: 999px;
}
.sitenav .links a:hover, .sitenav .links a[aria-current="page"] {
  color: var(--text);
  background: var(--card);
}

.langtoggle {
  display: inline-flex;
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  padding: 2px;
  gap: 2px;
  background: var(--card);
  flex-shrink: 0;
}
.langtoggle button {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.06em;
  font-weight: 500;
  border: none;
  background: transparent;
  color: var(--text-muted);
  padding: 6px 12px;
  border-radius: 999px;
  cursor: pointer;
}
.langtoggle button[aria-pressed="true"] { background: var(--accent); color: var(--accent-ink); }

/* ---------- buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: 'IBM Plex Sans', sans-serif;
  font-weight: 600;
  font-size: 15px;
  padding: 13px 22px;
  border-radius: 12px;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
}
.btn-primary { background: var(--accent); color: var(--accent-ink); }
.btn-primary:hover { background: #6AB4FF; }
.btn-secondary { background: var(--card-alt); color: var(--text); border-color: var(--border-strong); }
.btn-secondary:hover { border-color: var(--accent); }
.btn-ghost { background: transparent; color: var(--text-muted); border-color: var(--border); }
.btn[aria-disabled="true"] { opacity: 0.5; cursor: default; pointer-events: none; }
.btn .sub { display: block; font-size: 11px; font-weight: 500; opacity: 0.75; }

/* ---------- glow ---------- */

.glow { position: relative; isolation: isolate; }
.glow::before {
  content: "";
  position: absolute;
  inset: -60% -40%;
  z-index: -1;
  background: radial-gradient(closest-side, rgba(77,163,255,0.35), rgba(77,163,255,0.12) 55%, transparent 75%);
  filter: blur(28px);
  animation: glowpulse 4.5s ease-in-out infinite;
}
.glow.gold::before {
  background: radial-gradient(closest-side, rgba(251,191,36,0.35), rgba(251,191,36,0.12) 55%, transparent 75%);
}
.glow.success::before {
  background: radial-gradient(closest-side, rgba(61,214,140,0.32), rgba(61,214,140,0.1) 55%, transparent 75%);
}
@keyframes glowpulse {
  0%, 100% { opacity: 0.65; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.08); }
}

/* ---------- hero brand block (logo + wordmark + tagline, email-style) ---------- */

.brandblock { text-align: center; padding-block: 8px 0; }
.brandblock .iconstage {
  position: relative;
  width: 260px;
  height: 260px;
  margin: 0 auto -6px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.brandblock .iconstage::before {
  content: "";
  position: absolute;
  inset: 6%;
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(77,163,255,0.40), rgba(77,163,255,0.1) 60%, transparent 78%);
  filter: blur(30px);
  animation: glowpulse 4.5s ease-in-out infinite;
}
.brandblock .icon {
  position: relative;
  width: 220px;
  height: 220px;
  display: block;
  filter: drop-shadow(0 18px 36px rgba(6,10,20,0.55));
  animation: iconfloat 5s ease-in-out infinite;
}
.brandblock .wordmark {
  height: 52px;
  display: block;
  margin: 0 auto 16px;
}
.brandblock .signature {
  margin: 0 0 2px;
  font-size: 12px;
  color: var(--text-muted);
}
.brandblock .tagline {
  font-style: italic;
  color: var(--text-faint);
  font-size: 12px;
  margin: 0 0 4px;
}
@keyframes iconfloat {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-9px) rotate(-3deg); }
}
@media (prefers-reduced-motion: reduce) {
  .brandblock .icon, .glow::before, .brandblock .iconstage::before { animation: none; }
}
@media (max-width: 480px) {
  .brandblock .iconstage { width: 190px; height: 190px; }
  .brandblock .icon { width: 160px; height: 160px; }
  .brandblock .wordmark { height: 38px; }
}

/* ---------- phone-frame step visuals ---------- */

.phone {
  width: 216px;
  border-radius: 34px;
  background: linear-gradient(160deg, #1a2740, #0E1826);
  border: 1px solid var(--border-strong);
  padding: 10px;
  box-shadow: var(--shadow-card);
  flex-shrink: 0;
}
.phone .notch {
  width: 46%;
  height: 16px;
  background: #060a13;
  border-radius: 0 0 12px 12px;
  margin: 0 auto 6px;
}
.phone .screen {
  position: relative;
  background: var(--bg-raised);
  border-radius: 22px;
  height: 300px;
  overflow: hidden;
}
.phone .frame {
  position: absolute;
  inset: 0;
  padding: 16px 14px;
  opacity: 0;
  animation: framecycle 12.8s infinite;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.phone .frame:nth-child(1) { animation-delay: -0.01s; }
.phone .frame:nth-child(2) { animation-delay: -3.2s; }
.phone .frame:nth-child(3) { animation-delay: -6.4s; }
.phone .frame:nth-child(4) { animation-delay: -9.6s; }
@keyframes framecycle {
  0% { opacity: 0; }
  2% { opacity: 1; }
  22% { opacity: 1; }
  25% { opacity: 0; }
  100% { opacity: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .phone .frame { animation: none; opacity: 0; }
  .phone .frame:first-child { opacity: 1; }
}

.pf-title { font-family: 'Sora', sans-serif; font-weight: 700; font-size: 14px; color: var(--text); }
.pf-sub { font-size: 10.5px; color: var(--text-faint); margin-top: -6px; }
.pf-card {
  background: var(--card); border: 1px solid var(--border); border-radius: 12px;
  padding: 10px; display: flex; flex-direction: column; gap: 6px;
}
.pf-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 11px; color: var(--text-muted); }
.pf-row strong { color: var(--text); font-weight: 600; }
.pf-chip {
  font-family: 'IBM Plex Mono', monospace; font-size: 9.5px; padding: 2px 7px; border-radius: 999px;
  background: var(--accent-dim); color: var(--accent); display: inline-block; width: fit-content;
}
.pf-chip.gold { background: rgba(251,191,36,0.16); color: var(--gold); }
.pf-chip.ok { background: rgba(61,214,140,0.16); color: var(--success); }
.pf-bar { height: 6px; border-radius: 999px; background: var(--card-alt); overflow: hidden; }
.pf-bar span { display: block; height: 100%; border-radius: 999px; background: var(--accent); }
.pf-bar.gold span { background: var(--gold); }
.pf-btn {
  margin-top: auto; text-align: center; font-size: 11px; font-weight: 600;
  background: var(--accent); color: var(--accent-ink); border-radius: 9px; padding: 8px;
}
.pf-list { display: flex; flex-direction: column; gap: 6px; }
.pf-line { display: flex; align-items: center; gap: 8px; font-size: 11px; color: var(--text-muted); }
.pf-dot { width: 6px; height: 6px; border-radius: 3px; background: var(--border-strong); flex-shrink: 0; }
.pf-dot.on { background: var(--success); }
.pf-dot.warn { background: var(--gold); }
.pf-check { color: var(--success); font-weight: 700; }
.pf-thumb {
  height: 54px; border-radius: 8px; border: 1px dashed var(--border-strong);
  display: flex; align-items: center; justify-content: center; font-size: 10px; color: var(--text-faint);
}

.flow-visual { display: flex; gap: 26px; align-items: flex-start; flex-wrap: wrap; }
.flow-visual .steps { flex: 1 1 320px; min-width: 280px; }
.flow-visual .phone { margin: 0 auto; }
.visual-caption { text-align: center; font-size: 11.5px; color: var(--text-faint); margin-top: 12px; max-width: 190px; }

/* ---------- cards ---------- */

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 20px;
  box-shadow: var(--shadow-card);
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 16px;
}

.feature {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: transform 0.28s cubic-bezier(.2,.8,.3,1.3), border-color 0.28s ease, box-shadow 0.28s ease;
}
.feature:hover {
  transform: translateY(-6px);
  border-color: var(--border-strong);
  box-shadow: var(--shadow-card);
}
.feature .glyph {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: var(--accent-dim);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  transition: transform 0.28s cubic-bezier(.2,.8,.3,1.5);
}
.feature:hover .glyph { transform: scale(1.12) rotate(-6deg); }
.feature h3 { font-size: 16px; }
.feature p { margin: 0; color: var(--text-muted); font-size: 14px; line-height: 1.55; }

/* ---------- scroll reveal ---------- */

.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s cubic-bezier(.16,.84,.44,1), transform 0.7s cubic-bezier(.16,.84,.44,1);
}
.reveal.in-view { opacity: 1; transform: translateY(0); }
.grid.reveal-group > .feature,
.whatsnew.reveal-group > li,
.steps.reveal-group > li {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s cubic-bezier(.16,.84,.44,1), transform 0.6s cubic-bezier(.16,.84,.44,1);
}
.grid.reveal-group.in-view > .feature,
.whatsnew.reveal-group.in-view > li,
.steps.reveal-group.in-view > li {
  opacity: 1; transform: translateY(0);
}
.grid.reveal-group > .feature:nth-child(1), .whatsnew.reveal-group > li:nth-child(1) { transition-delay: 0.03s; }
.grid.reveal-group > .feature:nth-child(2), .whatsnew.reveal-group > li:nth-child(2) { transition-delay: 0.09s; }
.grid.reveal-group > .feature:nth-child(3), .whatsnew.reveal-group > li:nth-child(3) { transition-delay: 0.15s; }
.grid.reveal-group > .feature:nth-child(4), .whatsnew.reveal-group > li:nth-child(4) { transition-delay: 0.21s; }
.grid.reveal-group > .feature:nth-child(5), .whatsnew.reveal-group > li:nth-child(5) { transition-delay: 0.27s; }
.grid.reveal-group > .feature:nth-child(6), .whatsnew.reveal-group > li:nth-child(6) { transition-delay: 0.33s; }
@media (prefers-reduced-motion: reduce) {
  .reveal, .grid.reveal-group > .feature, .whatsnew.reveal-group > li, .steps.reveal-group > li {
    opacity: 1; transform: none; transition: none;
  }
}

/* ---------- floating decoration (hero life) ---------- */

.driftfield { position: relative; }
.driftfield .blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(2px);
  opacity: 0.5;
  pointer-events: none;
  animation: drift 14s ease-in-out infinite;
}
@keyframes drift {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(14px, -18px) scale(1.08); }
  66% { transform: translate(-10px, 10px) scale(0.94); }
}
.trail {
  position: absolute; pointer-events: none; opacity: 0.55;
}
.trail path {
  stroke-dasharray: 2 10;
  animation: trailmove 3.2s linear infinite;
}
@keyframes trailmove { to { stroke-dashoffset: -120; } }
@media (prefers-reduced-motion: reduce) {
  .driftfield .blob, .trail path { animation: none; }
}

/* ---------- section rhythm ---------- */

section { padding-block: 56px; }
section.tight { padding-block: 32px; }
.eyebrow {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 10px;
}
.section-head { max-width: 640px; margin: 0 0 32px; }
.section-head h2 { font-size: clamp(24px, 3.4vw, 32px); margin-bottom: 10px; }
.section-head p { color: var(--text-muted); font-size: 15.5px; margin: 0; }

hr.rule { border: none; border-top: 1px solid var(--border); margin: 0; }

/* ---------- footer ---------- */

footer.sitefoot {
  border-top: 1px solid var(--border);
  padding-block: 28px 48px;
  margin-top: 40px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}
footer.sitefoot .links { display: flex; gap: 16px; flex-wrap: wrap; }
footer.sitefoot a { color: var(--text-muted); text-decoration: none; font-size: 13px; }
footer.sitefoot a:hover { color: var(--text); }
footer.sitefoot .copy { color: var(--text-faint); font-size: 12px; }

/* ---------- responsive ---------- */

@media (max-width: 620px) {
  section { padding-block: 40px; }
  .brandblock .icon { width: 76px; height: 76px; border-radius: 20px; }
}
