/* TrailGuard website
 *
 * Every colour here is sampled from the app icon, per 02-brand/BRAND-NOTES.md.
 * Two rules from that document are obeyed and must stay obeyed:
 *   1. Vivid tones are graphics, never text. #10B5A4 measures 2.4:1 and never
 *      carries body copy; #0B6E6A (5.8:1) carries links and small type on light.
 *   2. Never white text on teal. Teal buttons take near-black (#111111).
 *
 * Light is the default and dark is layered on top of it, so a browser that
 * reports no preference still gets a complete, legible palette rather than
 * half a theme.
 */

:root {
  --teal:        #0B6E6A;   /* text-safe */
  --teal-vivid:  #10B5A4;   /* graphics only */
  --coral:       #BA4A25;   /* text-safe */
  --coral-vivid: #FF7F50;   /* graphics only */
  --bg:          #F8F9FA;
  --card:        #EAECEF;
  --text:        #1C1C1E;
  --text-2:      #55555C;
  --rule:        #D8DBE0;
  --on-teal:     #111111;
  --shadow:      0 1px 2px rgba(0,0,0,.06), 0 8px 24px rgba(0,0,0,.06);
}

@media (prefers-color-scheme: dark) {
  :root {
    --teal:        #23D3C0;
    --teal-vivid:  #23D3C0;
    --coral:       #FF8C65;
    --coral-vivid: #FF8C65;
    --bg:          #1B222C;
    --card:        #2A333F;
    --text:        #F5F5F7;
    --text-2:      #A2A9B4;
    --rule:        #3A4351;
    --shadow:      0 1px 2px rgba(0,0,0,.4), 0 8px 24px rgba(0,0,0,.3);
  }
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 17px/1.65 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
        "Helvetica Neue", Arial, sans-serif;
  text-rendering: optimizeLegibility;
}

/* ---- shell ---------------------------------------------------------- */

.wrap { max-width: 720px; margin: 0 auto; padding: 0 24px; }
.wrap-wide { max-width: 1040px; margin: 0 auto; padding: 0 24px; }

header.site {
  border-bottom: 1px solid var(--rule);
  position: sticky; top: 0; z-index: 10;
  background: color-mix(in srgb, var(--bg) 92%, transparent);
  backdrop-filter: saturate(160%) blur(12px);
}
header.site .bar {
  display: flex; align-items: center; gap: 14px;
  min-height: 62px;
}
header.site img { width: 30px; height: 30px; border-radius: 7px; }
header.site .name { font-weight: 650; letter-spacing: -.01em; font-size: 17px; }
header.site nav { margin-left: auto; display: flex; gap: 22px; font-size: 15px; }
header.site nav a { color: var(--text-2); text-decoration: none; }
header.site nav a:hover, header.site nav a[aria-current] { color: var(--text); }

footer.site {
  border-top: 1px solid var(--rule);
  margin-top: 72px; padding: 32px 0 56px;
  color: var(--text-2); font-size: 14.5px;
}
footer.site nav { display: flex; flex-wrap: wrap; gap: 20px; margin-bottom: 14px; }
footer.site a { color: var(--teal); }

/* ---- type ----------------------------------------------------------- */

h1 { font-size: 2.05rem; line-height: 1.2; letter-spacing: -.02em; margin: 0 0 .35em; }
h2 { font-size: 1.28rem; line-height: 1.3; letter-spacing: -.01em; margin: 2.4em 0 .5em; }
h3 { font-size: 1.03rem; margin: 1.8em 0 .35em; }
p, li { color: var(--text); }
a { color: var(--teal); text-underline-offset: 2px; }
strong { font-weight: 640; }
hr { border: 0; border-top: 1px solid var(--rule); margin: 2.6em 0; }
small, .small { font-size: 14.5px; color: var(--text-2); }

.lede { font-size: 1.12rem; color: var(--text-2); }
.meta { color: var(--text-2); font-size: 15px; margin: 0 0 2em; }

/* ---- legal documents ------------------------------------------------ */

/* padding-TOP only. The shorthand `padding: 56px 0 0` here silently wiped out
   the horizontal padding these elements inherit from .wrap/.wrap-wide, because
   it is the later rule at equal specificity — every heading and paragraph then
   sat flush against the screen edge on a phone. */
.doc { padding-top: 56px; }
.doc ul { padding-left: 1.15em; }
.doc li { margin: .35em 0; }

.callout {
  background: var(--card);
  border-left: 3px solid var(--coral-vivid);
  border-radius: 0 10px 10px 0;
  padding: 16px 20px;
  margin: 1.8em 0;
}
.callout p:first-child { margin-top: 0; }
.callout p:last-child { margin-bottom: 0; }

.toc {
  background: var(--card); border-radius: 12px;
  padding: 18px 22px; margin: 2em 0 2.6em;
}
.toc ol { margin: 0; padding-left: 1.3em; columns: 2; column-gap: 28px; }
.toc li { margin: .18em 0; }
.toc a { color: var(--text); text-decoration: none; }
.toc a:hover { color: var(--teal); text-decoration: underline; }
@media (max-width: 620px) { .toc ol { columns: 1; } }

/* ---- home ----------------------------------------------------------- */

.hero { padding-top: 72px; padding-bottom: 8px; text-align: center; }
.hero h1 { font-size: clamp(2.1rem, 6vw, 3.1rem); }
.hero .lede { max-width: 34ch; margin: 0 auto; }

.badges { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; margin: 30px 0 0; }
.btn {
  display: inline-block; padding: 12px 22px; border-radius: 999px;
  font-weight: 600; font-size: 15.5px; text-decoration: none;
}
.btn-primary { background: var(--teal-vivid); color: var(--on-teal); }
.btn-quiet { background: var(--card); color: var(--text); }

.figure {
  margin: 44px 0 0; border-radius: 16px; overflow: hidden;
  background: var(--card); box-shadow: var(--shadow);
}
.figure video, .figure img { display: block; width: 100%; height: auto; }
.figure figcaption {
  padding: 12px 18px; font-size: 14px; color: var(--text-2);
  border-top: 1px solid var(--rule);
}

.slot {
  aspect-ratio: 16 / 9; display: grid; place-items: center;
  color: var(--text-2); font-size: 15px; text-align: center; padding: 24px;
  background: repeating-linear-gradient(45deg,
    transparent, transparent 14px,
    color-mix(in srgb, var(--text-2) 8%, transparent) 14px,
    color-mix(in srgb, var(--text-2) 8%, transparent) 28px);
}

.grid {
  display: grid; gap: 20px; margin: 24px 0 0;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}
.card {
  background: var(--card); border-radius: 14px; padding: 22px 24px;
}
.card h3 { margin: 0 0 .3em; font-size: 1.02rem; }
.card p { margin: 0; color: var(--text-2); font-size: 15.5px; }

.section { padding-top: 64px; }
.section > h2 { margin-top: 0; }

/* Skip link — keyboard users should not have to tab the whole nav. */
.skip {
  position: absolute; left: -9999px;
  background: var(--teal-vivid); color: var(--on-teal);
  padding: 10px 16px; border-radius: 0 0 8px 0; font-weight: 600;
}
.skip:focus { left: 0; top: 0; z-index: 100; }

@media (max-width: 560px) {
  body { font-size: 16.5px; }
  header.site nav { gap: 16px; font-size: 14.5px; }
  .hero { padding-top: 48px; padding-bottom: 8px; }
}

/* ---- beta recruitment ------------------------------------------------ */
/* The page's actual job: turn a visitor into a tester. Two platform cards
   side by side, because the Android path has a step the iPhone one does not
   and pretending otherwise sends people to a Play page that refuses them. */
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.card-join { display: flex; flex-direction: column; gap: 12px; }
.card-note { color: var(--text-2); font-size: 15px; }
.btn-block { display: block; text-align: center; }
.steps { margin: 0; padding-left: 1.2em; }
.steps li { margin: .4em 0; }
.card-join .small { margin: 0; }
