/*
  Layout concept: a dusk-lit hero under Ben Ledi, then a calm cream page that reads
  like a well-made guest booklet. Section titles sit in a narrow left column on wide
  screens, and the hill's ridge line marks the turns between chapters.
*/
:root {
  --green-900: #152d1f; /* logo ground */
  --green-800: #1d3a29;
  --cream: #f5f0e6;
  --cream-deep: #ece4d4;
  --gold: #b58c5f;      /* on green only */
  --gold-ink: #7d5e31;  /* gold for text on cream (5.3:1) */
  --ink: #1f2a22;
  --ink-soft: #4a554d;
  --mist: #e3ebed;      /* logo lettering */
  --mist-soft: #b9c6bf;
  --line: #d6ccb8;

  --font-display: "Cormorant Garamond", "Cormorant", Garamond, "Times New Roman", serif;
  --font-body: "Jost", "Futura", "Avenir Next", "Segoe UI", system-ui, sans-serif;

  --step--1: 0.875rem;
  --step-0: 1.0625rem;
  --step-1: 1.25rem;
  --step-2: clamp(1.5rem, 1.2rem + 1.2vw, 2rem);
  --step-3: clamp(2rem, 1.5rem + 2vw, 3rem);
  --step-4: clamp(2.6rem, 1.8rem + 3.4vw, 4.4rem);

  --gutter: clamp(1rem, 4vw, 3rem);
  --measure: 62ch;
  --radius: 2px;

  color-scheme: light;
}

*,
*::before,
*::after { box-sizing: border-box; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: var(--step-0);
  font-weight: 400;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }

/* The hidden attribute must win over component display rules (thank-you panel, cookie banner) */
[hidden] { display: none !important; }

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 500;
  line-height: 1.1;
  text-wrap: balance;
  margin: 0;
}
p { margin: 0; }
a { color: inherit; text-underline-offset: 0.2em; text-decoration-thickness: 1px; }

:focus-visible {
  outline: 2px solid var(--gold-ink);
  outline-offset: 3px;
}

.skip {
  position: absolute; left: -999px; top: 0;
  background: var(--cream); color: var(--ink); padding: 0.75rem 1rem; z-index: 10;
}
.skip:focus { left: 1rem; top: 1rem; }

.wrap {
  width: 100%;
  max-width: 72rem;
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.eyebrow {
  font-family: var(--font-body);
  font-size: var(--step--1);
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

/* Placeholders: easy to spot, easy to search for */
.ph {
  color: var(--gold-ink);
  background: color-mix(in srgb, var(--gold) 14%, transparent);
  border-bottom: 1px dashed var(--gold-ink);
  padding-inline: 0.2em;
  font-style: normal;
}
.on-dark .ph {
  color: var(--gold);
  border-bottom-color: var(--gold);
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  min-height: 3rem;
  padding: 0.75rem 1.6rem;
  border: 1px solid transparent;
  border-radius: var(--radius);
  font: 500 var(--step--1) / 1 var(--font-body);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}
.btn-gold { background: var(--gold); color: var(--green-900); }
.btn-gold:hover { background: var(--mist); }
.btn-ghost { border-color: color-mix(in srgb, var(--mist) 55%, transparent); color: var(--mist); }
.btn-ghost:hover { border-color: var(--mist); background: color-mix(in srgb, var(--mist) 10%, transparent); }
.btn-green { background: var(--green-900); color: var(--mist); }
.btn-green:hover { background: var(--green-800); }
/* In the hero, a gold hairline like the logo roundel keeps it distinct from the photo wash */
.hero .btn-green { border-color: rgba(181, 140, 95, 0.55); }
.btn[disabled] { opacity: 0.6; cursor: progress; }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: min(94svh, 900px);
  display: grid;
  grid-template-rows: auto auto 1fr auto auto;
  grid-template-columns: minmax(0, 1fr); /* long lines wrap instead of widening the hero */
  color: var(--mist);
  background-color: var(--green-900);
  /* Forest-green wash: dark over the sky (for the logo) and the field (for the text),
     clear across the middle where the hills sit. Fallback gradient if the photo fails. */
  background-image:
    linear-gradient(180deg, rgba(21, 45, 31, 0.45) 0%, rgba(21, 45, 31, 0.2) 30%, rgba(21, 45, 31, 0.08) 50%, rgba(21, 45, 31, 0.45) 68%, rgba(21, 45, 31, 0.9) 100%),
    image-set(url("../images/hero-view-1600.webp") type("image/webp"), url("../images/hero-view-1600.jpg") type("image/jpeg")),
    radial-gradient(120% 80% at 40% 0%, #3c5a47 0%, var(--green-800) 45%, var(--green-900) 100%);
  background-size: cover;
  background-position: center 48%;
}
@media (min-width: 100rem) {
  .hero {
    background-image:
      linear-gradient(180deg, rgba(21, 45, 31, 0.45) 0%, rgba(21, 45, 31, 0.2) 30%, rgba(21, 45, 31, 0.08) 50%, rgba(21, 45, 31, 0.45) 68%, rgba(21, 45, 31, 0.9) 100%),
      image-set(url("../images/hero-view-2400.webp") type("image/webp"), url("../images/hero-view-2400.jpg") type("image/jpeg")),
      radial-gradient(120% 80% at 40% 0%, #3c5a47 0%, var(--green-800) 45%, var(--green-900) 100%);
  }
}
@media (max-width: 40rem) {
  .hero {
    background-image:
      linear-gradient(180deg, rgba(21, 45, 31, 0.5) 0%, rgba(21, 45, 31, 0.22) 28%, rgba(21, 45, 31, 0.1) 48%, rgba(21, 45, 31, 0.55) 66%, rgba(21, 45, 31, 0.92) 100%),
      image-set(url("../images/hero-view-mobile.webp") type("image/webp"), url("../images/hero-view-mobile.jpg") type("image/jpeg")),
      radial-gradient(120% 80% at 40% 0%, #3c5a47 0%, var(--green-800) 45%, var(--green-900) 100%);
    background-position: center 55%;
  }
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding-block: 1.25rem;
}
.topbar .eyebrow { color: var(--mist); font-size: 0.75rem; text-shadow: 0 1px 10px rgba(10, 24, 16, 0.9), 0 0 2px rgba(10, 24, 16, 0.6); }
.topbar a.eyebrow { color: var(--mist); text-decoration: none; border-bottom: 1px solid var(--gold); padding-bottom: 0.2rem; }

.hero-top {
  display: grid;
  justify-items: center;
  padding-block: clamp(2rem, 7vh, 4rem) 0;
}
.hero-body {
  grid-row: 4;
  display: grid;
  justify-items: center;
  text-align: center;
  gap: 1.4rem;
  padding-block: 2.5rem 3rem;
}
/* Logo sits in a forest-green roundel, so it reads clearly over any part of the photo */
.hero-logo {
  width: min(21rem, 70vw);
  aspect-ratio: 1;
  max-width: 100%;
  margin: 0;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(21, 45, 31, 0.9);
  box-shadow:
    inset 0 0 0 1px rgba(181, 140, 95, 0.55),
    inset 0 0 0 9px rgba(21, 45, 31, 0.9),
    inset 0 0 0 10px rgba(181, 140, 95, 0.3),
    0 18px 50px rgba(10, 24, 16, 0.35);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}
.hero-logo picture { width: 76%; }
.hero-logo img { width: 100%; }
.tagline {
  max-width: 100%;
  text-wrap: balance;
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 600;
  font-size: var(--step-4);
  line-height: 1.05;
  color: #fff;
  text-shadow: 0 2px 24px rgba(10, 24, 16, 0.7), 0 1px 3px rgba(10, 24, 16, 0.55);
}
.hero-lede { max-width: 40ch; color: var(--mist); text-shadow: 0 1px 12px rgba(10, 24, 16, 0.8); font-size: var(--step-1); line-height: 1.5; }
.hero-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.9rem; margin-top: 0.75rem; }

.hero-foot {
  grid-row: 5;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem 2rem;
  padding-block: 1.25rem;
  border-top: 1px solid rgba(227, 235, 237, 0.18);
  color: var(--mist-soft);
  font-size: var(--step--1);
}
.hero-foot span { text-align: center; text-wrap: balance; }

@media (prefers-reduced-motion: no-preference) {
  .hero-logo, .hero-body > * { animation: rise 0.9s cubic-bezier(0.2, 0.7, 0.2, 1) both; }
  .hero-body > *:nth-child(1) { animation-delay: 0.15s; }
  .hero-body > *:nth-child(2) { animation-delay: 0.25s; }
  .hero-body > *:nth-child(3) { animation-delay: 0.35s; }
}
@keyframes rise { from { transform: translateY(10px); opacity: 0.001; } to { transform: none; opacity: 1; } }

/* ---------- Sections ---------- */
.section { padding-block: clamp(4rem, 9vw, 7.5rem); }
.section + .section { padding-top: 0; }

.chapter {
  display: grid;
  gap: 2rem 4rem;
}
@media (min-width: 56rem) {
  .chapter { grid-template-columns: 15rem minmax(0, 1fr); }
}
.chapter-head { display: grid; gap: 1rem; align-content: start; }
.chapter-head .eyebrow { color: var(--gold-ink); }
.chapter-head h2 { font-size: var(--step-3); }
.chapter-body { display: grid; gap: 2rem; min-width: 0; max-width: var(--measure); }
.chapter-body.wide { max-width: none; }

.lead {
  font-family: var(--font-display);
  font-size: var(--step-2);
  line-height: 1.3;
  font-weight: 400;
  color: var(--ink);
}
.prose { display: grid; gap: 1.1rem; color: var(--ink-soft); }

/* Ben Ledi ridge divider */
.ridge {
  display: block;
  width: min(14rem, 50%);
  height: auto;
  margin: 0 auto clamp(2.5rem, 9vw, 7.5rem);
  color: var(--gold-ink);
}
.on-dark .ridge { color: var(--gold); }

/* ---------- Pods ---------- */
.pods-intro { display: grid; gap: 1.1rem; max-width: var(--measure); }
.pods-grid {
  display: grid;
  gap: 2rem;
}
@media (min-width: 48rem) {
  .pods-grid { grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); align-items: center; gap: 2.5rem; }
}

.pod-figure { margin: 0; display: grid; gap: 0.75rem; min-width: 0; }
.pod-figure figcaption {
  font-size: 0.75rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink-soft);
}
.pod-photo img {
  width: 100%;
  aspect-ratio: 1179 / 1059;
  object-fit: cover;
  border-radius: var(--radius);
}

.features { list-style: none; margin: 0; padding: 0; display: grid; }
.features li {
  display: grid;
  gap: 0.25rem;
  padding-block: 1rem;
  border-top: 1px solid var(--line);
}
.features li:last-child { border-bottom: 1px solid var(--line); }
.features h3 { font-family: var(--font-display); font-size: var(--step-2); font-weight: 500; line-height: 1.2; }
.features p { color: var(--ink-soft); }

/* Features: two even columns under the photo and intro */
.features-grid { margin-top: 1rem; }
@media (min-width: 40rem) {
  .features-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 2.5rem; }
  .features-grid li:nth-last-child(2) { border-bottom: 1px solid var(--line); }
}

/* ---------- Setting (dark band) ---------- */
/* Alternating text-and-photo rows */
.split { display: grid; gap: 1.5rem; align-items: start; }
.split figure { margin: 0; min-width: 0; display: grid; gap: 0.6rem; order: 2; }
.split picture { display: block; aspect-ratio: 4 / 3; overflow: hidden; border-radius: var(--radius); }
.split .split-tall picture { aspect-ratio: 1 / 1; }
@media (min-width: 48rem) { .split .split-tall picture { aspect-ratio: 4 / 5; } }
.split img { width: 100%; height: 100%; object-fit: cover; }
.split .split-tall img { object-position: 30% 62%; }
.split img[src*="rescue-hen"] { object-position: 60% 40%; }
.split figcaption { font-size: 0.75rem; letter-spacing: 0.2em; text-transform: uppercase; color: var(--mist-soft); }
@media (min-width: 48rem) {
  /* Same two equal columns on every row, so photo and text edges line up down the section */
  .split { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 2.5rem; }
  .split .prose { padding-top: 0.25rem; }
  .split-reverse figure { order: 0; }
}

.band {
  background: var(--green-900);
  color: var(--mist);
  padding-block: clamp(4rem, 9vw, 7.5rem);
}
.band .chapter-head .eyebrow { color: var(--gold); }
.band .prose { color: var(--mist-soft); }
.band .chapter-body { gap: 2.75rem; }
.band .lead { color: var(--mist); }

.facts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr)); /* four facts always pair up 2×2 */
  gap: 1px;
  margin: 0;
  background: rgba(227, 235, 237, 0.16);
  border: 1px solid rgba(227, 235, 237, 0.16);
}
.facts div { background: var(--green-900); padding: 1.25rem 1.25rem 1.4rem; display: grid; gap: 0.35rem; }
.facts dt { font-size: 0.75rem; letter-spacing: 0.2em; text-transform: uppercase; color: var(--gold); }
.facts dd { margin: 0; font-family: var(--font-display); font-size: var(--step-2); line-height: 1.2; color: var(--mist); font-variant-numeric: lining-nums; }
@media (max-width: 40rem) {
  .facts div { padding: 1rem 0.9rem 1.1rem; }
  .facts dt { font-size: 0.68rem; letter-spacing: 0.14em; }
  .facts dd { font-size: 1.2rem; }
}

/* ---------- Register ---------- */
.register {
  background: var(--green-900);
  color: var(--mist);
  padding-block: clamp(4rem, 9vw, 7rem);
}
.register-grid { display: grid; gap: 2.5rem 4rem; }
@media (min-width: 56rem) { .register-grid { grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); } }
.register-intro { display: grid; gap: 1rem; align-content: start; }
.register-intro .eyebrow { color: var(--gold); }
.register-intro h2 { font-size: var(--step-4); }
.register-intro p { color: var(--mist-soft); max-width: 40ch; }

.form { display: grid; gap: 1.4rem; min-width: 0; }
.field { display: grid; gap: 0.45rem; }
.field label, .field legend {
  font-size: 0.75rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--mist-soft);
  padding: 0;
}
.form input[type="text"],
.form input[type="email"] {
  width: 100%;
  min-height: 3.1rem;
  padding: 0.7rem 0.9rem;
  border: 1px solid rgba(227, 235, 237, 0.35);
  border-radius: var(--radius);
  background: rgba(227, 235, 237, 0.06);
  color: var(--mist);
  font: inherit;
}
.form input::placeholder { color: rgba(227, 235, 237, 0.45); }
.form input[type="text"]:focus-visible,
.form input[type="email"]:focus-visible { outline-color: var(--gold); border-color: var(--gold); }

fieldset.field { border: 0; margin: 0; padding: 0; min-width: 0; }
.choices { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 0.15rem; }
.choice { position: relative; }
.choice input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.choice span {
  display: inline-block;
  padding: 0.55rem 1rem;
  border: 1px solid rgba(227, 235, 237, 0.35);
  border-radius: 999px;
  font-size: var(--step--1);
  color: var(--mist);
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
.choice input:checked + span { background: var(--gold); border-color: var(--gold); color: var(--green-900); }
.choice input:focus-visible + span { outline: 2px solid var(--gold); outline-offset: 2px; }

.consent { display: grid; grid-template-columns: 1.25rem minmax(0, 1fr); gap: 0.75rem; align-items: start; color: var(--mist-soft); font-size: var(--step--1); line-height: 1.55; }
.consent input { width: 1.15rem; height: 1.15rem; margin: 0.15rem 0 0; accent-color: var(--gold); }
.consent a { color: var(--mist); }

.form-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem 1.5rem; }
.status { font-size: var(--step--1); color: var(--mist-soft); min-height: 1.5em; }
.status[data-kind="error"] { color: #f2c6b4; }

.done { display: grid; gap: 0.75rem; align-content: center; padding: 2rem; border: 1px solid rgba(181, 140, 95, 0.6); }
.done h3 { font-size: var(--step-3); font-style: italic; font-weight: 400; }
.done p { color: var(--mist-soft); }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--green-900);
  color: var(--mist-soft);
  padding-block: 4rem 2.5rem;
  font-size: var(--step--1);
  border-top: 1px solid rgba(227, 235, 237, 0.14);
}
.footer-grid {
  display: grid;
  gap: 2.5rem;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 13rem), 1fr));
  align-items: start;
}
.footer-logo { width: 11rem; }
.site-footer h2 {
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 0.75rem;
}
.site-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.4rem; }
.site-footer a { color: var(--mist); }
.legal {
  margin-top: 3rem;
  padding-top: 1.25rem;
  border-top: 1px solid rgba(227, 235, 237, 0.14);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.5rem 2rem;
  font-size: 0.8rem;
}

/* ---------- Cookie banner ---------- */
.cookie {
  position: fixed;
  left: 1rem;
  right: 1rem;
  bottom: calc(1rem + env(safe-area-inset-bottom, 0px));
  z-index: 20;
  max-width: 34rem;
  display: grid;
  gap: 1rem;
  padding: 1.25rem 1.4rem;
  background: var(--cream);
  color: var(--ink);
  border: 1px solid var(--line);
  box-shadow: 0 12px 40px rgba(21, 45, 31, 0.25);
  font-size: var(--step--1);
}
.cookie-actions { display: flex; flex-wrap: wrap; gap: 0.6rem; }
.cookie .btn { min-height: 2.6rem; padding: 0.6rem 1.1rem; }
.btn-line { border-color: var(--ink); color: var(--ink); background: transparent; }
.btn-line:hover { background: var(--cream-deep); }
