/* Aeroscribe website
   Palette from the app icon (navy + plane yellow) and the airport surface. */

@font-face { font-family: "Barlow"; font-weight: 400; font-style: normal; font-display: swap; src: url("../fonts/barlow-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Barlow"; font-weight: 400; font-style: italic; font-display: swap; src: url("../fonts/barlow-latin-400-italic.woff2") format("woff2"); }
@font-face { font-family: "Barlow"; font-weight: 500; font-style: normal; font-display: swap; src: url("../fonts/barlow-latin-500-normal.woff2") format("woff2"); }
@font-face { font-family: "Barlow"; font-weight: 600; font-style: normal; font-display: swap; src: url("../fonts/barlow-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "Barlow Condensed"; font-weight: 600; font-style: normal; font-display: swap; src: url("../fonts/barlow-condensed-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "Barlow Condensed"; font-weight: 700; font-style: normal; font-display: swap; src: url("../fonts/barlow-condensed-latin-700-normal.woff2") format("woff2"); }

:root {
  --navy: #2F466E;        /* app icon background */
  --navy-deep: #243957;   /* footer, pressed states */
  --plane: #FFCD68;       /* the plane in the logo; used only for markings */
  --paper: #F4F6F5;       /* page background */
  --card: #FFFFFF;
  --ink: #1C2A38;         /* body text */
  --muted: #56636F;       /* secondary text on paper */
  --asphalt: #30353A;     /* the hold-short band */
  --rule: #D5DBDF;
  --on-navy: #F5F7F9;
  --on-navy-muted: #C4CEDB;

  --display: "Barlow Condensed", "Arial Narrow", sans-serif;
  --text: "Barlow", "Helvetica Neue", Arial, sans-serif;

  --measure: 62ch;
  --page: 1080px;
  --gutter: clamp(16px, 4vw, 40px);
}

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

html { -webkit-text-size-adjust: 100%; scroll-padding-top: 16px; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 1.125rem/1.55 var(--text);
  font-feature-settings: "tnum" 0, "kern" 1;
}

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

a { color: var(--navy); text-decoration-thickness: 1px; text-underline-offset: 0.18em; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--plane); outline-offset: 3px; border-radius: 2px; }

.skip-link { position: absolute; left: -9999px; top: 8px; background: var(--card); color: var(--navy); padding: 8px 12px; z-index: 10; }
.skip-link:focus { left: 8px; }

.wrap { max-width: var(--page); margin: 0 auto; padding: 0 var(--gutter); }

h1, h2 { font-family: var(--display); font-weight: 700; line-height: 1; margin: 0; text-wrap: balance; }
h2 { font-weight: 600; font-size: clamp(2.25rem, 4.5vw, 3rem); letter-spacing: 0.005em; }
h3 { font: 600 1.3125rem/1.25 var(--text); margin: 0 0 6px; }
p { margin: 0 0 1em; max-width: var(--measure); }

/* ---------- Header ---------- */

.site-header { background: var(--navy); color: var(--on-navy); }
.site-header .wrap {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: 12px 32px; padding-top: 18px; padding-bottom: 18px;
}
.site-header .brand img { width: 184px; }
.site-nav { display: flex; flex-wrap: wrap; gap: 4px 24px; }
.site-nav a { color: var(--on-navy); text-decoration: none; font-weight: 500; font-size: 1rem; padding: 6px 0; }
.site-nav a:hover { text-decoration: underline; text-underline-offset: 0.3em; }

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

.hero { background: var(--navy); color: var(--on-navy); padding: clamp(32px, 7vw, 88px) 0 clamp(48px, 8vw, 104px); }
.hero .wrap { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr); gap: clamp(32px, 6vw, 72px); align-items: center; }
.hero h1 { font-size: clamp(3.25rem, 8.5vw, 5.75rem); line-height: 0.94; letter-spacing: -0.005em; margin-bottom: 24px; }
.hero .lede { font-size: clamp(1.1875rem, 2vw, 1.375rem); line-height: 1.5; color: var(--on-navy-muted); max-width: 34ch; margin-bottom: 32px; }
.hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 28px; }

.button {
  display: inline-flex; align-items: center; gap: 12px;
  background: var(--on-navy); color: var(--navy);
  font: 600 1.0625rem/1 var(--text); text-decoration: none;
  padding: 15px 22px; border-radius: 6px;
}
.button:hover { background: #FFFFFF; text-decoration: none; }
.button svg { width: 20px; height: 20px; flex: none; }
.hero-actions .text-link { color: var(--on-navy); font-weight: 500; }

/* The transcript: an example of the app's log, filling in call by call. */
.transcript {
  margin: 0;
  background: var(--card); color: var(--ink);
  border-radius: 14px; padding: 22px 22px 18px;
  box-shadow: 0 1px 0 rgba(20, 32, 52, 0.35), 0 18px 40px -18px rgba(10, 20, 40, 0.55);
}
.transcript-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-bottom: 12px; margin-bottom: 4px; border-bottom: 1px solid var(--rule); }
.transcript-title { font: 600 1rem/1.2 var(--text); margin: 0; }
.receiving { display: flex; align-items: center; gap: 8px; font-size: 0.875rem; color: var(--muted); }
.level { display: flex; align-items: flex-end; gap: 3px; height: 16px; }
.level i { display: block; width: 3px; height: 4px; background: var(--navy); border-radius: 1px; }
.transcript ol { list-style: none; margin: 0; padding: 0; }
.transcript li { padding: 12px 0; border-bottom: 1px solid var(--rule); font-size: 1.0625rem; line-height: 1.45; }
.transcript li:last-child { border-bottom: 0; }
.transcript-note { font-size: 0.8125rem; color: var(--muted); margin: 10px 0 0; }

/* Motion (only with JS and when motion is welcome): calls appear one at a time. */
.js .transcript.is-playing li { opacity: 0; transform: translateY(4px); }
.js .transcript.is-playing li.is-shown { opacity: 1; transform: none; transition: opacity 300ms ease-out, transform 300ms ease-out; }
.js .transcript.is-listening .level i { animation: level 900ms ease-in-out infinite; }
.js .transcript.is-listening .level i:nth-child(2) { animation-delay: -300ms; }
.js .transcript.is-listening .level i:nth-child(3) { animation-delay: -600ms; }
.js .transcript.is-listening .level i:nth-child(4) { animation-delay: -150ms; }
@keyframes level { 0%, 100% { height: 4px; } 50% { height: 16px; } }

/* ---------- Sections ---------- */

.section { padding: clamp(56px, 8vw, 96px) 0; }
.section + .section { border-top: 1px solid var(--rule); }
.section h2 { margin-bottom: 20px; }

.story figure { margin: 0; }
.story blockquote { margin: 0 0 14px; max-width: 40ch; }
.story blockquote p { font: 500 clamp(1.375rem, 2.6vw, 1.75rem)/1.4 var(--text); max-width: none; }
.story figcaption { color: var(--muted); font-size: 1rem; }

.steps { list-style: none; margin: 32px 0 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px; counter-reset: step; }
.steps li { counter-increment: step; }
.steps li::before {
  content: counter(step);
  display: block; font: 700 3rem/1 var(--display); color: var(--navy); margin-bottom: 10px;
}
.steps p { color: var(--muted); }

.two-col { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 32px 56px; margin-top: 8px; }
.plain-list { margin: 0; padding: 0; list-style: none; }
.plain-list li { padding: 14px 0; border-top: 1px solid var(--rule); max-width: var(--measure); }
.plain-list li:last-child { border-bottom: 1px solid var(--rule); }
.plain-list strong { display: block; font-weight: 600; }
.plain-list span { color: var(--muted); }

/* ---------- Hold short: the safety section ---------- */

.hold-short { background: var(--asphalt); color: var(--on-navy); padding: 0 0 clamp(56px, 8vw, 88px); }
/* A runway holding position marking: two solid lines on the taxiway side (top),
   two dashed lines on the runway side. You read it from the taxiway side. */
.hold-marking {
  height: 52px; margin-bottom: clamp(40px, 6vw, 64px);
  background:
    linear-gradient(var(--plane), var(--plane)) 0 10px / 100% 6px no-repeat,
    linear-gradient(var(--plane), var(--plane)) 0 22px / 100% 6px no-repeat,
    repeating-linear-gradient(90deg, var(--plane) 0 36px, transparent 36px 72px) 0 34px / 100% 6px no-repeat,
    repeating-linear-gradient(90deg, var(--plane) 0 36px, transparent 36px 72px) 0 46px / 100% 6px no-repeat;
}
.hold-short h2 { color: #FFFFFF; font-size: clamp(2.5rem, 6vw, 4rem); margin-bottom: 24px; max-width: 16ch; }
.hold-short p { color: #D9DEE3; }
.hold-short ul { margin: 0 0 24px; padding-left: 1.2em; max-width: var(--measure); color: #D9DEE3; }
.hold-short li { margin: 6px 0; }
.hold-short a { color: #FFFFFF; }

/* ---------- FAQ ---------- */

.faq details { border-top: 1px solid var(--rule); max-width: 760px; }
.faq details:last-of-type { border-bottom: 1px solid var(--rule); }
.faq summary {
  cursor: pointer; list-style: none; padding: 18px 40px 18px 0; position: relative;
  font: 600 1.1875rem/1.35 var(--text);
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: ""; position: absolute; right: 6px; top: 50%; width: 10px; height: 10px; margin-top: -7px;
  border-right: 2px solid var(--navy); border-bottom: 2px solid var(--navy); transform: rotate(45deg);
  transition: transform 160ms ease-out;
}
.faq details[open] summary::after { transform: rotate(-135deg); margin-top: -2px; }
.faq details p { color: var(--muted); padding-bottom: 6px; }

/* ---------- Contact ---------- */

.contact-list { list-style: none; padding: 0; margin: 8px 0 0; display: grid; gap: 18px; }
.contact-list strong { display: block; font-weight: 600; }
.contact-list a { font-size: 1.25rem; font-weight: 500; }

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

.site-footer { background: var(--navy-deep); color: var(--on-navy-muted); font-size: 0.9375rem; padding: 40px 0 48px; }
.site-footer .wrap { display: grid; gap: 14px; }
.site-footer img { width: 148px; }
.site-footer p { margin: 0; max-width: 70ch; }
.footer-nav { display: flex; flex-wrap: wrap; gap: 6px 22px; }
.site-footer a { color: var(--on-navy); }

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

.legal { padding: clamp(40px, 6vw, 72px) 0 clamp(56px, 8vw, 96px); }
.legal .wrap > * { max-width: 760px; }
.legal h1 { font-size: clamp(2.75rem, 6vw, 3.75rem); margin-bottom: 8px; }
.legal h1 + p { color: var(--muted); }
.legal h2 { font: 600 1.375rem/1.3 var(--text); margin: 36px 0 10px; }
.legal ul, .legal ol { padding-left: 1.2em; }
.legal li { margin: 8px 0; max-width: var(--measure); }

/* ---------- Small screens ---------- */

@media (max-width: 820px) {
  .hero .wrap, .two-col { grid-template-columns: minmax(0, 1fr); }
  .steps { grid-template-columns: minmax(0, 1fr); gap: 24px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
