/* Pilot App Pro – site styles. Chart-paper base, navy ink, the active-route magenta as the one accent. */
:root {
  --paper: #eef3f6;
  --paper-2: #e2eaef;
  --ink: #13293d;
  --ink-2: #48606f;
  --route: #c2187e;
  --cyan: #0f7aa8;
  --amber: #b87900;
  --line: #c6d3db;
  --card: #f8fbfc;
  --display: "Barlow", system-ui, sans-serif;
  --body: "Atkinson Hyperlegible", system-ui, sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --paper: #0c1a28;
    --paper-2: #112436;
    --ink: #e4edf2;
    --ink-2: #9bb0bd;
    --route: #ef4fae;
    --cyan: #4cc0ee;
    --amber: #e8b14a;
    --line: #23394c;
    --card: #10223300;
    color-scheme: dark;
  }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 1.0625rem/1.6 var(--body);
}
a { color: var(--cyan); text-underline-offset: 0.18em; }
a:hover { color: var(--route); }
:focus-visible { outline: 3px solid var(--route); outline-offset: 3px; border-radius: 4px; }
img { max-width: 100%; height: auto; display: block; }

.wrap { max-width: 1120px; margin: 0 auto; padding: 0 24px; }
@media (max-width: 600px) { .wrap { padding: 0 16px; } }

/* Header */
.site-head { border-bottom: 1px solid var(--line); }
.site-head .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 64px; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font: 600 1.25rem/1 var(--display); letter-spacing: 0.01em; }
.brand svg { flex: none; }
.site-nav { display: flex; gap: 22px; font-family: var(--display); font-weight: 500; font-size: 1.05rem; }
.site-nav a { color: var(--ink-2); text-decoration: none; padding: 6px 0; border-bottom: 2px solid transparent; }
.site-nav a:hover { color: var(--ink); }
.site-nav a[aria-current="page"] { color: var(--ink); border-bottom-color: var(--route); }

/* Type */
h1, h2, h3 { font-family: var(--display); color: var(--ink); line-height: 1.1; margin: 0; }
h1 { font-weight: 600; font-size: clamp(2.6rem, 6vw, 4.6rem); letter-spacing: -0.01em; max-width: 14ch; }
h2 { font-weight: 600; font-size: clamp(1.75rem, 3.2vw, 2.4rem); margin-bottom: 0.6em; }
h3 { font-weight: 600; font-size: 1.3rem; margin-bottom: 0.35em; }
p { margin: 0 0 1em; max-width: 68ch; }
.lede { font-size: 1.25rem; color: var(--ink-2); max-width: 46ch; }

/* Hero: the route is the picture */
.hero { padding-top: 56px; padding-bottom: 24px; }
.hero-route { margin: 28px 0 8px; }
.hero-route svg { width: 100%; height: auto; overflow: visible; }
.route-line { fill: none; stroke: var(--route); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.route-fix { fill: var(--paper); stroke: var(--route); stroke-width: 2.5; }
.route-apt { fill: var(--route); }
.route-label { font: 600 13px var(--display); fill: var(--ink-2); letter-spacing: 0.04em; }
.route-label.apt { fill: var(--ink); font-size: 16px; }
.route-meta { font: 500 12px var(--body); fill: var(--ink-2); }
.graticule { stroke: var(--line); stroke-width: 1; }
@media (prefers-reduced-motion: no-preference) {
  .route-line { stroke-dasharray: 1600; stroke-dashoffset: 1600; animation: fly 2.6s cubic-bezier(.45,.05,.3,1) .3s forwards; }
  .route-fix, .route-label { opacity: 0; animation: show .4s ease forwards; animation-delay: calc(.4s + var(--d, 0s)); }
  @keyframes fly { to { stroke-dashoffset: 0; } }
  @keyframes show { to { opacity: 1; } }
}
.cta-row { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 28px; }
.btn { display: inline-block; font: 600 1.05rem/1 var(--display); padding: 14px 22px; border-radius: 10px; text-decoration: none; border: 2px solid var(--ink); color: var(--ink); }
.btn.primary { background: var(--ink); color: var(--paper); }
.btn:hover { border-color: var(--route); color: var(--route); }
.btn.primary:hover { background: var(--route); color: #fff; border-color: var(--route); }

/* Sections */
section { padding: 56px 0; }
section + section { border-top: 1px solid var(--line); }
.note { color: var(--ink-2); font-size: 0.95rem; }

/* Screens */
.screens { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 28px; margin-top: 8px; }
.screens figure { margin: 0; }
.screens img { border-radius: 18px; border: 1px solid var(--line); box-shadow: 0 18px 40px -24px rgba(19,41,61,.45); background: var(--paper-2); }
.screens figcaption { margin-top: 12px; color: var(--ink-2); font-size: 0.98rem; }
.screens figcaption b { color: var(--ink); font-family: var(--display); font-weight: 600; font-size: 1.08rem; display: block; }

/* Flight phases: a real sequence, so it is drawn as one */
.phases { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; position: relative; margin-top: 12px; }
.phases::before { content: ""; position: absolute; left: 0; right: 0; top: 11px; height: 3px; background: var(--route); border-radius: 2px; }
.phase { padding: 40px 24px 0 0; position: relative; }
.phase::before { content: ""; position: absolute; top: 2px; left: 0; width: 18px; height: 18px; border-radius: 50%; background: var(--paper); border: 3px solid var(--route); }
.phase ul { margin: 0; padding-left: 1.1em; }
.phase li { margin: 0 0 0.5em; }
.phase li b { font-weight: 700; }
@media (max-width: 820px) {
  .phases { grid-template-columns: 1fr; }
  .phases::before { left: 8px; right: auto; top: 0; bottom: 0; width: 3px; height: auto; }
  .phase { padding: 0 0 28px 40px; }
  .phase::before { top: 4px; left: 0; }
}

/* Editions */
.editions { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; }
.edition { border-left: 4px solid var(--line); padding: 4px 0 4px 20px; }
.edition.pro2 { border-left-color: var(--route); }
@media (max-width: 700px) { .editions { grid-template-columns: 1fr; } }

.principles { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 24px 36px; }
.principles p { margin: 0; color: var(--ink-2); }

/* Docs pages */
.doc { display: grid; grid-template-columns: 230px 1fr; gap: 48px; padding: 48px 0 72px; }
.toc { position: sticky; top: 24px; align-self: start; font-family: var(--display); }
.toc ol { list-style: none; margin: 0; padding: 0; border-left: 2px solid var(--line); }
.toc a { display: block; padding: 5px 0 5px 14px; color: var(--ink-2); text-decoration: none; margin-left: -2px; border-left: 2px solid transparent; }
.toc a:hover { color: var(--ink); border-left-color: var(--route); }
.doc article h2 { margin-top: 1.6em; padding-top: 0.2em; scroll-margin-top: 16px; }
.doc article h2:first-of-type { margin-top: 0; }
.doc article ul, .doc article ol { padding-left: 1.2em; max-width: 68ch; }
.doc article li { margin-bottom: 0.45em; }
.callout { border-left: 4px solid var(--amber); padding: 10px 16px; background: var(--paper-2); border-radius: 0 8px 8px 0; max-width: 68ch; margin: 0 0 1.2em; }
kbd, .ui { font-family: var(--display); font-weight: 600; white-space: nowrap; }
@media (max-width: 860px) { .doc { grid-template-columns: 1fr; gap: 24px; } .toc { position: static; } }

/* Changelog */
.release { display: grid; grid-template-columns: 170px 1fr; gap: 24px; padding: 28px 0; border-top: 1px solid var(--line); }
.release:first-of-type { border-top: 0; }
.release time { font: 600 1.05rem/1.3 var(--display); color: var(--ink-2); }
.release h3 span { color: var(--route); }
.release ul { margin: 0.4em 0 0; padding-left: 1.2em; }
.release li { margin-bottom: 0.4em; max-width: 68ch; }
@media (max-width: 640px) { .release { grid-template-columns: 1fr; gap: 6px; } }

.site-foot { border-top: 1px solid var(--line); padding: 28px 0 40px; color: var(--ink-2); font-size: 0.92rem; }
.site-foot .wrap { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
@media (max-width: 600px) {
  .route-label:not(.apt) { display: none; }
  .route-label.apt { font-size: 26px; }
  .route-line { stroke-width: 5; }
}
