/* The Flight Focus home page: Apple's look, light and dark, in the system font,
   matching maimap.app. The accent blue sits midway along the app icon's
   cyan-to-royal-blue gradient. */
:root {
  --bg: #ffffff;
  --bg-soft: #f5f5f7;
  --text: #1d1d1f;
  --muted: #6e6e73;
  --line: #d2d2d7;
  --accent: #0068d6;
  --accent-text: #0062c4;
  --nav: rgba(255, 255, 255, 0.78);
  --segment: #ececf0;
  --segment-on: #ffffff;
  --mark-shadow: rgba(0, 70, 200, 0.3);
  --app-accent: #087563;
  --segment-card: #e6e6eb;
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", "Segoe UI", system-ui, sans-serif;
  --display: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Helvetica Neue", "Segoe UI", system-ui, sans-serif;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #000000;
    --bg-soft: #161617;
    --text: #f5f5f7;
    --muted: #a1a1a6;
    --line: #424245;
    --accent: #1683ff;
    --accent-text: #3d9bff;
    --nav: rgba(22, 22, 23, 0.78);
    --segment: #1c1c1e;
    --segment-on: #3a3a3c;
    --mark-shadow: rgba(0, 110, 255, 0.35);
    --app-accent: #a6edd1;
    --segment-card: #2a2a2c;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 17px/1.47 var(--font);
  letter-spacing: -0.022em;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent-text); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; height: auto; display: block; }
:focus-visible { outline: 3px solid color-mix(in srgb, var(--accent) 60%, transparent); outline-offset: 2px; border-radius: 6px; }

.wrap { width: min(980px, 100% - 32px); margin-inline: auto; }

/* The bar along the top. */
.nav {
  position: sticky; top: 0; z-index: 10;
  background: var(--nav);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid color-mix(in srgb, var(--line) 60%, transparent);
}
.nav-inner { display: flex; align-items: center; justify-content: space-between; height: 52px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); font-weight: 600; font-size: 19px; }
.brand:hover { text-decoration: none; }
.brand img { width: 28px; height: 28px; }
.nav-links { display: flex; align-items: center; gap: 24px; font-size: 14px; }
.nav-links a { color: var(--text); opacity: 0.8; }
.nav-links a:hover { opacity: 1; text-decoration: none; }
.nav-links a.nav-cta { padding: 4px 12px; border-radius: 980px; background: var(--accent); color: #fff; opacity: 1; font-weight: 500; }
.nav-links a.nav-cta:hover { filter: brightness(1.08); }

/* Headline. */
.hero { text-align: center; padding: 72px 0 40px; }
.hero-mark { width: 88px; height: 88px; margin: 0 auto 28px; filter: drop-shadow(0 8px 18px var(--mark-shadow)); }
h1, h2, h3 { font-family: var(--display); letter-spacing: -0.03em; margin: 0; }
.hero h1 { font-size: clamp(40px, 7vw, 72px); line-height: 1.05; font-weight: 700; }
.lead { font-size: clamp(19px, 2.4vw, 24px); line-height: 1.4; color: var(--muted); max-width: 720px; margin: 22px auto 0; }
.cta { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 14px 22px; margin-top: 32px; }
.button {
  display: inline-block; padding: 12px 24px; border-radius: 980px;
  background: var(--accent); color: #fff; font-size: 17px; font-weight: 500;
}
.button:hover { text-decoration: none; filter: brightness(1.08); }
.soon { color: var(--muted); font-size: 15px; }

/* The app, one view after another (home.js plays it), with a title and caption
   beside the picture. The filling dot uses the app's own accent: teal in light
   mode, mint in dark. */
.wrap-wide { width: min(1180px, 100% - 32px); margin-inline: auto; }
.show { margin-top: 32px; scroll-margin-top: 72px; }
/* Framed like the beta box: a soft rounded card. */
.show-panel {
  --accent: var(--app-accent);
  --segment: var(--segment-card);
  display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 7fr);
  grid-template-areas: "copy stage" "controls stage";
  column-gap: 48px; align-items: center;
  padding: 56px 56px 56px 72px; border-radius: 32px;
  background: var(--bg-soft);
}
.show-copy { grid-area: copy; align-self: end; text-align: left; }
/* Room for two lines of title and three of caption, so the buttons below don't jump. */
.show-words { min-height: 200px; }
.show-title { margin: 0; font-family: var(--display); font-size: clamp(34px, 3.8vw, 48px); line-height: 1.06; font-weight: 700; letter-spacing: -0.035em; }
.show-caption { margin: 14px 0 0; max-width: 24em; color: var(--muted); font-size: 19px; line-height: 1.45; }
.show-words.swap { animation: show-swap 0.5s ease; }
@keyframes show-swap { from { opacity: 0; transform: translateY(8px); } }
.device-stage { grid-area: stage; position: relative; height: min(660px, 78vh); }
.device-slide { position: absolute; inset: 0; margin: 0; opacity: 0; transition: opacity 0.7s ease; }
.device-slide.is-current { opacity: 1; }
.device-slide img {
  width: 100%; height: 100%; object-fit: contain;
  filter: drop-shadow(0 22px 34px rgba(0, 0, 0, 0.16)) drop-shadow(0 2px 6px rgba(0, 0, 0, 0.08));
}
/* Chapters, each a pill that opens to show a dot for each view: the one on show
   is a capsule that fills as it plays, like a page control. */
.device-controls { grid-area: controls; align-self: start; display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 28px; }
.device-controls[hidden] { display: none; }
.device-tabs { display: flex; flex-wrap: wrap; justify-content: center; gap: 2px; padding: 3px; border-radius: 980px; background: var(--segment); }
.device-tab, .device-play { appearance: none; border: 0; margin: 0; cursor: pointer; font: inherit; color: var(--text); }
.device-tab {
  padding: 7px 16px; border-radius: 980px; white-space: nowrap;
  background: transparent; font-size: 15px; font-weight: 500; letter-spacing: -0.01em; opacity: 0.72;
}
.device-tab:hover { opacity: 1; }
.device-tab[aria-selected="true"] { opacity: 1; }
.device-seg { display: inline-flex; align-items: center; border-radius: 980px; transition: background-color 0.25s, box-shadow 0.25s; }
.device-seg:has(.device-tab[aria-selected="true"]) { background: var(--segment-on); box-shadow: 0 1px 3px rgba(0, 0, 0, 0.14); }
.device-steps {
  display: inline-flex; align-items: center; max-width: 0; opacity: 0; overflow: hidden;
  transition: max-width 0.35s ease, opacity 0.25s ease, padding 0.35s ease;
}
.device-seg:has(.device-tab[aria-selected="true"]) .device-tab { padding-right: 3px; }
.device-seg:has(.device-tab[aria-selected="true"]) .device-steps { max-width: 90px; opacity: 1; padding: 0 9px 0 0; }
/* Each dot is a button as tall as the pill, so a finger can hit it. */
.device-step {
  appearance: none; border: 0; margin: 0; padding: 0; background: none; cursor: pointer; flex: none;
  display: grid; place-items: center; width: 11px; height: 32px;
  transition: width 0.3s ease;
}
.device-step[aria-current="true"] { width: 23px; }
.device-dot {
  position: relative; overflow: hidden; display: block;
  width: 6px; height: 6px; border-radius: 3px;
  background: color-mix(in srgb, var(--text) 28%, transparent);
  transition: width 0.3s ease, background-color 0.2s;
}
.device-step:hover .device-dot { background: color-mix(in srgb, var(--text) 50%, transparent); }
.device-step:focus-visible { outline: none; }
.device-step:focus-visible .device-dot { outline: 2px solid var(--accent); outline-offset: 2px; }
.device-step[aria-current="true"] .device-dot { width: 18px; background: color-mix(in srgb, var(--text) 18%, transparent); }
.device-step[aria-current="true"] .device-dot::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit; background: var(--accent);
  transform-origin: left center;
}
.devices.playing .device-step[aria-current="true"] .device-dot::after { transform: scaleX(0); animation: device-progress 5s linear forwards; }
.devices.held .device-step[aria-current="true"] .device-dot::after { animation-play-state: paused; }
@keyframes device-progress { to { transform: scaleX(1); } }
.device-play { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; background: var(--segment); }
.device-play svg { width: 14px; height: 14px; fill: currentColor; }
.device-play .icon-play, .device-play.paused .icon-pause { display: none; }
.device-play.paused .icon-play { display: block; }
@media (prefers-color-scheme: dark) {
  .device-slide img { filter: drop-shadow(0 22px 40px rgba(0, 0, 0, 0.8)); }
}

/* Privacy. */
.promise { text-align: center; padding: 96px 0; }
.promise h2 { font-size: clamp(32px, 5vw, 48px); font-weight: 700; }
.promise p { color: var(--muted); font-size: 19px; max-width: 640px; margin: 18px auto 20px; }

/* The public beta, at the foot of the page. */
.beta {
  text-align: center; background: var(--bg-soft); border-radius: 32px; padding: 64px 32px 44px;
  scroll-margin-top: 72px;
}
.beta-mark { width: 72px; height: 72px; margin: 0 auto 22px; filter: drop-shadow(0 8px 18px var(--mark-shadow)); }
.beta h2 { font-size: clamp(32px, 5vw, 48px); line-height: 1.08; font-weight: 700; }
.beta .lead { max-width: 620px; margin-top: 16px; }
.beta-get { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 16px 20px; margin-top: 32px; }
.beta-button {
  display: inline-flex; align-items: center; gap: 12px; padding: 11px 28px 11px 20px; border-radius: 980px;
  background: var(--accent); color: #fff; text-align: left;
}
.beta-button:hover { text-decoration: none; filter: brightness(1.08); }
.beta-button svg { width: 28px; height: 28px; flex: none; }
.beta-button b { display: block; font-size: 17px; font-weight: 600; line-height: 1.25; }
.beta-button small { display: block; font-size: 13px; line-height: 1.3; opacity: 0.85; }
.beta-steps {
  list-style: none; padding: 0; margin: 52px auto 0; max-width: 860px; counter-reset: beta;
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px 28px; text-align: left;
}
.beta-steps li { counter-increment: beta; position: relative; padding-left: 40px; color: var(--muted); font-size: 15px; line-height: 1.45; }
.beta-steps li::before {
  content: counter(beta); position: absolute; left: 0; top: 0; display: grid; place-items: center;
  width: 28px; height: 28px; border-radius: 50%; background: var(--accent); color: #fff; font-weight: 600; font-size: 14px;
}
.beta-steps b { display: block; color: var(--text); font-size: 17px; font-weight: 600; letter-spacing: -0.02em; margin-bottom: 2px; }
.beta-note { color: var(--muted); font-size: 13px; margin: 40px 0 0; }

/* Text pages: privacy, terms, support. */
.doc { padding: 64px 0 40px; max-width: 720px; }
.doc h1 { font-size: clamp(36px, 6vw, 48px); font-weight: 700; line-height: 1.1; }
.doc .updated { color: var(--muted); margin: 10px 0 36px; font-size: 15px; }
.doc h2 { font-size: 24px; font-weight: 600; margin: 44px 0 10px; letter-spacing: -0.02em; }
.doc p, .doc li { line-height: 1.6; }
.doc ul { padding-left: 1.2em; }
.doc li + li { margin-top: 6px; }
.summary { background: var(--bg-soft); border-radius: 18px; padding: 22px 26px; margin: 0 0 8px; }
.summary p { margin: 0; }
.summary ul { margin: 8px 0 0; }
.faq details { border-bottom: 1px solid var(--line); padding: 18px 0; }
.faq details:first-of-type { border-top: 1px solid var(--line); }
.faq summary { font-size: 19px; font-weight: 600; cursor: pointer; list-style: none; display: flex; justify-content: space-between; gap: 16px; letter-spacing: -0.02em; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--muted); font-weight: 400; font-size: 24px; line-height: 1; transition: transform 0.2s; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { margin: 12px 0 0; color: var(--muted); }
.contact { background: var(--bg-soft); border-radius: 22px; padding: 30px; margin: 8px 0 44px; }
.contact h2 { margin: 0 0 8px; }
.contact p { margin: 0; color: var(--muted); }
.contact .button { margin-top: 18px; }

/* The foot of the page. */
.footer { border-top: 1px solid var(--line); margin-top: 48px; padding: 28px 0 44px; font-size: 13px; color: var(--muted); }
.footer-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 24px; }
.footer nav { display: flex; flex-wrap: wrap; gap: 8px 22px; }
.footer a { color: var(--muted); }
.footer a:hover { color: var(--text); text-decoration: none; }
.credits { margin-top: 14px; margin-bottom: 0; font-size: 12px; line-height: 1.5; opacity: 0.85; }

@media (max-width: 900px) {
  .show-panel {
    grid-template-columns: minmax(0, 1fr); grid-template-areas: "copy" "stage" "controls";
    padding: 44px 24px 24px; border-radius: 28px;
  }
  .show-copy { align-self: auto; text-align: center; }
  .show-words { min-height: 150px; }
  .show-caption { margin-inline: auto; }
  .device-stage { height: min(540px, 64vh); margin-top: 24px; }
  .device-controls { justify-content: center; margin-top: 22px; }
}
@media (max-width: 860px) {
  .beta-steps { grid-template-columns: 1fr; max-width: 420px; }
}
@media (max-width: 600px) {
  body { font-size: 16px; }
  .nav-links { gap: 16px; }
  .nav-links .wide-only { display: none; }
  .hero { padding: 48px 0 24px; }
  .hero-mark { width: 72px; height: 72px; margin-bottom: 22px; }
  .show { margin-top: 8px; }
  .show-panel { padding: 32px 16px 18px; border-radius: 26px; }
  .show-title { font-size: 30px; }
  .show-caption { font-size: 16px; }
  .device-stage { height: min(460px, 58vh); }
  /* "Duo" beside "iPhone" is enough on a phone, and keeps the row on one line. */
  .duo-prefix { display: none; }
  .device-tabs { flex-wrap: nowrap; }
  .device-tab { padding: 6px 12px; font-size: 14px; }
  .device-step { width: 10px; }
  .device-step[aria-current="true"] { width: 19px; }
  .device-dot { width: 5px; height: 5px; }
  .device-step[aria-current="true"] .device-dot { width: 14px; }
  .device-seg:has(.device-tab[aria-selected="true"]) .device-tab { padding-right: 2px; }
  .device-seg:has(.device-tab[aria-selected="true"]) .device-steps { padding: 0 7px 0 0; }
  .promise { padding: 72px 0; }
  .beta { padding: 48px 20px 36px; border-radius: 26px; }
  .beta-mark { width: 60px; height: 60px; margin-bottom: 18px; }
}
@media (max-width: 359px) {
  .device-tabs { flex-wrap: wrap; }
  /* Room for the brand and the beta button; Support is in the footer too. */
  .nav-links a:not(.nav-cta) { display: none; }
  .beta { padding-inline: 12px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .device-slide, .device-seg, .device-steps, .device-step, .device-dot, .faq summary::after { transition: none; }
  .show-words.swap { animation: none; }
}
