/* ==========================================================================
   Pi Beta Beta Chapter, Omega Psi Phi Fraternity, Inc. — site styles
   File: site/headless/css/site.css  (one stylesheet for every page)
   Colours: IHQ Design and Brand Guidelines v1.2 (Royal Purple #6D2077, Old Gold #B7A57A
   and the published alternates). Typeface: Georgia (IHQ primary) for headings.
   No web fonts, no frameworks: system fonts cost nothing to download.
   ========================================================================== */

:root {
  --purple: #6D2077;      /* Royal Purple (primary) */
  --purple-2: #5C216E;    /* alternate purple */
  --purple-3: #4F1859;    /* alternate purple, darkest */
  --gold: #B7A57A;        /* Old Gold (primary) */
  --gold-2: #CDA442;      /* alternate gold */
  --ivory: #F8F5EE;       /* page background (neutral, not a brand colour) */
  --paper: #FFFFFF;
  --ink: #1F1A24;
  --muted: #5D5566;
  --line: #E4DCCD;
  --serif: Georgia, "Times New Roman", serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, Calibri, Arial, sans-serif;
  --radius: 10px;
  --max: 1180px;
  --gutter: max(20px, env(safe-area-inset-left), env(safe-area-inset-right));
  --shadow: 0 1px 2px rgba(31, 26, 36, .06), 0 6px 20px rgba(31, 26, 36, .07);
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }   /* a link whose setting is empty must stay hidden, even inside flex rows */
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; background: var(--ivory); color: var(--ink);
  font: 400 1.0625rem/1.65 var(--sans);
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--purple); text-underline-offset: .18em; }
a:hover { color: var(--purple-3); }
h1, h2, h3, h4 { font-family: var(--serif); line-height: 1.2; margin: 0 0 .5em; color: var(--purple-3); overflow-wrap: break-word; }
h1 { font-size: clamp(2.1rem, 5.2vw, 3.6rem); letter-spacing: -.01em; }
h2 { font-size: clamp(1.65rem, 3.4vw, 2.4rem); }
h3 { font-size: 1.3rem; }
p { margin: 0 0 1em; }
:focus-visible { outline: 3px solid var(--gold-2); outline-offset: 3px; border-radius: 4px; }

.container { width: 100%; max-width: var(--max); margin-inline: auto; padding-inline: var(--gutter); }
.section { padding-block: clamp(56px, 8vw, 96px); }
.section--paper { background: var(--paper); }
.section--purple { background: var(--purple-3); color: #fff; }
.section--purple h2, .section--purple h3 { color: #fff; }
.kicker {
  font: 700 .8rem/1.2 var(--sans); letter-spacing: .14em; text-transform: uppercase;
  color: var(--purple); margin: 0 0 .75rem;
}
.section--purple .kicker, .hero .kicker { color: var(--gold); }
.lead { font-size: 1.15rem; color: var(--muted); max-width: 62ch; }
.section--purple .lead { color: #EDE6F0; }
.section-head { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 12px 24px; margin-bottom: 28px; }
.section-head h2 { margin: 0; }
.section-head > a { display: inline-flex; align-items: center; min-height: 44px; font-weight: 600; }
.skip { position: absolute; left: -9999px; top: 8px; background: var(--paper); padding: 10px 14px; z-index: 50; }
.skip:focus { left: 8px; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5em;
  min-height: 48px; padding: .7em 1.35em; border-radius: 999px; border: 2px solid transparent;
  font: 700 1rem/1.1 var(--sans); text-decoration: none; cursor: pointer; text-align: center;
  transition: background-color .15s, color .15s, border-color .15s;
}
.btn--gold { background: var(--gold); color: var(--ink); }
.btn--purple { background: var(--purple); color: #fff; }
.btn--ghost { border-color: currentColor; color: var(--purple); background: transparent; }
.hero .btn--ghost, .section--purple .btn--ghost { color: #fff; }
.btn--small { min-height: 44px; padding: .55em 1.05em; font-size: .95rem; }
@media (hover: hover) {
  .btn--gold:hover { background: var(--gold-2); color: var(--ink); }
  .btn--purple:hover { background: var(--purple-3); color: #fff; }
  .btn--ghost:hover { background: rgba(255, 255, 255, .12); }
}
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; }
.note { font-size: .95rem; color: var(--muted); }

/* ---------- Header ---------- */
.site-header { background: var(--paper); border-bottom: 4px solid var(--gold); position: relative; z-index: 20; }
.header-inner { display: flex; align-items: center; gap: 16px; min-height: 76px; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--purple-3); margin-right: auto; }
.brand img { width: 44px; height: 55px; }
.brand-name { font: 700 1.15rem/1.15 var(--serif); }
.brand-sub { display: block; font: 600 .74rem/1.3 var(--sans); letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.nav-toggle {
  display: none; min-height: 44px; min-width: 44px; padding: 0 14px; border-radius: 8px;
  border: 2px solid var(--line); background: var(--paper); color: var(--purple-3); font: 700 .95rem var(--sans); cursor: pointer;
}
.site-nav ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 4px; }
.site-nav a {
  display: block; padding: 10px 12px; border-radius: 8px; text-decoration: none;
  font: 600 .98rem/1.2 var(--sans); color: var(--ink);
}
.site-nav a[aria-current="page"] { color: var(--purple); box-shadow: inset 0 -3px 0 var(--gold); border-radius: 0; }
@media (hover: hover) { .site-nav a:hover { background: var(--ivory); color: var(--purple); } }
.header-donate { white-space: nowrap; }

@media (max-width: 960px) {
  .js .nav-toggle { display: inline-flex; align-items: center; }
  .js .site-nav { display: none; position: absolute; left: 0; right: 0; top: 100%; background: var(--paper); border-bottom: 4px solid var(--gold); box-shadow: var(--shadow); }
  .js .site-nav.is-open { display: block; }
  .site-nav ul { flex-direction: column; padding: 8px var(--gutter) 16px; }
  .site-nav a { padding: 14px 8px; border-bottom: 1px solid var(--line); border-radius: 0; }
  .site-nav a[aria-current="page"] { box-shadow: inset 4px 0 0 var(--gold); padding-left: 14px; }
  .header-inner { flex-wrap: wrap; }
  .site-nav { order: 5; }
  html:not(.js) .site-nav { width: 100%; }
}
@media (max-width: 520px) {
  .header-inner { gap: 8px; }
  .brand { gap: 8px; }
  .brand-sub { display: none; }
  .brand-name { font-size: 1.02rem; }
  .brand img { width: 34px; height: 43px; }
  .header-donate { padding-inline: .9em; }
  .js .nav-toggle { padding: 0 10px; }
}
@media (max-width: 400px) {
  .brand-name .ch { display: none; }      /* "Pi Beta Beta" alone on the smallest phones */
}
.nav-donate { display: none; }
@media (max-width: 360px) {
  .header-donate { display: none; }        /* no room beside the logo and menu: Donate moves into the menu */
  .nav-donate { display: block; }
}
.nav-toggle svg { width: 22px; height: 22px; fill: currentColor; }

/* ---------- Hero (home) ---------- */
.hero { background: var(--purple-3); color: #fff; display: grid; }
.hero-media { position: relative; background: var(--purple-2); }
.hero-media img { width: 100%; height: 100%; object-fit: cover; aspect-ratio: 3 / 2; }
.hero-copy { padding: 36px var(--gutter) 44px; }
.hero h1 { color: #fff; margin-bottom: .3em; }
.hero-tag { font: italic 1.15rem/1.5 var(--serif); color: var(--gold); margin-bottom: 1.4em; }
.hero p.lead { color: #EDE6F0; }
@media (min-width: 900px) {
  .hero { grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); min-height: min(640px, 78vh); }
  .hero-media { order: 2; }
  .hero-media img { aspect-ratio: auto; position: absolute; inset: 0; }
  .hero-copy { align-self: center; padding: 64px clamp(28px, 4vw, 64px) 64px max(var(--gutter), calc((100vw - var(--max)) / 2 + 20px)); }
}

/* ---------- Page banner (inner pages) ---------- */
.page-banner { background: var(--purple-3); color: #fff; padding-block: clamp(40px, 7vw, 72px); }
.page-banner h1 { color: #fff; margin-bottom: .25em; }
.page-banner p { color: #EDE6F0; max-width: 62ch; margin: 0; font-size: 1.1rem; }

/* ---------- Cards and grids ---------- */
.grid { display: grid; gap: 22px; }
.grid--3 { grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); }
.grid--4 { grid-template-columns: repeat(auto-fill, minmax(min(100%, 230px), 1fr)); }
.card {
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); overflow: hidden; display: flex; flex-direction: column;
}
.card-body { padding: 20px 22px 24px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.card-body h3 { margin: 0; }
.card-body p { margin: 0; color: var(--muted); }
.card img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; }

/* Events */
.event-card .flyer { background: #2a1630; aspect-ratio: 4 / 5; }
.event-card .flyer img { width: 100%; height: 100%; aspect-ratio: auto; object-fit: contain; }
.event-card .save-date {
  aspect-ratio: 4 / 5; background: var(--purple-3); color: #fff; display: flex; flex-direction: column;
  align-items: center; justify-content: center; text-align: center; gap: 6px; padding: 24px;
}
.save-date .sd-k { font: 700 .8rem/1 var(--sans); letter-spacing: .16em; text-transform: uppercase; color: var(--gold); }
.save-date .sd-d { font: 700 clamp(2.4rem, 7vw, 3.4rem)/1 var(--serif); border-block: 2px solid var(--gold); padding: 12px 6px; margin: 6px 0; }
.save-date .sd-t { font: 700 1.15rem/1.3 var(--serif); max-width: 22ch; }
.event-date { display: flex; align-items: center; gap: 12px; margin-bottom: 4px; }
.date-badge {
  flex: none; width: 58px; text-align: center; border-radius: 8px; overflow: hidden;
  border: 1px solid var(--line); font-family: var(--sans); line-height: 1;
}
.date-badge .m { display: block; background: var(--purple); color: #fff; font: 700 .75rem/1 var(--sans); letter-spacing: .1em; padding: 6px 0; }
.date-badge .d { display: block; font: 700 1.5rem/1 var(--serif); padding: 7px 0 8px; color: var(--purple-3); }
.event-when { font: 600 .95rem/1.35 var(--sans); color: var(--ink); }
.event-meta { list-style: none; padding: 0; margin: 8px 0 14px; display: grid; gap: 4px; font-size: .98rem; color: var(--muted); }
.event-meta strong { color: var(--ink); font-weight: 600; }
.event-actions { margin-top: auto; display: flex; flex-wrap: wrap; gap: 10px; }
.soon { font: 600 .95rem var(--sans); color: var(--muted); padding: 12px 0; }
.empty {
  background: var(--paper); border: 1px dashed var(--line); border-radius: var(--radius);
  padding: 28px; text-align: center; color: var(--muted);
}

/* Who we are */
.split { display: grid; gap: clamp(28px, 5vw, 64px); align-items: center; }
.split > *, .program-grid > *, .grid > * { min-width: 0; }   /* grid items may shrink below their content: no sideways scroll at 320px */
@media (min-width: 900px) { .split { grid-template-columns: 1fr 1fr; } .split--wide-text { grid-template-columns: 7fr 5fr; } }
.split img { border-radius: var(--radius); box-shadow: var(--shadow); }
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 14px; margin: 28px 0 0; padding: 0; list-style: none; }
.facts li { background: var(--ivory); border-left: 4px solid var(--gold); border-radius: 6px; padding: 14px 16px; }
.facts .num { display: block; font: 700 1.35rem/1.15 var(--serif); color: var(--purple); }
.facts .lbl { font-size: .92rem; color: var(--muted); }
.mission {
  font: italic 1.2rem/1.6 var(--serif); color: var(--purple-3); border-left: 4px solid var(--gold);
  padding: 4px 0 4px 20px; margin: 0 0 1.2em; max-width: 60ch;
}

/* Programs */
.program-card .panel {
  aspect-ratio: 3 / 2; display: flex; align-items: center; justify-content: center; text-align: center;
  background: var(--purple); color: #fff; padding: 20px;
  font: 700 1.35rem/1.25 var(--serif);
}
.program-card .panel span { border-top: 2px solid var(--gold); border-bottom: 2px solid var(--gold); padding: 10px 4px; }
.program { padding-block: 28px; border-top: 1px solid var(--line); }
.program:first-of-type { border-top: 0; }
.program h2 { font-size: clamp(1.45rem, 2.6vw, 1.9rem); }
.program-grid { display: grid; gap: 24px; align-items: start; }
@media (min-width: 860px) { .program-grid { grid-template-columns: 7fr 5fr; } }
.program-grid img { border-radius: var(--radius); box-shadow: var(--shadow); }

/* Video facade: the YouTube player loads only when tapped */
.video {
  position: relative; width: 100%; max-width: 900px; margin-inline: auto; aspect-ratio: 16 / 9;
  border-radius: var(--radius); overflow: hidden; background: #000; box-shadow: var(--shadow);
}
.video button { all: unset; cursor: pointer; position: absolute; inset: 0; display: block; }
.video button:focus-visible { outline: 3px solid var(--gold-2); outline-offset: -3px; }
.video img { width: 100%; height: 100%; object-fit: cover; opacity: .82; }
.video .play {
  position: absolute; left: 50%; top: 50%; translate: -50% -50%; width: 84px; height: 84px; border-radius: 50%;
  background: var(--gold); display: grid; place-items: center; box-shadow: 0 6px 24px rgba(0, 0, 0, .35);
}
.video .play::after { content: ""; margin-left: 6px; border-style: solid; border-width: 14px 0 14px 22px; border-color: transparent transparent transparent var(--ink); }
.video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* Sponsors */
.sponsor-wall { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 200px), 1fr)); }
.sponsor {
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px;
  display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center; text-decoration: none; color: var(--ink);
}
.sponsor .logo { width: 100%; aspect-ratio: 16 / 10; display: grid; place-items: center; }
.sponsor .logo img { max-height: 100%; width: auto; max-width: 100%; object-fit: contain; }
.sponsor .name { font: 700 1rem/1.3 var(--sans); }
.sponsor .blurb { font-size: .92rem; color: var(--muted); margin: 0; }
.sponsor .tier { font: 700 .72rem/1 var(--sans); letter-spacing: .12em; text-transform: uppercase; color: var(--purple); }
@media (hover: hover) { a.sponsor:hover { border-color: var(--gold); box-shadow: var(--shadow); } }
.sponsor-cta { margin-top: 28px; padding: 26px; border-radius: var(--radius); background: var(--paper); border: 2px solid var(--gold); display: grid; gap: 14px; }
@media (min-width: 760px) { .sponsor-cta { grid-template-columns: 1fr auto; align-items: center; } }
.sponsor-cta h3 { margin-bottom: .2em; }
.sponsor-cta p { margin: 0; color: var(--muted); }

/* Photos */
.photo-strip { display: grid; gap: 10px; grid-template-columns: repeat(2, 1fr); }
@media (min-width: 700px) { .photo-strip { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1100px) { .photo-strip { grid-template-columns: repeat(6, 1fr); } }
.photo-strip img, .photo-grid img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 6px; }
.photo-grid { display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 220px), 1fr)); }
.photo-grid button { all: unset; cursor: zoom-in; display: block; border-radius: 6px; }
.photo-grid button:focus-visible { outline: 3px solid var(--gold-2); outline-offset: 2px; }
.lightbox { border: 0; padding: 0; background: transparent; max-width: min(96vw, 1400px); max-height: 94vh; }
.lightbox::backdrop { background: rgba(20, 8, 24, .9); }
.lightbox img { max-width: 100%; max-height: 86vh; width: auto; margin-inline: auto; border-radius: 6px; }
.lightbox-bar { display: flex; justify-content: space-between; align-items: center; gap: 8px; color: #fff; padding: 10px 2px; }
.lightbox-bar button { min-height: 44px; min-width: 44px; border-radius: 999px; border: 2px solid #fff; background: transparent; color: #fff; font: 700 1rem var(--sans); cursor: pointer; padding: 0 14px; }
.lightbox-bar [data-count] { flex: 1; text-align: center; white-space: nowrap; }
.lightbox-bar [data-download] { display: inline-flex; align-items: center; justify-content: center; gap: 6px; background: var(--gold); border-color: var(--gold); color: var(--ink); }
.lightbox-bar [data-download] svg { width: 20px; height: 20px; fill: currentColor; flex: none; }
.lightbox-bar button:disabled { opacity: .6; cursor: progress; }
@media (max-width: 479px) { .lightbox-bar .lb-label { display: none; } .lightbox-bar button { padding: 0 10px; } }
.album-tools { margin: 0 0 20px; }
.album-tools .note { margin: .5em 0 0; }
.album-tools [data-download-status]:empty { display: none; }
.album-tools button:disabled { opacity: .7; cursor: progress; }

/* Follow */
.follow { display: flex; flex-wrap: wrap; gap: 14px; justify-content: center; margin-top: 24px; }
.follow a {
  display: inline-flex; align-items: center; gap: 10px; min-height: 56px; padding: 0 22px; border-radius: 999px;
  background: #fff; color: var(--purple-3); font: 700 1.05rem var(--sans); text-decoration: none;
}
.follow svg { width: 24px; height: 24px; fill: currentColor; }
@media (hover: hover) { .follow a:hover { background: var(--gold); color: var(--ink); } }

/* Officers, lineage */
.officers { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 240px), 1fr)); }
.officer { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; display: flex; gap: 14px; align-items: center; }
.officer .mono {
  flex: none; width: 56px; height: 56px; border-radius: 50%; background: var(--purple-3); color: var(--gold);
  display: grid; place-items: center; font: 700 1.15rem/1 var(--serif); overflow: hidden;
}
.officer .mono img { width: 100%; height: 100%; object-fit: cover; }
.officer .who { font: 700 1.05rem/1.3 var(--sans); }
.officer .role { font-size: .93rem; color: var(--purple); }
.lineage details { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: 10px; }
.lineage summary { cursor: pointer; padding: 16px 20px; font: 700 1.1rem var(--serif); color: var(--purple-3); min-height: 44px; }
.lineage .lines { padding: 0 20px 18px; display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 240px), 1fr)); }
.lineage h4 { font: 700 .98rem/1.3 var(--sans); color: var(--ink); margin: 0 0 4px; }
.lineage h4 em { display: block; font-weight: 400; color: var(--purple); }
.lineage ol { margin: 0; padding-left: 1.3em; color: var(--muted); }
.great-eight { columns: 2 220px; padding-left: 1.2em; }
.timeline { list-style: none; margin: 0; padding: 0; border-left: 3px solid var(--gold); }
.timeline li { padding: 0 0 18px 22px; position: relative; }
.timeline li::before { content: ""; position: absolute; left: -9px; top: .45em; width: 15px; height: 15px; border-radius: 50%; background: var(--purple); border: 3px solid var(--ivory); }
.timeline strong { display: block; font: 700 1.05rem var(--serif); color: var(--purple-3); }

/* Forms */
.form { display: grid; gap: 16px; max-width: 640px; }
.form label { font: 600 .98rem var(--sans); display: grid; gap: 6px; }
.form input, .form textarea {
  font: 400 1rem/1.4 var(--sans); padding: 12px 14px; border-radius: 8px; border: 1.5px solid #CFC5B5; background: var(--paper); color: var(--ink); width: 100%;
}
.form textarea { min-height: 140px; resize: vertical; }
.form .check { display: flex; gap: 10px; align-items: center; font-weight: 400; }
.form .check input { width: 22px; height: 22px; }
.contact-list { list-style: none; padding: 0; margin: 0 0 24px; display: grid; gap: 10px; }

/* Footer */
.site-footer { background: var(--purple-3); color: #E7DEEB; padding-block: 48px 28px; font-size: .97rem; }
.site-footer a { color: #fff; }
.footer-grid { display: grid; gap: 28px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); }
.site-footer h2 { font-size: 1.15rem; color: var(--gold); margin-bottom: .6em; }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.site-footer ul a { display: inline-block; padding: 6px 0; min-height: 44px; line-height: 32px; }
.footer-motto { font: italic 1.05rem var(--serif); color: var(--gold); }
.footer-base { margin-top: 32px; padding-top: 18px; border-top: 1px solid rgba(255, 255, 255, .18); font-size: .88rem; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}