/* RailMind launch site — tokens lifted from the app's Core/Theme.swift and the Figma launch file
   (A7NUxNKc34DYRV55aeAqTw). Dark-only: the marketing site commits to the ink look deliberately,
   unlike the app, which is Auto/Light/Dark. Light values are the WCAG-retuned set (PR #66) and are
   kept here for reference even though this page does not switch. */

:root {
  --ink: #14141A;          /* darkBackground (dark) */
  --surface: #1B1B23;      /* baseboard (dark) — one step off ink */
  --control: #292933;      /* controlBackground (dark) */
  --accent: #00BFF2;       /* accent (dark) — the cyan */
  --cta: #0054A3;          /* ctaFill — AA with white text, both modes */
  --cta-hover: #00457F;
  --success: #33CC66;      /* success (dark) — the [OK] flags */
  --text: #FFFFFF;         /* textPrimary (dark) */
  --text-2: #9E9E9E;       /* textSecondary (dark) */
  --hairline: rgba(255, 255, 255, 0.10);

  --radius: 14px;          /* RailThrottleTheme.cornerRadius */
  --radius-sm: 8px;

  /* Space — the app's 4pt rhythm */
  --xs: 4px; --sm: 8px; --md: 12px; --lg: 16px; --xl: 24px;
  --2xl: 40px; --3xl: 64px; --4xl: 88px;

  /* The app locks Helvetica Neue + SF Mono. Both are system faces on Apple platforms; Inter and
     IBM Plex Mono are the documented stand-ins (same substitution the Figma file makes). */
  --sans: "Helvetica Neue", Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --mono: ui-monospace, "SF Mono", "IBM Plex Mono", Menlo, monospace;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

body {
  background: var(--ink);
  color: var(--text);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

.wrap { max-width: 1200px; margin: 0 auto; padding: 0 var(--xl); }
.narrow { max-width: 760px; margin: 0 auto; }

/* ---------- nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 20;
  background: rgba(20, 20, 26, .82);
  backdrop-filter: saturate(140%) blur(12px);
  border-bottom: 1px solid var(--hairline);
}
.nav-in { display: flex; align-items: center; gap: var(--xl); height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; letter-spacing: -.01em; text-decoration: none; color: var(--text); }
.brand img { width: 28px; height: 28px; border-radius: 7px; }
.nav-links { margin-left: auto; display: flex; align-items: center; gap: var(--xl); }
.nav-links a { color: var(--text-2); text-decoration: none; font-size: 15px; font-weight: 500; }
.nav-links a:hover { color: var(--text); }
@media (max-width: 860px) { .nav-links a:not(.nav-cta) { display: none; } }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: var(--sm);
  background: var(--cta); color: #fff; text-decoration: none;
  padding: 14px 24px; border-radius: 999px; font-weight: 600; font-size: 15px;
  border: 0; transition: background .15s ease;
}
.btn:hover { background: var(--cta-hover); }
.btn-ghost { background: transparent; color: var(--text-2); border: 1px solid var(--hairline); }
.btn-ghost:hover { background: rgba(255,255,255,.05); color: var(--text); }
.btn.is-soon { background: color-mix(in srgb, var(--cta) 55%, transparent); cursor: default; }
.btn.is-soon:hover { background: color-mix(in srgb, var(--cta) 55%, transparent); }
.nav-cta { font-size: 14px; padding: 9px 16px; }

/* ---------- eyebrow / section ---------- */
.eyebrow {
  font-family: var(--mono); font-size: 13px; font-weight: 500;
  letter-spacing: 2px; color: var(--accent); text-transform: uppercase;
}
section { padding: var(--4xl) 0; border-bottom: 1px solid var(--hairline); }
h1, h2, h3 { letter-spacing: -.02em; line-height: 1.12; }
h2 { font-size: 32px; font-weight: 700; margin: var(--lg) 0 var(--md); }
.lede { color: var(--text-2); font-size: 17px; max-width: 640px; }

/* ---------- hero ---------- */
.hero { position: relative; overflow: hidden; padding: var(--4xl) 0 var(--3xl); border-bottom: 1px solid var(--hairline); }
.hero::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(60rem 40rem at 78% -10%, rgba(0, 191, 242, .14), transparent 60%);
}
.hero .wrap { position: relative; }
.hero h1 { font-size: clamp(38px, 6vw, 64px); font-weight: 700; margin: var(--lg) 0; max-width: 15ch; }
.hero .lede { font-size: 20px; max-width: 620px; }
.hero-cta { display: flex; flex-wrap: wrap; gap: var(--md); margin: var(--xl) 0 var(--2xl); align-items: center; }
.pills { display: flex; flex-wrap: wrap; gap: var(--lg) var(--xl); list-style: none; }
.pills li { display: flex; align-items: center; gap: var(--sm); font-family: var(--mono); font-size: 12px; letter-spacing: 1.5px; color: var(--text-2); }
.dot { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); flex: none; }

/* ---------- spec box (the instrument readout) ---------- */
.spec {
  border: 1px solid color-mix(in srgb, var(--accent) 45%, transparent);
  border-radius: var(--radius-sm);
  padding: 32px 36px; display: inline-flex; flex-direction: column; gap: 18px;
  background: rgba(0, 191, 242, .03);
}
.spec-row { display: flex; align-items: center; gap: 14px; font-family: var(--mono); font-size: 16px; letter-spacing: 2px; }
.flag { color: var(--success); font-size: 14px; letter-spacing: 1px; }
.center { text-align: center; }
.center .lede, .center .spec { margin-left: auto; margin-right: auto; }
.center .spec { text-align: left; }

/* ---------- feature grid ---------- */
.grid { display: grid; gap: var(--lg); margin-top: var(--2xl); }
.g2 { grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); }
.g3 { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.card { background: var(--surface); border: 1px solid var(--hairline); border-radius: var(--radius); padding: var(--xl); }
.card h3 { font-size: 18px; font-weight: 700; margin-bottom: var(--sm); }
.card p { color: var(--text-2); font-size: 15px; }
.card .num { font-family: var(--mono); font-size: 13px; color: var(--accent); margin-bottom: var(--md); }

/* ---------- catalog table ---------- */
.parts { width: 100%; border-collapse: collapse; font-family: var(--mono); font-size: 14px; margin-top: var(--xl); }
.parts th { text-align: left; color: var(--text-2); font-weight: 500; font-size: 12px; letter-spacing: 2px; padding-bottom: var(--md); border-bottom: 1px solid var(--hairline); }
.parts td { padding: 14px 0; border-bottom: 1px solid var(--hairline); }
.parts td:last-child { color: var(--accent); text-align: right; }

/* ---------- shots ---------- */
figure { margin: 0; }
.shot { width: 100%; height: auto; display: block; border-radius: var(--radius); border: 1px solid var(--hairline); background: #000; }
figcaption { color: var(--text-2); font-size: 14px; margin-top: var(--md); }

/* ---------- faq ---------- */
.faq { border: 1px solid var(--hairline); border-radius: var(--radius); overflow: hidden; margin-top: var(--2xl); background: var(--surface); }
.faq details { border-bottom: 1px solid var(--hairline); }
.faq details:last-child { border-bottom: 0; }
.faq summary { cursor: pointer; list-style: none; padding: var(--xl); font-weight: 600; display: flex; justify-content: space-between; gap: var(--lg); }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--text-2); font-size: 20px; line-height: 1; transition: transform .15s ease; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq p { padding: 0 var(--xl) var(--xl); color: var(--text-2); font-size: 15px; }

/* ---------- footer ---------- */
footer { padding: var(--3xl) 0; color: var(--text-2); font-size: 14px; }
footer .cols { display: flex; flex-wrap: wrap; gap: var(--xl); justify-content: space-between; }
footer a { color: var(--text-2); }
footer a:hover { color: var(--text); }
.legal { font-size: 12px; margin-top: var(--xl); opacity: .75; line-height: 1.7; }
.offline { font-family: var(--mono); font-size: 12px; letter-spacing: 2px; color: var(--accent); }

/* ---------- content pages ---------- */
.doc { padding: var(--3xl) 0; }
.doc h1 { font-size: 44px; font-weight: 700; margin: var(--lg) 0; }
.doc h2 { font-size: 21px; margin-top: var(--2xl); }
.doc p { color: var(--text-2); margin-top: var(--md); }
.doc a { color: var(--accent); }
.back { color: var(--text-2); text-decoration: none; font-size: 14px; display: inline-block; margin-bottom: var(--xl); }
.back:hover { color: var(--text); }
