/* wingview.live: the app's night sky and frosted glass, in a browser. */

@font-face { font-family: "Inter"; src: url("/assets/fonts/inter_regular.ttf") format("truetype"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Inter"; src: url("/assets/fonts/inter_medium.ttf") format("truetype"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Inter"; src: url("/assets/fonts/inter_semibold.ttf") format("truetype"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Bricolage"; src: url("/assets/fonts/bricolage_display_bold.ttf") format("truetype"); font-weight: 700; font-display: swap; }

:root {
  --bg: #0E1640;
  --sky-top: #1A2452;
  --text: #FFFFFF;
  --text2: #C9D2EC;
  --text3: #A9B4D8;
  --glass: rgba(255, 255, 255, 0.07);
  --glass-hi: rgba(255, 255, 255, 0.12);
  --rim: rgba(255, 255, 255, 0.15);
  --accent: #77A6FE;
  --good: #32C66E;
  --warn: #E7920A;
  --late: #FE7C4E;
  --bad: #FF767F;
  --special: #BC8BFE;
  --info: #5BADFE;
  --gutter: 16px;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font: 400 16px/1.5 "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
a:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }

/* The night sky behind everything: the app's deep blue, lighter up top, with a few stars. */
.sky {
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(1px 1px at 12% 18%, rgba(255,255,255,.7), transparent 60%),
    radial-gradient(1px 1px at 72% 9%, rgba(255,255,255,.55), transparent 60%),
    radial-gradient(1.4px 1.4px at 86% 32%, rgba(255,255,255,.6), transparent 60%),
    radial-gradient(1px 1px at 34% 41%, rgba(255,255,255,.4), transparent 60%),
    radial-gradient(1.2px 1.2px at 56% 26%, rgba(255,255,255,.5), transparent 60%),
    radial-gradient(1px 1px at 22% 64%, rgba(255,255,255,.35), transparent 60%),
    radial-gradient(1px 1px at 90% 70%, rgba(255,255,255,.35), transparent 60%),
    radial-gradient(60% 45% at 80% 0%, rgba(119,166,254,.18), transparent 70%),
    linear-gradient(180deg, var(--sky-top) 0%, var(--bg) 70%);
}

header.top, main, footer.foot { width: 100%; max-width: 600px; margin: 0 auto; padding-left: var(--gutter); padding-right: var(--gutter); }
header.top { padding-top: 18px; padding-bottom: 6px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--text); font: 700 20px/1 "Bricolage", "Inter", sans-serif; letter-spacing: -0.01em; }
.brand img { border-radius: 8px; }
.brand:hover { text-decoration: none; }

.card {
  background: var(--glass);
  border: 1px solid var(--rim);
  border-radius: 22px;
  padding: 18px;
  margin: 12px 0;
  -webkit-backdrop-filter: blur(18px) saturate(1.3);
  backdrop-filter: blur(18px) saturate(1.3);
}
.card h2 { margin: 0 0 12px; font: 600 15px/1.35 "Inter", sans-serif; color: var(--text2); }
.card h2 span { display: block; font-weight: 400; font-size: 13px; color: var(--text3); }

/* Status colours, as in the app at night. */
.tone-good { --tone: var(--good); }
.tone-warn { --tone: var(--warn); }
.tone-late { --tone: var(--late); }
.tone-bad { --tone: var(--bad); }
.tone-info { --tone: var(--info); }
.tone-special { --tone: var(--special); }
.tone-neutral { --tone: var(--accent); }

/* ---------------------------------------------------------------------------------------------- a shared flight */

.live { display: inline-flex; align-items: center; gap: 8px; margin: 8px 0 4px; font-size: 13px; color: var(--text3); }
.live .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--good); box-shadow: 0 0 0 0 rgba(50,198,110,.6); animation: pulse 2s ease-out infinite; }
.live.stale .dot { background: var(--text3); animation: none; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(50,198,110,.55); } 70% { box-shadow: 0 0 0 9px rgba(50,198,110,0); } 100% { box-shadow: 0 0 0 0 rgba(50,198,110,0); } }

.hero { margin: 10px 0 18px; }
.flightline { margin: 0 0 10px; color: var(--text2); font-weight: 500; font-size: 15px; }
.route { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 14px; }
.route .end { display: flex; flex-direction: column; min-width: 0; }
.route .end.right { text-align: right; }
.route .code { font: 700 clamp(44px, 13vw, 64px)/0.95 "Bricolage", "Inter", sans-serif; letter-spacing: -0.03em; }
.route .city { color: var(--text2); font-size: 14px; margin-top: 6px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.track { position: relative; height: 28px; align-self: start; margin-top: clamp(14px, 4vw, 22px); }
.track .bar { position: absolute; left: 0; right: 0; top: 13px; height: 3px; border-radius: 3px; background: rgba(255,255,255,.18); overflow: hidden; }
.track .fill { height: 100%; background: var(--tone); border-radius: 3px; transition: width 1.2s cubic-bezier(.2,.8,.2,1); }
.track .plane { position: absolute; top: 2px; width: 24px; height: 24px; margin-left: -12px; fill: #fff; transform: rotate(90deg); filter: drop-shadow(0 0 6px rgba(119,166,254,.6)); transition: left 1.2s cubic-bezier(.2,.8,.2,1); }

.status { display: flex; align-items: center; flex-wrap: wrap; gap: 10px 14px; margin-top: 18px; }
.pill {
  display: inline-flex; align-items: center; padding: 6px 12px; border-radius: 999px;
  font-weight: 600; font-size: 14px; color: var(--tone);
  background: color-mix(in srgb, var(--tone) 16%, transparent);
  border: 1px solid color-mix(in srgb, var(--tone) 45%, transparent);
}
.next { font-size: 15px; color: var(--text2); }
.next strong { color: var(--text); font: 700 20px/1.2 "Bricolage", "Inter", sans-serif; letter-spacing: -0.01em; margin-right: 4px; }

.times { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 12px; }
.time { display: flex; flex-direction: column; }
.label { font-size: 12px; font-weight: 500; color: var(--text3); }
.time .value { font: 600 24px/1.25 "Inter", sans-serif; letter-spacing: -0.01em; font-variant-numeric: tabular-nums; }
.time .note { font-size: 13px; color: var(--text3); min-height: 1em; }
.facts { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.fact { display: flex; flex-direction: column; padding: 8px 12px; border-radius: 14px; background: var(--glass-hi); min-width: 84px; }
.fact .value { font: 600 18px/1.3 "Inter", sans-serif; }
.fact.accent .value { color: var(--accent); }
.fact.good .value { color: var(--good); }
.aircraft { margin: 6px 4px 0; font-size: 14px; color: var(--text3); }

.mapcard { padding: 0; overflow: hidden; background: rgba(6, 12, 40, 0.38); }
.map { width: 100%; min-height: 180px; }
.mapsvg { display: block; width: 100%; height: 100%; }
.mapsvg .land path { fill: rgba(150, 175, 255, .14); stroke: rgba(200, 215, 255, .22); stroke-width: 1px; vector-effect: non-scaling-stroke; }
.mapsvg .planned { fill: none; stroke: rgba(255,255,255,.55); stroke-linecap: round; }
.mapsvg .flown { fill: none; stroke: var(--tone); stroke-linecap: round; stroke-linejoin: round; filter: drop-shadow(0 0 3px var(--tone)); }
.mapsvg .airport { fill: #fff; }
.mapsvg text { fill: var(--text2); font-family: "Inter", sans-serif; font-weight: 600; }
.mapsvg .halo { fill: var(--tone); opacity: .25; }
.mapsvg .planeicon { fill: #fff; }

.local { margin: 4px 4px 0; font-size: 13px; color: var(--text3); }
.get { margin: 22px 4px 0; color: var(--text2); font-size: 15px; }
.get strong { color: var(--text); }

/* ---------------------------------------------------------------------------------------------- the other pages */

.intro { padding: 36px 0 8px; }
.appicon { width: 96px; height: 96px; border-radius: 24px; box-shadow: 0 18px 50px rgba(0,0,0,.35); }
.intro h1 { font: 700 clamp(36px, 9vw, 54px)/1.02 "Bricolage", "Inter", sans-serif; letter-spacing: -0.03em; margin: 26px 0 14px; max-width: 12ch; }
.lede { font-size: 18px; color: var(--text2); max-width: 36em; margin: 0; }
.soon { margin: 18px 0 0; font-weight: 600; color: var(--accent); }
.points { display: grid; grid-template-columns: 1fr; gap: 18px; margin-top: 28px; }
.points h2 { color: var(--text); font-size: 16px; margin: 0 0 4px; }
.points p { margin: 0; color: var(--text2); font-size: 15px; }
@media (min-width: 560px) { .points { grid-template-columns: 1fr 1fr; } }

.prose { padding: 22px; }
.prose h1 { font: 700 34px/1.1 "Bricolage", "Inter", sans-serif; letter-spacing: -0.02em; margin: 4px 0 6px; }
.prose .meta { color: var(--text3); font-size: 14px; margin-top: 0; }
.prose h2 { color: var(--text); font-size: 17px; margin: 24px 0 8px; }
.prose p, .prose li { color: var(--text2); }
.prose ul { padding-left: 20px; }
.prose li { margin: 6px 0; }
.note h1 { font: 700 26px/1.15 "Bricolage", "Inter", sans-serif; margin: 0 0 8px; }
.note p { margin: 0; color: var(--text2); }

footer.foot { padding-top: 26px; padding-bottom: 40px; font-size: 13px; color: var(--text3); }

@media (prefers-reduced-motion: reduce) {
  .live .dot { animation: none; }
  .track .fill, .track .plane { transition: none; }
}
