/* ==========================================================================
   IIA Odisha Chapter
   Design system — "Datum"
   Reference: architectural elevation drawings. Indigo (cyanotype / Indian
   indigo) on cool khondalite grey. Sans display for signage, serif for
   long-form reading, mono for drawing annotation.
   ========================================================================== */

/* ---------- Tokens ---------- */
:root {
  --ink:        #16151A;
  --ink-80:     #34323C;
  --ink-60:     #5C5967;
  --ink-40:     #8B8894;
  --ink-20:     #BFBCC6;

  --rule:       #DEDCE3;
  --rule-soft:  #ECEAEF;
  --paper:      #F7F6F8;
  --surface:    #FFFFFF;

  --indigo:     #2A35A0;
  --indigo-700: #1E2778;
  --indigo-100: #E7E8F6;

  --font-display: "Bricolage Grotesque", "Archivo", system-ui, sans-serif;
  --font-body:    "Newsreader", Georgia, "Times New Roman", serif;
  --font-mono:    "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, monospace;

  --wrap: 1280px;
  --gut:  clamp(1.25rem, 4vw, 4rem);

  --step--1: clamp(0.8125rem, 0.79rem + 0.12vw, 0.875rem);
  --step-0:  clamp(1rem, 0.96rem + 0.2vw, 1.125rem);
  --step-1:  clamp(1.25rem, 1.16rem + 0.45vw, 1.5rem);
  --step-2:  clamp(1.5rem, 1.3rem + 1vw, 2.25rem);
  --step-3:  clamp(2rem, 1.6rem + 2vw, 3.25rem);
  --step-4:  clamp(2.75rem, 1.9rem + 4.2vw, 5.5rem);

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

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; overflow-x: clip; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: var(--step-0);
  line-height: 1.62;
  font-optical-sizing: auto;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img, svg, video, iframe { max-width: 100%; display: block; }
img { height: auto; }
a { color: inherit; text-decoration: none; }
button, input, textarea, select { font: inherit; color: inherit; }
h1, h2, h3, h4, h5 { margin: 0; font-family: var(--font-display); font-weight: 500; line-height: 1.05; letter-spacing: -0.02em; }
p { margin: 0 0 1.1em; }
ul { margin: 0; padding: 0; list-style: none; }
hr { border: 0; border-top: 1px solid var(--rule); margin: 0; }

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

::selection { background: var(--indigo); color: #fff; }

.skip {
  position: absolute; left: -9999px; top: 0; z-index: 999;
  background: var(--ink); color: #fff; padding: .75rem 1.25rem;
  font-family: var(--font-mono); font-size: .75rem;
}
.skip:focus { left: 0; }

/* ---------- Layout primitives ---------- */
.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: var(--gut);
}

.mono {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-weight: 500;
}

.dsp { font-family: var(--font-display); }

/* ---------- Header ---------- */
.hdr {
  position: sticky; top: 0; z-index: 60;
  background: rgba(247, 246, 248, 0.86);
  backdrop-filter: blur(14px) saturate(1.4);
  -webkit-backdrop-filter: blur(14px) saturate(1.4);
  border-bottom: 1px solid var(--rule);
  transition: border-color .3s var(--ease);
}
.hdr__in {
  display: flex; align-items: center; gap: 1.5rem;
  min-height: 76px;
}
.brand { display: flex; align-items: center; gap: .75rem; margin-right: auto; }
.brand img { width: 42px; height: 42px; object-fit: contain; }
.brand__mark {
  width: 42px; height: 42px; flex: none;
  border: 1px solid var(--ink); display: grid; place-items: center;
  font-family: var(--font-display); font-size: .8rem; font-weight: 600; letter-spacing: .02em;
}
.brand__txt { display: flex; flex-direction: column; line-height: 1.1; }
.brand__name {
  font-family: var(--font-display); font-size: 1.0625rem; font-weight: 600;
  letter-spacing: -0.015em;
}
.brand__sub {
  font-family: var(--font-mono); font-size: .5625rem; letter-spacing: .2em;
  text-transform: uppercase; color: var(--ink-40); margin-top: 3px;
}

/* Nav */
.nav > ul { display: flex; align-items: center; gap: .25rem; }
.nav li { position: relative; }
.nav a {
  display: block; padding: .6rem .7rem;
  font-family: var(--font-display); font-size: .875rem; font-weight: 500;
  letter-spacing: -0.005em; color: var(--ink-80);
  transition: color .2s var(--ease);
}
.nav a:hover { color: var(--indigo); }
.nav > ul > li > a::after {
  content: ""; display: block; height: 1px; margin-top: 4px;
  background: var(--indigo); transform: scaleX(0); transform-origin: left;
  transition: transform .28s var(--ease);
}
.nav > ul > li > a:hover::after,
.nav > ul > li > a.is-active::after { transform: scaleX(1); }
.nav a.is-active { color: var(--ink); }

.nav .has-sub > a::before {
  content: ""; float: right; width: 6px; height: 6px; margin: 7px 0 0 6px;
  border-right: 1px solid currentColor; border-bottom: 1px solid currentColor;
  transform: rotate(45deg);
}
.nav .sub {
  position: absolute; top: 100%; left: 0; min-width: 216px;
  background: var(--surface); border: 1px solid var(--rule);
  padding: .4rem; opacity: 0; visibility: hidden; transform: translateY(6px);
  transition: all .22s var(--ease); box-shadow: 0 18px 40px -24px rgba(22,21,26,.4);
}
.nav .has-sub:hover .sub,
.nav .has-sub:focus-within .sub { opacity: 1; visibility: visible; transform: none; }
.nav .sub a { padding: .55rem .75rem; font-size: .8125rem; }
.nav .sub a:hover { background: var(--indigo-100); }

.btn-join {
  margin-left: .75rem;
  background: var(--indigo); color: #fff !important;
  padding: .68rem 1.15rem !important;
  font-family: var(--font-mono) !important; font-size: .6875rem !important;
  letter-spacing: .12em; text-transform: uppercase;
  transition: background .2s var(--ease);
}
.btn-join:hover { background: var(--indigo-700); }
.btn-join::after { display: none !important; }

.burger {
  display: none; width: 44px; height: 44px; background: none;
  border: 1px solid var(--rule); cursor: pointer; padding: 0;
  align-items: center; justify-content: center;
}
.burger span { display: block; width: 18px; height: 1px; background: var(--ink); position: relative; }
.burger span::before, .burger span::after {
  content: ""; position: absolute; left: 0; width: 18px; height: 1px; background: var(--ink);
  transition: transform .25s var(--ease), top .25s var(--ease);
}
.burger span::before { top: -6px; }
.burger span::after  { top: 6px; }
.nav-open .burger span { background: transparent; }
.nav-open .burger span::before { top: 0; transform: rotate(45deg); }
.nav-open .burger span::after  { top: 0; transform: rotate(-45deg); }

/* ---------- Datum rail (signature) ---------- */
.rail {
  position: fixed; left: 22px; top: 50%; transform: translateY(-50%);
  z-index: 40; display: none; padding-left: 12px;
}
.rail::before {
  content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 1px;
  background: var(--rule);
}
.rail a {
  display: flex; align-items: center; gap: .55rem;
  padding: .42rem 0; color: var(--ink-40);
  font-family: var(--font-mono); font-size: .5625rem; letter-spacing: .16em;
  text-transform: uppercase; transition: color .25s var(--ease);
}
.rail a::before {
  content: ""; width: 10px; height: 1px; background: var(--ink-20);
  transition: width .3s var(--ease), background .25s var(--ease);
}
.rail a span { opacity: .55; transition: opacity .25s var(--ease); }
.rail a:hover { color: var(--ink); }
.rail a:hover::before { width: 18px; background: var(--ink-60); }
.rail a.is-current { color: var(--indigo); }
.rail a.is-current::before { width: 22px; background: var(--indigo); }
.rail a.is-current span { opacity: 1; }

/* ---------- Hero ---------- */
.hero { position: relative; background: var(--ink); overflow: hidden; }
.hero__stage { position: relative; height: clamp(460px, 78vh, 760px); }
.hero__slide {
  position: absolute; inset: 0; opacity: 0;
  transition: opacity 1.2s var(--ease);
}
.hero__slide.is-on { opacity: 1; }
.hero__slide img,
.hero__slide .ph { width: 100%; height: 100%; object-fit: cover; }
.hero__slide::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(10,10,14,.55) 0%, rgba(10,10,14,.20) 38%, rgba(10,10,14,.82) 100%);
}
.hero__body {
  position: absolute; inset: auto 0 0 0; z-index: 2;
  padding-bottom: clamp(2.5rem, 6vw, 4.5rem);
  color: #fff;
}
.hero__eyebrow {
  color: rgba(255,255,255,.72); margin-bottom: 1.1rem;
  display: flex; align-items: center; gap: .7rem;
}
.hero__eyebrow::before {
  content: ""; width: 34px; height: 1px; background: rgba(255,255,255,.5);
}
.hero__title {
  font-size: var(--step-4); font-weight: 500; letter-spacing: -0.035em;
  max-width: 17ch; text-wrap: balance;
}
.hero__sub {
  font-family: var(--font-body); font-size: var(--step-1);
  color: rgba(255,255,255,.8); max-width: 46ch; margin-top: 1.1rem;
}
.hero__foot {
  display: flex; flex-wrap: wrap; align-items: center; gap: 1.5rem;
  margin-top: 2.2rem;
}
.hero__dots { display: flex; gap: 6px; margin-left: auto; }
.hero__dots button {
  width: 26px; height: 2px; padding: 0; border: 0; cursor: pointer;
  background: rgba(255,255,255,.32); transition: background .3s var(--ease);
}
.hero__dots button.is-on { background: #fff; }

/* ---------- Page banner (inner pages) ---------- */
.banner { position: relative; background: var(--ink); color: #fff; overflow: hidden; }
.banner__bg { position: absolute; inset: 0; }
.banner__bg img, .banner__bg .ph { width: 100%; height: 100%; object-fit: cover; opacity: .5; }
.banner__bg::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(10,10,14,.55), rgba(10,10,14,.85));
}
.banner__in {
  position: relative; z-index: 2;
  padding-block: clamp(4rem, 11vw, 8rem) clamp(2.5rem, 6vw, 4rem);
}
.banner h1 { font-size: var(--step-3); letter-spacing: -0.035em; }
.banner__sub { color: rgba(255,255,255,.72); margin-top: .9rem; max-width: 52ch; }
.crumbs { display: flex; gap: .55rem; align-items: center; color: rgba(255,255,255,.6); margin-bottom: 1.4rem; }
.crumbs a:hover { color: #fff; }
.crumbs span[aria-hidden] { opacity: .45; }

/* ---------- Sections ---------- */
.sec { padding-block: clamp(3.5rem, 8vw, 7rem); border-top: 1px solid var(--rule); }
.sec:first-of-type { border-top: 0; }
.sec--tint { background: var(--surface); }
.sec--dark { background: var(--ink); color: #fff; border-top-color: rgba(255,255,255,.12); }
.sec--dark .sec-head__label { color: rgba(255,255,255,.5); }
.sec--dark .sec-head__title { color: #fff; }

.sec-head {
  display: grid; grid-template-columns: 180px minmax(0, 1fr);
  gap: clamp(1rem, 3vw, 3rem);
  padding-bottom: clamp(1.75rem, 4vw, 3rem);
}
.sec-head__label {
  color: var(--ink-40); padding-top: .55rem; min-height: 1px;
  border-top: 1px solid var(--indigo); align-self: start;
}
.sec-head__label:empty { border-top-width: 2px; }
.sec-head__title {
  font-size: var(--step-3); letter-spacing: -0.035em; max-width: 20ch; text-wrap: balance;
}
.sec-head__intro {
  margin-top: 1.1rem; color: var(--ink-60); max-width: 62ch;
  font-size: var(--step-1); line-height: 1.55;
}
.sec-body { display: grid; grid-template-columns: 180px minmax(0, 1fr); gap: clamp(1rem, 3vw, 3rem); }
.sec-body--full { grid-template-columns: 1fr; }
/* Empty datum column: a rule, not a gap. */
.sec-body__sp { border-top: 1px solid var(--rule); height: 0; }

/* Prose */
.prose { max-width: 68ch; }
.prose p { color: var(--ink-80); }
.prose p:last-child { margin-bottom: 0; }
.prose--lead p { font-size: var(--step-1); line-height: 1.6; color: var(--ink); }
.prose h2 { font-size: var(--step-2); margin: 2.2rem 0 .8rem; }
.prose h3 { font-size: var(--step-1); margin: 2rem 0 .7rem; }
.prose ul { margin: 0 0 1.2em; }
.prose ul li {
  position: relative; padding-left: 1.5rem; margin-bottom: .55rem; color: var(--ink-80);
}
.prose ul li::before {
  content: ""; position: absolute; left: 0; top: .72em;
  width: 8px; height: 1px; background: var(--indigo);
}
.prose a { color: var(--indigo); text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }

/* Checklist (About points) */
.checks { display: grid; gap: 0; margin-top: 2rem; }
.checks li {
  display: grid; grid-template-columns: 44px 1fr; gap: 1rem;
  padding: 1.35rem 0; border-top: 1px solid var(--rule);
  color: var(--ink-80);
}
.checks li:last-child { border-bottom: 1px solid var(--rule); }
.checks li .n { font-family: var(--font-mono); font-size: .6875rem; color: var(--indigo); padding-top: .35rem; letter-spacing: .1em; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: .6rem;
  padding: .95rem 1.5rem; border: 1px solid var(--ink); background: var(--ink); color: #fff;
  font-family: var(--font-mono); font-size: .6875rem; letter-spacing: .13em; text-transform: uppercase;
  cursor: pointer; transition: background .22s var(--ease), border-color .22s var(--ease), color .22s var(--ease);
}
.btn:hover { background: var(--indigo); border-color: var(--indigo); }
.btn--ghost { background: transparent; color: var(--ink); }
.btn--ghost:hover { background: var(--ink); color: #fff; }
.btn--light { background: #fff; border-color: #fff; color: var(--ink); }
.btn--light:hover { background: transparent; color: #fff; }
.btn__arrow { transition: transform .25s var(--ease); }
.btn:hover .btn__arrow { transform: translateX(4px); }

/* Text link with rule */
.tlink {
  display: inline-flex; align-items: center; gap: .5rem;
  font-family: var(--font-mono); font-size: .6875rem; letter-spacing: .13em;
  text-transform: uppercase; color: var(--indigo);
  border-bottom: 1px solid currentColor; padding-bottom: 3px;
  transition: gap .22s var(--ease);
}
.tlink:hover { gap: .85rem; }

/* ---------- Placeholder frame ---------- */
.ph {
  aspect-ratio: var(--ratio, 4 / 3);
  background:
    repeating-linear-gradient(-45deg, transparent 0 9px, rgba(22,21,26,.045) 9px 10px),
    var(--rule-soft);
  border: 1px solid var(--rule);
  display: grid; place-items: center; width: 100%;
}
.ph span {
  font-family: var(--font-mono); font-size: .5625rem; letter-spacing: .2em;
  text-transform: uppercase; color: var(--ink-40);
}
.sec--dark .ph, .hero .ph, .banner .ph { background: #22212A; border-color: rgba(255,255,255,.1); }

/* ---------- Officers (large member rows) ---------- */
.officer {
  display: grid; grid-template-columns: minmax(0, 300px) minmax(0, 1fr);
  gap: clamp(1.5rem, 4vw, 3.5rem); align-items: start;
  padding: clamp(2rem, 4vw, 3rem) 0; border-top: 1px solid var(--rule);
}
.officer:last-child { border-bottom: 1px solid var(--rule); }
.officer__pic img, .officer__pic .ph { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; }
.officer__role { color: var(--indigo); margin-bottom: .6rem; }
.officer h3 { font-size: var(--step-2); letter-spacing: -0.03em; }
.officer__bio { margin-top: 1rem; color: var(--ink-60); max-width: 68ch; }
.social { display: flex; gap: .5rem; margin-top: 1.4rem; }
.social a {
  width: 36px; height: 36px; border: 1px solid var(--rule);
  display: grid; place-items: center; color: var(--ink-60);
  transition: all .2s var(--ease);
}
.social a:hover { background: var(--indigo); border-color: var(--indigo); color: #fff; }
.social svg { width: 15px; height: 15px; }

/* ---------- Member grid ---------- */
.mgrid {
  display: grid; gap: 1px; background: var(--rule);
  border: 1px solid var(--rule);
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
}
.mcard {
  background: var(--surface); padding: 1.5rem;
  display: flex; flex-direction: column; gap: 1rem;
  transition: background .25s var(--ease);
}
.mcard:hover { background: var(--indigo-100); }
.mcard__pic { width: 100%; }
.mcard__pic img, .mcard__pic .ph { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; filter: grayscale(1); transition: filter .4s var(--ease); }
.mcard:hover .mcard__pic img { filter: grayscale(0); }
.mcard h4 { font-size: 1.0625rem; letter-spacing: -0.02em; }
.mcard__role { color: var(--ink-40); margin-top: .35rem; }
.mcard__bio { font-size: var(--step--1); color: var(--ink-60); margin-top: .6rem; line-height: 1.55; }

/* ---------- Services ---------- */
.svc { display: grid; gap: 1px; background: var(--rule); border: 1px solid var(--rule); grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.svc__item {
  background: var(--surface); padding: clamp(1.6rem, 3vw, 2.4rem);
  position: relative; transition: background .25s var(--ease);
}
.svc__item:hover { background: var(--indigo); color: #fff; }
.svc__item:hover .svc__desc, .svc__item:hover .svc__idx { color: rgba(255,255,255,.75); }
.svc__idx { font-family: var(--font-mono); font-size: .625rem; letter-spacing: .16em; color: var(--ink-40); }
.svc__item h3 { font-size: var(--step-1); margin-top: 1.6rem; letter-spacing: -0.025em; }
.svc__desc { margin-top: .7rem; color: var(--ink-60); font-size: var(--step--1); line-height: 1.6; }

/* ---------- Gallery / portfolio ---------- */
.filters {
  display: flex; flex-wrap: wrap; gap: .4rem;
  padding-bottom: 2rem;
}
.filters button {
  background: none; border: 1px solid var(--rule); cursor: pointer;
  padding: .6rem 1rem; color: var(--ink-60);
  font-family: var(--font-mono); font-size: .625rem; letter-spacing: .12em; text-transform: uppercase;
  transition: all .2s var(--ease);
}
.filters button:hover { border-color: var(--ink); color: var(--ink); }
.filters button.is-on { background: var(--ink); border-color: var(--ink); color: #fff; }

.gal { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.gal__item { position: relative; overflow: hidden; background: var(--rule-soft); }
.gal__item img, .gal__item .ph { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; transition: transform .7s var(--ease); }
.gal__item:hover img { transform: scale(1.045); }
.gal__item figcaption {
  position: absolute; inset: auto 0 0 0; padding: 1.6rem 1.1rem .9rem;
  background: linear-gradient(180deg, transparent, rgba(10,10,14,.8));
  color: #fff; opacity: 0; transform: translateY(8px);
  transition: all .3s var(--ease);
  font-family: var(--font-mono); font-size: .625rem; letter-spacing: .12em; text-transform: uppercase;
}
.gal__item:hover figcaption, .gal__item:focus-within figcaption { opacity: 1; transform: none; }
.gal__item.is-hidden { display: none; }

/* Lightbox */
.lb {
  position: fixed; inset: 0; z-index: 200; background: rgba(12,12,16,.95);
  display: none; align-items: center; justify-content: center; padding: 3rem 1.5rem;
}
.lb.is-open { display: flex; }
.lb img { max-width: min(1100px, 92vw); max-height: 84vh; object-fit: contain; }
.lb__close, .lb__prev, .lb__next {
  position: absolute; background: none; border: 1px solid rgba(255,255,255,.3);
  color: #fff; width: 46px; height: 46px; cursor: pointer; display: grid; place-items: center;
  transition: all .2s var(--ease); font-size: 1.1rem;
}
.lb__close:hover, .lb__prev:hover, .lb__next:hover { background: #fff; color: var(--ink); }
.lb__close { top: 1.25rem; right: 1.25rem; }
.lb__prev { left: 1.25rem; top: 50%; transform: translateY(-50%); }
.lb__next { right: 1.25rem; top: 50%; transform: translateY(-50%); }
.lb__cap {
  position: absolute; bottom: 1.4rem; left: 50%; transform: translateX(-50%);
  color: rgba(255,255,255,.7); font-family: var(--font-mono); font-size: .625rem;
  letter-spacing: .14em; text-transform: uppercase;
}

/* ---------- Publications ---------- */
.pub {
  display: grid; grid-template-columns: minmax(0, 260px) minmax(0, 1fr);
  gap: clamp(1.5rem, 4vw, 3.5rem); align-items: start;
  padding: clamp(2rem, 4vw, 3.25rem) 0; border-top: 1px solid var(--rule);
}
.pub:last-child { border-bottom: 1px solid var(--rule); }
.pub__cover { position: relative; }
.pub__cover img, .pub__cover .ph {
  width: 100%; aspect-ratio: 3 / 4; object-fit: cover;
  border: 1px solid var(--rule);
  box-shadow: 0 24px 48px -32px rgba(22,21,26,.55);
  transition: transform .45s var(--ease);
}
.pub:hover .pub__cover img { transform: translateY(-5px); }
.pub__issue { color: var(--indigo); margin-bottom: .55rem; }
.pub h3 { font-size: var(--step-2); letter-spacing: -0.03em; }
.pub__desc { margin-top: 1rem; color: var(--ink-60); max-width: 70ch; }
.pub__actions { margin-top: 1.6rem; }

/* ---------- Award / achiever rows ---------- */
.arow {
  display: grid; grid-template-columns: 92px minmax(0, 1fr);
  gap: clamp(1rem, 3vw, 2.25rem); align-items: center;
  padding: 1.5rem 0; border-top: 1px solid var(--rule);
  transition: background .25s var(--ease);
}
.arow:last-child { border-bottom: 1px solid var(--rule); }
.arow:hover { background: var(--surface); }
.arow__pic img, .arow__pic .ph { width: 92px; height: 92px; object-fit: cover; }
.arow h3 { font-size: var(--step-1); letter-spacing: -0.025em; }
.arow__who { color: var(--indigo); margin-top: .45rem; }
.arow__note { color: var(--ink-60); font-size: var(--step--1); margin-top: .5rem; max-width: 62ch; }
.arow--year { grid-template-columns: 92px minmax(0, 1fr) auto; }
.arow__year { font-family: var(--font-mono); font-size: .6875rem; color: var(--ink-40); letter-spacing: .1em; white-space: nowrap; }

/* ---------- Tabs (Mission / Vision) ---------- */
.tabs { display: flex; gap: 0; border-bottom: 1px solid var(--rule); margin-bottom: 2rem; }
.tabs button {
  background: none; border: 0; border-bottom: 1px solid transparent; cursor: pointer;
  padding: .85rem 1.25rem .85rem 0; margin-right: 1.75rem;
  font-family: var(--font-mono); font-size: .6875rem; letter-spacing: .14em; text-transform: uppercase;
  color: var(--ink-40); margin-bottom: -1px;
  transition: color .2s var(--ease), border-color .2s var(--ease);
}
.tabs button.is-on { color: var(--indigo); border-bottom-color: var(--indigo); }
.tabs button:hover { color: var(--ink); }
.tabpanel { display: none; }
.tabpanel.is-on { display: block; animation: fadeUp .45s var(--ease); }

@keyframes fadeUp { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

/* ---------- Contact ---------- */
.contact-grid { display: grid; grid-template-columns: minmax(0, 340px) minmax(0, 1fr); gap: clamp(2rem, 5vw, 4rem); }
.cinfo li { padding: 1.35rem 0; border-top: 1px solid var(--rule); }
.cinfo li:last-child { border-bottom: 1px solid var(--rule); }
.cinfo .lbl { color: var(--ink-40); display: block; margin-bottom: .5rem; }
.cinfo p { margin: 0; color: var(--ink-80); }
.cinfo a:hover { color: var(--indigo); }

.form { display: grid; gap: 1.25rem; }
.form .row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 1.25rem; }
.field label { display: block; margin-bottom: .5rem; color: var(--ink-40); }
.field input, .field textarea {
  width: 100%; background: var(--surface); border: 1px solid var(--rule);
  padding: .95rem 1rem; font-family: var(--font-body); font-size: var(--step-0);
  transition: border-color .2s var(--ease);
}
.field input:focus, .field textarea:focus { border-color: var(--indigo); outline: none; }
.field textarea { resize: vertical; min-height: 170px; }

.notice { padding: 1rem 1.15rem; border-left: 2px solid var(--indigo); background: var(--indigo-100); font-size: var(--step--1); }
.notice--bad { border-color: #B0263C; background: #FBEEF0; }

.map { border: 1px solid var(--rule); }
.map iframe { width: 100%; height: 420px; border: 0; display: block; filter: grayscale(1) contrast(1.05); }

/* ---------- Footer ---------- */
.ftr { background: var(--ink); color: rgba(255,255,255,.72); padding-top: clamp(3rem, 7vw, 5rem); }
.ftr__grid {
  display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, .8fr) minmax(0, 1.2fr);
  gap: clamp(2rem, 5vw, 4rem); padding-bottom: 3rem;
}
.ftr h4 { color: #fff; font-size: .8125rem; font-family: var(--font-mono); font-weight: 500; letter-spacing: .16em; text-transform: uppercase; margin-bottom: 1.4rem; }
.ftr__brand { font-family: var(--font-display); font-size: var(--step-2); color: #fff; letter-spacing: -0.03em; margin-bottom: 1.4rem; display: block; }
.ftr address { font-style: normal; line-height: 1.9; }
.ftr a:hover { color: #fff; }
.ftr__links li { padding: .4rem 0; }
.ftr .social a { border-color: rgba(255,255,255,.18); color: rgba(255,255,255,.7); }
.ftr .social a:hover { background: #fff; border-color: #fff; color: var(--ink); }
.ftr .map { border-color: rgba(255,255,255,.14); }
.ftr .map iframe { height: 230px; filter: grayscale(1) invert(.92) contrast(.9); }
.ftr__base {
  border-top: 1px solid rgba(255,255,255,.12); padding-block: 1.5rem;
  display: flex; flex-wrap: wrap; gap: 1rem; justify-content: space-between;
  font-family: var(--font-mono); font-size: .625rem; letter-spacing: .1em; text-transform: uppercase;
  color: rgba(255,255,255,.45);
}

/* ---------- Scroll to top ---------- */
.totop {
  position: fixed; right: 22px; bottom: 22px; z-index: 50;
  width: 46px; height: 46px; background: var(--ink); color: #fff;
  display: grid; place-items: center; border: 0; cursor: pointer;
  opacity: 0; visibility: hidden; transform: translateY(10px);
  transition: all .3s var(--ease);
}
.totop.is-on { opacity: 1; visibility: visible; transform: none; }
.totop:hover { background: var(--indigo); }

/* ---------- Reveal on scroll ---------- */
.rv { opacity: 0; transform: translateY(18px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.rv.is-in { opacity: 1; transform: none; }

/* ---------- Responsive ---------- */
@media (min-width: 1440px) { .rail { display: block; } }

@media (max-width: 1080px) {
  .sec-head, .sec-body { grid-template-columns: 1fr; }
  .sec-head__label { border-top: 0; padding-top: 0; }
  .sec-head__label::before { content: ""; display: block; width: 44px; height: 1px; background: var(--indigo); margin-bottom: .8rem; }
  .contact-grid { grid-template-columns: 1fr; }
  .sec-body__sp { display: none; }
  .ftr__grid { grid-template-columns: 1fr 1fr; }
  .ftr__map { grid-column: 1 / -1; }
}

@media (max-width: 900px) {
  .burger { display: flex; }
  .nav {
    position: fixed; inset: 76px 0 0 0; background: var(--paper);
    padding: 1.5rem var(--gut) 3rem; overflow-y: auto;
    transform: translateX(100%); transition: transform .35s var(--ease), visibility .35s;
    border-top: 1px solid var(--rule);
    visibility: hidden;
  }
  .nav-open .nav { transform: none; visibility: visible; }
  .nav > ul { flex-direction: column; align-items: stretch; gap: 0; }
  .nav > ul > li { border-bottom: 1px solid var(--rule); }
  .nav a { padding: 1rem 0; font-size: 1.0625rem; }
  .nav > ul > li > a::after { display: none; }
  .nav .sub {
    position: static; opacity: 1; visibility: visible; transform: none;
    border: 0; box-shadow: none; padding: 0 0 .6rem 1rem; background: none;
  }
  .nav .sub a { font-size: .9375rem; padding: .5rem 0; }
  .btn-join { margin: 1.5rem 0 0; text-align: center; justify-content: center; }
  .officer, .pub { grid-template-columns: 1fr; }
  .officer__pic, .pub__cover { max-width: 260px; }
  .arow, .arow--year { grid-template-columns: 68px minmax(0, 1fr); }
  .arow__pic img, .arow__pic .ph { width: 68px; height: 68px; }
  .arow__year { grid-column: 2; }
  .form .row2 { grid-template-columns: 1fr; }
  .ftr__grid { grid-template-columns: 1fr; }
}

@media (max-width: 560px) {
  .hero__stage { height: 78vh; }
  .gal { grid-template-columns: 1fr 1fr; gap: .5rem; }
  .mgrid { grid-template-columns: 1fr 1fr; }
  .mcard { padding: 1rem; }
  .lb__prev { left: .5rem; } .lb__next { right: .5rem; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important; transition-duration: .01ms !important;
    scroll-behavior: auto !important;
  }
  .rv { opacity: 1; transform: none; }
}

@media print {
  .hdr, .rail, .totop, .ftr, .filters, .lb { display: none !important; }
  body { background: #fff; }
}

/* Section head without an eyebrow: the title carries the datum line itself. */
.sec-head--solo { grid-template-columns: 1fr; }
.sec-head--solo .sec-head__title { border-top: 1px solid var(--indigo); padding-top: 1.1rem; max-width: none; }

/* ==========================================================================
   v2 additions — loader, cinematic hero, events, popup, richer footer
   ========================================================================== */

/* ---------- Loader ---------- */
.loader {
  position: fixed; inset: 0; z-index: 999;
  background: var(--ink); display: grid; place-content: center; justify-items: center;
  gap: 1.5rem; transition: opacity .7s var(--ease), visibility .7s var(--ease);
}
.loader.is-done { opacity: 0; visibility: hidden; }
.loader__seal { position: relative; width: 160px; height: 160px; display: grid; place-items: center; }
.loader__seal img {
  width: 118px; height: 118px; object-fit: contain;
  filter: brightness(0) invert(1);
  opacity: 0; animation: seal-in 1s var(--ease) .15s forwards;
}
.loader__ring { position: absolute; inset: 0; width: 160px; height: 160px; transform: rotate(-90deg); }
.loader__track { fill: none; stroke: rgba(255,255,255,.12); stroke-width: 1.5; }
.loader__arc {
  fill: none; stroke: #fff; stroke-width: 1.5; stroke-linecap: round;
  stroke-dasharray: 358; stroke-dashoffset: 358;
  animation: arc-draw 1.6s var(--ease) forwards;
}
.loader__name {
  color: rgba(255,255,255,.6); letter-spacing: .28em;
  opacity: 0; animation: seal-in .8s var(--ease) .5s forwards;
}
@keyframes seal-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes arc-draw { to { stroke-dashoffset: 0; } }
.no-loader .loader { display: none; }

/* ---------- Cinematic hero ---------- */
.hero__slide.is-on img,
.hero__slide.is-on .ph { animation: kenburns 8s ease-out both; }
@keyframes kenburns {
  from { transform: scale(1.08); }
  to   { transform: scale(1); }
}
/* Staggered entrance for hero text */
.hero__eyebrow, .hero__title, .hero__sub, .hero__foot { opacity: 0; transform: translateY(22px); }
.hero.is-ready .hero__eyebrow { animation: rise .9s var(--ease) .15s forwards; }
.hero.is-ready .hero__title   { animation: rise 1s var(--ease) .3s forwards; }
.hero.is-ready .hero__sub     { animation: rise 1s var(--ease) .5s forwards; }
.hero.is-ready .hero__foot    { animation: rise 1s var(--ease) .7s forwards; }
@keyframes rise { to { opacity: 1; transform: none; } }

/* Staggered reveal children */
.rv--stagger > * { opacity: 0; transform: translateY(20px); transition: opacity .6s var(--ease), transform .6s var(--ease); }
.rv--stagger.is-in > * { opacity: 1; transform: none; }
.rv--stagger.is-in > *:nth-child(2) { transition-delay: .08s; }
.rv--stagger.is-in > *:nth-child(3) { transition-delay: .16s; }
.rv--stagger.is-in > *:nth-child(4) { transition-delay: .24s; }
.rv--stagger.is-in > *:nth-child(5) { transition-delay: .32s; }

/* Banner Ken Burns */
.banner__bg img, .banner__bg .ph { animation: kenburns-slow 18s ease-out both; }
@keyframes kenburns-slow { from { transform: scale(1.12); } to { transform: scale(1); } }

/* ---------- Home events band ---------- */
.ev-home { display: grid; gap: 1px; background: var(--rule); border: 1px solid var(--rule); grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); }
.ev-home__card { background: var(--surface); display: flex; flex-direction: column; transition: background .25s var(--ease); }
.ev-home__card:hover { background: var(--indigo-100); }
.ev-home__media { overflow: hidden; }
.ev-home__media img, .ev-home__media .ph { width: 100%; aspect-ratio: 16 / 11; object-fit: cover; transition: transform .7s var(--ease); }
.ev-home__card:hover .ev-home__media img { transform: scale(1.05); }
.ev-home__body { padding: 1.4rem; }
.ev-home__meta { display: flex; align-items: center; gap: .6rem; margin-bottom: .7rem; }
.ev-home__year { color: var(--ink); font-weight: 500; }
.ev-home__role { color: var(--indigo); }
.ev-home__card h3 { font-size: 1.0625rem; letter-spacing: -0.02em; line-height: 1.2; }
.ev-home__loc { color: var(--ink-40); margin-top: .5rem; }

/* ---------- Events timeline page ---------- */
.ev-intro {
  display: flex; flex-wrap: wrap; align-items: center; gap: clamp(1.5rem, 4vw, 3.5rem);
  padding-bottom: clamp(2rem, 5vw, 3.5rem); border-bottom: 1px solid var(--rule);
}
.ev-stat b { font-family: var(--font-display); font-size: clamp(2.25rem, 4vw, 3.25rem); letter-spacing: -0.04em; line-height: 1; display: block; }
.ev-stat span { color: var(--ink-40); margin-top: .4rem; display: block; }
.ev-filter { margin-left: auto; display: flex; gap: .4rem; }
.ev-filter button {
  background: none; border: 1px solid var(--rule); cursor: pointer; padding: .6rem 1rem;
  color: var(--ink-60); font-family: var(--font-mono); font-size: .625rem; letter-spacing: .12em; text-transform: uppercase;
  transition: all .2s var(--ease);
}
.ev-filter button:hover { border-color: var(--ink); color: var(--ink); }
.ev-filter button.is-on { background: var(--ink); border-color: var(--ink); color: #fff; }

.timeline { position: relative; padding-top: clamp(2.5rem, 5vw, 4rem); }
.tl-year { position: relative; display: grid; grid-template-columns: 160px minmax(0, 1fr); gap: clamp(1.5rem, 4vw, 3rem); }
.tl-year__num {
  font-size: clamp(2.5rem, 5vw, 4rem); letter-spacing: -0.05em; color: var(--ink);
  position: sticky; top: 110px; align-self: start;
}
.tl-year__items { border-left: 1px solid var(--rule); padding: 0 0 clamp(2rem, 4vw, 3.5rem) clamp(1.5rem, 4vw, 3rem); position: relative; }
.tl-item { position: relative; display: grid; grid-template-columns: minmax(0, 280px) minmax(0, 1fr); gap: clamp(1.25rem, 3vw, 2.25rem); padding: 1.75rem 0; align-items: start; }
.tl-item + .tl-item { border-top: 1px solid var(--rule-soft); }
.tl-item.is-hidden { display: none; }
.tl-item__dot { position: absolute; left: calc(-1 * clamp(1.5rem, 4vw, 3rem) - 4.5px); top: 2.4rem; width: 9px; height: 9px; background: var(--paper); border: 1px solid var(--indigo); border-radius: 50%; }
.tl-item[data-role="organised"] .tl-item__dot { background: var(--indigo); }
.tl-item__media img, .tl-item__media .ph { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; }
.tl-item__tag { display: inline-block; margin-bottom: .6rem; }
.tl-item__tag--organised { color: var(--indigo); }
.tl-item__tag--participated { color: var(--ink-40); }
.tl-item h3 { font-size: var(--step-1); letter-spacing: -0.025em; }
.tl-item__meta { color: var(--ink-40); margin-top: .5rem; }
.tl-item__desc { color: var(--ink-60); margin-top: .8rem; max-width: 60ch; }

/* ---------- Popup ---------- */
.popup { position: fixed; inset: 0; z-index: 300; background: rgba(12,12,16,.82); backdrop-filter: blur(4px); display: none; align-items: center; justify-content: center; padding: 1.5rem; }
.popup.is-open { display: flex; animation: fade .3s var(--ease); }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
.popup__box { position: relative; background: var(--surface); max-width: 760px; width: 100%; display: grid; grid-template-columns: 1fr 1fr; overflow: hidden; box-shadow: 0 40px 90px -40px rgba(0,0,0,.6); animation: pop .45s var(--ease); }
@keyframes pop { from { opacity: 0; transform: translateY(20px) scale(.98); } to { opacity: 1; transform: none; } }
.popup__media { overflow: hidden; }
.popup__media img { width: 100%; height: 100%; object-fit: cover; min-height: 260px; }
.popup__body { padding: clamp(1.75rem, 3vw, 2.75rem); align-self: center; }
.popup__eyebrow { color: var(--indigo); margin-bottom: 1rem; }
.popup__body h2 { font-size: var(--step-2); letter-spacing: -0.03em; }
.popup__text { color: var(--ink-60); margin-top: .9rem; }
.popup__body .btn { margin-top: 1.6rem; }
.popup__close { position: absolute; top: .6rem; right: .6rem; z-index: 2; width: 40px; height: 40px; border: 0; background: rgba(255,255,255,.85); color: var(--ink); font-size: 1.4rem; cursor: pointer; display: grid; place-items: center; transition: background .2s var(--ease); }
.popup__close:hover { background: var(--indigo); color: #fff; }
@media (max-width: 620px) {
  .popup__box { grid-template-columns: 1fr; max-width: 440px; }
  .popup__media { max-height: 200px; }
}

/* ---------- Richer footer ---------- */
.ftr__cta {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1.5rem;
  padding-bottom: clamp(2.5rem, 5vw, 3.5rem); margin-bottom: clamp(2.5rem, 5vw, 3.5rem);
  border-bottom: 1px solid rgba(255,255,255,.14);
}
.ftr__cta-label { color: rgba(255,255,255,.5); margin-bottom: .9rem; }
.ftr__cta-title { font-family: var(--font-display); font-size: clamp(1.5rem, 3vw, 2.5rem); color: #fff; letter-spacing: -0.03em; max-width: 20ch; line-height: 1.1; margin: 0; }
.ftr__grid { grid-template-columns: minmax(0, 1.5fr) minmax(0, .8fr) minmax(0, .8fr) minmax(0, 1.2fr); }
.ftr__brand-row { display: flex; align-items: center; gap: .85rem; margin-bottom: 1.4rem; }
.ftr__seal { width: 48px; height: 48px; object-fit: contain; }
.ftr__brand { margin-bottom: 0; }
.ftr__col h4 { margin-bottom: 1.2rem; }

/* Section intro wraps nicely under solo heads too */
.sec-head__intro { text-wrap: pretty; }

@media (max-width: 1080px) {
  .ftr__grid { grid-template-columns: 1fr 1fr; }
  .tl-year { grid-template-columns: 1fr; gap: .5rem; }
  .tl-year__num { position: static; }
  .tl-year__items { border-left: 0; padding-left: 0; }
  .tl-item__dot { display: none; }
}
@media (max-width: 720px) {
  .tl-item { grid-template-columns: 1fr; }
  .tl-item__media { max-width: 320px; }
  .ev-intro { gap: 1.5rem 2rem; }
  .ev-filter { margin-left: 0; width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  .loader__seal img, .loader__name { opacity: 1; animation: none; }
  .loader__arc { stroke-dashoffset: 0; animation: none; }
  .hero__slide.is-on img, .hero__slide.is-on .ph,
  .banner__bg img, .banner__bg .ph { animation: none; }
  .hero__eyebrow, .hero__title, .hero__sub, .hero__foot { opacity: 1; transform: none; animation: none; }
}

/* ==========================================================================
   Achievers — Hall of Honour
   ========================================================================== */
.ach-head { max-width: 62ch; padding-bottom: clamp(2rem, 5vw, 3.5rem); }
.ach-head__label {
  display: inline-flex; align-items: center; gap: .6rem; color: var(--indigo);
  border-top: 1px solid var(--indigo); padding-top: .9rem;
}
.ach-head__label .laurel { width: 22px; height: 22px; }
.ach-head__intro { margin-top: 1.1rem; font-size: var(--step-1); line-height: 1.55; color: var(--ink-60); }

/* Featured recipient — editorial spotlight */
.ach-lead {
  display: grid; grid-template-columns: minmax(0, 380px) minmax(0, 1fr);
  gap: clamp(1.5rem, 4vw, 3.5rem); align-items: stretch;
  background: var(--ink); color: #fff; overflow: hidden;
  margin-bottom: clamp(2.5rem, 5vw, 4rem);
}
.ach-lead__pic { position: relative; }
.ach-lead__pic img, .ach-lead__pic .ph {
  width: 100%; height: 100%; min-height: 360px; object-fit: cover;
}
.ach-lead__pic .ph { background: #22212A; border: 0; }
.ach-lead__body { padding: clamp(1.75rem, 4vw, 3.25rem) clamp(1.75rem, 4vw, 3.25rem) clamp(1.75rem, 4vw, 3.25rem) 0; align-self: center; }
.ach-lead__tag {
  display: inline-flex; align-items: center; gap: .55rem;
  color: rgba(255,255,255,.55); margin-bottom: 1.8rem;
}
.ach-lead__tag .laurel { width: 20px; height: 20px; color: #fff; }
.ach-lead__award { color: var(--indigo-100); margin-bottom: .8rem; letter-spacing: .1em; }
.ach-lead__name { font-size: var(--step-3); letter-spacing: -0.035em; line-height: 1.02; }
.ach-lead__cite {
  margin-top: 1.3rem; color: rgba(255,255,255,.72); max-width: 56ch;
  font-size: var(--step-1); line-height: 1.55;
}

/* Card gallery */
.ach-grid {
  display: grid; gap: 1px; background: var(--rule); border: 1px solid var(--rule);
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
}
.ach-card { background: var(--surface); display: flex; flex-direction: column; transition: background .25s var(--ease); }
.ach-card:hover { background: var(--indigo-100); }
.ach-card__pic { position: relative; overflow: hidden; }
.ach-card__pic img, .ach-card__pic .ph {
  width: 100%; aspect-ratio: 1 / 1; object-fit: cover;
  filter: grayscale(1) contrast(1.02); transition: filter .5s var(--ease), transform .7s var(--ease);
}
.ach-card:hover .ach-card__pic img { filter: grayscale(0); transform: scale(1.04); }
.ach-card__medal {
  position: absolute; top: 12px; right: 12px; width: 40px; height: 40px;
  display: grid; place-items: center; color: #fff;
  background: rgba(22,21,26,.55); backdrop-filter: blur(3px);
  border: 1px solid rgba(255,255,255,.25);
  opacity: 0; transform: translateY(-6px) scale(.9); transition: all .3s var(--ease);
}
.ach-card__medal .laurel { width: 22px; height: 22px; }
.ach-card:hover .ach-card__medal { opacity: 1; transform: none; }
.ach-card__body { padding: 1.5rem; display: flex; flex-direction: column; gap: .55rem; flex: 1; }
.ach-card__award {
  color: var(--indigo); letter-spacing: .08em; line-height: 1.4;
  padding-bottom: .7rem; border-bottom: 1px solid var(--rule);
}
.ach-card:hover .ach-card__award { border-color: #C9CCEC; }
.ach-card__name { font-size: var(--step-1); letter-spacing: -0.025em; margin-top: .2rem; }
.ach-card__cite { color: var(--ink-60); font-size: var(--step--1); line-height: 1.55; margin-top: auto; }

@media (max-width: 860px) {
  .ach-lead { grid-template-columns: 1fr; }
  .ach-lead__pic img, .ach-lead__pic .ph { min-height: 320px; }
  .ach-lead__body { padding: clamp(1.5rem, 5vw, 2.5rem); }
}
