/* Trail Garage — tokens taken from the Rider HUD design (moto-dash). */
@font-face {
  font-family: "Archivo";
  src: url("fonts/Archivo.ttf") format("truetype");
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-display: swap;
}
@font-face {
  font-family: "Archivo Narrow";
  src: url("fonts/ArchivoNarrow.ttf") format("truetype");
  font-weight: 400 700;
  font-display: swap;
}

:root {
  --bg: #0a0b0a;
  --rail: #101110;
  --surface: #171a18;
  --line: #262a27;
  --text: #f2f4ef;
  --muted: #a3aaa2;
  --accent: #4db3c9;
  --on-accent: #0a0b0a;
  --ai: #4db3c9;
  --sos: #ff2d1a;
}
@media (prefers-color-scheme: light) {
  :root {
    --bg: #f4f2ec;
    --rail: #e7e4da;
    --surface: #ffffff;
    --line: #d8d4c8;
    --text: #1a1a1a;
    --muted: #55594f;
    --accent: #1a1a1a;
    --on-accent: #ffffff;
    --ai: #0e7c90;
    --sos: #c8170a;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 17px/1.6 "Archivo", system-ui, sans-serif;
}
a { color: inherit; }
img { max-width: 100%; display: block; }

.wrap { width: min(1040px, 100% - 40px); margin-inline: auto; }

/* Header / wordmark */
header.top { background: var(--rail); border-bottom: 1px solid var(--line); }
header.top .wrap { display: flex; align-items: center; justify-content: space-between; min-height: 64px; }
.wordmark {
  font: 800 22px/1 "Archivo", sans-serif;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-decoration: none;
}
.wordmark .ai { color: var(--ai); }
.wordmark small { font-weight: 500; letter-spacing: 0.18em; color: var(--muted); margin-left: 10px; font-size: 0.55em; }
nav a { text-decoration: none; color: var(--muted); margin-left: 20px; font-weight: 600; }
nav a:hover { color: var(--text); }

/* Hero */
.hero { padding: 88px 0 72px; }
.hero h1 {
  font: 800 clamp(38px, 7.5vw, 80px)/0.98 "Archivo", sans-serif;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  margin: 0 0 20px;
}
.hero h1 .ai { color: var(--ai); }
.hero p.lead { font-size: 21px; color: var(--muted); max-width: 40ch; margin: 0 0 32px; }

.btn {
  display: inline-block;
  min-height: 56px;
  padding: 15px 28px;
  border-radius: 14px;
  background: var(--accent);
  color: var(--on-accent);
  font-weight: 700;
  text-decoration: none;
  letter-spacing: 0.02em;
}
.btn.ghost { background: transparent; color: var(--text); border: 2px solid var(--line); }
.btn[aria-disabled="true"] { opacity: 0.55; pointer-events: none; }

/* Sections */
section { padding: 56px 0; }
h2 { font: 800 30px/1.1 "Archivo", sans-serif; text-transform: uppercase; letter-spacing: 0.03em; margin: 0 0 24px; }
h3 { font: 700 19px/1.3 "Archivo", sans-serif; margin: 0 0 6px; }
.grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 22px; }
.card p { margin: 0; color: var(--muted); }
.card.app { display: block; text-decoration: none; }
.card.app .tag { font-size: 13px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ai); font-weight: 700; }
.card.sos { border-color: var(--sos); }
.card.sos h3 { color: var(--sos); }

/* Screenshots */
figure.shot { margin: 0; }
figure.shot img { width: 100%; height: auto; border-radius: 18px; border: 1px solid var(--line); background: var(--surface); }
figure.shot figcaption { margin-top: 10px; color: var(--muted); font-size: 15px; }
.hero-shot { padding-bottom: 24px; }
.gallery { display: grid; gap: 28px 20px; }
.gallery.two { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.gallery.phones { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); max-width: 820px; margin-inline: auto; }
.card.sos + .gallery { margin-top: 28px; }

/* Legal text */
.legal { max-width: 74ch; padding: 48px 0 72px; }
.legal h1 { font: 800 clamp(32px, 6vw, 48px)/1.05 "Archivo", sans-serif; text-transform: uppercase; margin: 0 0 8px; }
.legal h2 { font-size: 22px; margin: 40px 0 12px; text-transform: none; letter-spacing: 0; }
.legal p, .legal li { color: var(--text); }
.legal li { margin-bottom: 8px; }
.legal .meta { color: var(--muted); margin: 0 0 32px; }
.legal table { width: 100%; border-collapse: collapse; margin: 16px 0; font-size: 15px; }
.legal th, .legal td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
.legal th { color: var(--muted); font-weight: 600; }

footer { background: var(--rail); border-top: 1px solid var(--line); padding: 28px 0; color: var(--muted); font-size: 15px; }
footer .wrap { display: flex; flex-wrap: wrap; gap: 12px 24px; justify-content: space-between; }
footer a { text-decoration: none; }
footer a:hover { color: var(--text); }
