/* So Cal District site. Dark, ceremonial, black and old gold (Alpha Phi Alpha brand guidelines).
   One theme (dark), one accent (gold), square corners, circles only for crests and avatars. */
:root {
  --black: #000;
  --surface: #0e0c08;
  --surface-2: #17140c;
  --line: rgb(250 240 190 / 0.16);
  --gold: #b8860b;
  --cream: #faf0be;
  --text: rgb(255 255 255 / 0.88);
  --muted: rgb(255 255 255 / 0.66);
  --sans: "Montserrat", "Gotham", system-ui, sans-serif;
  --serif: "Libre Caslon Text", "Adobe Caslon Pro", Georgia, serif;
  --gutter: clamp(20px, 5vw, 64px);
  --max: 1240px;
  --header: 72px;
  color-scheme: dark;
}
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header) + 16px); -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--black); color: var(--text); font: 400 1.0625rem/1.65 var(--serif); overflow-x: clip; }
img { max-width: 100%; display: block; }
a { color: inherit; }
h1, h2, h3, h4 { font-family: var(--sans); color: #fff; margin: 0; text-wrap: balance; letter-spacing: -0.02em; line-height: 1.05; }
h1 { font-weight: 800; font-size: clamp(2.4rem, 6vw, 4.75rem); }
h2 { font-weight: 800; font-size: clamp(1.9rem, 4vw, 3.1rem); }
h3 { font-weight: 700; font-size: 1.15rem; letter-spacing: -0.01em; line-height: 1.25; }
p { margin: 0; text-wrap: pretty; }
.eyebrow { font: 600 0.78rem/1.2 var(--sans); letter-spacing: 0.18em; text-transform: uppercase; color: var(--gold); }
.container { width: 100%; max-width: var(--max); margin-inline: auto; padding-inline: var(--gutter); }
.section { padding-block: clamp(64px, 10vw, 136px); }
.section--surface { background: var(--surface); }
.stack { display: grid; gap: 20px; }
.lead { font-size: clamp(1.1rem, 1.6vw, 1.35rem); max-width: 60ch; color: var(--text); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
:focus-visible { outline: 3px solid var(--cream); outline-offset: 3px; }
.skip { position: absolute; left: 12px; top: -60px; background: var(--gold); color: #000; padding: 10px 16px; font: 700 0.9rem var(--sans); z-index: 100; }
.skip:focus { top: 12px; }

/* Buttons and links */
.btn { display: inline-flex; align-items: center; gap: 10px; padding: 16px 28px; background: var(--gold); color: #000; font: 700 0.95rem/1 var(--sans); letter-spacing: 0.03em; text-decoration: none; white-space: nowrap; border: 0; cursor: pointer; transition: background 0.2s ease, transform 0.15s ease; }
.btn:hover { background: var(--cream); }
.btn:active { transform: translateY(1px); }
.btn--ghost { background: transparent; color: var(--cream); box-shadow: inset 0 0 0 2px var(--cream); }
.btn--ghost:hover { background: var(--cream); color: #000; }
.arrow-link { display: inline-flex; align-items: center; gap: 8px; font: 700 0.95rem var(--sans); color: var(--cream); text-decoration: none; border-bottom: 2px solid var(--gold); padding-bottom: 4px; width: fit-content; }
.arrow-link:hover { color: #fff; }
.ico { width: 1.25em; height: 1.25em; flex: none; }

/* Header */
.site-header { position: fixed; inset: 0 0 auto 0; z-index: 50; height: var(--header); transition: background 0.3s ease; background: linear-gradient(to bottom, rgb(0 0 0 / 0.85), transparent); }
.site-header.is-solid, .site-header.is-open, body.inner .site-header { background: #000; box-shadow: 0 1px 0 var(--line); }
.site-header .container { height: 100%; display: flex; align-items: center; justify-content: space-between; gap: 24px; max-width: 1400px; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: #fff; }
.brand img { height: 44px; width: auto; }
.brand span { font: 700 0.78rem/1.25 var(--sans); letter-spacing: 0.04em; }
.brand small { display: block; font-weight: 500; color: var(--cream); letter-spacing: 0.08em; text-transform: uppercase; font-size: 0.68rem; }
.nav { display: flex; align-items: center; gap: clamp(14px, 2vw, 30px); }
.nav a, .nav button { font: 600 0.88rem var(--sans); color: #fff; text-decoration: none; background: none; border: 0; cursor: pointer; padding: 8px 0; white-space: nowrap; display: inline-flex; align-items: center; gap: 4px; }
.nav a:hover, .nav button:hover, .nav a[aria-current="page"] { color: var(--cream); }
.nav a[aria-current="page"] { box-shadow: 0 2px 0 var(--gold); }
.has-menu { position: relative; }
.menu { position: absolute; top: 100%; left: -16px; min-width: 220px; background: #000; box-shadow: 0 0 0 1px var(--line), 0 24px 48px rgb(0 0 0 / 0.6); padding: 8px; display: none; }
.has-menu:hover .menu, .has-menu:focus-within .menu, .has-menu.is-open .menu { display: grid; }
.menu a { padding: 12px 14px; }
.menu a:hover { background: var(--surface-2); }
.nav-toggle { display: none; background: none; border: 0; color: #fff; padding: 10px; cursor: pointer; }
@media (max-width: 960px) {
  .nav-toggle { display: inline-flex; }
  .nav { position: fixed; inset: var(--header) 0 0 0; background: #000; flex-direction: column; align-items: stretch; gap: 0; padding: 16px var(--gutter) 40px; overflow-y: auto; display: none; }
  .site-header.is-open .nav { display: flex; }
  .nav a, .nav button { font-size: 1.15rem; padding: 18px 0; border-bottom: 1px solid var(--line); width: 100%; }
  .nav a[aria-current="page"] { box-shadow: none; color: var(--cream); }
  .menu { position: static; display: grid; box-shadow: none; padding: 0 0 0 16px; min-width: 0; }
  .has-menu > button { pointer-events: none; color: var(--gold); font-size: 0.78rem; letter-spacing: 0.14em; text-transform: uppercase; border-bottom: 0; padding-bottom: 4px; }
  .has-menu > button .ico { display: none; }
  .menu a { font-size: 1rem; }
}
@media (max-width: 420px) { .brand span { font-size: 0.7rem; } .brand img { height: 38px; } }

/* Hero */
apa-scroll-scrub { display: block; height: 500vh; --apa-top: var(--header); }
@media (max-width: 767px) { apa-scroll-scrub { height: 420vh; --apa-top: 0px; } }

/* Intro */
.intro { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: clamp(32px, 6vw, 96px); align-items: center; }
.portrait { aspect-ratio: 4 / 5; background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); display: grid; place-items: center; position: relative; overflow: hidden; }
.portrait img { width: 46%; }
.portrait.has-photo img { width: 100%; height: 100%; object-fit: cover; }
.portrait figcaption { position: absolute; left: 0; right: 0; bottom: 0; padding: 20px; background: linear-gradient(to top, rgb(0 0 0 / 0.9), transparent); font: 700 0.95rem var(--sans); color: #fff; }
.portrait figcaption span { display: block; font: 500 0.8rem var(--sans); color: var(--cream); letter-spacing: 0.06em; text-transform: uppercase; }
.welcome { font-size: clamp(1.15rem, 1.7vw, 1.4rem); color: #fff; }
.facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px 32px; margin-top: 12px; }
.facts div { border-top: 1px solid var(--line); padding-top: 14px; }
.facts b { display: block; font: 800 2.1rem/1 var(--sans); color: var(--cream); }
.facts span { font-size: 0.95rem; color: var(--muted); }
@media (max-width: 860px) { .intro { grid-template-columns: 1fr; } .portrait { max-width: 420px; } }

/* People */
.people { display: grid; gap: clamp(16px, 2vw, 28px); }
.people--feature { grid-template-columns: repeat(2, minmax(0, 1fr)); margin-bottom: clamp(16px, 2vw, 28px); }
.people--row { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.people--grid { grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); }
.person { background: var(--surface); padding: 24px; display: grid; gap: 16px; align-content: start; box-shadow: inset 0 0 0 1px var(--line); }
.person--feature { grid-template-columns: auto 1fr; align-items: center; gap: 24px; padding: 32px; }
.avatar { width: 88px; height: 88px; border-radius: 50%; background: var(--black); box-shadow: inset 0 0 0 1px var(--line); display: grid; place-items: center; overflow: hidden; }
.avatar img { width: 52%; height: auto; }
.avatar--logo img { width: 100%; height: 100%; object-fit: cover; transform: scale(var(--zoom, 1)); }
.person--feature .avatar { width: 128px; height: 128px; }
.person h3 { color: #fff; }
.titles { font-size: 0.98rem; color: var(--muted); display: grid; gap: 2px; line-height: 1.4; }
.person--open { background: transparent; box-shadow: inset 0 0 0 1px var(--line); border: 0; }
.person--open h3 { color: var(--cream); }
.person--open a { font: 700 0.85rem var(--sans); color: var(--cream); width: fit-content; }
@media (max-width: 960px) {
  .people--row { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; gap: 16px; margin-inline: calc(var(--gutter) * -1); padding-inline: var(--gutter); padding-bottom: 12px; }
  .people--row .person { flex: 0 0 min(72vw, 260px); scroll-snap-align: start; }
}
@media (max-width: 640px) { .people--feature { grid-template-columns: 1fr; } .person--feature { grid-template-columns: auto 1fr; padding: 20px; gap: 16px; } .person--feature .avatar { width: 88px; height: 88px; } }
.group + .group { margin-top: clamp(48px, 7vw, 88px); }
.group > h2 { font-size: clamp(1.4rem, 2.4vw, 1.9rem); margin-bottom: 24px; padding-bottom: 16px; border-bottom: 1px solid var(--line); }

/* History */
.history { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: clamp(24px, 6vw, 88px); align-items: start; }
.year { font: 800 clamp(5rem, 16vw, 13rem)/0.85 var(--sans); letter-spacing: -0.05em; color: var(--gold); margin: 0; }
.history .stack { max-width: 62ch; }
@media (max-width: 760px) { .history { grid-template-columns: 1fr; } }

/* Band (mentorship) */
.band { position: relative; isolation: isolate; padding-block: clamp(80px, 12vw, 160px); background: #000; overflow: hidden; }
.band img.bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center 30%; z-index: -2; opacity: 0.55; }
.band::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg, #000 12%, rgb(0 0 0 / 0.55) 60%, rgb(0 0 0 / 0.2)); }
.band .stack { max-width: 56ch; }
@media (max-width: 760px) { .band::after { background: linear-gradient(to top, #000 25%, rgb(0 0 0 / 0.6)); } }

/* Events */
.empty { background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); padding: clamp(28px, 5vw, 56px); display: grid; gap: 12px; max-width: 640px; }
.empty h3 { font-size: 1.4rem; }
.flyers { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 24px; }
.flyer { display: grid; gap: 12px; text-decoration: none; }
.flyer .img { aspect-ratio: 4 / 5; background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); display: grid; place-items: center; overflow: hidden; }
.flyer .img img { width: 100%; height: 100%; object-fit: cover; }
.flyer .img .crest-ph { width: 40%; height: auto; object-fit: contain; opacity: 0.7; }
.flyer time { font: 700 0.85rem var(--sans); color: var(--gold); letter-spacing: 0.06em; text-transform: uppercase; }
.flyer h3 { color: #fff; }
.flyer p { color: var(--muted); font-size: 0.95rem; }
.flyer .desc, .agenda .desc { color: var(--text); white-space: pre-line; margin-top: 4px; }
.agenda p { color: var(--muted); font-size: 0.95rem; }
.toolbar { display: flex; flex-wrap: wrap; gap: 12px 24px; align-items: center; justify-content: space-between; margin-bottom: 32px; }
.seg { display: inline-flex; flex-wrap: wrap; box-shadow: inset 0 0 0 1px var(--line); }
.seg button, .chip-btn { background: transparent; color: var(--text); border: 0; padding: 12px 18px; font: 600 0.88rem var(--sans); cursor: pointer; white-space: nowrap; }
@media (max-width: 420px) { .seg button { padding: 12px 12px; } }
.seg button[aria-pressed="true"], .chip-btn[aria-pressed="true"] { background: var(--gold); color: #000; }
.seg button:not([aria-pressed="true"]):hover { background: var(--surface-2); }
.cal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.cal-head h3 { font-size: 1.5rem; }
.cal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 1px; background: var(--line); }
.cal > div { background: var(--black); min-height: 104px; padding: 8px; font: 600 0.82rem var(--sans); color: var(--muted); }
.cal .dow { min-height: 0; text-transform: uppercase; letter-spacing: 0.1em; font-size: 0.7rem; padding: 10px 8px; }
.cal .ev { display: block; margin-top: 6px; background: var(--gold); color: #000; padding: 4px 6px; font-size: 0.74rem; line-height: 1.25; text-decoration: none; }
.cal .out { background: var(--surface); }
.agenda { display: none; gap: 12px; }
.agenda a { display: grid; grid-template-columns: 64px 1fr; gap: 16px; padding: 16px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); text-decoration: none; }
.agenda b { font: 800 1.6rem/1 var(--sans); color: var(--gold); display: block; }
.agenda small { font: 600 0.7rem var(--sans); letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
@media (max-width: 760px) { .cal { display: none; } .agenda { display: grid; } .cal-head { display: none; } }
[hidden] { display: none !important; }

/* Chapters */
.filters { display: grid; gap: 16px; margin-bottom: 40px; }
.filters .row { display: flex; flex-wrap: wrap; gap: 12px 20px; align-items: center; }
.filters label { font: 600 0.78rem var(--sans); letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }
.search { background: var(--surface); border: 0; box-shadow: inset 0 0 0 1px var(--line); color: #fff; padding: 14px 16px; font: 500 1rem var(--sans); min-width: min(100%, 320px); }
.search::placeholder { color: var(--muted); }
.area + .area { margin-top: clamp(48px, 7vw, 88px); }
.area-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 8px 24px; padding-bottom: 16px; margin-bottom: 24px; border-bottom: 1px solid var(--line); }
.area-head h2 { font-size: clamp(1.5rem, 2.6vw, 2rem); }
.area-head p { color: var(--muted); font-size: 0.98rem; }
.chapters { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 16px; }
.chapter { background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); padding: 22px; display: grid; gap: 14px; align-content: start; }
.chapter .top { display: flex; gap: 16px; align-items: center; }
.chapter .avatar { width: 64px; height: 64px; }
.chapter h3 { color: #fff; }
.chapter .where { color: var(--muted); font-size: 0.98rem; }
.tag { font: 700 0.7rem var(--sans); letter-spacing: 0.12em; text-transform: uppercase; color: var(--gold); }
.socials { display: flex; gap: 6px; min-height: 40px; flex-wrap: wrap; }
.socials a { width: 40px; height: 40px; display: grid; place-items: center; color: var(--cream); box-shadow: inset 0 0 0 1px var(--line); transition: background 0.2s, color 0.2s; }
.socials a:hover { background: var(--cream); color: #000; }
.no-results { padding: 32px 0; color: var(--muted); }

/* About */
.aims { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.aims > div { background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); padding: clamp(22px, 3vw, 36px); display: grid; gap: 10px; align-content: start; }
.aims h3 { color: var(--cream); }
.motto { font: 800 clamp(1.5rem, 3.4vw, 2.6rem)/1.15 var(--sans); color: #fff; letter-spacing: -0.02em; text-wrap: balance; max-width: 22ch; }
.jewels { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.jewel { display: grid; gap: 14px; align-content: start; }
.jewel img { width: 100%; aspect-ratio: 1; object-fit: cover; filter: sepia(0.15); }
.jewel p { font-size: 0.95rem; color: var(--muted); line-height: 1.55; }
@media (max-width: 960px) { .jewels { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .aims { grid-template-columns: 1fr; } }
.steps { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.steps > div { background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); padding: clamp(22px, 3vw, 36px); display: grid; gap: 8px; align-content: start; }
.steps h3 { color: var(--cream); font-size: 1.25rem; }
@media (max-width: 640px) { .steps { grid-template-columns: 1fr; } }

/* Conventions */
.conv { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: clamp(32px, 6vw, 96px); align-items: start; }
.when { font: 800 clamp(2.2rem, 5vw, 3.6rem)/1 var(--sans); color: var(--gold); letter-spacing: -0.03em; }
.details { margin: 0; display: grid; }
.details > div { padding: 20px 0; border-top: 1px solid var(--line); display: grid; gap: 6px; }
.details dt { font: 600 0.78rem var(--sans); letter-spacing: 0.14em; text-transform: uppercase; color: var(--gold); }
.details dd { margin: 0; color: #fff; }
@media (max-width: 860px) { .conv { grid-template-columns: 1fr; } }

/* Areas on home */
.area-counts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin-top: 8px; }
.area-counts div { border-top: 2px solid var(--gold); padding-top: 16px; }
.area-counts b { display: block; font: 800 clamp(2.6rem, 6vw, 4.5rem)/1 var(--sans); color: #fff; letter-spacing: -0.04em; }
.area-counts span { font: 600 0.85rem var(--sans); letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
@media (max-width: 640px) { .area-counts { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px 16px; } }
.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(32px, 6vw, 96px); align-items: end; }
@media (max-width: 860px) { .split { grid-template-columns: 1fr; align-items: start; } }
.soon { border: 1px solid var(--line); padding: clamp(28px, 5vw, 64px); display: grid; gap: 16px; background: var(--surface); }

/* Inner page header */
.page-head { padding-top: calc(var(--header) + clamp(48px, 8vw, 112px)); padding-bottom: clamp(40px, 6vw, 88px); position: relative; isolation: isolate; overflow: hidden; }
.page-head .container { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 40px; align-items: end; }
.page-head .art { aspect-ratio: 4 / 5; max-height: 420px; width: 100%; object-fit: cover; justify-self: end; box-shadow: 0 0 0 1px var(--line); }
@media (max-width: 860px) { .page-head .container { grid-template-columns: 1fr; } .page-head .art { display: none; } }

/* Footer */
.site-footer { background: var(--surface); padding-block: clamp(48px, 7vw, 88px) 32px; border-top: 1px solid var(--line); }
.foot { display: grid; grid-template-columns: minmax(0, 1.4fr) repeat(3, minmax(0, 1fr)); gap: 40px; }
.foot h4 { font: 700 0.78rem var(--sans); letter-spacing: 0.14em; text-transform: uppercase; color: var(--gold); margin-bottom: 16px; }
.foot ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.foot a { text-decoration: none; color: var(--text); }
.foot li a { display: inline-flex; align-items: center; gap: 8px; }
.foot a:hover { color: var(--cream); }
.foot .brand { margin-bottom: 20px; }
.legal { margin-top: 48px; padding-top: 24px; border-top: 1px solid var(--line); font-size: 0.85rem; color: var(--muted); display: flex; flex-wrap: wrap; gap: 8px 24px; justify-content: space-between; }
@media (max-width: 760px) { .foot { grid-template-columns: 1fr; gap: 32px; } }

/* Reveal on scroll (content stays visible without JS) */
.js .reveal { opacity: 0; transform: translateY(24px); transition: opacity 0.7s ease, transform 0.8s cubic-bezier(0.16, 1, 0.3, 1); }
.js .reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } .js .reveal { opacity: 1; transform: none; transition: none; } }

/* Replaceable pictures stay invisible until the CMS has answered, so the built-in picture never flashes before an uploaded one. */
img[data-cms-img] { opacity: 1; transition: opacity 0.4s ease; }
img[data-cms-img]:not([src]) { opacity: 0; }

/* Chapter officer sign-in and event form */
.muted { color: var(--muted); }
.steps { margin: 0; padding-left: 1.25em; display: grid; gap: 10px; }
.form { display: grid; gap: 20px; max-width: 720px; }
.field { display: grid; gap: 8px; min-width: 0; align-content: start; }
.field label { font: 600 0.78rem var(--sans); letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }
.field small { color: var(--muted); font-size: 0.85rem; }
.field input, .field select, .field textarea { background: var(--surface); border: 0; border-radius: 0; box-shadow: inset 0 0 0 1px var(--line); color: #fff; padding: 14px 16px; font: 500 1rem var(--sans); width: 100%; min-width: 0; }
.field input[type="file"] { padding: 12px; }
.field input:focus-visible, .field select:focus-visible, .field textarea:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.field-row { align-items: start; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.field-row--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 600px) { .field-row, .field-row--3 { grid-template-columns: minmax(0, 1fr); } }
.notice { background: var(--surface); box-shadow: inset 3px 0 0 var(--gold); padding: 14px 18px; font: 500 0.95rem var(--sans); color: var(--text); }
.notice.ok { box-shadow: inset 3px 0 0 var(--cream); }
.linklike { background: none; border: 0; padding: 0; color: var(--cream); font: inherit; text-decoration: underline; cursor: pointer; }
.subs { display: grid; gap: 12px; }
.sub { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px 24px; align-items: start; background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); padding: 20px; }
.sub > div { display: grid; gap: 6px; min-width: 0; }
.state { font: 700 0.78rem var(--sans); letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); white-space: nowrap; }
.state.ok { color: var(--cream); }
.state.warn { color: var(--gold); }
