/* ============================================================
   Book Beagles — stylesheet
   Fonts: Fraunces (display, self-hosted) + system sans (body)
   ============================================================ */

@font-face {
  font-family: "Fraunces";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("../assets/fonts/fraunces-600.woff2") format("woff2");
}
@font-face {
  font-family: "Fraunces";
  font-style: normal;
  font-weight: 900;
  font-display: swap;
  src: url("../assets/fonts/fraunces-900.woff2") format("woff2");
}
@font-face {
  font-family: "Fraunces";
  font-style: italic;
  font-weight: 500;
  font-display: swap;
  src: url("../assets/fonts/fraunces-500i.woff2") format("woff2");
}

/* ---------- tokens ---------- */
:root {
  --bg: #e8e0c6;
  --surface: #dccea3;
  --surface-2: #d2c493;
  --ink: #23271b;
  --ink-soft: #52573f;
  --accent: #bd7527;
  --accent-strong: #8f591d;
  --moss: #4f6242;
  --line: rgba(35, 39, 27, 0.16);
  --line-strong: rgba(35, 39, 27, 0.3);

  --font-display: "Fraunces", "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  --font-body: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

  --measure: 38rem;
  --container: 72rem;
  --pad: clamp(1.5rem, 5vw, 3.5rem);

  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #1a1f14;
    --surface: #232a19;
    --surface-2: #2a331d;
    --ink: #ede4c8;
    --ink-soft: #b7b394;
    --accent: #e4a758;
    --accent-strong: #f2c184;
    --moss: #92a97b;
    --line: rgba(237, 228, 200, 0.16);
    --line-strong: rgba(237, 228, 200, 0.32);
    color-scheme: dark;
  }
}

:root[data-theme="dark"] {
  --bg: #1a1f14;
  --surface: #232a19;
  --surface-2: #2a331d;
  --ink: #ede4c8;
  --ink-soft: #b7b394;
  --accent: #e4a758;
  --accent-strong: #f2c184;
  --moss: #92a97b;
  --line: rgba(237, 228, 200, 0.16);
  --line-strong: rgba(237, 228, 200, 0.32);
  color-scheme: dark;
}

/* ---------- reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
img, svg { max-width: 100%; display: block; }
a { color: inherit; }
h1, h2, h3, p { margin: 0; }
ul { margin: 0; padding: 0; list-style: none; }
:focus-visible {
  outline: 2px solid var(--accent-strong);
  outline-offset: 3px;
}

.container {
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--pad);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.55em;
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent-strong);
}
.eyebrow::before {
  content: "";
  width: 1.5em;
  height: 1px;
  background: var(--accent-strong);
  display: inline-block;
}

/* ---------- header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.1rem var(--pad);
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(10px) saturate(1.1);
  border-bottom: 1px solid var(--line);
}
.wordmark {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  text-decoration: none;
  color: var(--ink);
}
.wordmark svg { width: 2.1rem; height: 2.1rem; flex: none; }
.wordmark-text {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 1.15rem;
  letter-spacing: 0.01em;
  line-height: 1;
}
.site-nav {
  display: flex;
  gap: clamp(1rem, 3vw, 2.25rem);
  font-size: 0.9rem;
  font-weight: 600;
}
.site-nav a {
  text-decoration: none;
  color: var(--ink-soft);
  padding-bottom: 2px;
  border-bottom: 1px solid transparent;
  transition: color 0.15s ease, border-color 0.15s ease;
}
.site-nav a:hover { color: var(--ink); border-color: var(--line-strong); }

/* ---------- hero ---------- */
.hero {
  position: relative;
  padding-block: clamp(4rem, 11vw, 7.5rem) clamp(3rem, 8vw, 5rem);
  overflow: hidden;
}
.hero-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: clamp(2.5rem, 6vw, 4rem);
  align-items: center;
}
@media (min-width: 61rem) {
  .hero-grid { grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr); }
}
.hero-copy { max-width: 34rem; }
.hero h1 {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(2.75rem, 6.4vw, 5.25rem);
  line-height: 0.98;
  letter-spacing: -0.01em;
  text-wrap: balance;
  margin-top: 1.1rem;
}
.hero h1 em {
  font-style: italic;
  font-weight: 500;
  color: var(--accent-strong);
}
.hero .lede {
  margin-top: 1.75rem;
  max-width: var(--measure);
  font-size: 1.2rem;
  line-height: 1.65;
  color: var(--ink-soft);
}
.hero-cta {
  margin-top: 2.25rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
  align-items: center;
}
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 700;
  font-size: 0.95rem;
  padding: 0.85rem 1.5rem;
  border-radius: 999px;
  text-decoration: none;
  transition: transform 0.18s ease, background 0.18s ease, color 0.18s ease;
}
.btn-primary {
  background: var(--ink);
  color: var(--bg);
}
.btn-primary:hover { transform: translateY(-2px); background: var(--accent-strong); color: var(--bg); }
.btn-ghost {
  color: var(--ink);
  border: 1px solid var(--line-strong);
}
.btn-ghost:hover { border-color: var(--ink); transform: translateY(-2px); }

.strata {
  position: absolute;
  inset: auto 0 0 0;
  height: clamp(3.5rem, 9vw, 6.5rem);
  z-index: 0;
  opacity: 0.55;
}

.hero-art {
  position: relative;
  justify-self: center;
  width: min(100%, 30rem);
  transform: rotate(-1.4deg);
}
.hero-art img {
  width: 100%;
  height: auto;
  border-radius: 3px;
  box-shadow:
    0 1px 1px rgba(0,0,0,0.08),
    0 18px 40px -14px rgba(0,0,0,0.35);
  border: 1px solid var(--line-strong);
}
@media (min-width: 61rem) {
  .hero-art { justify-self: end; }
}

/* ---------- section shell ---------- */
section { position: relative; }
.band {
  padding-block: clamp(4.5rem, 9vw, 7.5rem);
  border-top: 1px solid var(--line);
}
.band-surface { background: var(--surface); }
.band-surface-2 { background: var(--surface-2); }

.section-head { max-width: 40rem; }
.section-head h2 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(2rem, 3.4vw, 2.85rem);
  line-height: 1.08;
  text-wrap: balance;
  margin-top: 0.85rem;
}
.section-head .dek {
  margin-top: 1.1rem;
  font-size: 1.08rem;
  color: var(--ink-soft);
  max-width: var(--measure);
}

/* reveal-on-scroll */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.reveal.is-visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
}

/* ---------- the gap ---------- */
.gap-grid {
  margin-top: 3rem;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
  gap: 1px;
  background: var(--line-strong);
  border: 1px solid var(--line-strong);
}
.gap-card {
  background: var(--surface);
  padding: 2.25rem 2rem;
}
.gap-card .mark {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 500;
  font-size: 2rem;
  color: var(--accent);
  line-height: 1;
}
.gap-card p {
  margin-top: 1rem;
  color: var(--ink-soft);
  font-size: 1rem;
}
.gap-card strong { color: var(--ink); font-weight: 700; }

/* ---------- process / trail ---------- */
.trail {
  margin-top: 3.5rem;
  display: grid;
  gap: 0;
}
.step {
  position: relative;
  display: grid;
  grid-template-columns: 4.5rem 1fr;
  gap: 1.5rem;
  padding-block: 2rem;
}
.step:not(:last-child) { border-bottom: 1px dashed var(--line-strong); }
.step-num {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 500;
  font-size: 2.75rem;
  color: var(--moss);
  line-height: 1;
}
.step-body h3 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.4rem;
}
.step-body p {
  margin-top: 0.6rem;
  color: var(--ink-soft);
  max-width: 34rem;
}
.paw {
  width: 1.1rem;
  height: 1.1rem;
  fill: var(--moss);
  opacity: 0.85;
  align-self: start;
  margin-top: 0.4rem;
}

/* ---------- focus (rescue types) ---------- */
.focus-grid {
  margin-top: 3rem;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(18rem, 1fr));
  gap: 1.75rem;
}
.focus-card {
  background: var(--bg);
  border: 1px solid var(--line-strong);
  border-radius: 4px;
  padding: 2.5rem 2.25rem;
}
.focus-card h3 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.5rem;
  margin-top: 1rem;
}
.focus-card p {
  margin-top: 0.85rem;
  color: var(--ink-soft);
}
.focus-icon { width: 2.25rem; height: 2.25rem; stroke: var(--accent-strong); }

/* ---------- closing / mission ---------- */
.closing {
  background: var(--ink);
  color: var(--bg);
}
.closing .eyebrow, .closing .eyebrow::before { color: var(--accent); background: var(--accent); }
.closing h2 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(1.9rem, 3.2vw, 2.6rem);
  line-height: 1.2;
  margin-top: 1rem;
  max-width: 40rem;
  text-wrap: balance;
}
.closing p.note {
  margin-top: 1.5rem;
  max-width: var(--measure);
  color: color-mix(in srgb, var(--bg) 72%, transparent);
  font-size: 1.02rem;
}

/* ---------- footer ---------- */
.site-footer {
  background: var(--ink);
  color: color-mix(in srgb, var(--bg) 65%, transparent);
  padding-block: 2.5rem;
  border-top: 1px solid rgba(255,255,255,0.08);
}
.footer-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  font-size: 0.85rem;
}
.footer-row .wordmark-text { color: var(--bg); }
.footer-row svg { width: 1.6rem; height: 1.6rem; }
.footer-row a { text-decoration: underline; text-underline-offset: 3px; color: inherit; }

@media (max-width: 640px) {
  .site-nav { display: none; }
  .step { grid-template-columns: 3rem 1fr; }
  .step-num { font-size: 2.1rem; }
}
