/* =========================================================
   Maldives Financial Sector Awards 2026 — prototype
   Design tokens
   ========================================================= */
:root {
  --ivory:      #FAF6EC;
  --cream:      #F3EBD7;
  --cream-deep: #ECE0C5;
  --gold:       #C9A24B;
  --gold-light: #E4CB84;
  --gold-deep:  #9A7723;   /* warm gold — large display numerals only */
  --gold-text:  #73580F;   /* AA-legible bronze — all small gold labels (≥5.1:1 on light) */
  --ink:        #2E2D29;
  --ink-soft:   #6F6A5C;
  --navy:       #14263F;
  --navy-2:     #1D3556;
  --teal:       #2F7E78;
  --white:      #FFFFFF;

  /* MMA brand fonts. Main titles use Rift per the visual guidelines; Rift is not
     free to self-host, so Saira Condensed is the open stand-in. */
  --ff-title:   "Poppins", sans-serif;  /* main titles (h1/h2) */
  --ff-display: "Lato", sans-serif;  /* headlines, sub-heads, labels, numerals */
  --ff-sans:    "Fira Sans", "Roboto", system-ui, sans-serif;       /* primary UI sans (nav, buttons) */
  --ff-body:    "Spectral", Georgia, serif;                         /* body copy — unchanged */
  --ff-script:  "Tangerine", cursive;                               /* decorative flourish */

  --maxw: 1180px;
  --gut: clamp(1.25rem, 5vw, 5rem);
  --radius: 14px;
  --shadow: 0 18px 50px -24px rgba(46, 45, 41, 0.45);
  --shadow-soft: 0 10px 30px -20px rgba(46, 45, 41, 0.4);
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
}

/* =========================================================
   Reset / base
   ========================================================= */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; scroll-padding-top: clamp(74px, 9vh, 98px); }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; }
}
body {
  margin: 0;
  background: var(--ivory);
  color: var(--ink);
  font-family: var(--ff-body);
  font-size: 1.06rem;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
h1, h2, h3, h4 { font-family: var(--ff-display); font-weight: 300; margin: 0; line-height: 1.08; letter-spacing: 0.01em; }
h1, h2 { font-family: var(--ff-title); }
p { margin: 0 0 1rem; }
a { color: inherit; }
img { max-width: 100%; display: block; }
ul, ol, dl { margin: 0; padding: 0; list-style: none; }

.skip-link {
  position: absolute; left: 1rem; top: -3rem; z-index: 200;
  background: var(--ink); color: var(--ivory); padding: .6rem 1rem; border-radius: 6px;
  transition: top .2s var(--ease);
}
.skip-link:focus { top: 1rem; }

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

/* Tangerine script — the poster's signature flourish, used sparingly at display size */
.script-accent { font-family: var(--ff-script); font-weight: 700; line-height: .82; color: var(--gold); display: block; }
.script-accent--light { color: var(--gold-light); }

/* =========================================================
   Shared section scaffolding
   ========================================================= */
.section { padding: clamp(3.25rem, 6vw, 5.5rem) var(--gut); max-width: var(--maxw); margin-inline: auto; }
.section--feature { padding-block: clamp(4.5rem, 8vw, 7rem); }   /* Winners — a paced peak */
.section__head { max-width: 46rem; margin-bottom: clamp(1.9rem, 3.6vw, 2.9rem); }
.section__head h2 { font-size: clamp(2.1rem, 4.8vw, 3.6rem); font-weight: 600; letter-spacing: -0.01em; line-height: 1.04; }
.section__sub { margin-top: 1.3rem; color: var(--ink-soft); font-size: 1.12rem; max-width: 42rem; }
.section__sub--light { color: rgba(250, 246, 236, 0.78); }

.eyebrow {
  display: inline-block; font-family: var(--ff-display); font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.28em; font-size: 0.74rem;
  color: var(--gold-text); margin-bottom: 1.3rem;
}
.eyebrow::before { content: ""; display: inline-block; width: 26px; height: 1px; background: var(--gold); vertical-align: middle; margin-right: 0.8rem; }
.eyebrow--light { color: var(--gold-light); }
.eyebrow--light::before { background: var(--gold-light); }

/* Pills — the poster's speech-bubble tag language */
.pill-row { display: flex; flex-wrap: wrap; gap: 0.7rem; }
.pill {
  font-family: var(--ff-sans); font-weight: 500; font-size: 0.82rem;
  letter-spacing: 0.06em; text-transform: uppercase;
  background: linear-gradient(135deg, var(--gold-light), var(--gold));
  color: #3a2d09; padding: 0.55rem 1.1rem; border-radius: 999px;
  box-shadow: var(--shadow-soft); white-space: nowrap; text-decoration: none;
}
.pill--ghost { background: transparent; color: var(--gold-text); box-shadow: none; border: 1px solid var(--gold); }
.pill--cta { display: inline-flex; align-items: center; gap: .5rem; text-decoration: none; cursor: pointer; transition: transform .25s var(--ease), box-shadow .25s var(--ease); }
.pill--cta:hover, .pill--cta:focus-visible { transform: translateY(-2px); box-shadow: var(--shadow-strong, var(--shadow-soft)); }
.pill--cta span { transition: transform .25s var(--ease); }
.pill--cta:hover span { transform: translateX(3px); }
.pill--dark { background: transparent; color: var(--gold-light); border: 1px solid rgba(228,203,132,.5); box-shadow: none; }

/* Ornamental divider — a hairline that fades toward a single centered lattice motif */
.divider { display: flex; align-items: center; justify-content: center; gap: clamp(.9rem, 2vw, 1.5rem);
  color: var(--gold); max-width: var(--maxw); margin: clamp(2rem, 5vw, 3.5rem) auto; padding: 0 var(--gut); }
.divider__line { height: 1px; width: min(34%, 300px); }
.divider__line:first-child { background: linear-gradient(90deg, transparent, color-mix(in srgb, var(--gold) 65%, transparent)); }
.divider__line:last-child  { background: linear-gradient(90deg, color-mix(in srgb, var(--gold) 65%, transparent), transparent); }
.divider__mark { flex: none; display: block; opacity: .8; }

/* =========================================================
   Nav
   ========================================================= */
.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 100;
  transition: background .35s var(--ease), box-shadow .35s var(--ease);
}
.nav__inner {
  max-width: var(--maxw); margin-inline: auto; padding: 1.15rem var(--gut);
  display: flex; align-items: center; justify-content: space-between; gap: 2rem;
}
/* The scrolled bar (background + blur) lives on a ::before layer, NOT on .nav
   itself: backdrop-filter on the element would make it a containing block for
   position:fixed descendants, trapping the mobile drawer and scrim inside the
   header box. Keeping the filter on the pseudo leaves them anchored to the viewport. */
.nav::before {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: rgba(250, 246, 236, 0.88); backdrop-filter: blur(10px); box-shadow: 0 1px 0 rgba(201,162,75,.25);
  opacity: 0; transition: opacity .35s var(--ease);
}
.nav.is-scrolled::before { opacity: 1; }
.nav.is-scrolled .nav__inner { padding-top: .8rem; padding-bottom: .8rem; }
.nav__brand { display: flex; align-items: center; text-decoration: none; }
.nav__brand-logo { display: block; height: clamp(26px, 3.4vw, 34px); width: auto; }
.nav__links { display: flex; gap: 1.7rem; }
.nav__links a {
  font-family: var(--ff-sans); font-size: 0.9rem; letter-spacing: 0.04em; text-decoration: none;
  color: var(--ink); position: relative; padding: .2rem 0; transition: color .2s var(--ease);
}
.nav__links a::after { content: ""; position: absolute; left: 0; bottom: -2px; width: 100%; height: 1px; background: var(--gold); transform: scaleX(0); transform-origin: left; transition: transform .25s var(--ease); }
.nav__links a:hover { color: var(--gold-text); }
.nav__links a:hover::after { transform: scaleX(1); }
.nav__links a[aria-current="true"] { color: var(--gold-text); }
.nav__links a[aria-current="true"]::after { transform: scaleX(1); }
.nav__toggle { display: none; }

/* =========================================================
   Hero
   ========================================================= */
.hero {
  position: relative; min-height: 100svh; display: flex; align-items: center;
  padding: 7rem var(--gut) 4rem; overflow: hidden;
  background:
    radial-gradient(120% 90% at 80% -10%, var(--cream) 0%, var(--ivory) 55%),
    var(--ivory);
}
.hero__lattice {
  position: absolute; inset: 0; color: var(--gold);
  opacity: 0; mask-image: radial-gradient(75% 75% at 76% 42%, #000 0%, transparent 72%);
  -webkit-mask-image: radial-gradient(75% 75% at 76% 42%, #000 0%, transparent 72%);
  animation: latticeIn 1.6s var(--ease) .2s forwards;
}
@keyframes latticeIn { to { opacity: 0.07; } }

/* Full-bleed lattice that fades in from one screen edge, behind a section's content */
.has-lattice { position: relative; isolation: isolate; }
.has-lattice > :not(.section-lattice) { position: relative; z-index: 1; }
.section-lattice {
  position: absolute; top: 0; bottom: 0; left: 50%; width: 100vw; transform: translateX(-50%);
  z-index: 0; color: var(--gold); opacity: .06; pointer-events: none;
  -webkit-mask-composite: source-in; mask-composite: intersect;
}
.section-lattice svg { display: block; width: 100%; height: 100%; }
/* fade horizontally from the edge, and soften the top/bottom so it never hard-cuts at the section seam */
.section-lattice--left {
  -webkit-mask-image: linear-gradient(90deg, #000 0%, transparent 52%), linear-gradient(180deg, transparent, #000 16%, #000 84%, transparent);
  mask-image: linear-gradient(90deg, #000 0%, transparent 52%), linear-gradient(180deg, transparent, #000 16%, #000 84%, transparent);
}
.section-lattice--right {
  -webkit-mask-image: linear-gradient(90deg, transparent 48%, #000 100%), linear-gradient(180deg, transparent, #000 16%, #000 84%, transparent);
  mask-image: linear-gradient(90deg, transparent 48%, #000 100%), linear-gradient(180deg, transparent, #000 16%, #000 84%, transparent);
}

.hero__inner {
  position: relative; z-index: 2; max-width: var(--maxw); margin-inline: auto; width: 100%;
  display: flex; align-items: center;
}
.hero__copy { max-width: 46rem; }

.hero__title { margin: 0; line-height: 0; animation: floatUp 1s var(--ease) both; }
.hero__logo {
  display: block; width: clamp(240px, 74vw, 600px); height: auto;
  filter: drop-shadow(0 20px 34px rgba(154,119,35,.28));
}
.hero__rule { width: 0; height: 2px; background: linear-gradient(90deg, var(--gold), transparent); margin: 1.6rem 0; animation: ruleGrow 1s var(--ease) .8s forwards; }
@keyframes ruleGrow { to { width: 220px; } }
.hero__lede { font-size: clamp(1.05rem, 1.6vw, 1.3rem); color: var(--ink-soft); max-width: 34rem; margin-bottom: 2rem; animation: fadeUp .9s var(--ease) .5s both; }
.hero .pill-row { animation: fadeUp .9s var(--ease) .65s both; }
.hero__scroll {
  position: absolute; left: 50%; bottom: 1.7rem; transform: translateX(-50%); z-index: 3;
  display: inline-flex; flex-direction: column; align-items: center; gap: .5rem;
  text-decoration: none; color: var(--gold-text);
  font-family: var(--ff-display); font-size: .72rem; letter-spacing: 0.25em; text-transform: uppercase;
}
.hero__scroll svg { animation: bob 2s var(--ease) infinite; }

/* ---- Hero award trophy ---- */
.hero__inner { gap: clamp(1.5rem, 5vw, 4.5rem); }
.hero__copy { flex: 1 1 44rem; }
.hero__award {
  position: relative; flex: 0 1 40%; align-self: stretch;
  display: flex; align-items: center; justify-content: center; min-height: 0;
  animation: awardRise 1.4s var(--ease) .55s both;
}
/* shrink-wraps the image so the sheen mask registers to the trophy exactly */
.hero__award-frame {
  position: relative; margin: 0; line-height: 0;
  animation: awardFloat 8s var(--ease) 1.7s infinite;
  will-change: transform;
}
.hero__award-img {
  display: block; width: 100%; max-width: 440px; height: auto;
  max-height: 84svh; object-fit: contain;
  filter: drop-shadow(0 36px 48px rgba(26,22,10,.34));
}
/* warm gold light pooling behind the trophy, breathing in sync with the float */
.hero__award-glow {
  position: absolute; z-index: 0; inset: 8% 2% 4%;
  background: radial-gradient(48% 44% at 50% 46%, rgba(154,119,35,.42) 0%, rgba(154,119,35,.13) 40%, transparent 72%);
  filter: blur(16px);
  animation: awardGlow 8s var(--ease) 1.7s infinite;
}
/* specular highlight that sweeps across the metal — clipped to the trophy silhouette */
.hero__award-sheen {
  position: absolute; inset: 0; z-index: 2; pointer-events: none;
  mix-blend-mode: screen;
  -webkit-mask-size: contain; mask-size: contain;
  -webkit-mask-repeat: no-repeat; mask-repeat: no-repeat;
  -webkit-mask-position: center; mask-position: center;
  background: linear-gradient(104deg,
    transparent 40%, rgba(255,249,232,0) 45%,
    rgba(255,249,232,.7) 50%,
    rgba(255,249,232,0) 55%, transparent 60%);
  background-size: 280% 280%;
  background-position: 135% 135%;
  animation: awardSheen 8s var(--ease) 2.4s infinite;
}

@keyframes awardRise { from { opacity: 0; transform: translateY(46px) scale(.96); } to { opacity: 1; transform: none; } }
@keyframes awardFloat { 0%, 100% { transform: translateY(0) rotate(0deg); } 50% { transform: translateY(-14px) rotate(-.4deg); } }
@keyframes awardGlow { 0%, 100% { opacity: .65; transform: scale(1); } 50% { opacity: 1; transform: scale(1.06); } }
/* sheen rests off-corner most of the cycle, then sweeps across once */
@keyframes awardSheen {
  0%, 62% { background-position: 135% 135%; }
  84%, 100% { background-position: -35% -35%; }
}

@keyframes fadeUp { from { opacity: 0; transform: translateY(22px); } to { opacity: 1; transform: none; } }
@keyframes floatUp { from { opacity: 0; transform: translateY(30px) scale(.96); } to { opacity: 1; transform: none; } }
@keyframes bob { 0%,100% { transform: translateY(0); } 50% { transform: translateY(6px); } }

/* =========================================================
   About
   ========================================================= */
.about__lead { font-size: clamp(1.3rem, 2.4vw, 1.8rem); line-height: 1.4; font-family: var(--ff-body); color: var(--ink); margin-bottom: 2.2rem; }
.about__cols { columns: 2; column-gap: clamp(1.5rem, 3vw, 3rem); color: var(--ink-soft); }
.about__cols p:first-child { margin-top: 0; }
.figures { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; margin-top: 3.5rem; background: var(--cream-deep); border: 1px solid var(--cream-deep); border-radius: var(--radius); overflow: hidden; }
.figure { background: var(--white); padding: 1.6rem 1.4rem; }
.figure dt { font-family: var(--ff-display); font-size: .74rem; text-transform: uppercase; letter-spacing: 0.14em; color: var(--ink-soft); }
.figure dd { font-family: var(--ff-display); font-weight: 300; font-size: clamp(2.2rem, 4vw, 3rem); color: var(--gold-deep); margin: .3rem 0 0; }

/* =========================================================
   Design / The Trophy — navy gala band (mirrors .honours).
   The trophy image + its story; the only motion is the
   standard .reveal scroll-in shared by every section.
   ========================================================= */
.design__lattice { position: absolute; inset: 0; color: var(--gold-light); opacity: .05; z-index: 1; }
.design__grid {
  display: grid; grid-template-columns: 1fr minmax(0, .82fr);
  gap: clamp(2rem, 5vw, 4.5rem); align-items: start;
  padding-bottom: clamp(2.5rem, 6vw, 5rem);
}
.design__body { max-width: 40rem; color: rgba(250, 246, 236, .82); }
.design__body p { font-size: 1.08rem; line-height: 1.75; }
.design__body p + p { margin-top: 1.1rem; }
.design__body p:first-child {                 /* lead emphasis */
  font-size: clamp(1.2rem, 2.1vw, 1.55rem); line-height: 1.5;
  color: var(--ivory); margin-bottom: 1.3rem;
}
.design__figure { position: relative; width: 100%; max-width: 340px; margin: 0 auto; }
.design__trophy-img {
  display: block; width: 100%; height: auto;
  filter: drop-shadow(0 9px 12px rgba(0, 0, 0, .45));
}

/* hotspot marker over the fretwork — an outlined ivory circle with a slow "ping" ring */
.design__hotspot {
  position: absolute; left: var(--hx, 70%); top: var(--hy, 38%);
  transform: translate(-50%, -50%);
  width: 24px; height: 24px; padding: 0; border: 0; background: none;
  cursor: pointer; z-index: 3;
}
.design__hotspot::before {                       /* the marker: an outlined circle */
  content: ""; position: absolute; inset: 5px; border-radius: 50%;
  background: transparent; border: 2px solid var(--ivory);
  box-shadow: 0 2px 6px rgba(46, 45, 41, .45);
  transition: background .2s var(--ease), transform .2s var(--ease);
}
.design__hotspot-ring {                          /* the pulsing ring */
  position: absolute; inset: 0; border-radius: 50%;
  border: 1.5px solid var(--ivory);
  animation: design-ping 2.4s var(--ease) infinite;
}
@keyframes design-ping {
  0%   { transform: scale(.55); opacity: .9; }
  70%  { opacity: 0; }
  100% { transform: scale(2.1); opacity: 0; }
}
.design__hotspot:hover::before,
.design__hotspot:focus-visible::before { background: rgba(250, 246, 236, .25); transform: scale(1.12); }
.design__hotspot:focus-visible { outline: 2px solid var(--gold-light); outline-offset: 4px; border-radius: 50%; }

/* dim the marker until the trophy is hovered (touch devices keep it visible) */
@media (hover: hover) {
  .design__hotspot { opacity: 0; transition: opacity .8s var(--ease); }
  .design__figure:hover .design__hotspot,
  .design__hotspot:focus-visible { opacity: 1; }
}

/* close-up popover (native Popover API → top layer, escapes clipping) */
.design__popover {
  position: fixed; inset: auto; margin: 0;       /* positioned by script.js */
  width: min(200px, 74vw); padding: 0; border: 1px solid var(--cream-deep);
  border-radius: var(--radius); overflow: hidden; color: var(--ink);
  background: var(--ivory);
  box-shadow: 0 24px 50px -20px rgba(46, 45, 41, .5);
}
.design__popover-img {
  display: block; width: 100%; height: auto; background: var(--cream);
}
.design__popover-cap {
  margin: 0; padding: .65rem .8rem .8rem;
  font-family: var(--ff-body); font-size: .82rem; line-height: 1.5;
  color: var(--ink-soft);
}

@media (prefers-reduced-motion: reduce) {
  .design__hotspot-ring { animation: none; opacity: .55; }
}

@media (max-width: 860px) {
  .design__grid { grid-template-columns: 1fr; gap: clamp(1.75rem, 6vw, 2.5rem); }
  .design__figure { order: -1; max-width: 280px; }   /* image leads on mobile */
}

/* =========================================================
   Timeline
   ========================================================= */
.timeline { position: relative; display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; margin-top: clamp(2.5rem, 5vw, 4rem); margin-bottom: clamp(2.2rem, 4vw, 3rem); counter-reset: step; }
/* Continuous rail running through every node */
.timeline::before { content: ""; position: absolute; top: calc(2.2rem + 6px); left: 12.5%; right: 12.5%; height: 2px; background: linear-gradient(90deg, var(--cream-deep), var(--gold) 92%); }
.timeline li { position: relative; counter-increment: step; text-align: center; padding: 4rem .6rem 0; }
/* Step number, above the rail */
.timeline li::after {
  content: counter(step, decimal-leading-zero); position: absolute; top: 0; left: 0; right: 0;
  font-family: var(--ff-display); font-size: .82rem; letter-spacing: .12em; color: var(--gold-text);
}
/* Node on the rail */
.timeline li::before {
  content: ""; position: absolute; top: 2.2rem; left: 50%; transform: translateX(-50%);
  width: 14px; height: 14px; border-radius: 50%; background: var(--white); border: 2px solid var(--gold); z-index: 1;
}
.timeline li:last-child::before { background: var(--gold); box-shadow: 0 0 0 4px rgba(201, 162, 75, .18); }
.timeline__step { display: block; font-family: var(--ff-display); font-size: 1.02rem; }
.timeline time { display: block; margin-top: .4rem; color: var(--ink-soft); font-size: .95rem; }

/* Rubric */
.rubric { background: var(--white); border: 1px solid var(--cream-deep); border-radius: var(--radius); padding: clamp(1.6rem, 3vw, 2.6rem); box-shadow: var(--shadow-soft); }
.rubric__title { font-size: clamp(1.5rem, 3vw, 2.15rem); margin-bottom: .4rem; }
.rubric__note { color: var(--ink-soft); font-size: .96rem; margin-bottom: 1.8rem; }
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* Category switcher (numbered tablist) */
.rubric-switch { display: flex; overflow-x: auto; margin: 0 0 1.8rem; border-bottom: 1px solid var(--cream-deep); scrollbar-width: none; -ms-overflow-style: none; }
.rubric-switch::-webkit-scrollbar { display: none; }
.rubric-tab {
  flex: 0 0 auto; position: relative; cursor: pointer; background: transparent; border: 0;
  font-family: var(--ff-display); font-weight: 700; font-size: 1rem; letter-spacing: .08em;
  font-variant-numeric: tabular-nums; color: var(--ink-soft); padding: .7rem 1.15rem;
  transition: color .2s var(--ease);
}
.rubric-tab:not(:last-child)::before { content: ""; position: absolute; right: 0; top: 50%; transform: translateY(-50%); width: 1px; height: 1.1rem; background: var(--cream-deep); }
.rubric-tab::after { content: ""; position: absolute; left: .6rem; right: .6rem; bottom: -1px; height: 2px; background: var(--gold); transform: scaleX(0); transition: transform .25s var(--ease); }
.rubric-tab:hover { color: var(--gold-text); }
.rubric-tab[aria-selected="true"] { color: var(--ink); }
.rubric-tab[aria-selected="true"]::after { transform: scaleX(1); }

/* Category panel */
.rubric-panel[hidden] { display: none; }
.rubric-panel__lead { display: flex; flex-wrap: wrap; align-items: baseline; gap: .25rem .8rem; margin: 0 0 1.4rem; }
.rubric-panel__num { font-family: var(--ff-display); font-weight: 700; font-size: .72rem; letter-spacing: .14em; text-transform: uppercase; color: var(--gold-text); }
.rubric-panel__title { font-family: var(--ff-display); font-weight: 400; font-size: 1.3rem; color: var(--ink); }
.jury-note { margin: 0 0 1.4rem; color: var(--ink-soft); font-size: .92rem; font-style: italic; }

/* Ring (donut) + legend */
.rubric__ring { display: flex; gap: clamp(1.6rem, 4vw, 3rem); align-items: center; justify-content: center; flex-wrap: wrap; }
.ring__wrap { position: relative; width: 220px; height: 220px; flex: 0 0 auto; }
.ring__wrap svg { display: block; }
.ring__seg { transition: stroke-dasharray 1s var(--ease), stroke-width .25s var(--ease), opacity .25s var(--ease); }  /* impeccable-disable-line layout-transition: SVG stroke-* are paint properties, not layout */
.ring__wrap.dim .ring__seg { opacity: .25; }
.ring__wrap.dim .ring__seg.is-on { opacity: 1; stroke-width: 7; }
.ring__center { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; pointer-events: none; }
.ring__num { font-family: var(--ff-display); font-size: 2.6rem; font-weight: 700; line-height: 1; color: var(--gold-deep); transition: color .2s var(--ease); }
.ring__lab { font-family: var(--ff-display); font-size: .72rem; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-soft); margin-top: .35rem; }
.ring__center.is-on .ring__num { color: var(--gold-text); }
.ring-leg { flex: 1 1 240px; min-width: 220px; }
.ring-leg__row {
  display: flex; width: 100%; align-items: center; gap: .7rem; cursor: pointer; text-align: left;
  padding: .55rem .5rem; border: 0; border-bottom: 1px solid var(--cream-deep); border-radius: 6px;
  background: transparent; transition: background .2s var(--ease);
}
.ring-leg__row:last-child { border-bottom: none; }
.ring-leg__row:hover, .ring-leg__row.is-on { background: var(--cream); }
.ring-leg__row[aria-pressed="true"] { background: var(--cream-deep); }
.ring-leg__row:focus-visible { outline: 2px solid var(--gold-text); outline-offset: 2px; }
.ring-leg__swatch { width: 12px; height: 12px; border-radius: 3px; flex: 0 0 auto; transition: transform .2s var(--ease); }
.ring-leg__row.is-on .ring-leg__swatch { transform: scale(1.35); }
.ring-leg__name { flex: 1; font-size: .96rem; color: var(--ink); }
.ring-leg__pts { font-family: var(--ff-display); font-weight: 700; color: var(--gold-text); font-variant-numeric: tabular-nums; }

/* =========================================================
   Category grid
   ========================================================= */
.cat-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.2rem; }
.cat-card {
  position: relative; background: var(--white); border: 1px solid var(--cream-deep); border-radius: var(--radius);
  padding: 1.8rem; overflow: hidden; transition: transform .3s var(--ease), box-shadow .3s var(--ease), border-color .3s var(--ease);
  appearance: none; -webkit-appearance: none; font: inherit; color: inherit; text-align: left; cursor: pointer; width: 100%;
}
.cat-card:hover, .cat-card:focus-visible { transform: translateY(-4px); box-shadow: var(--shadow); border-color: var(--gold); }
.cat-card__num { font-family: var(--ff-display); font-size: .8rem; letter-spacing: .1em; color: var(--gold-text); }
.cat-card__icon { display: block; width: 44px; height: 44px; margin: .8rem 0 1.1rem; color: var(--gold); }
.cat-card__icon svg { display: block; width: 44px; height: 44px; }
.cat-card h3 { font-weight: 400; font-size: 1.28rem; line-height: 1.2; margin-bottom: .6rem; }
.cat-card p { font-size: .96rem; color: var(--ink-soft); margin: 0; }
.cat-card__route { display: inline-block; margin-top: 1rem; font-family: var(--ff-display); font-size: .72rem; text-transform: uppercase; letter-spacing: .12em; color: var(--ink-soft); }
.cat-card--honour { background: linear-gradient(160deg, var(--navy), var(--navy-2)); color: var(--ivory); border-color: var(--navy-2); }
.cat-card--honour .cat-card__num, .cat-card--honour .cat-card__route { color: var(--gold-light); }
.cat-card--honour .cat-card__icon { color: var(--gold-light); }
.cat-card--honour p { color: rgba(250,246,236,.78); }

/* Category 7 rendered as a full-width feature band that previews the gala section */
.cat-card--feature {
  grid-column: 1 / -1; display: grid; grid-template-columns: auto 1fr auto; align-items: center;
  gap: 1.2rem clamp(1.5rem, 3vw, 2.8rem); padding: clamp(1.7rem, 3vw, 2.5rem) clamp(1.8rem, 3.5vw, 3rem);
}
.cat-card--feature .cat-card__feat-lattice { position: absolute; inset: 0; color: var(--gold-light); opacity: .05; pointer-events: none; }
.cat-card--feature .cat-card__icon { margin: 0; width: 54px; height: 54px; position: relative; }
.cat-card--feature .cat-card__icon svg { width: 54px; height: 54px; }
.cat-card--feature .cat-feature__body { position: relative; }
.cat-card--feature h3 { margin: .25rem 0 .45rem; font-size: clamp(1.3rem, 2.2vw, 1.7rem); }
.cat-card--feature p { max-width: 52ch; }
.cat-feature__route { position: relative; margin: 0; white-space: nowrap; align-self: center; }
.cat-card--feature:hover, .cat-card--feature:focus-visible { border-color: var(--gold-light); }

/* =========================================================
   Winner grid + cards
   ========================================================= */
.winner-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); gap: 1.4rem; }
.winner-grid > li { display: flex; }
.winner-card {
  display: flex; flex-direction: column; width: 100%; text-align: left; background: var(--white);
  border: 1px solid var(--cream-deep); border-radius: var(--radius); overflow: hidden;
  font: inherit; color: inherit; padding: 0; transition: transform .3s var(--ease), box-shadow .3s var(--ease), border-color .3s var(--ease);
}
button.winner-card { cursor: pointer; }
button.winner-card:hover, button.winner-card:focus-visible { transform: translateY(-5px); box-shadow: var(--shadow); border-color: var(--gold); }

/* Header: a large bronze category numeral sets a constant header height, so a
   one- vs two-line route name never shifts the logo/name rows out of alignment. */
.winner-card__head { display: flex; align-items: center; gap: .8rem; padding: 1.5rem 1.6rem 0; }
.winner-card__index {
  flex: none; font-family: var(--ff-display); font-weight: 300; font-size: 2.3rem; line-height: 1;
  color: var(--gold-deep); letter-spacing: .01em;
}
.winner-card__route {
  font-family: var(--ff-display); font-size: .72rem; text-transform: uppercase; letter-spacing: .14em;
  color: var(--gold-text); line-height: 1.34; min-height: 2.4em; display: flex; align-items: center;
}

/* Logo sits in a fixed band so marks of different proportions align card-to-card */
.winner-card__logo {
  height: 52px; margin: 1.05rem 1.6rem 1.3rem; padding-bottom: 1.3rem; box-sizing: content-box;
  border-bottom: 1px solid var(--cream); display: flex; align-items: center; justify-content: flex-start;
}
.winner-card__logo--empty { color: var(--cream-deep); }
.winner-card__logo--empty svg { width: 40px; height: 40px; stroke-width: 2.4; }
.logo-mark {
  font-family: var(--ff-display); font-weight: 700; letter-spacing: .04em; color: var(--ink);
  border: 1px solid var(--gold); border-radius: 10px; padding: .55rem 1rem; font-size: 1.1rem;
  background: linear-gradient(150deg, var(--white), var(--cream));
  box-shadow: inset 0 1px 0 rgba(255,255,255,.7), 0 6px 16px -12px rgba(154,119,35,.5);
  display: inline-flex; align-items: center; gap: .55rem;
}
.logo-mark small { font-family: var(--ff-body); font-weight: 400; font-size: .72rem; color: var(--ink-soft); letter-spacing: 0; }
.logo-img { display: block; width: auto; height: auto; max-height: 48px; max-width: 165px; object-fit: contain; object-position: left center; }
.modal__logo .logo-img { max-height: 72px; }

.winner-card__body { padding: 0 1.6rem 1.6rem; display: flex; flex-direction: column; flex: 1; }
.winner-tag {
  align-self: flex-start; display: inline-flex; align-items: center; gap: .5rem; margin-bottom: .85rem;
  font-family: var(--ff-display); font-size: .68rem; letter-spacing: .16em; text-transform: uppercase; color: var(--gold-text);
}
.winner-tag__mark { flex: none; color: var(--gold); }
.winner-card__solution {
  font-family: var(--ff-sans); font-weight: 400; font-size: 1.45rem; line-height: 1.16; color: var(--ink);
  min-height: 1.16em;
}
.winner-card__entity { font-family: var(--ff-body); font-size: .96rem; color: var(--ink-soft); margin: .3rem 0 0; }
.winner-card__more {
  margin-top: auto; padding-top: 1.4rem; font-family: var(--ff-display); font-size: .8rem; letter-spacing: .08em;
  text-transform: uppercase; color: var(--gold-text); display: inline-flex; align-items: center; gap: .4rem;
}
.winner-card__more::after { content: "→"; transition: transform .25s var(--ease); }
button.winner-card:hover .winner-card__more::after, button.winner-card:focus-visible .winner-card__more::after { transform: translateX(4px); }

/* Reserved (no award made) — quiet, dashed, no gold; reads as deliberate rigor */
.winner-card--reserved { background: linear-gradient(170deg, var(--ivory), var(--cream)); border-style: dashed; }
.winner-card--reserved .winner-card__index { color: var(--ink-soft); opacity: .5; }
.winner-card--reserved .winner-card__route { color: var(--ink-soft); }
.winner-tag--reserved { color: var(--ink-soft); }
.winner-tag--reserved .winner-tag__mark { color: var(--ink-soft); opacity: .6; }
.winner-card--reserved .winner-card__solution { color: var(--ink-soft); }

/* Entity-led card: the winning institution is the headline; an optional descriptor
   (only where the citation names a product) sits beneath it. */
.winner-card__entity-name {
  font-family: var(--ff-sans); font-weight: 400; font-size: 1.3rem; line-height: 1.2; color: var(--ink);
  text-wrap: balance;
}
.winner-card__descriptor { font-family: var(--ff-body); font-size: .96rem; color: var(--ink-soft); margin: .3rem 0 0; }

/* =========================================================
   Honours (gala band)
   ========================================================= */
.section--gala { position: relative; max-width: none; margin: 0; padding-inline: 0; background: linear-gradient(165deg, var(--navy) 0%, var(--navy-2) 100%); color: var(--ivory); overflow: hidden; }
.section--gala .section__head, .section--gala .honour-groups, .section--gala .design__grid { max-width: var(--maxw); margin-inline: auto; padding-inline: var(--gut); position: relative; z-index: 2; }
.section--gala .section__head { padding-top: clamp(4.5rem, 9vw, 8rem); }
.section--gala h2 { color: var(--ivory); }
.honours__lattice { position: absolute; inset: 0; color: var(--gold-light); opacity: .12; z-index: 1; }
.honours__script { position: absolute; top: clamp(1.2rem, 4vw, 3.2rem); right: clamp(1rem, 5vw, 4.5rem); font-size: clamp(3rem, 9vw, 7rem); opacity: .16; z-index: 1; pointer-events: none; transform: rotate(-4deg); }
.honour-groups { display: grid; gap: clamp(2.8rem, 5vw, 4.5rem); padding-bottom: clamp(4.5rem, 9vw, 8rem); }
.honour-group__head { max-width: 48rem; margin-bottom: 1.8rem; }
.honour-group__code { font-family: var(--ff-display); font-size: .72rem; letter-spacing: .2em; text-transform: uppercase; color: var(--gold-light); }
.honour-group__code::before { content: ""; display: inline-block; width: 22px; height: 1px; background: var(--gold-light); vertical-align: middle; margin-right: .7rem; }
.honour-group__title { font-family: var(--ff-display); font-weight: 300; font-size: clamp(1.5rem, 3vw, 2.15rem); color: var(--ivory); margin: .7rem 0 .8rem; line-height: 1.12; }
.honour-group__intro { color: rgba(250,246,236,.72); font-size: 1rem; margin: 0; }
.honour-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(168px, 1fr)); gap: 1.3rem; }
/* Each card stretches to its row height so a name that wraps past its reserved
   lines on a narrow screen grows every card in that row together — uniform cards,
   no single jagged outlier, without disturbing the card's centred internal flow. */
.honour-grid > li { display: grid; }
.honour-logo {
  background: linear-gradient(160deg, rgba(228,203,132,.20), rgba(20,38,63,.35));
  color: var(--gold-light); border: 1px solid rgba(228,203,132,.5);
  font-family: var(--ff-display); font-weight: 700; font-size: 1.5rem; letter-spacing: .06em; padding: .8rem; line-height: 1.15;
}
.honour-card { width: 100%; text-align: center; background: rgba(255,255,255,.04); border: 1px solid rgba(228,203,132,.25); border-radius: var(--radius); padding: 1.15rem; font: inherit; color: inherit; transition: transform .3s var(--ease), background .3s var(--ease), border-color .3s var(--ease); }
button.honour-card { cursor: pointer; }
button.honour-card:hover, button.honour-card:focus-visible { transform: translateY(-5px); background: rgba(255,255,255,.07); border-color: rgba(228,203,132,.5); }
/* One shared recipient frame — fixed height so every photo aligns across the grid;
   photos fill it (object-fit:cover), logos sit centered inside it */
.portrait, .honour-logo {
  width: 100%; max-width: 150px; aspect-ratio: 4 / 5; margin: 0 auto .85rem;
  display: flex; align-items: center; justify-content: center; text-align: center;
  border-radius: 14px; overflow: hidden;
}
.portrait img, .honour-logo img { width: 100%; height: 100%; }
.portrait img { object-fit: cover; }            /* a person's photo fills the frame */
.honour-logo img { object-fit: contain; padding: 1.1rem; }  /* a logo sits centered with room */
.honour-logo--fill { padding: 0; }                          /* opt-in: drop the inset so a solid-background logo fills the frame, like a portrait */
.honour-logo--fill img { object-fit: cover; padding: 0; }
.portrait {
  background: linear-gradient(160deg, var(--gold-light), var(--gold-deep));
  color: var(--navy); font-family: var(--ff-display); font-weight: 400; font-size: 1.9rem; letter-spacing: .04em;
  border: 1px solid rgba(228,203,132,.5);
}
/* Tag line + name mirror the winner card's diamond tag + headline, reserving
   constant heights so frames, tags and names align — and so every card holds the
   same footprint regardless of name length. The portrait is the aligned anchor at
   the top; below it the office label reserves up to two lines and the name up to
   three, so a one-line name and a three-line name yield identical card heights
   across the whole grid. Names are never truncated (post-nominals are part of the
   honour); shorter names simply carry balanced trailing space. Reserved heights are
   in em so they track the line-height at every breakpoint. */
.honour-card__name { display: block; font-family: var(--ff-display); font-size: 1.05rem; line-height: 1.3; min-height: 3.9em; text-wrap: balance; color: var(--ivory); margin-bottom: .5rem; }
.honour-card__sub { display: flex; flex-direction: column; justify-content: flex-end; align-items: center; font-family: var(--ff-display); font-size: .64rem; text-transform: uppercase; letter-spacing: .08em; color: var(--gold-light); line-height: 1.3; min-height: 2.6em; margin-bottom: .5rem; }
.honour-card__role { color: rgba(250,246,236,.7); font-size: .92rem; }
/* Tenure (former governors & vice governors) — the record is the office + years.
   The primary office sits in the gold eyebrow with its years below; any further
   office repeats that label-over-years structure, set off by a short centred rule
   that echoes the .honour-group__code motif so it reads as a deliberate second term. */
.honour-card__terms { display: block; }
.honour-card__years { display: block; font-family: var(--ff-body); font-size: .85rem; line-height: 1.45; letter-spacing: .02em; color: rgba(250,246,236,.72); font-variant-numeric: tabular-nums; }
.honour-card__term { display: block; margin-top: .55rem; }
.honour-card__term::before { content: ""; display: block; width: 24px; height: 1px; margin: 0 auto .5rem; background: var(--gold-light); opacity: .45; }
.honour-card__term-title { display: block; font-family: var(--ff-display); font-size: .58rem; text-transform: uppercase; letter-spacing: .12em; line-height: 1.3; color: var(--gold-light); opacity: .9; margin-bottom: .15rem; }

/* =========================================================
   Jury
   ========================================================= */
/* Group photo of the full panel, with a styled placeholder until a photo is set */
.jury-photo { position: relative; margin: 0 0 2.4rem; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--cream-deep); box-shadow: var(--shadow); }
.jury-photo__img { display: block; width: 100%; height: auto; }
.jury-photo__placeholder {
  position: relative; aspect-ratio: 16 / 6; min-height: 200px;
  display: flex; align-items: flex-end; padding: clamp(1.2rem, 3vw, 2rem);
  background: linear-gradient(150deg, var(--navy), var(--navy-2)); color: var(--ivory);
}
.jury-photo__placeholder > span { position: relative; font-family: var(--ff-display); font-size: .8rem; text-transform: uppercase; letter-spacing: .16em; color: var(--gold-light); }
.jury-photo__lattice { position: absolute; inset: 0; color: var(--gold-light); opacity: .06; pointer-events: none; }

/* Judging-panel carousel — crossfade slides with auto-advance */
.panel-carousel { padding: 0; }
.panel-carousel__viewport { position: relative; aspect-ratio: 16 / 9; background: var(--navy); }
.panel-carousel__slide { position: absolute; inset: 0; opacity: 0; transition: opacity .9s var(--ease); }
.panel-carousel__slide.is-active { opacity: 1; }
.panel-carousel__img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: center 38%; }

/* Caption + controls share one footer over a soft scrim, so they never collide */
.panel-carousel__foot {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 1; pointer-events: none;
  display: flex; align-items: flex-end; justify-content: space-between; gap: 1rem;
  padding: clamp(2.6rem, 7vw, 4rem) clamp(1.1rem, 3vw, 1.8rem) clamp(.9rem, 2.4vw, 1.4rem);
  background: linear-gradient(to top, rgba(20, 38, 63, .85), rgba(20, 38, 63, 0));
}
.panel-carousel__caption {
  margin: 0; min-width: 0; flex: 1 1 auto;
  font-family: var(--ff-display); font-size: clamp(.66rem, 2.1vw, .78rem);
  text-transform: uppercase; letter-spacing: .14em; line-height: 1.5; color: var(--gold-light);
}

/* Prev / next — desktop (hover-capable) only, revealed on hover or keyboard focus
   with a slow ease. The 1s delay on the resting state keeps the buttons visible for
   a beat after the pointer leaves before they ease back out. */
.panel-carousel__nav {
  position: absolute; top: 50%; transform: translateY(-50%); z-index: 3;
  width: 44px; height: 44px; display: grid; place-items: center;
  border-radius: 50%; border: 1px solid rgba(228, 203, 132, .45);
  background: rgba(20, 38, 63, .45); color: var(--gold-light); cursor: pointer;
  opacity: 0; pointer-events: none;
  transition: opacity .7s ease-in-out 1s, background .3s var(--ease), border-color .3s var(--ease);
}
.panel-carousel:hover .panel-carousel__nav,
.panel-carousel:focus-within .panel-carousel__nav {
  opacity: 1; pointer-events: auto;
  transition-delay: 0s;   /* ease in immediately; the 1s grace delay only applies on the way out */
}
.panel-carousel__nav:hover { background: rgba(20, 38, 63, .72); border-color: var(--gold-light); }
.panel-carousel__nav--prev { left: clamp(.6rem, 2vw, 1rem); }
.panel-carousel__nav--next { right: clamp(.6rem, 2vw, 1rem); }
/* Mobile / touch (no hover): hide the arrows — the carousel is navigated by swipe */
@media (hover: none), (pointer: coarse) { .panel-carousel__nav { display: none; } }
/* Honour reduced-motion: reveal instantly, no slow fade or grace delay */
@media (prefers-reduced-motion: reduce) { .panel-carousel__nav { transition-duration: .01ms; transition-delay: 0s; } }

/* Control bar — dots + pause/play, sits at the right of the footer */
.panel-carousel__bar {
  flex: 0 0 auto; pointer-events: auto;
  display: flex; align-items: center; gap: .9rem;
}
.panel-carousel__dots { display: flex; align-items: center; gap: .25rem; }
.panel-carousel__dot {
  width: 22px; height: 22px; padding: 0; display: grid; place-items: center;
  border: 0; background: transparent; cursor: pointer;
}
.panel-carousel__dot::before {
  content: ""; width: 9px; height: 9px; border-radius: 50%;
  border: 1px solid var(--gold-light); background: transparent;
  transition: background .3s var(--ease), transform .3s var(--ease);
}
.panel-carousel__dot:hover::before { background: rgba(228, 203, 132, .5); }
.panel-carousel__dot.is-active::before { background: var(--gold-light); transform: scale(1.18); }
.panel-carousel__play {
  width: 30px; height: 30px; display: grid; place-items: center; padding: 0;
  border-radius: 50%; border: 1px solid rgba(228, 203, 132, .5);
  background: rgba(20, 38, 63, .45); color: var(--gold-light); cursor: pointer;
  transition: background .3s var(--ease), border-color .3s var(--ease);
}
.panel-carousel__play:hover { background: rgba(20, 38, 63, .72); border-color: var(--gold-light); }
.panel-carousel__icon--play { display: none; }
.panel-carousel.is-paused .panel-carousel__icon--pause { display: none; }
.panel-carousel.is-paused .panel-carousel__icon--play { display: block; }

/* Names listed below the photo */
.jury-names { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 0 2.4rem; }
.jury-name { display: flex; flex-direction: column; gap: .12rem; padding: 1rem 0; border-top: 1px solid var(--cream-deep); }
.jury-name__name { font-family: var(--ff-display); font-size: 1.06rem; color: var(--ink); }
.jury-name__role { font-size: .9rem; color: var(--ink-soft); line-height: 1.4; }

/* =========================================================
   Gallery
   ========================================================= */
.section.gallery { padding-bottom: clamp(5rem, 10vw, 8rem); }
.gallery-grid { display: grid; grid-template-columns: repeat(4, 1fr); grid-auto-rows: 150px; gap: 1rem; }
.gallery-grid > li { display: grid; }   /* stretch the cell to the grid-auto-rows track height */
.gallery-cell { position: relative; display: block; width: 100%; height: 100%; border-radius: var(--radius); overflow: hidden; cursor: pointer; border: none; padding: 0; color: var(--ivory); font: inherit; }
.gallery-cell::before { content: ""; position: absolute; inset: 0; background: var(--grad, linear-gradient(135deg, var(--gold), var(--gold-deep))); transition: transform .5s var(--ease); }
.gallery-cell::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 40%, rgba(20,38,63,.65)); }
.gallery-cell:hover::before, .gallery-cell:focus-visible::before { transform: scale(1.06); }
.gallery-cell span { position: absolute; left: 1rem; bottom: .9rem; z-index: 2; font-family: var(--ff-display); font-size: .82rem; letter-spacing: .04em; }
.gallery-cell .gallery-cell__lattice { position: absolute; inset: 0; color: #fff; opacity: .07; z-index: 1; }
.gallery-cell--lg { grid-column: span 2; grid-row: span 2; }
.gallery-cell--wide { grid-column: span 2; }

/* =========================================================
   Footer
   ========================================================= */
.footer { background: var(--navy); color: rgba(250,246,236,.82); padding: clamp(3.5rem,6vw,5rem) var(--gut) 0; }
.footer__inner { max-width: var(--maxw); margin-inline: auto; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 2.5rem 4rem; padding-bottom: 3rem; }
.footer__brand { flex: 1 1 340px; }
.footer__contact { flex: 0 1 auto; }
.footer__logo { display: block; width: 240px; max-width: 100%; height: auto; margin-bottom: .4rem; }
.footer__org { margin-top: 1rem; color: rgba(250,246,236,.6); font-size: .92rem; max-width: 22rem; }
.footer__contact h4 { font-family: var(--ff-display); font-weight: 400; font-size: .78rem; text-transform: uppercase; letter-spacing: .16em; color: var(--gold-light); margin-bottom: 1rem; }
.footer__contact p { margin: 0 0 .4rem; font-size: .95rem; }
.footer__contact a { color: var(--ivory); text-decoration: none; border-bottom: 1px solid rgba(228,203,132,.4); }
.footer__contact a:hover { border-color: var(--gold-light); }
.footer__base { max-width: var(--maxw); margin-inline: auto; border-top: 1px solid rgba(255,255,255,.1); padding: 1.5rem 0; display: flex; justify-content: space-between; flex-wrap: wrap; gap: .6rem; font-size: .82rem; color: rgba(250,246,236,.5); }

/* =========================================================
   Modal
   ========================================================= */
.modal, .lightbox { position: fixed; inset: 0; z-index: 300; display: flex; align-items: center; justify-content: center;
  padding: max(1.2rem, env(safe-area-inset-top)) max(1.2rem, env(safe-area-inset-right)) max(1.2rem, env(safe-area-inset-bottom)) max(1.2rem, env(safe-area-inset-left)); }
.modal[hidden], .lightbox[hidden] { display: none; }
.modal__backdrop, .lightbox__backdrop { position: absolute; inset: 0; background: rgba(20,38,63,.55); backdrop-filter: blur(4px); animation: fadeIn .3s var(--ease); }
.modal__dialog {
  position: relative; z-index: 2; background: var(--ivory); border-radius: 18px; max-width: 720px; width: 100%;
  max-height: 90vh; max-height: min(90svh, 90dvh); overflow: hidden; display: flex; flex-direction: column; box-shadow: var(--shadow); animation: dialogIn .35s var(--ease);
}
@keyframes fadeIn { from { opacity: 0; } }
@keyframes dialogIn { from { opacity: 0; transform: translateY(24px) scale(.98); } }
.modal__close, .lightbox__close {
  position: absolute; top: 1rem; right: 1rem; z-index: 5; width: 44px; height: 44px; border-radius: 50%;
  border: 1px solid var(--cream-deep); background: var(--white); color: var(--ink); cursor: pointer;
  display: flex; align-items: center; justify-content: center; transition: background .2s var(--ease);
}
.modal__close:hover { background: var(--cream); }
.modal__body { padding: clamp(1.8rem, 4vw, 3rem); overflow-y: auto; min-height: 0; }   /* body scrolls; close button stays pinned to the dialog */
.modal__cat { display: block; padding-right: 2.75rem; font-family: var(--ff-display); font-size: .74rem; text-transform: uppercase; letter-spacing: .16em; color: var(--gold-text); }   /* keep the label clear of the pinned close button */
.modal__logo { margin: 1.1rem 0 1.3rem; }
.modal__name { font-size: clamp(1.8rem, 3.5vw, 2.6rem); margin-bottom: .4rem; }
.modal__name--honour { font-size: clamp(1.4rem, 2.6vw, 1.85rem); margin-bottom: 1.1rem; }
.modal__entity { font-family: var(--ff-body); font-size: 1.05rem; color: var(--ink-soft); margin: 0 0 1.2rem; }
.modal__cite { font-family: var(--ff-body); font-style: italic; font-size: 1.18rem; line-height: 1.5; color: var(--ink); margin-bottom: 1.8rem; padding-top: 1.25rem; position: relative; }
.modal__cite::before { content: ""; position: absolute; top: 0; left: 0; width: 2.5rem; height: 2px; background: var(--gold); }   /* a short gold rule marks the citation (brand divider language, not a side-stripe) */
/* When no descriptor sits between the name and the citation, restore the breathing
   room the descriptor would have provided. */
.modal__name + .modal__cite { margin-top: 1.2rem; }
.modal__h { font-family: var(--ff-display); font-size: .78rem; text-transform: uppercase; letter-spacing: .14em; color: var(--ink-soft); margin: 1.8rem 0 .9rem; }
.modal__impact { display: grid; gap: .7rem; }
/* Tenure list shown in honour modals for former governors & vice governors */
.honour-terms { margin: .2rem 0 0; display: grid; gap: .55rem; }
.honour-terms > div { display: flex; justify-content: space-between; gap: 1rem; align-items: baseline; border-top: 1px solid var(--cream); padding-top: .55rem; }
.honour-terms dt { font-family: var(--ff-display); font-size: .78rem; text-transform: uppercase; letter-spacing: .1em; color: var(--gold-text); }
.honour-terms dd { margin: 0; color: var(--ink-soft); font-variant-numeric: tabular-nums; white-space: nowrap; }
.modal__impact li { position: relative; padding-left: 1.5rem; color: var(--ink); }
.modal__impact li::before { content: ""; position: absolute; left: 0; top: .62em; width: 7px; height: 7px; background: var(--gold); transform: rotate(45deg); }
.modal__finalists { display: flex; flex-wrap: wrap; gap: .6rem; }
.fin-chip { font-family: var(--ff-display); font-size: .82rem; background: var(--cream); border: 1px solid var(--cream-deep); border-radius: 999px; padding: .4rem .9rem; color: var(--ink-soft); }

/* Category detail popup: entry-route / group / target list */
.cat-detail { display: grid; gap: .75rem; margin: 0 0 .4rem; padding: 1.1rem 1.2rem; background: var(--cream); border-radius: 10px; }
.cat-detail > div { display: grid; grid-template-columns: 9.5rem 1fr; gap: .8rem; align-items: baseline; }
.cat-detail dt { font-family: var(--ff-display); font-size: .72rem; text-transform: uppercase; letter-spacing: .12em; color: var(--gold-text); }
.cat-detail dd { margin: 0; color: var(--ink); }
@media (max-width: 560px) { .cat-detail > div { grid-template-columns: 1fr; gap: .2rem; } }

/* Lightbox */
.lightbox__nav {
  position: absolute; top: 50%; transform: translateY(-50%); z-index: 5; width: 48px; height: 48px; border-radius: 50%;
  border: 1px solid var(--cream-deep); background: var(--white); color: var(--ink); cursor: pointer;
  display: flex; align-items: center; justify-content: center; transition: background .2s var(--ease);
}
.lightbox__nav:hover { background: var(--cream); }
.lightbox__nav--prev { left: clamp(.6rem, 3vw, 2rem); }
.lightbox__nav--next { right: clamp(.6rem, 3vw, 2rem); }
@media (max-width: 640px) { .lightbox__nav { display: none; } }   /* mobile navigates by swipe instead */
.lightbox__figure { position: relative; z-index: 2; margin: 0; width: min(900px, 92vw); }
.lightbox__img { aspect-ratio: 16/10; border-radius: 14px; display: flex; align-items: flex-end; padding: 1.6rem; color: var(--ivory); position: relative; overflow: hidden; }
.lightbox__img .gallery-cell__lattice { opacity: .08; }
.lightbox figcaption { color: var(--ivory); font-family: var(--ff-display); margin-top: 1rem; letter-spacing: .04em; }

/* =========================================================
   Scroll reveal
   ========================================================= */
html.js .reveal { opacity: 0; transform: translateY(28px); transition: opacity .8s var(--ease), transform .8s var(--ease); }
html.js .reveal.is-in { opacity: 1; transform: none; }

/* =========================================================
   Responsive
   ========================================================= */
@media (max-width: 860px) {
  .nav__links { position: fixed; inset: 0 0 0 auto; width: min(80vw, 330px); flex-direction: column; gap: .5rem;
    background: var(--ivory); padding: 5.5rem 1.6rem 2rem; transform: translateX(100%); transition: transform .35s var(--ease);
    box-shadow: var(--shadow); z-index: 105; overflow-y: auto; -webkit-overflow-scrolling: touch; max-height: 100svh; }
  .nav.is-open .nav__links { transform: none; }
  .nav__links a { min-height: 44px; display: flex; align-items: center; }
  .nav__scrim { position: fixed; inset: 0; z-index: 104; background: rgba(20, 38, 63, .5); backdrop-filter: blur(3px);
    opacity: 0; pointer-events: none; transition: opacity .35s var(--ease); border: 0; cursor: pointer; }
  .nav.is-open .nav__scrim { opacity: 1; pointer-events: auto; }
  .nav__toggle { display: flex; flex-direction: column; gap: 5px; justify-content: center; align-items: center;
    background: none; border: 0; cursor: pointer; min-width: 44px; min-height: 44px; z-index: 110; }
  .nav__toggle span { width: 26px; height: 2px; background: var(--ink); transition: transform .3s var(--ease), opacity .3s var(--ease); }
  .nav.is-open .nav__toggle span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .nav.is-open .nav__toggle span:nth-child(2) { opacity: 0; }
  .nav.is-open .nav__toggle span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

  .hero__inner { flex-direction: column; align-items: flex-start; }
  .hero__copy { flex: none; }
  .hero__award { flex: none; align-self: center; width: 100%; margin-top: 2.5rem; }
  .hero__award-img { max-width: 240px; max-height: 46svh; }

  .about__cols { columns: 1; }
  .figures { grid-template-columns: repeat(2, 1fr); }
  .cat-grid { grid-template-columns: repeat(2, 1fr); }
  .cat-card--feature { grid-template-columns: 1fr; gap: 1rem; }
  .cat-feature__route { justify-self: start; }
  .timeline { grid-template-columns: 1fr 1fr; gap: 1.8rem 1rem; }
  .timeline::before { display: none; }
  .timeline li { padding: 1.8rem 0 0; text-align: left; }
  .timeline li::before { display: none; }
  .gallery-grid { grid-template-columns: repeat(2, 1fr); }
  .footer__inner { flex-direction: column; gap: 2rem; }
  /* Column layout turns flex-basis into a height — drop the 340px row basis so the
     brand block hugs its content instead of padding out to 340px tall. */
  .footer__brand { flex: 0 0 auto; }
}
@media (min-width: 861px) {
  .nav__scrim { display: none; }
}
@media (max-width: 480px) {
  .figures { grid-template-columns: 1fr; }
  .cat-grid { grid-template-columns: 1fr; }
  .timeline { grid-template-columns: 1fr; }
  .gallery-grid { grid-template-columns: 1fr; grid-auto-rows: 180px; }
  .gallery-cell--lg, .gallery-cell--wide { grid-column: span 1; grid-row: span 1; }

  /* Honours: a dense 2-up wall instead of one sparse single-file column
     (portrait size/shape is governed by the shared aspect-ratio:4/5 frame) */
  .honour-grid { grid-template-columns: repeat(2, 1fr); gap: 1rem; }
  .honour-card { padding: 1.1rem .8rem; }
  .honour-card__sub { white-space: normal; }

  /* Rubric switcher: 7 tabs overflow — fade the right edge + snap so 06/07 are discoverable */
  .rubric-switch { scroll-snap-type: x proximity;
    -webkit-mask-image: linear-gradient(90deg, #000 78%, transparent);
    mask-image: linear-gradient(90deg, #000 78%, transparent); }
  .rubric-tab { scroll-snap-align: start; }
}

/* Narrow phones: keep the jury placeholder's tracked label from clipping at the edge */
@media (max-width: 560px) {
  .jury-photo__placeholder { aspect-ratio: 16 / 9; min-height: 0; }   /* let width stay container-bound; height follows the ratio */
  .jury-photo__placeholder > span { font-size: .7rem; letter-spacing: .08em; line-height: 1.4; }
}

/* Touch devices: meet the 44px tap-target floor without changing mouse/desktop density */
@media (pointer: coarse) {
  .rubric-tab { display: inline-flex; align-items: center; min-height: 44px; padding-block: .85rem; }
  .ring-leg__row { min-height: 44px; padding-block: .7rem; }
  .footer__contact p { margin-bottom: .55rem; }
  .footer__contact a { display: inline-flex; align-items: flex-end; min-height: 44px; }   /* full tap height, underline stays tight to the text */
}

/* Mobile: a proper vertical timeline — a gold rail with a node per step down the left edge */
@media (max-width: 640px) {
  .timeline { display: block; grid-template-columns: none; margin-top: 3.25rem; padding-left: 1.25rem; }
  .timeline::before { display: block; top: .5rem; bottom: .5rem; left: calc(1.25rem + 6px); right: auto; width: 2px; height: auto;
    background: linear-gradient(180deg, var(--cream-deep), var(--gold) 92%); }
  .timeline li { position: relative; display: flex; flex-direction: column; padding: 0 0 1.9rem 2.1rem; text-align: left; }
  .timeline li:last-child { padding-bottom: 0; }
  .timeline li::after { position: static; order: -1; margin-bottom: .25rem; }   /* leading-zero step number, above the step name */
  .timeline li::before { display: block; top: .2rem; left: 0; transform: none; }  /* node dot sitting on the rail */
}

/* =========================================================
   Agenda — unlisted /agenda page (ceremony running order)
   Standalone page; reuses the shared tokens + .eyebrow/.pill/.divider.
   ========================================================= */
.ag-hero {
  position: relative; text-align: center;
  max-width: var(--maxw); margin-inline: auto;
  padding: clamp(2.5rem, 7vw, 4.5rem) var(--gut) clamp(1.75rem, 4vw, 2.5rem);
}
.ag-hero__logo { display: block; width: max-content; max-width: 100%;
  margin: 0 auto clamp(1.6rem, 3.8vw, 2.4rem); }
.ag-hero__logo img { width: clamp(210px, 42vw, 320px); height: auto; display: block; }
.ag-hero .eyebrow { margin-bottom: 1.15rem; }
.ag-hero .eyebrow::before { content: none; }   /* no leading dash on the agenda eyebrow */
/* Match the bottom lattice: long, gentle fades instead of a quick ramp. */
.ag-hero .section-lattice {
  -webkit-mask-image: linear-gradient(90deg, #000 0%, transparent 60%), linear-gradient(180deg, transparent 0%, #000 20%, #000 50%, transparent 100%);
  mask-image: linear-gradient(90deg, #000 0%, transparent 60%), linear-gradient(180deg, transparent 0%, #000 20%, #000 50%, transparent 100%);
}
/* Faithful PDF lockup: MMA · celebrating line · & · MFSA */
.ag-hero__title { font-family: var(--ff-title); font-weight: 600; letter-spacing: -0.01em;
  font-size: clamp(1.9rem, 4.6vw, 3rem); line-height: 1.06; color: var(--ink); }
.ag-hero__cele { margin: .7rem auto 0; max-width: 34rem; color: var(--ink-soft);
  font-family: var(--ff-body); font-style: italic; font-size: clamp(1rem, 2vw, 1.16rem); line-height: 1.5; }
.ag-hero__amp { display: block; font-family: var(--ff-script); color: var(--gold);
  font-size: clamp(2.6rem, 5.5vw, 3.6rem); line-height: .5; margin: .35rem 0 .25rem; }
.ag-hero__event { margin: 0; font-family: var(--ff-display); font-weight: 300;
  font-size: clamp(1.35rem, 3.3vw, 2.1rem); line-height: 1.12; color: var(--ink); }

.ag-meta {
  display: flex; flex-wrap: wrap; justify-content: center; gap: clamp(.9rem, 4vw, 3rem);
  max-width: 40rem; margin: clamp(1.7rem, 4vw, 2.4rem) auto 0;
  padding-top: clamp(1.3rem, 3vw, 1.7rem); border-top: 1px solid var(--cream-deep);
}
.ag-meta > div { text-align: center; }
.ag-meta dt { font-family: var(--ff-display); font-weight: 700; text-transform: uppercase;
  letter-spacing: .2em; font-size: .66rem; color: var(--gold-text); margin-bottom: .4rem; }
.ag-meta dd { margin: 0; font-family: var(--ff-sans); font-size: clamp(1rem, 2.4vw, 1.14rem); color: var(--ink); }

.ag-order { padding-top: clamp(1rem, 3vw, 2rem); }
/* Keep the bottom-right lattice to a compact patch (like the hero's), anchored
   above the footer rather than spanning the full programme height. A long, gentle
   top fade eases it in gradually instead of hard-cutting. */
.ag-order .section-lattice {
  top: auto; height: clamp(400px, 48vw, 600px);
  -webkit-mask-image: linear-gradient(90deg, transparent 42%, #000 100%), linear-gradient(180deg, transparent 0%, #000 68%, #000 92%, transparent 100%);
  mask-image: linear-gradient(90deg, transparent 42%, #000 100%), linear-gradient(180deg, transparent 0%, #000 68%, #000 92%, transparent 100%);
}

/* --- The running-order timeline --- */
.programme { --time-col: clamp(46px, 12vw, 62px); position: relative; max-width: 700px; margin: clamp(1.5rem, 4vw, 2.5rem) auto 0; }
.programme::before {                                  /* the continuous gold spine */
  content: ""; position: absolute; top: 16px; bottom: 24px;
  left: calc(var(--time-col) + 21px); width: 2px; transform: translateX(-1px);
  background: linear-gradient(180deg, var(--gold), var(--gold) 84%, transparent);
  opacity: .38;
}
.prog-item {
  position: relative; display: grid; align-items: start;
  grid-template-columns: var(--time-col) 42px minmax(0, 1fr);
  padding-block: clamp(.7rem, 1.9vw, 1.05rem);
}
.prog-item__time { text-align: right; padding: 3px 2px 0 0;
  font-family: var(--ff-display); font-weight: 700; font-size: .84rem; letter-spacing: .01em;
  line-height: 1.3; color: var(--gold-text); white-space: nowrap; }

.prog-item__node { display: flex; justify-content: center; padding-top: 2px; }
.prog-item__dot { position: relative; z-index: 1; display: grid; place-items: center;
  width: 26px; height: 26px; border-radius: 50%; background: var(--ivory); color: var(--gold); }
.prog-item__mark { display: block; }

.prog-item__body { padding-left: clamp(.5rem, 2vw, 1.05rem); padding-top: 1px; }
.prog-item__title { font-family: var(--ff-sans); font-weight: 500; letter-spacing: 0;
  font-size: clamp(1.02rem, 2.4vw, 1.16rem); line-height: 1.32; color: var(--ink); }
.prog-item__person { margin: .3rem 0 0; font-family: var(--ff-body); font-size: 1rem;
  line-height: 1.5; color: var(--ink-soft); }
.prog-item__person-name { font-family: var(--ff-sans); font-weight: 500; color: var(--ink); }

/* Muted bookends — arrival & refreshments read as quiet brackets */
.prog-item--muted .prog-item__dot { color: var(--cream-deep); }
.prog-item--muted .prog-item__title { font-family: var(--ff-body); font-style: italic;
  font-weight: 400; font-size: 1.04rem; color: var(--ink-soft); }
.prog-item--muted .prog-item__time { color: var(--ink-soft); }

/* The centrepiece — quiet standout: a filled node + a soft cream panel, no heavy
   border/shadow, spaced clear of the timeline so nothing overlaps. */
.prog-item--feature .prog-item__time { color: var(--gold-deep); }
/* Centrepiece stands out through a gold title + filled node — no card.
   Uses the AA-legible bronze (the Two-Golds rule for gold text on light). */
.prog-item--feature .prog-item__title { color: var(--gold-text); }

/* Minimal footer — no logo, just a quiet sign-off */
.ag-foot { text-align: center; margin-top: clamp(2.5rem, 6vw, 4rem);
  padding: clamp(1.8rem, 4vw, 2.6rem) var(--gut); border-top: 1px solid var(--cream-deep); }
.ag-foot__copy { margin: 0; font-family: var(--ff-display); font-size: .82rem;
  letter-spacing: .04em; color: var(--ink-soft); }

@media (max-width: 560px) {
  .programme { --time-col: 44px; }
  .prog-item { grid-template-columns: var(--time-col) 34px minmax(0, 1fr); }
  .programme::before { left: calc(var(--time-col) + 17px); }
  .prog-item__time { font-size: .78rem; }
  .prog-item__dot { width: 22px; height: 22px; }
}
