/* Shared look for the static DriveTrack pages (privacy, how-to, 404). Mirrors
   the tokens and chrome of the React landing page (src/pages/landing.css) so
   moving between them doesn't feel like leaving the site. The web viewer at
   /app keeps its own theme in styles.css. */

:root {
  --bg: #05090d;
  --surface: #0b1116;
  --surface-2: #10171d;
  --surface-accent: #0f2a33;
  --border: rgba(236, 237, 238, 0.08);
  --border-strong: rgba(236, 237, 238, 0.16);
  --text: #ecedee;
  --muted: #9fb4bf;
  --accent: #2da89d;
  --accent-hover: #3cc4b7;
  --on-accent: #03110f;

  --font-display: "Barlow Condensed", "Inter", system-ui, sans-serif;
  --font-body: "Inter", system-ui, -apple-system, sans-serif;
  --radius-sm: 12px;
  --radius: 20px;
  --radius-lg: 28px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);

  color-scheme: dark;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--accent);
}

a:hover {
  color: var(--accent-hover);
}

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

h1,
h2,
h3,
p {
  margin: 0;
}

.container {
  width: 100%;
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 24px;
}

.container-narrow {
  max-width: 768px;
}

@media (max-width: 480px) {
  .container {
    padding: 0 16px;
  }
}

.skip {
  position: absolute;
  left: 16px;
  top: -48px;
  z-index: 100;
  padding: 10px 16px;
  border-radius: var(--radius-sm);
  background: var(--accent);
  color: var(--on-accent);
  font-weight: 600;
  text-decoration: none;
}

.skip:focus {
  top: 12px;
}

.icon {
  font-family: "Material Symbols Rounded";
  font-weight: normal;
  font-style: normal;
  font-size: 20px;
  line-height: 1;
  display: inline-block;
  white-space: nowrap;
  -webkit-font-smoothing: antialiased;
}

/* ── Nav ─────────────────────────────────────────────────────────────── */

.nav {
  position: sticky;
  top: 0;
  z-index: 20;
  background: color-mix(in srgb, var(--bg) 78%, transparent);
  backdrop-filter: saturate(140%) blur(14px);
  -webkit-backdrop-filter: saturate(140%) blur(14px);
  border-bottom: 1px solid var(--border);
}

.nav-inner {
  height: 64px;
  display: flex;
  align-items: center;
  gap: 32px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 17px;
  letter-spacing: -0.01em;
  color: var(--text);
  text-decoration: none;
}

.brand:hover {
  color: var(--text);
}

.brand img {
  width: 30px;
  height: 30px;
  border-radius: 8px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-left: auto;
  font-size: 14px;
  font-weight: 500;
}

.nav-links a {
  padding: 8px 12px;
  border-radius: 8px;
  color: var(--muted);
  text-decoration: none;
  transition: color 0.2s ease, background-color 0.2s ease;
}

.nav-links a:hover,
.nav-links a[aria-current="page"] {
  color: var(--text);
  background: rgba(236, 237, 238, 0.05);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 40px;
  padding: 0 16px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 14px;
  white-space: nowrap;
  text-decoration: none;
  background: var(--accent);
  color: var(--on-accent);
  transition: background-color 0.2s ease;
}

.btn:hover {
  background: var(--accent-hover);
  color: var(--on-accent);
}

@media (max-width: 760px) {
  .nav-links {
    display: none;
  }

  .nav-inner > .btn {
    margin-left: auto;
  }
}

/* ── Page header ─────────────────────────────────────────────────────── */

main {
  flex: 1;
}

.page-head {
  position: relative;
  padding: 72px 0 48px;
  isolation: isolate;
}

.page-head::before {
  content: "";
  position: absolute;
  inset: -64px 0 auto;
  height: 420px;
  z-index: -1;
  background: radial-gradient(
    ellipse 60% 60% at 30% 0%,
    rgba(45, 168, 157, 0.18),
    transparent 70%
  );
  pointer-events: none;
}

.kicker {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 12px;
}

.page-head h1 {
  font-family: var(--font-display);
  font-weight: 800;
  text-transform: uppercase;
  font-size: clamp(44px, 7vw, 72px);
  line-height: 0.95;
  letter-spacing: 0.005em;
  margin-bottom: 16px;
}

.page-head .lede {
  max-width: 560px;
  font-size: 17px;
  color: var(--muted);
}

.meta {
  font-size: 14px;
  color: var(--muted);
}

/* ── Cards & content ─────────────────────────────────────────────────── */

.card {
  padding: 28px;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--border);
  margin-bottom: 16px;
}

.card-accent {
  background: linear-gradient(135deg, var(--surface-accent), var(--surface) 70%);
  border-color: rgba(45, 168, 157, 0.2);
}

.card h2,
.card h3 {
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin-bottom: 12px;
}

.card h3 {
  display: flex;
  align-items: center;
  gap: 10px;
}

.step-num {
  flex: 0 0 auto;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  background: var(--accent);
  color: var(--on-accent);
}

.prose {
  color: var(--muted);
  font-size: 15px;
}

.prose p,
.prose ul {
  margin: 0 0 14px;
}

.prose p:last-child,
.prose ul:last-child {
  margin-bottom: 0;
}

.prose ul {
  padding-left: 20px;
}

.prose li + li {
  margin-top: 6px;
}

.prose strong {
  color: var(--text);
  font-weight: 600;
}

.prose code {
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  font-size: 12.5px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 2px 6px;
  border-radius: 6px;
  word-break: break-all;
}

.media {
  display: block;
  width: 100%;
  max-width: 300px;
  margin: 20px auto 0;
  border-radius: 16px;
  border: 1px solid var(--border-strong);
  background: var(--bg);
}

/* ── Accordion ───────────────────────────────────────────────────────── */

.accordion {
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--surface);
  overflow: hidden;
}

.accordion details + details {
  border-top: 1px solid var(--border);
}

.accordion summary {
  list-style: none;
  cursor: pointer;
  padding: 20px 24px;
  font-size: 16px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  transition: background-color 0.2s ease;
}

.accordion summary::-webkit-details-marker {
  display: none;
}

.accordion summary::after {
  content: "expand_more";
  font-family: "Material Symbols Rounded";
  font-size: 22px;
  font-weight: normal;
  color: var(--muted);
  transition: transform 0.25s var(--ease);
}

.accordion details[open] summary::after {
  transform: rotate(180deg);
}

.accordion summary:hover {
  background: var(--surface-2);
}

.accordion .prose {
  padding: 0 24px 24px;
}

/* ── Segmented platform toggle ───────────────────────────────────────── */

.segmented {
  position: relative;
  display: inline-grid;
  grid-template-columns: 1fr 1fr;
  padding: 4px;
  margin-top: 28px;
  border-radius: 14px;
  background: var(--surface);
  border: 1px solid var(--border-strong);
}

.segmented::before {
  content: "";
  position: absolute;
  top: 4px;
  bottom: 4px;
  left: 4px;
  width: calc(50% - 4px);
  border-radius: 10px;
  background: var(--accent);
  transition: transform 0.3s var(--ease);
}

.segmented[data-active="ios"]::before {
  transform: translateX(100%);
}

.segmented button {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  min-width: 140px;
  padding: 0 20px;
  border: 0;
  border-radius: 10px;
  background: none;
  font: 600 15px var(--font-body);
  color: var(--muted);
  cursor: pointer;
  transition: color 0.2s ease;
}

.segmented button[aria-selected="true"] {
  color: var(--on-accent);
}

.segmented button:not([aria-selected="true"]):hover {
  color: var(--text);
}

.segmented svg {
  width: 17px;
  height: 17px;
}

@media (max-width: 400px) {
  .segmented {
    display: grid;
  }

  .segmented button {
    min-width: 0;
  }
}

.panel[hidden] {
  display: none;
}

.panel {
  animation: panel-in 0.35s var(--ease);
}

@keyframes panel-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
}

.detected {
  margin-top: 12px;
  font-size: 13px;
  color: var(--muted);
}

/* ── Footer ──────────────────────────────────────────────────────────── */

.footer {
  margin-top: 96px;
  border-top: 1px solid var(--border);
  padding: 40px 0;
  font-size: 14px;
  color: var(--muted);
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px 32px;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
}

.footer-links a {
  color: var(--muted);
  text-decoration: none;
}

.footer-links a:hover {
  color: var(--text);
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation: none !important;
    transition-duration: 0.01ms !important;
  }
}
