/* Untrail website. Minimal: type, whitespace, hairlines, and Untrail Orange used sparingly. */

@font-face { font-family: "Space Grotesk"; src: url("../fonts/SpaceGrotesk.woff2") format("woff2"); font-weight: 300 700; font-display: swap; }
@font-face { font-family: "Inter"; src: url("../fonts/Inter.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }
@font-face { font-family: "JetBrains Mono"; src: url("../fonts/JetBrainsMono.woff2") format("woff2"); font-weight: 100 800; font-display: swap; }

:root {
  --bg: #f8fafc;
  --surface: #ffffff;
  --line: rgba(11, 15, 23, 0.09);
  --line-strong: rgba(11, 15, 23, 0.16);
  --text: #0b0f17;
  --muted: #555d6b;
  --dim: #6b7280;
  --accent: #ff4a00;
  --accent-hover: #ff6a2e;
  --accent-ink: #b23a0a;
  --accent-soft: #fff1ea;
  --ok: #166534; --ok-soft: #e7f8ec;
  --rv: #92400e; --rv-soft: #fdf4dc;
  --no: #b91c1c; --no-soft: #fdeaea;
  --display: "Space Grotesk", system-ui, sans-serif;
  --body: "Inter", system-ui, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, Consolas, monospace;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
body { margin: 0; background: var(--bg); color: var(--text); font: 16px/1.65 var(--body); }
::selection { background: rgba(255, 74, 0, 0.16); }
img, video { display: block; max-width: 100%; height: auto; }
a { color: var(--accent-ink); text-underline-offset: 3px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }
h1, h2, h3 { margin: 0; font-family: var(--display); font-weight: 600; letter-spacing: -0.03em; text-wrap: balance; }
.lead, .body { text-wrap: pretty; }
h2 { font-size: clamp(28px, 3.4vw, 40px); line-height: 1.12; }
h3 { font-size: 18px; line-height: 1.3; letter-spacing: -0.015em; }
p { margin: 0; }
code, pre { font-family: var(--mono); font-size: 0.86em; }
:not(pre) > code { padding: 0.1em 0.35em; border-radius: 5px; background: rgba(11, 15, 23, 0.05); overflow-wrap: anywhere; }
.accent { color: var(--accent); }
.skip { position: absolute; left: -999px; top: 8px; z-index: 100; padding: 10px 16px; border-radius: 8px; background: var(--surface); color: var(--text); }
.skip:focus { left: 16px; }

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

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 10px 16px; border-radius: 10px; border: 1px solid transparent; font: 500 15px/1.2 var(--body); text-decoration: none; white-space: nowrap;
  transition: background 0.2s var(--ease), border-color 0.2s var(--ease), color 0.2s var(--ease), transform 0.2s var(--ease); }
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-hover); }
.btn-ghost { border-color: var(--line-strong); color: var(--text); background: var(--surface); }
.btn-ghost:hover { border-color: var(--text); }
.btn:active { transform: translateY(1px); }
.btn-lg { padding: 13px 20px; font-size: 16px; }
.btn-sm { padding: 7px 13px; font-size: 14px; }

/* Nav */
.nav { position: sticky; top: 0; z-index: 50; background: rgba(248, 250, 252, 0.82); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); }
.nav-in { display: flex; align-items: center; gap: 20px; height: 64px; }
.brand img { height: 26px; width: auto; }
.nav nav { margin-left: auto; }
.nav-links { display: flex; gap: 4px; margin: 0; padding: 0; list-style: none; }
.nav-links a { display: inline-flex; align-items: center; gap: 6px; padding: 6px 10px; color: var(--muted); font-size: 14.5px; font-weight: 500; text-decoration: none; }
.nav-links a:hover { color: var(--text); }
.stars { padding: 0 7px; border-radius: 999px; border: 1px solid var(--line-strong); font: 500 12px/1.6 var(--mono); color: var(--muted); white-space: nowrap; }

/* Hero */
.hero { padding: 104px 0 0; text-align: center; background: radial-gradient(900px 380px at 50% -60px, rgba(255, 106, 46, 0.1), transparent 70%); }
.hero h1 { font-size: clamp(40px, 6.2vw, 68px); line-height: 1.04; letter-spacing: -0.045em; }
.lead { max-width: 36rem; margin: 22px auto 0; color: var(--muted); font-size: 18px; }
.cta { display: flex; justify-content: center; flex-wrap: wrap; gap: 10px; margin-top: 32px; }
.meta { margin-top: 18px; color: var(--dim); font: 500 12.5px/1.5 var(--mono); }
.frame { margin: 0; border-radius: 14px; overflow: hidden; border: 1px solid var(--line-strong); background: var(--surface); box-shadow: 0 1px 2px rgba(11, 15, 23, 0.04), 0 24px 60px -32px rgba(11, 15, 23, 0.28); }
.hero .frame { margin-top: 64px; }
.demo { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; background: #1b2230; }

/* Sections */
.section { padding: 112px 0 0; }
.section > .wrap { padding-top: 0; }
.two { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: 64px; align-items: start; }
.body { margin-top: 16px; color: var(--muted); font-size: 16.5px; max-width: 38rem; }
.two > .body:first-child, .two > div > .body:first-of-type { margin-top: 16px; }
.two > div > .body:first-child { margin-top: 0; }
.narrow-p { max-width: 40rem; }

.figures { display: grid; grid-template-columns: 1fr 1fr; gap: 0; margin: 32px 0 0; border-top: 1px solid var(--line); }
.figures div { padding: 22px 24px 0 0; }
.figures div + div { padding-left: 24px; border-left: 1px solid var(--line); }
.figures dt { font: 600 44px/1 var(--display); letter-spacing: -0.04em; }
.figures dd { margin: 10px 0 0; color: var(--muted); font-size: 14.5px; }

.cols { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; margin: 40px 0 48px; padding: 0; list-style: none; }
.cols li { padding-top: 20px; border-top: 1px solid var(--line-strong); }
.n { display: block; margin-bottom: 14px; font: 500 13px/1 var(--mono); color: var(--accent-ink); }
.cols h3 { margin-bottom: 8px; }
.cols p { color: var(--muted); font-size: 15px; }

.states { margin: 0; padding: 0; list-style: none; border-top: 1px solid var(--line); }
.states li { padding: 22px 0; border-bottom: 1px solid var(--line); }
.states p { margin-top: 10px; color: var(--muted); font-size: 15px; }
.tag { display: inline-block; padding: 3px 10px; border-radius: 999px; font: 600 13px/1.5 var(--body); }
.tag.ok { color: var(--ok); background: var(--ok-soft); }
.tag.rv { color: var(--rv); background: var(--rv-soft); }
.tag.no { color: var(--no); background: var(--no-soft); }

.rules { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0 40px; margin: 40px 0 0; }
.rules div { padding: 24px 0 28px; border-top: 1px solid var(--line-strong); }
.rules dt { font: 600 17px/1.3 var(--display); letter-spacing: -0.015em; }
.rules dd { margin: 8px 0 0; color: var(--muted); font-size: 15px; }

.stats { display: grid; grid-template-columns: repeat(4, 1fr); margin: 36px 0 0; border-top: 1px solid var(--line-strong); }
.stats div { padding: 24px 24px 0 0; }
.stats div + div { padding-left: 24px; border-left: 1px solid var(--line); }
.stats dt { font: 600 44px/1 var(--display); letter-spacing: -0.04em; color: var(--accent); }
.stats dd { margin: 12px 0 0; color: var(--muted); font-size: 14.5px; }

/* Download */
.dl { display: flex; justify-content: space-between; align-items: flex-end; gap: 32px; flex-wrap: wrap; padding: 40px; border-radius: 16px; border: 1px solid var(--line-strong); background: var(--surface) radial-gradient(600px 220px at 100% 0%, rgba(255, 106, 46, 0.1), transparent 70%); }
.dl-actions { display: grid; justify-items: start; gap: 10px; }
.small { color: var(--dim); font: 500 12.5px/1.5 var(--mono); }
.files { margin: 28px 0 0; padding: 0; list-style: none; border-top: 1px solid var(--line); }
.files li { display: flex; justify-content: space-between; align-items: baseline; gap: 20px; padding: 14px 0; border-bottom: 1px solid var(--line); font-size: 15px; color: var(--muted); }
.files b { margin-right: 8px; color: var(--text); font: 500 14px var(--mono); }
.files a { flex: none; font-weight: 500; text-decoration: none; }
.files a:hover { text-decoration: underline; }

/* FAQ */
.faq { border-top: 1px solid var(--line); }
.faq.compact { margin-top: 28px; max-width: 760px; }
.faq details { min-width: 0; border-bottom: 1px solid var(--line); }
summary { display: flex; justify-content: space-between; gap: 16px; padding: 18px 0; cursor: pointer; list-style: none; font: 500 16.5px/1.4 var(--display); letter-spacing: -0.01em; }
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; color: var(--dim); font: 400 20px/1 var(--body); transition: transform 0.2s var(--ease); }
details[open] summary::after { transform: rotate(45deg); }
details p { padding-bottom: 18px; color: var(--muted); font-size: 15px; }
details p + pre { margin-top: -6px; }
pre { margin: 0 0 18px; padding: 12px 14px; border-radius: 10px; background: #0e1117; color: #e7e9ee; overflow-x: auto; }

/* Footer */
.foot { margin-top: 120px; padding: 40px 0 48px; border-top: 1px solid var(--line); color: var(--dim); font-size: 14px; }
.foot-in { display: grid; grid-template-columns: auto 1fr; gap: 20px 40px; align-items: center; }
.foot-logo { height: 22px; width: auto; }
.foot nav { justify-self: end; }
.foot ul { display: flex; flex-wrap: wrap; gap: 6px 22px; margin: 0; padding: 0; list-style: none; }
.foot nav a { color: var(--muted); text-decoration: none; }
.foot nav a:hover { color: var(--text); }
.fine { grid-column: 1 / -1; font-size: 13px; }
.fine a { color: var(--muted); }

/* Policy pages */
.doc { padding: 88px 0 0; }
.doc .wrap { max-width: 760px; }
.doc h1 { font-size: clamp(34px, 4.6vw, 48px); line-height: 1.08; letter-spacing: -0.04em; }
.doc h2 { margin-top: 48px; font-size: 24px; }
.doc .list { padding-left: 20px; }
.doc .list li { margin: 10px 0; }
.roles { margin: 20px 0 0; border-top: 1px solid var(--line); }
.roles div { display: grid; grid-template-columns: 220px 1fr; gap: 16px; padding: 16px 0; border-bottom: 1px solid var(--line); }
.roles dt { font: 600 15.5px/1.5 var(--display); }
.roles dd { margin: 0; color: var(--muted); font-size: 15.5px; }
@media (max-width: 640px) { .roles div { grid-template-columns: 1fr; gap: 4px; } .doc { padding-top: 60px; } }

/* 404 */
.hero.full { min-height: 100vh; display: grid; place-content: center; padding: 0 20px; }

/* Responsive */
@media (max-width: 900px) {
  .two { grid-template-columns: 1fr; gap: 28px; }
  .cols, .rules { grid-template-columns: 1fr 1fr; }
  .stats { grid-template-columns: 1fr 1fr; }
  .stats div:nth-child(3) { padding-left: 0; border-left: 0; }
  .stats div:nth-child(n+3) { margin-top: 24px; }
}
@media (max-width: 640px) {
  .nav-links li:not(:last-child) { display: none; }
  .nav-in { gap: 10px; }
  .hero { padding-top: 72px; }
  .hero .frame { margin-top: 44px; }
  .section { padding-top: 84px; }
  .cols, .rules { grid-template-columns: 1fr; }
  .cta .btn { width: 100%; }
  .dl { padding: 26px; }
  .dl-actions, .dl-actions .btn { width: 100%; }
  .files li { flex-direction: column; gap: 4px; }
  .figures dt, .stats dt { font-size: 36px; }
  .foot-in { grid-template-columns: 1fr; }
  .foot nav { justify-self: start; }
}

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