/* LaneWatch site — shares the app's palette and faces so the site and the
   product read as one thing. Token values come straight from
   lib/theme/colors.dart; keep them in step with it rather than eyeballing.

   Orbitron is the wordmark face only, italic and tracked out, exactly as
   lib/theme/typography.dart reserves it. Oxanium carries everything else. */

:root {
  /* Light — BrandColors._light */
  --accent: #2196f3;
  --accent-soft: #1565c0;
  --bg: #f2f3f6;
  --bg-deep: #e8eaee;
  --card: #ffffff;
  --card-alt: #f7f8fa;
  --card-lifted: #ecedf1;
  --ink: #1a1c1f;
  --ink-secondary: rgba(21, 23, 26, 0.70);
  --ink-muted: rgba(21, 23, 26, 0.54);
  --border: rgba(21, 23, 26, 0.24);
  --divider: rgba(21, 23, 26, 0.12);
  --faint: rgba(21, 23, 26, 0.05);

  --measure: 65ch;
  --gap: clamp(1rem, 3vw, 2rem);
  --section-y: clamp(3.5rem, 9vw, 7rem);
  --radius: 10px;

  /* lanewatch_mark.png is white, text-free artwork — the app tints it per
     theme at runtime. A plain <img> can't, and white-on-#f2f3f6 is invisible,
     so light mode inverts it to ink instead. */
  --mark-filter: invert(1);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --accent-soft: #90caf9;
    --bg: #121212;
    --bg-deep: #000000;
    --card: #1e1e1e;
    --card-alt: #181818;
    --card-lifted: #2c2c2c;
    --ink: #ffffff;
    --ink-secondary: rgba(255, 255, 255, 0.70);
    --ink-muted: rgba(255, 255, 255, 0.55);
    --border: rgba(255, 255, 255, 0.24);
    --divider: rgba(255, 255, 255, 0.12);
    --faint: rgba(255, 255, 255, 0.06);
    --mark-filter: none;
  }
}

:root[data-theme="dark"] {
  --accent-soft: #90caf9;
  --bg: #121212;
  --bg-deep: #000000;
  --card: #1e1e1e;
  --card-alt: #181818;
  --card-lifted: #2c2c2c;
  --ink: #ffffff;
  --ink-secondary: rgba(255, 255, 255, 0.70);
  --ink-muted: rgba(255, 255, 255, 0.55);
  --border: rgba(255, 255, 255, 0.24);
  --divider: rgba(255, 255, 255, 0.12);
  --faint: rgba(255, 255, 255, 0.06);
  --mark-filter: none;
}

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: Oxanium, "Segoe UI", system-ui, sans-serif;
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 { text-wrap: balance; line-height: 1.15; margin: 0; }

a { color: var(--accent-soft); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--accent); }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 3px;
}

.wrap {
  width: min(100% - 2.5rem, 68rem);
  margin-inline: auto;
}

.narrow { width: min(100% - 2.5rem, 44rem); margin-inline: auto; }

/* ---------- wordmark ---------- */

.wordmark {
  font-family: Orbitron, Oxanium, sans-serif;
  font-style: italic;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.6em;
  white-space: nowrap;
}

.wordmark img { height: 1.35em; width: auto; display: block; filter: var(--mark-filter); }
.wordmark:hover { color: var(--ink); }

/* ---------- masthead ---------- */

.masthead {
  border-bottom: 1px solid var(--divider);
  background: var(--bg);
  position: sticky;
  top: 0;
  z-index: 10;
}

/* Wraps rather than overflowing: the wordmark is nowrap by design, and
   "What it measures" alongside it is wider than a 390px phone. Without the
   wrap the masthead widens the document and every section gets clipped on
   the right, not just this bar. */
.masthead .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.35rem 1rem;
  padding-block: 0.9rem;
}

.masthead .wordmark { font-size: clamp(0.95rem, 3.6vw, 1.05rem); }

.masthead nav {
  display: flex;
  flex-wrap: wrap;
  gap: clamp(0.75rem, 2.5vw, 1.5rem);
  font-size: 0.9rem;
}

.masthead nav a { color: var(--ink-secondary); text-decoration: none; }
.masthead nav a:hover { color: var(--ink); text-decoration: underline; }

/* ---------- hero ---------- */

.hero {
  padding-block: clamp(3.5rem, 11vw, 7.5rem) var(--section-y);
  border-bottom: 1px solid var(--divider);
  background:
    linear-gradient(var(--bg), var(--bg)) padding-box,
    var(--bg);
  position: relative;
  overflow: hidden;
}

/* Lane rope: the one decorative flourish, and it earns its place — it is the
   thing the whole product is named after. Kept to a hairline so it reads as
   texture, not chrome. */
.hero::after {
  content: "";
  position: absolute;
  inset-inline: 0;
  bottom: 0;
  height: 3px;
  background: repeating-linear-gradient(
    90deg,
    var(--accent) 0 14px,
    transparent 14px 28px
  );
  opacity: 0.5;
}

.hero .lockup { font-size: clamp(1.6rem, 6vw, 2.6rem); }

.hero h1 {
  font-family: Orbitron, Oxanium, sans-serif;
  font-weight: 700;
  font-size: clamp(2.1rem, 8vw, 4rem);
  letter-spacing: 0.02em;
  margin-block: clamp(1.5rem, 4vw, 2.5rem) 0;
}

.hero .standfirst {
  font-size: clamp(1.05rem, 2.4vw, 1.3rem);
  color: var(--ink-secondary);
  max-width: var(--measure);
  margin-block: 1.25rem 0;
}

/* ---------- role switch ---------- */

.roles { padding-block: var(--section-y); border-bottom: 1px solid var(--divider); }

.role-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  padding: 0;
  margin: 0 0 2rem;
  list-style: none;
}

.role-tab {
  font: inherit;
  font-weight: 600;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  font-size: 0.82rem;
  padding: 0.6rem 1.15rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--ink-secondary);
  cursor: pointer;
  transition: background-color 0.15s, color 0.15s, border-color 0.15s;
}

.role-tab:hover { color: var(--ink); border-color: var(--ink-muted); }

.role-tab[aria-selected="true"] {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.role-line {
  font-family: Orbitron, Oxanium, sans-serif;
  font-size: clamp(1.35rem, 4.2vw, 2.1rem);
  font-weight: 700;
  letter-spacing: 0.01em;
  margin: 0;
  min-height: 2.3em;
}

.role-detail {
  color: var(--ink-secondary);
  max-width: var(--measure);
  margin-block: 0.25rem 0;
}

/* ---------- race breakdown ---------- */

.breakdown { padding-block: var(--section-y); border-bottom: 1px solid var(--divider); }

.section-label {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent-soft);
  margin: 0 0 0.9rem;
}

.section-title {
  font-family: Orbitron, Oxanium, sans-serif;
  font-size: clamp(1.6rem, 5vw, 2.4rem);
  font-weight: 700;
  margin: 0 0 1rem;
}

.section-intro { color: var(--ink-secondary); max-width: var(--measure); margin: 0 0 2.5rem; }

.phases {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
  gap: 1px;
  background: var(--divider);
  border: 1px solid var(--divider);
  border-radius: var(--radius);
  overflow: hidden;
}

.phase {
  background: var(--card);
  padding: 1.5rem 1.35rem 1.65rem;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.phase-head {
  display: flex;
  align-items: baseline;
  gap: 0.6rem;
}

.phase-mark {
  font-family: Orbitron, Oxanium, sans-serif;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: 0.1em;
  font-variant-numeric: tabular-nums;
}

.phase h3 { font-size: 1.02rem; font-weight: 700; letter-spacing: 0.01em; }

.phase ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 0.4rem; }

.phase li {
  font-size: 0.93rem;
  color: var(--ink-secondary);
  padding-left: 0.95rem;
  position: relative;
}

.phase li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.65em;
  width: 5px;
  height: 1px;
  background: var(--accent);
}

/* ---------- privacy ---------- */

.privacy { padding-block: var(--section-y); border-bottom: 1px solid var(--divider); }

.privacy-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr));
  gap: var(--gap);
  margin-top: 2.25rem;
}

.claim {
  background: var(--card-alt);
  border: 1px solid var(--divider);
  border-radius: var(--radius);
  padding: 1.4rem 1.35rem;
}

.claim h3 { font-size: 1rem; margin-bottom: 0.5rem; }
.claim p { margin: 0; color: var(--ink-secondary); font-size: 0.95rem; }

/* ---------- footer ---------- */

.site-foot {
  padding-block: 2.75rem 3.5rem;
  color: var(--ink-muted);
  font-size: 0.9rem;
}

.site-foot .wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 2rem;
  align-items: center;
  justify-content: space-between;
}

.site-foot nav { display: flex; flex-wrap: wrap; gap: 1.25rem; }
.site-foot a { color: var(--ink-secondary); text-decoration: none; }
.site-foot a:hover { color: var(--ink); text-decoration: underline; }

/* ---------- long-form document pages ---------- */

.doc { padding-block: clamp(2.5rem, 7vw, 4.5rem) var(--section-y); }

.doc h1 {
  font-family: Orbitron, Oxanium, sans-serif;
  font-size: clamp(1.9rem, 6vw, 2.8rem);
  margin-bottom: 0.75rem;
}

.doc .updated {
  color: var(--ink-muted);
  font-size: 0.9rem;
  margin-block: 0 2.5rem;
}

.doc h2 {
  font-size: 1.25rem;
  margin-block: 2.5rem 0.75rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--divider);
}

.doc h3 { font-size: 1.02rem; margin-block: 1.75rem 0.5rem; }
.doc p, .doc li { color: var(--ink-secondary); }
.doc li { margin-bottom: 0.4rem; }
.doc strong { color: var(--ink); font-weight: 600; }

.doc table {
  width: 100%;
  border-collapse: collapse;
  margin-block: 1.25rem;
  font-size: 0.93rem;
}

.doc th, .doc td {
  text-align: left;
  padding: 0.6rem 0.8rem;
  border-bottom: 1px solid var(--divider);
  vertical-align: top;
}

.doc th { color: var(--ink); font-weight: 600; }

.table-scroll { overflow-x: auto; }

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