/* WeatherSpirit — shared styles for every page on weatherspirit.com.
 *
 * ONE STYLESHEET, not a <style> block per page. The prototype inlines its CSS,
 * which is the right call for a single page and the wrong one for five: the
 * legal pages, the marketing page and the contact page would each carry their
 * own copy of the design tokens, and the first divergence would be invisible
 * until someone noticed the privacy policy was a slightly different grey. One
 * file costs one cached request and cannot drift from itself.
 */

/* ── Design tokens ───────────────────────────────────────────────────────
 *
 * The palette is the weather, not the brand. Photography carries every warm
 * colour on the site — a horse in golden light, a wet labrador, snow at dusk —
 * so the interface around it stays slate, straw and paper, and never competes
 * with the thing the product is actually selling.
 */
:root {
  --ink:        #17202A;   /* headings, body at full strength */
  --ink-soft:   #3A4854;
  --slate:      #5A6B7A;   /* secondary text */
  --slate-dim:  #8595A3;
  --paper:      #FDFCFA;   /* page ground */
  --paper-warm: #F6F3ED;   /* alternating sections */
  --line:       #E2DED6;

  --sky:        #3E6E94;   /* primary accent — overcast blue */
  --sky-deep:   #2A4F6D;
  --sky-pale:   #EAF1F6;
  --straw:      #C9A227;   /* secondary accent — barn light */
  --straw-pale: #FAF3DC;
  --moss:       #4A6B4F;   /* "good" states */
  --clay:       #A6472E;   /* "stop" states, used sparingly */

  --serif: 'Fraunces', Georgia, 'Times New Roman', serif;
  --sans:  'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  --max:    1120px;
  --narrow: 720px;         /* legal + long prose: ~75 characters a line */
  --radius: 14px;
}

/* ── Reset ───────────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}
body {
  font-family: var(--sans);
  background: var(--paper);
  color: var(--ink);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
/* `height: auto` is load-bearing, not tidiness.
 *
 * Every <img> on the site carries width/height attributes so the browser can
 * reserve the box before the bytes arrive (no layout shift). Those attributes
 * map to presentational `width`/`height`, so `max-width: 100%` alone shrank the
 * width to fit the column while the height stayed pinned at the attribute —
 * a 1216x684 photo drawn 390x684 on a phone, squeezed left-to-right. `height:
 * auto` lets the ratio win once the width is capped, and costs nothing: the
 * attributes still reserve the right box during load. */
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
:focus-visible { outline: 3px solid var(--sky); outline-offset: 3px; border-radius: 3px; }

/* ── Layout ──────────────────────────────────────────────────────────────── */
.wrap   { max-width: var(--max); margin: 0 auto; padding: 0 24px; }
.narrow { max-width: var(--narrow); margin: 0 auto; padding: 0 24px; }
.sr-only {
  position: absolute; width: 1px; height: 1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap;
}
.skip-link {
  position: absolute; top: -100%; left: 16px; z-index: 200;
  background: var(--ink); color: var(--paper);
  padding: 12px 24px; border-radius: 0 0 8px 8px;
  font-size: 0.9rem; font-weight: 600;
}
.skip-link:focus { top: 0; }

/* ── Navigation ──────────────────────────────────────────────────────────── */
nav {
  position: sticky; top: 0; z-index: 100;
  background: rgba(253,252,250,0.9);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.nav-inner {
  display: flex; align-items: center; justify-content: space-between;
  max-width: var(--max); margin: 0 auto; padding: 14px 24px; gap: 24px;
}
.brand {
  font-family: var(--serif);
  font-size: 1.32rem; font-weight: 600; letter-spacing: -0.015em;
  color: var(--ink);
}
.brand span { color: var(--sky); }
.nav-links { display: flex; gap: 28px; align-items: center; }
.nav-links a {
  font-size: 0.92rem; font-weight: 500; color: var(--slate);
  transition: color 0.15s;
}
.nav-links a:hover { color: var(--ink); }
/* On a phone the links wrap under the brand instead of vanishing.
 *
 * They were `display: none` with no hamburger behind them, which on the
 * legal pages meant the only route to Contact or Privacy was scrolling the
 * whole document to the footer. A wrapped row is less tidy than a menu and
 * needs no JavaScript to work. */
@media (max-width: 760px) {
  .nav-inner { flex-wrap: wrap; row-gap: 10px; padding: 12px 20px; }
  .nav-links {
    order: 3; width: 100%;
    gap: 18px; flex-wrap: wrap;
    padding-top: 8px; border-top: 1px solid var(--line);
  }
  .nav-links a { font-size: 0.86rem; }
}

/* ── Buttons ─────────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 13px 26px; border-radius: 999px;
  font-size: 0.95rem; font-weight: 600; font-family: var(--sans);
  border: 1px solid transparent; cursor: pointer;
  transition: transform 0.12s, background 0.15s, border-color 0.15s;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--sky-deep); color: #fff; }
.btn-primary:hover { background: var(--ink); }
.btn-ghost { border-color: var(--line); color: var(--ink-soft); background: transparent; }
.btn-ghost:hover { border-color: var(--slate-dim); }

/* ── Type scale ──────────────────────────────────────────────────────────── */
h1, h2, h3, h4 { font-family: var(--serif); font-weight: 600; letter-spacing: -0.02em; line-height: 1.15; }
.eyebrow {
  font-family: var(--sans);
  font-size: 0.76rem; font-weight: 600; letter-spacing: 0.09em;
  text-transform: uppercase; color: var(--sky);
  margin-bottom: 14px;
}
.section-title { font-size: clamp(1.7rem, 3.4vw, 2.5rem); margin-bottom: 18px; }
.lede {
  font-size: clamp(1rem, 1.6vw, 1.13rem);
  color: var(--slate); max-width: 62ch;
}

/* ── Sections ────────────────────────────────────────────────────────────── */
section { padding: 84px 0; }
.band-warm { background: var(--paper-warm); }
.band-sky  { background: var(--sky-pale); }
.band-ink  { background: var(--ink); color: var(--paper); }
.band-ink .lede, .band-ink p { color: rgba(253,252,250,0.76); }
.band-ink .eyebrow { color: var(--straw); }
.section-center { text-align: center; max-width: 720px; margin: 0 auto 52px; }
.section-center .lede { margin: 0 auto; }

/* ── Hero ────────────────────────────────────────────────────────────────── */
.hero { padding: 0; position: relative; }
.hero-media { position: relative; min-height: 62vh; display: flex; align-items: flex-end; }
.hero-media img {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; z-index: 0;
}
.hero-scrim {
  position: absolute; inset: 0; z-index: 1;
  background: linear-gradient(to top, rgba(10,16,22,0.88) 0%, rgba(10,16,22,0.45) 45%, rgba(10,16,22,0.12) 100%);
}
.hero-copy { position: relative; z-index: 2; width: 100%; padding: 56px 0 64px; color: #fff; }
.hero h1 {
  font-size: clamp(2.1rem, 5.4vw, 3.6rem);
  margin-bottom: 18px; max-width: 17ch; color: #fff;
}
.hero p.lede { color: rgba(255,255,255,0.88); max-width: 54ch; margin-bottom: 30px; }
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; align-items: center; }
.hero-actions .btn-ghost { border-color: rgba(255,255,255,0.4); color: #fff; }
.hero-actions .btn-ghost:hover { border-color: #fff; background: rgba(255,255,255,0.08); }
.hero-note { font-size: 0.84rem; color: rgba(255,255,255,0.66); margin-top: 18px; }

/* ── Cards & grids ───────────────────────────────────────────────────────── */
.grid { display: grid; gap: 22px; }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.card {
  background: var(--paper); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 28px;
}
.band-warm .card { background: var(--paper); }
.card h3 { font-size: 1.16rem; margin-bottom: 10px; }
.card p { color: var(--slate); font-size: 0.95rem; }
.card-tag {
  display: inline-block; font-size: 0.7rem; font-weight: 700;
  letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--sky); margin-bottom: 12px;
}

/* Split: copy beside an image. */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; }
@media (max-width: 860px) { .split { grid-template-columns: 1fr; gap: 32px; } }
.split img { border-radius: var(--radius); }

/* ── Species strip ───────────────────────────────────────────────────────── */
.species { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 18px; }
.species-card {
  border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; background: var(--paper);
}
.species-card img { aspect-ratio: 16/9; object-fit: cover; width: 100%; }
.species-card .body { padding: 20px; }
.species-card h3 { font-size: 1.05rem; margin-bottom: 6px; }
.species-card p { font-size: 0.88rem; color: var(--slate); }

/* ── Prose (legal + about) ───────────────────────────────────────────────── */
.prose { padding: 56px 0 96px; }
.prose h1 { font-size: clamp(1.9rem, 4vw, 2.6rem); margin-bottom: 10px; }
.prose .updated { color: var(--slate-dim); font-size: 0.88rem; margin-bottom: 40px; }
.prose h2 {
  font-size: 1.28rem; margin: 40px 0 12px;
  padding-top: 24px; border-top: 1px solid var(--line);
}
.prose h2:first-of-type { border-top: none; padding-top: 0; }
.prose h3 { font-size: 1.02rem; margin: 24px 0 8px; font-family: var(--sans); font-weight: 700; }
.prose p, .prose li { color: var(--ink-soft); margin-bottom: 14px; font-size: 0.97rem; }
.prose ul, .prose ol { padding-left: 22px; margin-bottom: 18px; }
.prose li { margin-bottom: 7px; }
.prose a { color: var(--sky-deep); text-decoration: underline; text-underline-offset: 2px; }
.prose strong { color: var(--ink); }
.callout {
  background: var(--sky-pale); border-left: 3px solid var(--sky);
  padding: 18px 22px; border-radius: 0 8px 8px 0; margin: 22px 0;
}
.callout p:last-child { margin-bottom: 0; }

/* ── Facts table ─────────────────────────────────────────────────────────── */
table.facts { width: 100%; border-collapse: collapse; margin: 20px 0 26px; font-size: 0.93rem; }
table.facts th, table.facts td {
  text-align: left; padding: 12px 14px; border-bottom: 1px solid var(--line);
  vertical-align: top;
}
table.facts th { font-weight: 600; color: var(--ink); width: 38%; }
table.facts td { color: var(--slate); }

/* ── FAQ ─────────────────────────────────────────────────────────────────── */
details.faq {
  border-bottom: 1px solid var(--line); padding: 20px 0;
}
details.faq summary {
  cursor: pointer; font-weight: 600; font-size: 1.02rem;
  list-style: none; display: flex; justify-content: space-between; gap: 20px;
}
details.faq summary::-webkit-details-marker { display: none; }
details.faq summary::after { content: '+'; color: var(--sky); font-weight: 400; font-size: 1.3rem; line-height: 1; }
details.faq[open] summary::after { content: '\2212'; }
details.faq p { color: var(--slate); margin-top: 12px; font-size: 0.95rem; }

/* ── Forms ───────────────────────────────────────────────────────────────── */
.field { margin-bottom: 18px; }
.field label { display: block; font-size: 0.88rem; font-weight: 600; margin-bottom: 6px; }
.field input, .field textarea, .field select {
  width: 100%; padding: 12px 14px; font: inherit; font-size: 0.95rem;
  border: 1px solid var(--line); border-radius: 9px;
  background: var(--paper); color: var(--ink);
}
.field textarea { min-height: 150px; resize: vertical; }
.field .hint { font-size: 0.8rem; color: var(--slate-dim); margin-top: 5px; }

/* ── Footer ──────────────────────────────────────────────────────────────── */
footer { background: var(--ink); color: rgba(253,252,250,0.72); padding: 56px 0 28px; }
.footer-inner {
  display: grid; grid-template-columns: 1.7fr repeat(3, 1fr);
  gap: 40px; padding-bottom: 36px;
}
@media (max-width: 800px) { .footer-inner { grid-template-columns: 1fr 1fr; gap: 28px; } }
.footer-logo { font-family: var(--serif); font-size: 1.2rem; color: var(--paper); margin-bottom: 10px; }
.footer-about { font-size: 0.87rem; max-width: 34ch; line-height: 1.6; }
footer h4 {
  font-family: var(--sans); font-size: 0.74rem; font-weight: 700;
  letter-spacing: 0.09em; text-transform: uppercase;
  color: var(--paper); margin-bottom: 12px;
}
.footer-links { list-style: none; }
.footer-links li { margin-bottom: 8px; }
.footer-links a { font-size: 0.88rem; transition: color 0.15s; }
.footer-links a:hover { color: var(--paper); }
.footer-bottom {
  border-top: 1px solid rgba(253,252,250,0.14);
  padding-top: 22px; display: flex; flex-wrap: wrap;
  justify-content: space-between; gap: 14px; font-size: 0.8rem;
}
.footer-attrib { color: rgba(253,252,250,0.5); }

/* ── Dark mode ───────────────────────────────────────────────────────────── */
@media (prefers-color-scheme: dark) {
  :root {
    --ink:        #F2F5F8;
    --ink-soft:   #C9D3DC;
    --slate:      #9FB0BE;
    --slate-dim:  #73838F;
    --paper:      #12181F;
    --paper-warm: #18202A;
    --line:       #2A3440;
    --sky:        #7BB0D8;
    --sky-deep:   #4A83AE;
    --sky-pale:   #182634;
    --straw-pale: #221E13;
  }
  .band-ink { background: #0C1219; }
  nav { background: rgba(18,24,31,0.9); }
  .btn-primary { background: var(--sky-deep); color: #0B1118; }
  .btn-primary:hover { background: var(--sky); }
  footer { background: #0C1219; }
}
