:root {
  --bg: #f5f2eb; --stone: #ebe5da; --forest: #222c29; --forest-deep: #18211e;
  --ink: #26312e; --muted: #626b65; --accent: #c8653d; --accent-light: #e58b63; --sand: #bda78b;
  --light: #f8f5ee; --line: #d8d3c9;
  --font: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --max: 1200px; --gutter: 48px; --section: 104px; --gap: 24px; --radius: 12px;
  --h1: clamp(2.6rem, 5vw + 1rem, 4.5rem);
  --h2: clamp(2rem, 3vw + 1rem, 3rem);
  --h3: clamp(1.4rem, 1vw + 1.1rem, 1.75rem);
  --intro: clamp(1.125rem, 0.6vw + 1rem, 1.375rem);
  --body: clamp(1.0625rem, 0.3vw + 1rem, 1.1875rem);
}
@media (max-width: 1023px) { :root { --gutter: 32px; --section: 80px; } }
@media (max-width: 759px) { :root { --gutter: 20px; --section: 64px; } }

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body { margin: 0; background: var(--bg); color: var(--ink); font: var(--body) / 1.6 var(--font); -webkit-font-smoothing: antialiased; }
img, video, svg { display: block; max-width: 100%; }
img { height: auto; }
h1, h2, h3, p { margin: 0; }
h1, h2, h3 { font-weight: 700; text-wrap: balance; }
h1 { font-size: var(--h1); line-height: 1.05; letter-spacing: -0.01em; }
h2 { font-size: var(--h2); line-height: 1.12; letter-spacing: -0.005em; }
h3 { font-size: var(--h3); line-height: 1.2; }
p { max-width: 62ch; text-wrap: pretty; }
.final p, .seed-note { text-wrap: balance; }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--accent-light); outline-offset: 3px; border-radius: 4px; }
.wrap { width: 100%; max-width: calc(var(--max) + 2 * var(--gutter)); margin: 0 auto; padding: 0 var(--gutter); }
.section { padding: var(--section) 0; }
.bg-stone { background: var(--stone); }
.bg-dark { background: var(--forest); color: var(--light); }
.intro { font-size: var(--intro); line-height: 1.5; color: var(--muted); }
.bg-dark .intro { color: rgba(248, 245, 238, 0.8); }
.stack > * + * { margin-top: 1.1em; }
.head > h2 + p { margin-top: 22px; }
.head.center { text-align: center; }
.head.center p { margin-left: auto; margin-right: auto; max-width: 680px; }
.media { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: var(--radius); background: var(--stone); }

.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 0 26px; border-radius: 10px; font: 700 1.175rem / 1 var(--font); text-decoration: none; border: 2px solid transparent; cursor: pointer; }
.btn-primary { background: var(--accent); color: var(--light); }
a.btn-primary:hover { background: #d8714a; }
.btn-primary.is-disabled { cursor: default; }
.btn-ghost { color: var(--light); border-color: rgba(248, 245, 238, 0.7); font-weight: 600; font-size: 1.0625rem; }
.btn-ghost:hover { background: rgba(248, 245, 238, 0.14); }
.btn-sm { min-height: 44px; padding: 0 20px; font-size: 1.0625rem; }
.short { display: none; }

/* header */
.site-head { background: var(--bg); border-bottom: 1px solid var(--line); }
.head-row { height: 88px; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.brand img { width: 220px; height: auto; }
.head-nav { display: flex; align-items: center; gap: 32px; }
.head-nav .btn, .head-nav a { white-space: nowrap; }
.head-nav a:not(.btn) { color: var(--ink); text-decoration: none; font-weight: 600; font-size: 1rem; padding: 10px 0; }
.head-nav a:not(.btn):hover { color: var(--accent); }
@media (max-width: 899px) { .brand img { width: 180px; } .head-nav { gap: 20px; } }
@media (max-width: 759px) {
  .head-row { height: 72px; }
  .brand img { width: 170px; }
  .head-nav a:not(.btn) { display: none; }
}
@media (max-width: 420px) { .brand img { width: 130px; } .head-nav .long { display: none; } .head-nav .short { display: inline; } }

/* hero */
.hero { position: relative; display: flex; align-items: flex-end; height: clamp(650px, 80vh, 820px); background: #3a2a1f url(img/clips/hero.jpg) center / cover no-repeat; color: var(--light); overflow: hidden; }
.hero video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
@media (min-width: 860px) { .hero video { transform: scale(1.22); transform-origin: 0 100%; } }
.hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, rgba(18, 24, 21, 0.88) 0%, rgba(18, 24, 21, 0.55) 38%, rgba(18, 24, 21, 0) 70%); }
.hero .wrap { position: relative; z-index: 1; padding-bottom: 72px; }
.hero h1 { max-width: 13ch; text-shadow: 0 2px 16px rgba(0, 0, 0, 0.4); }
.hero .lede { margin-top: 24px; max-width: 34em; }
.hero .lede strong { display: block; font-size: var(--intro); font-weight: 600; margin-bottom: 8px; }
.hero .lede span { display: block; opacity: 0.92; }
.cta-row { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 32px; }
@media (max-width: 759px) {
  .hero { height: auto; min-height: 0; background: var(--forest-deep); display: block; }
  .hero video { inset: 0 0 auto 0; height: 380px; }
  .hero::after { inset: 0 0 auto 0; height: 380px; background: linear-gradient(to bottom, rgba(24, 33, 30, 0) 55%, var(--forest-deep) 100%); }
  .hero .wrap { padding-top: 360px; padding-bottom: 48px; }
  .cta-row .btn { flex: 1 1 100%; }
}

.replay { position: absolute; z-index: 2; right: max(var(--gutter), calc((100% - var(--max)) / 2)); bottom: 28px; display: inline-flex; align-items: center; justify-content: center; width: 48px; height: 48px; padding: 0; border: 1px solid rgba(248, 245, 238, 0.35); border-radius: 50%; background: rgba(24, 33, 30, 0.4); color: rgba(248, 245, 238, 0.85); cursor: pointer; -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.replay[hidden] { display: none; }
.replay:hover, .replay:focus-visible { background: rgba(24, 33, 30, 0.7); color: var(--light); }
.replay svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
@media (max-width: 759px) { .replay { bottom: auto; top: 300px; right: var(--gutter); } }

/* just drive */
.split { display: grid; grid-template-columns: 42fr 58fr; gap: 56px; align-items: center; }
@media (max-width: 859px) { .split { grid-template-columns: 1fr; gap: 40px; } }

/* explore */
.regions { display: grid; grid-template-columns: 1fr 1fr; gap: var(--gap); margin-top: 48px; }
.region img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; border-radius: var(--radius); }
.region h3 { margin-top: 20px; }
.region p { margin-top: 8px; color: var(--muted); }
.seed-note { margin: 48px auto 0; text-align: center; max-width: 760px; color: var(--muted); font-size: 1.0625rem; }
.more-link { display: block; width: fit-content; margin: 20px auto 0; font-weight: 700; color: var(--ink); text-decoration-color: var(--accent); text-decoration-thickness: 2px; text-underline-offset: 5px; }
.more-link:hover { color: var(--accent); }
@media (max-width: 759px) { .regions { grid-template-columns: 1fr; margin-top: 36px; } }

/* controls */
.controls { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--gap); margin-top: 48px; }
.control { padding: 32px; background: var(--stone); border-radius: var(--radius); }
.control svg { width: 72px; height: 48px; fill: none; stroke: var(--ink); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.control h3 { margin-top: 24px; }
.control p { margin-top: 10px; color: var(--muted); font-size: 1.0625rem; }
.control-note { margin-top: 24px; font-size: 0.9375rem; color: var(--muted); }
@media (max-width: 859px) { .controls { grid-template-columns: 1fr; margin-top: 36px; } .control { padding: 24px; } }

/* garage */
.garage { display: grid; grid-template-columns: 1.4fr 1fr; gap: 56px; align-items: center; }
.garage .text { order: 2; }
.garage img { order: 1; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: var(--radius); box-shadow: 0 24px 60px rgba(0, 0, 0, 0.35); }
.garage .accent-line { color: var(--accent-light); font-weight: 600; font-size: var(--intro); }
@media (max-width: 859px) { .garage { grid-template-columns: 1fr; gap: 40px; } .garage .text { order: 1; } .garage img { order: 2; } }

/* more to discover */
.three { display: grid; grid-template-columns: repeat(3, 1fr); gap: 48px; margin-top: 48px; }
.three svg { width: 40px; height: 40px; fill: none; stroke: var(--accent); stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.three h3 { margin-top: 20px; font-size: 1.375rem; }
.three p { margin-top: 10px; color: var(--muted); }
.closing { margin-top: 48px; font-size: var(--intro); font-weight: 600; }
@media (max-width: 859px) { .three { grid-template-columns: 1fr; gap: 36px; margin-top: 36px; } .closing { margin-top: 36px; } }

/* hobby */
.editorial { max-width: 780px; margin: 0 auto; }
.editorial .rule { width: 56px; height: 4px; background: var(--accent); border-radius: 2px; margin-bottom: 28px; }
.editorial p { max-width: 680px; }
.editorial h2 + p { margin-top: 28px; }
.editorial p + p { margin-top: 1.1em; }

/* final */
.final { position: relative; display: flex; align-items: center; min-height: 380px; padding: var(--section) 0; text-align: center; background: var(--forest) url(img/regions/autumn-hero.webp) center / cover no-repeat; color: var(--light); }
.final::before { content: ""; position: absolute; inset: 0; background: rgba(24, 33, 30, 0.8); }
.final .wrap { position: relative; display: flex; flex-direction: column; align-items: center; }
.final p { margin-top: 20px; color: rgba(248, 245, 238, 0.85); }
.final .btn { margin-top: 36px; }
.final .small { margin-top: 20px; font-size: 0.9375rem; color: rgba(248, 245, 238, 0.78); }

/* footer */
.site-foot { background: var(--forest-deep); color: rgba(248, 245, 238, 0.82); padding: 56px 0 32px; font-size: 0.9375rem; }
.foot-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 32px; flex-wrap: wrap; }
.foot-brand img { width: 170px; height: auto; }
.foot-brand p { margin-top: 14px; }
.foot-nav { display: flex; flex-wrap: wrap; gap: 8px 28px; list-style: none; padding: 0; margin: 0; }
.foot-nav a { color: var(--light); text-decoration: none; display: inline-block; padding: 6px 0; }
.foot-nav a:hover { color: var(--accent-light); text-decoration: underline; }
.foot-rule { border: 0; border-top: 1px solid rgba(248, 245, 238, 0.16); margin: 40px 0 24px; }
.foot-bottom { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.foot-bottom a { color: var(--light); }

/* courses page */
.page-head { padding: 72px 0 8px; }
.page-head p { margin-top: 20px; }
.course-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--gap); margin-top: 32px; }
.course-grid figure { margin: 0; }
.course-grid img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: var(--radius); }
.course-grid figcaption { margin-top: 10px; font-weight: 600; }
.region-block + .region-block { margin-top: 64px; }
@media (max-width: 859px) { .course-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 480px) { .course-grid { grid-template-columns: 1fr; } }

/* markdown pages in the landing layout (privacy) */
.prose { max-width: 680px; }
.prose h1 { margin-bottom: 32px; }
.prose h2 { margin-top: 48px; font-size: var(--h3); }
.prose h2 + p, .prose p + p { margin-top: 16px; }
.prose a { color: var(--ink); text-decoration-color: var(--accent); text-decoration-thickness: 2px; text-underline-offset: 4px; }
.prose a:hover { color: var(--accent); }

/* docs */
.docs { padding-top: 64px; }
.docs-grid { display: grid; grid-template-columns: 230px minmax(0, 1fr); gap: 56px; align-items: start; }
.docs-nav { position: sticky; top: 24px; }
.docs-nav-title { margin: 0 0 12px; font-size: 0.875rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.docs-nav ul { list-style: none; margin: 0; padding: 0; }
.docs-nav a { display: block; padding: 7px 0 7px 14px; border-left: 2px solid var(--line); color: var(--muted); text-decoration: none; font-size: 1rem; line-height: 1.35; }
.docs-nav a:hover { color: var(--ink); border-left-color: var(--sand); }
.docs-nav a[aria-current="page"] { color: var(--ink); font-weight: 700; border-left-color: var(--accent); }
.docs .prose { max-width: 820px; }
.prose ul { padding-left: 1.25rem; margin: 16px 0 0; }
.prose li { margin-top: 6px; max-width: 62ch; }
.prose strong { font-weight: 700; }
.prose code { padding: 0.1em 0.35em; background: var(--stone); border-radius: 4px; font-size: 0.92em; }
.prose img { width: 100%; max-width: 720px; margin-top: 20px; border-radius: var(--radius); }
.prose table { width: 100%; margin-top: 20px; border-collapse: collapse; font-size: 1rem; }
.prose th, .prose td { padding: 12px 14px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); }
.prose th { background: var(--stone); font-weight: 700; }
.prose th:first-child { border-radius: 8px 0 0 0; }
.prose th:last-child { border-radius: 0 8px 0 0; }
@media (max-width: 859px) {
  .docs { padding-top: 40px; }
  .docs-grid { grid-template-columns: minmax(0, 1fr); gap: 32px; }
  .docs-nav { position: static; }
  .docs-nav ul { display: flex; flex-wrap: wrap; gap: 4px 20px; }
  .docs-nav a { border-left: 0; padding: 6px 0; }
  .docs-nav a[aria-current="page"] { text-decoration: underline; text-decoration-color: var(--accent); text-decoration-thickness: 2px; text-underline-offset: 5px; }
  .prose table { display: block; overflow-x: auto; }
}
.prose table + p, .prose ul + p, .prose img + p { margin-top: 20px; }
