/* Rotary Club of Makati Central
   Brand: Rotary Royal Blue + Gold. Display: Big Shoulders Display. Body: Open Sans. */

:root {
  --blue: #17458F;
  --navy: #0A2150;
  --navy-2: #0E2A5F;
  --gold: #F7A81B;
  --orange: #FF7600;
  --azure: #0067C8;
  --paper: #FFFFFF;
  --mist: #EEF2F8;
  --ink: #0F1F3D;
  --muted: #4E5E7A;
  --line-dark: rgba(255, 255, 255, 0.09);
  --line-light: rgba(15, 31, 61, 0.08);
  --on-dark: #FFFFFF;
  --on-dark-muted: rgba(255, 255, 255, 0.74);

  --display: "Big Shoulders Display", "Arial Narrow", sans-serif;
  --body: "Open Sans", "Segoe UI", Arial, sans-serif;

  --gutter: clamp(16px, 4vw, 56px);
  --max: 1320px;
  --header-h: 76px;
  --radius-s: 3px;
}

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

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--body);
  font-size: 1rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { max-width: 100%; display: block; }
a { color: inherit; }
button { font: inherit; }

h1, h2, h3, h4 {
  font-family: var(--display);
  font-weight: 800;
  line-height: 0.95;
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 0.005em;
}

p { margin: 0 0 1em; }

:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 3px;
}

.skip-link {
  position: absolute;
  left: 16px;
  top: -60px;
  z-index: 200;
  background: var(--gold);
  color: var(--navy);
  padding: 10px 16px;
  font-weight: 700;
  border-radius: var(--radius-s);
}
.skip-link:focus { top: 16px; }

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

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

/* ---------- Column lines (from the reference) ---------- */
.columns-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  background-image: linear-gradient(to right, var(--line-dark) 1px, transparent 1px);
  background-size: calc(100% / 7) 100%;
  background-position: calc(100% / 7) 0;
}
.light .columns-bg,
.columns-bg.on-light {
  background-image: linear-gradient(to right, var(--line-light) 1px, transparent 1px);
}
@media (max-width: 720px) {
  .columns-bg { background-size: 25% 100%; background-position: 25% 0; }
}

/* ---------- Placeholder images ---------- */
.ph {
  position: relative;
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  background-color: #1B3466;
  background-image: repeating-linear-gradient(135deg, rgba(255,255,255,0.05) 0 2px, transparent 2px 14px);
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.8rem;
  text-align: center;
  padding: 12px;
}
.ph span {
  border: 1px dashed rgba(255, 255, 255, 0.35);
  padding: 6px 10px;
  border-radius: var(--radius-s);
}
.light .ph, .ph.on-light {
  background-color: #D9E1EE;
  background-image: repeating-linear-gradient(135deg, rgba(23,69,143,0.07) 0 2px, transparent 2px 14px);
  color: var(--muted);
}
.light .ph span, .ph.on-light span { border-color: rgba(23, 69, 143, 0.3); }

.media { overflow: hidden; border-radius: var(--radius-s); background: #1B3466; }
.media img { width: 100%; height: 100%; object-fit: cover; }

/* ---------- Header ---------- */
.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100;
  height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 var(--gutter);
  color: var(--on-dark);
  transition: background-color 0.3s, color 0.3s, box-shadow 0.3s;
}
.site-header.is-solid {
  background: rgba(10, 33, 80, 0.94);
  backdrop-filter: blur(8px);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  line-height: 1.05;
}
.brand img { height: 44px; width: auto; }
.brand-mark {
  width: 34px; height: 34px;
  border-radius: 50%;
  border: 3px solid var(--gold);
  flex: none;
}
.brand-text { display: flex; flex-direction: column; }
.brand-text strong {
  font-family: var(--body);
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: -0.01em;
}
.brand-text small { font-size: 0.78rem; opacity: 0.85; }

.header-right { display: flex; align-items: center; gap: 22px; }
.header-cta {
  font-weight: 600;
  font-size: 0.9rem;
  text-decoration: none;
  border-bottom: 2px solid var(--gold);
  padding-bottom: 2px;
}
@media (max-width: 560px) { .header-cta { display: none; } }

.menu-btn {
  width: 44px; height: 44px;
  border: 0;
  border-radius: var(--radius-s);
  background: var(--gold);
  color: var(--navy);
  display: grid;
  place-items: center;
  cursor: pointer;
  position: relative;
  z-index: 120;
}
.menu-btn i {
  display: block;
  width: 18px; height: 2px;
  background: currentColor;
  position: absolute;
  transition: transform 0.3s;
}
.menu-btn i:first-child { transform: translateY(-4px); }
.menu-btn i:last-child { transform: translateY(4px); }
.menu-open .menu-btn i:first-child { transform: rotate(45deg); }
.menu-open .menu-btn i:last-child { transform: rotate(-45deg); }

/* ---------- Menu overlay ---------- */
.menu {
  position: fixed;
  inset: 0;
  z-index: 110;
  background: var(--navy);
  color: var(--on-dark);
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  align-items: center;
  padding: calc(var(--header-h) + 24px) var(--gutter) 40px;
  clip-path: inset(0 0 100% 0);
  visibility: hidden;
  transition: clip-path 0.55s cubic-bezier(.7,0,.2,1), visibility 0s linear 0.55s;
}
.menu-open .menu {
  clip-path: inset(0 0 0 0);
  visibility: visible;
  transition: clip-path 0.55s cubic-bezier(.7,0,.2,1), visibility 0s;
}
.menu-open { overflow: hidden; }
.menu-open .site-header { background: transparent; backdrop-filter: none; }

.menu nav ol { list-style: none; margin: 0; padding: 0; counter-reset: m; }
.menu nav li { counter-increment: m; }
.menu nav a {
  display: inline-flex;
  align-items: baseline;
  gap: 18px;
  font-family: var(--display);
  font-weight: 800;
  text-transform: uppercase;
  font-size: clamp(2.6rem, 7.5vh, 5.4rem);
  line-height: 1.02;
  text-decoration: none;
  color: var(--on-dark);
}
.menu nav a:hover, .menu nav a[aria-current="page"] { color: var(--gold); }
.menu-aside { border-left: 1px solid var(--line-dark); padding-left: 40px; color: var(--on-dark-muted); }
.menu-aside h2 { font-size: 1.6rem; color: var(--on-dark); margin-bottom: 10px; }
.menu-aside p { margin-bottom: 26px; }
.menu-aside a { color: var(--on-dark); }
@media (max-width: 800px) {
  .menu { grid-template-columns: 1fr; align-content: start; overflow-y: auto; }
  .menu-aside { border-left: 0; padding-left: 0; border-top: 1px solid var(--line-dark); padding-top: 24px; margin-top: 24px; }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 13px 22px;
  border-radius: var(--radius-s);
  border: 2px solid transparent;
  font-family: var(--display);
  font-weight: 800;
  font-size: 1.15rem;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  text-decoration: none;
  cursor: pointer;
  line-height: 1;
}
.btn-gold { background: var(--gold); color: var(--navy); }
.btn-gold:hover { background: #FFBE45; }
.btn-ghost { border-color: currentColor; color: inherit; background: transparent; }
.btn-ghost:hover { background: rgba(255,255,255,0.08); }
.light .btn-ghost:hover { background: rgba(23,69,143,0.06); }
.btn-blue { background: var(--blue); color: #fff; }
.btn-blue:hover { background: var(--azure); }

.text-link {
  font-weight: 700;
  text-decoration: none;
  border-bottom: 2px solid var(--gold);
  padding-bottom: 2px;
}
.text-link:hover { color: var(--azure); }
.dark .text-link:hover { color: var(--gold); }

/* ---------- Section shells ---------- */
.dark { background: var(--navy); color: var(--on-dark); position: relative; }
.light { background: var(--paper); color: var(--ink); position: relative; }
.mist { background: var(--mist); color: var(--ink); position: relative; }
.blue { background: var(--blue); color: var(--on-dark); position: relative; }

.section { padding: clamp(72px, 11vw, 140px) 0; position: relative; }
.section > .wrap { position: relative; z-index: 2; }

.section-head {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 24px;
  margin-bottom: clamp(32px, 5vw, 56px);
  flex-wrap: wrap;
}
.section-title { font-size: clamp(2.6rem, 6vw, 4.8rem); }
.section-title-sub { display: block; margin-top: 0.3em; font-size: 0.42em; color: var(--blue); }
.section-sub { max-width: 52ch; color: var(--muted); margin: 14px 0 0; }
.dark .section-sub, .blue .section-sub { color: var(--on-dark-muted); }

/* ---------- Home hero ---------- */
.hero {
  position: relative;
  min-height: 100svh;
  min-height: max(100svh, 640px);
  background: var(--navy);
  color: var(--on-dark);
  overflow: hidden;
  isolation: isolate;
}
.hero-photo {
  position: absolute;
  inset: 0;
  z-index: 0;
}
.hero-photo img { width: 100%; height: 100%; object-fit: cover; filter: grayscale(1) contrast(1.05); }
.hero-photo .ph { background-color: #12305F; }
.hero-photo::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(10,33,80,0.55) 0%, rgba(10,33,80,0.15) 35%, rgba(10,33,80,0.25) 60%, rgba(10,33,80,0.92) 100%),
    linear-gradient(90deg, rgba(10,33,80,0.6) 0%, transparent 35%, transparent 70%, rgba(10,33,80,0.6) 100%);
  mix-blend-mode: normal;
}
.hero-photo.has-img::before {
  /* blue duotone over the grayscale photo */
  content: "";
  position: absolute;
  inset: 0;
  background: var(--blue);
  mix-blend-mode: multiply;
  opacity: 0.55;
  z-index: 1;
}
.hero-photo .ph span { position: absolute; top: calc(var(--header-h) + 16px); left: 50%; transform: translateX(-50%); }
@media (max-width: 900px) { .hero-photo .ph span { display: none; } }

.hero-inner {
  position: relative;
  z-index: 2;
  min-height: inherit;
  display: grid;
  grid-template-columns: 1fr 2fr 1fr;
  grid-template-rows: 1fr auto;
  padding: calc(var(--header-h) + 40px) var(--gutter) clamp(28px, 5vh, 52px);
}

.hero-stats {
  grid-column: 1;
  grid-row: 1;
  align-self: center;
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 22px;
}
.hero-stats strong {
  display: block;
  font-family: var(--display);
  font-weight: 800;
  font-size: 2.4rem;
  line-height: 1;
}
.hero-stats span { font-size: 0.85rem; color: var(--on-dark-muted); }

.hero-number {
  grid-column: 2;
  grid-row: 1;
  /* Top of the hero, in the open space above the members in the photo */
  align-self: start;
  margin-top: -28px;
  justify-self: center;
  text-align: center;
  pointer-events: none;
}
.hero-number b {
  display: block;
  font-family: var(--display);
  font-weight: 900;
  font-size: clamp(8rem, 24vw, 22rem);
  line-height: 0.8;
  letter-spacing: -0.02em;
  color: var(--paper);
}
.hero-number img {
  /* The logo's lettering is dark navy, so it sits on a white badge to stay readable */
  display: block;
  width: min(13vw, 21svh, 230px);
  min-width: 150px;
  aspect-ratio: 1;
  object-fit: contain;
  margin: 0 auto;
  padding: 4%;
  /* Semi-transparent so the header photo shows through; the blur keeps the navy lettering readable */
  background: rgba(255, 255, 255, 0.38);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
  border-radius: 6px;
  box-shadow: 0 24px 60px rgba(4, 14, 36, 0.55);
  animation: rise 1.1s cubic-bezier(.2,.7,.1,1) both;
}
.hero-number small {
  display: block;
  margin-top: 18px;
  font-size: 0.9rem;
  color: var(--on-dark-muted);
}
.hero-number small em { font-style: normal; color: var(--gold); font-weight: 700; }

.hero-facts {
  grid-column: 3;
  grid-row: 1;
  align-self: center;
  justify-self: end;
  text-align: right;
  display: grid;
  gap: 22px;
  font-size: 0.88rem;
  max-width: 230px;
}
.hero-facts p { margin: 0; color: var(--on-dark-muted); }
.hero-facts strong { display: block; color: var(--on-dark); }
.hero-facts .motto {
  font-family: var(--display);
  font-weight: 800;
  font-size: 1.5rem;
  line-height: 1;
  text-transform: uppercase;
  color: var(--gold);
}

.hero-name {
  grid-column: 1 / span 2;
  grid-row: 2;
  align-self: end;
  max-width: 560px;
}
.hero-name h1 {
  font-size: clamp(3.4rem, 8vw, 7rem);
  line-height: 0.86;
  margin-bottom: 18px;
}
.hero-name h1 span { display: block; font-size: 0.42em; font-weight: 700; letter-spacing: 0.01em; color: var(--on-dark-muted); margin-bottom: 4px; }
.hero-name p { color: var(--on-dark-muted); max-width: 46ch; font-size: 0.95rem; margin: 0; }

.hero-next {
  grid-column: 3;
  grid-row: 2;
  align-self: end;
  justify-self: end;
  text-align: right;
}
.hero-next span { display: block; font-size: 0.85rem; color: var(--on-dark-muted); }
.hero-next a {
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(1.6rem, 2.6vw, 2.3rem);
  text-transform: uppercase;
  text-decoration: none;
  line-height: 1.05;
  display: inline-block;
}
.hero-next a:hover { color: var(--gold); }

/* One orchestrated load moment */
.hero-number b { animation: rise 1.1s cubic-bezier(.2,.7,.1,1) both; }
.hero-stats, .hero-facts, .hero-name, .hero-next { animation: fade 0.9s ease 0.45s both; }
@keyframes rise { from { transform: translateY(18%); opacity: 0; clip-path: inset(0 0 100% 0); } to { transform: none; opacity: 1; clip-path: inset(0 0 0 0); } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }

@media (max-width: 900px) {
  .hero-inner {
    grid-template-columns: 1fr 1fr;
    grid-template-rows: auto auto auto auto;
    gap: 36px 20px;
    padding-top: calc(var(--header-h) + 28px);
  }
  .hero-number { grid-column: 1 / -1; grid-row: 1; margin-top: 0; }
  .hero-stats { grid-column: 1; grid-row: 2; align-self: start; }
  .hero-facts { grid-column: 2; grid-row: 2; align-self: start; }
  .hero-name { grid-column: 1 / -1; grid-row: 3; }
  .hero-next { grid-column: 1 / -1; grid-row: 4; justify-self: start; text-align: left; }
}

/* ---------- Manifesto ---------- */
.manifesto {
  position: relative;
  min-height: 100svh;
  display: grid;
  align-items: center;
  padding: clamp(96px, 14vw, 180px) 0;
  overflow: hidden;
}
.manifesto-text {
  position: relative;
  z-index: 2;
  max-width: min(900px, 58vw);
  margin: 0 auto;
  padding: 0 var(--gutter);
  text-align: center;
  font-family: var(--display);
  font-weight: 800;
  text-transform: uppercase;
  font-size: clamp(2.1rem, 4.6vw, 4rem);
  line-height: 1.02;
  color: var(--blue);
}
/* Group photo below the statement */
.manifesto-photo {
  position: relative;
  z-index: 2;
  width: min(1100px, calc(100% - 2 * var(--gutter)));
  margin: clamp(48px, 7vw, 88px) auto 0;
  aspect-ratio: 2048 / 881;
  box-shadow: 0 18px 44px rgba(10, 33, 80, 0.16);
}
.manifesto-text p { margin: 0; }
.manifesto-text.is-long { font-size: clamp(1.45rem, 2.4vw, 2.2rem); line-height: 1.08; display: grid; gap: 0.7em; }
.manifesto-text.is-long p:last-child { color: var(--navy); font-size: 1.15em; }
.manifesto-text mark {
  background: linear-gradient(transparent 12%, var(--gold) 12%, var(--gold) 92%, transparent 92%);
  color: var(--navy);
  padding: 0 0.08em;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}
.manifesto-float {
  position: absolute;
  z-index: 1;
  width: clamp(130px, 14vw, 230px);
  aspect-ratio: 3 / 2;
  will-change: transform;
}
.manifesto-float.left { left: 4%; top: 46%; }
.manifesto-float.right { right: 4%; top: 30%; aspect-ratio: 1; width: clamp(120px, 12vw, 200px); }
@media (max-width: 900px) {
  .manifesto { align-content: center; }
  .manifesto-text { max-width: none; }
  .manifesto-float { position: relative; left: auto !important; right: auto !important; top: auto !important; }
  .manifesto-floats { display: flex; gap: 16px; justify-content: center; margin-top: 48px; position: relative; z-index: 2; }
}

/* ---------- Project story (sticky scroll) ---------- */
.story { position: relative; background: var(--navy); color: var(--on-dark); }
.story-track { position: relative; }
.story-stage {
  position: sticky;
  top: 0;
  height: 100svh;
  overflow: hidden;
  display: grid;
  grid-template-columns: 1fr minmax(240px, 340px) 1fr;
  align-items: center;
  gap: clamp(24px, 4vw, 64px);
  padding: var(--header-h) var(--gutter) 90px;
}
.story-title { position: relative; height: 3.4em; font-size: clamp(2.6rem, 5.4vw, 5rem); }
.story-title h3 {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  font-size: 1em;
  line-height: 0.92;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.45s, transform 0.45s;
}
.story-title h3 small {
  display: block;
  font-family: var(--body);
  font-size: 0.8rem;
  text-transform: none;
  font-weight: 600;
  color: var(--gold);
  letter-spacing: 0;
  margin-bottom: 10px;
}
.story-title h3 > span { display: block; }

.story-images {
  position: relative;
  height: 100%;
  display: flex;
  align-items: center;
}
.story-reel {
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  display: grid;
  gap: 40px;
  transition: transform 0.7s cubic-bezier(.6,0,.2,1);
}
.story-reel .media {
  aspect-ratio: 1;
  opacity: 0.3;
  filter: grayscale(1);
  transition: opacity 0.5s, filter 0.5s;
}
.story-reel .media.is-active { opacity: 1; filter: none; }

.story-copy { position: relative; min-height: 15em; font-size: 0.92rem; color: var(--on-dark-muted); max-width: 44ch; }
.story-copy > div {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.45s;
}
.story-copy dl { display: flex; gap: 28px; margin: 6px 0 0; }
.story-copy dt { order: 2; font-size: 0.78rem; }
.story-copy dd { margin: 0; font-family: var(--display); font-weight: 800; font-size: 2rem; color: var(--on-dark); line-height: 1; }
.story-copy dl > div { display: flex; flex-direction: column; }

.story-title h3.is-active, .story-copy > div.is-active { opacity: 1; transform: none; }
.story-copy > div.is-active { pointer-events: auto; }
.story-copy > div:not(.is-active), .story-title h3:not(.is-active) { pointer-events: none; }

.story-foot {
  position: absolute;
  left: var(--gutter);
  right: var(--gutter);
  bottom: 28px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.story-skip { padding: 9px 14px; font-size: 1rem; }
.story-count {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--display);
  font-weight: 800;
  font-size: 1.7rem;
}
.story-count::before {
  content: "";
  width: 16px; height: 16px;
  background:
    linear-gradient(var(--gold), var(--gold)) 0 0 / 8px 8px no-repeat,
    linear-gradient(var(--gold), var(--gold)) 8px 8px / 8px 8px no-repeat;
}
.story-all { color: var(--on-dark); font-size: 0.9rem; }

@media (max-width: 900px) {
  .story-track { height: auto !important; }
  .story-stage { position: relative; height: auto; display: block; padding: 80px var(--gutter); }
  .story-stage > .story-title, .story-stage > .story-images, .story-stage > .story-copy { display: none; }
  .story-foot { display: none; }
  .story-mobile { display: grid !important; gap: 56px; }
}
.story-mobile { display: none; }
.story-mobile article .media { aspect-ratio: 4 / 3; margin: 18px 0; }
.story-mobile h3 { font-size: 2.6rem; }
.story-mobile h3 small { display: block; font-family: var(--body); font-size: 0.8rem; text-transform: none; color: var(--gold); margin-bottom: 8px; font-weight: 600; }
.story-mobile p { color: var(--on-dark-muted); font-size: 0.95rem; }

/* ---------- Events list ---------- */
.event-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line-light); }
.dark .event-list { border-color: var(--line-dark); }
.event {
  display: grid;
  grid-template-columns: 110px 1fr auto;
  gap: clamp(16px, 3vw, 40px);
  align-items: center;
  padding: 26px 0;
  border-bottom: 1px solid var(--line-light);
}
.dark .event { border-color: var(--line-dark); }
.event-date {
  font-family: var(--display);
  font-weight: 800;
  text-transform: uppercase;
  line-height: 0.9;
}
.event-date b { display: block; font-size: 3.4rem; color: var(--blue); }
.dark .event-date b { color: var(--gold); }
.event-date span { font-size: 1.1rem; }
.event h3 { font-size: clamp(1.5rem, 2.6vw, 2.1rem); margin-bottom: 6px; }
.event-meta { font-size: 0.88rem; color: var(--muted); margin: 0; }
.dark .event-meta { color: var(--on-dark-muted); }
.event-desc { margin: 8px 0 0; max-width: 64ch; font-size: 0.95rem; }
.event-type {
  font-size: 0.8rem;
  font-weight: 700;
  padding: 5px 10px;
  border-radius: 99px;
  background: var(--mist);
  color: var(--blue);
  white-space: nowrap;
}
.dark .event-type { background: rgba(255,255,255,0.08); color: var(--on-dark); }
.event-type[data-type="Service"] { background: var(--gold); color: var(--navy); }
.event.is-past { opacity: 0.75; }
@media (max-width: 640px) {
  .event { grid-template-columns: 76px 1fr; }
  .event-date b { font-size: 2.6rem; }
  .event-type { grid-column: 2; justify-self: start; }
}

/* ---------- Member strip (home) ---------- */
.strip {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: clamp(180px, 20vw, 250px);
  gap: 20px;
  overflow-x: auto;
  padding-bottom: 16px;
  scroll-snap-type: x mandatory;
  scrollbar-width: thin;
}
.strip > * { scroll-snap-align: start; }

/* ---------- Member portrait ---------- */
.person {
  text-align: left;
  background: none;
  border: 0;
  padding: 0;
  color: inherit;
  cursor: pointer;
  width: 100%;
  /* Buttons centre their content vertically; stack from the top so photos line up across a row */
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: stretch;
}
.person .media { aspect-ratio: 4 / 5; margin-bottom: 14px; flex: none; }
.person .media img, .person .ph { transition: transform 0.5s; }
.person:hover .media img, .person:hover .ph { transform: scale(1.03); }
.person h3 { font-size: 1.55rem; line-height: 1; margin-bottom: 4px; }
.person-role { display: inline-block; font-weight: 700; font-size: 0.85rem; color: var(--blue); }
.dark .person-role { color: var(--gold); }
.person-meta { display: block; font-size: 0.82rem; color: var(--muted); margin-top: 2px; }
.dark .person-meta { color: var(--on-dark-muted); }

/* ---------- Join CTA band ---------- */
.cta-band { overflow: hidden; }
.cta-band .wrap { display: grid; grid-template-columns: 1.4fr 1fr; gap: 40px; align-items: end; }
.cta-band h2 { font-size: clamp(3rem, 8vw, 7rem); line-height: 0.86; }
.cta-band p { color: var(--on-dark-muted); max-width: 46ch; }
.cta-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 22px; }
@media (max-width: 800px) { .cta-band .wrap { grid-template-columns: 1fr; } }

/* ---------- Footer ---------- */
.site-footer { background: var(--navy); color: var(--on-dark-muted); padding: 72px 0 32px; font-size: 0.9rem; position: relative; }
.site-footer .wrap { position: relative; z-index: 2; }
.footer-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1fr; gap: 40px; }
.site-footer h2 { font-size: 1.3rem; color: var(--on-dark); margin-bottom: 14px; }
.site-footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.site-footer a { text-decoration: none; }
.site-footer a:hover { color: var(--gold); }
.footer-big {
  font-family: var(--display);
  font-weight: 900;
  text-transform: uppercase;
  color: var(--on-dark);
  font-size: clamp(3rem, 12.5vw, 11.5rem);
  line-height: 0.8;
  margin: 64px 0 28px;
  letter-spacing: -0.01em;
  white-space: nowrap;
}
.footer-base { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; border-top: 1px solid var(--line-dark); padding-top: 22px; font-size: 0.8rem; }
@media (max-width: 900px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .footer-grid { grid-template-columns: 1fr; } }

/* ---------- Inner page hero ---------- */
.page-hero {
  position: relative;
  background: var(--navy);
  color: var(--on-dark);
  padding: calc(var(--header-h) + clamp(64px, 12vw, 150px)) 0 clamp(48px, 7vw, 88px);
  overflow: hidden;
}
.page-hero .wrap { position: relative; z-index: 2; display: grid; grid-template-columns: 1.6fr 1fr; gap: 40px; align-items: end; }
.page-hero h1 { font-size: clamp(4rem, 13vw, 11rem); line-height: 0.82; }
.page-hero p { color: var(--on-dark-muted); margin: 0; max-width: 44ch; }
.page-hero .crumb { display: block; font-size: 0.85rem; color: var(--gold); margin-bottom: 14px; font-weight: 600; text-decoration: none; }
@media (max-width: 800px) { .page-hero .wrap { grid-template-columns: 1fr; } }

/* ---------- About ---------- */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(32px, 6vw, 96px); align-items: start; }
.split .media { aspect-ratio: 4 / 5; }
.lead { font-size: clamp(1.15rem, 1.8vw, 1.4rem); line-height: 1.5; color: var(--ink); max-width: 36ch; }
.prose { max-width: 62ch; }
.prose p { color: var(--muted); }
@media (max-width: 800px) { .split { grid-template-columns: 1fr; } }

.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li {
  display: grid;
  grid-template-columns: minmax(120px, 0.6fr) 1fr 1.6fr;
  gap: 24px;
  padding: 30px 0;
  border-top: 1px solid var(--line-dark);
  align-items: baseline;
}
.timeline li:last-child { border-bottom: 1px solid var(--line-dark); }
.timeline .yr { font-family: var(--display); font-weight: 900; font-size: clamp(2.4rem, 5vw, 4rem); color: var(--gold); line-height: 0.9; }
.timeline h3 { font-size: 1.8rem; }
.timeline p { margin: 0; color: var(--on-dark-muted); }
@media (max-width: 700px) { .timeline li { grid-template-columns: 1fr; gap: 8px; } }

.fourway { list-style: none; margin: 0; padding: 0; counter-reset: q; }
.fourway li {
  counter-increment: q;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: clamp(16px, 4vw, 48px);
  align-items: center;
  padding: 22px 0;
  border-bottom: 1px solid var(--line-light);
}
.fourway li::before {
  content: counter(q);
  font-family: var(--display);
  font-weight: 900;
  font-size: clamp(3rem, 6vw, 5rem);
  line-height: 0.8;
  color: var(--gold);
  -webkit-text-stroke: 0;
  width: 1.1ch;
}
.fourway p {
  margin: 0;
  font-family: var(--display);
  font-weight: 800;
  text-transform: uppercase;
  font-size: clamp(1.6rem, 3.6vw, 3rem);
  line-height: 1;
  color: var(--blue);
}

.facts-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--line-dark); border: 1px solid var(--line-dark); }
.facts-row > div { background: var(--blue); padding: 28px 24px; }
.facts-row strong { display: block; font-family: var(--display); font-weight: 900; font-size: 2.6rem; line-height: 1; color: var(--on-dark); }
.facts-row span { font-size: 0.85rem; color: var(--on-dark-muted); }
.facts-row > div { min-width: 0; overflow-wrap: anywhere; }
@media (max-width: 800px) { .facts-row { grid-template-columns: 1fr 1fr; } .facts-row strong { font-size: 2rem; } }

/* ---------- Filters ---------- */
.filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 40px; align-items: center; }
.chip {
  border: 1.5px solid var(--line-light);
  border-color: rgba(15,31,61,0.18);
  background: transparent;
  color: var(--ink);
  border-radius: 99px;
  padding: 8px 14px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
}
.chip:hover { border-color: var(--blue); }
.chip[aria-pressed="true"] { background: var(--blue); border-color: var(--blue); color: #fff; }

.search {
  flex: 1 1 260px;
  max-width: 360px;
  border: 1.5px solid rgba(15,31,61,0.18);
  border-radius: var(--radius-s);
  padding: 10px 14px;
  font: inherit;
  font-size: 0.95rem;
  color: var(--ink);
  background: #fff;
}
.search:focus { border-color: var(--blue); outline: none; box-shadow: 0 0 0 3px rgba(23,69,143,0.2); }

.empty { padding: 40px 0; color: var(--muted); }

/* ---------- Projects page ---------- */
.project-list { display: grid; gap: clamp(56px, 8vw, 110px); }
.project {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: clamp(28px, 5vw, 80px);
  align-items: center;
}
.project:nth-child(even) .media { order: 2; }
.project .media { aspect-ratio: 4 / 3; }
.project-area { display: inline-block; font-weight: 700; font-size: 0.85rem; color: var(--blue); margin-bottom: 12px; }
.project h2 { font-size: clamp(2.4rem, 5vw, 4.2rem); margin-bottom: 14px; }
.project-meta { font-size: 0.88rem; color: var(--muted); margin-bottom: 16px; }
.project-meta b { color: var(--ink); }
.project p.summary { max-width: 52ch; }
.project-more { max-width: 60ch; margin-top: 4px; }
@media (min-width: 801px) {
  .project:has(.project-more[open]) > .media { align-self: start; position: sticky; top: calc(var(--header-h) + 24px); }
}
.project-more summary {
  display: inline-block;
  cursor: pointer;
  list-style: none;
  font-weight: 700;
  font-size: 0.92rem;
  color: var(--blue);
  border-bottom: 2px solid var(--gold);
  margin-bottom: 14px;
}
.project-more summary::-webkit-details-marker { display: none; }
.project-more summary::after { content: " +"; }
.project-more[open] summary::after { content: " \2212"; }
.project-more h3 { font-size: 1.5rem; margin: 22px 0 12px; }
.milestones { list-style: none; margin: 0; padding: 0; font-size: 0.9rem; }
.milestones li { display: grid; grid-template-columns: 52px 1fr; gap: 12px; padding: 8px 0; border-top: 1px solid var(--line-light); }
.milestones b { font-family: var(--display); font-weight: 800; font-size: 1.15rem; color: var(--blue); line-height: 1.3; }
.impact { display: flex; flex-wrap: wrap; gap: 36px; margin: 22px 0 0; padding-top: 20px; border-top: 1px solid var(--line-light); }
.impact > div { display: flex; flex-direction: column; }
.impact dt { order: 2; font-size: 0.82rem; color: var(--muted); }
.impact dd { margin: 0; font-family: var(--display); font-weight: 900; font-size: 2.6rem; line-height: 1; color: var(--blue); }
.status { display: inline-block; font-size: 0.75rem; font-weight: 700; padding: 3px 9px; border-radius: 99px; margin-left: 8px; vertical-align: middle; background: var(--mist); color: var(--blue); }
.status[data-status="Ongoing"] { background: var(--gold); color: var(--navy); }
@media (max-width: 800px) {
  .project { grid-template-columns: 1fr; }
  .project:nth-child(even) .media { order: 0; }
}

/* ---------- Events page ---------- */
.meeting-card { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1px; background: rgba(255,255,255,0.14); border: 1px solid rgba(255,255,255,0.14); }
.meeting-card > div { background: var(--blue); padding: 28px; }
.meeting-card span { display: block; font-size: 0.85rem; color: var(--on-dark-muted); margin-bottom: 6px; }
.meeting-card strong { font-family: var(--display); font-weight: 800; text-transform: uppercase; font-size: clamp(1.8rem, 3vw, 2.6rem); line-height: 1; display: block; }
.meeting-card small { display: block; margin-top: 6px; color: var(--on-dark-muted); font-size: 0.85rem; }
@media (max-width: 760px) { .meeting-card { grid-template-columns: 1fr; } }

/* ---------- Members page ---------- */
.board-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: clamp(20px, 3vw, 36px) clamp(16px, 2.4vw, 28px); }
.board-grid .person:first-child { grid-column: span 2; grid-row: span 2; }
.board-grid .person:first-child .media { aspect-ratio: auto; flex: 1 1 auto; height: auto; min-height: 320px; }
.board-grid .person:first-child h3 { font-size: 2.4rem; }
/* District Governors: one row each, full-body picture left, story right */
.pdg-grid { display: grid; }
.pdg {
  display: grid;
  grid-template-columns: minmax(200px, 300px) 1fr;
  gap: clamp(24px, 4vw, 56px);
  align-items: start;
  scroll-margin-top: calc(var(--header-h) + 24px);
}
.pdg + .pdg { margin-top: clamp(36px, 5vw, 60px); padding-top: clamp(36px, 5vw, 60px); border-top: 1px solid rgba(15, 31, 61, 0.12); }
/* The whole picture shows, head to feet, at its own proportions */
.pdg-photo { position: sticky; top: calc(var(--header-h) + 24px); justify-self: center; max-width: 100%; border-radius: var(--radius-s); overflow: hidden; background: #fff; }
.pdg-photo img { width: auto; height: auto; max-width: 100%; max-height: calc(100svh - var(--header-h) - 48px); }
.pdg-photo.is-empty { width: 100%; aspect-ratio: 9 / 16; }
.pdg-text h3 { font-size: clamp(2rem, 3.6vw, 3rem); margin: 6px 0 6px; }
.pdg-term { font-weight: 700; color: var(--muted); font-size: 0.95rem; margin-bottom: 20px; }
.pdg-story { max-width: 68ch; }
.pdg-toggle {
  border: 0;
  background: none;
  padding: 4px 0;
  font-weight: 700;
  font-size: 0.92rem;
  color: var(--blue);
  cursor: pointer;
  border-bottom: 2px solid var(--gold);
}
.pdg-toggle:hover { color: var(--navy); }
@media (max-width: 720px) {
  .pdg { grid-template-columns: 1fr; }
  .pdg-photo { position: static; justify-self: start; }
  .pdg-photo img { max-width: min(260px, 70vw); max-height: 70svh; }
  .pdg-photo.is-empty { width: min(260px, 70%); }
}
.roster-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 32px 20px; }
/* Our Ladies: members with their partners */
.ladies-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 36px clamp(16px, 2.4vw, 28px); }
.couple { display: block; width: 100%; padding: 0; border: 0; background: none; cursor: zoom-in; }
.couple-img { display: block; aspect-ratio: 2 / 3; overflow: hidden; border-radius: var(--radius-s); box-shadow: 0 10px 30px rgba(10, 33, 80, 0.16); }
.couple-img img { width: 100%; height: 100%; object-fit: cover; object-position: top; transition: transform 0.5s; }
.couple:hover .couple-img img { transform: scale(1.03); }
.ladies-grid h3 { font-size: 1.55rem; line-height: 1; margin: 14px 0 4px; }
.ladies-grid p { margin: 0; font-weight: 700; font-size: 0.9rem; color: var(--blue); }
/* Through The Years: a masonry photo collage; photos keep their shape, captions sit on the bottom edge */
.collage { columns: 3 300px; column-gap: 14px; }
.collage-item { position: relative; margin: 0 0 14px; break-inside: avoid; overflow: hidden; border-radius: var(--radius-s); background: var(--navy); }
.collage-item img, .collage-item video { display: block; width: 100%; height: auto; transition: transform 0.5s; }
.collage-open { display: block; width: 100%; padding: 0; border: 0; background: none; cursor: zoom-in; }
.collage-open:hover img { transform: scale(1.03); }
.collage-item figcaption {
  position: absolute; inset: auto 0 0 0; padding: 36px 14px 12px;
  background: linear-gradient(to top, rgba(10, 33, 80, 0.88), rgba(10, 33, 80, 0));
  color: var(--on-dark); font-weight: 700; font-size: 0.92rem; line-height: 1.25; pointer-events: none;
}
.collage-item figcaption b { display: block; font-family: var(--display); font-weight: 900; font-size: 1.5rem; line-height: 1; color: var(--gold); }
/* Videos with controls (reduced motion) keep their caption out of the way of the play bar */
.collage-item video[controls] + figcaption { inset: 0 0 auto 0; padding: 12px 14px 36px; background: linear-gradient(to bottom, rgba(10, 33, 80, 0.88), rgba(10, 33, 80, 0)); }
/* In Memoriam */
.memoriam-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 32px 20px; }
.memoriam .media { aspect-ratio: 4 / 5; margin-bottom: 14px; }
.memoriam .media img { filter: grayscale(1); }
.memoriam h3 { font-size: 1.55rem; line-height: 1; margin-bottom: 4px; }
.memoriam-grid .empty { grid-column: 1 / -1; }
@media (max-width: 900px) { .board-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 480px) { .board-grid .person:first-child { grid-column: span 2; grid-row: auto; } .board-grid .person:first-child .media { flex: none; height: auto; aspect-ratio: 4/5; min-height: 0; } }

.member-dialog {
  border: 0;
  padding: 0;
  width: min(820px, calc(100vw - 32px));
  max-height: calc(100svh - 32px);
  border-radius: 4px;
  color: var(--ink);
  background: var(--paper);
}
.member-dialog::backdrop { background: rgba(10, 33, 80, 0.75); backdrop-filter: blur(3px); }
.member-dialog[open] { animation: pop 0.3s cubic-bezier(.2,.7,.2,1); }
@keyframes pop { from { transform: translateY(16px); opacity: 0; } to { transform: none; opacity: 1; } }
.dialog-body { display: grid; grid-template-columns: 0.9fr 1.1fr; }
.dialog-body .media { border-radius: 0; aspect-ratio: auto; min-height: 360px; }
.dialog-text { padding: clamp(24px, 4vw, 44px); }
.dialog-text h2 { font-size: clamp(2.2rem, 4vw, 3.2rem); margin: 6px 0 18px; }
.dialog-text dl { display: grid; grid-template-columns: auto 1fr; gap: 6px 18px; font-size: 0.9rem; margin: 0 0 20px; }
.dialog-text dt { color: var(--muted); }
.dialog-text dd { margin: 0; font-weight: 600; }
.dialog-close {
  position: absolute;
  top: 12px; right: 12px;
  width: 40px; height: 40px;
  border: 0;
  background: var(--gold);
  color: var(--navy);
  border-radius: var(--radius-s);
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
}
@media (max-width: 640px) {
  .dialog-body { grid-template-columns: 1fr; }
  .dialog-body .media { min-height: 0; aspect-ratio: 4 / 3; }
}

/* ---------- Join page ---------- */
.reasons { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(24px, 4vw, 56px); }
.reasons h3 { font-size: 2rem; margin-bottom: 10px; color: var(--blue); }
.reasons p { color: var(--muted); margin: 0; }
@media (max-width: 800px) { .reasons { grid-template-columns: 1fr; } }

.steps { list-style: none; margin: 0; padding: 0; counter-reset: s; display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--line-dark); border: 1px solid var(--line-dark); }
.steps li { counter-increment: s; background: var(--navy); padding: 28px 24px 32px; }
.steps li::before { content: counter(s); display: block; font-family: var(--display); font-weight: 900; font-size: 3.6rem; line-height: 0.9; color: var(--gold); margin-bottom: 18px; }
.steps h3 { font-size: 1.6rem; margin-bottom: 8px; }
.steps p { color: var(--on-dark-muted); margin: 0; font-size: 0.92rem; }
@media (max-width: 900px) { .steps { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .steps { grid-template-columns: 1fr; } }

.contact-grid { display: grid; grid-template-columns: 1.3fr 1fr; gap: clamp(32px, 6vw, 96px); align-items: start; }
@media (max-width: 860px) { .contact-grid { grid-template-columns: 1fr; } }

.form { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field.full { grid-column: 1 / -1; }
.field label { font-weight: 600; font-size: 0.9rem; }
.field label small { font-weight: 400; color: var(--muted); }
.field input, .field select, .field textarea {
  font: inherit;
  font-size: 1rem;
  padding: 12px 14px;
  border: 1.5px solid rgba(15,31,61,0.2);
  border-radius: var(--radius-s);
  background: #fff;
  color: var(--ink);
  width: 100%;
}
.field textarea { min-height: 140px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px rgba(23,69,143,0.2); }
.field input[aria-invalid="true"], .field textarea[aria-invalid="true"] { border-color: #B3261E; }
.field .err { color: #B3261E; font-size: 0.82rem; min-height: 0; }
.form-actions { grid-column: 1 / -1; display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.form-status { margin: 0; font-size: 0.92rem; }
.form-status.ok { color: #1F7A3D; font-weight: 600; }
.form-status.bad { color: #B3261E; font-weight: 600; }
@media (max-width: 560px) { .form { grid-template-columns: 1fr; } }

.contact-card { background: var(--mist); padding: clamp(24px, 3vw, 36px); border-radius: var(--radius-s); }
.contact-card h2 { font-size: 2rem; margin-bottom: 18px; color: var(--blue); }
.contact-card dl { margin: 0; display: grid; gap: 16px; }
.contact-card dt { font-size: 0.82rem; color: var(--muted); }
.contact-card dd { margin: 0; font-weight: 600; }
.contact-card a { color: var(--blue); }

/* ---------- Hero emblem link ---------- */
.hero-number { pointer-events: auto; transform-origin: center top; will-change: transform; }
.hero-logo-link { display: block; border-radius: 6px; }
.hero-logo-link img { transition: background-color 0.25s; }
.hero-logo-link:hover img { background-color: rgba(255, 255, 255, 0.55); }

/* ---------- Emblem (heritage) ---------- */
.emblem { background: var(--paper); color: var(--ink); overflow: hidden; }
.emblem-grid {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: clamp(40px, 6vw, 96px);
  align-items: center;
}
.emblem-figure { position: relative; display: grid; place-items: center; }
.emblem-year {
  position: absolute;
  inset: 50% auto auto 50%;
  transform: translate(-50%, -50%);
  font-family: var(--display);
  font-weight: 900;
  font-size: clamp(9rem, 26vw, 24rem);
  line-height: 0.8;
  color: var(--mist);
  letter-spacing: -0.02em;
  z-index: 0;
  user-select: none;
}
.emblem-logo { position: relative; z-index: 1; width: min(100%, 540px); aspect-ratio: 1; }
.emblem-logo img { width: 100%; height: 100%; object-fit: contain; filter: drop-shadow(0 18px 30px rgba(15, 31, 61, 0.18)); }
.emblem-dot {
  position: absolute;
  width: 34px; height: 34px;
  margin: -17px 0 0 -17px;
  border-radius: 50%;
  border: 3px solid #fff;
  background: var(--navy);
  box-shadow: 0 0 0 0 rgba(247, 168, 27, 0.7), 0 4px 10px rgba(0,0,0,0.3);
  cursor: pointer;
  padding: 0;
  transition: transform 0.25s, background-color 0.25s;
}
.emblem-dot::after { content: "+"; color: #fff; font-weight: 700; font-size: 1.1rem; line-height: 28px; display: block; text-align: center; transition: transform 0.25s; }
.emblem-dot:hover, .emblem-dot.is-active { background: var(--gold); transform: scale(1.12); }
.emblem-dot.is-active::after { color: var(--navy); transform: rotate(45deg); }
.emblem-dot:not(.is-active) { animation: ping 2.4s ease-out infinite; }
@keyframes ping { 0% { box-shadow: 0 0 0 0 rgba(247,168,27,0.7), 0 4px 10px rgba(0,0,0,0.3); } 70%, 100% { box-shadow: 0 0 0 14px rgba(247,168,27,0), 0 4px 10px rgba(0,0,0,0.3); } }

.emblem-text .section-title { margin-bottom: 22px; color: var(--blue); }
.emblem-text .lead { margin-bottom: 14px; max-width: 40ch; }
.emblem-story { color: var(--muted); max-width: 52ch; }
.emblem-parts { display: flex; flex-wrap: wrap; gap: 8px; margin: 28px 0 0; }
.emblem-part {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1.5px solid rgba(15,31,61,0.18);
  background: #fff;
  color: var(--ink);
  border-radius: 99px;
  padding: 8px 14px 8px 10px;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
}
.emblem-part i, .emblem-detail h3 i { width: 14px; height: 14px; border-radius: 3px; display: inline-block; flex: none; }
.emblem-part.is-active { border-color: var(--navy); background: var(--navy); color: #fff; }
.emblem-detail {
  margin-top: 22px;
  padding: 22px 24px;
  border-left: 4px solid var(--gold);
  background: var(--mist);
  min-height: 132px;
}
.emblem-detail h3 { display: flex; align-items: center; gap: 10px; font-size: 1.9rem; color: var(--navy); margin-bottom: 8px; }
.emblem-detail p { margin: 0; max-width: 52ch; }
.emblem-years { margin: 26px 0 0; color: var(--muted); font-size: 0.95rem; }
.emblem-years strong { font-family: var(--display); font-weight: 900; font-size: 3rem; color: var(--blue); line-height: 1; margin-right: 6px; vertical-align: -0.12em; }
@media (max-width: 860px) {
  .emblem-grid { grid-template-columns: 1fr; }
  .emblem-dot { width: 28px; height: 28px; margin: -14px 0 0 -14px; }
  .emblem-dot::after { line-height: 22px; }
}

/* ---------- Project galleries ---------- */
.project-gallery { grid-column: 1 / -1; }
.gallery-head { display: flex; align-items: baseline; gap: 14px; margin-bottom: 14px; flex-wrap: wrap; }
.gallery-head h3 { font-size: 1.6rem; color: var(--navy); }
.gallery-head span { font-size: 0.88rem; color: var(--muted); }
.gallery { display: grid; grid-template-columns: repeat(8, 1fr); gap: 8px; }
.thumb {
  position: relative;
  padding: 0;
  border: 0;
  aspect-ratio: 1;
  overflow: hidden;
  border-radius: var(--radius-s);
  cursor: zoom-in;
  background: var(--mist);
}
.thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s; }
.thumb:hover img { transform: scale(1.06); }
.thumb span {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: rgba(10, 33, 80, 0.72);
  color: #fff;
  font-family: var(--display);
  font-weight: 800;
  font-size: 1.3rem;
  text-transform: uppercase;
}
@media (max-width: 800px) { .gallery { grid-template-columns: repeat(4, 1fr); } }

.lightbox {
  border: 0;
  padding: 0;
  background: transparent;
  width: 100vw;
  height: 100svh;
  max-width: none;
  max-height: none;
}
.lightbox::backdrop { background: rgba(6, 18, 44, 0.94); }
.lightbox figure { margin: 0; height: 100%; display: grid; place-items: center; align-content: center; gap: 12px; padding: 60px 72px 40px; }
.lightbox img { max-width: 100%; max-height: calc(100svh - 140px); object-fit: contain; border-radius: var(--radius-s); }
.lightbox figcaption { color: rgba(255,255,255,0.8); font-size: 0.9rem; }
.lb-prev, .lb-next {
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  width: 48px; height: 64px;
  border: 0;
  border-radius: var(--radius-s);
  background: rgba(255,255,255,0.1);
  color: #fff;
  font-size: 2.4rem;
  line-height: 1;
  cursor: pointer;
}
.lb-prev { left: 12px; }
.lb-next { right: 12px; }
.lb-prev:hover, .lb-next:hover { background: var(--gold); color: var(--navy); }
.lightbox .dialog-close { position: fixed; }
@media (max-width: 600px) { .lightbox figure { padding: 60px 12px 40px; } .lb-prev, .lb-next { top: auto; bottom: 16px; transform: none; } }

/* ---------- Event extras ---------- */
.event-date b.is-long { font-size: 2.3rem; white-space: nowrap; }
.event-extras { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0 0; }
.event-extras span { font-size: 0.8rem; font-weight: 700; padding: 3px 10px; border-radius: 99px; border: 1.5px solid rgba(15,31,61,0.16); color: var(--ink); }
.event-extras .event-fee { border-color: var(--gold); }
@media (max-width: 640px) { .event-date b.is-long { font-size: 1.6rem; } }

/* ---------- Clickable events ---------- */
.event.has-more { position: relative; transition: background-color 0.2s; }
.event.has-more:hover { background: rgba(23, 69, 143, 0.04); }
.dark .event.has-more:hover { background: rgba(255, 255, 255, 0.04); }
.event-open {
  all: unset;
  cursor: pointer;
}
.event-open::after { content: ""; position: absolute; inset: 0; } /* whole row is the click target */
.event-open:focus-visible { outline: none; }
.event.has-more:has(.event-open:focus-visible) { outline: 3px solid var(--gold); outline-offset: 2px; }
.event.has-more:hover h3 { color: var(--blue); }
.dark .event.has-more:hover h3 { color: var(--gold); }
.event-more {
  display: inline-block;
  margin-top: 10px;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--blue);
  border-bottom: 2px solid var(--gold);
  padding-bottom: 1px;
}
.dark .event-more { color: var(--on-dark); }

.event-dialog {
  border: 0;
  padding: 0;
  width: min(880px, calc(100vw - 32px));
  max-height: calc(100svh - 32px);
  border-radius: 4px;
  background: var(--paper);
  color: var(--ink);
  overflow-y: auto;
}
.event-dialog::backdrop { background: rgba(10, 33, 80, 0.75); backdrop-filter: blur(3px); }
.event-dialog[open] { animation: pop 0.3s cubic-bezier(.2,.7,.2,1); }
.event-dialog .dialog-close { position: sticky; float: right; top: 12px; margin: 12px 12px 0 0; z-index: 2; }
.event-cover { aspect-ratio: 21 / 9; overflow: hidden; background: var(--navy); }
.event-cover img { width: 100%; height: 100%; object-fit: cover; }
.event-body { padding: clamp(22px, 4vw, 44px); }
.event-body h2 { font-size: clamp(2.2rem, 5vw, 3.6rem); color: var(--navy); margin: 14px 0 10px; }
.event-body .event-meta { font-size: 0.92rem; margin-bottom: 22px; }
.event-text { max-width: 66ch; }
.event-text p { margin: 0 0 1em; }
.event-photos-title { font-size: 1.6rem; color: var(--navy); margin: 28px 0 12px; display: flex; gap: 10px; align-items: baseline; }
.event-photos-title span { font-family: var(--body); font-size: 0.85rem; font-weight: 600; color: var(--muted); }
.event-gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 8px; }

/* ---------- President's message ---------- */
.pm-grid { display: grid; grid-template-columns: 1fr 1.6fr; gap: clamp(32px, 6vw, 96px); align-items: start; }
.pm-grid .section-title { color: var(--on-dark); }
.pm-quote { margin: 0; padding-left: clamp(18px, 3vw, 32px); border-left: 4px solid var(--gold); }
.pm-quote p { font-size: clamp(1.05rem, 1.5vw, 1.25rem); line-height: 1.65; color: var(--on-dark); max-width: 60ch; }
.pm-quote .pm-signoff { font-family: var(--display); font-weight: 800; text-transform: uppercase; font-size: clamp(1.4rem, 2.4vw, 2rem); line-height: 1.05; color: var(--gold); margin: 26px 0 0; }
.pm-author { margin: 26px 0 0 clamp(22px, 3vw, 36px); color: var(--on-dark-muted); font-size: 0.92rem; }
.pm-author strong { display: block; color: var(--on-dark); font-size: 1.05rem; }
@media (max-width: 800px) { .pm-grid { grid-template-columns: 1fr; } }

.footer-tagline { margin: -12px 0 28px; color: var(--on-dark); font-weight: 600; }

/* ---------- Partner and sponsor logos ---------- */
.logo-grid, .logo-wall, .ad-grid, .issue-grid { list-style: none; margin: 0; padding: 0; }
.logo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 32px 20px; }
.logo-grid.is-wide { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.logo-grid + .logo-group-title { margin-top: 56px; }
.logo-group-title { font-size: 1.6rem; color: var(--navy); margin-bottom: 18px; }
.logo-box {
  display: block;
  overflow: hidden; /* keeps the box at its aspect ratio whatever the logo's shape */
  aspect-ratio: 3 / 2;
  padding: 12%;
  background: var(--paper);
  border: 1px solid var(--line-light);
  border-radius: var(--radius-s);
}
.mist .logo-box { border-color: transparent; }
.logo-grid.is-wide .logo-box { aspect-ratio: 2 / 1; padding: 8% 10%; }
.logo-box img { width: 100%; height: 100%; object-fit: contain; }
.logo-tile.is-dark .logo-box { background: var(--navy); border-color: var(--navy); }
.logo-tile h3 { font-size: 1.4rem; line-height: 1; margin: 14px 0 4px; }
.logo-tile p { font-size: 0.88rem; color: var(--muted); margin: 0; max-width: 34ch; }

/* ---------- Sister clubs map (Partners page) ---------- */
.sister-map-wrap { position: relative; border-radius: var(--radius-s); overflow: hidden; background: var(--mist); }
.sister-map { position: relative; width: 100%; aspect-ratio: 1000 / 700; cursor: grab; touch-action: none; }
.sister-map:active { cursor: grabbing; }
.sister-map svg { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.map-land { fill-rule: evenodd; fill: url(#land-blue); stroke: url(#land-blue); stroke-width: 1.5; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.map-country { fill-rule: evenodd; fill: transparent; stroke: transparent; stroke-width: 1.5; stroke-linejoin: round; vector-effect: non-scaling-stroke; pointer-events: all; cursor: pointer; transition: fill 0.25s, stroke 0.25s; }
.map-country.is-hot { fill: var(--orange); stroke: var(--orange); stroke-width: 3; }
.map-link { stroke: var(--navy); stroke-width: 1.5; stroke-dasharray: 4 6; stroke-opacity: 0.55; fill: none; }
.map-overlay { position: absolute; inset: 0; pointer-events: none; }
.map-overlay > * { position: absolute; transform: translate(-50%, -50%); }
/* Pins are the Rotary wheel on a white disc; the home club's is larger, on navy */
.map-pin, .map-home { pointer-events: auto; padding: 0; border: 0; background: none; cursor: pointer; }
.map-pin { width: 30px; height: 30px; }
.map-home { width: 42px; height: 42px; z-index: 1; }
.map-pin i, .map-home i {
  display: block; width: 100%; height: 100%; padding: 2px; border-radius: 50%; background: var(--paper);
  box-shadow: 0 2px 6px rgba(15, 31, 61, 0.4); transition: transform 0.2s;
}
.map-home i { padding: 3px; background: var(--navy); box-shadow: 0 0 0 2px var(--paper), 0 2px 8px rgba(15, 31, 61, 0.45); }
.map-pin img, .map-home img { display: block; width: 100%; height: 100%; }
/* Club pins stand just above their spot, with a pointer, so the highlighted place below stays visible */
.map-overlay > .map-pin { transform: translate(-50%, calc(-100% - 8px)); }
.map-pin::after {
  content: ""; position: absolute; left: 50%; top: 100%; transform: translateX(-50%);
  border: 6px solid transparent; border-bottom: 0; border-top: 8px solid var(--paper);
  filter: drop-shadow(0 2px 1px rgba(15, 31, 61, 0.3));
}
.map-pin.is-hot::after { border-top-color: var(--orange); }
.map-pin.is-hot i { box-shadow: 0 0 0 3px var(--orange), 0 2px 6px rgba(15, 31, 61, 0.4); }
.map-pin:hover i, .map-pin:focus-visible i, .map-pin.is-active i { transform: scale(1.25) rotate(30deg); }
.map-pin b, .map-home b {
  position: absolute; left: calc(100% + 6px); top: 50%; transform: translateY(-50%); white-space: nowrap;
  font: 700 0.78rem/1 var(--body); color: var(--navy); background: var(--paper);
  padding: 5px 8px; border-radius: var(--radius-s); box-shadow: 0 1px 4px rgba(15, 31, 61, 0.25);
  opacity: 0; transition: opacity 0.2s; pointer-events: none;
}
/* The home label sits above the pin, clear of the clubs to the east, south, and west */
.map-home b { left: 50%; top: auto; bottom: calc(100% + 6px); transform: translateX(-50%); color: var(--on-dark); background: var(--navy); }
.sister-map.is-near .map-pin b, .sister-map.is-near .map-home b, .map-pin:hover b, .map-pin:focus-visible b, .map-pin.is-active b, .map-home:hover b { opacity: 1; }
/* On hover the label opens into a card for the club: logo, name, and city */
.map-pin:hover, .map-pin:focus-visible { z-index: 5; }
.pin-club { display: none; align-items: center; gap: 10px; text-align: left; }
.pin-club img { flex: none; width: 64px; height: 36px; object-fit: contain; }
.pin-club strong { display: block; font-size: 0.85rem; margin-bottom: 3px; }
.pin-club > span { font-weight: 600; color: var(--muted); line-height: 1.2; }
.map-pin:hover .pin-place, .map-pin:focus-visible .pin-place { display: none; }
.map-pin:hover .pin-club, .map-pin:focus-visible .pin-club { display: flex; }
.map-pin:hover b, .map-pin:focus-visible b { padding: 8px 12px 8px 8px; border-left: 3px solid var(--orange); box-shadow: 0 4px 14px rgba(15, 31, 61, 0.25); }
.sister-map:not(.is-near) .map-pin { width: 18px; height: 18px; }
.sister-map:not(.is-near) .map-home { width: 24px; height: 24px; }
.sister-map:not(.is-near) .map-pin i { padding: 1px; }
.sister-map:not(.is-near) .map-home i { padding: 2px; }

/* Country buttons along the bottom of the map */
.map-chips {
  position: absolute; left: 12px; right: 12px; bottom: 12px; z-index: 6;
  display: flex; flex-wrap: wrap; gap: 6px; pointer-events: none;
}
.map-chips button {
  pointer-events: auto; display: inline-flex; align-items: center; gap: 7px;
  font: 700 0.82rem/1 var(--body); color: var(--navy); background: var(--paper);
  border: 2px solid transparent; border-radius: 999px; padding: 8px 12px 8px 14px; cursor: pointer;
  box-shadow: 0 2px 8px rgba(15, 31, 61, 0.2); transition: border-color 0.2s, background-color 0.2s, color 0.2s;
}
.map-chips button span {
  display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 5px;
  font-size: 0.72rem; border-radius: 999px; background: var(--mist); color: var(--navy);
}
.map-chips button:hover, .map-chips button:focus-visible { border-color: var(--orange); }
.map-chips button[aria-pressed="true"] { background: var(--navy); color: var(--on-dark); }
.map-chips button[aria-pressed="true"] span { background: var(--gold); }

/* Card listing the selected country's clubs */
.map-card {
  position: absolute; left: 12px; top: 12px; z-index: 6; width: min(340px, calc(100% - 24px));
  padding: 14px 16px 12px; background: var(--paper); border-top: 4px solid var(--orange);
  border-radius: var(--radius-s); box-shadow: 0 6px 20px rgba(15, 31, 61, 0.22);
}
.map-card[hidden] { display: none; }
.map-card h3 { font-size: 1.7rem; color: var(--navy); margin: 0 30px 10px 0; line-height: 1; }
.map-card h3 span { display: block; font: 600 0.78rem var(--body); color: var(--muted); margin-top: 6px; }
.map-card ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.map-card li { display: flex; align-items: center; gap: 12px; padding: 6px; border-radius: var(--radius-s); }
.map-card li.is-active { background: var(--mist); }
.map-card li strong { display: block; color: var(--navy); font-size: 0.9rem; line-height: 1.25; }
.map-card li small { display: block; color: var(--muted); font-size: 0.8rem; margin-top: 2px; }
.map-card-head { display: flex; align-items: center; gap: 12px; }
.map-card-head img { flex: none; width: 56px; height: 56px; object-fit: contain; }
.map-card-head h3 { font-size: 1.3rem; margin: 0 24px 4px 0; }
.map-card-head p { margin: 0; color: var(--muted); font-size: 0.82rem; }
.map-card-close { position: absolute; top: 6px; right: 6px; width: 30px; height: 30px; border: 0; background: none; color: var(--muted); font-size: 1.4rem; line-height: 1; cursor: pointer; }
.map-card-close:hover { color: var(--navy); }
.sister-logo { flex: none; width: 76px; height: 48px; padding: 5px; background: var(--paper); border: 1px solid var(--line-light); border-radius: var(--radius-s); }
.sister-logo img { width: 100%; height: 100%; object-fit: contain; }

/* Plain list of the clubs, shown only if the map can't load */
.sister-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 28px clamp(20px, 3vw, 36px); align-items: start; }
.sister-list[hidden] { display: none; }
.sister-country h3 { font-size: 1.6rem; color: var(--navy); margin: 0 0 10px; padding-bottom: 8px; border-bottom: 2px solid var(--gold); }
.sister-country ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.sister-country li { display: flex; align-items: center; gap: 12px; }
.sister-country strong { display: block; font-size: 0.95rem; line-height: 1.25; }
.sister-country small { display: block; font-size: 0.82rem; color: var(--muted); margin-top: 2px; }

@media (max-width: 600px) {
  /* On phones the country buttons scroll sideways in one row */
  .map-chips { flex-wrap: nowrap; overflow-x: auto; left: 0; right: 0; bottom: 0; padding: 10px 12px; scrollbar-width: none; }
  .map-chips button { flex: none; font-size: 0.76rem; padding: 7px 10px 7px 12px; }
  .map-card { padding: 10px 12px 8px; }
  .map-card h3 { font-size: 1.3rem; margin-bottom: 6px; }
  .map-card h3 span { display: inline; margin: 0 0 0 6px; }
  .map-card ul { gap: 2px; }
  .map-card li { padding: 3px 4px; gap: 10px; }
  .map-card li strong { font-size: 0.82rem; }
  .map-card li small { font-size: 0.74rem; }
  .map-card .sister-logo { width: 48px; height: 30px; padding: 3px; }
}

/* Home page: one row of small logos */
.logo-wall { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.logo-wall .logo-box { padding: 8%; }

/* Coffee table book ads */
.ad-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 36px 20px; }
.ad {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  cursor: zoom-in;
  background: none;
}
.ad-img {
  display: block;
  aspect-ratio: 3 / 4;
  padding: 14px;
  background: var(--paper);
  border-radius: var(--radius-s);
  overflow: hidden;
}
.ad-img img { width: 100%; height: 100%; object-fit: contain; filter: drop-shadow(0 4px 10px rgba(10, 33, 80, 0.18)); transition: transform 0.4s; }
.ad:hover .ad-img img { transform: scale(1.03); }
.ad-grid h3 { font-size: 1.3rem; line-height: 1.05; margin: 14px 0 4px; }
.ad-grid p { font-size: 0.85rem; color: var(--muted); margin: 0; }

/* ---------- Viewpoint newsletter ---------- */
.issue-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 340px)); gap: 40px clamp(20px, 3vw, 40px); }
.issue > a:first-child { display: block; text-decoration: none; }
.issue-cover { aspect-ratio: 1400 / 1812; overflow: hidden; border-radius: var(--radius-s); box-shadow: 0 10px 30px rgba(10, 33, 80, 0.18); margin-bottom: 18px; }
.issue-cover img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s; }
.issue > a:first-child:hover .issue-cover img { transform: scale(1.03); }
.issue-date { display: block; font-weight: 700; font-size: 0.85rem; color: var(--blue); margin-bottom: 6px; }
.issue h3 { font-size: 1.9rem; margin-bottom: 10px; }
.issue > a:first-child:hover h3 { color: var(--azure); }
.issue p { font-size: 0.92rem; color: var(--muted); }
.issue-size { font-weight: 400; color: var(--muted); }

/* ---------- Draft label ---------- */
.draft-badge {
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  bottom: 12px;
  z-index: 90;
  margin: 0;
  padding: 6px 12px;
  border-radius: 99px;
  background: var(--gold);
  color: var(--navy);
  font-size: 0.8rem;
  font-weight: 700;
  box-shadow: 0 4px 14px rgba(0,0,0,0.25);
  pointer-events: none;
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-delay: 0ms !important; transition-duration: 0.01ms !important; }
}
