/* PNDS site styles: editorial palette, serif headings, sans body. */
:root {
  --paper: #FAF9F6;
  --paper-alt: #F3F1EB;
  --white: #ffffff;
  --ink: #111D2E;          /* deep navy: primary ink and dark surfaces */
  --ink-soft: #3E4A5C;     /* body copy on paper */
  --ink-muted: #5E6878;    /* meta text; 5.6:1 on paper */
  --line: #E2E0D8;
  --line-strong: #CFCCC0;
  --accent: #8C1D2C;       /* crimson */
  --accent-dark: #6E1522;
  --on-ink: #F4F2EC;
  --on-ink-muted: #B8C0CC;

  --s1: 8px; --s2: 16px; --s3: 24px; --s4: 32px; --s6: 48px; --s8: 64px; --s12: 96px;
  --radius: 2px;

  --font-head: "Newsreader", Georgia, "Times New Roman", serif;
  --font-body: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --max: 1160px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink-soft);
  font: 400 17px/1.65 var(--font-body);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--ink); text-decoration-color: var(--accent); text-underline-offset: 3px; }
a:hover { color: var(--accent); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

h1, h2, h3 { font-family: var(--font-head); font-weight: 500; color: var(--ink); margin: 0 0 var(--s2); line-height: 1.15; letter-spacing: -0.01em; }
h1 { font-size: clamp(2.25rem, 4.6vw, 3.5rem); line-height: 1.08; letter-spacing: -0.02em; }
h2 { font-size: clamp(1.875rem, 3vw, 2.5rem); }
h3 { font-size: 1.5rem; margin-bottom: var(--s1); }
p { margin: 0 0 var(--s2); }

.container { width: 100%; max-width: var(--max); margin: 0 auto; padding-inline: var(--s3); }
.prose { max-width: 62ch; }

.skip-link { position: absolute; left: var(--s2); top: -48px; background: var(--ink); color: var(--white); padding: var(--s1) var(--s2); z-index: 10; }
.skip-link:focus { top: var(--s2); }

/* Header */
.site-header { position: sticky; top: 0; z-index: 5; background: var(--paper); border-bottom: 1px solid var(--line); }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: var(--s2); height: 72px; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--ink); }
.brand img { width: 40px; height: 40px; border-radius: 50%; }
.brand-name { font: 500 1.0625rem/1.15 var(--font-head); }
.brand:hover { color: var(--ink); }
.nav-list { display: flex; align-items: center; gap: var(--s4); list-style: none; margin: 0; padding: 0; }
.nav-list a:not(.button) { text-decoration: none; font-size: .9375rem; font-weight: 500; color: var(--ink-soft); }
.nav-list a:not(.button):hover { color: var(--accent); }

/* Buttons */
.button {
  display: inline-block; padding: 12px 22px; border-radius: var(--radius);
  background: var(--ink); color: var(--white); border: 1px solid var(--ink);
  font: 600 .9375rem/1.4 var(--font-body); text-decoration: none;
  transition: background-color .15s ease, border-color .15s ease, color .15s ease;
}
.button:hover { background: var(--accent); border-color: var(--accent); color: var(--white); }
.button-sm { padding: 7px 16px; }
.button-secondary { background: transparent; color: var(--ink); border-color: var(--line-strong); }
.button-secondary:hover { background: transparent; color: var(--accent); border-color: var(--accent); }
.button-light { background: var(--paper); color: var(--ink); border-color: var(--paper); }
.button-light:hover { background: var(--white); border-color: var(--white); color: var(--accent); }
.button-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: var(--s4); }

.eyebrow { font: 600 .8125rem/1.4 var(--font-body); text-transform: uppercase; letter-spacing: .12em; color: var(--accent); margin-bottom: var(--s3); }
.lede { font-size: 1.125rem; color: var(--ink-soft); max-width: 46ch; }
.text-link { font-weight: 600; font-size: .9375rem; }

/* Hero: asymmetric split */
.hero { padding: var(--s12) 0 var(--s8); }
.hero-grid { display: grid; grid-template-columns: 1.1fr 1fr; gap: var(--s8); align-items: center; }
.hero h1 { max-width: 16ch; }
.hero-figure { margin: 0; }
.photo-frame { aspect-ratio: 4 / 3; border: 1px solid var(--line-strong); padding: 10px; background: var(--white); }
.photo-frame img { width: 100%; height: 100%; object-fit: cover; background: var(--paper-alt); }
.hero-figure figcaption { margin-top: 12px; font-size: .8125rem; color: var(--ink-muted); padding-left: 12px; border-left: 2px solid var(--accent); }

/* Impact strip */
.impact-grid { display: grid; grid-template-columns: repeat(3, 1fr); margin: 0; border-top: 1px solid var(--ink); border-bottom: 1px solid var(--line); }
.impact-item { display: flex; flex-direction: column-reverse; justify-content: flex-end; padding: var(--s4) var(--s3); border-left: 1px solid var(--line); }
.impact-item:first-child { border-left: 0; padding-left: 0; }
.impact-num { margin: 0 0 4px; font: 500 clamp(2.25rem, 4vw, 3rem)/1.1 var(--font-head); color: var(--ink); }
.impact-item dt { font-size: .8125rem; font-weight: 600; text-transform: uppercase; letter-spacing: .08em; color: var(--ink-muted); }

/* Sections */
.section { padding: var(--s12) 0; }
.section-rule { padding-top: 0; }
.section-alt { background: var(--paper-alt); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section-head { display: flex; align-items: baseline; gap: var(--s3); margin-bottom: var(--s4); }
.section-head h2 { margin: 0; }
.section-head::after { content: ""; flex: 1; border-top: 1px solid var(--line); transform: translateY(-6px); }

.event-meta { font-size: .8125rem; font-weight: 600; text-transform: uppercase; letter-spacing: .08em; color: var(--accent); margin-bottom: var(--s1); }

/* Upcoming event */
.event { display: grid; grid-template-columns: auto 1fr auto; gap: var(--s4); align-items: center; padding: var(--s4) 0; border-top: 1px solid var(--ink); border-bottom: 1px solid var(--line); }
.event-body p:last-child { margin-bottom: 0; max-width: 62ch; }
.date-badge { width: 84px; text-align: center; border: 1px solid var(--ink); padding: 10px 0; color: var(--ink); line-height: 1.15; background: var(--white); }
.date-badge .m { display: block; font-weight: 600; text-transform: uppercase; letter-spacing: .1em; font-size: .75rem; color: var(--accent); }
.date-badge .d { display: block; font: 500 1.875rem var(--font-head); }

/* Past events */
.past-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--ink); }
.past-item { display: grid; grid-template-columns: 120px 1fr; gap: var(--s4); padding: var(--s4) 0; border-bottom: 1px solid var(--line); }
.past-year { font: 500 1.5rem/1.2 var(--font-head); color: var(--ink-muted); margin: 0; }
.past-item p:not(.event-meta):not(.past-year) { max-width: 62ch; }
.past-item > div > :last-child { margin-bottom: 0; }

/* Team */
.team-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--s6) var(--s4); align-items: start; }
/* Each card shares its rows (photo, name, role, bio, button) with the other cards in its row,
   so names, roles and "Read bio" buttons line up even when a role wraps to two lines. */
@supports (grid-template-rows: subgrid) {
  .team-grid { row-gap: 0; margin-bottom: calc(var(--s6) * -1); }
  .member { display: grid; grid-row: span 5; grid-template-rows: subgrid; row-gap: 0; padding-bottom: var(--s6); }
  .member-body { display: contents; }
  .member .role { align-self: start; }
  .bio-toggle { align-self: end; justify-self: start; }
}
.member img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; object-position: center 20%; background: var(--line); border: 1px solid var(--line); margin-bottom: var(--s2); }
.member h3 { margin-bottom: 2px; }
.member .role { font-size: .8125rem; font-weight: 600; text-transform: uppercase; letter-spacing: .08em; color: var(--accent); margin-bottom: var(--s2); }
.member-bio { font-size: .9375rem; }
.member-bio p { margin-bottom: 12px; }
.member-bio h4 { font: 600 .75rem/1.4 var(--font-body); text-transform: uppercase; letter-spacing: .1em; color: var(--ink); margin: var(--s2) 0 var(--s1); padding-top: 12px; border-top: 1px solid var(--line); }
.member-bio ul { margin: 0; padding-left: 18px; }
.member-bio li { margin-bottom: 4px; }
.member-bio li::marker { color: var(--accent); }

/* Bio excerpts (only when JS is running; the full bio opens in a dialog) */
.js .member-bio.is-collapsed { height: calc(1.65em * 4); overflow: hidden; position: relative;
  -webkit-mask-image: linear-gradient(#000 55%, transparent); mask-image: linear-gradient(#000 55%, transparent); }
.bio-toggle { margin-top: 12px; padding: 0 0 2px; background: none; border: 0; border-bottom: 1px solid var(--accent); color: var(--ink); font: 600 .875rem var(--font-body); cursor: pointer; }
.bio-toggle:hover { color: var(--accent); }

/* Class sign-up form */
.signup { display: grid; grid-template-columns: 1fr 1.6fr; gap: var(--s6); margin-top: var(--s6); padding: var(--s4); background: var(--white); border: 1px solid var(--line-strong); }
.signup-intro p { font-size: .9375rem; margin-bottom: 0; }
.signup-intro p + p { margin-top: 12px; }
.signup-form { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s2) var(--s3); }
.field { display: flex; flex-direction: column; gap: 6px; }
.field-wide { grid-column: 1 / -1; }
.field label { font-size: .8125rem; font-weight: 600; color: var(--ink); }
.optional { font-weight: 400; color: var(--ink-muted); }
.field input, .field select, .field textarea {
  font: 400 1rem/1.4 var(--font-body); color: var(--ink); background: var(--paper);
  border: 1px solid var(--line-strong); border-radius: var(--radius); padding: 10px 12px; width: 100%;
}
.field textarea { resize: vertical; }
.field input:focus-visible, .field select:focus-visible, .field textarea:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; border-color: var(--accent); }
.signup-form .button { cursor: pointer; }

/* Bio dialog */
.bio-dialog { width: min(720px, calc(100% - 32px)); max-height: min(85vh, 900px); padding: 0; border: 1px solid var(--line-strong); border-top: 3px solid var(--accent); border-radius: var(--radius); background: var(--paper); color: var(--ink-soft); box-shadow: none; overflow: hidden; }
.bio-dialog::backdrop { background: rgba(17, 29, 46, .62); }
.bio-dialog-inner { position: relative; max-height: inherit; overflow-y: auto; padding: var(--s4); overscroll-behavior: contain; }
.bio-dialog-head { display: grid; grid-template-columns: 96px 1fr; gap: var(--s3); align-items: center; margin-bottom: var(--s3); padding-right: var(--s6); }
.bio-dialog-head img { width: 96px; aspect-ratio: 4 / 5; object-fit: cover; object-position: center 20%; border: 1px solid var(--line); }
.bio-dialog-head h3 { margin-bottom: 4px; font-size: 1.75rem; }
.bio-dialog-head .role { font-size: .8125rem; font-weight: 600; text-transform: uppercase; letter-spacing: .08em; color: var(--accent); margin: 0; }
.bio-dialog-body { font-size: 1rem; }
.bio-dialog-close { position: absolute; top: 12px; right: 12px; width: 44px; height: 44px; display: grid; place-items: center; background: transparent; border: 1px solid var(--line-strong); border-radius: var(--radius); color: var(--ink); font: 400 1.75rem/1 var(--font-body); cursor: pointer; }
.bio-dialog-close:hover { color: var(--accent); border-color: var(--accent); }
html.dialog-open { overflow: hidden; }

/* Course facts strip */
.course-facts { display: flex; flex-wrap: wrap; gap: 0; margin: var(--s2) 0 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.course-facts > div { padding: 10px var(--s3) 10px 0; margin-right: var(--s3); border-right: 1px solid var(--line); }
.course-facts > div:last-child { border-right: 0; margin-right: 0; }
.course-facts dt { font-size: .75rem; font-weight: 600; text-transform: uppercase; letter-spacing: .08em; color: var(--ink-muted); }
.course-facts dd { margin: 0; font-weight: 600; color: var(--ink); }

/* Sign-up actions */
.form-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.form-status { flex-basis: 100%; margin: 0; min-height: 1.65em; font-size: .875rem; font-weight: 600; color: var(--ink); }
.form-status:not(:empty)::before { content: "✓ "; color: var(--accent); }

/* Focus outlines that stay visible on dark sections */
.band :focus-visible, .site-footer :focus-visible { outline-color: var(--on-ink); }

/* Navy band */
.band { background: var(--ink); color: var(--on-ink); }
.band h2 { color: var(--on-ink); }
.band p { color: var(--on-ink-muted); margin-bottom: 0; }
.band-inner { display: flex; justify-content: space-between; align-items: center; gap: var(--s6); }

.impact-note { margin: 12px 0 0; font-size: .8125rem; color: var(--ink-muted); }

/* Sponsors */
.sponsor-cta { margin-top: var(--s2); font-weight: 600; color: var(--ink); }
.sponsor-logos { margin-top: var(--s4); padding-top: var(--s3); border-top: 1px solid var(--line); }
.sponsor-logos h3 { font: 600 .75rem/1.4 var(--font-body); text-transform: uppercase; letter-spacing: .1em; color: var(--ink-muted); margin-bottom: var(--s2); }
.sponsor-logos ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; align-items: center; gap: var(--s3) var(--s4); }
.sponsor-logos img { height: 48px; width: auto; filter: grayscale(1); opacity: .85; }
.sponsors-grid { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s8); align-items: start; }
.sponsor-panel { border: 1px solid var(--line-strong); border-top: 3px solid var(--accent); background: var(--white); padding: var(--s4); }
.sponsor-panel p { margin-bottom: 0; }
.sponsor-panel .button-row { margin-top: var(--s3); }

/* Footer */
.site-footer { background: var(--ink); color: var(--on-ink-muted); font-size: .9375rem; border-top: 1px solid rgba(255,255,255,.08); }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: var(--s6); padding-top: var(--s8); padding-bottom: var(--s6); }
.site-footer h2 { font: 600 .75rem/1.4 var(--font-body); text-transform: uppercase; letter-spacing: .12em; color: var(--on-ink); margin-bottom: var(--s2); }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--s1); }
.site-footer a { color: var(--on-ink); text-decoration-color: rgba(255,255,255,.3); }
.site-footer a:hover { color: var(--white); text-decoration-color: var(--white); }
.footer-brand { display: flex; gap: var(--s2); align-items: flex-start; max-width: 46ch; }
.footer-brand img { width: 48px; height: 48px; border-radius: 50%; flex: none; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.12); padding-top: var(--s3); padding-bottom: var(--s3); font-size: .8125rem; }
.site-footer p { margin: 0; }
.footer-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px var(--s3); }

/* Responsive */
@media (max-width: 960px) {
  .hero { padding-top: var(--s8); }
  .hero-grid { grid-template-columns: 1fr; gap: var(--s6); }
  .hero h1 { max-width: 20ch; }
  .team-grid { grid-template-columns: repeat(2, 1fr); }
  .sponsors-grid { grid-template-columns: 1fr; gap: var(--s4); }
  .signup { grid-template-columns: 1fr; gap: var(--s3); }
  .band-inner { flex-direction: column; align-items: flex-start; gap: var(--s4); }
  .section { padding: var(--s8) 0; }
  .section-rule { padding-top: 0; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-grid > :first-child { grid-column: 1 / -1; }
}
@media (max-width: 640px) {
  body { font-size: 16px; }
  .container { padding-inline: var(--s2); }
  .header-inner { height: 64px; }
  .nav-list { gap: 20px; }
  .nav-hide-sm { display: none; }
  .brand-name { font-size: .9375rem; }

  .hero { padding: var(--s6) 0 var(--s6); }
  .hero-grid { gap: var(--s4); }
  .eyebrow { margin-bottom: var(--s2); }
  .lede { font-size: 1.0625rem; }
  .button-row { margin-top: var(--s3); }
  .hero .button-row .button { flex: 1 1 auto; text-align: center; }
  .photo-frame { padding: 6px; }

  /* Impact: three compact columns */
  .impact-item, .impact-item:first-child { padding: var(--s2) 10px; }
  .impact-item:first-child { padding-left: 0; }
  .impact-item:last-child { padding-right: 0; }
  .impact-num { font-size: 1.875rem; }
  .impact-item dt { font-size: .6875rem; letter-spacing: .06em; line-height: 1.35; }

  .section { padding: var(--s6) 0; }
  .section-rule { padding-top: 0; }
  .section-head { margin-bottom: var(--s3); }
  .section-head::after { display: none; }

  .event { grid-template-columns: auto 1fr; gap: var(--s2); align-items: start; padding: var(--s3) 0; }
  .date-badge { width: 64px; padding: 6px 0; }
  .date-badge .d { font-size: 1.5rem; }
  .event .button { grid-column: 1 / -1; justify-self: stretch; text-align: center; }
  .past-item { grid-template-columns: 1fr; gap: 4px; padding: var(--s3) 0; }
  .past-year { font-size: 1.25rem; }

  /* Team: compact rows, small portrait beside name and role */
  .team-grid { grid-template-columns: 1fr; gap: 0; margin-bottom: 0; }
  .member { display: grid; grid-row: auto; grid-template-rows: none; grid-template-columns: 96px 1fr; column-gap: var(--s2); padding: var(--s3) 0; border-top: 1px solid var(--line); }
  .member:first-child { border-top: 0; padding-top: 0; }
  .member img { width: 96px; margin: 0; }
  .member h3 { font-size: 1.3125rem; }
  .member-body { display: contents; }
  .member h3, .member .role { grid-column: 2; }
  .member h3 { align-self: end; }
  .member .role { align-self: start; margin-bottom: 0; }
  .member img { grid-row: 1 / span 2; }
  .member-bio, .bio-toggle { grid-column: 1 / -1; }
  .member-bio { margin-top: var(--s2); }
  .bio-toggle { justify-self: start; align-self: start; }
  .js .member-bio.is-collapsed { height: calc(1.65em * 3); }

  .bio-dialog { width: calc(100% - 16px); max-height: calc(100dvh - 32px); }
  .bio-dialog-inner { padding: var(--s3) var(--s2); }
  .bio-dialog-head { grid-template-columns: 72px 1fr; gap: var(--s2); padding-right: 52px; }
  .bio-dialog-head img { width: 72px; }
  .bio-dialog-head h3 { font-size: 1.375rem; }
  .bio-dialog-close { top: 8px; right: 8px; }

  .course-facts { display: grid; grid-template-columns: repeat(3, auto); justify-content: start; }
  .course-facts > div { padding-right: 12px; margin-right: 12px; }
  .course-facts dd { font-size: .9375rem; line-height: 1.35; }
  .form-actions .button { width: 100%; }

  .band-inner .button { align-self: stretch; text-align: center; }
  .signup { padding: var(--s3) var(--s2); gap: var(--s3); margin-top: var(--s4); }
  .signup-form { grid-template-columns: 1fr; }
  .sponsor-panel { padding: var(--s3); }
  .sponsor-panel .button { flex: 1 1 auto; text-align: center; }

  .footer-grid { gap: var(--s4); padding-top: var(--s6); padding-bottom: var(--s4); }
}
@media (max-width: 400px) {
  .brand-name { font-size: 0; }
  .brand-name::before { content: "PNDS"; font-size: 1.125rem; }
  .footer-grid { grid-template-columns: 1fr; }
}
