/* Jetlagger site — night-flight ink ramp, one ember accent from the app (Theme.accent). */

:root {
  --bg: #f5f7fa;
  --surface: #ffffff;
  --raised: #eceff4;
  --line: rgba(17, 24, 39, 0.08);
  --text: #111827;
  --text-2: #4b5565;
  --text-3: #6b7487;
  --accent: #c9500f;        /* accent as ink on light, 4.9:1 on white */
  --button-bg: #111827;
  --button-text: #ffffff;
  --shadow: 0 1px 2px rgba(17, 24, 39, 0.05);

  --sans: ui-rounded, "SF Pro Rounded", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, monospace;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #070b20;
    --surface: #0e1328;
    --raised: #171d36;
    --line: rgba(238, 240, 245, 0.08);
    --text: #eef0f5;
    --text-2: #a3a9bc;
    --text-3: #7a8298;
    --accent: #ff8f4a;
    --button-bg: #eef0f5;
    --button-text: #0b0f22;
    --shadow: none;
  }
}

/* The home page is the night flight: always dark. */
body.home {
  --bg: #03082a;
  --surface: #0e1328;
  --raised: #171d36;
  --line: rgba(238, 240, 245, 0.08);
  --text: #eef0f5;
  --text-2: #a3a9bc;
  --text-3: #7a8298;
  --accent: #ff8f4a;
  --button-bg: #eef0f5;
  --button-text: #0b0f22;
  --shadow: none;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); text-decoration: none; font-weight: 500; transition: color 150ms var(--ease); }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
a:focus-visible, .button:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }

.shell { max-width: 1200px; margin: 0 auto; padding: 0 32px; }
.wrap { max-width: 720px; margin: 0 auto; padding: 0 24px; }

/* Header */
header.site {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  height: 72px;
}
.brand { display: flex; align-items: center; gap: 12px; color: var(--text); font-size: 17px; font-weight: 600; }
.brand:hover { text-decoration: none; }
.brand-mark { width: 32px; height: 32px; border-radius: 8px; flex-shrink: 0; }

nav.links { display: flex; align-items: center; gap: 24px; font-size: 15px; }
nav.links a:not(.button) { color: var(--text-2); }
nav.links a:not(.button):hover { color: var(--text); text-decoration: none; }
nav.links a[aria-current="page"] { color: var(--text); }

/* Buttons */
.button {
  display: inline-flex;
  align-items: center;
  height: 48px;
  padding: 0 20px;
  border-radius: 10px;
  background: var(--button-bg);
  color: var(--button-text);
  font-size: 16px;
  font-weight: 500;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12);
  transition: background-color 150ms var(--ease), transform 150ms var(--ease);
}
.button:hover { text-decoration: none; background: color-mix(in srgb, var(--button-bg) 88%, var(--accent)); }
.button:active { transform: scale(0.98); }
.button-small { height: 36px; padding: 0 16px; font-size: 15px; border-radius: 8px; }
nav.links .button { color: var(--button-text); }

.link-quiet { color: var(--text-2); font-size: 16px; }
.link-quiet:hover { color: var(--text); }

/* Hero — the night flight */
.hero {
  position: relative;
  overflow: hidden;
  background: var(--bg);
  min-height: min(100svh, 960px);
  display: flex;
  flex-direction: column;
}
.hero-scene {
  position: absolute;
  top: 0;
  right: 0;
  width: min(64vw, 900px);
  height: auto;
  -webkit-mask-image: linear-gradient(to right, transparent, #000 32%), linear-gradient(to bottom, #000 60%, transparent);
  -webkit-mask-composite: source-in;
  mask-image: linear-gradient(to right, transparent, #000 32%), linear-gradient(to bottom, #000 60%, transparent);
  mask-composite: intersect;
  pointer-events: none;
}
.hero .shell { position: relative; flex: 1; display: flex; flex-direction: column; width: 100%; }
.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 400px;
  gap: 48px;
  align-items: end;
  flex: 1;
  padding-top: 96px;
}
.hero-copy { align-self: start; max-width: 560px; padding-bottom: 64px; }
.hero h1 {
  font-size: clamp(40px, 6vw, 68px);
  line-height: 1.04;
  font-weight: 500;
  letter-spacing: -0.03em;
  margin: 0 0 20px;
}
.hero-copy > p { color: var(--text-2); font-size: 19px; line-height: 1.55; margin: 0; max-width: 36rem; }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 24px; margin-top: 32px; }
.fine { color: var(--text-3); font-size: 14px; margin: 16px 0 0; }

/* Plan card — rises from the bottom edge of the hero */
.plan {
  background: rgba(12, 17, 44, 0.92);
  border: 1px solid var(--line);
  border-bottom: 0;
  border-radius: 16px 16px 0 0;
  padding: 20px 20px 0;
  box-shadow: 0 -8px 32px rgba(0, 0, 0, 0.32);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
}
.plan-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.route { font-family: var(--mono); font-size: 20px; font-weight: 500; letter-spacing: 0.02em; }
.route .arrow { color: var(--text-3); }
.meta { color: var(--text-2); font-size: 13px; font-family: var(--mono); }
.plan-day { color: var(--text-3); font-size: 13px; margin: 4px 0 16px; }

.steps { list-style: none; margin: 0; padding: 0; }
.steps li {
  display: grid;
  grid-template-columns: 8px 1fr auto;
  align-items: center;
  gap: 12px;
  height: 44px;
  padding: 0 12px;
  margin: 0 -12px;
  border-radius: 8px;
  font-size: 15px;
}
.steps li + li { border-top: 1px solid var(--line); }
.steps li.next { background: var(--raised); border-top-color: transparent; box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06); }
.steps li.next + li { border-top-color: transparent; }
.steps em { font-style: normal; color: var(--accent); font-size: 12px; margin-left: 8px; }
.dot { width: 8px; height: 8px; border-radius: 4px; background: var(--c); }
.steps time { font-family: var(--mono); font-size: 13px; color: var(--text-2); font-variant-numeric: tabular-nums; }

.plan-foot {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 16px;
  padding: 16px 0 24px;
  border-top: 1px solid var(--line);
}
.plan-foot div { display: flex; align-items: baseline; gap: 8px; }
.plan-foot strong { font-size: 28px; font-weight: 500; line-height: 1; color: var(--accent); font-variant-numeric: tabular-nums; }
.plan-foot span { font-size: 13px; color: var(--text-2); }
.plan-foot .muted strong { color: var(--text-3); }

/* How it works — chart + feature list */
.how {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  gap: 48px;
  align-items: start;
  padding: 96px 0 80px;
}
.chart-card {
  margin: 0;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 24px;
}
.chart-card h2, .features h2 { font-size: 24px; font-weight: 500; letter-spacing: -0.01em; margin: 0; }
.chart-card figcaption p { color: var(--text-2); font-size: 14px; margin: 4px 0 0; }
.chart { display: block; width: 100%; height: auto; margin: 24px 0 16px; }
.chart .grid line { stroke: var(--line); stroke-width: 1; }
.chart .axis text { fill: var(--text-3); font-family: var(--mono); font-size: 11px; text-anchor: end; }
.chart .axis text[text-anchor="middle"] { text-anchor: middle; }
.chart .band { fill: rgba(238, 240, 245, 0.03); }
.chart .without { fill: none; stroke: var(--text-3); stroke-width: 2; stroke-dasharray: 5 6; stroke-linecap: round; }
.chart .with { fill: none; stroke: var(--accent); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.chart .with-dot { fill: var(--accent); stroke: var(--surface); stroke-width: 3; }

.legend { list-style: none; display: flex; flex-wrap: wrap; gap: 8px 24px; margin: 0; padding: 0; color: var(--text-2); font-size: 13px; }
.legend li { display: flex; align-items: center; gap: 8px; }
.swatch { width: 16px; height: 0; border-top: 3px solid var(--accent); border-radius: 2px; }
.swatch-without { border-top: 2px dashed var(--text-3); }

.features { padding-top: 24px; }
.feature-list { list-style: none; margin: 16px 0 0; padding: 0; }
.feature-list li { display: grid; grid-template-columns: 18px 1fr; gap: 12px; padding: 16px 0; }
.feature-list li + li { border-top: 1px solid var(--line); }
.feature-list svg { width: 18px; height: 18px; margin-top: 2px; fill: none; stroke: var(--text-3); stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.feature-list strong { display: block; font-weight: 500; font-size: 16px; }
.feature-list span { display: block; color: var(--text-2); font-size: 14px; margin-top: 2px; }

/* Legal and support pages */
.doc-head { padding: 48px 0 8px; }
.doc-head h1 { font-size: clamp(32px, 6vw, 40px); line-height: 1.1; font-weight: 500; letter-spacing: -0.02em; margin: 0 0 8px; }
.updated { color: var(--text-3); font-size: 14px; margin: 0; }
.intro { color: var(--text-2); font-size: 18px; line-height: 1.6; margin: 24px 0 32px; }

.section, .card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: var(--shadow);
  padding: 20px 24px;
  margin-bottom: 12px;
}
.section h2, .card h2 { display: flex; align-items: baseline; gap: 12px; font-size: 17px; font-weight: 500; margin: 0 0 8px; }
.section h2 .num { font-family: var(--mono); font-size: 13px; font-weight: 400; color: var(--text-3); min-width: 16px; font-variant-numeric: tabular-nums; }
.section p, .card p { margin: 0; color: var(--text-2); font-size: 15px; line-height: 1.6; }
.section p + p, .card p + p { margin-top: 8px; }
.card .button { margin-top: 16px; }

/* Footer */
footer.site {
  color: var(--text-3);
  font-size: 14px;
  padding: 32px 0 48px;
  border-top: 1px solid var(--line);
  margin-top: 48px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
  justify-content: space-between;
}
body.home footer.site { margin-top: 0; }
footer.site nav { display: flex; gap: 20px; flex-wrap: wrap; }
footer.site a { color: var(--text-2); font-weight: 400; }

/* One entrance: the hero copy and the plan rise in */
@media (prefers-reduced-motion: no-preference) {
  .hero-copy, .plan { animation: rise 480ms var(--ease) both; }
  .plan { animation-delay: 60ms; }
  @keyframes rise { from { opacity: 0; transform: translateY(8px); } }
}

/* Narrow screens */
@media (max-width: 900px) {
  .shell { padding: 0 16px; }
  .wrap { padding: 0 16px; }
  nav.links { gap: 16px; }
  .hero-scene {
    width: 100%;
    -webkit-mask-image: linear-gradient(to bottom, #000 55%, transparent 92%);
    mask-image: linear-gradient(to bottom, #000 55%, transparent 92%);
  }
  .hero { min-height: 0; }
  .hero-grid { grid-template-columns: 1fr; gap: 40px; padding-top: 56vw; }
  .hero-copy { padding-bottom: 0; }
  .hero h1 { font-size: 40px; }
  .hero-copy > p { font-size: 17px; }
  .plan { max-width: 440px; width: 100%; justify-self: center; border-bottom: 1px solid var(--line); border-radius: 16px; }
  .how { grid-template-columns: 1fr; gap: 40px; padding: 64px 0 48px; }
  .chart-card { padding: 20px; }
  .chart .axis text { font-size: 18px; }
  .doc-head { padding-top: 32px; }
  .section, .card { padding: 16px 20px; }
}
