/* ==========================================================================
   ComboFever — foundation
   Design tokens, reset, typography, layout primitives, utilities.
   Palette: basalt ink + pounamu jade + aged brass + linen.
   ========================================================================== */

:root {
  /* ink / dark surfaces */
  --ink: #0e1413;
  --ink-2: #16201f;
  --ink-3: #1e2a28;
  --ink-4: #27332f;

  /* jade (pounamu) */
  --jade-deep: #103029;
  --jade: #1c4a43;
  --jade-soft: #2e6b60;
  --jade-mist: #d8e3df;

  /* brass */
  --brass: #c3914e;
  --brass-lt: #e0ba7e;
  --brass-dim: #8e6835;

  /* linen / paper */
  --paper: #fbf8f2;
  --linen: #f5f0e6;
  --linen-2: #ebe4d6;
  --linen-3: #ded5c3;

  /* neutrals */
  --stone: #6e7672;
  --stone-lt: #98a09b;
  --white: #ffffff;

  /* semantic */
  --text: #14201d;
  --text-soft: #4b5953;
  --text-invert: #f2ede2;
  --text-invert-soft: #b9c3bd;
  --rule: rgba(20, 32, 29, 0.14);
  --rule-invert: rgba(224, 186, 126, 0.26);
  --danger: #8c3b36;

  /* type */
  --font-display: "Iowan Old Style", "Palatino Linotype", "Book Antiqua",
    Palatino, Georgia, "Times New Roman", serif;
  --font-body: "Inter", "Segoe UI", system-ui, -apple-system, "Helvetica Neue",
    Arial, sans-serif;
  --tracking-eyebrow: 0.22em;

  /* spacing scale */
  --s-1: 0.25rem;
  --s-2: 0.5rem;
  --s-3: 0.75rem;
  --s-4: 1rem;
  --s-5: 1.5rem;
  --s-6: 2rem;
  --s-7: 3rem;
  --s-8: 4rem;
  --s-9: 6rem;
  --s-10: 8rem;

  /* structure */
  --shell: 1220px;
  --shell-narrow: 820px;
  --gutter: 1.25rem;
  --radius-s: 4px;
  --radius: 10px;
  --radius-l: 20px;

  --shadow-s: 0 1px 2px rgba(14, 20, 19, 0.06), 0 6px 18px rgba(14, 20, 19, 0.06);
  --shadow-m: 0 2px 6px rgba(14, 20, 19, 0.08), 0 20px 46px rgba(14, 20, 19, 0.12);
  --shadow-l: 0 30px 80px rgba(14, 20, 19, 0.3);

  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

@media (min-width: 48rem) {
  :root { --gutter: 2rem; }
}

/* --- reset ---------------------------------------------------------------- */
*,
*::before,
*::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 6rem;
}

body {
  /* Column layout so the footer always reaches the bottom of tall screens,
     even on short pages such as 404.php. */
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  margin: 0;
  background: var(--paper);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.68;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

main { flex: 1 0 auto; }
.site-footer { flex-shrink: 0; }

img, picture, svg, video { display: block; max-width: 100%; height: auto; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.12;
  letter-spacing: -0.012em;
  margin: 0 0 var(--s-4);
  text-wrap: balance;
}

h1 { font-size: clamp(2.2rem, 1.35rem + 3.4vw, 3.6rem); }
h2 { font-size: clamp(1.8rem, 1.2rem + 2.4vw, 2.85rem); }
h3 { font-size: clamp(1.25rem, 1.05rem + 0.8vw, 1.6rem); }
h4 { font-size: 1.1rem; letter-spacing: 0; }

p { margin: 0 0 var(--s-4); }
p:last-child { margin-bottom: 0; }

a { color: var(--jade); text-decoration-color: rgba(195, 145, 78, 0.5); text-underline-offset: 0.18em; }
a:hover { color: var(--brass-dim); }

ul, ol { margin: 0 0 var(--s-4); padding-left: 1.15rem; }
li { margin-bottom: 0.4rem; }
li::marker { color: var(--brass); }

hr { border: 0; border-top: 1px solid var(--rule); margin: var(--s-7) 0; }

:focus-visible {
  outline: 2px solid var(--brass);
  outline-offset: 3px;
  border-radius: 2px;
}

::selection { background: var(--brass-lt); color: var(--ink); }

/* --- layout --------------------------------------------------------------- */
.shell {
  width: 100%;
  max-width: var(--shell);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.shell--narrow { max-width: var(--shell-narrow); }

.section { padding-block: clamp(3.5rem, 2rem + 7vw, 7rem); }
.section--tight { padding-block: clamp(2.5rem, 1.5rem + 4vw, 4.5rem); }
.section--ink { background: var(--ink); color: var(--text-invert); }
.section--jade { background: var(--jade-deep); color: var(--text-invert); }
.section--linen { background: var(--linen); }
.section--paper { background: var(--paper); }

.section--ink h2,
.section--ink h3,
.section--jade h2,
.section--jade h3 { color: var(--linen); }

.section--ink a,
.section--jade a { color: var(--brass-lt); }

.grid { display: grid; gap: var(--s-5); }
.grid--2 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 19rem), 1fr)); }
.grid--3 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 17rem), 1fr)); }
.grid--4 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 13rem), 1fr)); }

.stack > * + * { margin-top: var(--s-4); }
.stack-l > * + * { margin-top: var(--s-6); }

/* section heading block */
.lede {
  font-size: clamp(1.05rem, 0.98rem + 0.4vw, 1.25rem);
  color: var(--text-soft);
  max-width: 46ch;
}

.section--ink .lede,
.section--jade .lede { color: var(--text-invert-soft); }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  margin: 0 0 var(--s-4);
  font-family: var(--font-body);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: var(--tracking-eyebrow);
  text-transform: uppercase;
  color: var(--brass-dim);
}

.eyebrow::before {
  content: "";
  width: 2.2rem;
  height: 1px;
  background: var(--brass);
}

.section--ink .eyebrow,
.section--jade .eyebrow { color: var(--brass-lt); }

.head-row {
  display: grid;
  gap: var(--s-5);
  align-items: end;
  margin-bottom: var(--s-7);
}

@media (min-width: 60rem) {
  .head-row { grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); }
  .head-row > :last-child { justify-self: end; text-align: right; }
  .head-row .lede { text-align: left; }
}

/* --- utilities ------------------------------------------------------------ */
.u-center { text-align: center; }
.u-center .lede, .u-center .eyebrow { margin-inline: auto; }
.u-center .eyebrow::after { content: ""; width: 2.2rem; height: 1px; background: var(--brass); }
.u-measure { max-width: 62ch; }
.u-hide { display: none !important; }
.u-mt-0 { margin-top: 0 !important; }
.u-small { font-size: 0.88rem; }
.u-muted { color: var(--text-soft); }
.section--ink .u-muted, .section--jade .u-muted { color: var(--text-invert-soft); }

.skip-link {
  position: absolute;
  left: 0.75rem;
  top: -4rem;
  z-index: 200;
  padding: 0.7rem 1.1rem;
  background: var(--brass);
  color: var(--ink);
  font-weight: 600;
  border-radius: var(--radius-s);
  transition: top 0.2s var(--ease);
}
.skip-link:focus { top: 0.75rem; }

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  margin: -1px; padding: 0; border: 0;
  clip: rect(0 0 0 0); clip-path: inset(50%);
  overflow: hidden; white-space: nowrap;
}

/* --- reveal animation ----------------------------------------------------- */
/* Content is always visible by default. The .js class is added by an inline
   script in <head>, so a visitor (or a crawler) without JavaScript still sees
   every section immediately. */
.js [data-reveal] {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}
.js [data-reveal].is-visible { opacity: 1; transform: none; }
[data-reveal][data-reveal-delay="1"] { transition-delay: 0.08s; }
[data-reveal][data-reveal-delay="2"] { transition-delay: 0.16s; }
[data-reveal][data-reveal-delay="3"] { transition-delay: 0.24s; }
[data-reveal][data-reveal-delay="4"] { transition-delay: 0.32s; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    transition-duration: 0.001ms !important;
  }
  .js [data-reveal] { opacity: 1; transform: none; }
}

@media print {
  .site-header, .site-footer, .consent, .hero__media, .cta-band { display: none !important; }
  body { background: #fff; }
}
