/* AKAMUN 2027
   Style: Akademeia High School. Navy and brass gold, thin geometric lines, hexagons from the school mark.
   Layout: one scrolling page. Navy hero with the AKAMUN badge, a steel-blue facts strip (the badge colour),
   then sections alternating between light paper and navy. */

:root {
  /* brand */
  --navy: #212a3b;        /* Akademeia logo background */
  --navy-deep: #181f2c;
  --gold: #a08f69;        /* Akademeia logo lines */
  --gold-light: #c9b88f;  /* gold for text on navy */
  --gold-dark: #776641;   /* gold for text on light backgrounds */
  --steel: #35617e;       /* AKAMUN badge */

  /* light surface (default) */
  --bg: #f4f5f7;
  --card: #ffffff;
  --ink: #1b2230;
  --muted: #596273;
  --line: #d8dce3;
  --accent-text: var(--gold-dark);

  --font-display: "Montserrat", "Gotham", "Helvetica Neue", Arial, sans-serif;
  --font-body: "Mulish", "Helvetica Neue", Arial, sans-serif;
  --radius: 2px;
  --hex: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%);
  color-scheme: light;
}

/* any block on navy re-points the surface tokens */
.on-navy {
  --bg: var(--navy);
  --card: #283247;
  --ink: #eef0f4;
  --muted: #aab2c1;
  --line: #3a455d;
  --accent-text: var(--gold-light);
  background: var(--bg);
  color: var(--ink);
}

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
/* Navy behind the page, so the bounce when scrolling past the top or bottom matches the header and footer */
html { scroll-behavior: smooth; scroll-padding-top: 72px; background: var(--navy-deep); }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--font-display); line-height: 1.08; text-wrap: balance; margin: 0; }
h2 {
  font-size: clamp(1.9rem, 4vw, 2.75rem); font-weight: 300; letter-spacing: 0.04em; text-transform: uppercase;
  display: flex; align-items: center; gap: 0.5em;
}
p { margin: 0; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { transition: none !important; } }

.wrap { max-width: 1160px; margin: 0 auto; padding-inline: clamp(16px, 4vw, 40px); }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 16px; z-index: 50; background: var(--card); padding: 8px 12px; }
.sel { user-select: all; }

/* AKA in bold, MUN in light, as on the badge */
.wordmark { font-family: var(--font-display); font-weight: 300; text-transform: uppercase; letter-spacing: 0.02em; }
.wordmark b { font-weight: 800; }

/* Akademeia mark, recoloured with currentColor */
.mark {
  display: inline-block; aspect-ratio: 1317 / 1511; background: currentColor;
  -webkit-mask: url("images/akademeia-mark.svg") center / contain no-repeat;
          mask: url("images/akademeia-mark.svg") center / contain no-repeat;
}

/* small hexagon outline before section titles */
.hex { position: relative; width: 0.62em; aspect-ratio: 0.866; flex: none; clip-path: var(--hex); background: var(--gold); }
.hex::after { content: ""; position: absolute; inset: 2px; clip-path: var(--hex); background: var(--bg); }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 46px; padding: 0 24px; border-radius: var(--radius);
  font: 600 0.82rem var(--font-display); letter-spacing: 0.12em; text-transform: uppercase; text-decoration: none;
  border: 1.5px solid transparent;
  transition: background-color .15s ease, color .15s ease, border-color .15s ease;
}
.btn-sm { min-height: 38px; padding: 0 16px; font-size: 0.75rem; }
.btn-gold { background: var(--gold); color: var(--navy); border-color: var(--gold); }
.btn-gold:hover { background: var(--gold-light); border-color: var(--gold-light); }
.btn-line { background: transparent; color: var(--ink); border-color: var(--gold); }
.btn-line:hover { background: var(--gold); color: var(--navy); }
.btn-navy { background: var(--navy); color: #ffffff; border-color: var(--navy); }
.btn-navy:hover { background: var(--steel); border-color: var(--steel); }
.btn-white { background: #ffffff; color: var(--navy); border-color: #ffffff; }
.btn-white:hover { background: transparent; color: #ffffff; }

/* ---------- top bar ---------- */
.topbar {
  position: sticky; top: env(safe-area-inset-top, 0px); z-index: 20;
  background: color-mix(in srgb, var(--navy-deep) 94%, transparent);
  backdrop-filter: blur(8px);
  color: #eef0f4;
  border-bottom: 1px solid rgba(160, 143, 105, 0.35);
}
.topbar-in { display: flex; align-items: center; gap: 24px; min-height: 64px; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.brand-badge { width: 40px; height: 40px; }
.brand .wordmark { font-size: 1.2rem; }
.nav { display: flex; gap: 26px; margin-left: auto; }
.nav a { text-decoration: none; font: 500 0.78rem var(--font-display); letter-spacing: 0.12em; text-transform: uppercase; color: #b9c0cc; }
.nav a:hover { color: var(--gold-light); }
@media (max-width: 800px) { .nav { display: none; } .topbar .btn { margin-left: auto; } }

/* ---------- hero ---------- */
.hero { position: relative; overflow: hidden; padding-block: clamp(56px, 9vw, 112px); }
.hero-watermark { position: absolute; height: 135%; right: -6%; top: -18%; color: var(--gold); opacity: 0.08; pointer-events: none; }
.hero-in { position: relative; display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 4fr); gap: 48px; align-items: center; }
.hero-text { display: grid; gap: 22px; }
.eyebrow { font: 600 0.75rem var(--font-display); text-transform: uppercase; letter-spacing: 0.2em; color: var(--gold-light); }
.hero-title { font-size: clamp(3rem, 8.5vw, 6.6rem); line-height: 0.95; display: flex; flex-wrap: wrap; gap: 0 0.28em; }
.hero-year { font-weight: 300; color: var(--gold-light); letter-spacing: 0.04em; }
.hero-dates { font: 500 clamp(1.05rem, 2vw, 1.3rem) var(--font-display); letter-spacing: 0.02em; }
.lede { max-width: 56ch; color: var(--muted); }
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 4px; }
.countdown { display: grid; gap: 10px; justify-items: start; margin-top: 6px; }
.countdown-label { font: 600 0.72rem var(--font-display); text-transform: uppercase; letter-spacing: 0.18em; color: var(--gold-light); }
.countdown-units { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; width: min(100%, 400px); }
.unit { display: grid; justify-items: center; gap: 4px; padding: 12px 6px 10px; border: 1px solid rgba(160, 143, 105, 0.45); border-top: 3px solid var(--gold); }
.unit b { font: 700 clamp(1.5rem, 4vw, 2.1rem)/1 var(--font-display); font-variant-numeric: tabular-nums; color: var(--ink); }
.unit small { font: 600 0.6rem var(--font-display); text-transform: uppercase; letter-spacing: 0.14em; color: var(--muted); }
.countdown-date { font-size: 0.85rem; color: var(--muted); }
html:not(.js) .when-js, html:not(.js) .countdown-units { display: none; }
.hero-badge { justify-self: center; position: relative; width: min(100%, 320px); }
.hero-badge::before { content: ""; position: absolute; inset: -9%; clip-path: var(--hex); background: var(--gold); }
.hero-badge::after { content: ""; position: absolute; inset: calc(-9% + 2px); clip-path: var(--hex); background: var(--navy); }
.hero-badge img { position: relative; z-index: 1; width: 100%; height: auto; border-radius: 50%; box-shadow: 0 18px 50px rgba(0, 0, 0, 0.35); }
@media (max-width: 800px) {
  .hero-in { grid-template-columns: 1fr; }
  .hero-badge { order: -1; justify-self: start; width: 140px; margin: 14px; }
}

/* ---------- facts ---------- */
.facts { background: var(--steel); color: #ffffff; }
.facts-grid { display: grid; grid-template-columns: repeat(4, 1fr); margin: 0; }
.facts-grid > div { padding: 22px 18px; border-left: 1px solid rgba(255, 255, 255, 0.2); }
.facts-grid > div:first-child { border-left: 0; padding-left: 0; }
.facts dt { font: 600 0.7rem var(--font-display); text-transform: uppercase; letter-spacing: 0.16em; color: rgba(255, 255, 255, 0.72); }
.facts dd { margin: 4px 0 0; font: 600 clamp(1.1rem, 1.7vw, 1.35rem) var(--font-display); font-variant-numeric: tabular-nums; }
@media (max-width: 800px) {
  .facts-grid { grid-template-columns: repeat(2, 1fr); }
  .facts-grid > div, .facts-grid > div:first-child { border-left: 0; padding: 16px 0; border-top: 1px solid rgba(255, 255, 255, 0.2); }
  .facts-grid > div:nth-child(-n+2) { border-top: 0; }
}

/* ---------- sections ---------- */
.section { padding-block: clamp(64px, 9vw, 108px); }
.section-alt { --bg: #e9ecf1; background: var(--bg); }
.section-head { display: grid; gap: 12px; margin-bottom: 34px; max-width: 62ch; }
.section-head p { color: var(--muted); }
.fine { margin-top: 22px; font-size: 0.9rem; color: var(--muted); }

/* ---------- committees ---------- */
.filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 24px; }
.chip {
  font: 600 0.72rem var(--font-display); letter-spacing: 0.12em; text-transform: uppercase;
  padding: 9px 16px; border-radius: var(--radius); cursor: pointer;
  background: transparent; color: var(--ink); border: 1px solid var(--line);
}
.chip:hover { border-color: var(--gold); }
.chip.is-on { background: var(--navy); color: #ffffff; border-color: var(--navy); }
.committee-grid { position: relative; list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; }
/* Column count is set by script.js (--cols) so every row is full. */
@media (min-width: 600px) {
  .committee-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .committee.is-last-odd { grid-column: 1 / -1; }
}
@media (min-width: 1000px) {
  .committee-grid { grid-template-columns: repeat(var(--cols, 5), minmax(0, 1fr)); }
  .committee.is-last-odd { grid-column: auto; }
}
.committee {
  display: flex; flex-direction: column;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  transition: border-color .15s ease, box-shadow .2s ease;
}
.committee[hidden] { display: none; }
.committee:hover, .committee.is-open { border-color: var(--gold); }
.committee.is-open { box-shadow: 0 10px 28px rgba(33, 42, 59, 0.12); }
.committee-toggle {
  flex: 1; display: grid; grid-template-rows: auto 1fr auto; gap: 10px; width: 100%; min-height: 172px;
  padding: 22px; background: none; border: 0; color: inherit; font: inherit; text-align: left; cursor: pointer;
}
.committee-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.plus { position: relative; width: 14px; height: 14px; flex: none; transition: transform .25s ease; }
.plus::before, .plus::after { content: ""; position: absolute; background: var(--gold); }
.plus::before { left: 0; right: 0; top: 6px; height: 2px; }
.plus::after { top: 0; bottom: 0; left: 6px; width: 2px; }
.committee.is-open .plus { transform: rotate(45deg); }
/* The description is in each card for crawlers and for visitors without JavaScript; with JavaScript it opens in the panel instead */
.committee-about { margin: -6px 22px 22px; font-size: 0.95rem; line-height: 1.6; color: var(--muted); }
.js .committee-about { display: none; }
.committee-panel {
  grid-column: 1 / -1; position: relative; padding: 22px 26px;
  background: var(--card); border: 1px solid var(--gold); border-radius: var(--radius);
  box-shadow: 0 10px 28px rgba(33, 42, 59, 0.12); animation: panel-in .25s ease;
}
.committee-panel[hidden] { display: none; }
.committee-panel::before {
  content: ""; position: absolute; top: -8px; left: calc(var(--arrow-x, 50%) - 7px); width: 14px; height: 14px;
  background: var(--card); border-left: 1px solid var(--gold); border-top: 1px solid var(--gold); transform: rotate(45deg);
}
.committee-panel h3 { margin: 0 0 8px; font: 500 1.05rem/1.4 var(--font-display); color: var(--muted); }
.committee-panel h3 b { font-weight: 700; color: var(--navy); margin-right: 6px; }
.committee-panel p { margin: 0; max-width: 78ch; font-size: 0.98rem; line-height: 1.65; }
@keyframes panel-in { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { /* The description is in each card for crawlers and for visitors without JavaScript; with JavaScript it opens in the panel instead */
.committee-about { margin: -6px 22px 22px; font-size: 0.95rem; line-height: 1.6; color: var(--muted); }
.js .committee-about { display: none; }
.committee-panel { animation: none; } }
.committee-abbr { font: 700 1.55rem var(--font-display); letter-spacing: 0.04em; color: var(--navy); }
.committee-name { font-weight: 500; line-height: 1.4; color: var(--muted); }
.level { display: inline-flex; align-items: center; gap: 10px; font: 600 0.68rem var(--font-display); text-transform: uppercase; letter-spacing: 0.14em; color: var(--accent-text); }
.level-hexes { display: inline-flex; gap: 3px; }
.level-hexes span { width: 9px; aspect-ratio: 0.866; clip-path: var(--hex); background: var(--line); }
.level[data-level="Beginner"] .level-hexes span:nth-child(-n+1),
.level[data-level="Intermediate"] .level-hexes span:nth-child(-n+2),
.level[data-level="Expert"] .level-hexes span:nth-child(-n+3) { background: var(--gold); }

/* ---------- secretariat ---------- */
.team-photo { margin: 0 0 40px; position: relative; }
.team-photo img { width: 100%; height: auto; aspect-ratio: 1435 / 960; object-fit: cover; border: 1px solid rgba(160, 143, 105, 0.5); }
.team-photo figcaption { margin-top: 10px; font-size: 0.85rem; color: var(--muted); }
.team-grid { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 0 28px; }
@media (max-width: 520px) { .team-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 16px; } }
.person { border-top: 1px solid var(--line); }
.person.tier-1, .person.tier-2 { border-top-color: var(--gold); }
.person-link { display: grid; gap: 4px; padding: 16px 0 18px; text-decoration: none; color: inherit; }
.person-role { font: 400 1rem/1.4 var(--font-body); color: var(--muted); }
.tier-1 .person-role, .tier-2 .person-role { color: var(--accent-text); }
.person-name { font: 600 1.1rem/1.3 var(--font-display); transition: color .15s ease; }
.person-name::after { content: " \2197\FE0E"; font-weight: 400; color: var(--gold-light); opacity: 0; transition: opacity .15s ease; }
.person-link:hover .person-name, .person-link:focus-visible .person-name { color: var(--gold-light); }
.person-link:hover .person-name::after, .person-link:focus-visible .person-name::after { opacity: 1; }
@media (hover: none) { .person-name::after { display: none; } }

/* ---------- past editions ---------- */
.editions { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1.5px solid var(--gold); }
.edition { padding: 26px 24px 26px 0; display: grid; gap: 8px; align-content: start; }
.edition + .edition { padding-left: 24px; border-left: 1px solid var(--line); }
.edition-year { font-size: 1.5rem; font-weight: 300; letter-spacing: 0.04em; text-transform: uppercase; }
.edition-year b { font-weight: 800; }
.edition-meta { font-size: 0.9rem; color: var(--muted); }
.score { display: flex; align-items: baseline; gap: 8px; margin-top: 8px; }
.score-num { font: 300 3.4rem/1 var(--font-display); color: var(--accent-text); font-variant-numeric: tabular-nums; }
.score-of { font: 500 0.9rem var(--font-display); color: var(--muted); }
.stars { position: relative; display: inline-block; font-size: 1.1rem; letter-spacing: 3px; line-height: 1; color: var(--line); }
.stars::before { content: "★★★★★"; }
.stars span { position: absolute; inset: 0 auto 0 0; overflow: hidden; white-space: nowrap; color: var(--gold); }
.stars span::before { content: "★★★★★"; }
@media (max-width: 800px) {
  .editions { grid-template-columns: 1fr; }
  .edition, .edition + .edition { padding: 22px 0; border-left: 0; border-top: 1px solid var(--line); }
  .edition:first-child { border-top: 0; }
}

/* ---------- venue ---------- */
.venue { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 44px; align-items: center; }
.venue-text { display: grid; gap: 24px; justify-items: start; }
.venues { display: grid; gap: 28px; }
.host { display: flex; gap: 18px; align-items: flex-start; }
.host > div { min-width: 0; display: grid; gap: 4px; justify-items: start; }
.host-mark { width: 46px; flex: none; color: var(--navy); }
.host-hex { position: relative; width: 46px; aspect-ratio: 0.866; flex: none; clip-path: var(--hex); background: var(--gold); }
.host-hex::after { content: ""; position: absolute; inset: 2px; clip-path: var(--hex); background: var(--bg); }
.host-when { font: 600 0.7rem var(--font-display); text-transform: uppercase; letter-spacing: 0.16em; color: var(--accent-text); }
.host-name { font: 600 1.15rem/1.3 var(--font-display); }
.text-link { margin-top: 4px; font: 600 0.75rem var(--font-display); letter-spacing: 0.12em; text-transform: uppercase; color: var(--navy); text-decoration-color: var(--gold); text-underline-offset: 4px; }
.text-link:hover { color: var(--gold-dark); }
address { font-style: normal; color: var(--muted); }
.venue-map { aspect-ratio: 16 / 11; max-width: 100%; border: 1px solid var(--line); background: var(--card); }
.venue-map iframe { width: 100%; height: 100%; border: 0; display: block; }
.map-fallback { height: 100%; display: grid; place-items: center; text-align: center; padding: 24px; color: var(--muted); gap: 8px; align-content: center; }
.map-fallback strong { font: 300 1.5rem var(--font-display); letter-spacing: 0.04em; text-transform: uppercase; color: var(--ink); }
@media (max-width: 800px) { .venue { grid-template-columns: 1fr; } }

/* ---------- register ---------- */
.register { background: var(--steel); color: #ffffff; }
.register-in { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 40px; align-items: center; }
.register-in p { max-width: 52ch; margin-top: 14px; color: rgba(255, 255, 255, 0.86); }
.fee { display: grid; gap: 6px; justify-items: start; }
.fee-label { font: 600 0.72rem var(--font-display); text-transform: uppercase; letter-spacing: 0.18em; color: rgba(255, 255, 255, 0.78); }
.fee-amount { font: 800 clamp(3rem, 8vw, 4.4rem)/1 var(--font-display); margin-bottom: 14px; font-variant-numeric: tabular-nums; }
.fee-amount small { font-size: 0.38em; font-weight: 300; letter-spacing: 0.1em; }
@media (max-width: 800px) { .register-in { grid-template-columns: 1fr; } }

/* ---------- footer ---------- */
.footer { --bg: var(--navy-deep); padding-block: 40px; font-size: 0.9rem; }
.footer-in { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 28px; }
.logos { display: flex; flex-wrap: wrap; align-items: center; gap: 28px; }
.logo-akamun { width: 72px; height: 72px; }
.logo-isp { width: 56px; height: 56px; border-radius: 6px; }
.logo-aka { display: inline-flex; align-items: center; gap: 12px; color: var(--gold); text-decoration: none; transition: opacity .15s ease; }
.logo-aka:hover, .logo-aka:focus-visible { opacity: 0.8; }
.logo-aka .mark { width: 40px; }
.logo-aka-text { display: grid; font: 600 0.95rem/1.1 var(--font-display); letter-spacing: 0.22em; color: #eef0f4; }
.logo-aka-text small { font-size: 0.6rem; font-weight: 500; letter-spacing: 0.32em; color: var(--gold-light); margin-top: 4px; }
.footer-text { display: grid; gap: 6px; color: var(--muted); }
.footer-text strong { color: var(--ink); }
.footer a:hover { color: var(--gold-light); }

/* ---------- international delegations ---------- */
.intl-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 20px 40px; margin-bottom: 34px; }
.intl-head .section-head { margin-bottom: 0; }
.package-full { position: relative; padding: 30px 28px; border: 1px solid var(--gold); border-top-width: 4px; }
.package-label { display: flex; align-items: center; gap: 10px; font: 600 0.72rem var(--font-display); text-transform: uppercase; letter-spacing: 0.18em; color: var(--gold-light); }
.package-label .hex { width: 0.9rem; }
.package-prices { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px 40px; margin-top: 20px; }
.package-prices > div + div { padding-left: 40px; border-left: 1px solid var(--line); }
.package-price { font: 800 clamp(2.8rem, 6vw, 3.8rem)/1 var(--font-display); font-variant-numeric: tabular-nums; }
.package-price small { display: block; font-size: 0.85rem; font-weight: 500; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); margin-top: 10px; }
.package-note { margin-top: 6px; color: var(--gold-light); font-weight: 600; }
/* Items grow to fill each row, so an odd count never leaves an empty slot */
.includes { list-style: none; counter-reset: inc; padding: 0; margin: 28px 0 0; display: flex; flex-wrap: wrap; gap: 0 28px; }
.includes li { flex: 1 1 260px; counter-increment: inc; display: flex; gap: 14px; padding: 12px 0; border-top: 1px solid var(--line); }
.includes li::before { content: counter(inc, decimal-leading-zero); font: 500 0.8rem/1.9 var(--font-display); color: var(--gold-light); font-variant-numeric: tabular-nums; }
@media (max-width: 600px) {
  .package-prices { grid-template-columns: minmax(0, 1fr); }
  .package-prices > div + div { padding: 20px 0 0; border-left: 0; border-top: 1px solid var(--line); }
}
.intl-info { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px; margin-top: 56px; padding-top: 36px; border-top: 1px solid var(--line); }
.intl-info h3 { font: 600 1rem var(--font-display); letter-spacing: 0.04em; text-transform: uppercase; margin-bottom: 14px; color: var(--gold-light); }
.intl-info p { color: var(--muted); font-size: 0.95rem; }
.sights, .contacts { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; font-size: 0.95rem; }
.sights li { color: var(--muted); }
.sights strong, .contacts strong { display: block; color: var(--ink); font-weight: 600; }
.contacts span { color: var(--muted); }
.contact-email { margin-top: 14px; font-weight: 600; overflow-wrap: anywhere; }
.contact-email a { color: var(--gold-light); }
@media (max-width: 900px) {
  .intl-info { grid-template-columns: minmax(0, 1fr); }
}
