/* Crewlog — brand foundation.
 *
 * Every value in this file is the app's own, lifted from the asset catalog,
 * SkylogPalette.swift, FlightCardView.swift, SkylogCard.swift and
 * LaunchSplashView.swift. A page that uses these tokens looks like the app
 * because it is drawn with the app's numbers, not because it was matched by
 * eye. Change a colour in the app and change it here, in the same commit.
 *
 * Shared by every page on crewlogapp.com. Page-specific layout lives with the
 * page (site.css for the landing page).
 */

:root {
  /* ── Grounds: the "Flight Deck" dark palette ─────────────────────────── */
  --ink:          #02050A;  /* appBackground (dark) — the page */
  --ink-2:        #0D131B;  /* appSecondaryBackground — every card */
  --ink-3:        #141B24;  /* appTertiaryBackground */
  --ink-rail:     #19212A;  /* mediumGray — rails and the logbook date column */
  --card-ink:     #06070A;  /* flightCardBackground — flight card, Live Activity, widgets */

  /* ── The icon: slate case, green horizon ─────────────────────────────── */
  --slate:        #18262D;  /* the ball, and darkBackground in light mode */
  --slate-rim:    #22353D;  /* the case */
  --canvas-top:   #17242A;  /* launch canvas, top */
  --canvas-bot:   #0C1418;  /* launch canvas, bottom */
  --green:        #10B582;  /* primaryGreen — the horizon, every brand accent */
  --green-rim:    #15A072;  /* the horizon's rim */
  --travel:       #0D8C47;  /* travelFillGreen — the far end of the flown track */

  /* ── Verdicts: colour carries the state, never decoration ────────────── */
  --live-green:   #30D159;  /* liveGreen — early / on time, on ink */
  --live-red:     #FF453B;  /* liveRed — late */
  --amber:        #FF9F0A;  /* dutyAmber — the regulatory clock, and only it */
  --gate:         #FAD13D;  /* gateYellow — airport signage, wayfinding only */

  /* ── Ink text ─────────────────────────────────────────────────────────── */
  --text:         #FFFFFF;
  --text-2:       #8C939D;  /* textLightGray (dark) */
  --text-3:       #5F666F;  /* backgroundGray (dark) */
  --hair:         rgba(255, 255, 255, .12);  /* the flight card's edge: primary at 0.12 */
  --hair-2:       rgba(255, 255, 255, .07);  /* rails: SkylogCard.barTrack */
  --rule:         rgba(255, 255, 255, .09);  /* Hairline on ink */

  /* ── Type ────────────────────────────────────────────────────────────── *
   * Three voices, all Apple's own on Apple devices:
   *   serif  — New York, the onboarding's voice. Headlines and nothing else.
   *   sans   — SF Pro, everything the instrument says.
   *   mono   — SF Mono, raw cockpit text only (METAR, ACARS).
   * Elsewhere: Newsreader stands in for New York (loaded only when the
   * browser has no ui-serif), and the platform's own UI face for SF Pro. */
  --serif: ui-serif, "New York", "Newsreader", "Iowan Old Style", Georgia, serif;
  --sans:  system-ui, -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono:  ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, monospace;

  /* ── Shape ───────────────────────────────────────────────────────────── */
  --r-card:    32px;   /* SkylogCard.radius */
  --r-inner:   28px;   /* SkylogCard.innerRadius */
  --r-compact: 20px;   /* SkylogCard.compactRadius */
  --pad-card:  26px;   /* SkylogCard.padding */

  /* ── Motion ──────────────────────────────────────────────────────────── *
   * Instruments settle; they don't bounce. The springs are the app's own
   * SwiftUI springs sampled into linear():
   *   --spring-card    .spring(response: 0.9, dampingFraction: 0.75) — a card arriving
   *   --spring-smooth  .smooth(duration: 0.42, extraBounce: 0.12)   — a value changing */
  --ease-out: cubic-bezier(.215, .61, .355, 1);        /* easeOutCubic — the splash's entrance curve */
  --ease-inout: cubic-bezier(.645, .045, .355, 1);     /* easeInOutCubic */
  --spring-card: linear(0, .0236, .0839, .1675, .2638, .3648, .4647, .5593, .646, .7231, .7901, .8469, .8939, .9319, .9619, .9848, 1.0017, 1.0136, 1.0214, 1.026, 1.0281, 1.0283, 1.0272, 1.0252, 1.0226, 1.0198, 1.017, 1.0142, 1.0116, 1.0092, 1.0071, 1.0053, 1.0038, 1.0026, 1.0016, 1.0008, 1.0002, .9998, .9995, .9993, 1);
  --spring-card-dur: 1.32s;
  --spring-smooth: linear(0, .0172, .0612, .1229, .195, .2722, .3505, .427, .4997, .5675, .6295, .6854, .7352, .779, .8173, .8502, .8785, .9024, .9225, .9392, .9531, .9644, .9735, .9809, .9867, .9913, .9948, .9974, .9994, 1.0008, 1.0018, 1.0024, 1.0028, 1.0029, 1.003, 1.0029, 1.0027, 1.0025, 1.0023, 1.0021, 1);
  --spring-smooth-dur: .52s;

  --max: 1240px;
  --gutter: clamp(16px, 4vw, 40px);
  color-scheme: dark;
}

/* ── Base ─────────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; padding: 0; }
html { background: var(--ink); -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  background: var(--ink);
  color: var(--text);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  font-feature-settings: "kern";
  overflow-x: clip;
}
img, svg, video, canvas { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
::selection { background: var(--green); color: #fff; }
:focus-visible { outline: 2px solid var(--green); outline-offset: 3px; border-radius: 6px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.wrap { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }
.num { font-variant-numeric: tabular-nums; }

/* ── The three voices ─────────────────────────────────────────────────── */

/* Eyebrow: OBHeadline's caption — caption2 semibold, kerning 1.5, accent. */
.eyebrow {
  display: inline-block;
  font: 600 12px/1.2 var(--sans);
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--green);
}

/* Display: New York regular, with the accent phrase on its own line in the
 * horizon green — the onboarding's exact headline recipe. */
.display {
  font-family: var(--serif);
  font-weight: 400;
  letter-spacing: -.012em;
  line-height: 1.04;
  text-wrap: balance;
}
.display .accent { display: block; color: var(--green); }
.d1 { font-size: clamp(44px, 7.4vw, 104px); letter-spacing: -.02em; line-height: 1.0; }
.d2 { font-size: clamp(36px, 5.2vw, 72px); }
.d3 { font-size: clamp(28px, 3.2vw, 42px); line-height: 1.1; }

/* Body: SF Pro in the secondary ink, with a white lead-in — the first phrase
 * says the thing, the rest explains it. */
.lede { font-size: clamp(17px, 1.5vw, 20px); line-height: 1.55; color: var(--text-2); text-wrap: pretty; }
.lede b, .lede strong { color: var(--text); font-weight: 600; }

/* Caption: the label over every number on the card — 9.5 bold, +1.1 tracking. */
.caption {
  font: 700 9.5px/1.2 var(--sans);
  letter-spacing: .116em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, .42);
}

/* ── Buttons ──────────────────────────────────────────────────────────── */
/* OBPrimaryButton: a green capsule with white semibold text. White on the
 * horizon green, never dark — the app's button, not a web button. */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  height: 52px; padding: 0 26px; border-radius: 999px;
  font: 600 16px/1 var(--sans); letter-spacing: -.005em; white-space: nowrap;
  transition: transform .5s var(--spring-smooth), background-color .25s, box-shadow .35s, border-color .25s;
}
.btn:active { transform: scale(.97); }
.btn-primary {
  background: var(--green); color: #fff;
  box-shadow: 0 10px 30px -10px rgba(16, 181, 130, .55), inset 0 1px 0 rgba(255, 255, 255, .18);
}
.btn-primary:hover { background: #13c28c; box-shadow: 0 14px 40px -12px rgba(16, 181, 130, .7), inset 0 1px 0 rgba(255, 255, 255, .22); }
/* Glass: the app's Liquid Glass controls on a dark ground. */
.btn-glass {
  color: var(--text);
  background: rgba(38, 44, 52, .55);
  border: 1px solid rgba(255, 255, 255, .12);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .10), 0 8px 24px -12px rgba(0, 0, 0, .6);
  -webkit-backdrop-filter: blur(18px) saturate(160%);
  backdrop-filter: blur(18px) saturate(160%);
}
.btn-glass:hover { background: rgba(52, 60, 70, .6); border-color: rgba(255, 255, 255, .18); }
.btn svg { width: 18px; height: 18px; flex: none; }

/* ── The mark ─────────────────────────────────────────────────────────── */
/* The attitude indicator. Inline <svg class="mark"> built by mark.js, or the
 * static <img src="/assets/mark.svg">. Never boxed: it is a round instrument,
 * not a rounded-square app tile. */
.mark { width: 28px; height: 28px; flex: none; overflow: visible; }

/* Wordmark: set, never drawn — SF Pro Bold, as the launch splash sets it. */
.wordmark { font: 700 19px/1 var(--sans); letter-spacing: -.012em; color: var(--text); }

.lockup { display: inline-flex; align-items: center; gap: 10px; }

/* ── Navigation ───────────────────────────────────────────────────────── */
.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  height: 68px;
  transition: background-color .4s, border-color .4s, -webkit-backdrop-filter .4s, backdrop-filter .4s;
  border-bottom: 1px solid transparent;
}
.nav.solid {
  background: rgba(2, 5, 10, .72);
  border-bottom-color: rgba(255, 255, 255, .06);
  -webkit-backdrop-filter: blur(20px) saturate(150%);
  backdrop-filter: blur(20px) saturate(150%);
}
.nav-inner { height: 100%; display: flex; align-items: center; gap: 28px; }
.nav-links { display: flex; gap: 26px; margin-left: auto; }
.nav-links a { font: 500 14px/1 var(--sans); color: var(--text-2); transition: color .2s; }
.nav-links a:hover, .nav-links a[aria-current="true"] { color: var(--text); }
.nav .btn { height: 38px; padding: 0 18px; font-size: 14px; }
@media (max-width: 900px) { .nav-links { display: none; } .nav .btn { margin-left: auto; } }

/* ── Footer ───────────────────────────────────────────────────────────── */
.footer { border-top: 1px solid rgba(255, 255, 255, .06); padding: 56px 0 72px; color: var(--text-3); font-size: 14px; }
.footer-row { display: flex; justify-content: space-between; align-items: center; gap: 24px; flex-wrap: wrap; }
.footer nav { display: flex; gap: 22px; flex-wrap: wrap; }
.footer nav a { color: var(--text-2); }
.footer nav a:hover { color: var(--text); }
.footer .fine { margin-top: 28px; font: 500 11px/1.6 var(--sans); letter-spacing: .08em; text-transform: uppercase; }

/* No transitions until the page has painted: see the 'preload' note in each page's head. */
.preload *, .preload *::before, .preload *::after { transition: none !important; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}
