/* Trailseek site — emerald + gold, matching the app icon.
   Dark header/hero, light (dark-mode aware) docs. No JavaScript. */

:root {
  --emerald: #1fa571;
  --emerald-600: #13543b;
  --emerald-800: #0a3020;
  --emerald-900: #062a1b;
  --gold: #e79320;
  --gold-300: #f4b23a;
  --gold-100: #ffe6a6;

  --ink: #16211d;
  --muted: #566b62;
  --line: #e4ebe7;
  --bg: #ffffff;
  --bg-soft: #f5f8f6;
  --card: #ffffff;

  --radius: 14px;
  --radius-sm: 10px;
  --shadow: 0 1px 2px rgba(6, 42, 27, .06), 0 8px 30px rgba(6, 42, 27, .08);
  --shadow-lg: 0 30px 60px -20px rgba(3, 18, 11, .45);
  --wrap: 1120px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --ink: #e7efea;
    --muted: #9db3aa;
    --line: #1e2a25;
    --bg: #0d1310;
    --bg-soft: #111813;
    --card: #121a16;
    --shadow: 0 1px 2px rgba(0,0,0,.4), 0 10px 30px rgba(0,0,0,.35);
  }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--emerald); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; display: block; }
h1, h2, h3 { line-height: 1.2; letter-spacing: -0.02em; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 20px; border-radius: 999px; font-weight: 600;
  border: 1px solid transparent; cursor: pointer; transition: transform .08s ease, box-shadow .2s ease;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn-gold { background: linear-gradient(180deg, var(--gold-300), var(--gold)); color: #2a1c05; box-shadow: 0 8px 24px -8px rgba(231,147,32,.6); }
.btn-ghost { background: rgba(255,255,255,.08); color: #eafff5; border-color: rgba(255,255,255,.22); }
.btn-emerald { background: var(--emerald); color: #fff; }
.btn-sm { padding: 9px 16px; font-size: .92rem; }

/* ---------- header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(8, 40, 27, .92);
  backdrop-filter: saturate(140%) blur(8px);
  border-bottom: 1px solid rgba(255,255,255,.08);
}
.site-header .wrap { display: flex; align-items: center; gap: 20px; height: 62px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; color: #fff; font-size: 1.12rem; letter-spacing: -0.01em; }
.brand:hover { text-decoration: none; }
.brand img { width: 28px; height: 28px; border-radius: 7px; }
.nav { margin-left: auto; display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.nav a { color: #cfe7da; padding: 8px 12px; border-radius: 8px; font-size: .95rem; }
.nav a:hover { color: #fff; background: rgba(255,255,255,.08); text-decoration: none; }
.nav a.active { color: #fff; }

/* ---------- hero ---------- */
.hero {
  position: relative; overflow: hidden; color: #eafff5;
  background:
    radial-gradient(1100px 500px at 15% -10%, rgba(31,165,113,.55), transparent 60%),
    linear-gradient(160deg, #0e5f40 0%, #0a3020 55%, #062a1b 100%);
}
.hero .wrap { display: grid; grid-template-columns: 1.1fr .9fr; gap: 40px; align-items: center; padding-top: 72px; padding-bottom: 84px; }
.hero h1 { font-size: clamp(2.4rem, 5vw, 3.6rem); margin: 0 0 .35em; }
.hero .tagline { font-size: clamp(1.1rem, 2.2vw, 1.35rem); color: #bfeddc; margin: 0 0 1.4em; max-width: 32ch; }
.hero .cta { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.hero-badge { display:inline-flex; align-items:center; gap:8px; }
.hero-note { margin-top: 22px; font-size: .9rem; color: #8fc7b0; }
.hero-art { justify-self: center; position: relative; }
.hero-art img { width: min(300px, 70vw); filter: drop-shadow(var(--shadow-lg)); border-radius: 30px; }

/* ---------- trust strip ---------- */
.trust { background: var(--emerald-900); color: #bfeddc; }
.trust .wrap { display: flex; gap: 26px; flex-wrap: wrap; justify-content: center; padding: 14px 24px; font-size: .92rem; }
.trust b { color: #fff; font-weight: 600; }

/* ---------- sections ---------- */
.section { padding: 76px 0; }
.section.alt { background: var(--bg-soft); }
.section-head { max-width: 640px; margin: 0 auto 44px; text-align: center; }
.section-head h2 { font-size: clamp(1.7rem, 3.4vw, 2.3rem); margin: 0 0 .3em; }
.section-head p { color: var(--muted); margin: 0; font-size: 1.05rem; }
.eyebrow { color: var(--gold); font-weight: 700; letter-spacing: .12em; text-transform: uppercase; font-size: .78rem; }

/* ---------- feature grid ---------- */
.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.feature {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 24px; box-shadow: var(--shadow);
}
.feature .icon { width: 40px; height: 40px; border-radius: 10px; display: grid; place-items: center;
  background: linear-gradient(160deg, rgba(31,165,113,.16), rgba(231,147,32,.14)); margin-bottom: 14px; }
.feature .icon svg { width: 22px; height: 22px; stroke: var(--emerald); fill: none; stroke-width: 1.8; }
.feature h3 { margin: 0 0 .35em; font-size: 1.12rem; }
.feature p { margin: 0; color: var(--muted); font-size: .96rem; }

/* ---------- shots ---------- */
.shots { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; align-items: end; }
.shot { text-align: center; }
.shot img { margin: 0 auto 12px; border-radius: 18px; box-shadow: var(--shadow); }
.shot span { color: var(--muted); font-size: .9rem; }
.shots-ipad { margin-top: 26px; display: grid; place-items: center; }
.shots-ipad img { border-radius: 16px; box-shadow: var(--shadow); }

/* ---------- docs CTA band ---------- */
.band { background: linear-gradient(160deg, #0e5f40, #0a3020); color: #eafff5; }
.band .wrap { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 44px 24px; flex-wrap: wrap; }
.band h2 { margin: 0; font-size: clamp(1.5rem, 3vw, 2rem); }
.band p { margin: .3em 0 0; color: #bfeddc; }

/* ---------- footer ---------- */
.site-footer { background: var(--emerald-900); color: #9fc7b5; padding: 40px 0; }
.site-footer .wrap { display: flex; gap: 24px; justify-content: space-between; flex-wrap: wrap; }
.site-footer a { color: #cfe7da; }
.site-footer .cols { display: flex; gap: 40px; flex-wrap: wrap; }
.site-footer .cols nav { display: flex; flex-direction: column; gap: 6px; }
.site-footer small { color: #6f9684; }

/* ---------- docs ---------- */
.doc-layout { max-width: var(--wrap); margin: 0 auto; padding: 0 24px; display: grid; grid-template-columns: 250px 1fr; gap: 44px; align-items: start; }
.navtoggle, .navtoggle-btn { display: none; }
.sidebar { position: sticky; top: 78px; align-self: start; padding: 26px 0; max-height: calc(100vh - 90px); overflow-y: auto; }
.sidebar .group { font-size: .74rem; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); margin: 18px 0 6px; font-weight: 700; }
.sidebar a { display: block; color: var(--ink); padding: 6px 10px; border-radius: 8px; font-size: .95rem; }
.sidebar a:hover { background: var(--bg-soft); text-decoration: none; }
.sidebar a.active { background: rgba(31,165,113,.12); color: var(--emerald-600); font-weight: 600; }

.doc-content { padding: 34px 0 80px; min-width: 0; }
.breadcrumb { color: var(--muted); font-size: .9rem; margin-bottom: 8px; }
.breadcrumb a { color: var(--muted); }

/* prose */
.prose { max-width: 760px; }
.prose h1 { font-size: clamp(1.9rem, 4vw, 2.4rem); margin: 0 0 .5em; }
.prose h2 { font-size: 1.4rem; margin: 1.8em 0 .5em; padding-top: .3em; }
.prose h3 { font-size: 1.14rem; margin: 1.5em 0 .4em; }
.prose p, .prose li { color: var(--ink); }
.prose a { text-decoration: underline; text-underline-offset: 2px; }
.prose img { border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); margin: 1.4em 0; }
.prose code { background: var(--bg-soft); border: 1px solid var(--line); border-radius: 6px; padding: .12em .4em; font-size: .9em; }
.prose pre { background: #0a1a13; color: #d7f0e4; padding: 16px 18px; border-radius: 12px; overflow-x: auto; }
.prose pre code { background: none; border: none; padding: 0; color: inherit; }
.prose blockquote { margin: 1.4em 0; padding: .4em 1.1em; border-left: 3px solid var(--gold); background: var(--bg-soft); border-radius: 0 8px 8px 0; color: var(--muted); }
.prose table { border-collapse: collapse; width: 100%; margin: 1.4em 0; font-size: .95rem; }
.prose th, .prose td { border: 1px solid var(--line); padding: 8px 12px; text-align: left; }
.prose th { background: var(--bg-soft); }
.doc-nextprev { display: flex; justify-content: space-between; gap: 16px; margin-top: 48px; padding-top: 22px; border-top: 1px solid var(--line); flex-wrap: wrap; }
.doc-nextprev a { font-weight: 600; }

/* ---------- responsive ---------- */
@media (max-width: 900px) {
  .hero .wrap { grid-template-columns: 1fr; padding-top: 52px; padding-bottom: 56px; }
  .hero-art { order: -1; }
  .hero-art img { width: min(230px, 60vw); }
  .features { grid-template-columns: 1fr 1fr; }
  .shots { grid-template-columns: 1fr 1fr; }
  .doc-layout { grid-template-columns: 1fr; gap: 0; }
  .sidebar { position: static; max-height: none; padding: 0 0 8px; border-bottom: 1px solid var(--line); }
  .navtoggle-btn {
    display: inline-flex; align-items: center; gap: 8px; margin: 22px 0 0;
    padding: 10px 16px; border: 1px solid var(--line); border-radius: 10px;
    font-weight: 600; color: var(--ink); background: var(--bg-soft); cursor: pointer;
  }
  .navtoggle:not(:checked) ~ .sidebar { display: none; }
}
@media (max-width: 560px) {
  .features { grid-template-columns: 1fr; }
  .nav a.hide-sm { display: none; }
}
