/* ============================================================
   Riverbend Garden Co. — base.css
   Reset · tokens · typography · utilities
   NZ pastoral bone + sage + kowhai
   ============================================================ */

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; -webkit-tap-highlight-color: transparent; }
body, h1, h2, h3, h4, h5, h6, p, ul, ol, figure, blockquote, dl, dd { margin: 0; }
ul[role="list"], ol[role="list"] { list-style: none; padding: 0; }
img, picture, svg, video { display: block; max-width: 100%; height: auto; }
button, input, select, textarea { font: inherit; color: inherit; }
button { background: none; border: 0; padding: 0; cursor: pointer; }
a { color: inherit; text-decoration: none; }

/* ---------- Tokens ---------- */
:root {
  /* Color — NZ pastoral bone + olive-sage + kowhai (native NZ yellow) */
  --ink:         #14201A;        /* deep forest-black */
  --ink-2:       #1E2B23;
  --ink-3:       #3F4A41;
  --surface-dark:#0E1612;        /* footer + banner — near-black bush */
  --paper:       #EDE7D3;        /* bone cream */
  --paper-2:     #F5EFDD;        /* card surface, slightly lighter */
  --line:        #D6CDB0;
  --line-2:      #AFA784;
  --muted:       #6C6651;
  --accent:      #5C7048;        /* olive-sage (NZ bush) */
  --accent-deep: #3D4F2D;
  --accent-on-dark:#8AA571;      /* sage on dark surfaces */
  --accent-tint: #DDE3CB;
  --cta-bg:      #5C7048;
  --cta-bg-hover:#3D4F2D;
  --good:        #4D7A4F;

  /* Kowhai (native NZ yellow flower) secondary spark */
  --brass:       #D4A82B;
  --brass-soft:  rgba(212, 168, 43, 0.18);

  /* Subtle grid backdrop */
  --grid-line:  rgba(20, 32, 26, 0.05);
  --grid-line-strong: rgba(20, 32, 26, 0.08);

  /* Typography — Lora warm book-serif + Karla + DM Mono.
     NO uppercase on h1/h2 — Lora has gorgeous lowercase. */
  --font-display: "Lora", Georgia, serif;
  --font-serif:   "Lora", Georgia, serif;
  --font-sans:    "Karla", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-body:    "Karla", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono:    "DM Mono", ui-monospace, "SF Mono", monospace;

  /* Type scale — mobile defaults */
  --fs-xs:   12px;
  --fs-sm:   14px;
  --fs-base: 16px;
  --fs-md:   18px;
  --fs-lg:   22px;
  --fs-xl:   28px;
  --fs-2xl:  32px;
  --fs-display: 38px;

  /* Spacing */
  --sp-1: 4px;
  --sp-2: 8px;
  --sp-3: 12px;
  --sp-4: 16px;
  --sp-5: 24px;
  --sp-6: 32px;
  --sp-7: 48px;
  --sp-8: 64px;
  --sp-9: 96px;
  --sp-10: 128px;

  /* Layout */
  --container: 1240px;
  --gutter: 20px;

  --r-sm: 4px;
  --r-md: 10px;
  --r-pill: 999px;

  --shadow-card: 0 14px 32px -16px rgba(20, 32, 26, 0.22);

  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --t-fast: 160ms;
  --t: 280ms;
}

@media (min-width: 768px) {
  :root {
    --fs-base: 17px;
    --fs-md:   20px;
    --fs-lg:   26px;
    --fs-xl:   30px;
    --fs-2xl:  40px;
    --fs-display: 52px;
    --gutter: 32px;
  }
}

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

/* ---------- Base typography ---------- */
html {
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--paper);
  line-height: 1.55;
  font-size: var(--fs-base);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

/* Lora warm book-serif — no uppercase on headings, gorgeous lowercase */
h1, h2 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.06;
  letter-spacing: -0.012em;
  color: var(--ink);
}
h3, h4 {
  font-family: var(--font-sans);
  font-weight: 600;
  line-height: 1.18;
  letter-spacing: -0.018em;
  color: var(--ink);
}

h1 { font-size: var(--fs-display); }
h2 { font-size: var(--fs-2xl); }
h3 { font-size: var(--fs-xl); letter-spacing: -0.015em; }
h4 { font-size: var(--fs-lg); letter-spacing: -0.01em; }

em, .italic { font-family: var(--font-serif); font-style: italic; font-weight: 400; }
h2 em, .word-accent {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 400;
  color: var(--accent-deep);
  letter-spacing: -0.012em;
}

p { max-width: 65ch; color: var(--ink-3); }
p.lead { color: var(--ink-2); font-size: var(--fs-md); max-width: 58ch; }

small, .small { font-size: var(--fs-sm); color: var(--muted); }
strong { font-weight: 700; color: var(--ink); }

a { color: inherit; text-decoration-line: underline; text-decoration-thickness: 1px; text-decoration-color: rgba(20,32,26,0.25); text-underline-offset: 4px; transition: text-decoration-color var(--t-fast) var(--ease); }
a:hover { text-decoration-color: var(--accent); }

::selection { background: var(--accent); color: var(--paper-2); }

/* ---------- Focus ---------- */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: var(--r-sm);
}

/* ---------- Utilities ---------- */
.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--accent-deep);
  font-weight: 500;
}
.eyebrow::before {
  content: "";
  width: 24px; height: 1px;
  background: var(--accent);
}

.mono { font-family: var(--font-mono); }
.accent { color: var(--accent-deep); }

.divide-top { border-top: 1px solid var(--line); }
.divide-bottom { border-bottom: 1px solid var(--line); }

/* Accent scoped to dark backgrounds */
.site-footer,
.cookie-banner {
  --accent: var(--accent-on-dark);
  --accent-deep: var(--accent-on-dark);
}

/* ---------- LED indicator dot ---------- */
.led {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--good);
  box-shadow: 0 0 0 3px rgba(77, 122, 79, 0.18), inset 0 0 2px rgba(255,255,255,0.4);
  flex-shrink: 0;
  vertical-align: middle;
}
.led--brass { background: var(--brass); box-shadow: 0 0 0 3px var(--brass-soft), inset 0 0 2px rgba(255,255,255,0.4); }
.led--accent { background: var(--accent); box-shadow: 0 0 0 3px rgba(92, 112, 72, 0.18), inset 0 0 2px rgba(255,255,255,0.4); }

/* ---------- Reveal-on-scroll ---------- */
.reveal {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 700ms var(--ease), transform 700ms var(--ease);
  will-change: opacity, transform;
}
.reveal.in {
  opacity: 1;
  transform: translateY(0);
}
