/* ============================================================
   TN Dementia Training & Consultancy — shared design system
   Every page (index.html + pages/*.html) links this file.
   Change a colour/spacing token here and it updates everywhere.
   Page-specific layout (hero, bios, accordion, etc.) lives in
   that page's own <style> block — everything reusable lives here.
   ============================================================ */

:root {
  --navy: #003087;
  --navy-700: #002a78;
  --navy-900: #001b4d;
  --green: #00703C;
  --green-700: #005c31;
  --gold: #FFB800;
  --gold-soft: #ffce4d;
  --bg: #F9F9FB;
  --bg-tint: #f2f4f8;
  --ink: #1A1A1A;
  --ink-soft: #41464f;
  --ink-faint: #6b7280;
  --line: #e3e6ee;
  --card: #ffffff;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow-sm: 0 1px 2px rgba(0,27,77,.06), 0 2px 8px rgba(0,27,77,.05);
  --shadow-md: 0 6px 20px rgba(0,27,77,.08), 0 2px 6px rgba(0,27,77,.05);
  --shadow-lg: 0 24px 60px rgba(0,27,77,.14), 0 8px 20px rgba(0,27,77,.08);
  --maxw: 1200px;
  --ease: cubic-bezier(.22,.61,.36,1);
  --font-head: "Source Serif 4", Georgia, serif;
  --font-body: "Source Sans 3", system-ui, sans-serif;
}

/* ---------- Base ---------- */
* { box-sizing: border-box; }
/* Belt-and-braces: any element styled with its own `display` (e.g. .form-ok's
   `display:flex`) would otherwise override the browser's default `[hidden]`
   rule, since author CSS always beats the UA stylesheet regardless of
   specificity — causing "hidden" elements to render anyway. */
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}
h1, h2, h3, h4 { font-family: var(--font-head); color: var(--navy); line-height: 1.15; letter-spacing: -.01em; margin: 0; text-wrap: balance; }
p { margin: 0; text-wrap: pretty; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }

.wrap { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 28px; }
@media (max-width: 480px) { .wrap { padding: 0 20px; } }

/* Section/page kicker — a plain italic serif label, not a pill badge:
   no box, no background, no decorative line, no all-caps. */
.eyebrow, .page-label, .aud-tag {
  font-family: var(--font-head); font-style: italic; font-weight: 600;
  font-size: 16px; color: var(--green); display: inline-flex; align-items: center;
}

/* ---------- Buttons ----------
   Static pages use .btn / .btn.sec / .btn-ghost.
   The homepage (React) uses .btn-primary / .btn-secondary / .btn-ghost.
   Both spellings are supported here so either markup style works. */
.btn, .btn-primary {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  font-weight: 600; font-size: 16px; border: 1.5px solid transparent;
  border-radius: 999px; padding: 14px 26px; transition: all .22s var(--ease);
  white-space: nowrap; background: var(--navy); color: #fff; box-shadow: var(--shadow-sm);
}
.btn:hover, .btn-primary:hover { background: var(--gold); color: var(--navy-900); box-shadow: 0 8px 22px rgba(255,184,0,.35); transform: translateY(-2px); }
.btn.sec, .btn-secondary { background: transparent; color: var(--navy); border-color: var(--navy); box-shadow: none; }
.btn.sec:hover, .btn-secondary:hover { background: var(--navy); color: #fff; transform: translateY(-2px); }
.btn-ghost { background: rgba(255,255,255,.08); color: #fff; border: 1.5px solid rgba(255,255,255,.4); }
.btn-ghost:hover { background: var(--gold); color: var(--navy-900); border-color: var(--gold); }
.btn svg { width: 18px; height: 18px; }

/* ---------- Header / Nav ---------- */
.site-header {
  position: sticky; top: 0; z-index: 60;
  /* Solid (not blurred) background: a backdrop-filter here would force the
     browser to re-composite everything scrolling underneath it every frame,
     which is what caused scroll speed to feel inconsistent between sections. */
  background: rgba(249,249,251,.97);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap { max-width: none; padding: 0 26px; }
.nav { display: flex; align-items: center; justify-content: space-between; height: 88px; gap: 24px; }
.brand { display: flex; align-items: center; gap: 13px; }
.brand-logo { width: var(--brand-logo-size, 68px); height: var(--brand-logo-size, 68px); object-fit: contain; flex: none; display: block; }
.brand-text { display: flex; flex-direction: column; line-height: 1.05; }
.brand-name { font-family: var(--font-head); font-weight: 600; color: var(--navy); font-size: clamp(14px, 1.55vw, 19px); line-height: 1.08; letter-spacing: -.012em; white-space: nowrap; }
.brand-sub { font-family: var(--font-head); font-style: italic; font-size: clamp(11px, 1.05vw, 13.5px); color: var(--green); letter-spacing: .005em; white-space: nowrap; margin-top: 2px; }

.nav-links { display: flex; align-items: center; gap: 4px; }
.nav-link {
  position: relative; padding: 10px 14px; font-weight: 500; font-size: 15.5px; color: var(--ink-soft);
  border-radius: 8px; transition: color .2s, background .2s;
}
.nav-link:hover { color: var(--navy); background: var(--bg-tint); }
.nav-link.on { color: var(--navy); background: var(--bg-tint); }
.nav-item { position: relative; }
.nav-item > .nav-link { display: inline-flex; align-items: center; gap: 6px; }
.caret { width: 11px; height: 11px; transition: transform .2s; }
.nav-item:hover .caret { transform: rotate(180deg); }
.dropdown {
  position: absolute; top: calc(100% + 8px); left: 0; min-width: 252px;
  background: #fff; border: 1px solid var(--line); border-radius: 14px;
  box-shadow: var(--shadow-lg); padding: 8px; opacity: 0; visibility: hidden;
  transform: translateY(6px); transition: all .2s var(--ease);
}
.nav-item:hover .dropdown { opacity: 1; visibility: visible; transform: translateY(0); }
.drop-link { display: block; padding: 11px 13px; border-radius: 9px; transition: background .18s; }
.drop-link:hover { background: var(--bg-tint); }
.drop-title { display: block; font-weight: 600; color: var(--navy); font-size: 15px; }
.drop-desc { display: block; font-size: 12.5px; color: var(--ink-faint); margin-top: 1px; }

.nav-cta { display: flex; align-items: center; gap: 10px; }
.hamburger {
  display: none; width: 46px; height: 46px; border-radius: 11px; border: 1px solid var(--line);
  background: #fff; align-items: center; justify-content: center; flex-direction: column; gap: 5px;
}
.hamburger span { width: 20px; height: 2px; background: var(--navy); border-radius: 2px; transition: .25s var(--ease); }
.hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.mobile-menu {
  display: none; flex-direction: column; gap: 4px; padding: 12px 20px 24px;
  border-bottom: 1px solid var(--line); background: var(--bg);
}
.mobile-menu.open { display: flex; }
.mobile-menu a { padding: 13px 12px; border-radius: 10px; font-weight: 500; font-size: 16px; color: var(--ink-soft); }
.mobile-menu a:hover { background: var(--bg-tint); }
.mobile-menu .btn { margin-top: 8px; justify-content: center; }

@media (max-width: 760px) {
  .nav-links, .nav-cta > .btn, .nav-cta > .btn-primary { display: none; }
  .hamburger { display: flex; }
}
@media (max-width: 480px) {
  .brand { gap: 9px; }
  .brand-logo { width: 44px !important; height: 44px !important; }
  .brand-name { font-size: 12.5px; }
  .brand-sub { font-size: 10.5px; }
}

/* ---------- Footer ----------
   Static pages: simple single-row footer -> add class "footer-simple".
   Homepage: rich multi-column footer -> plain "footer" class (React). */
.footer { background: var(--navy-900); color: rgba(255,255,255,.7); position: relative; font-size: 13.5px; }
.footer a:hover { color: var(--gold); }

.footer-simple .wrap { display: flex; justify-content: space-between; align-items: center; gap: 18px; flex-wrap: wrap; padding: 24px 28px; }

.footer-top { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 40px; padding: 60px 0 44px; }
.footer .fbrand-logo { width: 50px; height: 50px; flex: none; background: #fff; border-radius: 13px; padding: 5px; box-shadow: 0 2px 10px rgba(0,0,0,.25); }
.footer .fbrand-logo img { width: 100%; height: 100%; object-fit: contain; display: block; }
.footer .fbrand-name { color: #fff; font-family: var(--font-head); font-weight: 600; font-size: 18px; }
.footer .fbrand-sub { font-size: 13px; margin-top: 10px; max-width: 30ch; line-height: 1.6; }
.footer .fbrand-tag { font-family: var(--font-head); font-style: italic; color: var(--gold); font-size: 14px; margin-top: 12px; }
.footer h5 { color: #fff; font-family: var(--font-body); font-size: 13px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; margin: 0 0 18px; }
.footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 11px; }
.footer ul a { font-size: 14.5px; transition: color .18s; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.12); padding: 22px 0; display: flex; justify-content: space-between; align-items: center; gap: 18px; flex-wrap: wrap; font-size: 13px; }
@media (max-width: 980px) { .footer-top { grid-template-columns: 1fr 1fr; } }
@media (max-width: 480px) { .footer-top { grid-template-columns: 1fr; } }

/* ---------- Shared inner-page patterns ---------- */
main { flex: 1; position: relative; overflow: hidden; }
main.hero-main::before, main.center-main::before {
  content: ""; position: absolute; inset: 0 0 auto 0; height: 460px;
  background: radial-gradient(900px 480px at 88% -8%, rgba(0,48,135,.07), transparent 60%),
              radial-gradient(700px 420px at -6% 12%, rgba(0,112,60,.06), transparent 58%);
  pointer-events: none;
}
main.center-main { display: grid; place-items: center; }

.page-head { position: relative; padding: 64px 0 8px; text-align: center; }
.page-title { font-size: clamp(32px,4.2vw,48px); font-weight: 600; margin: 16px auto 0; max-width: 22ch; }
.page-sub { color: var(--ink-soft); font-size: 18px; margin: 16px auto 0; max-width: 60ch; }

.arrow { width: 18px; height: 18px; }

/* dark CTA band used at the bottom of most inner pages */
.cta-band { position: relative; background: var(--navy); color: #fff; margin-top: 56px; overflow: hidden; }
.cta-band::before { content: ""; position: absolute; inset: 0; background: radial-gradient(700px 380px at 85% -20%, rgba(255,184,0,.14), transparent 60%); pointer-events: none; }
.cta-band-in { position: relative; padding: 48px 0; text-align: center; }
.cta-band h2 { color: #fff; font-size: clamp(22px,2.8vw,28px); font-weight: 600; }
.cta-band p { color: rgba(255,255,255,.8); font-size: 16px; margin-top: 12px; }
.cta-band .actions { display: flex; gap: 14px; justify-content: center; margin-top: 22px; flex-wrap: wrap; }

/* tick/feature list — used on training pages and the homepage audience panel */
.feat-list { display: grid; gap: 18px; }
.feat { display: flex; gap: 14px; align-items: flex-start; }
.feat .tick { width: 26px; height: 26px; border-radius: 999px; background: rgba(0,112,60,.1); color: var(--green); display: grid; place-items: center; flex: none; margin-top: 1px; }
.feat .tick svg { width: 15px; height: 15px; }
.feat b { font-weight: 600; color: var(--ink); display: block; }
.feat span { display: block; font-size: 14.5px; color: var(--ink-faint); margin-top: 2px; }

/* ---------- Contact form (homepage CTA band + standalone /contact page) ---------- */
.form-card { background: #fff; border-radius: 22px; padding: 34px; box-shadow: var(--shadow-lg); }
.form-card h3 { font-size: 22px; font-weight: 600; }
.form-card .fc-sub { color: var(--ink-faint); font-size: 14.5px; margin-top: 6px; margin-bottom: 22px; }
.field { margin-bottom: 16px; }
.field label { display: block; font-size: 13.5px; font-weight: 600; color: var(--ink-soft); margin-bottom: 7px; }
.field input, .field textarea {
  width: 100%; padding: 13px 15px; border: 1.5px solid var(--line); border-radius: 11px;
  font-family: inherit; font-size: 15.5px; color: var(--ink); background: var(--bg); transition: border .2s, box-shadow .2s;
}
.field input:focus, .field textarea:focus { outline: none; border-color: var(--navy); box-shadow: 0 0 0 3px rgba(0,48,135,.12); background: #fff; }
.field textarea { resize: vertical; min-height: 110px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.field-check { display: flex; align-items: flex-start; gap: 11px; margin: 2px 0 20px; cursor: pointer; font-size: 13.5px; line-height: 1.45; color: var(--ink-soft); }
.field-check input { width: 18px; height: 18px; margin: 1px 0 0; flex: none; accent-color: var(--navy); cursor: pointer; }
@media (max-width: 480px) { .field-row { grid-template-columns: 1fr; } }
.form-card .btn { width: 100%; }
.form-note { font-size: 12.5px; color: var(--ink-faint); margin-top: 14px; text-align: center; }
.form-ok { background: rgba(0,112,60,.08); border: 1px solid rgba(0,112,60,.25); color: var(--green-700); border-radius: 12px; padding: 14px 16px; font-size: 14.5px; font-weight: 500; display: flex; gap: 10px; align-items: center; }

/* reveal-on-scroll (homepage only, but token lives here) */
.reveal { opacity: 0; transform: translateY(22px); }
.reveal.in { opacity: 1; transform: none; transition: opacity .7s var(--ease), transform .7s var(--ease); }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1 !important; transform: none !important; } }
