/* ==========================================================================
   LEAF — design tokens
   Palette lifted verbatim from the "LEAF - What is it" deck theme, which is
   itself the Van De Aarlesche Hof editorial palette.

   Contrast against --cream, measured: --ink 12.3:1, --body 10.3:1,
   --green 4.8:1 (AA for the small uppercase labels). --terracotta is 2.7:1
   and FAILS for text — rules, borders and large numerals only.
   ========================================================================== */
:root {
  --ink: #1a2e18;
  --body: #2a3a24;
  --cream: #f5ebd6;
  --off-white: #fff8ee;
  --green: #4a6a3a;
  --green-deep: #2d4a28;
  --green-light: #8aab6a;
  --terracotta: #d97534;
  --clay: #c97b4a;
  --amber: #f4c85c;

  --font-display: 'Fraunces', Georgia, serif;
  --font-body: 'Nunito', system-ui, sans-serif;
  --font-label: 'Inter', system-ui, sans-serif;

  --container: 72rem;
  --measure: 65ch;
  --section-y: clamp(4rem, 10vw, 8rem);
}

/* Latin-subset variable woff2, self-hosted — the copy is Dutch and needs no
   Cyrillic or Greek. format('woff2') rather than format('woff2-variations'):
   the latter is not a format keyword in the current CSS Fonts spec, and a
   browser that does not recognise it skips the source entirely, silently
   dropping the page onto the Georgia/system fallback. */
@font-face {
  font-family: 'Fraunces';
  src: url('/fonts/fraunces-variable.woff2') format('woff2');
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Nunito';
  src: url('/fonts/nunito-variable.woff2') format('woff2');
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Inter';
  src: url('/fonts/inter-variable.woff2') format('woff2');
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
}

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

body {
  margin: 0;
  background: var(--cream);
  color: var(--body);
  font-family: var(--font-body);
  font-size: 1.05rem;
  line-height: 1.7;
  -webkit-text-size-adjust: 100%;
}

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 500;
  color: var(--ink);
  line-height: 1.08;
  letter-spacing: -0.02em;
  font-variation-settings: 'SOFT' 60, 'WONK' 1, 'opsz' 144;
  margin: 0 0 0.5em;
}
h1 { font-size: clamp(2.5rem, 7vw, 4.75rem); }
h2 { font-size: clamp(1.9rem, 5vw, 3.25rem); }
h3 { font-size: clamp(1.3rem, 3vw, 1.75rem); font-variation-settings: 'SOFT' 80, 'WONK' 1, 'opsz' 36; }

p { max-width: var(--measure); }

/* --- Section shell --- */
.section { padding: var(--section-y) 1.5rem; }
.section--cream { background: var(--cream); }
.section--offwhite { background: var(--off-white); }
.section--dark { background: var(--ink); color: var(--off-white); }
.section--dark h1, .section--dark h2, .section--dark h3 { color: var(--off-white); }
.section--dark .eyebrow { color: var(--green-light); }

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

.eyebrow {
  font-family: var(--font-label);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--green);
  margin: 0 0 1.25rem;
}

.lede { font-size: 1.2rem; }

/* Decorative only — never carries text (see contrast note above). */
.rule {
  width: 4rem;
  height: 3px;
  background: var(--terracotta);
  border: 0;
  margin: 2rem 0;
}

/* Keyboard-only scroll-through is part of the accessibility pass, so the
   focus ring has to stay visible on cream, off-white and ink alike.
   Not terracotta: a focus indicator needs 3:1 against its surroundings and
   terracotta manages only 2.71:1 on cream. Ink gives 12.3:1, amber on ink
   gives 9.2:1. */
:focus-visible {
  outline: 3px solid var(--ink);
  outline-offset: 3px;
}
.section--dark :focus-visible { outline-color: var(--amber); }

/* ==========================================================================
   Section archetypes
   ========================================================================== */

/* --- Prose with stats (§2, §4, §7, §10, §12) --- */
.stats { display: flex; flex-wrap: wrap; gap: 3rem; margin: 3rem 0; padding: 0; }
.stat { margin: 0; display: flex; flex-direction: column; }
.stat dd {
  font-family: var(--font-display);
  font-size: clamp(3rem, 9vw, 5.5rem);
  font-weight: 500;
  line-height: 1;
  color: var(--ink);
  margin: 0;
  font-variation-settings: 'SOFT' 60, 'WONK' 1, 'opsz' 144;
}
.stat dt {
  font-family: var(--font-label);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--green);
  order: 2;
  margin-top: 0.5rem;
}
.section--dark .stat dd { color: var(--off-white); }
.section--dark .stat dt { color: var(--green-light); }

/* Date stats read as words, not numerals — scale them down. */
.stats--dates .stat dd { font-size: clamp(1.5rem, 4vw, 2.25rem); }

/* Some labels are whole sentences rather than a two-word caption. Uppercase
   letterspaced running text is slow to read, so these keep sentence case and
   the body face, and get a measure so they do not run the width of the page. */
.stats--prose .stat { flex: 1 1 16rem; max-width: 26rem; }
.stats--prose .stat dt {
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 400;
  letter-spacing: 0;
  text-transform: none;
  line-height: 1.5;
  color: var(--body);
}
.section--dark .stats--prose .stat dt { color: var(--off-white); }

.pull {
  font-family: var(--font-display);
  font-size: clamp(1.4rem, 3.5vw, 2rem);
  line-height: 1.25;
  color: var(--ink);
  border-left: 3px solid var(--terracotta);
  padding-left: 1.5rem;
  max-width: var(--measure);
}
.section--dark .pull { color: var(--off-white); }

/* --- Card grid (§3) --- */
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
  gap: 1.5rem;
  list-style: none;
  padding: 0;
  margin: 3rem 0;
}
.card {
  background: var(--cream);
  border-top: 3px solid var(--terracotta);
  padding: 1.5rem;
}
.card h3 { margin-bottom: 0.25rem; }
.card p { margin: 0; font-size: 0.98rem; }

.ticks { list-style: none; padding: 0; margin: 0; max-width: var(--measure); }
.ticks li { border-top: 1px solid var(--green-light); padding: 0.9rem 0; }

/* --- Screenshot figure (§4, §5, §7) --- */
.shot { margin: 3rem 0; }
.shot img {
  width: 100%;
  height: auto;
  display: block;
  border: 1px solid var(--green-light);
  background: var(--off-white);
}
.shot figcaption {
  font-family: var(--font-label);
  font-size: 0.85rem;
  color: var(--green);
  margin-top: 0.75rem;
}
.section--dark .shot figcaption { color: var(--green-light); }

/* --- Two- and three-column blocks (§5, §6, §9, §10) --- */
.cols {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(18rem, 1fr));
  gap: 3rem;
  margin: 3rem 0;
}
.cols h3 { margin-bottom: 1rem; }
.col-list { list-style: none; padding: 0; margin: 0; }
.col-list li { border-top: 1px solid var(--green-light); padding: 0.7rem 0; font-size: 0.98rem; }

/* --- Comparison table (§8) --- */
.compare { width: 100%; border-collapse: collapse; margin: 2rem 0; }
.compare th, .compare td { text-align: left; padding: 1rem 0; border-bottom: 1px solid var(--green-light); vertical-align: top; }
.compare th { font-family: var(--font-label); font-size: 0.8rem; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: var(--green); }
.compare td + td { padding-left: 1.5rem; }
.compare .price { font-family: var(--font-display); font-size: 1.3rem; color: var(--ink); white-space: nowrap; }
.compare .note { font-size: 0.9rem; color: var(--green-deep); }
.tablenote { font-size: 0.9rem; color: var(--green-deep); margin-top: 0; }

@media (max-width: 640px) {
  .compare, .compare tbody, .compare tr, .compare td { display: block; width: 100%; }
  .compare thead { display: none; }
  .compare tr { border-bottom: 1px solid var(--green-light); padding: 1rem 0; }
  .compare td { border: 0; padding: 0.15rem 0; }
  .compare td + td { padding-left: 0; }
  .compare .price { white-space: normal; }
}

.callout {
  background: var(--ink);
  color: var(--off-white);
  padding: 2rem;
  margin: 3rem 0;
}
.callout p { max-width: none; }
/* --green is 4.8:1 on cream but near-invisible on ink, so the callout's
   eyebrow switches to green-light the same way .section--dark does. */
.callout .eyebrow { color: var(--green-light); }
.callout .big {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 8vw, 4rem);
  color: var(--amber);
  line-height: 1;
  display: block;
}

/* --- Numbered steps (§11) --- */
.steps { list-style: none; counter-reset: step; padding: 0; margin: 3rem 0; }
.steps li { counter-increment: step; border-top: 1px solid var(--green-light); padding: 1.5rem 0; display: grid; grid-template-columns: 4rem 1fr; gap: 1.5rem; }
/* A large display numeral, which is the one place terracotta is allowed to
   carry a glyph. The step name lives in the h3, so nothing depends on it. */
.steps li::before {
  content: counter(step, decimal-leading-zero);
  font-family: var(--font-display);
  font-size: 2rem;
  color: var(--terracotta);
  line-height: 1;
}
.steps h3 { margin-bottom: 0.5rem; }
.steps p { margin: 0; }

/* --- Footer --- */
.section--dark a { color: var(--amber); text-underline-offset: 4px; }
.fineprint { font-size: 0.85rem; color: var(--green-light); }

/* ==========================================================================
   Scroll reveals
   Scoped to .js, which reveal.js puts on <html>. Without that script — blocked,
   failed, or never loaded — none of this applies and every section is simply
   visible. Content must never depend on a script having run.
   ========================================================================== */
.js .reveal { opacity: 0; transform: translate3d(0, 16px, 0); transition: opacity 0.6s ease, transform 0.6s ease; }
.js .reveal.is-visible { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  .js .reveal { opacity: 1; transform: none; transition: none; }
}
