/* ============================================================
   RedactedRoute landing — shared styles
   Tokens, layout, and component styles for index + privacy.
   ============================================================ */

:root {
  /* Palette */
  --bg: #0d1117;
  --surface: #161b22;
  --surface-lift: #1c2129;
  --border: #21262d;
  --border-strong: #30363d;
  --text: #e6edf3;
  --text-dim: #b1b8c2;
  --text-muted: #7d8590;
  --green: #4CAF50;
  --green-dim: #2f6f34;
  --red: #C62828;
  --red-dim: #6b1616;
  --amber: #F57F17;
  --amber-dim: #7a3f0b;
  --blue: #3B82F6;

  /* Type */
  --sans: -apple-system, BlinkMacSystemFont, "Inter", "Segoe UI", system-ui,
          "Helvetica Neue", Arial, sans-serif;
  --mono: "SF Mono", "SFMono-Regular", "Menlo", "Monaco", "Consolas",
          "Liberation Mono", "Courier New", monospace;

  /* Layout */
  --max: 1120px;
  --gutter: 24px;
  --radius: 10px;
  --radius-sm: 6px;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
img, svg { display: block; max-width: 100%; }
button { font: inherit; }
a { color: inherit; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-feature-settings: "ss01", "cv11";
  overflow-x: hidden;
}

/* ---------- Typography ---------- */
h1, h2, h3, h4 {
  margin: 0;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.1;
}
h1 { font-size: clamp(2.4rem, 5.8vw, 4.4rem); font-weight: 700; letter-spacing: -0.035em; }
h2 { font-size: clamp(1.75rem, 3.6vw, 2.6rem); letter-spacing: -0.028em; }
h3 { font-size: 1.15rem; }
p  { margin: 0 0 1em; color: var(--text-dim); }
p:last-child { margin-bottom: 0; }
.mono { font-family: var(--mono); font-feature-settings: "tnum"; }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--mono);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--text-muted);
  margin-bottom: 20px;
}
.eyebrow::before {
  content: "";
  width: 24px;
  height: 1px;
  background: var(--border-strong);
}

/* ---------- Layout primitives ---------- */
.wrap {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 var(--gutter);
}
section {
  padding: 96px 0;
  border-bottom: 1px solid var(--border);
}
section:last-of-type { border-bottom: 0; }

/* ---------- Nav ---------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(13, 17, 23, 0.82);
  backdrop-filter: saturate(140%) blur(12px);
  -webkit-backdrop-filter: saturate(140%) blur(12px);
  border-bottom: 1px solid var(--border);
}
.nav-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 60px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--text);
  font-weight: 600;
  letter-spacing: -0.01em;
}
.brand svg { width: 28px; height: 28px; border-radius: 50%; }
.nav-links {
  display: flex;
  gap: 24px;
  font-size: 0.9rem;
}
.nav-links a {
  text-decoration: none;
  color: var(--text-muted);
  transition: color 120ms ease;
}
.nav-links a:hover { color: var(--text); }
.nav-links a.nav-support {
  color: var(--text-dim);
}
.nav-links a.nav-support .heart { color: var(--red); font-size: 1.15em; line-height: 1; }
.nav-links a.nav-support:hover { color: var(--green); }
.nav-support-mobile {
  display: none;
  color: var(--text-dim);
  font-size: 1rem;
  text-decoration: none !important;
  border-bottom: none !important;
  margin-right: 10px;
  align-items: center;
  gap: 5px;
  white-space: nowrap;
}
.nav-support-mobile .heart { color: var(--red); font-size: 1.15em; line-height: 1; }
.nav-support-mobile:hover { color: var(--text); }
@media (max-width: 560px) {
  .nav-links { display: none; }
  .nav-support-mobile { display: inline-flex; }
}

/* ============================================================
   HERO
   ============================================================ */
.hero {
  padding: 88px 0 88px;
  position: relative;
  overflow: hidden;
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: 56px;
  align-items: center;
}
@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; gap: 40px; }
}

.hero h1 {
  margin-bottom: 20px;
}
.hero h1 .accent { color: var(--green); }
.hero-sub {
  font-size: 1.12rem;
  color: var(--text-dim);
  max-width: 42ch;
  margin-bottom: 32px;
}
.hero-cta-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 20px;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 18px;
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  background: var(--surface);
  font-size: 0.9rem;
  color: var(--text);
}
.status-pill .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 4px rgba(76, 175, 80, 0.18);
  animation: pulse 2.4s ease-in-out infinite;
}
.status-pill .mono { color: var(--text-muted); font-size: 0.82rem; }

.text-link {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.92rem;
  border-bottom: 1px solid var(--border-strong);
  padding-bottom: 2px;
  transition: color 120ms ease, border-color 120ms ease;
}
.text-link:hover { color: var(--green); border-color: var(--green); }

/* Hero map visualization */
.hero-viz {
  position: relative;
  aspect-ratio: 5 / 4;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.hero-viz svg { width: 100%; height: 100%; }

.viz-legend {
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 14px;
  display: flex;
  gap: 10px;
  font-family: var(--mono);
  font-size: 0.72rem;
}
.viz-legend .chip {
  flex: 1;
  padding: 10px 12px;
  background: rgba(13, 17, 23, 0.85);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-dim);
  backdrop-filter: blur(6px);
}
.viz-legend .chip.fastest { border-color: rgba(59, 130, 246, 0.5); }
.viz-legend .chip.privacy { border-color: rgba(76, 175, 80, 0.5); }
.viz-legend .swatch {
  width: 20px;
  height: 2px;
  border-radius: 1px;
  flex-shrink: 0;
}
.viz-legend .fastest .swatch { background: var(--blue); }
.viz-legend .privacy .swatch { background: var(--green); }

/* Route animations */
.route-fastest {
  stroke-dasharray: 800;
  stroke-dashoffset: 800;
  animation: draw 2.4s ease-out 0.4s forwards;
}
.route-privacy {
  stroke-dasharray: 900;
  stroke-dashoffset: 900;
  animation: draw 2.6s ease-out 1.1s forwards;
}
.cam {
  opacity: 0;
  transform-origin: center;
  animation: camIn 400ms ease-out forwards;
}
.pin {
  opacity: 0;
  animation: fadeIn 400ms ease-out 2.6s forwards;
}

@keyframes draw   { to { stroke-dashoffset: 0; } }
@keyframes camIn  { from { opacity: 0; transform: scale(0.4); } to { opacity: 1; transform: scale(1); } }
@keyframes fadeIn { to   { opacity: 1; } }
@keyframes pulse  { 0%, 100% { box-shadow: 0 0 0 0 rgba(76,175,80,0.35); } 50% { box-shadow: 0 0 0 8px rgba(76,175,80,0); } }

@media (prefers-reduced-motion: reduce) {
  .route-fastest, .route-privacy { animation: none; stroke-dashoffset: 0; }
  .cam, .pin { animation: none; opacity: 1; }
  .status-pill .dot { animation: none; box-shadow: none; }
  html { scroll-behavior: auto; }
}

/* ============================================================
   PROBLEM SECTION
   ============================================================ */
.problem-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
}
@media (max-width: 900px) {
  .problem-grid { grid-template-columns: 1fr; gap: 40px; }
}
.big-stat {
  font-family: var(--mono);
  font-size: clamp(3.4rem, 8vw, 5.6rem);
  line-height: 1;
  font-weight: 600;
  letter-spacing: -0.04em;
  color: var(--red);
  font-feature-settings: "tnum";
  margin-bottom: 10px;
}
.big-stat-label {
  font-family: var(--mono);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-muted);
  margin-bottom: 28px;
}
.problem-copy p { font-size: 1.05rem; }

/* Dot-field visualization of camera density */
.dot-field {
  aspect-ratio: 1 / 1;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
  position: relative;
}
.dot-field svg { width: 100%; height: 100%; }
.dot-field-caption {
  position: absolute;
  left: 18px;
  bottom: 18px;
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--text-muted);
  background: rgba(13, 17, 23, 0.75);
  padding: 4px 8px;
  border-radius: 4px;
}

/* ============================================================
   SOLUTION SECTION
   ============================================================ */
.solution {
  background: linear-gradient(180deg, transparent, rgba(76, 175, 80, 0.03) 50%, transparent);
}
.solution-head {
  max-width: 640px;
  margin-bottom: 56px;
}
.route-compare {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}
@media (max-width: 720px) {
  .route-compare { grid-template-columns: 1fr; }
}
.route-card {
  padding: 28px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  position: relative;
  overflow: hidden;
}
.route-card::before {
  content: "";
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 3px;
}
.route-card.fastest::before { background: var(--blue); }
.route-card.privacy::before { background: var(--green); }
.route-card h3 {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 20px;
  font-size: 1.05rem;
}
.route-card .badge {
  font-family: var(--mono);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-muted);
}
.route-metrics {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 20px;
}
.metric-val {
  font-family: var(--mono);
  font-size: 1.6rem;
  font-weight: 600;
  color: var(--text);
  font-feature-settings: "tnum";
}
.route-card.fastest .metric-val.hi { color: var(--blue); }
.route-card.privacy .metric-val.hi { color: var(--green); }
.metric-label {
  font-family: var(--mono);
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  margin-top: 4px;
}
.route-card .note {
  font-size: 0.92rem;
  color: var(--text-muted);
  border-top: 1px solid var(--border);
  padding-top: 16px;
}

/* ============================================================
   FEATURES SECTION
   ============================================================ */
.features-head { margin-bottom: 56px; max-width: 640px; }

.features {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
@media (max-width: 900px) { .features { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px) { .features { grid-template-columns: 1fr; } }

.feature {
  background: var(--bg);
  padding: 28px 24px;
  transition: background 160ms ease;
}
.feature:hover { background: var(--surface); }
.feature .icon {
  width: 24px;
  height: 24px;
  margin-bottom: 16px;
  color: var(--green);
}
.feature h3 {
  font-size: 0.98rem;
  margin-bottom: 6px;
  color: var(--text);
}
.feature p {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin: 0;
}

/* ============================================================
   HOW IT WORKS SECTION
   ============================================================ */
.how-head { margin-bottom: 56px; }
.steps {
  display: grid;
  grid-template-columns: 1fr auto 1fr auto 1fr;
  gap: 20px;
  align-items: stretch;
}
@media (max-width: 900px) {
  .steps { grid-template-columns: 1fr; gap: 16px; }
  .step-arrow { display: none; }
}
.step {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
}
.step-num {
  font-family: var(--mono);
  font-size: 0.78rem;
  color: var(--green);
  margin-bottom: 14px;
  letter-spacing: 0.1em;
}
.step h3 { font-size: 1.1rem; margin-bottom: 10px; }
.step p { font-size: 0.92rem; margin: 0; }
.step-arrow {
  align-self: center;
  color: var(--border-strong);
  font-family: var(--mono);
  font-size: 1.4rem;
}

/* ============================================================
   SCREENSHOT SECTION (placeholder for Mechanic)
   ============================================================ */
.screenshot-wrap {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 56px;
  align-items: center;
}
@media (max-width: 900px) { .screenshot-wrap { grid-template-columns: 1fr; } }
.screenshot-slot {
  aspect-ratio: 9 / 19;
  max-width: 280px;
  margin: 0 auto;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-family: var(--mono);
  font-size: 0.75rem;
  text-align: center;
  padding: 20px;
  position: relative;
}
.screenshot-slot::after {
  content: "";
  position: absolute;
  top: 8px; left: 50%;
  transform: translateX(-50%);
  width: 60px; height: 4px;
  background: var(--border-strong);
  border-radius: 2px;
}

/* ============================================================
   PRIVACY SECTION
   ============================================================ */
.privacy-block {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 56px;
  align-items: start;
}
@media (max-width: 900px) { .privacy-block { grid-template-columns: 1fr; } }
.no-list {
  list-style: none;
  padding: 0;
  margin: 0;
  border-top: 1px solid var(--border);
}
.no-list li {
  display: grid;
  grid-template-columns: 32px 1fr;
  gap: 16px;
  padding: 18px 4px;
  border-bottom: 1px solid var(--border);
  align-items: baseline;
}
.no-list .no {
  font-family: var(--mono);
  font-size: 0.82rem;
  color: var(--red);
  letter-spacing: 0.05em;
}
.no-list .item {
  color: var(--text-dim);
  font-size: 0.98rem;
}

/* ============================================================
   TECH / OPEN SOURCE SECTION
   ============================================================ */
.tech-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
  align-items: start;
}
@media (max-width: 900px) { .tech-grid { grid-template-columns: 1fr; } }
.tech-list {
  list-style: none;
  padding: 0;
  margin: 0;
  font-family: var(--mono);
  font-size: 0.88rem;
}
.tech-list li {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 20px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}
.tech-list .k { color: var(--text-muted); }
.tech-list .v { color: var(--text); }

/* ============================================================
   FOOTER
   ============================================================ */
footer {
  padding: 48px 0 64px;
  border-top: 1px solid var(--border);
}
.footer-row {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  justify-content: space-between;
  align-items: center;
  font-size: 0.88rem;
  color: var(--text-muted);
}
.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
}
.footer-links a {
  color: var(--text-muted);
  text-decoration: none;
  transition: color 120ms ease;
}
.footer-links a:hover { color: var(--text); }

/* ============================================================
   PRIVACY PAGE (privacy.html)
   ============================================================ */
.doc {
  max-width: 720px;
  margin: 0 auto;
  padding: 80px 0;
}
.doc h1 { font-size: 2.2rem; margin-bottom: 12px; }
.doc .updated {
  font-family: var(--mono);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-muted);
  margin-bottom: 40px;
}
.doc h2 { font-size: 1.3rem; margin: 40px 0 12px; }
.doc p, .doc li { color: var(--text-dim); font-size: 1rem; line-height: 1.65; }
.doc ul { padding-left: 20px; }
.doc a { color: var(--green); text-decoration: none; border-bottom: 1px solid var(--green-dim); }
.doc a:hover { border-color: var(--green); }
.doc-note {
  padding: 16px 20px;
  background: var(--surface);
  border-left: 3px solid var(--amber);
  border-radius: var(--radius-sm);
  margin: 24px 0;
  font-size: 0.92rem;
}

/* ---------- Focus ---------- */
:focus-visible {
  outline: 2px solid var(--green);
  outline-offset: 3px;
  border-radius: 2px;
}
