/* flyscout.app, in the app's own look: lib/ui/theme/flyscout_colors.dart.
   Dark only. Height is the one place colour is a measurement, as in the app. */
:root {
  --background: #06090f;
  --card: #131c2b;
  --raised: #1b2638;
  --border: #2a3750;
  --ink: #e9eff8;
  --muted: #9aa6b8;
  --faint: #6b778e;
  --primary: #3d9bff;
  --pro: #e3c47a;
  --pro-tint: #2a2414;
  --pro-line: rgba(227, 196, 122, 0.45);
  --success: #3ccb9b;
  --map-sea: #0a1220;
  --prose: "Roboto", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;
  --radius: 14px;
  color-scheme: dark;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--background);
  color: var(--ink);
  font: 400 16px/1.6 var(--prose);
  overflow-x: hidden;
}

/* The radar's light reaches past the window: clip it there, never scroll. */
main { overflow-x: hidden; overflow-x: clip; }

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

.wrap { max-width: 1120px; margin: 0 auto; padding-left: 16px; padding-right: 16px; }
.narrow { max-width: 760px; }

/* Header: the mark beside the name, as on the app's home screen. */
.top {
  position: sticky;
  top: 0;
  z-index: 20;
  border-bottom: 1px solid var(--border);
  background: rgba(6, 9, 15, 0.78);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
}
.top .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 64px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  font: 700 17px/1 var(--mono);
  letter-spacing: 3px;
}
.brand:hover { text-decoration: none; }
.brand img { width: 28px; height: 28px; }
.top nav { display: flex; gap: 18px; font-size: 14px; }
.top nav a { color: var(--muted); }
.top nav a[aria-current] { color: var(--ink); }

.eyebrow {
  margin: 0 0 12px;
  color: var(--muted);
  font: 500 13px/1.4 var(--mono);
  letter-spacing: 1.5px;
  text-transform: uppercase;
}

/* ------------------------------------------------------------------ hero */

.hero {
  display: grid;
  gap: 8px;
  align-items: center;
  padding-top: 40px;
  padding-bottom: 24px;
}
@media (min-width: 900px) {
  .hero {
    /* Room between the words and the radar for the loop's plane to fly out. */
    grid-template-columns: minmax(0, 1fr) minmax(0, 0.92fr);
    gap: 24px clamp(56px, 7vw, 112px);
    min-height: calc(100vh - 64px);
    min-height: calc(100svh - 64px);
    padding-top: 24px;
  }
}
.hero h1 {
  margin: 0 0 22px;
  font-size: clamp(36px, 4.9vw, 58px);
  line-height: 1.16;
  font-weight: 700;
  letter-spacing: -1px;
}
.ticker {
  display: flex;
  align-items: baseline;
  gap: 12px;
  min-height: 28px;
  margin: -10px 0 26px;
  overflow: hidden;
}
.ticker-when {
  flex: none;
  color: var(--primary);
  font: 700 12px/1.6 var(--mono);
  letter-spacing: 1.4px;
}
.ticker-what {
  min-width: 0;
  color: var(--ink);
  font-size: 16px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: opacity 0.35s ease, transform 0.35s ease;
}
.ticker-what.out { opacity: 0; transform: translateY(8px); }
.loopword { position: relative; display: inline-block; white-space: nowrap; }
.loopline {
  position: absolute;
  left: -2%;
  top: 90%;
  width: 135%;
  height: auto;
  overflow: visible;
  pointer-events: none;
}
.hero .lead {
  margin: 48px 0 30px;
  color: var(--muted);
  font-size: 19px;
  max-width: 32em;
}
.soon {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 11px 18px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--card);
  color: var(--muted);
  font: 500 13px/1 var(--mono);
  letter-spacing: 1px;
  text-transform: uppercase;
}
.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--success);
  box-shadow: 0 0 0 4px rgba(60, 203, 155, 0.18);
  animation: breathe 2.4s ease-in-out infinite;
}
@keyframes breathe {
  0%, 100% { box-shadow: 0 0 0 3px rgba(60, 203, 155, 0.10); }
  50% { box-shadow: 0 0 0 7px rgba(60, 203, 155, 0.26); }
}

/* The radar beside the headline: a decoration, the app's scope over made-up
   traffic, slow and quiet so the words come first. Its colours are the app
   radar's phosphor palette (lib/ui/theme/radar_colors.dart), written as
   channels ("r, g, b") so the scope can draw them at any strength. */
.radar-wrap {
  --r-screen: 2, 10, 6;
  --r-line: 61, 255, 138;
  --r-glow: 124, 255, 176;
  --r-blip: 61, 255, 138;
  --r-text: 124, 255, 176;
  --r-dim: 63, 143, 98;
  --r-military: 255, 200, 87;
  position: relative;
  isolation: isolate;
  width: 100%;
  max-width: 460px;
  margin: 40px auto 8px;
  pointer-events: none;
  user-select: none;
  text-align: center;
  container-type: inline-size;
}
@media (min-width: 900px) {
  /* Title, scope and card all on the first screen, however short the window. */
  .radar-wrap { width: min(100%, 40vw, max(300px, 100vh - 356px)); width: min(100%, 40vw, max(300px, 100svh - 356px)); max-width: 540px; margin: 0; justify-self: center; }
}
/* Its title, as the app's radar heads its screen. */
.radar-head p { margin: 0; }
/* Its title, as the page's sections have theirs: a quiet label, then the
   line that matters, the count, on one line however narrow the radar gets
   (its type follows the radar's width). */
.radar-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: rgb(var(--r-dim));
  font: 500 12px/1.5 var(--mono);
  letter-spacing: 2.5px;
}
.radar-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: rgb(var(--r-blip));
  box-shadow: 0 0 0 3px rgba(var(--r-blip), 0.12);
  animation: radar-breathe 2.4s ease-in-out infinite;
}
@keyframes radar-breathe {
  0%, 100% { box-shadow: 0 0 0 2px rgba(var(--r-blip), 0.10); }
  50% { box-shadow: 0 0 0 6px rgba(var(--r-blip), 0.24); }
}
.radar-count {
  margin-top: 2px !important;
  color: rgb(var(--r-text));
  font: 700 20px/1.3 var(--prose);
  font-size: clamp(18px, 6.5cqi, 26px);
}
.radar-stage { position: relative; margin-top: 6px; }
/* A soft light behind the scope that fades to nothing: no edges. */
.radar-stage::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(var(--r-line), 0.10), rgba(var(--r-line), 0.04) 55%, rgba(var(--r-line), 0) 100%);
  transform: scale(1.4);
}
.radar-stage canvas {
  display: block;
  width: 100%;
  aspect-ratio: 1;
  opacity: 0.85;
  /* The bezel melts into the page instead of ending on a line. */
  -webkit-mask-image: radial-gradient(closest-side, #000 84%, rgba(0, 0, 0, 0.35) 96%, transparent 100%);
  mask-image: radial-gradient(closest-side, #000 84%, rgba(0, 0, 0, 0.35) 96%, transparent 100%);
}

/* Its card for the aircraft picked out, as the app lays it out; it dims
   between two and changes while blank. */
/* Clear of the scope, whose tilt brings its near edge a little lower than its box. */
.radar-card {
  width: min(100%, 400px);
  margin: 28px auto 0;
  padding: 12px 16px 14px;
  border: 1px solid rgba(var(--r-line), 0.42);
  border-radius: var(--radius);
  background: #07130d;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.6), 0 0 30px rgba(var(--r-line), 0.08);
  text-align: left;
  font-family: var(--mono);
  opacity: 0;
  transition: opacity 0.9s ease;
}
.radar-card.on { opacity: 1; }
.radar-card.idle { opacity: 0.5; }
.rc-body { transition: opacity 0.4s ease; }
.rc-body.blank { opacity: 0; }
.radar-card p { margin: 0; }
.rc-name {
  display: flex;
  align-items: center;
  gap: 8px;
  color: rgb(var(--r-text));
  font: 700 16px/1.3 var(--mono);
}
.rc-name.military { color: rgb(var(--r-military)); }
.rc-tag {
  padding: 2px 5px;
  border: 1px solid rgb(var(--r-military));
  border-radius: 4px;
  color: rgb(var(--r-military));
  font: 700 10px/1.2 var(--mono);
  letter-spacing: 1.2px;
}
.rc-tag[hidden] { display: none; }
.rc-sub {
  margin-top: 3px !important;
  color: rgb(var(--r-dim));
  font: 500 12px/1.4 var(--mono);
  white-space: pre;
  overflow: hidden;
  text-overflow: ellipsis;
}
/* The height takes the most room ("11,000 ft"), the squawk the least. */
.rc-read { display: grid; grid-template-columns: 1.3fr 1fr 1fr 0.8fr; gap: 8px; margin: 10px 0 0; }
.rc-read > div { min-width: 0; }
.rc-read dt { color: rgb(var(--r-dim)); font: 500 11px/1.3 var(--mono); letter-spacing: 1.4px; }
.rc-read dd { margin: 3px 0 0; color: rgb(var(--r-text)); font: 700 clamp(12.5px, 3.5vw, 14px)/1.3 var(--mono); white-space: nowrap; }

/* -------------------------------------------------------------- sections */

section.block { padding-top: 72px; padding-bottom: 72px; border-top: 1px solid var(--border); }
section.block > h2 {
  margin: 0 0 10px;
  font-size: clamp(28px, 4.2vw, 40px);
  line-height: 1.15;
  font-weight: 700;
  letter-spacing: -0.5px;
}
section.block > p.sub { margin: 0 0 32px; color: var(--muted); font-size: 17px; max-width: 42em; }

.grid { display: grid; gap: 12px; }
@media (min-width: 640px) { .grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 960px) { .grid.three { grid-template-columns: repeat(3, 1fr); } .grid.four { grid-template-columns: repeat(4, 1fr); } }

.card {
  padding: 20px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--card);
}
.card h3 { margin: 0 0 6px; font-size: 18px; font-weight: 500; }
.card p { margin: 0; color: var(--muted); font-size: 15px; }

/* ---------------------------------------------------------------- replay */

.replay {
  border: 1px solid var(--border);
  border-radius: 22px;
  overflow: hidden;
  background: var(--card);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.45);
}
.replay-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
}
.replay-head strong { display: block; font-size: 17px; font-weight: 500; }
.replay-head span { display: block; color: var(--muted); font-size: 14px; }
.icon-btn {
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--raised);
  color: var(--ink);
  cursor: pointer;
}
.icon-btn:hover { border-color: var(--primary); }
.replay-map { position: relative; background: var(--map-sea); }
.replay-map canvas { display: block; width: 100%; aspect-ratio: 16 / 9; }
@media (max-width: 640px) { .replay-map canvas { aspect-ratio: 4 / 5; } }
.event-chip {
  position: absolute;
  top: 14px;
  left: 14px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 12px;
  border: 1px solid rgba(233, 239, 248, 0.28);
  border-radius: 999px;
  background: rgba(10, 18, 32, 0.85);
  font: 700 12px/1 var(--mono);
  letter-spacing: 1.2px;
  opacity: 0;
  transform: translateY(-6px);
  transition: opacity 0.4s ease, transform 0.4s ease;
}
.event-chip.show { opacity: 1; transform: none; }
.event-chip::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--ink);
}
.map-credit {
  position: absolute;
  left: 10px;
  right: 10px;
  bottom: 8px;
  margin: 0;
  color: rgba(154, 166, 184, 0.75);
  font-size: 11px;
  line-height: 1.35;
  text-align: right;
  text-shadow: 0 1px 2px rgba(6, 9, 15, 0.9);
}
@media (max-width: 640px) { .map-credit { font-size: 10px; } }
.replay-sheet { padding: 16px 18px 14px; border-top: 1px solid var(--border); }
.readouts {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
  margin: 0 0 14px;
}
@media (max-width: 640px) { .readouts { grid-template-columns: repeat(3, 1fr); } .readouts div:nth-child(n + 4) { display: none; } }
.readouts div { min-width: 0; }
.readouts dt { color: var(--faint); font: 500 11px/1.4 var(--mono); letter-spacing: 1.2px; }
.readouts dd {
  margin: 2px 0 0;
  font: 500 19px/1.3 var(--mono);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.strip { display: block; width: 100%; height: 72px; cursor: ew-resize; touch-action: none; }
.strip-foot {
  display: flex;
  justify-content: space-between;
  margin-top: 8px;
  color: var(--faint);
  font: 500 11px/1.4 var(--mono);
  letter-spacing: 1.2px;
}
.strip-foot b { color: var(--muted); font-weight: 500; }

/* ------------------------------------------------------------------ feed */

.feed-grid { display: grid; gap: 12px; }
@media (min-width: 720px) { .feed-grid { grid-template-columns: repeat(2, 1fr); } }
.fcard {
  display: flex;
  gap: 16px;
  align-items: center;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--card);
  transition: border-color 0.25s ease, transform 0.25s ease;
}
.fcard:hover { border-color: #3a4d6e; transform: translateY(-2px); }
.fcard canvas {
  flex: none;
  width: 96px;
  height: 96px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--map-sea);
}
.fcard .t { margin: 0; font-size: 17px; font-weight: 500; line-height: 1.3; }
.fcard .d { margin: 2px 0 0; color: var(--ink); opacity: 0.85; font-size: 14px; }
.fcard .a { margin: 4px 0 0; color: var(--muted); font-size: 14px; }
.fcard .day { margin: 6px 0 0; color: var(--faint); font: 500 11px/1.4 var(--mono); letter-spacing: 1.2px; }
.credit { margin: 18px 0 0; color: var(--faint); font-size: 13px; }

/* ------------------------------------------------------------------- Pro */

.card.pro { background: var(--raised); border-color: var(--pro-line); }
.badge {
  display: inline-block;
  margin-left: 8px;
  padding: 2px 7px;
  border: 1px solid var(--pro-line);
  border-radius: 6px;
  background: var(--pro-tint);
  color: var(--pro);
  font: 700 11px/1.4 var(--mono);
  letter-spacing: 1px;
  vertical-align: 3px;
}
.pro-eyebrow {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 14px;
  color: var(--pro);
  font: 700 12px/1.4 var(--mono);
  letter-spacing: 1.4px;
}
.promark { flex: none; width: 13px; height: 13px; }
.happening {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 16px;
  padding: 12px 14px;
  border: 1px solid var(--pro-line);
  border-radius: 12px;
  background: var(--pro-tint);
}
.happening .dot { flex: none; }
.happening b { display: block; font-weight: 500; }
.happening span { color: var(--muted); font-size: 13px; }
.notif-stage { position: relative; height: 92px; margin: 0 0 16px; overflow: hidden; }
.notif {
  position: absolute;
  inset: 0 0 auto 0;
  display: flex;
  gap: 10px;
  padding: 11px 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  background: rgba(46, 56, 74, 0.9);
  transform: translateY(-110%);
  opacity: 0;
  transition: transform 0.55s cubic-bezier(0.2, 0.8, 0.2, 1.1), opacity 0.4s ease;
}
.notif.in { transform: none; opacity: 1; }
.notif img { flex: none; width: 34px; height: 34px; border-radius: 8px; }
.notif div { min-width: 0; }
.notif .n-top { display: flex; justify-content: space-between; margin: 0; color: var(--muted); font-size: 12px; letter-spacing: 0.4px; }
.notif .n-title { margin: 1px 0 0; font-size: 14px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.notif .n-body { margin: 0; color: var(--muted); font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.history { display: flex; gap: 3px; align-items: flex-end; height: 44px; margin: 0 0 16px; }
.history i {
  flex: 1;
  border-radius: 3px;
  background: var(--border);
  transform-origin: bottom;
}
.history i.free { background: var(--primary); }
.history i.paid { background: var(--pro); opacity: 0.75; }

/* ----------------------------------------------------------------- pages */

.page { padding-top: 48px; padding-bottom: 64px; }
.page h1 { margin: 0 0 12px; font-size: 34px; font-weight: 700; }
.page .intro { margin: 0 0 24px; color: var(--ink); font-size: 17px; }
.page .card { margin-bottom: 12px; }
.page .card h2 { margin: 0 0 6px; font-size: 18px; font-weight: 500; }
.page .card p { margin: 0; color: var(--muted); font-size: 15px; }
.page .card p + p { margin-top: 10px; }
.mono { font-family: var(--mono); }

footer {
  padding: 32px 0 48px;
  border-top: 1px solid var(--border);
  color: var(--faint);
  font-size: 14px;
}
footer .wrap { display: flex; flex-wrap: wrap; gap: 12px 24px; justify-content: space-between; }
footer nav { display: flex; flex-wrap: wrap; gap: 18px; }
footer a { color: var(--muted); }
footer p { margin: 0; }

/* Sections arrive as they scroll in. */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity 0.8s ease, transform 0.8s cubic-bezier(0.2, 0.7, 0.2, 1); }
.reveal.in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .dot, .radar-dot { animation: none; }
  .notif { transition: none; }
}
