/* Dirt Hunters web — design system (site v3.2, 2026-08-29)
 *
 * Two-tone identity: near-black dirt + signal orange, condensed display type.
 * Flat cards on #0a0a0b with 1px hairlines; gradients only on media.
 * Round 2 of the world-class loop folded in: WCAG contrast (--dim lifted,
 * dark-on-orange CTAs), responsive nav, mobile podium/statgrid/stagecard,
 * focus-visible, reduced motion, safe-area insets, 44px touch targets.
 */
:root {
  --orange: #ff6b00;
  --orange-hot: #ff8f3d;
  --bg: #0a0a0b;
  --card: #131316;
  --card2: #18181c;
  --line: rgba(255, 255, 255, .09);
  --txt: #f2f2f0;
  --txt2: #c9cdc3;
  --sub: #9a9f94;
  --dim: #7d8377;
  --gold: #e6b93e;
  --red: #fca5a5;
  --disp: "Barlow Condensed", "Arial Narrow", sans-serif;
  --body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --r-md: 12px;
  --r-lg: 16px;
}
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { background: var(--bg); color: var(--txt); font-family: var(--body); min-height: 100vh; }
a { color: inherit; }
img { max-width: 100%; }
a:focus-visible, button:focus-visible { outline: 2px solid var(--orange); outline-offset: 2px; border-radius: 4px; }
.btn:focus-visible, nav .cta:focus-visible, .getapp:focus-visible { outline-color: var(--txt); }

/* ---- nav ------------------------------------------------------------- */
nav { display: flex; align-items: center; gap: 22px;
      padding: 12px 22px;
      padding-top: max(12px, env(safe-area-inset-top));
      padding-left: max(22px, env(safe-area-inset-left));
      padding-right: max(22px, env(safe-area-inset-right));
      border-bottom: 1px solid var(--line); position: sticky; top: 0;
      background: rgba(10, 10, 11, .88); backdrop-filter: blur(10px);
      -webkit-backdrop-filter: blur(10px); z-index: 50; }
nav .brand { font-family: var(--disp); font-weight: 900; font-size: 22px; letter-spacing: 2px;
             text-decoration: none; display: flex; align-items: center; gap: 9px; }
nav .brand b { color: var(--orange); }
.brandmark { width: 26px; height: 26px; border-radius: 7px; }
nav a.item { color: var(--sub); text-decoration: none; font-size: 14px; font-weight: 600;
             white-space: nowrap; padding: 13px 2px; margin: -13px 0; }
nav a.item:hover, nav a.item.on { color: var(--txt); }
nav .cta { margin-left: auto; background: var(--orange); color: var(--bg); text-decoration: none;
           font-weight: 800; font-size: 13px; padding: 8px 16px; border-radius: 10px;
           white-space: nowrap; transition: background .15s; }
nav .cta:hover { background: var(--orange-hot); }
@media (max-width: 640px) {
  nav { gap: 13px; padding-left: max(14px, env(safe-area-inset-left)); padding-right: max(14px, env(safe-area-inset-right)); }
  nav .brand { font-size: 18px; letter-spacing: 1px; gap: 7px; }
  nav a.item { font-size: 13px; }
  nav .cta { font-size: 12px; padding: 9px 12px; }
}
@media (max-width: 460px) {
  nav { gap: 11px; }
  nav .brand .brandtext { display: none; }
  .brandmark { width: 28px; height: 28px; }
}
#view { min-height: 72vh; }

/* ---- layout primitives ------------------------------------------------ */
.wrap { max-width: 980px; margin: 0 auto; padding: 28px 20px; }
.loading { text-align: center; color: var(--sub); padding: 60px 20px; font-size: 14px; }
.err { text-align: center; color: var(--red); padding: 60px 20px; font-size: 14px; }
.empty { color: var(--sub); text-align: center; padding: 36px 20px; border: 1px dashed var(--line);
         border-radius: var(--r-lg); font-size: 14px; margin: 16px 0; }
.empty a { color: var(--orange); }
h2.pgtitle { font-family: var(--disp); font-size: 34px; font-weight: 900; letter-spacing: .5px;
             line-height: 1.02; margin-bottom: 4px; text-transform: uppercase; }
.meta { color: var(--sub); font-size: 13px; margin-bottom: 18px; }
.meta a { color: var(--sub); }
.kicker { color: var(--orange); font-size: 12px; font-weight: 800; letter-spacing: 3px;
          text-transform: uppercase; margin-bottom: 8px; }

/* ---- hero (landing) --------------------------------------------------- */
.hero-shell { position: relative; overflow: hidden; border-bottom: 1px solid var(--line); }
.hero-film { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
             opacity: .38; filter: saturate(1.1); }
.hero-grad { position: absolute; inset: 0;
             background: linear-gradient(180deg, rgba(10,10,11,.25) 0%, rgba(10,10,11,.55) 55%, var(--bg) 100%); }
.hero-in { position: relative; max-width: 780px; margin: 0 auto; text-align: center;
           padding: clamp(64px, 12vh, 130px) 20px clamp(56px, 10vh, 110px); }
h1.hero { font-family: var(--disp); font-size: clamp(44px, 13.5vw, 128px); font-weight: 900;
          letter-spacing: 2px; line-height: .92; text-transform: uppercase; }
h1.hero b { color: var(--orange); }
.tag { color: var(--orange); font-size: 14px; font-weight: 800; letter-spacing: 5px;
       text-transform: uppercase; margin-top: 16px; }
.pitch { color: var(--txt2); font-size: clamp(15px, 2.2vw, 18px); line-height: 1.6;
         margin: 22px auto 30px; max-width: 560px; }
.pitch b { color: var(--txt); }
.btnrow { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.btn { display: inline-block; background: var(--orange); color: var(--bg); text-decoration: none;
       font-weight: 900; font-size: 16px; padding: 15px 26px; border-radius: 14px;
       transition: transform .12s, background .15s; }
.btn:hover { background: var(--orange-hot); transform: translateY(-1px); }
.btn.alt { background: rgba(19,19,22,.85); border: 1px solid var(--line); color: var(--txt);
           font-weight: 700; font-size: 14px; }
.btn.alt:hover { background: var(--card2); }
.fine { color: var(--dim); font-size: 12px; margin-top: 26px; line-height: 1.6; }
.fine a { color: var(--sub); }
.fh-line { color: var(--gold); font-size: 13px; font-weight: 700; margin-top: 18px; }

/* ---- live stat band --------------------------------------------------- */
.statband { display: grid; grid-template-columns: repeat(4, 1fr); max-width: 980px;
            margin: -1px auto 0; border-left: 1px solid var(--line); border-right: 1px solid var(--line); }
.statband .cell { padding: 26px 10px; text-align: center; border-right: 1px solid var(--line); }
.statband .cell:last-child { border-right: none; }
.statband .n { font-family: var(--disp); font-size: clamp(28px, 5vw, 44px); font-weight: 900;
               font-variant-numeric: tabular-nums; line-height: 1; }
.statband .n small { font-size: .55em; color: var(--sub); }
.statband .t { color: var(--sub); font-size: 11px; font-weight: 800; letter-spacing: 2px;
               text-transform: uppercase; margin-top: 6px; }
@media (max-width: 640px) {
  .statband { grid-template-columns: repeat(2, 1fr); }
  .statband .cell:nth-child(2) { border-right: none; }
  .statband .cell:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
}

/* ---- ticker ----------------------------------------------------------- */
.ticker { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
          overflow: hidden; white-space: nowrap; background: var(--card); }
.ticker-track { display: inline-block; padding: 11px 0; animation: tick 60s linear infinite; }
.ticker:hover .ticker-track { animation-play-state: paused; }
.ticker-track span { color: var(--sub); font-size: 13px; margin: 0 26px; }
.ticker-track span b { color: var(--txt); font-weight: 700; }
@keyframes tick { from { transform: translateX(0); } to { transform: translateX(-50%); } }

/* ---- feature grid ----------------------------------------------------- */
.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin: 18px 0; }
.feature { background: var(--card); border: 1px solid var(--line); border-radius: 18px;
           padding: 22px 20px; transition: transform .15s, border-color .15s; }
.feature:hover { transform: translateY(-2px); border-color: rgba(255,107,0,.35); }
.feature .fi { font-size: 26px; }
.feature h3 { font-family: var(--disp); font-size: 21px; font-weight: 800; letter-spacing: .5px;
              text-transform: uppercase; margin: 10px 0 6px; }
.feature p { color: var(--sub); font-size: 13.5px; line-height: 1.55; }
@media (max-width: 760px) { .features { grid-template-columns: 1fr 1fr; } }
@media (max-width: 500px) { .features { grid-template-columns: 1fr; } }

/* ---- landing sections ------------------------------------------------- */
.section { padding: 44px 0 8px; }
.sec-head { display: flex; align-items: baseline; gap: 14px; margin-bottom: 14px; }
.sec-head h2 { font-family: var(--disp); font-size: 30px; font-weight: 900;
               letter-spacing: .5px; text-transform: uppercase; }
.sec-head a { color: var(--sub); font-size: 13px; text-decoration: none; margin-left: auto;
              padding: 12px 2px; margin-top: -12px; margin-bottom: -12px; white-space: nowrap; }
.sec-head a:hover { color: var(--txt); }
.reveal { opacity: 0; transform: translateY(14px); transition: opacity .5s, transform .5s; }
.reveal.in { opacity: 1; transform: none; }

/* ---- stat grid (ride/rider pages) ------------------------------------- */
.statgrid { display: flex; gap: 0; background: var(--card); border: 1px solid var(--line);
            border-radius: var(--r-lg); overflow: hidden; margin: 16px 0; flex-wrap: wrap; }
.stat { flex: 1 1 110px; padding: 16px 8px; text-align: center; border-left: 1px solid var(--line); }
.stat:first-child { border-left: none; }
.stat .v { font-family: var(--disp); font-size: 26px; font-weight: 900; font-variant-numeric: tabular-nums; }
.stat .v small { font-size: 13px; color: var(--sub); font-weight: 700; font-family: var(--body); }
.stat .l { font-size: 10px; letter-spacing: 1.5px; color: var(--sub); font-weight: 800; margin-top: 3px; }
@media (max-width: 480px) {
  .statgrid { display: grid; grid-template-columns: 1fr 1fr; }
  .stat { border-left: none; border-top: 1px solid var(--line); }
  .stat:nth-child(-n+2) { border-top: none; }
  .stat:nth-child(2n) { border-left: 1px solid var(--line); }
}

/* ---- maps ------------------------------------------------------------- */
#map, .bigmap { width: 100%; height: 460px; border-radius: var(--r-lg); border: 1px solid var(--line); overflow: hidden; }
.maplibregl-canvas { border-radius: var(--r-lg); }
.toolrow { display: flex; gap: 10px; margin: 14px 0; flex-wrap: wrap; align-items: center; }
.chip { background: var(--card); border: 1px solid var(--line); color: var(--txt); font-weight: 700;
        font-family: var(--body); font-size: 13px; padding: 9px 16px; border-radius: 999px; cursor: pointer;
        transition: border-color .15s; }
.chip:hover { border-color: rgba(255,255,255,.25); }
.chip.on { border-color: var(--orange); color: var(--orange); background: rgba(255,107,0,.12); }
@media (pointer: coarse) { .chip { min-height: 44px; padding: 11px 18px; } }

/* ---- elevation profile ------------------------------------------------ */
.elevbox { background: var(--card); border: 1px solid var(--line); border-radius: var(--r-lg);
           padding: 14px 14px 6px; margin: 14px 0; }
.elevbox .elabel { font-size: 10px; letter-spacing: 1.5px; color: var(--sub); font-weight: 800; }
.elevbox svg { width: 100%; height: 110px; display: block; }
.elevbox .erange { display: flex; justify-content: space-between; color: var(--dim);
                   font-size: 11px; padding: 4px 2px 6px; font-variant-numeric: tabular-nums; }

/* ---- photos ----------------------------------------------------------- */
.photostrip { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
              gap: 10px; margin: 14px 0; }
.phbtn { padding: 0; border: 0; background: none; cursor: pointer; border-radius: var(--r-md); }
.phbtn img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: var(--r-md);
             border: 1px solid var(--line); display: block; transition: transform .12s; }
.phbtn:hover img { transform: scale(1.02); }
.lightbox { position: fixed; inset: 0; background: rgba(5,5,6,.94); z-index: 100;
            display: flex; align-items: center; justify-content: center; cursor: zoom-out;
            padding: max(24px, env(safe-area-inset-top)) max(24px, env(safe-area-inset-right))
                     max(24px, env(safe-area-inset-bottom)) max(24px, env(safe-area-inset-left)); }
.lightbox img { max-width: 96vw; max-height: 90vh; border-radius: 10px; }
.lightbox .cap { position: absolute; bottom: calc(20px + env(safe-area-inset-bottom)); left: 0; right: 0;
                 text-align: center; color: var(--sub); font-size: 13px; }

/* ---- tables (boards, stage times) ------------------------------------- */
.boardwrap { border: 1px solid var(--line); border-radius: var(--r-lg); overflow-x: auto;
             background: var(--card); }
table.board { width: 100%; border-collapse: collapse; }
.board th { text-align: left; font-size: 11px; letter-spacing: 1px; color: var(--sub);
            padding: 12px 14px; border-bottom: 1px solid var(--line); }
.board td { padding: 12px 14px; border-bottom: 1px solid rgba(255,255,255,.05); font-size: 14px; }
@media (max-width: 480px) {
  .board th, .board td { padding: 11px 8px; font-size: 13px; }
  .board .rank { width: 34px; }
}
.board tr:last-child td { border-bottom: none; }
.board tr:hover td { background: rgba(255,255,255,.03); }
.board .rank { color: var(--sub); font-weight: 800; width: 44px; }
.board .score { text-align: right; font-weight: 800; font-variant-numeric: tabular-nums; }

/* Rider-name links across data components: quiet but discoverable. */
.board td a, .pname a, .srow a:not(.getapp), .crown .cv a {
  text-decoration: underline; text-decoration-color: rgba(255,255,255,.22);
  text-underline-offset: 3px; }
.board td a:hover, .pname a:hover, .srow a:not(.getapp):hover, .crown .cv a:hover { color: var(--orange); }

/* ---- podium ----------------------------------------------------------- */
.podium { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 12px; align-items: end; margin: 18px 0; }
.podium .p { background: var(--card); border: 1px solid var(--line); border-radius: var(--r-lg);
             text-align: center; padding: 18px 10px 14px; }
.podium .p.first { border-color: rgba(230,185,62,.45); padding-top: 30px; }
.podium .medal { font-size: 30px; }
.podium .pname { font-weight: 800; font-size: 14px; margin-top: 8px; overflow: hidden;
                 text-overflow: ellipsis; white-space: nowrap; }
.podium .pscore { font-family: var(--disp); font-size: 24px; font-weight: 900; color: var(--orange);
                  margin-top: 4px; font-variant-numeric: tabular-nums; }
.podium .pscore small { font-size: 13px; color: var(--sub); }
@media (max-width: 520px) {
  .podium { grid-template-columns: 1fr; align-items: stretch; }
  .podium .p.first { order: -1; padding-top: 18px; }
  .podium .p:last-child { order: 1; }
}

/* ---- cards (feed, rides) ---------------------------------------------- */
.cardlist { display: grid; gap: 12px; margin: 16px 0; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r-lg);
        padding: 16px 18px; display: flex; gap: 14px; align-items: center;
        text-decoration: none; transition: border-color .15s, transform .12s; }
a.card:hover { border-color: rgba(255,107,0,.4); transform: translateY(-1px); }
.card .emoji { font-size: 24px; flex: none; }
.card .cbody { min-width: 0; flex: 1; }
.card .ctitle { font-weight: 700; font-size: 14.5px; }
.card .csub { color: var(--sub); font-size: 12.5px; margin-top: 3px; }
.card .cwhen { color: var(--dim); font-size: 11.5px; flex: none; }
.minisvg { flex: none; width: 74px; height: 74px; background: var(--card2);
           border: 1px solid var(--line); border-radius: var(--r-md); }

/* ---- rider page ------------------------------------------------------- */
.riderhead { display: flex; gap: 18px; align-items: center; margin: 6px 0 4px; }
.avatar { width: 84px; height: 84px; border-radius: 50%; object-fit: cover;
          border: 2px solid var(--line); background: var(--card2); flex: none; }
.avatar.ph { display: flex; align-items: center; justify-content: center;
             font-family: var(--disp); font-size: 30px; font-weight: 900; color: var(--dim); }
.riderhead h2 { font-family: var(--disp); font-size: 34px; font-weight: 900;
                text-transform: uppercase; line-height: 1; }
.badges { display: flex; gap: 8px; margin-top: 8px; flex-wrap: wrap; }
.badge { background: var(--card); border: 1px solid var(--line); color: var(--sub);
         font-size: 11.5px; font-weight: 700; padding: 4px 11px; border-radius: 999px; }
.badge.founding { color: var(--gold); border-color: rgba(230,185,62,.4); }

/* ---- stage rows -------------------------------------------------------- */
.stagecard { background: var(--card); border: 1px solid var(--line); border-radius: var(--r-lg);
             padding: 14px 18px; margin: 10px 0; }
.stagecard .shead { display: flex; align-items: baseline; gap: 10px; }
.stagecard .sname { font-weight: 800; font-size: 15px; }
.stagecard .sdim { color: var(--sub); font-size: 12px; margin-left: auto; font-variant-numeric: tabular-nums; }
.stagecard .srow { display: flex; gap: 10px; color: var(--sub); font-size: 13px; padding: 6px 0 0;
                   font-variant-numeric: tabular-nums; align-items: baseline; }
.stagecard .srow b { color: var(--txt); font-weight: 700; }
.stagecard .srow .t { margin-left: auto; font-weight: 800; color: var(--txt); white-space: nowrap; }
@media (max-width: 480px) {
  .stagecard .shead { flex-wrap: wrap; }
  .stagecard .sdim { margin-left: 0; flex: 1 1 100%; }
  .stagecard .srow { flex-wrap: wrap; row-gap: 2px; }
  .stagecard .srow b { flex: 1 1 100%; }
}
.crownrow { display: flex; gap: 12px; margin: 14px 0; flex-wrap: wrap; }
.crown { flex: 1 1 220px; background: var(--card); border: 1px solid rgba(230,185,62,.35);
         border-radius: var(--r-lg); padding: 14px 16px; }
.crown .cl { font-size: 10px; letter-spacing: 1.5px; color: var(--gold); font-weight: 800; }
.crown .cv { font-weight: 800; font-size: 15px; margin-top: 5px; }
.crown .cv small { color: var(--sub); font-weight: 600; }

/* ---- CTA after flyover ------------------------------------------------- */
.ctacard { background: var(--card); border: 1px solid rgba(255,107,0,.4); border-radius: var(--r-lg);
           padding: 18px 20px; margin: 14px 0; display: flex; gap: 14px; align-items: center;
           justify-content: space-between; flex-wrap: wrap; }
.ctacard .cc { font-size: 14.5px; }
.ctacard .cc b { font-weight: 800; }
.ctacard .cc .ccsub { color: var(--sub); font-size: 13px; margin-top: 2px; }

/* ---- steps (Android page) ---------------------------------------------- */
.steps { display: grid; gap: 12px; margin: 20px 0; }
.step { background: var(--card); border: 1px solid var(--line); border-radius: var(--r-lg);
        padding: 18px 20px; display: flex; gap: 16px; align-items: center; flex-wrap: wrap; }
.step .num { font-family: var(--disp); font-size: 28px; font-weight: 900; color: var(--orange);
             flex: none; width: 34px; }
.step .sbody { flex: 1 1 200px; }
.step .sbody b { font-size: 15px; }
.step .sbody p { color: var(--sub); font-size: 13px; margin-top: 3px; line-height: 1.5; }

/* ---- misc -------------------------------------------------------------- */
.getapp { display: inline-block; margin-top: 18px; background: var(--orange); color: var(--bg);
          text-decoration: none; font-weight: 800; font-size: 14px; padding: 12px 22px; border-radius: var(--r-md); }
.getapp:hover { background: var(--orange-hot); }
.flyover-hint { color: var(--sub); font-size: 12px; margin-top: 8px; }
.center { max-width: 520px; margin: 0 auto; text-align: center; padding: 9vh 20px; }
.accent { height: 3px; width: 64px; background: var(--orange); margin: 0 auto 28px; border-radius: 2px; }
.prose { max-width: 680px; margin: 0 auto; padding: 28px 20px 48px; }
.prose h2 { font-family: var(--disp); font-size: 34px; font-weight: 900; text-transform: uppercase; margin-bottom: 8px; }
.prose h3 { font-size: 16px; font-weight: 800; margin: 26px 0 6px; }
.prose p, .prose li { color: var(--sub); font-size: 14px; line-height: 1.7; }
.prose ul { padding-left: 20px; margin: 8px 0; }
.prose a { color: var(--txt); }

/* ---- footer ------------------------------------------------------------ */
footer { border-top: 1px solid var(--line); margin-top: 56px; }
.footin { max-width: 980px; margin: 0 auto; padding: 30px 20px calc(40px + env(safe-area-inset-bottom)); }
.fbrand { font-family: var(--disp); font-weight: 900; font-size: 20px; letter-spacing: 2px; }
.fbrand b { color: var(--orange); }
.flinks { display: flex; gap: 18px; flex-wrap: wrap; margin: 14px 0 10px; }
.flinks a { color: var(--sub); font-size: 13px; text-decoration: none; padding: 12px 2px; margin: -12px 0; }
.flinks a:hover { color: var(--txt); }
.fnote { color: var(--dim); font-size: 12px; }

/* ---- reduced motion ----------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .ticker-track { animation: none; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .btn, .feature, a.card, .phbtn img { transition: none; }
}
