/* HUCM AANS Chapter site
   Palette: Howard-style navy, crimson, gold.
   Hex values are working approximations, not verified official Howard brand values.
   Swap them here once official brand hexes are confirmed. */

:root {
  --navy: #002147;
  --navy-light: #14355e;
  --crimson: #a6192e;
  --gold: #c99700;
  --gold-pale: #f7edd2;
  --ink: #1a1a1a;
  --paper: #ffffff;
  --gray: #f2f3f5;
  --font-body: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-head: Georgia, "Times New Roman", serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

/* scrollbar-gutter keeps the page width identical while the intro holds
   overflow:hidden, so classic-scrollbar systems (Windows) don't reflow
   the whole page the moment the intro unlocks scrolling */
html { scroll-behavior: smooth; scrollbar-gutter: stable; }

body {
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--paper);
  line-height: 1.6;
}

img { max-width: 100%; display: block; }

a { color: var(--crimson); }

.container {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 1.25rem;
}

/* Header and navigation */

.site-header {
  background: var(--navy);
  color: #fff;
  border-bottom: 4px solid var(--gold);
  position: sticky;
  top: 0;
  z-index: 50;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.75rem 1.25rem;
  max-width: 1080px;
  margin: 0 auto;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: #fff;
  text-decoration: none;
  min-width: 0;
}

.brand-mark {
  width: 44px;
  height: 44px;
  flex: 0 0 44px;
  border: 2px dashed var(--gold);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.6rem;
  text-align: center;
  color: var(--gold);
}

.brand-mark-img {
  height: 64px;
  width: auto;
  flex: 0 0 auto;
}

.brand-text { line-height: 1.25; }

.brand-text .brand-title {
  font-family: var(--font-head);
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.brand-text .brand-sub {
  font-size: 0.7rem;
  color: #cdd6e4;
}

.nav-toggle {
  display: none;
  background: none;
  border: 2px solid var(--gold);
  color: var(--gold);
  font-size: 1rem;
  padding: 0.35rem 0.7rem;
  border-radius: 4px;
  cursor: pointer;
}

.site-nav ul {
  display: flex;
  gap: 0.25rem;
  list-style: none;
}

.site-nav a {
  display: block;
  color: #fff;
  text-decoration: none;
  padding: 0.5rem 0.85rem;
  border-radius: 4px;
  font-size: 0.95rem;
}

.site-nav a:hover { background: var(--navy-light); }

.site-nav a.active {
  background: var(--crimson);
  color: #fff;
}

/* Hero */

.hero {
  background: linear-gradient(160deg, var(--navy) 0%, var(--navy-light) 100%);
  color: #fff;
  padding: 4.5rem 0 4rem;
  position: relative;
  overflow: hidden;
  min-height: 460px;
  display: flex;
  align-items: center;
}

.hero .container {
  position: relative;
  z-index: 1;
  width: 100%;
}

/* dark scrim over the text side so the heading reads over the fire */
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  background: linear-gradient(
    100deg,
    rgba(2, 20, 48, 0.65) 0%,
    rgba(2, 20, 48, 0.38) 45%,
    rgba(2, 20, 48, 0) 72%
  );
  pointer-events: none;
}

.neuron-layer {
  position: absolute;
  top: 0;
  left: 0;
  pointer-events: none;
}

.hero h1 {
  font-family: var(--font-head);
  font-size: clamp(1.9rem, 4.5vw, 3rem);
  line-height: 1.15;
  max-width: 20ch;
  text-shadow: 0 2px 10px rgba(1, 15, 40, 0.85), 0 0 34px rgba(1, 15, 40, 0.9);
}

.hero .hero-sub {
  margin-top: 1rem;
  max-width: 60ch;
  font-size: 1.1rem;
  font-weight: 700;
  color: #e6ecf6;
  text-shadow: 0 1px 8px rgba(1, 15, 40, 0.9), 0 0 22px rgba(1, 15, 40, 0.8);
}

.hero-rule {
  width: 72px;
  height: 5px;
  background: var(--gold);
  border: none;
  margin: 1.5rem 0;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.75rem;
}

.btn {
  display: inline-block;
  text-decoration: none;
  padding: 0.7rem 1.4rem;
  border-radius: 4px;
  font-weight: 600;
  font-size: 0.95rem;
}

.btn-primary {
  background: var(--crimson);
  color: #fff;
}

.btn-primary:hover { background: #8c1527; }

.btn-outline {
  border: 2px solid var(--gold);
  color: var(--gold);
}

.btn-outline:hover {
  background: var(--gold);
  color: var(--navy);
}

/* Sections */

.section { padding: 3.5rem 0; }

.section-alt { background: var(--gray); }

.section h2 {
  font-family: var(--font-head);
  font-size: 1.8rem;
  color: var(--navy);
}

.section-rule {
  width: 56px;
  height: 4px;
  background: var(--crimson);
  border: none;
  margin: 0.75rem 0 1.5rem;
}

.lede {
  max-width: 70ch;
  font-size: 1.05rem;
}

/* Card grid */

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 1.25rem;
  margin-top: 1.75rem;
}

.card {
  background: var(--paper);
  border: 1px solid #e0e2e6;
  border-top: 4px solid var(--gold);
  border-radius: 6px;
  padding: 1.4rem;
}

.section-alt .card { border-color: #d8dade; border-top-color: var(--gold); }

.card h3 {
  font-family: var(--font-head);
  color: var(--navy);
  font-size: 1.15rem;
  margin-bottom: 0.5rem;
}

.card p { font-size: 0.95rem; }

/* Gutter art: wireframe brain with flowing vasculature beside the content */

#what-we-do {
  position: relative;
  overflow: hidden;
  background: transparent;
}

/* one continuous angiogram behind both mid-page sections */
.angio-span {
  background-image:
    linear-gradient(rgba(255, 253, 253, 0.62), rgba(255, 250, 250, 0.62)),
    url("../assets/angio-bg.jpg?v=4");
  background-size: cover;
  background-position: center 20%;
}

.angio-span .section-alt { background: transparent; }

/* About: the chapter president's brain engraving on parchment */
.engraving-span {
  background-image: url("../assets/engraving-bg.jpg?v=2");
  background-size: cover;
  background-position: center top;
}

.engraving-span .section-alt,
.engraving-span .section { background: transparent; }

/* Leadership: lateral skull radiograph on pale film blue */
.xray-span {
  background-image: url("../assets/xray-bg.jpg?v=2");
  background-size: cover;
  background-position: center top;
}

/* Events: EEG alpha-rhythm traces in gold on warm cream */
.eeg-span {
  background-image: url("../assets/eeg-bg.jpg?v=2");
  background-size: cover;
  background-position: center top;
}

/* Contact: Cajal cortex neuron drawings in warm ink on paper */
.cajal-span {
  background-image: url("../assets/cajal-bg.jpg?v=2");
  background-size: cover;
  background-position: center top;
}

.xray-span .section,
.xray-span .section-alt,
.eeg-span .section,
.cajal-span .section { background: transparent; }

.field-lists {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 2rem;
  margin-top: 2.5rem;
}

@media (max-width: 760px) {
  .field-lists { grid-template-columns: 1fr; }
}

.field-lists h3 {
  font-family: var(--font-head);
  color: var(--navy);
  font-size: 1.25rem;
  margin-bottom: 0.75rem;
}

.link-list {
  list-style: none;
}

.link-list li {
  padding: 0.65rem 0;
  border-bottom: 1px solid rgba(166, 25, 46, 0.15);
}

.link-list a {
  color: var(--navy);
  font-weight: 600;
  text-decoration: none;
}

.link-list a:hover { color: var(--crimson); }

.link-list span {
  display: block;
  font-size: 0.8rem;
  color: #454c56;
  margin-top: 0.15rem;
}

.bg-credit {
  margin-top: 1.5rem;
  font-size: 0.7rem;
  color: #9aa0a8;
}

.bg-credit a { color: #9aa0a8; }

#what-we-do .container { position: relative; z-index: 1; }

.gutter-art {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  pointer-events: none;
}

.gutter-art-right {
  left: auto;
  right: 0;
}

.gutter-art canvas {
  position: absolute;
  top: 0;
  left: 0;
}

/* gutterless widths (phones/tablets): the two models regroup as a
   centered pair at the foot of the section (built by js/heart3d.js) */
.gutter-row {
  display: flex;
  justify-content: center;
  gap: 18px;
  padding: 10px 0 26px;
}

.gutter-art-inline {
  position: relative;
  top: auto;
  bottom: auto;
  left: auto;
  right: auto;
}

/* pre-rendered model still: instant stand-in until (or instead of) the
   live WebGL panel - same navy plate as the canvas backdrop */
.gutter-still {
  position: absolute;
  object-fit: contain;
  background: #0d2b52;
  border-radius: 10px;
  pointer-events: none;
}

.gutter-art.intro-stage .gutter-still { display: none; }

.gutter-plate {
  position: absolute;
  top: 40px;
  left: 8px;
  right: 8px;
}

.gutter-credit {
  position: absolute;
  left: 0;
  right: 0;
  text-align: center;
  font-size: 0.6rem;
  color: #9aa0a8;
  /* narrow gutters (80px laptops) must wrap long tokens like
     "BodyParts3D/DBCLS" instead of spilling past the viewport edge */
  overflow-wrap: anywhere;
  padding: 0 3px;
}

.gutter-credit a { color: #9aa0a8; }

/* Photo band */

.photo-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.25rem;
  margin-top: 1.75rem;
}

@media (max-width: 980px) {
  .photo-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 520px) {
  .photo-grid { grid-template-columns: 1fr; }
}

.photo-card { margin: 0; }

.photo-frame {
  position: relative;
  border-radius: 6px;
  overflow: hidden;
  border: 1px solid #d8dade;
  aspect-ratio: 4 / 3;
  background: var(--navy);
}

.photo-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  filter: saturate(0.72) contrast(1.04);
}

/* Navy wash so photos from different sources read as one set */
.photo-frame::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(160deg, rgba(0, 33, 71, 0.26), rgba(0, 33, 71, 0.04));
  pointer-events: none;
}

.photo-card figcaption {
  font-size: 0.85rem;
  color: #454a52;
  margin-top: 0.5rem;
  line-height: 1.45;
}

.photo-card .credit {
  display: block;
  font-size: 0.74rem;
  color: #7a7f88;
}

.photo-card .credit a { color: #7a7f88; }

/* Get involved strip */

.involve {
  background: var(--navy);
  color: #fff;
  padding: 3rem 0;
}

.involve h2 {
  font-family: var(--font-head);
  font-size: 1.7rem;
  color: #fff;
}

.involve p {
  max-width: 62ch;
  margin-top: 0.75rem;
  color: #dbe2ee;
}

.involve .hero-actions { margin-top: 1.5rem; }

/* Placeholders: every unconfirmed item on the site uses this style
   so real content and placeholder content can never be confused. */

.placeholder {
  display: inline-block;
  background: var(--gold-pale);
  border: 1px dashed var(--gold);
  border-radius: 3px;
  padding: 0 0.4rem;
  color: #6b5300;
  font-family: var(--font-body);
  font-size: 0.9em;
}

.placeholder-block {
  background: var(--gold-pale);
  border: 2px dashed var(--gold);
  border-radius: 6px;
  padding: 2.5rem 1.5rem;
  text-align: center;
  color: #6b5300;
}

/* Contact page */

.contact-grid { max-width: 980px; }

.contact-line {
  margin-top: 0.75rem;
  font-weight: 600;
}

.contact-line a { color: var(--crimson); }

/* Events page */

.events-subhead {
  font-family: var(--font-head);
  color: var(--navy);
  font-size: 1.25rem;
  margin-top: 2rem;
}

.event-card {
  display: flex;
  gap: 1.5rem;
  margin-top: 1rem;
  background: #fff;
  border: 1px solid #e0e2e6;
  border-top: 4px solid var(--crimson);
  border-radius: 6px;
  padding: 1.5rem;
  max-width: 760px;
}

.event-date {
  flex: 0 0 auto;
  text-align: center;
  background: var(--navy);
  color: #fff;
  border-radius: 6px;
  padding: 0.8rem 1.1rem;
  align-self: flex-start;
}

.event-month {
  display: block;
  font-size: 0.8rem;
  letter-spacing: 0.12em;
  color: var(--gold);
  font-weight: 700;
}

.event-day {
  display: block;
  font-family: var(--font-head);
  font-size: 2rem;
  font-weight: 700;
  line-height: 1.1;
}

.event-year {
  display: block;
  font-size: 0.75rem;
  color: #b9c2d0;
}

.event-body h4 {
  font-family: var(--font-head);
  color: var(--navy);
  font-size: 1.15rem;
}

.event-meta {
  font-size: 0.85rem;
  color: var(--crimson);
  font-weight: 600;
  margin: 0.25rem 0 0.6rem;
}

.event-body p { font-size: 0.95rem; }

@media (max-width: 560px) {
  .event-card { flex-direction: column; }
}

/* About page */

.about-timeline {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  margin-top: 2.25rem;
  max-width: 760px;
}

@media (max-width: 640px) {
  .about-timeline { grid-template-columns: 1fr; }
}

.milestone-figure {
  display: block;
  font-family: var(--font-head);
  font-size: 2.4rem;
  font-weight: 700;
  color: var(--crimson);
  line-height: 1.1;
}

.milestone-label {
  display: block;
  font-size: 0.9rem;
  color: #555b64;
  margin-top: 0.3rem;
}

.founders-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 2.5rem;
  margin-top: 2rem;
}

@media (max-width: 760px) {
  .founders-grid { grid-template-columns: 1fr; }
}

.founder-card { text-align: left; }

.founder-card .person-photo { max-width: 260px; margin: 0 auto; }

.founder-bio {
  font-size: 0.95rem;
  color: var(--ink);
  margin-top: 0.6rem;
  line-height: 1.55;
}

.btn-outline-dark {
  border: 2px solid var(--navy);
  color: var(--navy);
}

.btn-outline-dark:hover {
  background: var(--navy);
  color: #fff;
}

/* People grid (leadership) */

.people-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 1.5rem;
  margin-top: 1.75rem;
}

.people-grid-faculty {
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  max-width: 560px;
}

/* About: the Douglass quote in the rebuilding section */

.rebuild-quote {
  margin: 1.7rem 0;
  padding: 0.35rem 0 0.35rem 1.5rem;
  border-left: 4px solid var(--crimson);
  max-width: 56ch;
}

.rebuild-quote p {
  font-family: var(--font-head);
  font-style: italic;
  font-size: 1.3rem;
  color: var(--navy);
  line-height: 1.45;
}

.rebuild-quote cite {
  display: block;
  margin-top: 0.55rem;
  font-style: normal;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 600;
  color: var(--crimson);
}

/* About: the rebuilt calendar, indented with crimson markers */

.rebuild-list {
  list-style: none;
  margin: 0.85rem 0 1.35rem 1.5rem;
  max-width: 60ch;
}

.rebuild-list li {
  position: relative;
  padding-left: 1.2rem;
  margin-bottom: 0.55rem;
  font-size: 1.05rem;
}

.rebuild-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.5em;
  width: 8px;
  height: 8px;
  background: var(--crimson);
}

/* Executive board grouped by role: the role is a heading over the group,
   and each photo carries only the person's name */

.board-groups {
  display: flex;
  flex-wrap: wrap;
  gap: 2.25rem;
  margin-top: 1.75rem;
}

.role-heading {
  font-family: var(--font-body);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: 700;
  color: var(--crimson);
  text-align: center;
  padding-bottom: 0.45rem;
  border-bottom: 2px solid rgba(166, 25, 46, 0.3);
}

.role-people {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1.25rem;
  margin-top: 0.9rem;
}

.role-people .person-card { width: 172px; }

@media (max-width: 560px) {
  .board-groups { gap: 1.75rem 1.5rem; }
  .role-people .person-card { width: 140px; }
}

.person-card { margin: 0; text-align: center; }

.person-photo {
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid #d8dade;
  background: var(--gray);
}

.person-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.placeholder-photo {
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--gold-pale);
  border: 2px dashed var(--gold);
  color: #6b5300;
  font-size: 0.85rem;
  letter-spacing: 0.1em;
}

.person-card figcaption {
  margin-top: 0.6rem;
  line-height: 1.35;
}

.person-role {
  display: block;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--crimson);
  font-weight: 600;
}

.person-name {
  display: block;
  font-family: var(--font-head);
  font-size: 1.02rem;
  color: var(--navy);
  font-weight: 700;
}

.person-sub {
  display: block;
  font-size: 0.82rem;
  color: #666;
}

/* Footer */

.site-footer {
  background: #0d1930;
  color: #b9c2d0;
  padding: 2rem 0;
  font-size: 0.9rem;
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1rem;
}

.site-footer a { color: var(--gold); text-decoration: none; }

.site-stamp {
  width: 100%;
  font-size: 0.78rem;
  color: #7d8794;
}

.site-footer a:hover { text-decoration: underline; }

/* Responsive */

@media (max-width: 820px) {
  .nav-toggle { display: block; }

  .site-nav {
    display: none;
    width: 100%;
  }

  .site-nav.open { display: block; }

  .header-inner { flex-wrap: wrap; }

  .site-nav ul {
    flex-direction: column;
    padding: 0.5rem 0 0.75rem;
  }
}

/* Entrance intro (home page): black screen, bold statement, then the
   neuron field and both models fly to their resting spots.
   Staged layers: overlay 9988 < neurons 9989 < statement 9993 < models 9995
   (element z-indexes are set inline by js/intro.js while staged). */

.intro-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 9988;
  /* same gradient as the hero, so the intro scene and the page match */
  background: linear-gradient(160deg, var(--navy) 0%, var(--navy-light) 100%);
}

/* the chapter emblem itself, beating behind the statement; the radial
   scrim under the words keeps them readable over the parchment disc */
.intro-overlay::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: min(74vh, 82vw);
  height: min(74vh, 82vw);
  background: url("../assets/logo/crest-badge.png?v=7") center / contain no-repeat;
  opacity: 0.5;
  animation: introLogoPulse 2.6s ease-in-out infinite;
  transition: opacity 1.3s ease;
}

.intro-overlay.scene-live::before { opacity: 0; }

/* the intro serpent canvas rides inside the overlay, above the crest
   backdrop, below the statement scrim; it bows out with the crest */
.intro-serpent {
  position: absolute;
  inset: 0;
  transition: opacity 1.3s ease;
}

.intro-overlay.scene-live .intro-serpent { opacity: 0; }

/* a heartbeat, not a hum: quick systolic kick, slow relaxation */
@keyframes introLogoPulse {
  0%   { transform: translate(-50%, -50%) scale(1); }
  12%  { transform: translate(-50%, -50%) scale(1.055); }
  24%  { transform: translate(-50%, -50%) scale(1.015); }
  36%  { transform: translate(-50%, -50%) scale(1.038); }
  100% { transform: translate(-50%, -50%) scale(1); }
}

.intro-statement-wrap {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 9993;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  pointer-events: none;
}

/* soft pool of dark under the words so they read over the crest;
   clears with the crest once the cinematic starts */
.intro-statement-wrap::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(
    ellipse 48% 27% at 50% 50%,
    rgba(1, 14, 38, 0.86) 0%,
    rgba(1, 14, 38, 0.6) 55%,
    rgba(1, 14, 38, 0) 100%
  );
  transition: opacity 1.3s ease;
  pointer-events: none;
}

.intro-overlay.scene-live + .intro-statement-wrap::before { opacity: 0; }

html.intro-active { overflow: hidden; }

html.intro-active .intro-overlay { display: block; }

html.intro-active .intro-statement-wrap { display: flex; }

/* let staged elements travel outside their sections during the intro */
html.intro-active #what-we-do { overflow: visible; }
html.intro-active .hero { overflow: visible; }

.intro-statement {
  position: relative;
  z-index: 1;
  font-family: var(--font-head);
  font-weight: 700;
  color: #ffffff;
  text-align: center;
  font-size: clamp(1.7rem, 4.2vw, 3.4rem);
  line-height: 1.3;
  max-width: 24ch;
  opacity: 0;
  transition: opacity 0.9s ease;
  text-shadow: 0 2px 14px rgba(1, 12, 35, 0.9), 0 0 30px rgba(1, 12, 35, 0.75);
}

/* panel backdrop lives on the canvas so the intro can fade it in as the
   models fly home; the hero's navy (gradient midpoint) so the panels,
   the intro, and the neuron hero all share one blue.
   The transition is scoped to the un-staged state: staging strips the
   backdrop instantly, and the intro un-stages the wrap only once the
   model has LANDED, so the fade happens seated in the gutter - a
   half-faded slab must never ride across the page mid-flight. */
.gutter-art canvas { background: #0d2b52; }

.gutter-art:not(.intro-stage) canvas { transition: background-color 0.9s ease; }

.gutter-art.intro-stage canvas { background: transparent; }

.gutter-art:not(.intro-stage) .gutter-credit { transition: opacity 0.6s ease 0.7s; }

.gutter-art.intro-stage .gutter-credit { opacity: 0; }

/* the corner doctors live in the header's empty margins on wide screens;
   on narrow screens js/corner-docs.js re-seats them in the hero's bottom
   corners instead of hiding them, so they show at every width */
