/* ============================================================
   Base: reset, typography, layout primitives
   ============================================================ */

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

* { margin: 0; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + var(--s5));
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

body {
  font-family: var(--font-body);
  font-size: var(--fs-md);
  line-height: var(--lh-normal);
  color: var(--text);
  background: var(--surface);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  min-height: 100dvh;
  overflow-x: hidden;
}

body.is-locked { overflow: hidden; }

img, picture, video, canvas, svg {
  display: block;
  max-width: 100%;
  height: auto;
}

input, button, textarea, select { font: inherit; color: inherit; }

p, h1, h2, h3, h4, h5, h6 { overflow-wrap: break-word; }

/* ── Headings ─────────────────────────────────────────────── */

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-head);
  font-weight: 600;
  line-height: var(--lh-tight);
  letter-spacing: var(--ls-tight);
  color: var(--text);
  text-wrap: balance;
}

h1 { font-size: var(--fs-4xl); }
h2 { font-size: var(--fs-3xl); }
h3 { font-size: var(--fs-2xl); }
h4 { font-size: var(--fs-xl); line-height: var(--lh-snug); }
h5 { font-size: var(--fs-lg); line-height: var(--lh-snug); }
h6 { font-size: var(--fs-base); line-height: var(--lh-snug); }

.display {
  font-size: var(--fs-5xl);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.03em;
}

p { max-width: var(--measure); }
p + p { margin-top: var(--s4); }

.lead {
  font-size: var(--fs-lg);
  line-height: var(--lh-relaxed);
  color: var(--text-muted);
}

strong, b { font-weight: 600; color: var(--text); }

small { font-size: var(--fs-sm); }

/* ── Links ────────────────────────────────────────────────── */

a {
  color: var(--gold-700);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
  transition: color var(--dur-fast) var(--ease);
}

a:hover { color: var(--gold-600); }

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
summary:focus-visible,
[tabindex]:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
  border-radius: var(--r-sm);
}

/* ── Lists ────────────────────────────────────────────────── */

ul, ol { padding-left: 1.25em; }
li + li { margin-top: var(--s2); }

.list-plain { list-style: none; padding-left: 0; }
.list-plain > li + li { margin-top: var(--s3); }

/* Checkmark list — used for benefit bullets */
.list-check {
  list-style: none;
  padding-left: 0;
  display: grid;
  gap: var(--s3);
}

.list-check > li {
  position: relative;
  padding-left: 2rem;
  margin-top: 0;
  max-width: var(--measure);
}

.list-check > li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.45em;
  width: 1.125rem;
  height: 1.125rem;
  border-radius: var(--r-full);
  background: var(--gold-050);
  border: 1px solid var(--gold-400);
}

.list-check > li::after {
  content: '';
  position: absolute;
  left: 0.36rem;
  top: 0.72em;
  width: 0.4rem;
  height: 0.22rem;
  border-left: 1.8px solid var(--gold-700);
  border-bottom: 1.8px solid var(--gold-700);
  transform: rotate(-45deg);
}

/* ── Tables ───────────────────────────────────────────────── */

table {
  width: 100%;
  border-collapse: collapse;
  font-variant-numeric: tabular-nums;
}

th, td {
  text-align: left;
  padding: var(--s3) var(--s4);
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}

th {
  font-family: var(--font-head);
  font-weight: 600;
  font-size: var(--fs-sm);
  letter-spacing: var(--ls-wide);
  text-transform: uppercase;
  color: var(--text-muted);
}

/* ── Rich text (admin-authored content) ───────────────────── */

.prose { max-width: var(--measure); }
.prose--wide { max-width: none; }
.prose > * + * { margin-top: var(--s4); }
.prose h2 { font-size: var(--fs-2xl); margin-top: var(--s7); }
.prose h3 { font-size: var(--fs-xl); margin-top: var(--s6); }
.prose h2:first-child, .prose h3:first-child { margin-top: 0; }
.prose ul, .prose ol { display: grid; gap: var(--s2); }
.prose li { max-width: none; }
.prose img { border-radius: var(--r-md); margin: var(--s6) 0; }
.prose blockquote {
  border-left: 3px solid var(--gold-500);
  padding: var(--s2) 0 var(--s2) var(--s5);
  font-size: var(--fs-lg);
  color: var(--text-muted);
  font-style: italic;
}
.prose code {
  font-family: var(--font-mono);
  font-size: 0.9em;
  background: var(--surface-sunken);
  padding: 0.15em 0.4em;
  border-radius: var(--r-sm);
}
.prose table { margin: var(--s6) 0; font-size: var(--fs-base); }
.prose hr { border: 0; border-top: 1px solid var(--line); margin: var(--s7) 0; }

/* ── Layout primitives ────────────────────────────────────── */

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

.container--wide { max-width: var(--container-wide); }
.container--narrow { max-width: 48rem; }

.section { padding-block: var(--section-y); }
.section--lg { padding-block: var(--section-y-lg); }
.section--tight { padding-block: clamp(2.5rem, 4vw, 4rem); }

.section--alt { background: var(--surface-alt); }
.section--ivory { background: var(--ivory); }

.section--dark {
  background: var(--surface-dark);
  color: var(--text-on-dark);
}

.section--dark h1, .section--dark h2, .section--dark h3,
.section--dark h4, .section--dark h5, .section--dark h6 { color: var(--text-invert); }
.section--dark p { color: var(--text-on-dark-muted); }
.section--dark a { color: var(--gold-300); }
.section--dark a:hover { color: var(--gold-200); }

.grid { display: grid; gap: var(--s5); }
.grid--2 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 20rem), 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)); }
.grid--gap-lg { gap: var(--s6); }

.stack { display: grid; gap: var(--s4); }
.stack--lg { gap: var(--s6); }
.stack--sm { gap: var(--s2); }

.cluster {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s3);
  align-items: center;
}

.split {
  display: grid;
  gap: var(--s7);
  align-items: start;
}

@media (min-width: 60rem) {
  .split { grid-template-columns: 1fr 1fr; gap: var(--s8); }
  .split--sidebar { grid-template-columns: minmax(0, 1fr) 20rem; }
  .split--sidebar-left { grid-template-columns: 18rem minmax(0, 1fr); }
  .split--wide-first { grid-template-columns: 1.3fr 1fr; }
}

/* ── Utilities ────────────────────────────────────────────── */

.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  left: var(--s4);
  top: -100%;
  z-index: var(--z-toast);
  background: var(--ink-900);
  color: var(--text-invert);
  padding: var(--s3) var(--s5);
  border-radius: var(--r-md);
  font-weight: 600;
  text-decoration: none;
  transition: top var(--dur) var(--ease);
}

.skip-link:focus { top: var(--s4); color: var(--text-invert); }

.text-center { text-align: center; }
.text-muted { color: var(--text-muted); }
.text-mono { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }
.text-balance { text-wrap: balance; }
.mx-auto { margin-inline: auto; }
.mt-0 { margin-top: 0; }
.mt-4 { margin-top: var(--s4); }
.mt-5 { margin-top: var(--s5); }
.mt-6 { margin-top: var(--s6); }
.mt-7 { margin-top: var(--s7); }
.full-width { max-width: none; }

@media (max-width: 47.99rem) { .hide-mobile { display: none !important; } }
@media (min-width: 48rem) { .hide-desktop { display: none !important; } }

/* ── Motion preferences ───────────────────────────────────── */

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  /* Reveal animations must never leave content hidden. */
  [data-reveal] { opacity: 1 !important; transform: none !important; }
}

/* ── Print ────────────────────────────────────────────────── */

@media print {
  .site-header, .site-footer, .mobile-bar, .whatsapp-fab,
  .cta-band, .breadcrumbs, .skip-link { display: none !important; }
  body { font-size: 11pt; color: #000; }
  a[href^="http"]::after { content: ' (' attr(href) ')'; font-size: 9pt; }
  .section { padding-block: 1rem; }
}
