/* Groundtrack — one stylesheet for the whole site.
   Every colour is taken from BRAND.md / ios/FlightdeckAtlas/Palette.swift.
   Nothing here is loaded from anywhere but this server: no font service,
   no script, no beacon, no cookie. The app refuses to phone home and so
   does its website. */

/* ------------------------------------------------------------------ *
 * Tokens
 * ------------------------------------------------------------------ */

:root {
  /* Track blue — the brand colour. Palette.ownShip, light value. */
  --accent:        #0A63C9;
  --accent-ink:    #FFFFFF;      /* text on an accent fill */

  /* The five families, light values. Used as small signals only. */
  --terrain:       #9C5B2E;
  --water:         #1A6F80;
  --coast:         #2E8B74;
  --settlement:    #4A4E57;
  --heritage:      #6B4C9A;

  /* Day backdrop, sampled from the light-scheme map. */
  --bg:            #F7FAFC;
  --bg-deep:       #E7F0F5;
  --surface:       #FFFFFF;
  --surface-2:     #EFF5F9;

  --ink:           #0C2334;
  --ink-dim:       #3C6076;      /* 6.4:1 on --bg, 5.8:1 on --bg-deep */
  --ink-faint:     #526C7E;      /* 5.3:1 on --bg, 4.8:1 on --bg-deep.
                                    Used at 12-15px for the colophon,
                                    doc dates and footer headings, so it
                                    has to clear 4.5:1 as NORMAL text on
                                    every light surface — not 3:1. */
  --rule:          rgba(12, 35, 52, 0.14);
  --rule-strong:   rgba(12, 35, 52, 0.28);

  --mark-line:     #0C2334;
  --graticule:     rgba(10, 60, 100, 0.40);
  --shadow:        0 1px 2px rgba(12, 35, 52, .06),
                   0 12px 32px rgba(12, 35, 52, .08);
  --shadow-lift:   0 2px 6px rgba(12, 35, 52, .10),
                   0 30px 70px rgba(12, 35, 52, .16);

  --measure:       36rem;        /* prose width */
  --page:          70rem;        /* page width */
  --radius:        16px;         /* BRAND.md: cards and sheets, 16pt */
}

@media (prefers-color-scheme: dark) {
  :root {
    --accent:      #4FA3FF;      /* Palette.ownShip, dark value */
    --accent-ink:  #041220;

    --terrain:     #D08A4E;
    --water:       #4FB6C8;
    --coast:       #57C6A6;
    --settlement:  #AAB0BC;
    --heritage:    #AB8DD9;

    /* Night backdrop, sampled from the app's own map. */
    --bg:          #050D16;
    --bg-deep:     #0A1B2B;
    --surface:     #0C1D2D;
    --surface-2:   #123047;

    --ink:         #FFFFFF;
    --ink-dim:     #9FC4DE;      /* 10.6:1 on --bg */
    /* dark --ink-faint is 7.3:1 on --bg; the dark scheme was already fine */
    --ink-faint:   #7FA3BF;
    --rule:        rgba(159, 196, 222, 0.18);
    --rule-strong: rgba(159, 196, 222, 0.34);

    --mark-line:   #FFFFFF;
    --graticule:   rgba(255, 255, 255, 0.34);
    --shadow:      0 1px 2px rgba(0, 0, 0, .40),
                   0 12px 32px rgba(0, 0, 0, .45);
    --shadow-lift: 0 2px 6px rgba(0, 0, 0, .45),
                   0 30px 70px rgba(0, 0, 0, .60);
  }
}

/* ------------------------------------------------------------------ *
 * Reset and base
 * ------------------------------------------------------------------ */

*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }

html {
  /* No custom face, ever (BRAND.md). This is what the app uses. */
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
               "Helvetica Neue", Arial, sans-serif;
  -webkit-text-size-adjust: 100%;
  /* Deliberately not scroll-behavior: smooth. An in-page link should land
     where it says it lands, immediately; animating it costs orientation and
     buys nothing. */
}

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

body {
  background: var(--bg);
  color: var(--ink);
  font-size: 1.0625rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img, svg { display: block; max-width: 100%; }
img { height: auto; }

h1, h2, h3, h4 { line-height: 1.12; font-weight: 700; letter-spacing: -0.021em; }
h1 { font-size: clamp(2.25rem, 6.4vw, 4rem); letter-spacing: -0.032em; }
h2 { font-size: clamp(1.75rem, 4.2vw, 2.6rem); letter-spacing: -0.026em; }
h3 { font-size: clamp(1.2rem, 2.4vw, 1.4rem); letter-spacing: -0.016em; }
h4 { font-size: 1.0625rem; letter-spacing: -0.01em; }

p, li { text-wrap: pretty; }
strong { font-weight: 650; color: var(--ink); }

a {
  color: var(--accent);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}
a:hover { text-decoration-thickness: 2px; }

:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

::selection { background: var(--accent); color: var(--accent-ink); }

.skip {
  position: absolute; left: 0; top: 0;
  padding: .7rem 1.1rem;
  background: var(--accent); color: var(--accent-ink);
  font-weight: 650; text-decoration: none;
  transform: translateY(-120%);
  z-index: 100;
}
.skip:focus { transform: translateY(0); }

.visually-hidden {
  position: absolute; width: 1px; height: 1px;
  padding: 0; overflow: hidden; clip: rect(0 0 0 0);
  white-space: nowrap; border: 0;
}

/* ------------------------------------------------------------------ *
 * Layout
 * ------------------------------------------------------------------ */

.wrap {
  width: 100%;
  max-width: var(--page);
  margin-inline: auto;
  padding-inline: 1.25rem;
}
@media (min-width: 40em) { .wrap { padding-inline: 2rem; } }

.prose { max-width: var(--measure); }
.prose > * + * { margin-top: 1.1em; }
.prose h2 { margin-top: 2.4em; }
.prose h3 { margin-top: 1.9em; }
.prose ul { padding-left: 1.2em; }
.prose li + li { margin-top: .45em; }

section { padding-block: clamp(3.5rem, 9vw, 7rem); }

/* An eyebrow, per BRAND.md: caption, semibold, uppercase, tracked. */
.eyebrow {
  font-size: .75rem;
  font-weight: 650;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: .9rem;
}

.lede {
  font-size: clamp(1.1rem, 2.3vw, 1.35rem);
  line-height: 1.5;
  color: var(--ink-dim);
}

/* ------------------------------------------------------------------ *
 * The mark
 * ------------------------------------------------------------------ */

/* Same geometry as TrackMark in ios/FlightdeckAtlas/Splash.swift: a track
   over the curve of the earth, with its downloaded corridor either side.
   Inline, so it costs no request. */
.mark { width: auto; }
.mark .corridor { stroke: var(--accent); fill: none; stroke-linecap: round; }
.mark .line     { stroke: var(--mark-line); fill: none; stroke-linecap: round; }
.mark .cap      { fill: var(--mark-line); }
.mark .pip      { fill: var(--accent); }

.wordmark {
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--ink);
  text-decoration: none;
}

/* ------------------------------------------------------------------ *
 * Site header
 * ------------------------------------------------------------------ */

.site-header {
  position: relative;
  z-index: 5;
  border-bottom: 1px solid var(--rule);
  background: var(--bg);
}
.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 4rem;
  flex-wrap: wrap;
}
.brand {
  display: flex;
  align-items: center;
  gap: .6rem;
  text-decoration: none;
  padding-block: .75rem;
}
.brand .mark { height: 1.5rem; }
.brand .wordmark { font-size: 1.125rem; }

.site-nav {
  display: flex;
  align-items: center;
  gap: 1.35rem;
  font-size: .9375rem;
  padding-bottom: .5rem;
}
@media (min-width: 40em) { .site-nav { padding-bottom: 0; } }
.site-nav a {
  color: var(--ink-dim);
  text-decoration: none;
  font-weight: 550;
}
.site-nav a:hover { color: var(--accent); text-decoration: underline; }
.site-nav a[aria-current="page"] { color: var(--ink); }

/* ------------------------------------------------------------------ *
 * Hero
 * ------------------------------------------------------------------ */

.hero {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(120% 78% at 50% -8%,
      var(--bg-deep) 0%, var(--bg) 62%, var(--bg) 100%);
  padding-block: clamp(3rem, 8vw, 6rem) 0;
}

/* A faint grid of parallels, so the page belongs to an atlas.
   Two repeating gradients; no image request. */
.graticule {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: .5;
  background-image:
    repeating-linear-gradient(to bottom,
      var(--graticule) 0 1px, transparent 1px 72px),
    repeating-linear-gradient(to right,
      var(--graticule) 0 1px, transparent 1px 72px);
  -webkit-mask-image: radial-gradient(95% 65% at 50% 12%, #000 0%, transparent 76%);
          mask-image: radial-gradient(95% 65% at 50% 12%, #000 0%, transparent 76%);
}

.hero .wrap { position: relative; }

.hero-grid {
  display: grid;
  gap: clamp(2rem, 5vw, 3.5rem);
  align-items: center;
}
@media (min-width: 56em) {
  .hero-grid {
    grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr);
    gap: 3rem;
  }
}

.hero h1 { margin-bottom: 1.1rem; }
.hero .lede { max-width: 30rem; }

.hero-mark { height: 3.2rem; margin-bottom: 1.6rem; }

/* ------------------------------------------------------------------ *
 * Actions
 * ------------------------------------------------------------------ */

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: .75rem;
  margin-top: 2rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  padding: .8rem 1.35rem;
  border-radius: 999px;
  font-weight: 650;
  font-size: 1rem;
  text-decoration: none;
  border: 1.5px solid transparent;
  transition: background-color .15s ease, border-color .15s ease, color .15s ease;
}
.btn-primary {
  background: var(--accent);
  color: var(--accent-ink);
}
.btn-primary:hover { background: var(--ink); color: var(--bg); }
.btn-secondary {
  border-color: var(--rule-strong);
  color: var(--ink);
}
.btn-secondary:hover { border-color: var(--accent); color: var(--accent); }

.status-note {
  margin-top: 1.1rem;
  font-size: .9375rem;
  color: var(--ink-faint);
  max-width: 28rem;
}

/* ------------------------------------------------------------------ *
 * Device frame
 * ------------------------------------------------------------------ */

/* Captures are 1320 × 2868 (0.4603 : 1). The frame sets a width and the
   screen height follows from the aspect ratio, so a device can never be
   squashed — the same rule as docs/store/marketing/src/base.css. */
.device {
  --dw: 17.5rem;
  width: var(--dw);
  padding: calc(var(--dw) * .0135);
  border-radius: calc(var(--dw) * .088);
  background: #0A0A0C;
  box-shadow:
    0 0 0 1.5px rgba(255, 255, 255, .12) inset,
    var(--shadow-lift);
  margin-inline: auto;
}
.device .screen {
  border-radius: calc(var(--dw) * .0755);
  overflow: hidden;
  background: #000;
}
.device img { width: 100%; }

.device-lg { --dw: min(19rem, 76vw); }
@media (min-width: 56em) { .device-lg { --dw: 20rem; } }

/* ------------------------------------------------------------------ *
 * Figures strip
 * ------------------------------------------------------------------ */

.figures {
  border-block: 1px solid var(--rule);
  background: var(--surface-2);
}
.figures ul {
  list-style: none;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.75rem 1rem;
}
@media (min-width: 46em) {
  .figures ul { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
.figures .n {
  display: block;
  font-size: clamp(1.9rem, 4.6vw, 2.75rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
  color: var(--accent);
  line-height: 1.05;
}
.figures .l {
  display: block;
  margin-top: .35rem;
  font-size: .9375rem;
  color: var(--ink-dim);
}

/* ------------------------------------------------------------------ *
 * Alternating feature rows
 * ------------------------------------------------------------------ */

.row {
  display: grid;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
}
@media (min-width: 56em) {
  .row { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .row.flip .row-text { order: 2; }
}
.row + .row { margin-top: clamp(3.5rem, 9vw, 6.5rem); }
.row-text > * + * { margin-top: 1rem; }
.row-text p { color: var(--ink-dim); max-width: 30rem; }
.row-text h2 { color: var(--ink); }

.detail {
  list-style: none;
  padding: 0;
  margin-top: 1.4rem !important;
  display: grid;
  gap: .55rem;
  font-size: .9375rem;
  color: var(--ink-dim);
}
.detail li {
  display: grid;
  grid-template-columns: .65rem 1fr;
  gap: .7rem;
  align-items: start;
}
.detail li::before {
  content: "";
  width: .5rem; height: .5rem;
  margin-top: .48rem;
  border-radius: 50%;
  background: var(--dot, var(--accent));
}

/* ------------------------------------------------------------------ *
 * Cards
 * ------------------------------------------------------------------ */

.cards {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
  margin-top: 2.5rem;
}
.card {
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  padding: 1.4rem;
  box-shadow: var(--shadow);
}
.card h3 { margin-bottom: .5rem; }
.card p { color: var(--ink-dim); font-size: .9375rem; }

/* ------------------------------------------------------------------ *
 * The privacy panel
 * ------------------------------------------------------------------ */

.panel {
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  padding: clamp(1.5rem, 4vw, 2.75rem);
  box-shadow: var(--shadow);
}
.panel-split {
  display: grid;
  gap: clamp(1.5rem, 4vw, 3rem);
}
@media (min-width: 52em) {
  .panel-split { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
}

.claims {
  list-style: none;
  padding: 0;
  display: grid;
  gap: .9rem;
}
.claims li {
  display: grid;
  grid-template-columns: 1.4rem 1fr;
  gap: .8rem;
  align-items: start;
}
.claims svg { width: 1.4rem; height: 1.4rem; margin-top: .18rem; }
.claims .k { display: block; font-weight: 650; }
.claims .v { display: block; color: var(--ink-dim); font-size: .9375rem; }

/* ------------------------------------------------------------------ *
 * The disclaimer — deliberately plain, not a warning box
 * ------------------------------------------------------------------ */

.disclaimer {
  border-left: 3px solid var(--accent);
  padding: .2rem 0 .2rem 1.25rem;
  max-width: var(--measure);
}
.disclaimer p + p { margin-top: .8rem; }
.disclaimer p { color: var(--ink-dim); }
.disclaimer strong { color: var(--ink); }

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

.doc-header {
  border-bottom: 1px solid var(--rule);
  background:
    radial-gradient(110% 100% at 50% -20%,
      var(--bg-deep) 0%, var(--bg) 70%);
  padding-block: clamp(2.5rem, 6vw, 4rem);
}
.doc-header h1 { font-size: clamp(2rem, 5vw, 3rem); }
.doc-header .lede { margin-top: 1rem; max-width: var(--measure); }
.doc-meta {
  margin-top: 1.5rem;
  font-size: .875rem;
  color: var(--ink-faint);
}

.summary {
  background: var(--surface-2);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  padding: 1.35rem 1.5rem;
  max-width: var(--measure);
}
.summary h2 { font-size: 1.0625rem; margin: 0 0 .6rem; letter-spacing: -0.01em; }
.summary ul { margin: 0; padding-left: 1.15rem; }
.summary li { color: var(--ink-dim); }
.summary li + li { margin-top: .3rem; }

.toc {
  list-style: none;
  padding: 0;
  margin: 0 0 1rem;
  font-size: .9375rem;
  columns: 2;
  column-gap: 2rem;
}
.toc li { margin-bottom: .35rem; break-inside: avoid; }
/* Two 8rem columns of wrapped link text is worse than one readable one. */
@media (max-width: 34em) { .toc { columns: 1; } }

table.plain {
  width: 100%;
  border-collapse: collapse;
  font-size: .9375rem;
  margin-top: 1.1em;
}
table.plain th, table.plain td {
  text-align: left;
  vertical-align: top;
  padding: .6rem .8rem .6rem 0;
  border-bottom: 1px solid var(--rule);
}
table.plain th { font-weight: 650; color: var(--ink); }
table.plain td { color: var(--ink-dim); }
table.plain caption {
  text-align: left;
  font-size: .875rem;
  color: var(--ink-faint);
  padding-bottom: .5rem;
}

/* ------------------------------------------------------------------ *
 * Footer
 * ------------------------------------------------------------------ */

.site-footer {
  border-top: 1px solid var(--rule);
  background: var(--surface-2);
  padding-block: 3rem 3.5rem;
  font-size: .9375rem;
  color: var(--ink-dim);
}
.footer-grid {
  display: grid;
  gap: 2rem;
}
@media (min-width: 46em) {
  .footer-grid { grid-template-columns: minmax(0, 1.4fr) repeat(2, minmax(0, 1fr)); }
}
.site-footer h2 {
  font-size: .75rem;
  font-weight: 650;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin-bottom: .8rem;
}
.site-footer ul { list-style: none; padding: 0; display: grid; gap: .45rem; }
.site-footer a { color: var(--ink-dim); }
.site-footer a:hover { color: var(--accent); }
.site-footer .brand { padding-block: 0; margin-bottom: .9rem; }
.colophon {
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--rule);
  font-size: .875rem;
  color: var(--ink-faint);
  max-width: 44rem;
}
.colophon p + p { margin-top: .6rem; }

/* ------------------------------------------------------------------ *
 * Unfilled facts
 * ------------------------------------------------------------------ */

/* A detail that only the publisher can supply. Deliberately conspicuous:
   an invented email address that bounces is worse than a visible gap, and
   web/README.md lists every one of these. */
.fill {
  display: inline-block;
  padding: .05em .45em;
  border: 1.5px dashed var(--rule-strong);
  border-radius: 6px;
  background: var(--surface-2);
  color: var(--ink-faint);
  font-size: .9em;
  font-weight: 550;
}

/* ------------------------------------------------------------------ *
 * Hero privacy strip
 * ------------------------------------------------------------------ */

/* Privacy is what this app is selling, so it sits in the first screenful
   rather than in a grid cell three sections down. NN/g's eye-tracking work
   (2018, 120 participants) puts 57% of viewing time in the first screenful. */
.hero-privacy {
  list-style: none;
  padding: 1.75rem 0 0;
  margin-top: clamp(2.5rem, 6vw, 4rem);
  border-top: 1px solid var(--rule);
  display: grid;
  gap: .9rem 2rem;
  font-size: .9375rem;
  color: var(--ink-dim);
  padding-bottom: clamp(2.5rem, 6vw, 4rem);
}
@media (min-width: 46em) {
  .hero-privacy { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
/* The li is a two-column grid: the ::before ring, then the text. Every child
   of it is a grid item, INCLUDING a bare text node — so an li written as
   `<strong>Bold.</strong> trailing text` puts that trailing text in a third
   item, which wraps into the 1.1rem ring column one word per line. Keep all
   content inside the single <span>. */
.hero-privacy li {
  display: grid;
  grid-template-columns: 1.1rem 1fr;
  gap: .7rem;
  align-items: start;
}
.hero-privacy li::before {
  content: "";
  width: .9rem; height: .9rem;
  margin-top: .3rem;
  border-radius: 50%;
  border: 2.5px solid var(--accent);
}
.hero-privacy strong { font-weight: 600; color: var(--ink); }

/* ------------------------------------------------------------------ *
 * Odds and ends
 * ------------------------------------------------------------------ */

.privacy-section { background: var(--bg-deep); }

.get .panel { background: var(--surface-2); }
.get table.plain { margin-top: 2rem; }
.get table.plain th[scope="row"] { width: 7rem; white-space: nowrap; }

.signoff {
  margin-top: 2.5rem !important;
  font-size: 1.2rem;
  font-weight: 650;
  letter-spacing: -0.02em;
  color: var(--ink);
}

.row-shot { display: flex; justify-content: center; }

/* ------------------------------------------------------------------ *
 * Section modifiers
 * ------------------------------------------------------------------ */

/* Sections that continue the one above rather than starting a new subject,
   so they do not pay for the gap twice. */
.tight { padding-top: 0; }

.figures .wrap { padding-block: 2.5rem; }

/* An eyebrow and the heading under it are one unit. */
.prose .eyebrow + h2,
.panel-body .eyebrow + h2 { margin-top: 0; }

.panel-body p { color: var(--ink-dim); margin-top: 1rem; max-width: 36rem; }
.panel-body .actions p { margin-top: 0; }

.doc-body { margin-top: 2.5rem; }

.disclaimer-block { margin-top: 1.5rem; }

.spec { max-width: 36rem; }
