/* Bayview SS Model UN
   Type: Archivo (neo-grotesque, condensed display) + Public Sans (body).
   Ground: hard bands — navy hero, blue marquee, white page. No uniform wash.
   Contrast ratios in comments were measured against the surface named. */

:root {
  /* brand */
  --blue: #5b92e5;        /* fills and blocks */
  --blue-text: #446eac;   /* text-safe blue: 5.16:1 on white */
  --blue-pale: #dce8fa;   /* oversized decorative numerals */
  --navy: #0f1e33;        /* dark band; white on it = 16.75:1 */

  /* surfaces */
  --paper: #ffffff;
  --paper-2: #f2f6fd;

  /* ink */
  --ink: #16233a;         /* 15.72:1 on white, 5.01:1 on --blue */
  --muted: #5c6b84;       /* 5.40:1 on white */
  --on-navy: #ffffff;
  --on-navy-muted: #9db4d6; /* 7.92:1 on --navy */

  /* rules */
  --rule: #c3d3e9;
  --line: #e1e9f5;

  --display: "Archivo", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --body: "Public Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;

  /* 8pt rhythm */
  --s1: 8px;  --s2: 16px; --s3: 24px;
  --s4: 32px; --s5: 48px; --s6: 64px; --s7: 96px;

  --wrap: 1160px;
  --label-col: 200px;
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--body);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: var(--blue-text); }

:focus-visible {
  outline: 2px solid var(--blue-text);
  outline-offset: 3px;
}

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 var(--s4);
}

/* ---- scroll reveal (class applied by reveal.js) ---------- */

.js-reveal [data-reveal] { opacity: 0; transform: translateY(14px); }

.js-reveal [data-reveal].is-in {
  opacity: 1;
  transform: none;
  transition: opacity 380ms var(--ease), transform 380ms var(--ease);
}

/* ---- shared display type --------------------------------- */

h1, h2, h3, .sec-num, .cell-num, .avatar, .marquee-track span, .brand span {
  font-family: var(--display);
  font-variation-settings: "wdth" 85;
}

/* ---- nav ------------------------------------------------- */

.nav {
  position: sticky;
  top: 0;
  z-index: 30;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--rule);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s2);
  height: 66px;
}

.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--ink); }

.brand img {
  width: 34px;
  height: 34px;
  transition: transform 300ms var(--ease);
}

.brand:hover img { transform: rotate(-4deg) scale(1.06); }

.brand span {
  font-size: 16px;
  font-weight: 600;
  font-variation-settings: "wdth" 86;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  white-space: nowrap;
}

.nav-links { display: flex; gap: var(--s4); }

.nav-links a {
  position: relative;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--muted);
  padding: 4px 0;
  transition: color 200ms var(--ease);
}

.nav-links a::after {
  content: "";
  position: absolute;
  left: 0; bottom: 0;
  width: 100%; height: 3px;
  background: var(--blue);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 260ms var(--ease);
}

.nav-links a:hover { color: var(--blue-text); }
.nav-links a:hover::after { transform: scaleX(1); }
.nav-links a[aria-current="page"] { color: var(--ink); }
.nav-links a[aria-current="page"]::after { transform: scaleX(1); }

/* ---- hero: centred, layered over the emblem ------------- */

.hero {
  position: relative;
  overflow: hidden;
  background: var(--navy);
  color: var(--on-navy);
  padding: var(--s7) 0;
  text-align: center;
}

/* grid texture lives only inside the dark band */
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(91, 146, 229, 0.16) 1px, transparent 1px),
    linear-gradient(90deg, rgba(91, 146, 229, 0.16) 1px, transparent 1px);
  background-size: 72px 72px;
  pointer-events: none;
}

/* emblem sits behind the type — no plate, just white art on the navy */
.hero-emblem {
  position: absolute;
  left: 50%;
  top: 42%;
  transform: translate(-50%, -50%);
  width: clamp(260px, 40vw, 430px);
  opacity: 0.12;
  pointer-events: none;
}

/* crosshair rules + sparkles, matching the club banner */
.hero-marks { position: absolute; inset: 0; pointer-events: none; }

.hero-marks .xline,
.hero-marks .yline {
  position: absolute;
  background: rgba(91, 146, 229, 0.42);
}

.hero-marks .xline { left: 0; right: 0; top: 44%; height: 1px; }
.hero-marks .yline { top: 0; bottom: 0; left: 50%; width: 1px; }

.hero-marks .star { position: absolute; color: var(--blue); }
.hero-marks .s1 { width: 42px; top: 14%;  left: 14%; opacity: 0.9; }
.hero-marks .s2 { width: 22px; top: 68%;  left: 24%; opacity: 0.7; }
.hero-marks .s3 { width: 34px; top: 22%;  right: 15%; opacity: 0.8; }
.hero-marks .s4 { width: 18px; top: 74%;  right: 26%; opacity: 0.6; }

.hero-inner { position: relative; }

/* ---- the title ------------------------------------------- */

.hero-title {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: 0 0 var(--s3);
}

.hero-title .script {
  /* Bodoni Moda: upright didone. Contrast against the grotesque comes from
     stroke modulation and hairline serifs, not from a different mood.
     Upright on purpose — the italic reads as script. */
  font-family: "Bodoni Moda", Didot, "Times New Roman", serif;
  font-style: normal;
  font-size: clamp(34px, 6vw, 68px);
  font-weight: 500;
  font-variation-settings: "opsz" 72;
  line-height: 1;
  letter-spacing: 0.012em;
  text-transform: none;
  color: var(--blue);            /* 5.33:1 on --navy */
  /* sits just above the line beneath, barely kissing it */
  margin-bottom: 0.01em;
  transform: translateX(-8%);
  z-index: 1;
}

.hero-title .main {
  font-family: var(--display);
  font-size: clamp(28px, 6.6vw, 74px);
  font-weight: 700;
  font-variation-settings: "wdth" 79;
  letter-spacing: -0.004em;
  text-transform: uppercase;
  line-height: 0.92;
  color: var(--on-navy);
}

.hero .tagline {
  font-family: var(--display);
  font-size: clamp(13px, 1.5vw, 17px);
  font-weight: 600;
  font-variation-settings: "wdth" 100;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--blue);
  margin: 0 auto var(--s3);
  padding-bottom: var(--s3);
  border-bottom: 1px solid rgba(91, 146, 229, 0.4);
  max-width: 44ch;
}

.hero .lede {
  font-size: 18px;
  line-height: 1.55;
  color: var(--on-navy-muted);   /* 7.92:1 on --navy */
  max-width: 52ch;
  margin: 0 auto;
}

.hero .ph {
  background: rgba(91, 146, 229, 0.22);
  border-bottom-color: var(--blue);
  color: var(--on-navy);
}

/* ---- marquee band ---------------------------------------- */

.marquee {
  overflow: hidden;
  background: var(--blue);
  padding: 13px 0;
  user-select: none;
}

.marquee-track {
  display: flex;
  width: max-content;
  animation: marquee 38s linear infinite;
}

.marquee:hover .marquee-track { animation-play-state: paused; }

.marquee-track span {
  font-size: 15px;
  font-weight: 700;
  font-variation-settings: "wdth" 100;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--navy);           /* 5.33:1 on --blue */
  padding: 0 var(--s3);
  white-space: nowrap;
}

.marquee-track span::after {
  content: "\2014";
  margin-left: var(--s3);
  opacity: 0.5;
}

@keyframes marquee {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

/* ---- page header (subpages) ------------------------------ */

.page-head {
  position: relative;
  overflow: hidden;
  background: var(--navy);
  color: var(--on-navy);
  padding: var(--s6) 0;
}

.page-head::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(91, 146, 229, 0.16) 1px, transparent 1px),
    linear-gradient(90deg, rgba(91, 146, 229, 0.16) 1px, transparent 1px);
  background-size: 72px 72px;
  pointer-events: none;
}

.page-head .wrap { position: relative; }

.page-head h1 {
  font-size: clamp(42px, 8.5vw, 88px);
  font-weight: 700;
  font-variation-settings: "wdth" 79;
  letter-spacing: -0.006em;
  text-transform: uppercase;
  line-height: 0.88;
  margin: 0 0 var(--s2);
  color: var(--on-navy);
}

.page-head p {
  font-size: 18px;
  color: var(--on-navy-muted);
  max-width: 54ch;
  margin: 0;
}

.page-head .ph {
  background: rgba(91, 146, 229, 0.22);
  border-bottom-color: var(--blue);
  color: var(--on-navy);
}

/* ---- sections -------------------------------------------- */

section {
  padding: var(--s6) 0;
  border-bottom: 1px solid var(--line);
}

section:last-of-type { border-bottom: 0; }

.sec {
  display: grid;
  grid-template-columns: var(--label-col) 1fr;
  gap: var(--s5);
  align-items: start;
}

.sec-label {
  position: sticky;
  top: 96px;
  border-top: 3px solid var(--navy);
  padding-top: var(--s2);
}

.sec-num {
  display: block;
  font-size: 68px;
  font-weight: 600;
  font-variation-settings: "wdth" 80;
  line-height: 0.8;
  letter-spacing: -0.01em;
  color: var(--blue-pale);
  margin-bottom: var(--s1);
}

.sec-label .txt {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
}

h2 {
  font-size: clamp(32px, 5vw, 54px);
  font-weight: 700;
  font-variation-settings: "wdth" 82;
  letter-spacing: -0.004em;
  text-transform: uppercase;
  line-height: 0.94;
  margin: 0 0 var(--s3);
}

h3 {
  font-size: 20px;
  font-weight: 600;
  font-variation-settings: "wdth" 92;
  letter-spacing: 0.01em;
  text-transform: uppercase;
  margin: 0 0 var(--s1);
}

p { margin: 0 0 var(--s2); max-width: 66ch; }
p:last-child { margin-bottom: 0; }
p.muted { color: var(--muted); }

.lead { font-size: 20px; line-height: 1.55; }

.lead::first-letter {
  float: left;
  font-family: var(--display);
  font-size: 82px;
  font-weight: 700;
  font-variation-settings: "wdth" 80;
  line-height: 0.74;
  color: var(--blue-text);
  padding: 0 14px 0 0;   /* was 8px 14px 0 0 — first number was pushing it down */
  margin-top: -6px;      /* new line — go more negative to lift further */
}

.pull {
  font-family: var(--display);
  font-size: clamp(26px, 3.8vw, 40px);
  font-weight: 700;
  font-variation-settings: "wdth" 82;
  letter-spacing: -0.004em;
  text-transform: uppercase;
  line-height: 1.02;
  color: var(--navy);
  border-left: 6px solid var(--blue);
  padding: var(--s1) 0 var(--s1) var(--s3);
  margin: var(--s4) 0 0;
  max-width: 22ch;
}

/* ---- cell grid ------------------------------------------- */

.cells {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(196px, 1fr));
  border-top: 1px solid var(--rule);
  border-left: 1px solid var(--rule);
}

.cell {
  border-right: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  padding: var(--s3);
  transition: background 260ms var(--ease);
}

.cell:hover { background: var(--blue); }
.cell:hover p, .cell:hover .cell-num, .cell:hover h3 { color: var(--navy); }

.cell p {
  color: var(--muted);
  font-size: 15px;
  margin: 0;
  transition: color 260ms var(--ease);
}

.cell-num {
  display: block;
  font-size: 30px;
  font-weight: 600;
  font-variation-settings: "wdth" 80;
  line-height: 1;
  letter-spacing: -0.01em;
  color: var(--blue-pale);
  margin-bottom: var(--s1);
  transition: color 260ms var(--ease);
}

/* ---- facts ----------------------------------------------- */

.facts { border-top: 1px solid var(--rule); margin: 0; }

.facts > div {
  display: grid;
  grid-template-columns: 190px 1fr;
  gap: var(--s3);
  padding: var(--s2) var(--s1);
  margin: 0 calc(var(--s1) * -1);
  border-bottom: 1px solid var(--line);
  transition: background 220ms var(--ease);
}

.facts > div:hover { background: var(--paper-2); }

.facts dt {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
  padding-top: 5px;
}

.facts dd {
  margin: 0;
  font-family: var(--display);
  font-size: 24px;
  font-weight: 600;
  font-variation-settings: "wdth" 88;
  letter-spacing: 0;
}

/* ---- team ------------------------------------------------ */

.team-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(196px, 1fr));
  border-top: 1px solid var(--rule);
  border-left: 1px solid var(--rule);
}

.member {
  border-right: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  padding: var(--s3);
  transition: background 260ms var(--ease);
}

.member:hover { background: var(--blue); }
.member:hover .role { color: var(--navy); }
.member:hover .avatar { background: var(--navy); color: var(--blue); }

.avatar {
  width: 56px;
  height: 56px;
  background: var(--navy);
  color: var(--on-navy);       /* 16.75:1 */
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  font-weight: 600;
  font-variation-settings: "wdth" 88;
  letter-spacing: 0.04em;
  margin-bottom: var(--s2);
  transition: background 260ms var(--ease), color 260ms var(--ease);
}

.member .name {
  font-family: var(--display);
  font-size: 21px;
  font-weight: 600;
  font-variation-settings: "wdth" 90;
  letter-spacing: 0;
  margin: 0 0 4px;
}

.member .role {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0;
  transition: color 260ms var(--ease);
}

/* ---- contact --------------------------------------------- */

.contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(196px, 1fr));
  border-top: 1px solid var(--rule);
  border-left: 1px solid var(--rule);
}

.contact-card {
  border-right: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  padding: var(--s3);
  transition: background 260ms var(--ease);
}

.contact-card:not(.primary):hover { background: var(--paper-2); }

.contact-card .label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 var(--s1);
}

.contact-card .value {
  font-family: var(--display);
  font-size: 26px;
  font-weight: 600;
  font-variation-settings: "wdth" 88;
  letter-spacing: 0;
  line-height: 1.15;
  margin: 0;
  overflow-wrap: anywhere;
}

.contact-card .value a {
  text-decoration: none;
  border-bottom: 3px solid var(--blue);
  transition: border-color 200ms var(--ease);
}

.contact-card .value a:hover { border-bottom-color: var(--navy); }

/* primary block: brand fill + navy text = 5.33:1 */
.contact-card.primary {
  background: var(--blue);
  border-right-color: var(--blue);
  border-bottom-color: var(--blue);
  color: var(--navy);
}

.contact-card.primary .label,
.contact-card.primary .note { color: var(--navy); }

.contact-card.primary .value a {
  color: var(--navy);
  border-bottom-color: var(--navy);
}

.note { font-size: 14px; color: var(--muted); margin: var(--s2) 0 0; max-width: 60ch; }

/* ---- footer ---------------------------------------------- */

footer {
  background: var(--navy);
  color: var(--on-navy-muted);
  padding: var(--s5) 0;
}

.foot-inner {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s2);
  align-items: baseline;
  justify-content: space-between;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.foot-inner a {
  color: var(--on-navy-muted);
  text-decoration: none;
  transition: color 200ms var(--ease);
}

.foot-inner a:hover { color: var(--blue); }
.foot-links { display: flex; gap: var(--s3); }

/* ---- placeholder marker ---------------------------------- */

.ph {
  background: var(--paper-2);
  border-bottom: 1px dashed var(--blue-text);
  padding: 0 3px;
}

.contact-card.primary .ph,
.cell:hover .ph,
.member:hover .ph {
  background: rgba(255, 255, 255, 0.45);
  border-bottom-color: var(--navy);
}

/* ---- responsive ------------------------------------------ */

@media (max-width: 900px) {
  :root { --label-col: 128px; }
  .hero { padding: var(--s6) 0 var(--s5); }
  .hero-marks .s1 { left: 6%; }
  .hero-marks .s3 { right: 6%; }
  .sec { gap: var(--s4); }
  .sec-num { font-size: 50px; }
  .facts > div { grid-template-columns: 145px 1fr; }
}

@media (max-width: 620px) {
  body { font-size: 16px; }
  .wrap { padding: 0 var(--s3); }
  .brand span { display: none; }   /* logo carries the wordmark */
  .nav-links { gap: var(--s3); }
  .nav-links a { font-size: 11px; letter-spacing: 0.08em; }

  .hero { padding: var(--s5) 0 var(--s4); }
  .hero-title .script { transform: none; margin-bottom: 0.02em; font-size: 34px; }
  /* wrap the long line instead of letting it run edge to edge */
  .hero-title .main { font-size: clamp(26px, 8.2vw, 40px); max-width: 12ch; }
  .hero-marks .s2, .hero-marks .s3, .hero-marks .s4 { display: none; }
  .hero-marks .s1 { top: 6%; left: 5%; width: 24px; }
  .hero-emblem { opacity: 0.10; width: clamp(230px, 62vw, 300px); }

  .marquee-track span { font-size: 13px; letter-spacing: 0.16em; }

  section { padding: var(--s5) 0; }
  .sec { grid-template-columns: 1fr; gap: var(--s3); }
  .sec-label { position: static; display: flex; align-items: baseline; gap: 14px; }
  .sec-num { margin-bottom: 0; font-size: 34px; }

  .facts > div { grid-template-columns: 1fr; gap: 4px; }
  .lead::first-letter { font-size: 62px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .marquee-track { animation: none; transform: none; }
  *, *::before, *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}
