/* regenerative.law — landing page styles
 * Layered on top of the RE.eco design system (css/styles.css).
 * Every value is a design-system token; no new colours or type sizes. */

/* ── Layout shell ───────────────────────────────────────────── */
.container {
  max-width: 90rem;
  margin-inline: auto;
  padding-inline: clamp(1.5rem, 5vw, 5rem);
}
.section { padding-block: var(--section-space--main); }
.section--hero { padding-block: var(--section-space--large) var(--section-space--main); }
.section--top-rule { border-block-start: 1px solid var(--hairline); }
.section--paper { background: var(--paper); }
.section--ink { background: var(--black); color: var(--ivory); }
.section--ink .eyebrow,
.section--ink .note { color: rgba(246, 243, 238, 0.66); }
.section--ink h2,
.section--ink h3 { color: var(--ivory); }
.section--ink p:not(.eyebrow):not(.note) { color: rgba(246, 243, 238, 0.84); }

/* Accessibility: the base prose-link rule (a:where(:not([class]))) defaults to
   --link (= --ink), which is close to invisible on a black ground — e.g. the
   "privacy notice" link inside the contact form's consent checkbox. Any plain
   link inside a dark section gets ivory instead, so this can't recur. */
.section--ink a:where(:not([class])) {
  color: var(--ivory);
  text-decoration-color: rgba(246, 243, 238, 0.4);
}
.section--ink a:where(:not([class])):hover {
  color: var(--ivory);
  text-decoration-color: currentColor;
}

/* Accessibility: .btn's default border is --ink, which is nearly the same
   colour as --black — on an ink section (e.g. the Send button in Contact)
   the button's edge all but disappears, leaving only floating text. Give it
   a visible boundary against the dark ground. */
.section--ink .btn {
  border-color: rgba(246, 243, 238, 0.4);
}

.stack { display: grid; gap: var(--s-4); }
.stack--lg { display: grid; gap: var(--s-7); }
.stack--xl { display: grid; gap: var(--s-8); }

/* Two-up editorial split; collapses to one column with no breakpoint. */
.split {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(24rem, 100%), 1fr));
  gap: var(--s-8);
  align-items: start;
}
.split > * { min-width: 0; }

.measure { max-width: var(--measure); }
.lead {
  font-size: var(--t-lead);
  font-weight: var(--w-medium);
  line-height: var(--lh-body);
}
.note { font-size: var(--t-small); color: var(--muted); }

/* Heading scale for the content sections (h1 is sized in .hero) */
main h2 { font-size: var(--h2); max-width: 30ch; }
main h3 { font-size: var(--h5); }
main h4 { font-size: var(--h6); }

/* ── Header ─────────────────────────────────────────────────── */
.site-header {
  position: sticky;
  inset-block-start: 0;
  z-index: var(--z-sticky, 100);
  background: var(--bg);
  border-block-end: 1px solid var(--hairline);
}
.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-5);
  min-height: 4.5rem;
  padding-block: var(--s-3);
  flex-wrap: wrap;
}
.wordmark {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  text-decoration: none;
  font-family: var(--font-logotype);
  font-weight: var(--w-semibold);
  font-size: 1.125rem;
  letter-spacing: var(--tr-snug);
  color: var(--ink);
}
.wordmark img { width: 2.5rem; height: auto; }
.site-nav {
  display: flex;
  align-items: center;
  gap: var(--s-5);
  flex-wrap: wrap;
}
.site-nav a {
  font-size: var(--t-small);
  font-weight: var(--w-medium);
  color: var(--muted);
  text-decoration: none;
  transition: color var(--dur-fast) var(--ease);
}
.site-nav a:hover { color: var(--ink); }

/* Accessibility: ".site-nav a" (class+element) outranks ".btn" (class only),
   so the "Get in touch" CTA — a .btn that's also a nav link — was inheriting
   the muted grey nav-link colour instead of .btn's white-on-ink label. That
   put the button text at ~3.3:1 on its own black fill, below the 4.5:1 text
   minimum. Force it back to the button's intended on-ink colour. */
.site-nav a.btn,
.site-nav a.btn:hover {
  color: var(--on-ink, #fff);
}

/* ── Buttons ────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5em;
  min-height: var(--control-h, 2.75rem);
  padding-inline: var(--s-5);
  border: 1px solid var(--ink);
  border-radius: 0;
  background: var(--ink);
  color: var(--on-ink, #fff);
  font-family: var(--font-sans);
  font-size: var(--t-small);
  font-weight: var(--w-semibold);
  text-decoration: none;
  cursor: pointer;
  transition: opacity var(--dur-fast) var(--ease), background var(--dur-fast) var(--ease);
}
.btn:hover { opacity: 0.86; }
.btn--secondary { background: transparent; color: var(--ink); }
.btn--secondary:hover { background: var(--ink); color: var(--on-ink, #fff); opacity: 1; }
.btn--sm { min-height: 2.25rem; padding-inline: var(--s-4); }

/* ── Hero ───────────────────────────────────────────────────── */
.hero {
  display: grid;
  justify-items: center;
  text-align: center;
  gap: var(--s-5);
}
.hero h1 {
  font-size: var(--h1);
  max-width: 24ch;
  text-wrap: balance;
}
.hero .lead { max-width: 75ch; text-wrap: balance; color: var(--graphite); }
.hero__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--s-3);
  margin-block-start: var(--s-2);
}

/* ── Step cards (hairline-divided row) ──────────────────────── */
/* Wrap-safe: each card carries its own top hairline, so cards always align
   flush to the column above them, whatever the auto-fit column count. */
.steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(18rem, 100%), 1fr));
  column-gap: var(--s-7);
  row-gap: 0;
}
/* Four-up variant (How we work): a narrower column basis than the default
   3-up .steps so all four phase cards share one row at desktop widths
   instead of wrapping 3-then-1. Still auto-fit, so it still collapses on
   its own with no breakpoints. */
.steps--four {
  grid-template-columns: repeat(auto-fit, minmax(min(15rem, 100%), 1fr));
}
.steps > article {
  display: grid;
  align-content: start;
  gap: var(--s-3);
  padding-block: var(--s-6);
  padding-inline: 0;
  border-block-start: 1px solid var(--hairline);
}
.steps h3 a { color: inherit; text-decoration: none; }
.steps h3 a:hover { color: var(--planet-text); }
/* On the dark section the hairline needs the on-ink rule colour */
.section--ink .steps > article { border-block-start-color: rgba(246, 243, 238, 0.16); }

/* ── Figure / diagram ───────────────────────────────────────── */
.figure { margin: 0; display: grid; gap: var(--s-4); }
.figure svg { width: 100%; height: auto; }

/* ── Callout ────────────────────────────────────────────────── */
.callout {
  display: grid;
  gap: var(--s-4);
  border: 1px solid var(--hairline);
  border-inline-start: 2px solid var(--ink);
  background: var(--surface-card, var(--paper));
  padding: var(--s-5);
}

/* ── Resource rows (open access) ────────────────────────────── */
.rows { display: grid; border-block-start: 1px solid var(--hairline); }
.rows > article {
  display: grid;
  padding-block: var(--s-5);
  border-block-end: 1px solid var(--hairline);
}

/* ── Case list (landmark decisions) ─────────────────────────── */
.cases { display: grid; }
.cases > article {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(12rem, 100%), auto));
  grid-template-columns: minmax(0, 12rem) minmax(0, 3fr);
  gap: var(--s-5);
  padding-block: var(--s-6);
  border-block-start: 1px solid var(--hairline);
  align-items: start;
}
.cases > article:last-of-type { border-block-end: 1px solid var(--hairline); }
.cases time {
  font-size: var(--t-small);
  color: var(--faint);
  font-variant-numeric: tabular-nums;
}
/* Reference cases: title beside the write-up; stacks on its own when narrow */
.cases--wide > article {
  grid-template-columns: repeat(auto-fit, minmax(min(20rem, 100%), 1fr));
  gap: var(--s-6);
}

/* ── Contact form ───────────────────────────────────────────── */
.form { display: grid; gap: var(--s-4); }
.field { display: grid; gap: var(--s-2); }
/* First / last name side by side; stacks on its own when narrow */
.field-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(14rem, 100%), 1fr));
  gap: var(--s-4);
}
.field > label {
  font-size: var(--t-eyebrow);
  font-weight: var(--w-semibold);
  letter-spacing: var(--tr-eyebrow);
  text-transform: uppercase;
  color: rgba(246, 243, 238, 0.66);
}
.field input,
.field select,
.field textarea {
  width: 100%;
  min-height: var(--control-h, 2.75rem);
  padding: 0.625rem var(--s-3);
  border: 1px solid rgba(246, 243, 238, 0.24);
  border-radius: 0;
  background: transparent;
  color: var(--ivory);
  font-family: var(--font-sans);
  font-size: var(--t-small);
}
.field textarea { min-height: 7.5rem; resize: vertical; }
/* The open list is drawn by the browser on its own ground: give it the dark
   surface explicitly so the ivory option text stays readable. */
.field select { color-scheme: dark; }
.field select option {
  background: var(--black);
  color: var(--ivory);
}
.field input:focus-visible,
.field select:focus-visible,
.field textarea:focus-visible {
  outline: 2px solid var(--ivory);
  outline-offset: 2px;
}
.consent {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: var(--s-3);
  align-items: start;
  font-size: var(--t-small);
  color: var(--ivory);
  min-height: 2.75rem;
}
.consent input { margin-block-start: 0.2rem; }

/* ── Footer ─────────────────────────────────────────────────── */
.site-footer {
  background: var(--black);
  color: var(--ivory);
  padding-block: var(--section-space--main);
}
.site-footer__divider { border-block-start: 1px solid rgba(246, 243, 238, 0.16); }
.site-footer__inner { display: grid; gap: var(--s-7); }
.site-footer__statement {
  font-family: var(--font-display);
  font-weight: var(--w-medium);
  font-size: var(--h1);
  line-height: var(--lh-snug);
  max-width: 24ch;
  text-wrap: balance;
  padding-block-end: var(--s-5);
}
.site-footer__meta {
  display: flex;
  align-items: center;
  gap: var(--s-3) var(--s-6);
  flex-wrap: wrap;
  border-block-start: 1px solid rgba(246, 243, 238, 0.16);
  padding-block-start: var(--s-7);
  font-size: var(--t-small);
  color: rgba(246, 243, 238, 0.62);
}
.site-footer__meta a { color: inherit; text-decoration: none; }
.site-footer__meta a:hover { color: var(--ivory); }

/* ── Anchors under the sticky header; sub-page title ───────── */
html { scroll-padding-block-start: 6rem; }
.page-title { font-size: var(--h2); max-width: 30ch; }
.section--page { padding-block-start: var(--section-space--large); }
