/* ============================================================
   Shepherd Digital — design tokens
   Palette: deep spruce ink, warm wool, lantern amber, moss, dusk
   Type: Fraunces (display) / Work Sans (body) / IBM Plex Mono (utility)
   ============================================================ */

:root {
  --ink: #182620;
  --ink-soft: #24352C;
  --wool: #EFE9DA;
  --wool-dim: #E3DCC9;
  --paper: #FAF8F2;
  --amber: #C8823B;
  --amber-deep: #A8672A;
  --moss: #4F6B5C;
  --dusk: #34524B;
  --line: rgba(24, 38, 32, 0.14);
  --line-soft: rgba(24, 38, 32, 0.08);

  --font-display: "Fraunces", "Iowan Old Style", Georgia, serif;
  --font-body: "Work Sans", "Helvetica Neue", Arial, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, Menlo, monospace;

  --measure: 68ch;
  --radius: 3px;
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

.wrap {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 28px;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.1;
  margin: 0 0 0.5em;
  letter-spacing: -0.01em;
}

h1 { font-size: clamp(2.4rem, 5vw, 4rem); font-weight: 500; }
h2 { font-size: clamp(1.7rem, 3vw, 2.4rem); }
h3 { font-size: 1.25rem; }

p { margin: 0 0 1.1em; }
.measure { max-width: var(--measure); }

a { color: var(--dusk); text-decoration-color: var(--amber); text-underline-offset: 3px; }
a:hover { color: var(--amber-deep); }

a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--amber);
  outline-offset: 3px;
}

.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--moss);
  display: inline-flex;
  align-items: center;
  gap: 0.6em;
}
.eyebrow::before {
  content: "";
  width: 22px;
  height: 1px;
  background: var(--amber);
  display: inline-block;
}

/* ---------- header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(250, 248, 242, 0.88);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line-soft);
}
.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
}
.wordmark {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--ink);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
}
.wordmark .mark {
  width: 20px; height: 20px;
  display: inline-block;
}
.nav { display: flex; gap: 2rem; }
.nav a {
  color: var(--ink-soft);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
  padding: 0.3em 0;
  border-bottom: 1px solid transparent;
}
.nav a:hover, .nav a[aria-current="page"] {
  border-bottom-color: var(--amber);
  color: var(--ink);
}
.nav-toggle { display: none; }

@media (max-width: 720px) {
  .nav {
    position: fixed;
    inset: 68px 0 auto 0;
    background: var(--paper);
    flex-direction: column;
    gap: 0;
    border-bottom: 1px solid var(--line);
    transform: translateY(-8px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.18s ease, transform 0.18s ease;
  }
  .nav.open { opacity: 1; transform: translateY(0); pointer-events: auto; }
  .nav a { padding: 1em 28px; border-bottom: 1px solid var(--line-soft); }
  .nav-toggle {
    display: block;
    background: none; border: 1px solid var(--line);
    border-radius: var(--radius);
    width: 40px; height: 40px;
    font-family: var(--font-mono);
    cursor: pointer;
  }
}

/* ---------- hero / path signature ---------- */
.hero {
  padding: 88px 0 60px;
  overflow: hidden;
}
.hero .wrap { display: grid; gap: 40px; }
.hero h1 { max-width: 14ch; }
.hero .lede { max-width: 46ch; font-size: 1.1rem; color: var(--ink-soft); }
.hero-actions { display: flex; gap: 1rem; flex-wrap: wrap; margin-top: 1.5rem; }

.trail-figure { width: 100%; }
.trail-figure svg { width: 100%; height: auto; display: block; }
.trail-figure .waypoint-label {
  font-family: var(--font-mono);
  font-size: 10.5px;
  fill: var(--ink-soft);
  letter-spacing: 0.04em;
}
.trail-figure .waypoint-num {
  font-family: var(--font-mono);
  font-size: 10.5px;
  fill: var(--amber-deep);
}
.trail-path {
  fill: none;
  stroke: var(--moss);
  stroke-width: 1.6;
  stroke-dasharray: 6 6;
  stroke-dashoffset: 900;
  animation: draw 2.2s ease forwards 0.2s;
}
@keyframes draw { to { stroke-dashoffset: 0; } }
.trail-dot { fill: var(--paper); stroke: var(--amber); stroke-width: 2; }
.trail-dot.filled { fill: var(--amber); }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  padding: 0.75em 1.4em;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.12s ease, background 0.12s ease, border-color 0.12s ease;
}
.btn-primary { background: var(--ink); color: var(--wool); }
.btn-primary:hover { background: var(--dusk); color: var(--wool); transform: translateY(-1px); }
.btn-ghost { border-color: var(--line); color: var(--ink); }
.btn-ghost:hover { border-color: var(--amber); color: var(--ink); transform: translateY(-1px); }

/* ---------- sections ---------- */
section { padding: 64px 0; }
.section-alt { background: var(--wool); }
.section-head { max-width: 60ch; margin-bottom: 2.5rem; }

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.75rem;
}
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 2.5rem; }
@media (max-width: 820px) {
  .grid-3 { grid-template-columns: 1fr; }
  .grid-2 { grid-template-columns: 1fr; }
}

.card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.75rem;
  background: var(--paper);
}
.card .eyebrow { margin-bottom: 0.9rem; }

.app-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 2rem;
  background: var(--paper);
  display: grid;
  grid-template-columns: 100px 1fr;
  gap: 1.75rem;
  align-items: start;
}
.app-glyph {
  width: 100px; height: 100px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  display: flex; align-items: center; justify-content: center;
  background: var(--ink);
}
.status-pill {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--moss);
  border: 1px solid var(--moss);
  border-radius: 999px;
  padding: 0.25em 0.75em;
  display: inline-block;
  margin-bottom: 0.75rem;
}

/* ---------- footer ---------- */
.site-footer {
  border-top: 1px solid var(--line);
  background: var(--ink);
  color: var(--wool-dim);
  padding: 52px 0 32px;
}
.site-footer a { color: var(--wool); text-decoration-color: var(--amber); }
.footer-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr 1fr;
  gap: 2rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid rgba(239,233,218,0.14);
}
.footer-grid .wordmark { color: var(--wool); }
.footer-grid h4 {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--wool-dim);
  margin-bottom: 0.9rem;
}
.footer-grid ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.55rem; }
.footer-legal {
  padding-top: 1.5rem;
  font-size: 0.82rem;
  color: rgba(239,233,218,0.6);
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 0.75rem;
}
@media (max-width: 720px) {
  .footer-grid { grid-template-columns: 1fr; }
}

/* ---------- legal doc layout ---------- */
.legal-hero { padding: 64px 0 32px; border-bottom: 1px solid var(--line); }
.legal-meta { font-family: var(--font-mono); font-size: 0.82rem; color: var(--moss); }
.legal-body { padding: 48px 0 80px; }
.legal-layout { display: grid; grid-template-columns: 230px 1fr; gap: 3.5rem; align-items: start; }
@media (max-width: 880px) { .legal-layout { grid-template-columns: 1fr; } }
.legal-toc {
  position: sticky; top: 88px;
  font-family: var(--font-mono);
  font-size: 0.82rem;
}
.legal-toc h4 { font-family: var(--font-mono); text-transform: uppercase; letter-spacing: 0.08em; font-size: 0.72rem; color: var(--moss); }
.legal-toc ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.5rem; counter-reset: sec; }
.legal-toc li { counter-increment: sec; }
.legal-toc a { text-decoration: none; color: var(--ink-soft); }
.legal-toc a:hover { color: var(--amber-deep); }
.legal-toc a::before {
  content: counter(sec, decimal-leading-zero) " ";
  color: var(--amber-deep);
  margin-right: 0.3em;
}
.legal-content h2 {
  font-size: 1.35rem;
  border-top: 1px solid var(--line);
  padding-top: 2rem;
  margin-top: 2.5rem;
}
.legal-content h2:first-child { border-top: none; padding-top: 0; margin-top: 0; }
.legal-content h3 { font-size: 1.02rem; font-family: var(--font-body); font-weight: 700; }
.legal-content ul, .legal-content ol { padding-left: 1.3rem; }
.legal-content li { margin-bottom: 0.4rem; }
.callout {
  border-left: 3px solid var(--amber);
  background: var(--wool);
  padding: 1rem 1.25rem;
  border-radius: 0 var(--radius) var(--radius) 0;
  font-size: 0.95rem;
  margin: 1.5rem 0;
}

/* ---------- forms ---------- */
.field { display: grid; gap: 0.4rem; margin-bottom: 1.25rem; }
.field label { font-size: 0.85rem; font-weight: 600; }
.field input, .field textarea, .field select {
  font: inherit;
  padding: 0.75em 0.9em;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper);
  color: var(--ink);
}
.field-hint { font-size: 0.8rem; color: var(--moss); }
.checkbox-row { display: flex; gap: 0.6em; align-items: flex-start; font-size: 0.88rem; }

/* ---------- cookie banner ---------- */
.cookie-banner[hidden] { display: none !important; }
.cookie-banner {
  position: fixed;
  left: 20px; right: 20px; bottom: 20px;
  max-width: 560px;
  margin: 0 auto;
  background: var(--ink);
  color: var(--wool);
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
  box-shadow: 0 12px 32px rgba(0,0,0,0.24);
  z-index: 100;
  font-size: 0.9rem;
  display: grid;
  gap: 0.9rem;
}
.cookie-banner a { color: var(--wool); }
.cookie-actions { display: flex; gap: 0.75rem; flex-wrap: wrap; }
.cookie-actions .btn { padding: 0.55em 1.1em; font-size: 0.85rem; }
.cookie-actions .btn-primary { background: var(--amber); color: var(--ink); }
.cookie-actions .btn-primary:hover { background: var(--amber-deep); }
.cookie-actions .btn-ghost { border-color: rgba(239,233,218,0.35); color: var(--ink); }

.text-center { text-align: center; }
.mt-0 { margin-top: 0; }
