/* ==========================================================================
   Rotary Club of Lilongwe — Design System
   Built on Rotary International's official brand palette and type guidance.
   Colour values come from the Rotary Brand Center. Do not substitute.
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Tokens
   -------------------------------------------------------------------------- */
:root {
  /* --- Official Rotary colours (Brand Center) --- */
  --royal:      #17458F;  /* Rotary Royal Blue — PMS 286C. Primary. */
  --gold:       #F7A81B;  /* Rotary Gold — PMS 130C. The wheel, accents. */
  --azure:      #0067C8;  /* Azure — PMS 2175C. Links and interactive states. */
  --sky:        #00A2E0;  /* Sky Blue — PMS 2202C. Used sparingly. */
  --powder:     #B9D9EB;  /* Powder Blue — PMS 290C. */

  /* Programme colours — reserved for their own programmes only.
     Cardinal belongs to End Polio Now and must never be used as a UI accent. */
  --cardinal:   #E02927;
  --cranberry:  #D41367;  /* Rotaract */

  /* --- Official neutrals --- */
  --charcoal:   #54565A;  /* Cool Gray 11C — body copy */
  --pewter:     #898A8D;  /* Cool Gray 8C — muted text */
  --smoke:      #A7A8AA;  /* Cool Gray 5C */
  --silver:     #C7C8CA;  /* Cool Gray 2C */
  --white:      #FFFFFF;

  /* --- Derived surfaces (blue-biased neutrals, not flat grey) --- */
  --royal-deep: #0F3068;  /* darker royal for hovers on solid fills */
  --mist:       #F4F7FB;  /* page tint */
  --mist-2:     #E9F0F8;  /* stronger tint / hovers */
  --border:     #DCE3EC;  /* hairlines */
  --border-2:   #C3CFDE;

  /* Semantic aliases used through the components */
  --ink:        var(--royal);
  --body:       var(--charcoal);
  --muted:      var(--pewter);

  /* --- Type ---
     Rotary's licensed families are Frutiger (primary) and Sentinel (secondary).
     The Brand Center's sanctioned free alternatives are Open Sans and Georgia,
     which is what a public website should use so it renders everywhere. */
  --font-sans: "Open Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-serif: Georgia, "Times New Roman", serif;

  /* Scale */
  --step--1: clamp(0.83rem, 0.8rem + 0.15vw, 0.9rem);
  --step-0:  clamp(1rem, 0.96rem + 0.2vw, 1.06rem);
  --step-1:  clamp(1.18rem, 1.1rem + 0.4vw, 1.4rem);
  --step-2:  clamp(1.45rem, 1.3rem + 0.72vw, 1.9rem);
  --step-3:  clamp(1.8rem, 1.5rem + 1.4vw, 2.7rem);
  --step-4:  clamp(2.2rem, 1.7rem + 2.5vw, 3.8rem);

  /* Space */
  --sp-1: 0.5rem;
  --sp-2: 1rem;
  --sp-3: 1.5rem;
  --sp-4: 2rem;
  --sp-5: 3rem;
  --sp-6: 4.5rem;
  --sp-7: 6.5rem;

  /* Shell */
  --wrap: 1180px;
  --wrap-narrow: 720px;
  --radius: 8px;
  --radius-lg: 14px;

  --shadow-sm: 0 1px 2px rgba(23, 69, 143, 0.06);
  --shadow-md: 0 4px 16px rgba(23, 69, 143, 0.09);
  --shadow-lg: 0 14px 40px rgba(23, 69, 143, 0.14);

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

/* --------------------------------------------------------------------------
   2. Reset / base
   -------------------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

/* Keep anchor targets clear of the sticky header. */
[id] { scroll-margin-top: 96px; }

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: var(--step-0);
  line-height: 1.65;
  color: var(--body);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
  font-family: var(--font-sans);
  font-weight: 800;
  line-height: 1.13;
  letter-spacing: -0.018em;
  margin: 0 0 var(--sp-2);
  color: var(--royal);
  text-wrap: balance;
}

h1 { font-size: var(--step-4); }
h2 { font-size: var(--step-3); }
h3 { font-size: var(--step-2); }
h4 { font-size: var(--step-1); font-weight: 700; }

p { margin: 0 0 var(--sp-2); }
p:last-child { margin-bottom: 0; }

a { color: var(--azure); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--royal); }

strong { font-weight: 700; color: var(--royal); }

img { max-width: 100%; height: auto; display: block; }

hr { border: 0; border-top: 1px solid var(--border); margin: var(--sp-5) 0; }

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

/* Long-form reading copy uses the brand's secondary (serif) family. */
.prose { font-family: var(--font-serif); font-size: 1.02rem; line-height: 1.75; }
.prose p { margin-bottom: var(--sp-3); }

/* --------------------------------------------------------------------------
   3. Layout helpers
   -------------------------------------------------------------------------- */
.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: var(--sp-3);
}
.wrap--narrow { max-width: var(--wrap-narrow); }

.section { padding-block: var(--sp-6); }
.section--tight { padding-block: var(--sp-5); }
.section--mist { background: var(--mist); }
.section--royal { background: var(--royal); color: rgba(255,255,255,0.86); }
.section--royal h2, .section--royal h3 { color: var(--white); }

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--royal);
  color: var(--white);
  padding: var(--sp-2) var(--sp-3);
  z-index: 200;
}
.skip-link:focus { left: 0; color: var(--white); }

.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;
}

/* Remaining unfilled content, clearly marked for the club to complete. */
.slot {
  border: 1px dashed var(--sky);
  background: var(--mist);
  border-radius: var(--radius);
  padding: var(--sp-2) var(--sp-3);
  color: var(--charcoal);
  font-size: var(--step--1);
}
.slot::before {
  content: "TO CONFIRM";
  display: block;
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--azure);
  font-weight: 700;
  margin-bottom: 0.35rem;
}

/* --------------------------------------------------------------------------
   4. Type utilities
   -------------------------------------------------------------------------- */
.eyebrow {
  font-size: 0.73rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--azure);
  margin-bottom: var(--sp-2);
  display: flex;
  align-items: center;
  gap: 0.7em;
}
/* Gold never carries text — it has nowhere near enough contrast on white.
   It earns its place as a rule beside the label instead. */
.eyebrow::before {
  content: "";
  width: 26px;
  height: 3px;
  background: var(--gold);
  border-radius: 2px;
  flex: 0 0 auto;
}
.section--royal .eyebrow { color: var(--gold); }
.section--royal .eyebrow::before { background: var(--gold); }

.lede {
  font-size: var(--step-1);
  line-height: 1.55;
  color: var(--charcoal);
  font-family: var(--font-serif);
}
.section--royal .lede { color: rgba(255,255,255,0.88); }

.muted { color: var(--muted); }

.section-head { max-width: 62ch; margin-bottom: var(--sp-4); }

/* --------------------------------------------------------------------------
   5. Buttons
   -------------------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.55em;
  font-family: var(--font-sans);
  font-size: var(--step--1);
  font-weight: 700;
  letter-spacing: 0.01em;
  padding: 0.82em 1.5em;
  border-radius: 999px;
  border: 2px solid transparent;
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
  transition: transform var(--dur) var(--ease),
              background-color var(--dur) var(--ease),
              color var(--dur) var(--ease),
              border-color var(--dur) var(--ease),
              box-shadow var(--dur) var(--ease);
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }

.btn--primary { background: var(--royal); color: var(--white); }
.btn--primary:hover { background: var(--royal-deep); color: var(--white); box-shadow: var(--shadow-md); }

.btn--gold { background: var(--gold); color: #3D2905; }
.btn--gold:hover { background: #E39A12; color: #3D2905; box-shadow: var(--shadow-md); }

.btn--ghost { background: transparent; color: var(--royal); border-color: var(--border-2); }
.btn--ghost:hover { border-color: var(--royal); color: var(--royal); }

.btn--light { background: var(--white); color: var(--royal); }
.btn--light:hover { color: var(--azure); box-shadow: var(--shadow-md); }

/* Inline SVGs carry no intrinsic size, so every arrow gets an explicit box.
   Without this a nowrap flex button shrinks the icon to nothing. */
.arrow { width: 1.05em; height: 1.05em; flex: 0 0 auto; }
.btn .arrow { transition: transform var(--dur) var(--ease); }
.btn:hover .arrow { transform: translateX(4px); }

/* --------------------------------------------------------------------------
   6. Header / nav
   -------------------------------------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--border);
  transition: box-shadow var(--dur) var(--ease);
}
.site-header.is-scrolled { box-shadow: var(--shadow-sm); }

/* Gold hairline under the header — the wheel's colour, used as trim. */
.site-header::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -3px;
  height: 3px;
  background: var(--gold);
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-3);
  min-height: 80px;
}

/* Brand lockup.
   Rotary requires clear space around the Masterbrand Signature equal to the
   cap-height of the "R" in the wordmark. At a 44px lockup that is ~14px.
   --logo-clear enforces it; nothing may encroach on that box. */
.brand {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  --logo-clear: 14px;
  padding: var(--logo-clear) var(--logo-clear) var(--logo-clear) 0;
}
.brand__logo { height: 44px; width: auto; display: block; }

@media (max-width: 420px) {
  .brand__logo { height: 36px; }
  .brand { --logo-clear: 11px; }
}

.nav-toggle {
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  padding: 0 10px;
  background: transparent;
  border: 1px solid var(--border-2);
  border-radius: 8px;
  cursor: pointer;
}
.nav-toggle span {
  display: block;
  height: 2px;
  background: var(--royal);
  border-radius: 2px;
  transition: transform var(--dur) var(--ease), opacity var(--dur) var(--ease);
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.site-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: var(--sp-3);
  align-items: center;
}

.site-nav a {
  color: var(--royal);
  text-decoration: none;
  font-size: var(--step--1);
  font-weight: 600;
  padding: 0.4em 0;
  position: relative;
}
.site-nav a::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 3px;
  background: var(--gold);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--dur) var(--ease);
}
.site-nav a:hover::after,
.site-nav a[aria-current="page"]::after { transform: scaleX(1); }

.site-nav .btn { padding: 0.62em 1.15em; }
.site-nav .btn::after { display: none; }
/* `.site-nav a` is more specific than `.btn--primary`, so without this the
   Contact button renders royal-on-royal and the label disappears. */
.site-nav .btn--primary,
.site-nav .btn--primary:hover,
.site-nav .btn--primary[aria-current="page"] { color: var(--white); }

@media (max-width: 940px) {
  .site-nav {
    position: fixed;
    inset: 83px 0 auto 0;
    background: var(--white);
    border-bottom: 1px solid var(--border);
    padding: var(--sp-3);
    transform: translateY(-8px);
    opacity: 0;
    visibility: hidden;
    transition: opacity var(--dur) var(--ease), transform var(--dur) var(--ease), visibility var(--dur);
    box-shadow: var(--shadow-md);
  }
  .site-nav.is-open { opacity: 1; visibility: visible; transform: translateY(0); }
  .site-nav ul { flex-direction: column; align-items: stretch; gap: 0; }
  .site-nav li { border-bottom: 1px solid var(--border); }
  .site-nav li:last-child { border-bottom: 0; padding-top: var(--sp-2); }
  .site-nav a { display: block; padding: 0.9em 0; font-size: var(--step-0); }
  .site-nav a::after { display: none; }
}

@media (min-width: 941px) {
  .nav-toggle { display: none; }
}

/* --------------------------------------------------------------------------
   7. Hero
   -------------------------------------------------------------------------- */
.hero {
  position: relative;
  background: var(--royal);
  color: var(--white);
  overflow: hidden;
  padding-block: var(--sp-7) var(--sp-6);
}
.hero h1 { color: var(--white); margin-bottom: var(--sp-3); }
.hero .lede { color: rgba(255,255,255,0.88); margin-bottom: var(--sp-4); }
.hero .eyebrow { color: var(--gold); }

/* Faint wheel-spoke geometry, well below the text. Decorative only —
   this is not the Mark of Excellence and carries no brand meaning. */
.hero::after {
  content: "";
  position: absolute;
  top: -25%;
  right: -10%;
  width: 46vw;
  height: 46vw;
  max-width: 620px;
  max-height: 620px;
  background: radial-gradient(circle at 40% 40%, rgba(0, 162, 224, 0.28), rgba(0, 162, 224, 0) 66%);
  border-radius: 50%;
  pointer-events: none;
}

.hero__inner { position: relative; z-index: 1; max-width: 58ch; }
.hero__actions { display: flex; flex-wrap: wrap; gap: var(--sp-2); }

/* Club photograph band, sitting directly under the hero.
   The board panorama is close to 4:1, so it belongs in a full-width strip
   rather than squeezed into a column where it reads as a sliver. */
.photo-band {
  background: var(--royal);
  padding-bottom: var(--sp-5);
}
.photo-band__frame {
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  border: 3px solid rgba(255, 255, 255, 0.16);
  /* Tall screens get the full panorama; narrow ones crop toward the centre
     so faces stay legible instead of shrinking to nothing. */
  max-height: 420px;
}
.photo-band__frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}
@media (max-width: 700px) {
  .photo-band__frame { max-height: 240px; }
}
.photo-band__caption {
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.66);
  margin-top: var(--sp-2);
  max-width: 70ch;
}

/* Interior page hero — lighter, shorter. */
.hero--page {
  background: var(--mist);
  color: var(--body);
  padding-block: var(--sp-6) var(--sp-5);
  border-bottom: 1px solid var(--border);
}
.hero--page::after {
  background: radial-gradient(circle at 40% 40%, rgba(23, 69, 143, 0.09), rgba(23, 69, 143, 0) 68%);
}
.hero--page h1 { font-size: var(--step-3); color: var(--royal); }
.hero--page .lede { color: var(--charcoal); }
.hero--page .eyebrow { color: var(--azure); }
.hero--page .hero__inner { max-width: 56ch; }

/* --------------------------------------------------------------------------
   8. Cards & grids
   -------------------------------------------------------------------------- */
.grid { display: grid; gap: var(--sp-3); }
.grid--2 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.grid--3 { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.grid--4 { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }

.grid--quick { grid-template-columns: 1fr; }
@media (min-width: 720px) { .grid--quick { grid-template-columns: 1fr 1fr; } }

.card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--sp-3);
  transition: transform var(--dur) var(--ease),
              box-shadow var(--dur) var(--ease),
              border-color var(--dur) var(--ease);
}
.card--hover:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: var(--powder);
}

.quicklink {
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: var(--body);
  min-height: 180px;
  position: relative;
  overflow: hidden;
}
/* Gold spine that fills on hover — the club's trim colour doing structural work. */
.quicklink::before {
  content: "";
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 4px;
  background: var(--gold);
  transform: scaleY(0);
  transform-origin: top;
  transition: transform var(--dur) var(--ease);
}
.quicklink:hover::before { transform: scaleY(1); }
.quicklink h3 { font-size: var(--step-1); margin-bottom: 0.35rem; }
.quicklink p { font-size: var(--step--1); color: var(--muted); }
.quicklink__go {
  margin-top: auto;
  padding-top: var(--sp-2);
  font-size: var(--step--1);
  font-weight: 700;
  color: var(--azure);
  display: inline-flex;
  gap: 0.4em;
  align-items: center;
}
.quicklink:hover .arrow { transform: translateX(4px); }
.quicklink .arrow { transition: transform var(--dur) var(--ease); }

/* Stat blocks */
.stat__num {
  font-size: var(--step-3);
  font-weight: 800;
  color: var(--royal);
  line-height: 1;
  display: block;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
}
.stat__label {
  font-size: var(--step--1);
  color: var(--muted);
  margin-top: 0.45rem;
  display: block;
}
.section--royal .stat__num { color: var(--gold); }
.section--royal .stat__label { color: rgba(255,255,255,0.72); }

/* --------------------------------------------------------------------------
   9. Areas of Focus accordion (Projects page)
   -------------------------------------------------------------------------- */
.aof-list { display: grid; gap: var(--sp-2); }

.aof {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--white);
  overflow: hidden;
  transition: border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}
.aof.is-open { border-color: var(--royal); box-shadow: var(--shadow-md); }

.aof__trigger {
  width: 100%;
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  text-align: left;
  background: transparent;
  border: 0;
  padding: var(--sp-3);
  cursor: pointer;
  font-family: inherit;
  color: var(--body);
  transition: background-color var(--dur) var(--ease);
}
.aof__trigger:hover { background: var(--mist); }

.aof__mark {
  flex: 0 0 auto;
  width: 46px;
  height: 46px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: var(--mist-2);
  color: var(--royal);
  transition: background-color var(--dur) var(--ease), color var(--dur) var(--ease);
}
.aof.is-open .aof__mark { background: var(--royal); color: var(--gold); }
.aof__mark svg { width: 23px; height: 23px; }

.aof__titles { flex: 1 1 auto; min-width: 0; }
.aof__title {
  font-size: var(--step-1);
  font-weight: 700;
  color: var(--royal);
  display: block;
  line-height: 1.25;
}
.aof__meta {
  font-size: var(--step--1);
  color: var(--muted);
  display: block;
  margin-top: 0.15rem;
}

.aof__count {
  flex: 0 0 auto;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--royal);
  background: var(--mist-2);
  border-radius: 999px;
  padding: 0.25em 0.75em;
  white-space: nowrap;
}
.aof__count--none { color: var(--muted); background: var(--mist); }

.aof__chev {
  flex: 0 0 auto;
  width: 24px; height: 24px;
  color: var(--pewter);
  transition: transform var(--dur) var(--ease), color var(--dur) var(--ease);
}
.aof.is-open .aof__chev { transform: rotate(180deg); color: var(--royal); }

.aof__panel {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows var(--dur) var(--ease);
}
.aof.is-open .aof__panel { grid-template-rows: 1fr; }
.aof__panel > div { overflow: hidden; }
.aof__body { padding: var(--sp-3); border-top: 1px solid var(--border); }

@media (max-width: 620px) {
  .aof__count { display: none; }
  .aof__trigger { gap: var(--sp-2); padding: var(--sp-2); }
}

/* Project entries inside an expanded area */
.project {
  display: grid;
  gap: 0.4rem;
  padding: var(--sp-3) 0;
  border-bottom: 1px solid var(--border);
}
.project:first-child { padding-top: 0; }
.project:last-child { border-bottom: 0; padding-bottom: 0; }
.project__title { font-weight: 700; font-size: var(--step-1); color: var(--royal); line-height: 1.25; }
.project__meta { font-size: var(--step--1); color: var(--muted); }
.project__body { font-family: var(--font-serif); font-size: 1rem; line-height: 1.7; }
.project__links { display: flex; flex-wrap: wrap; gap: var(--sp-2); margin-top: 0.4rem; }

.project__figures {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-3);
  margin-top: 0.3rem;
  padding: var(--sp-2) 0;
  border-block: 1px solid var(--border);
}
.figure__num {
  font-weight: 800;
  font-size: var(--step-1);
  color: var(--royal);
  display: block;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
}
.figure__label { font-size: 0.75rem; color: var(--muted); display: block; }

/* Link-out pill — Articulate Rise modules and external coverage */
.linkout {
  display: inline-flex;
  align-items: center;
  gap: 0.45em;
  font-size: var(--step--1);
  font-weight: 700;
  text-decoration: none;
  color: var(--azure);
  border: 2px solid var(--border);
  border-radius: 999px;
  padding: 0.35em 0.95em;
  transition: border-color var(--dur) var(--ease), background-color var(--dur) var(--ease);
}
.linkout:hover { border-color: var(--azure); background: var(--mist); }
.linkout svg { width: 13px; height: 13px; }

/* --------------------------------------------------------------------------
   10. Media page — article cards
   -------------------------------------------------------------------------- */
.filters {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-2);
  align-items: center;
  margin-bottom: var(--sp-3);
}

.chip {
  font-family: inherit;
  font-size: var(--step--1);
  font-weight: 600;
  padding: 0.45em 1em;
  border-radius: 999px;
  border: 2px solid var(--border);
  background: var(--white);
  color: var(--charcoal);
  cursor: pointer;
  transition: all var(--dur) var(--ease);
}
.chip:hover { border-color: var(--azure); color: var(--azure); }
.chip[aria-pressed="true"] {
  background: var(--royal);
  border-color: var(--royal);
  color: var(--white);
}

.article-card {
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: var(--body);
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}
.article-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }

.article-card__thumb {
  aspect-ratio: 16 / 10;
  background: var(--mist-2);
  display: grid;
  place-items: center;
  color: var(--pewter);
  font-size: 0.62rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-weight: 700;
  border-bottom: 1px solid var(--border);
  overflow: hidden;
}
.article-card__thumb img { width: 100%; height: 100%; object-fit: cover; }

.article-card__body { padding: var(--sp-3); display: flex; flex-direction: column; flex: 1; }

.article-card__source {
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--azure);
  margin-bottom: 0.5rem;
}
.article-card h3 { font-size: var(--step-1); margin-bottom: 0.5rem; }
.article-card__excerpt {
  font-family: var(--font-serif);
  font-size: 0.94rem;
  line-height: 1.65;
  color: var(--charcoal);
  margin-bottom: var(--sp-2);
}
.article-card__foot {
  margin-top: auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--sp-2);
  font-size: var(--step--1);
  color: var(--muted);
  padding-top: var(--sp-2);
  border-top: 1px solid var(--border);
}
.article-card__cta { color: var(--azure); font-weight: 700; display: inline-flex; gap: 0.35em; align-items: center; }
.article-card__cta--print { color: var(--muted); font-weight: 600; }
.article-card:hover .arrow { transform: translateX(4px); }
.article-card .arrow { transition: transform var(--dur) var(--ease); }

.article-card--feature { grid-column: 1 / -1; }
@media (min-width: 820px) {
  .article-card--feature { flex-direction: row; }
  .article-card--feature .article-card__thumb {
    flex: 0 0 46%;
    aspect-ratio: auto;
    border-bottom: 0;
    border-right: 1px solid var(--border);
  }
  .article-card--feature .article-card__body { padding: var(--sp-4); justify-content: center; }
  .article-card--feature h3 { font-size: var(--step-2); }
  .article-card--feature .article-card__excerpt { font-size: 1.05rem; }
}

.empty-state {
  grid-column: 1 / -1;
  text-align: center;
  padding: var(--sp-5);
  color: var(--muted);
  border: 1px dashed var(--border-2);
  border-radius: var(--radius-lg);
}

/* --------------------------------------------------------------------------
   11. Roster table (About page)
   -------------------------------------------------------------------------- */
.roster-controls {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-2);
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--sp-3);
}

.search-field { position: relative; flex: 1 1 280px; max-width: 420px; }
.search-field svg {
  position: absolute;
  left: 14px; top: 50%;
  transform: translateY(-50%);
  width: 17px; height: 17px;
  color: var(--pewter);
  pointer-events: none;
}

.input, .select, .textarea {
  width: 100%;
  font-family: inherit;
  font-size: var(--step-0);
  color: var(--body);
  background: var(--white);
  border: 2px solid var(--border);
  border-radius: 8px;
  padding: 0.68em 1em;
  transition: border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}
.input:focus, .select:focus, .textarea:focus {
  border-color: var(--azure);
  box-shadow: 0 0 0 3px var(--mist-2);
  outline: none;
}
.search-field .input { padding-left: 42px; }
.textarea { min-height: 150px; resize: vertical; }

.roster-count { font-size: var(--step--1); color: var(--muted); white-space: nowrap; }

.table-scroll {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--white);
}
/* Above phone size, cap the height so column headings stay in view across
   75 rows and the page doesn't run to several thousand pixels. Left uncapped
   on phones, where a nested scroll region fights the page scroll. */
@media (min-width: 700px) {
  .table-scroll { max-height: 68vh; overflow: auto; }
}

.roster {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--step--1);
  min-width: 560px;
}

.roster th {
  text-align: left;
  background: var(--mist);
  border-bottom: 2px solid var(--border);
  padding: 0;
  position: sticky;
  top: 0;
  z-index: 2;
}

.roster th button {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 0.4em;
  background: transparent;
  border: 0;
  font-family: inherit;
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--charcoal);
  padding: 0.95rem var(--sp-2);
  cursor: pointer;
  text-align: left;
  transition: color var(--dur) var(--ease);
}
.roster th button:hover { color: var(--azure); }
.roster th[aria-sort] button { color: var(--royal); }

.roster th .sort-ind { opacity: 0.3; transition: opacity var(--dur) var(--ease), transform var(--dur) var(--ease); }
.roster th[aria-sort="ascending"] .sort-ind { opacity: 1; }
.roster th[aria-sort="descending"] .sort-ind { opacity: 1; transform: rotate(180deg); }

.roster td { padding: 0.78rem var(--sp-2); border-bottom: 1px solid var(--border); vertical-align: top; }
.roster tbody tr:last-child td { border-bottom: 0; }
.roster tbody tr { transition: background-color 160ms var(--ease); }
.roster tbody tr:hover { background: var(--mist); }
.roster td:first-child { font-weight: 600; color: var(--royal); }

.roster mark { background: rgba(247, 168, 27, 0.35); color: inherit; border-radius: 2px; padding: 0 2px; }

.badge {
  display: inline-block;
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--royal);
  background: var(--mist-2);
  border-radius: 999px;
  padding: 0.2em 0.7em;
  margin-left: 0.35em;
  vertical-align: 1px;
}
.badge--gold { background: rgba(247, 168, 27, 0.22); }

/* Roster portraits */
.roster__avatar-col { width: 56px; padding-right: 0 !important; }

.avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  object-position: center top;
  display: block;
  background: var(--mist-2);
  border: 2px solid var(--white);
  box-shadow: 0 0 0 1px var(--border);
}
.avatar--initials {
  display: grid;
  place-items: center;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--royal);
  background: var(--mist-2);
  box-shadow: 0 0 0 1px var(--border);
}

/* Leadership cards */
.board-grid {
  display: grid;
  gap: var(--sp-3);
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
}

.person {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}
.person:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }

.person__photo {
  aspect-ratio: 1 / 1;
  width: 100%;
  object-fit: cover;
  object-position: center top;
  display: block;
  background: var(--mist-2);
  border-bottom: 3px solid var(--gold);
}
.person__body { padding: var(--sp-2) var(--sp-2) var(--sp-3); }
.person__name {
  font-weight: 700;
  color: var(--royal);
  font-size: 0.98rem;
  line-height: 1.25;
  display: block;
}
.person__role {
  font-size: 0.72rem;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--azure);
  display: block;
  margin-top: 0.3rem;
}

/* Compact strip of members, used on the Contact page */
.person--compact { border: 0; background: transparent; text-align: center; }
.person--compact:hover { transform: none; box-shadow: none; }
.person--compact .person__photo {
  border-radius: 50%;
  border: 3px solid var(--gold);
  margin-inline: auto;
  max-width: 118px;
}
.person--compact .person__body { padding: var(--sp-2) 0 0; }

/* Timeline (club history) */
.timeline { border-left: 3px solid var(--mist-2); padding-left: var(--sp-3); display: grid; gap: var(--sp-3); }
.timeline__item { position: relative; }
.timeline__item::before {
  content: "";
  position: absolute;
  left: calc(-1 * var(--sp-3) - 7.5px);
  top: 0.5em;
  width: 12px; height: 12px;
  border-radius: 50%;
  background: var(--gold);
  border: 3px solid var(--white);
  box-shadow: 0 0 0 1px var(--gold);
}
.timeline__year {
  font-size: var(--step-1);
  font-weight: 800;
  color: var(--royal);
  display: block;
  letter-spacing: -0.02em;
}

/* Award callout */
.award {
  display: flex;
  gap: var(--sp-3);
  align-items: flex-start;
  background: var(--royal);
  color: var(--white);
  border-radius: var(--radius-lg);
  padding: var(--sp-4);
}
.award__mark { flex: 0 0 auto; width: 44px; height: 44px; color: var(--gold); }
.award h3 { color: var(--white); font-size: var(--step-1); margin-bottom: 0.3rem; }
.award p { color: rgba(255,255,255,0.82); font-size: var(--step--1); }

/* --------------------------------------------------------------------------
   12. Contact
   -------------------------------------------------------------------------- */
.form-grid { display: grid; gap: var(--sp-3); }
@media (min-width: 620px) { .form-row { display: grid; grid-template-columns: 1fr 1fr; gap: var(--sp-3); } }

.field label {
  display: block;
  font-size: var(--step--1);
  font-weight: 700;
  color: var(--royal);
  margin-bottom: 0.4rem;
}
.field .hint { font-size: 0.78rem; color: var(--muted); font-weight: 400; }

.info-row {
  display: flex;
  gap: var(--sp-2);
  padding: var(--sp-2) 0;
  border-bottom: 1px solid var(--border);
}
.info-row:last-child { border-bottom: 0; }
.info-row__icon { flex: 0 0 auto; color: var(--azure); width: 20px; height: 20px; margin-top: 4px; }
.info-row__label {
  font-size: 0.72rem;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--muted);
  display: block;
  margin-bottom: 0.1rem;
}

.map {
  aspect-ratio: 16 / 11;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  background: var(--mist);
}
.map iframe { width: 100%; height: 100%; border: 0; display: block; }

/* Fellowship photography */
.photo-figure {
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-md);
}
.photo-figure img { width: 100%; height: auto; display: block; }
.photo-caption {
  font-size: 0.8rem;
  color: var(--muted);
  margin-top: 0.6rem;
}

/* Weekly programme list */
.programme { display: grid; gap: 0; }
.programme__row {
  display: grid;
  grid-template-columns: 58px 1fr;
  gap: var(--sp-2);
  align-items: baseline;
  padding: 0.8rem 0;
  border-bottom: 1px solid var(--border);
}
.programme__row:last-child { border-bottom: 0; }
.programme__date {
  font-weight: 800;
  color: var(--royal);
  font-size: 0.95rem;
  font-variant-numeric: tabular-nums;
}
.programme__date small {
  display: block;
  font-size: 0.62rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 700;
}
.programme__title { font-weight: 700; color: var(--royal); display: block; }
.programme__desc { font-size: var(--step--1); color: var(--muted); }

/* Direct email cards, used on Contact in place of a form. */
.mailcard{
  display:flex; gap:var(--sp-2); align-items:center;
  text-decoration:none; color:var(--body);
  background:var(--white);
  border:2px solid var(--border);
  border-radius:var(--radius);
  padding:var(--sp-2) var(--sp-3);
  margin-bottom:var(--sp-2);
  transition:border-color var(--dur) var(--ease),
             transform var(--dur) var(--ease),
             box-shadow var(--dur) var(--ease);
}
.mailcard:last-of-type{margin-bottom:0;}
.mailcard:hover{
  border-color:var(--azure);
  transform:translateY(-2px);
  box-shadow:var(--shadow-md);
}
.mailcard__icon{
  flex:0 0 auto; width:40px; height:40px; border-radius:50%;
  background:var(--mist-2); color:var(--royal);
  display:grid; place-items:center;
}
.mailcard__icon svg{width:20px;height:20px;}
.mailcard__body{min-width:0;}
.mailcard__addr{
  display:block; font-weight:700; color:var(--royal);
  font-size:var(--step-0); word-break:break-word;
}
.mailcard__what{
  display:block; font-size:var(--step--1); color:var(--muted);
  line-height:1.4; margin-top:.1rem;
}

/* --------------------------------------------------------------------------
   13. CTA band
   -------------------------------------------------------------------------- */
.cta-band {
  background: var(--royal);
  color: var(--white);
  border-radius: var(--radius-lg);
  padding: var(--sp-5) var(--sp-4);
  text-align: center;
  position: relative;
  overflow: hidden;
}
.cta-band::before {
  content: "";
  position: absolute;
  left: 0; right: 0; top: 0;
  height: 4px;
  background: var(--gold);
}
.cta-band h2 { color: var(--white); }
.cta-band p { color: rgba(255, 255, 255, 0.8); max-width: 56ch; margin-inline: auto; font-family: var(--font-serif); }
.cta-band .btn { margin-top: var(--sp-3); }

/* --------------------------------------------------------------------------
   14. Footer
   -------------------------------------------------------------------------- */
.site-footer {
  background: var(--royal);
  color: rgba(255,255,255,0.78);
  padding-block: var(--sp-5) var(--sp-3);
  margin-top: var(--sp-6);
  border-top: 4px solid var(--gold);
}
.site-footer__grid {
  display: grid;
  gap: var(--sp-4);
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  margin-bottom: var(--sp-4);
}
.site-footer h4 {
  font-size: 0.72rem;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--gold);
  margin-bottom: var(--sp-2);
}
.site-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.55rem; }
.site-footer a { color: rgba(255,255,255,0.82); text-decoration: none; font-size: var(--step--1); }
.site-footer a:hover { color: var(--white); text-decoration: underline; }
.site-footer p { font-size: var(--step--1); color: rgba(255,255,255,0.7); }

.site-footer__bar {
  border-top: 1px solid rgba(255,255,255,0.18);
  padding-top: var(--sp-3);
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-2);
  justify-content: space-between;
  font-size: 0.76rem;
  color: rgba(255,255,255,0.6);
}

/* --------------------------------------------------------------------------
   15. Motion
   -------------------------------------------------------------------------- */
/* The hidden starting state is scoped to .js, which the inline snippet in each
   <head> adds. If JavaScript is off or errors before the observer runs, every
   [data-reveal] block stays plainly visible. Content must never depend on an
   animation having fired. */
.js [data-reveal] {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 620ms var(--ease), transform 620ms var(--ease);
  transition-delay: var(--reveal-delay, 0ms);
}
.js [data-reveal].is-revealed { opacity: 1; transform: none; }

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

/* --------------------------------------------------------------------------
   16. Print
   -------------------------------------------------------------------------- */
@media print {
  .site-header, .site-footer, .nav-toggle, .filters, .roster-controls { display: none !important; }
  .aof__panel { grid-template-rows: 1fr !important; }
  .table-scroll { max-height: none; overflow: visible; }
  body { font-size: 11pt; }
}
