/* ==========================================================================
   Elfidia — design system
   --------------------------------------------------------------------------
   Replaces the Nicepage export (nicepage.css + seven per-page stylesheets,
   ~52k lines) with one token-driven sheet.

   Contents
     1.  Tokens
     2.  Reset & base
     3.  Typography
     4.  Layout primitives
     5.  Buttons & links
     6.  Header / navigation
     7.  Hero
     8.  Sections & components
     9.  Forms
     10. Footer
     11. Motion & utilities
   ========================================================================== */

/* 1. Tokens ============================================================== */

:root {
  /* Brand — a deep burgundy carried over from the original identity.
     Used for authority and heritage, never for the primary call to action. */
  --brand-950: #2c0710;
  --brand-900: #3d0a15;
  --brand-800: #55101f;
  --brand-700: #701427;   /* the brand colour */
  --brand-600: #8c2033;
  --brand-500: #a63c4c;
  --brand-200: #e8ccd2;
  --brand-100: #f5e6ea;
  --brand-50:  #fcf6f7;

  /* Accent — warm amber. Deliberately the only element on the page wearing
     this colour, so the primary action is unmistakable (Von Restorff). */
  --accent-700: #8f5209;
  --accent-600: #a9630f;
  --accent-500: #c67a17;
  --accent-400: #dd9433;
  --accent-100: #fbeed8;

  /* Neutrals, all tinted warm so nothing reads as cold grey next to the
     burgundy. */
  --ink:        #1c1418;
  --ink-soft:   #453a3e;
  --ink-muted:  #6d5f64;
  --ink-faint:  #94868b;
  --line:       #e7dedf;
  --line-soft:  #f1eaeb;
  --surface:    #ffffff;
  --surface-2:  #faf6f4;   /* warm off-white page ground */
  --surface-3:  #f4ede9;

  --ok-700: #1f6b45;
  --ok-100: #e4f2ea;
  --err-700: #9b2226;
  --err-100: #fbe9e9;

  /* Type */
  --font-display: "Literata", "Georgia", "Times New Roman", serif;
  --font-sans: "Golos Text", "Manrope", -apple-system, BlinkMacSystemFont,
    "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

  --text-xs:   0.8125rem;
  --text-sm:   0.9375rem;
  --text-base: 1.0625rem;
  --text-lg:   1.1875rem;
  --text-xl:   clamp(1.25rem, 0.5vw + 1.1rem, 1.4rem);
  --text-2xl:  clamp(1.5rem, 1vw + 1.25rem, 1.875rem);
  --text-3xl:  clamp(1.875rem, 2vw + 1.4rem, 2.5rem);
  --text-4xl:  clamp(2.25rem, 3.2vw + 1.4rem, 3.5rem);
  --text-5xl:  clamp(2.75rem, 5vw + 1.2rem, 4.75rem);

  /* Spacing — 8px grid */
  --sp-1: 0.25rem;
  --sp-2: 0.5rem;
  --sp-3: 0.75rem;
  --sp-4: 1rem;
  --sp-5: 1.5rem;
  --sp-6: 2rem;
  --sp-7: 3rem;
  --sp-8: 4rem;
  --sp-9: 6rem;
  --sp-10: 8rem;

  --section-y: clamp(3.5rem, 7vw, 6.5rem);

  --radius-sm: 6px;
  --radius:    10px;
  --radius-lg: 14px;
  --radius-pill: 999px;

  /* Shadows carry the brand hue rather than neutral black. */
  --shadow-sm: 0 1px 2px rgba(44, 7, 16, 0.06),
               0 1px 3px rgba(44, 7, 16, 0.05);
  --shadow:    0 2px 4px rgba(44, 7, 16, 0.05),
               0 8px 20px -8px rgba(44, 7, 16, 0.14);
  --shadow-lg: 0 4px 8px rgba(44, 7, 16, 0.06),
               0 24px 48px -20px rgba(44, 7, 16, 0.22);

  --container: 1200px;
  --measure: 68ch;

  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
  --dur: 220ms;

  /* z-index scale — no magic 9999s */
  --z-base: 1;
  --z-sticky: 20;
  --z-drawer: 60;
  --z-overlay: 55;
  --z-toast: 80;

  color-scheme: light;
}

/* 2. Reset & base ======================================================== */

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 96px;
  /* The off-canvas drawer is parked with translateX(100%), which Chromium
     counts towards the document's scroll width. `clip` suppresses sideways
     scrolling without creating a scroll container; `hidden` on body is the
     fallback for older Safari. */
  overflow-x: clip;
}

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

body {
  margin: 0;
  background: var(--surface-2);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: var(--text-base);
  line-height: 1.7;
  letter-spacing: 0.005em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

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

/* Keep every embedded map / video responsive without wrapper maths. */
.embed {
  position: relative;
  aspect-ratio: 16 / 9;
  width: 100%;
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--surface-3);
}
.embed > iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}
.embed--tall { aspect-ratio: 4 / 3; }

:focus-visible {
  outline: 3px solid var(--accent-500);
  outline-offset: 2px;
  border-radius: 3px;
}

::selection { background: var(--brand-200); color: var(--brand-950); }

.skip-link {
  position: absolute;
  left: var(--sp-4);
  top: var(--sp-4);
  z-index: var(--z-toast);
  transform: translateY(-200%);
  background: var(--brand-700);
  color: #fff;
  padding: var(--sp-3) var(--sp-5);
  border-radius: var(--radius);
  font-weight: 600;
  text-decoration: none;
  transition: transform var(--dur) var(--ease);
}
.skip-link:focus { transform: translateY(0); }

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

/* 3. Typography ========================================================== */

h1, h2, h3, h4 {
  font-family: var(--font-display);
  color: var(--ink);
  font-weight: 700;
  margin: 0 0 var(--sp-4);
  text-wrap: balance;
}

h1 {
  font-size: var(--text-5xl);
  line-height: 1.04;
  letter-spacing: -0.025em;
}
h2 {
  font-size: var(--text-4xl);
  line-height: 1.1;
  letter-spacing: -0.02em;
}
h3 {
  font-size: var(--text-2xl);
  line-height: 1.2;
  letter-spacing: -0.01em;
}
h4 {
  font-size: var(--text-xl);
  line-height: 1.3;
}

p { margin: 0 0 var(--sp-4); max-width: var(--measure); text-wrap: pretty; }
p:last-child { margin-bottom: 0; }

.lead {
  font-size: var(--text-lg);
  color: var(--ink-soft);
  line-height: 1.65;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  font-family: var(--font-sans);
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--brand-600);
  margin: 0 0 var(--sp-3);
}
.eyebrow::before {
  content: "";
  width: 28px;
  height: 2px;
  background: var(--accent-500);
  flex: none;
}
.eyebrow--plain::before { display: none; }

.muted { color: var(--ink-muted); }
.small { font-size: var(--text-sm); }

a { color: var(--brand-700); text-underline-offset: 0.2em; }
a:hover { color: var(--brand-600); }

.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  min-height: 44px;
  font-weight: 600;
  text-decoration: none;
  color: var(--brand-700);
}
.link-arrow svg { transition: transform var(--dur) var(--ease); }
.link-arrow:hover svg { transform: translateX(4px); }

/* Tabular figures wherever numbers are compared. */
.num { font-variant-numeric: tabular-nums; font-feature-settings: "tnum"; }

/* 4. Layout primitives =================================================== */

.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--sp-5);
}
@media (max-width: 640px) {
  .container { padding-inline: var(--sp-4); }
}

.section { padding-block: var(--section-y); }
/* Optical correction: bottom needs slightly more air than top. */
.section { padding-bottom: calc(var(--section-y) * 1.1); }

.section--tight { padding-block: clamp(2.5rem, 4vw, 4rem); }
.section--surface { background: var(--surface); }
.section--sand { background: var(--surface-3); }
.section--brand { background: var(--brand-900); color: #fff; }
.section--brand h2, .section--brand h3 { color: #fff; }
.section--brand p { color: rgba(255, 255, 255, 0.82); }

.section-head { margin-bottom: var(--sp-7); max-width: 46rem; }
.section-head p { color: var(--ink-muted); }

.stack > * + * { margin-top: var(--sp-4); }
.stack-lg > * + * { margin-top: var(--sp-6); }

.grid { display: grid; gap: var(--sp-5); }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

@media (max-width: 900px) {
  .grid-3, .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 600px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: minmax(0, 1fr); }
}

/* Asymmetric editorial split — deliberately not 50/50. */
.split {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: clamp(var(--sp-6), 5vw, var(--sp-9));
  align-items: center;
}
.split--reverse > :first-child { order: 2; }
@media (max-width: 900px) {
  .split { grid-template-columns: minmax(0, 1fr); gap: var(--sp-6); }
  .split--reverse > :first-child { order: 0; }
}

.rule {
  height: 3px;
  width: 56px;
  background: var(--accent-500);
  border: 0;
  margin: 0 0 var(--sp-5);
}

/* 5. Buttons & links ===================================================== */

.btn {
  --btn-bg: var(--accent-500);
  --btn-fg: #fff;
  --btn-border: transparent;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-2);
  min-height: 48px;
  padding: 0.875rem 1.75rem;
  background: var(--btn-bg);
  color: var(--btn-fg);
  border: 1.5px solid var(--btn-border);
  border-radius: var(--radius-sm);
  font-family: var(--font-sans);
  font-size: var(--text-base);
  font-weight: 600;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: background-color var(--dur) var(--ease),
              border-color var(--dur) var(--ease),
              transform 120ms var(--ease),
              box-shadow var(--dur) var(--ease);
}
.btn:hover { --btn-bg: var(--accent-600); color: #fff; box-shadow: var(--shadow); }
.btn:active { transform: translateY(1px); box-shadow: var(--shadow-sm); }

.btn--secondary {
  --btn-bg: transparent;
  --btn-fg: var(--brand-700);
  --btn-border: var(--brand-200);
}
.btn--secondary:hover {
  --btn-bg: var(--brand-50);
  --btn-fg: var(--brand-700);
  --btn-border: var(--brand-500);
  color: var(--brand-700);
}

.btn--brand { --btn-bg: var(--brand-700); }
.btn--brand:hover { --btn-bg: var(--brand-600); }

.btn--ghost-light {
  --btn-bg: transparent;
  --btn-fg: #fff;
  --btn-border: rgba(255, 255, 255, 0.45);
}
.btn--ghost-light:hover {
  --btn-bg: rgba(255, 255, 255, 0.12);
  --btn-border: #fff;
  color: #fff;
}

.btn--lg { min-height: 56px; padding: 1rem 2.25rem; font-size: var(--text-lg); }
.btn--block { width: 100%; }

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-3);
  align-items: center;
}

/* 6. Header / navigation ================================================= */

.site-header {
  position: sticky;
  top: 0;
  z-index: var(--z-sticky);
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: saturate(1.4) blur(12px);
  -webkit-backdrop-filter: saturate(1.4) blur(12px);
  border-bottom: 1px solid var(--line-soft);
  transition: box-shadow var(--dur) var(--ease),
              border-color var(--dur) var(--ease);
}
.site-header[data-scrolled="true"] {
  box-shadow: 0 1px 12px rgba(44, 7, 16, 0.08);
  border-bottom-color: var(--line);
}

.header-bar {
  display: flex;
  align-items: center;
  gap: var(--sp-4);
  min-height: 76px;
  /* The bar carries more than the body text does (brand, six links, language
     switch, phone and CTA), so it gets a wider track than --container. */
  max-width: 1320px;
}
@media (max-width: 900px) { .header-bar { min-height: 64px; } }

.brand {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-3);
  text-decoration: none;
  flex: none;
  margin-right: auto;
}
.brand img { width: 44px; height: auto; }
.brand-name {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}
.brand-name strong {
  font-family: var(--font-display);
  font-size: 1.3rem;
  letter-spacing: -0.02em;
  color: var(--brand-800);
}
.brand-name span {
  font-size: 0.75rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-faint);
}
@media (max-width: 420px) { .brand-name span { display: none; } }

.nav { display: flex; align-items: center; gap: var(--sp-1); }
.nav a {
  position: relative;
  padding: var(--sp-2) 0.625rem;
  border-radius: var(--radius-sm);
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--ink-soft);
  text-decoration: none;
  white-space: nowrap;
  transition: color var(--dur) var(--ease), background-color var(--dur) var(--ease);
}
.nav a:hover { color: var(--brand-700); background: var(--brand-50); }
.nav a[aria-current="page"] { color: var(--brand-700); font-weight: 600; }
.nav a[aria-current="page"]::after {
  content: "";
  position: absolute;
  left: 0.625rem;
  right: 0.625rem;
  bottom: 2px;
  height: 2px;
  background: var(--accent-500);
  border-radius: 2px;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  flex: none;
}
.header-actions > * { flex: none; }
/* The nav must not shrink: its links are nowrap, so a shrunken nav would let
   them spill out and collide with the language switch. */
.nav { flex-wrap: nowrap; flex: none; }

.lang-switch {
  display: inline-flex;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: var(--surface);
}
.lang-switch a {
  padding: 0.4rem 0.6rem;
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink-muted);
  text-decoration: none;
  transition: background-color var(--dur) var(--ease), color var(--dur) var(--ease);
}
.lang-switch a:hover { background: var(--brand-50); color: var(--brand-700); }
.lang-switch a[aria-current="true"] {
  background: var(--brand-700);
  color: #fff;
}

.header-phone {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  font-weight: 600;
  font-size: var(--text-sm);
  color: var(--brand-800);
  text-decoration: none;
  white-space: nowrap;
}
.header-phone:hover { color: var(--accent-600); }

.nav-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--ink);
  cursor: pointer;
}

/* Measured: the full bar needs ~1200px of track. Below 1300px the enrol
   button folds into the drawer first; below 1120px the whole nav does. */
@media (max-width: 1300px) {
  a.btn.nav--desktop { display: none; }
}

@media (max-width: 1120px) {
  .nav--desktop { display: none; }
  .nav-toggle { display: inline-flex; }
  .header-phone span { display: none; }
  /* Icon-only phone link still needs a full-size tap target. */
  .header-phone {
    width: 48px;
    height: 48px;
    justify-content: center;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    background: var(--surface);
  }
}

/* Mobile drawer */
.drawer {
  position: fixed;
  inset: 0 0 0 auto;
  width: min(88vw, 380px);
  background: var(--surface);
  z-index: var(--z-drawer);
  padding: var(--sp-5);
  display: flex;
  flex-direction: column;
  gap: var(--sp-4);
  transform: translateX(100%);
  visibility: hidden;
  transition: transform 280ms var(--ease), visibility 0s linear 280ms;
  overflow-y: auto;
  box-shadow: var(--shadow-lg);
}
.drawer[data-open="true"] {
  transform: translateX(0);
  visibility: visible;
  transition: transform 280ms var(--ease), visibility 0s;
}

.drawer-overlay {
  position: fixed;
  inset: 0;
  background: rgba(28, 20, 24, 0.5);
  z-index: var(--z-overlay);
  opacity: 0;
  pointer-events: none;
  transition: opacity 280ms var(--ease);
}
.drawer-overlay[data-open="true"] { opacity: 1; pointer-events: auto; }

.drawer-head { display: flex; justify-content: space-between; align-items: center; }
.drawer nav { display: flex; flex-direction: column; }
.drawer nav a {
  padding: var(--sp-4) 0;
  border-bottom: 1px solid var(--line-soft);
  font-size: var(--text-lg);
  font-weight: 500;
  color: var(--ink);
  text-decoration: none;
}
.drawer nav a[aria-current="page"] { color: var(--brand-700); font-weight: 600; }

/* 7. Hero ================================================================ */

.hero {
  position: relative;
  background: var(--brand-950);
  color: #fff;
  overflow: hidden;
}
.hero::after {
  /* Subtle grain so the large flat area does not read as a plain block. */
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.5;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)' opacity='0.045'/%3E%3C/svg%3E");
}
.hero-media {
  position: absolute;
  inset: 0;
  z-index: 0;
}
.hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 35%;
}
.hero-media::after {
  content: "";
  position: absolute;
  inset: 0;
  /* Two-pass scrim. The horizontal pass keeps the left-hand copy well above
     7:1 contrast; the flat wash underneath stops the busiest parts of the
     photograph from competing with the credential card on the right. */
  background:
    linear-gradient(
      100deg,
      rgba(24, 5, 12, 0.97) 0%,
      rgba(31, 6, 14, 0.94) 34%,
      rgba(38, 7, 16, 0.82) 58%,
      rgba(44, 7, 16, 0.72) 100%
    ),
    linear-gradient(rgba(24, 5, 12, 0.45), rgba(24, 5, 12, 0.3));
}
.hero-inner {
  position: relative;
  z-index: 1;
  padding-block: clamp(4rem, 9vw, 8rem);
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  gap: var(--sp-8);
  align-items: center;
}
@media (max-width: 940px) {
  .hero-inner { grid-template-columns: minmax(0, 1fr); }
}

.hero h1 { color: #fff; margin-bottom: var(--sp-5); }
.hero h1 em {
  font-style: normal;
  color: var(--accent-400);
}
.hero .eyebrow { color: var(--accent-400); }
.hero .eyebrow::before { background: var(--accent-400); }
.hero p { color: rgba(255, 255, 255, 0.86); font-size: var(--text-lg); }

.hero-points {
  list-style: none;
  margin: var(--sp-5) 0 var(--sp-6);
  padding: 0;
  display: grid;
  gap: var(--sp-2);
}
.hero-points li {
  display: flex;
  align-items: flex-start;
  gap: var(--sp-3);
  color: rgba(255, 255, 255, 0.9);
  font-size: var(--text-base);
}
.hero-points svg { flex: none; margin-top: 5px; color: var(--accent-400); }

.hero-note {
  margin-top: var(--sp-4);
  font-size: var(--text-sm);
  color: rgba(255, 255, 255, 0.66);
}

/* Credential card floated over the hero image */
.hero-card {
  background: rgba(24, 5, 12, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: var(--radius-lg);
  padding: var(--sp-5);
  backdrop-filter: blur(14px) saturate(0.9);
  -webkit-backdrop-filter: blur(14px) saturate(0.9);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.14),
              0 18px 40px -18px rgba(0, 0, 0, 0.6);
}
.hero-card dl { margin: 0; display: grid; gap: var(--sp-4); }
.hero-card div { display: grid; gap: 2px; }
.hero-card dt {
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 3vw, 2.35rem);
  font-weight: 700;
  color: var(--accent-400);
  line-height: 1;
}
.hero-card dd {
  margin: 0;
  font-size: var(--text-sm);
  color: rgba(255, 255, 255, 0.82);
  line-height: 1.45;
}

/* Compact page header for interior pages */
.page-head {
  position: relative;
  background: var(--brand-900);
  color: #fff;
  padding-block: clamp(2.5rem, 5vw, 4.5rem);
  overflow: hidden;
}
.page-head::before {
  content: "";
  position: absolute;
  right: -8%;
  top: -60%;
  width: 46rem;
  height: 46rem;
  border-radius: 50%;
  background: radial-gradient(circle at center, rgba(198, 122, 23, 0.22), transparent 62%);
  pointer-events: none;
}
.page-head h1 { color: #fff; font-size: var(--text-4xl); margin-bottom: var(--sp-3); }
.page-head p { color: rgba(255, 255, 255, 0.82); font-size: var(--text-lg); }
.page-head .eyebrow { color: var(--accent-400); }
.page-head .eyebrow::before { background: var(--accent-400); }
.page-head > .container { position: relative; z-index: 1; }

.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--sp-2);
  list-style: none;
  margin: 0 0 var(--sp-4);
  padding: 0;
  font-size: var(--text-sm);
  color: rgba(255, 255, 255, 0.6);
}
.breadcrumbs a {
  color: rgba(255, 255, 255, 0.8);
  text-decoration: none;
  display: inline-block;
  padding-block: 6px;
}
.breadcrumbs a:hover { color: #fff; text-decoration: underline; }
.breadcrumbs li + li::before { content: "/"; margin-right: var(--sp-2); opacity: 0.5; }

/* 8. Sections & components =============================================== */

/* Trust strip */
.trust-strip {
  background: var(--surface);
  border-block: 1px solid var(--line);
}
.trust-strip .container {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--sp-5);
  padding-block: var(--sp-6);
}
@media (max-width: 780px) {
  .trust-strip .container { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
.stat { text-align: left; }
.stat dt {
  font-family: var(--font-display);
  font-size: clamp(1.9rem, 3.4vw, 2.75rem);
  font-weight: 700;
  color: var(--brand-700);
  line-height: 1;
  letter-spacing: -0.03em;
}
.stat dd {
  margin: var(--sp-2) 0 0;
  font-size: var(--text-sm);
  color: var(--ink-muted);
  line-height: 1.45;
  max-width: 22ch;
}

/* Cards */
.card {
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: var(--sp-5);
  transition: border-color var(--dur) var(--ease),
              transform var(--dur) var(--ease),
              box-shadow var(--dur) var(--ease);
}
.card > :last-child { margin-top: auto; }
.card p { max-width: none; }

a.card, .card--interactive { text-decoration: none; color: inherit; }
a.card:hover, .card--interactive:hover {
  border-color: var(--brand-500);
  transform: translateY(-3px);
  box-shadow: var(--shadow);
}

/* Level card — the course listing */
.level-card { position: relative; padding-top: var(--sp-6); }
.level-card__badge {
  position: absolute;
  top: var(--sp-4);
  right: var(--sp-4);
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--brand-600);
  background: var(--brand-50);
  border: 1px solid var(--brand-200);
  padding: 3px 8px;
  border-radius: var(--radius-sm);
}
/* The level icons are white-on-transparent PNGs left over from the previous
   dark layout, so they need a dark tile to be visible at all. */
.level-card__icon {
  width: 56px;
  height: 56px;
  margin-bottom: var(--sp-4);
  border-radius: var(--radius);
  background: var(--brand-700);
  padding: 10px;
  object-fit: contain;
}
.level-card h3 { font-size: var(--text-xl); margin-bottom: var(--sp-2); }
.level-card p { font-size: var(--text-sm); color: var(--ink-muted); }
.level-card__foot {
  margin-top: var(--sp-5);
  padding-top: var(--sp-4);
  border-top: 1px solid var(--line-soft);
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--brand-700);
  display: flex;
  align-items: center;
  gap: var(--sp-2);
}

/* Editorial figure with an offset frame — breaks the flat-photo look. */
.figure-offset { position: relative; }
.figure-offset img {
  position: relative;
  z-index: 1;
  width: 100%;
  border-radius: var(--radius-lg);
  aspect-ratio: 4 / 3;
  object-fit: cover;
}
.figure-offset::before {
  content: "";
  position: absolute;
  inset: auto -18px -18px auto;
  width: 62%;
  height: 62%;
  border: 2px solid var(--brand-200);
  border-radius: var(--radius-lg);
  z-index: 0;
}
@media (max-width: 600px) { .figure-offset::before { display: none; } }

.figure-pair {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--sp-4);
  align-items: start;
}
.figure-pair img {
  width: 100%;
  border-radius: var(--radius-lg);
  object-fit: cover;
  aspect-ratio: 3 / 4;
}
.figure-pair img:first-child { margin-top: var(--sp-7); }

/* Quote — set with a display quotation mark rather than the coloured left bar
   that every card-with-accent-stripe layout uses. */
.pull-quote {
  position: relative;
  padding-left: clamp(2.75rem, 5vw, 4.25rem);
  margin: 0;
}
.pull-quote::before {
  content: "\201C";
  position: absolute;
  left: 0;
  top: -0.28em;
  font-family: var(--font-display);
  font-size: clamp(4rem, 9vw, 6.5rem);
  line-height: 1;
  color: var(--brand-100);
  pointer-events: none;
}
.pull-quote blockquote {
  position: relative;
  margin: 0 0 var(--sp-4);
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  line-height: 1.35;
  font-style: italic;
  color: var(--ink);
  max-width: 34ch;
}
.pull-quote figcaption {
  font-size: var(--text-sm);
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-muted);
}

/* FAQ — native details/summary so it works without JavaScript */
.faq-list { border-top: 1px solid var(--line); }
.faq-item { border-bottom: 1px solid var(--line); }
.faq-item summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-4);
  padding: var(--sp-5) 0;
  cursor: pointer;
  list-style: none;
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: 600;
  color: var(--ink);
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary:hover { color: var(--brand-700); }
.faq-toggle {
  flex: none;
  position: relative;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 1.5px solid var(--brand-200);
  color: var(--brand-700);
}
.faq-toggle::before, .faq-toggle::after {
  content: "";
  position: absolute;
  inset: 50% auto auto 50%;
  translate: -50% -50%;
  background: currentColor;
}
.faq-toggle::before { width: 10px; height: 1.5px; }
.faq-toggle::after  { width: 1.5px; height: 10px; transition: opacity 150ms var(--ease); }
.faq-item[open] .faq-toggle::after { opacity: 0; }
.faq-item[open] .faq-toggle { background: var(--brand-50); border-color: var(--brand-500); }
.faq-answer { padding: 0 0 var(--sp-5); max-width: var(--measure); color: var(--ink-soft); }

/* Tabs — programme viewer */
.tabs__list {
  display: flex;
  gap: var(--sp-1);
  overflow-x: auto;
  scrollbar-width: thin;
  border-bottom: 1px solid var(--line);
  margin-bottom: var(--sp-6);
  padding-bottom: 2px;
}
.tabs__tab {
  flex: none;
  appearance: none;
  background: none;
  border: 0;
  border-bottom: 2px solid transparent;
  padding: var(--sp-3) var(--sp-4);
  margin-bottom: -1px;
  font-family: var(--font-sans);
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--ink-muted);
  cursor: pointer;
  white-space: nowrap;
  transition: color var(--dur) var(--ease), border-color var(--dur) var(--ease);
}
.tabs__tab:hover { color: var(--brand-700); }
.tabs__tab[aria-selected="true"] {
  color: var(--brand-700);
  border-bottom-color: var(--accent-500);
}
.tabs__panel[hidden] { display: none; }
.tabs__panel img {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
}

/* News */
.news-card { overflow: hidden; padding: 0; }
.news-card img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
}
.news-card__body { padding: var(--sp-5); display: flex; flex-direction: column; gap: var(--sp-3); flex: 1; }
.news-card h3 { font-size: var(--text-xl); margin: 0; }
.news-card p { font-size: var(--text-sm); color: var(--ink-muted); margin: 0; }

/* Timeline */
.timeline { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--sp-5); }
.timeline li {
  position: relative;
  padding-left: var(--sp-7);
  padding-bottom: var(--sp-5);
  border-left: 2px solid var(--line);
}
.timeline li:last-child { padding-bottom: 0; border-left-color: transparent; }
.timeline li::before {
  content: "";
  position: absolute;
  left: -7px;
  top: 6px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--accent-500);
  border: 3px solid var(--surface-2);
}
.section--surface .timeline li::before { border-color: var(--surface); }
.timeline h3 {
  font-size: var(--text-xl);
  color: var(--brand-700);
  margin-bottom: var(--sp-2);
  font-variant-numeric: tabular-nums;
}
.timeline p { color: var(--ink-muted); margin: 0; }

/* Contact detail tiles */
.contact-tiles { display: grid; gap: var(--sp-4); grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 780px) { .contact-tiles { grid-template-columns: minmax(0, 1fr); } }
.contact-tile {
  display: flex;
  gap: var(--sp-4);
  align-items: flex-start;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: var(--sp-5);
}
.contact-tile__icon {
  flex: none;
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: var(--radius);
  background: var(--brand-50);
  color: var(--brand-700);
}
.contact-tile h3 {
  font-family: var(--font-sans);
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin: 0 0 var(--sp-1);
}
.contact-tile a, .contact-tile p {
  font-size: var(--text-base);
  font-weight: 500;
  color: var(--ink);
  margin: 0;
  text-decoration: none;
  overflow-wrap: anywhere;
}
.contact-tile a:hover { color: var(--brand-700); text-decoration: underline; }

/* CTA banner */
.cta-band {
  background: var(--brand-800);
  color: #fff;
  border-radius: var(--radius-lg);
  padding: clamp(2rem, 5vw, 3.5rem);
  text-align: center;
  position: relative;
  overflow: hidden;
}
.cta-band::before {
  content: "";
  position: absolute;
  inset: -50% -20% auto auto;
  width: 34rem; height: 34rem;
  background: radial-gradient(circle, rgba(198,122,23,0.28), transparent 60%);
  pointer-events: none;
}
.cta-band > * { position: relative; }
.cta-band h2 { color: #fff; max-width: 22ch; margin-inline: auto; }
.cta-band p {
  color: rgba(255, 255, 255, 0.82);
  max-width: 52ch;
  margin-inline: auto;
  margin-bottom: var(--sp-6);
}
.cta-band .btn-row { justify-content: center; }
.cta-band .cta-note {
  margin-top: var(--sp-5);
  font-size: var(--text-sm);
  color: rgba(255, 255, 255, 0.6);
}

/* Alerts */
.alert {
  display: flex;
  gap: var(--sp-3);
  align-items: flex-start;
  padding: var(--sp-4) var(--sp-5);
  border-radius: var(--radius);
  border: 1px solid transparent;
  font-size: var(--text-sm);
  margin-bottom: var(--sp-5);
}
.alert p { margin: 0; }
.alert--ok  { background: var(--ok-100);  border-color: #bcdfcc; color: var(--ok-700); }
.alert--err { background: var(--err-100); border-color: #f0c4c4; color: var(--err-700); }

/* Prose — policy pages */
.prose { max-width: 72ch; }
.prose h2 { font-size: var(--text-2xl); margin-top: var(--sp-7); }
.prose h3 { font-size: var(--text-xl); margin-top: var(--sp-6); }
.prose ul, .prose ol { padding-left: 1.25rem; color: var(--ink-soft); }
.prose li { margin-bottom: var(--sp-2); }
.prose li::marker { color: var(--brand-500); }

/* 9. Forms =============================================================== */

.form-grid { display: grid; gap: var(--sp-4); grid-template-columns: repeat(2, minmax(0, 1fr)); }
.form-grid .field--full { grid-column: 1 / -1; }
@media (max-width: 600px) { .form-grid { grid-template-columns: minmax(0, 1fr); } }

/* align-content:start keeps inputs on the same baseline across a row; without
   it a field with help text stretches its siblings' inputs downward. */
.field { display: grid; gap: var(--sp-2); align-content: start; }
.field > label {
  font-size: var(--text-sm);
  font-weight: 600;
  line-height: 1.4;
  color: var(--ink-soft);
}
.field > label span { color: var(--err-700); }
.field .hint { font-size: var(--text-xs); color: var(--ink-faint); }
.field .error { font-size: var(--text-xs); color: var(--err-700); font-weight: 500; }

input[type="text"], input[type="email"], input[type="tel"],
input[type="search"], select, textarea {
  width: 100%;
  min-height: 48px;
  padding: 0.7rem 0.9rem;
  font-family: var(--font-sans);
  font-size: var(--text-base);
  color: var(--ink);
  background: var(--surface);
  border: 1.5px solid var(--line);
  border-radius: var(--radius-sm);
  transition: border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}
textarea { min-height: 120px; resize: vertical; line-height: 1.6; }
input::placeholder, textarea::placeholder { color: var(--ink-faint); }

input:hover, select:hover, textarea:hover { border-color: var(--brand-200); }
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--brand-500);
  box-shadow: 0 0 0 3px var(--brand-100);
}
input[aria-invalid="true"], textarea[aria-invalid="true"] {
  border-color: var(--err-700);
}

select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='9' viewBox='0 0 14 9'%3E%3Cpath fill='none' stroke='%236d5f64' stroke-width='2' d='M1 1l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.9rem center;
  padding-right: 2.4rem;
}

/* Honeypot: hidden from people, still present in the DOM for bots.
   Clipped rather than pushed to left:-9999px, which was widening the
   document's scroll area and causing horizontal overflow. */
.hp-field {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.form-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: clamp(var(--sp-5), 3vw, var(--sp-7));
  box-shadow: var(--shadow-sm);
}

/* 10. Footer ============================================================= */

.site-footer {
  background: var(--brand-950);
  color: rgba(255, 255, 255, 0.78);
  padding-block: var(--sp-8) var(--sp-6);
  font-size: var(--text-sm);
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1.3fr;
  gap: var(--sp-6);
}
@media (max-width: 900px) { .footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .footer-grid { grid-template-columns: minmax(0, 1fr); } }

.site-footer h2, .site-footer h3 {
  font-family: var(--font-sans);
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.5);
  margin-bottom: var(--sp-4);
}
.site-footer a {
  color: rgba(255, 255, 255, 0.78);
  text-decoration: none;
  display: inline-block;
  padding-block: 6px;   /* lifts the tap target above 30px */
}
.site-footer a:hover { color: #fff; text-decoration: underline; }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin-bottom: 0; }
.site-footer p { color: rgba(255, 255, 255, 0.62); max-width: 34ch; }

.footer-brand { display: flex; align-items: center; gap: var(--sp-3); margin-bottom: var(--sp-4); }
.footer-brand img { width: 46px; }
.footer-brand strong {
  font-family: var(--font-display);
  font-size: 1.3rem;
  color: #fff;
  letter-spacing: -0.02em;
}

.social-row { display: flex; gap: var(--sp-2); margin-top: var(--sp-4); }
.social-row a {
  width: 40px; height: 40px;
  display: grid; place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: var(--radius-sm);
  color: rgba(255, 255, 255, 0.8);
  transition: background-color var(--dur) var(--ease),
              border-color var(--dur) var(--ease), color var(--dur) var(--ease);
}
.social-row a:hover { background: var(--brand-700); border-color: var(--brand-600); color: #fff; }

.newsletter { display: flex; gap: var(--sp-2); margin-top: var(--sp-3); flex-wrap: wrap; }
.newsletter input {
  flex: 1 1 12rem;
  min-height: 46px;
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.2);
  color: #fff;
}
.newsletter input::placeholder { color: rgba(255, 255, 255, 0.45); }
.newsletter input:focus {
  border-color: var(--accent-400);
  box-shadow: 0 0 0 3px rgba(198, 122, 23, 0.25);
}
.newsletter .btn { min-height: 46px; padding-inline: var(--sp-5); }
.form-status { margin-top: var(--sp-3); font-size: var(--text-xs); }
.form-status[data-state="ok"] { color: #8fd6ac; }
.form-status[data-state="err"] { color: #f0a9a9; }

.footer-bottom {
  margin-top: var(--sp-7);
  padding-top: var(--sp-5);
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-4) var(--sp-6);
  align-items: center;
  justify-content: space-between;
  font-size: var(--text-xs);
  color: rgba(255, 255, 255, 0.5);
}
/* The row wraps as a whole; its items never squeeze into multiple lines. */
.footer-bottom > * { flex: 0 1 auto; min-width: max-content; }
.footer-bottom nav { display: flex; flex-wrap: wrap; gap: var(--sp-4); }
.footer-bottom a { padding-block: 8px; }
/* Agency credit. Gold #bf9c57 is GambIT's own brand colour and clears 7:1
   against the footer background, so it needs no lightening. */
/* Scoped to .site-footer so it outranks `.site-footer a { display:inline-block }`,
   which would otherwise let the mark and the name wrap onto separate lines. */
.site-footer .credit {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  white-space: nowrap;
  padding-block: 8px;
  text-decoration: none;
  color: rgba(255, 255, 255, 0.5);
  transition: color var(--dur) var(--ease);
}
.credit-mark {
  width: auto;
  height: 24px;
  flex: none;
}
.credit-name {
  font-family: var(--font-display);
  font-weight: 600;
  color: #bf9c57;
  white-space: nowrap;
  transition: color var(--dur) var(--ease);
}
.site-footer .credit:hover { color: rgba(255, 255, 255, 0.75); text-decoration: none; }
.site-footer .credit:hover .credit-name { color: #d9bd82; }

/* Mobile call button — thumb zone */
.fab-call {
  position: fixed;
  right: var(--sp-4);
  bottom: var(--sp-4);
  z-index: var(--z-sticky);
  width: 56px; height: 56px;
  display: none;
  place-items: center;
  border-radius: 50%;
  background: var(--accent-500);
  color: #fff;
  box-shadow: var(--shadow-lg);
  transition: background-color var(--dur) var(--ease), transform 120ms var(--ease);
}
.fab-call:hover { background: var(--accent-600); color: #fff; }
.fab-call:active { transform: scale(0.95); }
@media (max-width: 1120px) {
  .fab-call { display: grid; }
  /* Reserve room so the button never sits on top of the footer's last line. */
  .site-footer { padding-bottom: calc(var(--sp-6) + 72px); }
}

/* 11. Motion & utilities ================================================= */

/* Scroll-in reveal. Content is visible by default and only hidden once JS
   confirms it can animate, so a failed script never blanks the page. */
[data-reveal] { opacity: 1; }
.js [data-reveal] {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 500ms var(--ease), transform 500ms var(--ease);
}
.js [data-reveal].is-visible { opacity: 1; transform: none; }
.js [data-reveal][data-reveal-delay="1"] { transition-delay: 70ms; }
.js [data-reveal][data-reveal-delay="2"] { transition-delay: 140ms; }
.js [data-reveal][data-reveal-delay="3"] { transition-delay: 210ms; }

@media (prefers-reduced-motion: reduce) {
  .js [data-reveal] { opacity: 1; transform: none; transition: none; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

.text-center { text-align: center; }
.mt-0 { margin-top: 0; }
.mb-0 { margin-bottom: 0; }
.mt-6 { margin-top: var(--sp-6); }
.mt-7 { margin-top: var(--sp-7); }
.no-wrap { white-space: nowrap; }

@media print {
  .site-header, .site-footer, .fab-call, .drawer, .drawer-overlay { display: none !important; }
  body { background: #fff; }
}

/* ---- Component classes replacing one-off inline styles ------------------ */

.figure-offset { margin: 0; }

/* Photo at the top of a value/benefit card. */
.card-media {
  width: 100%;
  aspect-ratio: 3 / 2;
  object-fit: cover;
  border-radius: var(--radius);
  margin-bottom: var(--sp-4);
}

/* Info panel that sits under the map: the card supplies the frame, the panel
   supplies the padding, so the embed can go edge to edge. */
.panel-card { padding: 0; overflow: hidden; }
.panel-card .embed { border-radius: 0; }
.panel-body { padding: var(--sp-5); }
.panel-body h3 { font-size: var(--text-lg); }

.icon-list { list-style: none; padding: 0; margin: 0; display: grid; gap: var(--sp-2); }
.icon-list li { display: flex; gap: var(--sp-3); align-items: center; }
.icon-list svg { flex: none; color: var(--brand-700); }

.measure-narrow { max-width: 44rem; }
.text-soft { color: var(--ink-soft); }
.mt-5 { margin-top: var(--sp-5); }
.mt-4 { margin-top: var(--sp-4); }
