/* Roadworthy, thelongdrivemod.com */
:root {
  --bg: #08080a;
  --bg-2: #0e0e11;
  --surface: #121216;
  --surface-2: #17171c;
  --line: rgba(255, 255, 255, .07);
  --line-2: rgba(255, 255, 255, .12);
  --text: #ecebe8;
  --muted: #9b9a96;
  --dim: #6b6a67;
  --amber: #f2b33d;
  --amber-soft: rgba(242, 179, 61, .12);
  --sand: #d8a26b;
  --good: #7fd49b;
  --radius: 14px;
  --max: 1160px;
  --gutter: clamp(16px, 4vw, 40px);
  --sans: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --display: "Inter Tight", var(--sans);
  --mono: "JetBrains Mono", ui-monospace, "Cascadia Mono", Consolas, monospace;
  --pixel: "Silkscreen", var(--mono);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 84px; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 16px/1.65 var(--sans);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
/* film grain */
body::before {
  content: "";
  position: fixed; inset: 0; z-index: 100; pointer-events: none; opacity: .045;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
p a, li a, td a, dd a { color: var(--amber); text-decoration: underline; text-decoration-color: rgba(242,179,61,.35); text-underline-offset: 3px; }
p a:hover, li a:hover, td a:hover, dd a:hover { text-decoration-color: var(--amber); }
::selection { background: var(--amber); color: #111; }
:focus-visible { outline: 2px solid var(--amber); outline-offset: 3px; border-radius: 6px; }

.wrap { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }
.skip { position: absolute; left: -999px; top: 8px; background: var(--amber); color: #111; padding: 8px 14px; border-radius: 8px; z-index: 200; }
.skip:focus { left: 8px; }

/* ---------- nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(8, 8, 10, .72);
  backdrop-filter: saturate(140%) blur(14px);
  -webkit-backdrop-filter: saturate(140%) blur(14px);
  border-bottom: 1px solid var(--line);
}
.nav .wrap { display: flex; align-items: center; gap: 28px; height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; font-family: var(--pixel); font-size: 15px; letter-spacing: .04em; white-space: nowrap; }
.brand svg { width: 26px; height: 26px; flex: none; }
.brand small { font-family: var(--mono); font-size: 11px; color: var(--dim); letter-spacing: 0; }
.nav-links { display: flex; gap: 22px; margin-left: auto; font-size: 14px; color: var(--muted); }
.nav-links a { transition: color .15s; }
.nav-links a:hover, .nav-links a[aria-current="page"] { color: var(--text); }
.nav .btn { margin-left: 4px; }
@media (max-width: 760px) {
  .nav-links { display: none; }
  .nav .btn { margin-left: auto; }
  .brand small { display: none; }
}

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  height: 44px; padding: 0 20px; border-radius: 999px;
  font: 600 15px/1 var(--sans); letter-spacing: -.005em; white-space: nowrap;
  border: 1px solid var(--line-2); color: var(--text); background: transparent;
  transition: transform .15s, background .15s, border-color .15s, box-shadow .2s;
}
.btn:hover { border-color: rgba(255,255,255,.28); background: rgba(255,255,255,.04); }
.btn:active { transform: translateY(1px); }
.btn svg { width: 16px; height: 16px; }
.btn-primary { background: var(--amber); color: #15120b; border-color: transparent; box-shadow: 0 0 0 0 rgba(242,179,61,.0), 0 8px 30px -8px rgba(242,179,61,.55); }
.btn-primary:hover { background: #ffc451; border-color: transparent; box-shadow: 0 0 0 6px rgba(242,179,61,.12), 0 10px 36px -8px rgba(242,179,61,.7); }
.btn-sm { height: 36px; padding: 0 14px; font-size: 13.5px; }

/* ---------- type ---------- */
.eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  font: 400 11px/1 var(--pixel); letter-spacing: .14em; text-transform: uppercase; color: var(--amber);
}
.eyebrow::before { content: ""; width: 18px; height: 2px; background: var(--amber); border-radius: 2px; }
h1, h2, h3 { font-family: var(--display); font-weight: 600; letter-spacing: -.035em; line-height: 1.04; margin: 0; text-wrap: balance; }
h1 { font-size: clamp(40px, 7.4vw, 92px); }
h2 { font-size: clamp(30px, 4.4vw, 52px); }
h3 { font-size: 19px; letter-spacing: -.015em; line-height: 1.25; }
.lead { font-size: clamp(17px, 1.6vw, 20px); color: var(--muted); max-width: 640px; text-wrap: pretty; }
.grad { background: linear-gradient(180deg, #fff 10%, var(--sand) 120%); -webkit-background-clip: text; background-clip: text; color: transparent; }
.mono { font-family: var(--mono); }
.muted { color: var(--muted); }

/* ---------- hero ---------- */
.hero { position: relative; padding: clamp(72px, 12vw, 150px) 0 0; overflow: hidden; isolation: isolate; }
.hero::before { /* sodium-lamp glow */
  content: ""; position: absolute; z-index: -2; left: 50%; top: -20%; width: 1100px; height: 700px; transform: translateX(-50%);
  background: radial-gradient(closest-side, rgba(242,179,61,.16), transparent 70%);
  filter: blur(10px);
}
.hero-inner { text-align: center; display: flex; flex-direction: column; align-items: center; gap: 26px; }
.hero h1 { max-width: 13ch; }
.hero .lead { margin: 0 auto; }
.hero-cta { display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; margin-top: 6px; }
.hero-meta { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 22px; font: 12.5px/1.4 var(--mono); color: var(--dim); }
.hero-meta > span { display: inline-flex; align-items: center; gap: 8px; }
.hero-meta > span::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: var(--dim); }
.hero-meta > span:first-child::before { background: var(--good); box-shadow: 0 0 10px var(--good); }

.horizon { position: relative; margin-top: clamp(24px, 4vw, 48px); height: clamp(180px, 26vw, 340px); }
.horizon img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center 60%;
  filter: brightness(.42) saturate(.75) contrast(1.08) hue-rotate(-8deg);
  -webkit-mask-image: linear-gradient(180deg, transparent 0%, #000 35%, #000 70%, transparent 100%);
          mask-image: linear-gradient(180deg, transparent 0%, #000 35%, #000 70%, transparent 100%);
}
.horizon::after { /* the road center line, running toward you */
  content: ""; position: absolute; left: 50%; bottom: -40px; width: 3px; height: 70%; transform: translateX(-50%);
  background: repeating-linear-gradient(180deg, var(--amber) 0 22px, transparent 22px 44px);
  -webkit-mask-image: linear-gradient(180deg, transparent, #000 60%);
          mask-image: linear-gradient(180deg, transparent, #000 60%);
  animation: drive 1.1s linear infinite; opacity: .85;
}
@keyframes drive { to { background-position: 0 44px; } }

/* ---------- stats ---------- */
.stats { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); background: var(--bg-2); position: relative; }
.stats .wrap { display: grid; grid-template-columns: repeat(4, 1fr); }
.stat { padding: 34px 24px; border-left: 1px solid var(--line); }
.stat:first-child { border-left: 0; padding-left: 0; }
.stat b { display: block; font: 600 clamp(30px, 3.6vw, 44px)/1 var(--display); letter-spacing: -.04em; }
.stat b em { font-style: normal; color: var(--amber); }
.stat span { display: block; margin-top: 10px; font-size: 13.5px; color: var(--muted); line-height: 1.45; }
.stat s { color: var(--dim); text-decoration-color: rgba(255,255,255,.3); }
@media (max-width: 860px) {
  .stats .wrap { grid-template-columns: 1fr 1fr; }
  .stat { padding: 26px 18px; }
  .stat:nth-child(odd) { border-left: 0; padding-left: 0; }
  .stat:nth-child(n+3) { border-top: 1px solid var(--line); }
}

/* ---------- sections ---------- */
section { position: relative; }
.section { padding: clamp(80px, 11vw, 140px) 0; }
.section-head { display: grid; gap: 18px; max-width: 760px; margin-bottom: clamp(40px, 6vw, 64px); }
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; justify-items: center; }

/* feature grid */
.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.card { background: var(--bg); padding: 30px 28px 32px; display: grid; gap: 12px; align-content: start; position: relative; transition: background .25s; }
.card:hover { background: var(--bg-2); }
.card .ico { width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center; background: var(--amber-soft); color: var(--amber); margin-bottom: 8px; }
.card .ico svg { width: 20px; height: 20px; }
.card p { margin: 0; color: var(--muted); font-size: 15px; }
.card ul { margin: 6px 0 0; padding: 0; list-style: none; display: grid; gap: 7px; font-size: 14px; color: var(--muted); }
.card li { padding-left: 18px; position: relative; }
.card li::before { content: ""; position: absolute; left: 0; top: .72em; width: 8px; height: 2px; background: var(--amber); border-radius: 2px; opacity: .7; }
.card .more { margin-top: 8px; font-size: 14px; color: var(--text); display: inline-flex; gap: 6px; align-items: center; }
.card .more:hover { color: var(--amber); }
.card.wide { grid-column: span 2; }
.tag { display: inline-block; font: 500 11px/1 var(--mono); padding: 5px 8px; border-radius: 6px; border: 1px solid var(--line-2); color: var(--muted); letter-spacing: .02em; }
.tag.new { color: var(--amber); border-color: rgba(242,179,61,.35); background: var(--amber-soft); }
@media (max-width: 960px) { .grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 640px) { .grid { grid-template-columns: 1fr; } .card.wide { grid-column: auto; } }

/* compare table */
.compare { width: 100%; border-collapse: collapse; font-size: 15px; }
.compare-wrap { border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: var(--bg-2); }
.compare th, .compare td { text-align: left; padding: 16px 22px; border-bottom: 1px solid var(--line); vertical-align: top; }
.compare tr:last-child td { border-bottom: 0; }
.compare thead th { font: 400 11px/1 var(--pixel); letter-spacing: .12em; text-transform: uppercase; color: var(--dim); background: var(--bg); padding-top: 18px; padding-bottom: 18px; }
.compare thead th:last-child { color: var(--amber); }
.compare td:first-child { color: var(--text); font-weight: 500; width: 30%; }
.compare td:nth-child(2) { color: var(--dim); }
.compare td:last-child { color: var(--text); }
.compare td:last-child::before { content: "→ "; color: var(--amber); }
@media (max-width: 680px) {
  .compare thead { display: none; }
  .compare tr { display: grid; padding: 16px 18px; border-bottom: 1px solid var(--line); gap: 4px; }
  .compare tr:last-child { border-bottom: 0; }
  .compare td { padding: 0; border: 0; width: auto !important; }
  .compare td:nth-child(2)::before { content: "Before: "; color: var(--dim); }
}

/* steps */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; counter-reset: s; list-style: none; padding: 0; margin: 0; }
.steps li { counter-increment: s; padding: 28px; border: 1px solid var(--line); border-radius: var(--radius); background: linear-gradient(180deg, var(--surface) 0%, var(--bg) 100%); display: grid; gap: 10px; align-content: start; }
.steps li::before { content: counter(s, decimal-leading-zero); font: 400 12px/1 var(--pixel); color: var(--amber); letter-spacing: .1em; }
.steps p { margin: 0; color: var(--muted); font-size: 15px; }
@media (max-width: 820px) { .steps { grid-template-columns: 1fr; } }

code, kbd { font-family: var(--mono); font-size: .88em; background: var(--surface-2); border: 1px solid var(--line); border-radius: 6px; padding: 2px 6px; color: var(--text); }
kbd { border-bottom-width: 2px; }

/* release / changelog teaser */
.release { display: grid; grid-template-columns: 1fr 1.4fr; gap: clamp(32px, 6vw, 80px); align-items: start; }
.release-list { display: grid; gap: 0; border-top: 1px solid var(--line); }
.release-item { display: grid; grid-template-columns: 120px 1fr; gap: 20px; padding: 20px 0; border-bottom: 1px solid var(--line); }
.release-item h3 { font-size: 13px; font-family: var(--mono); font-weight: 500; letter-spacing: 0; color: var(--dim); padding-top: 3px; }
.release-item p { margin: 0; color: var(--muted); font-size: 15px; }
.release-item p b { color: var(--text); font-weight: 500; }
@media (max-width: 820px) { .release { grid-template-columns: 1fr; } .release-item { grid-template-columns: 1fr; gap: 6px; } }

/* FAQ */
.faq { display: grid; border-top: 1px solid var(--line); max-width: 860px; margin: 0 auto; }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary { list-style: none; cursor: pointer; padding: 22px 44px 22px 0; position: relative; font: 500 17.5px/1.4 var(--display); letter-spacing: -.01em; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: ""; position: absolute; right: 6px; top: 50%; width: 12px; height: 12px; margin-top: -8px; border-right: 1.5px solid var(--muted); border-bottom: 1.5px solid var(--muted); transform: rotate(45deg); transition: transform .2s; }
.faq details[open] summary::after { transform: rotate(-135deg); margin-top: -2px; }
.faq summary:hover { color: var(--amber); }
.faq .a { padding: 0 0 24px; color: var(--muted); max-width: 720px; }
.faq .a p { margin: 0 0 10px; }

/* CTA band */
.cta { position: relative; overflow: hidden; border-top: 1px solid var(--line); isolation: isolate; }
.cta img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; filter: brightness(.28) saturate(.7); }
.cta::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, var(--bg) 0%, rgba(8,8,10,.4) 45%, var(--bg) 100%); }
.cta .wrap { padding-top: clamp(90px, 12vw, 160px); padding-bottom: clamp(90px, 12vw, 160px); text-align: center; display: grid; gap: 22px; justify-items: center; }

/* page header (sub pages) */
.page-head { padding: clamp(64px, 9vw, 110px) 0 clamp(40px, 6vw, 64px); border-bottom: 1px solid var(--line); position: relative; overflow: hidden; }
.page-head::before { content: ""; position: absolute; z-index: -1; right: -200px; top: -300px; width: 800px; height: 600px; background: radial-gradient(closest-side, rgba(242,179,61,.12), transparent 70%); }
.page-head .wrap { display: grid; gap: 20px; }
.page-head h1 { font-size: clamp(36px, 6vw, 68px); max-width: 18ch; }
.crumbs { font: 12.5px var(--mono); color: var(--dim); }
.crumbs a:hover { color: var(--text); }

/* article / prose */
.doc { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: clamp(32px, 6vw, 80px); padding-top: clamp(48px, 7vw, 88px); padding-bottom: clamp(80px, 10vw, 120px); }
.toc { position: sticky; top: 96px; align-self: start; display: grid; gap: 2px; font-size: 14px; }
.toc b { font: 400 11px/1 var(--pixel); letter-spacing: .12em; color: var(--dim); text-transform: uppercase; margin-bottom: 12px; }
.toc a { color: var(--muted); padding: 6px 0 6px 14px; border-left: 1px solid var(--line); transition: color .15s, border-color .15s; }
.toc a:hover { color: var(--text); border-color: var(--amber); }
.prose { max-width: 720px; }
.prose h2 { font-size: clamp(26px, 3vw, 34px); margin: 64px 0 18px; scroll-margin-top: 90px; }
.prose h2:first-child { margin-top: 0; }
.prose h3 { margin: 36px 0 12px; }
.prose p, .prose li { color: #c9c8c4; }
.prose ul, .prose ol { padding-left: 20px; display: grid; gap: 8px; }
.prose ul li::marker { color: var(--amber); }
.prose ol li::marker { color: var(--amber); font-family: var(--mono); font-size: .9em; }
.prose strong { color: var(--text); font-weight: 600; }
.note { border: 1px solid rgba(242,179,61,.28); background: var(--amber-soft); border-radius: 12px; padding: 16px 20px; color: var(--text); font-size: 15px; margin: 24px 0; }
.note b { color: var(--amber); font-weight: 600; }
.prose pre { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 16px 18px; overflow-x: auto; font-size: 13.5px; line-height: 1.6; }
.prose pre code { background: none; border: 0; padding: 0; }
.prose .version { display: flex; align-items: baseline; gap: 14px; flex-wrap: wrap; }
.prose .version .tag { transform: translateY(-4px); }
@media (max-width: 900px) { .doc { grid-template-columns: 1fr; } .toc { position: static; grid-auto-flow: column; overflow-x: auto; gap: 0; padding-bottom: 8px; } .toc b { display: none; } .toc a { white-space: nowrap; border-left: 0; border-bottom: 1px solid var(--line); padding: 8px 12px; } }

/* footer */
footer { border-top: 1px solid var(--line); padding: 56px 0 40px; font-size: 14px; color: var(--muted); background: var(--bg); }
.foot { display: grid; grid-template-columns: 1.6fr repeat(3, 1fr); gap: 40px; }
.foot h4 { margin: 0 0 14px; font: 400 11px/1 var(--pixel); letter-spacing: .12em; text-transform: uppercase; color: var(--dim); }
.foot ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 9px; }
.foot a:hover { color: var(--text); }
.foot p { margin: 14px 0 0; max-width: 340px; color: var(--dim); font-size: 13px; }
.legal { margin-top: 48px; padding-top: 24px; border-top: 1px solid var(--line); display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; font-size: 12.5px; color: var(--dim); font-family: var(--mono); }
@media (max-width: 760px) { .foot { grid-template-columns: 1fr 1fr; } .foot > div:first-child { grid-column: 1 / -1; } }

/* reveal */
@media (prefers-reduced-motion: no-preference) {
  .reveal { animation: rise .9s cubic-bezier(.2,.7,.2,1) both; }
  .reveal.d1 { animation-delay: .08s; } .reveal.d2 { animation-delay: .16s; } .reveal.d3 { animation-delay: .24s; } .reveal.d4 { animation-delay: .32s; }
  @keyframes rise { from { opacity: 0; transform: translateY(14px); filter: blur(4px); } to { opacity: 1; transform: none; filter: none; } }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .horizon::after { animation: none; }
}

/* ---------- release data from GitHub ---------- */
.release-item ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 6px; }
.release-item li { color: var(--muted); font-size: 15px; padding-left: 16px; position: relative; }
.release-item li::before { content: ""; position: absolute; left: 0; top: .75em; width: 7px; height: 2px; border-radius: 2px; background: var(--amber); opacity: .7; }
.release-item h3 { line-height: 1.5; }
.rw-ready .rw-fallback { display: none; }
[data-rw="version"]:empty { display: none; }

.changelog .rel { padding-bottom: 48px; margin-bottom: 48px; border-bottom: 1px solid var(--line); }
.changelog .rel:last-child { border-bottom: 0; }
.changelog .version { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-bottom: 8px; }
.changelog .version h2 { margin: 0; scroll-margin-top: 90px; }
.changelog .version h2 a { color: var(--text); text-decoration: none; }
.changelog .version h2 a:hover { color: var(--amber); }
.changelog .version time { font-size: 13px; margin-left: auto; }
.changelog .rel { scroll-margin-top: 90px; }
.changelog h3 { font-size: 15px; font-family: var(--pixel); font-weight: 400; letter-spacing: .08em; text-transform: uppercase; color: var(--sand); margin-top: 28px; }
.changelog h4 { font-size: 15px; margin: 20px 0 8px; }
.changelog ul { margin: 0; }
.changelog li { font-size: 15.5px; }
.changelog .rel-links { font-size: 14px; margin-top: 18px; }
.toc[data-rw="changelog-toc"] { max-height: calc(100vh - 140px); overflow-y: auto; }
