/* ==========================================================================
   Naace — design system
   Brand palette and typefaces carried over from naace.co.uk (2019 build);
   layout, spacing and motion rebuilt from scratch.
   ========================================================================== */

/* ---------- 1. Tokens ---------------------------------------------------- */

:root {
  color-scheme: light;

  /* Brand */
  --brand-blue:    #195781;
  --brand-blue-dk: #12405F;
  --brand-green:   #86AB3B;
  --brand-green-dk:#6C8C2C;
  --brand-gold:    #EAB758;
  --brand-plum:    #B0396B;
  --brand-teal:    #2E8C86;

  /* Wordmark */
  --mark-1: #E2552C;
  --mark-2: #F0A63A;
  --mark-3: #7EB33F;
  --mark-4: #2E9C9A;
  --mark-5: #2B6CB0;
  --mark-6: #6B4E9E;

  /* Surfaces — neutrals carry a slight blue bias toward the brand */
  --paper:     #FFFFFF;
  --mist:      #F4F6F8;
  --mist-2:    #E9EDF1;
  --rule:      #DDE3E9;
  --rule-soft: #EAEEF2;

  /* Ink */
  --ink:    #1C2229;
  --body:   #4B535D;
  --muted:  #6E7883;
  --invert: #FFFFFF;

  /* Charcoal footer / utility bar */
  --char:    #23262C;
  --char-2:  #1A1D22;
  --char-ink:#B9C0C9;

  --accent:      var(--brand-blue);
  --accent-ink:  #FFFFFF;
  --focus:       #1E88D8;

  /* Type */
  --font-display: Poppins, "Segoe UI", system-ui, sans-serif;
  --font-body: "Open Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

  --step--1: 0.875rem;
  --step-0:  1.0625rem;              /* 17px — matches the original body size */
  --step-1:  1.1875rem;
  --step-2:  clamp(1.35rem, 1.1rem + 0.8vw, 1.625rem);
  --step-3:  clamp(1.6rem,  1.25rem + 1.4vw, 2.25rem);
  --step-4:  clamp(2rem,    1.5rem + 2.2vw, 3rem);
  --step-5:  clamp(2.4rem,  1.6rem + 3.4vw, 4rem);

  /* Space */
  --s1: 0.25rem; --s2: 0.5rem;  --s3: 0.75rem; --s4: 1rem;
  --s5: 1.5rem;  --s6: 2rem;    --s7: 3rem;    --s8: 4rem;
  --s9: 6rem;

  --gutter: clamp(1.25rem, 4vw, 2.5rem);
  --max: 1200px;
  --max-prose: 68ch;

  --radius: 6px;
  --radius-lg: 10px;

  --shadow-1: 0 1px 2px rgba(28, 34, 41, .05), 0 2px 8px rgba(28, 34, 41, .04);
  --shadow-2: 0 2px 4px rgba(28, 34, 41, .06), 0 14px 32px -18px rgba(28, 34, 41, .35);
  --shadow-3: 0 4px 10px rgba(28, 34, 41, .09), 0 26px 50px -24px rgba(28, 34, 41, .45);

  --ease: cubic-bezier(.22, .61, .36, 1);
  --ease-out: cubic-bezier(.16, 1, .3, 1);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --paper:     #14181D;
    --mist:      #1A1F25;
    --mist-2:    #222831;
    --rule:      #2C333C;
    --rule-soft: #232930;
    --ink:    #EDF1F5;
    --body:   #B2BCC7;
    --muted:  #8994A1;
    --char:   #0F1216;
    --char-2: #0B0E11;
    --char-ink: #98A3AF;
    --brand-blue: #4E9BCB;
    --brand-blue-dk: #3D82AD;
    --brand-green: #9FC556;
    --accent: #4E9BCB;
    --accent-ink: #0B0E11;
    --shadow-1: 0 1px 2px rgba(0,0,0,.4);
    --shadow-2: 0 2px 4px rgba(0,0,0,.4), 0 14px 32px -18px rgba(0,0,0,.9);
    --shadow-3: 0 4px 10px rgba(0,0,0,.5), 0 26px 50px -24px rgba(0,0,0,1);
  }
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --paper:     #14181D;
  --mist:      #1A1F25;
  --mist-2:    #222831;
  --rule:      #2C333C;
  --rule-soft: #232930;
  --ink:    #EDF1F5;
  --body:   #B2BCC7;
  --muted:  #8994A1;
  --char:   #0F1216;
  --char-2: #0B0E11;
  --char-ink: #98A3AF;
  --brand-blue: #4E9BCB;
  --brand-blue-dk: #3D82AD;
  --brand-green: #9FC556;
  --accent: #4E9BCB;
  --accent-ink: #0B0E11;
  --shadow-1: 0 1px 2px rgba(0,0,0,.4);
  --shadow-2: 0 2px 4px rgba(0,0,0,.4), 0 14px 32px -18px rgba(0,0,0,.9);
  --shadow-3: 0 4px 10px rgba(0,0,0,.5), 0 26px 50px -24px rgba(0,0,0,1);
}

/* ---------- 2. Reset ----------------------------------------------------- */

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--paper);
  color: var(--body);
  font-family: var(--font-body);
  font-size: var(--step-0);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-wrap: break-word; /* long email addresses and URLs wrap on narrow screens */
  overflow-x: hidden;
}
/* body's overflow doesn't contain fixed elements (the off-canvas nav), so clip at the root too. */
html { overflow-x: clip; }

img, svg, video { max-width: 100%; height: auto; display: block; }
h1, h2, h3, h4 {
  font-family: var(--font-display);
  color: var(--ink);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.022em;
  text-wrap: balance;
  overflow-wrap: break-word;
  margin: 0 0 var(--s4);
}
h1 { font-size: var(--step-4); }
h2 { font-size: var(--step-3); }
h3 { font-size: var(--step-2); letter-spacing: -0.015em; }
h4 { font-size: var(--step-1); letter-spacing: -0.01em; }
p  { margin: 0 0 var(--s4); }
p:last-child, ul:last-child, ol:last-child { margin-bottom: 0; }

a { color: var(--brand-blue); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--brand-blue-dk); }

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

.skip {
  position: absolute; left: var(--s4); top: -100px; z-index: 200;
  background: var(--brand-blue); color: #fff; padding: var(--s3) var(--s5);
  border-radius: 0 0 var(--radius) var(--radius); font-weight: 600;
  transition: top .18s var(--ease);
}
.skip:focus { top: 0; }

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

/* ---------- 3. Layout ---------------------------------------------------- */

.shell { width: 100%; max-width: var(--max); margin-inline: auto; padding-inline: var(--gutter); }
.shell--narrow { max-width: 860px; }

.section { padding-block: clamp(3rem, 7vw, 5.5rem); }
.section--tight { padding-block: clamp(2rem, 4vw, 3rem); }
.section--mist { background: var(--mist); }
.section--char { background: var(--char); color: var(--char-ink); }
.section--char h2, .section--char h3 { color: #fff; }

.prose { max-width: var(--max-prose); }
/* When .prose sits directly on a .shell, the shell's own width wins so the
   column lines up with the rest of the page instead of collapsing to 68ch. */
.shell.prose { max-width: 780px; }
.prose ul, .prose ol { padding-left: 1.3em; margin: 0 0 var(--s4); }
.prose li { margin-bottom: var(--s2); }
.prose li::marker { color: var(--brand-green); }
.prose h2 { margin-top: var(--s7); }
.prose h3 { margin-top: var(--s6); }
.prose > :first-child { margin-top: 0; }
.prose strong { color: var(--ink); font-weight: 600; }

.lede { font-size: var(--step-1); line-height: 1.6; color: var(--ink); }

.eyebrow {
  font-family: var(--font-display);
  font-size: 0.75rem; font-weight: 600;
  letter-spacing: .14em; text-transform: uppercase;
  color: var(--brand-green-dk);
  margin: 0 0 var(--s3);
}
.section--char .eyebrow { color: var(--brand-gold); }

.rule-top { border-top: 1px solid var(--rule); }

/* ---------- 4. Buttons --------------------------------------------------- */

.btn {
  display: inline-flex; align-items: center; gap: var(--s2);
  font-family: var(--font-display); font-weight: 600; font-size: 0.9375rem;
  line-height: 1; padding: 0.85em 1.5em;
  border-radius: var(--radius); border: 1.5px solid transparent;
  text-decoration: none; cursor: pointer; white-space: nowrap;
  transition: background-color .2s var(--ease), border-color .2s var(--ease),
              color .2s var(--ease), transform .2s var(--ease), box-shadow .2s var(--ease);
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }
/* Long labels may wrap rather than push past the screen edge on small phones. */
@media (max-width: 480px) { .btn { white-space: normal; line-height: 1.25; } }
.btn .arr { transition: transform .25s var(--ease-out); }
.btn:hover .arr { transform: translateX(4px); }

.btn--primary { background: var(--brand-blue); color: #fff; box-shadow: var(--shadow-1); }
.btn--primary:hover { background: var(--brand-blue-dk); color: #fff; box-shadow: var(--shadow-2); }

.btn--green { background: var(--brand-green); color: #fff; }
.btn--green:hover { background: var(--brand-green-dk); color: #fff; box-shadow: var(--shadow-2); }

.btn--ghost { border-color: var(--rule); color: var(--ink); background: transparent; }
.btn--ghost:hover { border-color: var(--brand-blue); color: var(--brand-blue); }

.btn--light { background: #fff; color: var(--brand-blue); }
.btn--light:hover { background: var(--mist); color: var(--brand-blue-dk); }

.btn--outline-light { border-color: rgba(255,255,255,.45); color: #fff; }
.btn--outline-light:hover { border-color: #fff; background: rgba(255,255,255,.1); color: #fff; }

.btn-row { display: flex; flex-wrap: wrap; gap: var(--s3); }

/* Text link with sliding arrow */
.tlink {
  display: inline-flex; align-items: center; gap: .45em;
  font-family: var(--font-display); font-weight: 600; font-size: .9375rem;
  text-decoration: none; color: var(--brand-blue);
}
.tlink .arr { transition: transform .25s var(--ease-out); }
.tlink:hover .arr { transform: translateX(5px); }

/* ---------- 5. Utility bar ---------------------------------------------- */

.utility {
  background: var(--char-2); color: var(--char-ink);
  font-size: var(--step--1);
  padding-block: 0.5rem;
  padding-top: calc(0.5rem + env(safe-area-inset-top, 0px));
}
.utility .shell { display: flex; align-items: center; gap: var(--s5); flex-wrap: wrap; }
.utility a { color: var(--char-ink); text-decoration: none; }
.utility a:hover { color: #fff; }
.utility .u-left { display: flex; align-items: center; gap: var(--s4); flex-wrap: wrap; }
.utility .u-right { margin-left: auto; display: flex; align-items: center; gap: var(--s4); }
.utility .u-social { display: flex; gap: var(--s3); }
.utility .u-social a { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; transition: background-color .2s var(--ease); }
.utility .u-social a:hover { background: rgba(255,255,255,.12); }
.u-login {
  background: var(--brand-blue); color: #fff !important;
  padding: .35em 1.1em; border-radius: var(--radius); font-weight: 600;
  transition: background-color .2s var(--ease);
}
.u-login:hover { background: var(--brand-blue-dk); }
@media (max-width: 720px) { .utility .u-left span.hide-sm { display: none; } }

/* ---------- 6. Header / nav --------------------------------------------- */

.masthead {
  position: sticky; top: 0; z-index: 100;
  border-bottom: 1px solid transparent;
  transition: border-color .3s var(--ease), box-shadow .3s var(--ease);
}
/* The frosted background lives on a pseudo-element: backdrop-filter on the
   masthead itself would trap the fixed mobile nav inside the header's height. */
.masthead::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  transition: background-color .3s var(--ease);
}
.masthead.is-stuck {
  border-bottom-color: var(--rule);
  box-shadow: var(--shadow-1);
}
.masthead.is-stuck::before { background: color-mix(in srgb, var(--paper) 96%, transparent); }
.masthead .shell {
  display: flex; align-items: center; gap: var(--s5);
  min-height: 84px;
  transition: min-height .3s var(--ease);
}
.masthead.is-stuck .shell { min-height: 68px; }

.brand { display: inline-flex; align-items: center; flex: 0 0 auto; }
.brand img { width: 148px; transition: width .3s var(--ease); }
.masthead.is-stuck .brand img { width: 124px; }
/* The logo's navy strapline needs a light backing on dark surfaces. */
:root[data-theme="dark"] .brand img { background: #fff; padding: 5px 8px; border-radius: 8px; box-sizing: content-box; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .brand img { background: #fff; padding: 5px 8px; border-radius: 8px; box-sizing: content-box; }
}

.nav { margin-left: auto; }
.nav > ul {
  list-style: none; margin: 0; padding: 0;
  display: flex; align-items: center; gap: clamp(.4rem, 1vw, .95rem);
}
.nav > ul > li { flex: 0 0 auto; }
.nav a {
  display: inline-block; text-decoration: none; white-space: nowrap;
  font-family: var(--font-display); font-weight: 500; font-size: .9rem;
  color: var(--ink); padding: .55rem .25rem; position: relative;
  transition: color .2s var(--ease);
}
.nav a::after {
  content: ""; position: absolute; left: .25rem; right: .25rem; bottom: .15rem;
  height: 2px; background: var(--brand-green); border-radius: 2px;
  transform: scaleX(0); transform-origin: left;
  transition: transform .28s var(--ease-out);
}
.nav a:hover, .nav a[aria-current="page"] { color: var(--brand-blue); }
.nav a:hover::after, .nav a[aria-current="page"]::after { transform: scaleX(1); }

.has-sub { position: relative; }
.chev {
  display: inline-block; vertical-align: middle;
  width: .36em; height: .36em; margin-left: .55em; margin-bottom: .18em;
  border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor;
  transform: rotate(45deg); opacity: .45;
  transition: transform .25s var(--ease), opacity .2s var(--ease);
}
.has-sub:hover > a .chev, .has-sub:focus-within > a .chev { opacity: .9; transform: rotate(225deg) translate(-1px, -1px); }
.sub {
  position: absolute; top: calc(100% - 2px); left: -1rem; z-index: 50;
  min-width: 250px; list-style: none; margin: 0; padding: var(--s2);
  background: var(--paper); border: 1px solid var(--rule);
  border-radius: var(--radius-lg); box-shadow: var(--shadow-3);
  opacity: 0; visibility: hidden; transform: translateY(8px);
  transition: opacity .2s var(--ease), transform .2s var(--ease-out), visibility .2s;
}
.has-sub:hover > .sub,
.has-sub:focus-within > .sub { opacity: 1; visibility: visible; transform: translateY(0); }
.sub a {
  display: block; padding: .5rem .75rem; border-radius: var(--radius);
  font-weight: 400; font-size: .9rem; color: var(--body);
  transition: background-color .18s var(--ease), color .18s var(--ease);
}
.sub a::after { display: none; }
.sub a:hover { background: var(--mist); color: var(--brand-blue); }

.nav-cta { margin-left: var(--s3); }
.nav-cta a::after { display: none; }
/* `.nav a` sets display/padding for plain nav links — the CTA is a button,
   so restore the button box here rather than letting the nav rule win. */
.nav-cta > a.btn {
  display: inline-flex; padding: .8em 1.35em;
  font-size: .875rem; color: #fff;
}
.nav-cta > a.btn:hover { color: #fff; }

.burger {
  display: none; margin-left: auto;
  width: 44px; height: 44px; border: 1px solid var(--rule); border-radius: var(--radius);
  background: transparent; cursor: pointer; padding: 0;
  place-items: center; gap: 5px; flex-direction: column;
}
.burger span {
  display: block; width: 19px; height: 2px; background: var(--ink); border-radius: 2px;
  transition: transform .3s var(--ease-out), opacity .2s var(--ease);
}
.burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.burger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.theme-toggle {
  width: 38px; height: 38px; display: grid; place-items: center;
  border: 1px solid var(--rule); border-radius: var(--radius);
  background: transparent; color: var(--body); cursor: pointer;
  transition: border-color .2s var(--ease), color .2s var(--ease);
}
.theme-toggle:hover { border-color: var(--brand-blue); color: var(--brand-blue); }
.theme-toggle .moon { display: none; }
:root[data-theme="dark"] .theme-toggle .moon { display: block; }
:root[data-theme="dark"] .theme-toggle .sun { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-toggle .moon { display: block; }
  :root:not([data-theme="light"]) .theme-toggle .sun { display: none; }
}

@media (max-width: 1180px) {
  .burger { display: flex; margin-left: var(--s3); }
  .theme-toggle { margin-left: auto; }
  .nav {
    position: fixed; inset: 0 0 0 auto; width: min(360px, 88vw); z-index: 150;
    background: var(--paper); border-left: 1px solid var(--rule);
    padding: calc(var(--s7) + env(safe-area-inset-top, 0px)) var(--s5) var(--s7);
    overflow-y: auto; box-shadow: var(--shadow-3);
    transform: translateX(100%); visibility: hidden;
    transition: transform .34s var(--ease-out), visibility 0s linear .34s;
  }
  .nav.is-open { transform: translateX(0); visibility: visible; transition: transform .34s var(--ease-out); }
  .nav > ul { flex-direction: column; align-items: stretch; gap: 0; }
  .nav > ul > li { border-bottom: 1px solid var(--rule-soft); }
  .nav a { display: block; padding: .9rem .25rem; font-size: 1.05rem; }
  .nav a::after { display: none; }
  .sub {
    position: static; opacity: 1; visibility: visible; transform: none;
    box-shadow: none; border: 0; border-left: 2px solid var(--rule);
    border-radius: 0; margin: 0 0 var(--s3) .25rem; padding: 0 0 0 var(--s4); min-width: 0;
  }
  .sub a { padding: .5rem 0; font-size: .95rem; }
  .nav-cta { margin: var(--s5) 0 0; }
  .nav-cta .btn { width: 100%; justify-content: center; }
  .scrim {
    /* Below the masthead (z 100): the nav lives inside it, so a higher scrim would cover the open menu. */
    position: fixed; inset: 0; z-index: 99; background: rgba(12,16,20,.5);
    backdrop-filter: blur(2px); opacity: 0; pointer-events: none;
    transition: opacity .3s var(--ease);
  }
  .scrim.is-on { opacity: 1; pointer-events: auto; }
  body.nav-open { overflow: hidden; }
}

/* ---------- 7. Hero ------------------------------------------------------ */

.hero {
  position: relative; isolation: isolate; overflow: hidden;
  min-height: clamp(420px, 56vw, 580px);
  display: grid; align-items: center;
  background: var(--brand-blue-dk);
}
.hero__media { position: absolute; inset: 0; z-index: -2; }
.hero__media img { width: 100%; height: 100%; object-fit: cover; }
.hero::after {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background:
    linear-gradient(100deg, rgba(18,64,95,.94) 0%, rgba(18,64,95,.78) 42%, rgba(18,64,95,.25) 78%, rgba(18,64,95,.1) 100%);
}
.hero__inner { padding-block: clamp(3rem, 7vw, 5rem); }
.hero__text { max-width: 640px; color: #fff; }
.hero h1 {
  color: #fff; font-size: var(--step-5);
  letter-spacing: -0.03em; line-height: 1.02; margin-bottom: var(--s5);
}
.hero p { color: rgba(255,255,255,.88); font-size: var(--step-1); line-height: 1.6; max-width: 54ch; }
.hero .eyebrow { color: var(--brand-gold); }
.hero .btn-row { margin-top: var(--s6); }

/* Page banner for interior pages */
.banner {
  position: relative; isolation: isolate; overflow: hidden;
  background: var(--brand-blue-dk); color: #fff;
  padding-block: clamp(2.75rem, 6vw, 4.5rem);
}
.banner__media { position: absolute; inset: 0; z-index: -2; }
.banner__media img { width: 100%; height: 100%; object-fit: cover; }
.banner::after {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(95deg, rgba(18,64,95,.96) 20%, rgba(18,64,95,.7) 100%);
}
.banner h1 { color: #fff; margin-bottom: var(--s3); }
.banner p { color: rgba(255,255,255,.85); max-width: 58ch; margin: 0; }
.banner .eyebrow { color: var(--brand-gold); }

.crumbs {
  font-size: var(--step--1); color: var(--muted);
  padding-block: var(--s4); border-bottom: 1px solid var(--rule-soft);
}
.crumbs ol { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: .5em; }
.crumbs li + li::before { content: "/"; margin-right: .5em; opacity: .5; }
.crumbs a { color: var(--muted); text-decoration: none; }
.crumbs a:hover { color: var(--brand-blue); text-decoration: underline; }
.crumbs [aria-current] { color: var(--ink); }

/* ---------- 8. Mosaic (the signature grid) ------------------------------- */

.mosaic {
  display: grid; gap: 10px;
  grid-template-columns: repeat(4, 1fr);
  grid-auto-rows: minmax(150px, auto);
}
.tile {
  position: relative; isolation: isolate; overflow: hidden;
  display: flex; flex-direction: column; justify-content: flex-end;
  padding: var(--s5); min-height: 180px;
  border-radius: var(--radius); text-decoration: none; color: #fff;
  transition: transform .4s var(--ease-out), box-shadow .4s var(--ease-out);
}
.tile:hover { transform: translateY(-4px); box-shadow: var(--shadow-3); color: #fff; }
.tile__media { position: absolute; inset: 0; z-index: -2; }
.tile__media img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform .7s var(--ease-out);
}
.tile:hover .tile__media img { transform: scale(1.06); }
.tile::after {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: var(--tint, rgba(18,64,95,.82));
  transition: opacity .4s var(--ease);
  opacity: .9;
}
.tile:hover::after { opacity: .96; }
.tile h3 {
  color: #fff; font-size: clamp(1.25rem, 1.6vw, 1.6rem);
  margin: 0 0 var(--s2); letter-spacing: -0.02em;
}
.tile .tile__cta {
  font-family: var(--font-display); font-weight: 600; font-size: .875rem;
  display: block; /* inline text, so a wrapped label keeps its arrow after the last word */
  color: rgba(255,255,255,.92);
}
.nobr { white-space: nowrap; }
.tile .tile__cta .arr { display: inline-block; vertical-align: -.15em; margin-left: .15em; transition: transform .3s var(--ease-out); }
.tile:hover .tile__cta .arr { transform: translateX(5px); }
.tile p { color: rgba(255,255,255,.85); font-size: .9375rem; margin: 0 0 var(--s3); }

/* Tints */
.t-blue   { --tint: linear-gradient(160deg, rgba(25,87,129,.93), rgba(18,64,95,.97)); }
.t-green  { --tint: linear-gradient(160deg, rgba(134,171,59,.92), rgba(108,140,44,.96)); }
.t-gold   { --tint: linear-gradient(160deg, rgba(234,183,88,.94), rgba(206,153,56,.97)); }
.t-plum   { --tint: linear-gradient(160deg, rgba(176,57,107,.92), rgba(140,42,85,.96)); }
.t-teal   { --tint: linear-gradient(160deg, rgba(46,140,134,.92), rgba(32,110,105,.96)); }
.t-photo  { --tint: linear-gradient(to top, rgba(14,24,33,.78) 0%, rgba(14,24,33,.18) 55%, rgba(14,24,33,0) 100%); }
.t-gold h3, .t-gold .tile__cta, .t-gold p { color: #2A2109; }
.t-gold .tile__cta { color: #3A2D0C; }

/* Spans */
.span-2 { grid-column: span 2; }
.span-2-row { grid-row: span 2; }
.tile--tall { min-height: 380px; }

@media (max-width: 900px) {
  .mosaic { grid-template-columns: repeat(2, 1fr); }
  .span-2 { grid-column: span 2; }
  .span-2-row { grid-row: span 1; }
  .tile--tall { min-height: 260px; }
}
@media (max-width: 520px) {
  .mosaic { grid-template-columns: 1fr; }
  .span-2 { grid-column: span 1; }
}

/* ---------- 9. Cards, grids, stats -------------------------------------- */

.grid { display: grid; gap: var(--s5); }
.grid--2 { grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr)); }
.grid--3 { grid-template-columns: repeat(auto-fit, minmax(min(270px, 100%), 1fr)); }
.grid--4 { grid-template-columns: repeat(auto-fit, minmax(min(210px, 100%), 1fr)); }

.card {
  background: var(--paper); border: 1px solid var(--rule);
  border-radius: var(--radius-lg); overflow: hidden;
  display: flex; flex-direction: column;
  transition: transform .3s var(--ease-out), box-shadow .3s var(--ease-out), border-color .3s var(--ease);
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow-2); border-color: var(--rule-soft); }
.card__media { aspect-ratio: 16 / 9; overflow: hidden; background: var(--mist-2); }
.card__media img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--ease-out); }
.card:hover .card__media img { transform: scale(1.05); }
.card__body { padding: var(--s5); display: flex; flex-direction: column; gap: var(--s3); flex: 1; }
.card__body h3 { margin: 0; font-size: var(--step-1); }
.card__body p { margin: 0; font-size: .9375rem; color: var(--body); }
.card__body .tlink { margin-top: auto; }
.card a.stretch::after { content: ""; position: absolute; inset: 0; }
.card { position: relative; }

.card--accent { border-top: 3px solid var(--brand-green); }

.meta {
  font-family: var(--font-display); font-size: .75rem; font-weight: 600;
  letter-spacing: .08em; text-transform: uppercase; color: var(--muted);
}

/* Stat band */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(180px, 100%), 1fr)); gap: var(--s5); }
.stat { text-align: left; }
.stat b {
  display: block; font-family: var(--font-display); font-weight: 700;
  font-size: clamp(2.25rem, 4vw, 3.25rem); line-height: 1;
  color: #fff; letter-spacing: -0.03em; font-variant-numeric: tabular-nums;
}
.section--char .stat span { display: block; margin-top: var(--s3); font-size: .9375rem; color: var(--char-ink); }
.stat--green b { color: var(--brand-green); }
.stat--gold b { color: var(--brand-gold); }

/* Split feature */
.split { display: grid; gap: clamp(2rem, 5vw, 4rem); align-items: center; grid-template-columns: repeat(auto-fit, minmax(min(320px, 100%), 1fr)); }
.split__media { border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow-2); }
.split__media img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.split--flip .split__media { order: 2; }
@media (max-width: 760px) { .split--flip .split__media { order: 0; } }

/* Numbered element list (the ERF's six elements) */
.steps { list-style: none; counter-reset: st; margin: 0; padding: 0; display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--s4); }
.steps li {
  counter-increment: st; position: relative;
  padding: var(--s5) var(--s5) var(--s5) calc(var(--s8) + var(--s2));
  background: var(--paper); border: 1px solid var(--rule); border-radius: var(--radius-lg);
  transition: border-color .25s var(--ease), transform .25s var(--ease-out);
}
.steps li:hover { border-color: var(--brand-green); transform: translateX(3px); }
.steps li::before {
  content: counter(st, decimal-leading-zero);
  position: absolute; left: var(--s5); top: 50%; transform: translateY(-50%);
  font-family: var(--font-display); font-weight: 700; font-size: 1.15rem;
  color: var(--brand-green);
}
.steps h4 { margin: 0 0 var(--s1); }
.steps p { margin: 0; font-size: .9375rem; }

/* Pricing */
.tiers { display: grid; gap: var(--s5); grid-template-columns: repeat(auto-fit, minmax(min(240px, 100%), 1fr)); align-items: start; }
.tier {
  background: var(--paper); border: 1px solid var(--rule); border-radius: var(--radius-lg);
  padding: var(--s6); display: flex; flex-direction: column; gap: var(--s4);
  transition: transform .3s var(--ease-out), box-shadow .3s var(--ease-out);
}
.tier:hover { transform: translateY(-4px); box-shadow: var(--shadow-2); }
.tier--featured { border-color: var(--brand-green); border-width: 2px; box-shadow: var(--shadow-2); }
.tier__flag {
  align-self: flex-start; background: var(--brand-green); color: #fff;
  font-family: var(--font-display); font-size: .7rem; font-weight: 600;
  letter-spacing: .1em; text-transform: uppercase;
  padding: .3em .8em; border-radius: 99px;
}
.tier h3 { margin: 0; }
.tier__price { font-family: var(--font-display); font-weight: 700; font-size: 2.5rem; color: var(--ink); line-height: 1; letter-spacing: -0.03em; }
.tier__price small { font-size: .875rem; font-weight: 500; color: var(--muted); letter-spacing: 0; }
.tier ul { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--s2); font-size: .9375rem; }
.tier li { padding-left: 1.6em; position: relative; }
.tier li::before {
  content: ""; position: absolute; left: 0; top: .58em;
  width: .5em; height: .28em; border-left: 2px solid var(--brand-green);
  border-bottom: 2px solid var(--brand-green); transform: rotate(-45deg);
}
.tier .btn { margin-top: auto; justify-content: center; }

/* Logo wall */
.logos { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(150px, 100%), 1fr)); gap: var(--s4); }
.logo-cell {
  display: grid; place-items: center; min-height: 92px; padding: var(--s4);
  background: var(--paper); border: 1px solid var(--rule); border-radius: var(--radius);
  font-family: var(--font-display); font-weight: 600; font-size: .875rem;
  color: var(--body); text-align: center; text-decoration: none; line-height: 1.3;
  transition: border-color .25s var(--ease), color .25s var(--ease), transform .25s var(--ease-out);
}
.logo-cell:hover { border-color: var(--brand-blue); color: var(--brand-blue); transform: translateY(-2px); }

/* Post list */
.posts { display: grid; gap: 0; border-top: 1px solid var(--rule); }
.post-row {
  display: grid; grid-template-columns: 140px 1fr auto; gap: var(--s5); align-items: baseline;
  padding: var(--s5) var(--s3); border-bottom: 1px solid var(--rule);
  text-decoration: none; color: inherit;
  transition: background-color .22s var(--ease), padding-left .22s var(--ease-out);
}
.post-row:hover { background: var(--mist); padding-left: var(--s5); }
.post-row h3 { margin: 0; font-size: var(--step-1); transition: color .2s var(--ease); }
.post-row:hover h3 { color: var(--brand-blue); }
.post-row .arr { color: var(--brand-green); transition: transform .3s var(--ease-out); }
.post-row:hover .arr { transform: translateX(5px); }
@media (max-width: 680px) {
  .post-row { grid-template-columns: 1fr; gap: var(--s2); }
  .post-row .arr { display: none; }
}

/* Event cards */
.event {
  display: grid; grid-template-columns: auto 1fr; gap: var(--s5);
  background: var(--paper); border: 1px solid var(--rule); border-radius: var(--radius-lg);
  padding: var(--s6); align-items: start;
  transition: box-shadow .3s var(--ease-out), border-color .3s var(--ease);
}
.event:hover { box-shadow: var(--shadow-2); border-color: var(--brand-green); }
.date-chip {
  display: grid; place-items: center; text-align: center;
  width: 86px; padding: var(--s3) var(--s2);
  background: var(--brand-blue); color: #fff; border-radius: var(--radius);
  font-family: var(--font-display); line-height: 1.1;
}
.date-chip b { display: block; font-size: 1.75rem; font-weight: 700; }
.date-chip span { display: block; font-size: .7rem; letter-spacing: .1em; text-transform: uppercase; margin-top: .25em; }
@media (max-width: 560px) { .event { grid-template-columns: 1fr; } }

/* Contact panel */
.contact-grid { display: grid; gap: clamp(2rem, 5vw, 3.5rem); grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr)); align-items: start; }
.field { display: grid; gap: var(--s2); margin-bottom: var(--s4); }
.field label { font-family: var(--font-display); font-weight: 600; font-size: .875rem; color: var(--ink); }
.field input, .field textarea, .field select {
  font: inherit; font-size: .9375rem; padding: .75rem .9rem;
  border: 1px solid var(--rule); border-radius: var(--radius);
  background: var(--paper); color: var(--ink); width: 100%;
  transition: border-color .2s var(--ease), box-shadow .2s var(--ease);
}
.field input:focus, .field textarea:focus, .field select:focus {
  border-color: var(--brand-blue); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand-blue) 18%, transparent);
  outline: none;
}
.field textarea { min-height: 150px; resize: vertical; }
.req { color: var(--brand-plum); }
.info-list { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--s5); }
.info-list li { display: grid; grid-template-columns: 28px 1fr; gap: var(--s3); align-items: start; }
.info-list svg { color: var(--brand-green); margin-top: .3em; }
.info-list b { display: block; color: var(--ink); font-family: var(--font-display); font-size: .9375rem; }

/* CTA band */
.cta-band {
  background: linear-gradient(115deg, var(--brand-blue-dk), var(--brand-blue) 55%, var(--brand-teal));
  color: #fff; border-radius: var(--radius-lg); padding: clamp(2rem, 5vw, 3.5rem);
  display: grid; gap: var(--s5); align-items: center;
  grid-template-columns: minmax(0, 1fr) auto;
}
.cta-band h2 { color: #fff; margin: 0 0 var(--s2); }
.cta-band p { color: rgba(255,255,255,.85); margin: 0; max-width: 52ch; }
@media (max-width: 760px) { .cta-band { grid-template-columns: 1fr; } }

/* Callout */
.callout {
  border-left: 3px solid var(--brand-gold);
  background: var(--mist); border-radius: 0 var(--radius) var(--radius) 0;
  padding: var(--s5); font-size: .9375rem;
}
.callout strong { color: var(--ink); }

/* ---------- 10. Footer --------------------------------------------------- */

.foot { background: var(--char); color: var(--char-ink); padding-block: clamp(3rem, 6vw, 4.5rem) var(--s6); }
.foot__cols { display: grid; gap: var(--s7); grid-template-columns: 1.4fr 1fr 1.2fr 1fr; }
@media (max-width: 900px) { .foot__cols { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px) { .foot__cols { grid-template-columns: 1fr; } }
.foot h4 {
  color: #fff; font-size: .8125rem; letter-spacing: .12em; text-transform: uppercase;
  margin: 0 0 var(--s4);
}
.foot ul { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--s3); }
.foot a { color: var(--char-ink); text-decoration: none; font-size: .9375rem; transition: color .2s var(--ease), padding-left .2s var(--ease-out); }
.foot a:hover { color: #fff; padding-left: 3px; }
.foot__brand img { width: 150px; margin-bottom: var(--s5); background: #fff; padding: 8px 12px; border-radius: 10px; box-sizing: content-box; }
.foot__contact { display: grid; gap: var(--s4); font-size: .9375rem; }
.foot__contact div { display: grid; grid-template-columns: 22px 1fr; gap: var(--s3); align-items: start; }
.foot__contact svg { color: var(--brand-green); margin-top: .25em; }
.foot__bar {
  margin-top: var(--s7); padding-top: var(--s5); border-top: 1px solid rgba(255,255,255,.1);
  display: flex; flex-wrap: wrap; gap: var(--s4); align-items: center; font-size: .8125rem;
  padding-bottom: env(safe-area-inset-bottom, 0px);
}
.foot__bar .social { margin-left: auto; display: flex; gap: var(--s3); }
.foot__bar .social a {
  display: grid; place-items: center; width: 34px; height: 34px;
  border: 1px solid rgba(255,255,255,.18); border-radius: 50%;
  transition: background-color .22s var(--ease), border-color .22s var(--ease), transform .22s var(--ease-out);
}
.foot__bar .social a:hover { background: var(--brand-blue); border-color: var(--brand-blue); transform: translateY(-2px); padding-left: 0; }
.charity-no { font-family: var(--font-display); font-size: .8125rem; color: var(--char-ink); }

/* Back to top */
.totop {
  position: fixed; right: var(--gutter); z-index: 90;
  bottom: calc(var(--s5) + env(safe-area-inset-bottom, 0px));
  width: 44px; height: 44px; display: grid; place-items: center;
  background: var(--brand-blue); color: #fff; border: 0; border-radius: 50%;
  box-shadow: var(--shadow-2); cursor: pointer;
  opacity: 0; transform: translateY(12px) scale(.9); pointer-events: none;
  transition: opacity .3s var(--ease), transform .3s var(--ease-out), background-color .2s var(--ease);
}
.totop.is-on { opacity: 1; transform: none; pointer-events: auto; }
.totop:hover { background: var(--brand-blue-dk); }

/* ---------- 11. Motion --------------------------------------------------- */

/* Content is visible by default; JS opts in to the reveal so no-JS users
   and the first paint never see an empty page. */
.js [data-reveal] { opacity: 0; transform: translateY(18px); }
.js [data-reveal].is-in {
  opacity: 1; transform: none;
  transition: opacity .6s var(--ease), transform .7s var(--ease-out);
  transition-delay: var(--delay, 0ms);
}

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

@media print {
  .utility, .masthead, .totop, .foot__bar .social { display: none; }
  body { font-size: 11pt; }
}
