/* NESBA at North Andover — styles for all pages.
   Colors and type follow DESIGN-SPEC.md. One breakpoint (900px) swaps the
   phone menu for inline nav; everything else reflows with flex-wrap and grid. */

:root {
  --ink: #16191E;
  --ink-2: #232831;
  --muted: #4F5661;
  --silver: #C9CED6;
  --silver-band: #B8BEC7;
  --rule-dark: #3A3F48;
  --subtle: #9AA1AB;
  --border: #D5D9DF;
  --divider: #E6E9ED;
  --placeholder: #E1E4E8;
  --page: #F3F4F6;
  --surface: #FFFFFF;
  --accent: #B4121B;
  --accent-hover: #8A0E15;
  --warn-bg: #FFF4D6;
  --warn-border: #E8CF8A;
  --warn-ink: #7A5A00;

  --gutter: clamp(20px, 4vw, 40px);
  --section-pad: clamp(40px, 5vw, 72px);
  --radius: 10px;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-padding-top: 80px; }

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--page);
  color: var(--ink);
  font-family: 'Source Sans 3', system-ui, -apple-system, 'Segoe UI', sans-serif;
  font-size: 17px;
  line-height: 1.5;
}

main { flex-grow: 1; }

a { color: var(--accent); }
a:hover { color: var(--accent-hover); }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }

h1, h2, h3 { margin: 0; }
h2 { font-weight: 700; font-size: clamp(26px, 3vw, 32px); line-height: 1.15; letter-spacing: -0.01em; }
h3 { font-weight: 800; font-size: 26px; line-height: 1.2; letter-spacing: -0.01em; }
p { margin: 0; }

.container { max-width: 1200px; margin: 0 auto; padding-inline: var(--gutter); }
.stack { display: flex; flex-direction: column; gap: 16px; }
.muted { color: var(--muted); }
.small { font-size: 15px; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link { position: absolute; left: 8px; top: -60px; z-index: 100; padding: 10px 14px; background: var(--surface); border-radius: 6px; font-weight: 700; }
.skip-link:focus { top: 8px; }

/* Two-column rows that stack on narrow screens */
.split { display: flex; flex-wrap: wrap; gap: clamp(36px, 4vw, 56px); }
.split > .main { flex: 999 1 440px; min-width: 0; }
.split > .side { flex: 1 1 320px; min-width: 0; }

/* ---------- Header and navigation ---------- */

.site-header { position: sticky; top: 0; z-index: 20; background: var(--surface); border-bottom: 1px solid var(--border); }
.site-header .container { height: 64px; display: flex; align-items: center; gap: 8px; padding-inline: clamp(8px, 3vw, 40px); }

.wordmark { min-height: 44px; display: flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none;
  font-weight: 800; font-size: 20px; letter-spacing: -0.01em; line-height: 1.1; }
.wordmark::before { content: ""; width: 6px; height: 26px; background: var(--accent); flex-shrink: 0; }
.wordmark:hover { color: var(--ink); }

.icon-button { width: 44px; height: 44px; padding: 10px; line-height: 0; border: 0; border-radius: 8px;
  background: transparent; color: var(--ink); cursor: pointer; }
.icon-button:hover { background: var(--page); }

.nav-desktop { display: none; margin-left: auto; align-items: center; gap: 4px; }
.nav-desktop a { min-height: 44px; padding: 0 14px; display: flex; align-items: center; border-radius: 6px;
  font-weight: 600; color: var(--ink); text-decoration: none; }
.nav-desktop a:hover { background: var(--page); color: var(--ink); }
.nav-desktop a[aria-current="page"] { color: var(--accent); font-weight: 700; }

@media (min-width: 900px) {
  .menu-button { display: none; }
  .nav-desktop { display: flex; }
}

/* Phone menu drawer */
.drawer { position: fixed; inset: 0; z-index: 50; display: flex; }
.drawer[hidden] { display: none; }
.drawer-scrim { position: absolute; inset: 0; border: 0; padding: 0; background: rgba(22, 25, 30, 0.6); cursor: pointer; }
.drawer-panel { position: relative; width: min(340px, 86vw); height: 100%; background: var(--surface);
  display: flex; flex-direction: column; overflow-y: auto; box-shadow: 0 0 40px rgba(22, 25, 30, 0.3); }
.drawer-head { height: 64px; flex-shrink: 0; padding: 0 8px 0 20px; display: flex; align-items: center;
  justify-content: space-between; border-bottom: 1px solid var(--border); }
.drawer-head span { font-weight: 600; font-size: 15px; color: var(--muted); }
.drawer-panel nav a { min-height: 60px; padding: 0 20px; display: flex; align-items: center; justify-content: space-between;
  border-bottom: 1px solid var(--divider); font-weight: 700; font-size: 21px; color: var(--ink); text-decoration: none; }
.drawer-panel nav a[aria-current="page"] { color: var(--accent); }
.drawer-panel nav a[aria-current="page"]::after { content: ""; width: 8px; height: 8px; border-radius: 4px; background: var(--accent); }
.drawer-foot { margin-top: auto; padding: 20px; font-size: 15px; color: var(--muted); }
body.menu-open { overflow: hidden; }

/* Without JavaScript, the drawer can't open; show the inline nav instead. */
.no-js .menu-button { display: none; }
.no-js .nav-desktop { display: flex; flex-wrap: wrap; }

/* ---------- Dark hero ---------- */

.hero { background: var(--ink); color: #FFFFFF; border-bottom: 4px solid var(--silver-band); }
.hero .container { padding-block: clamp(32px, 5vw, 64px); display: flex; flex-wrap: wrap; align-items: flex-end;
  justify-content: space-between; gap: 24px 48px; }
.hero .main { flex: 999 1 420px; min-width: 0; display: flex; flex-direction: column; gap: 12px; }
.hero .side { flex: 1 1 320px; min-width: 0; display: flex; flex-direction: column; gap: 16px; }
.hero h1 { font-weight: 800; font-size: clamp(40px, 6vw, 72px); line-height: 1.02; letter-spacing: -0.02em; }
.hero-home .container { padding-block: clamp(36px, 6vw, 88px) clamp(64px, 8vw, 120px); gap: clamp(28px, 4vw, 64px); }
.hero-home .main { gap: 20px; }
.hero-home h1 { font-size: clamp(48px, 8vw, 104px); line-height: 1; max-width: 14ch; }

.eyebrow { display: flex; align-items: center; gap: 10px; font-weight: 600; font-size: 16px; color: var(--silver); }
.eyebrow::before { content: ""; width: 28px; height: 4px; background: var(--accent); flex-shrink: 0; }
.when { display: flex; flex-direction: column; gap: 2px; }
.when strong { font-size: clamp(20px, 2vw, 24px); }
.when span { color: var(--silver); }

.stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1px; background: var(--rule-dark);
  border-block: 1px solid var(--rule-dark); }
.stats div { background: var(--ink); padding: 14px 0 14px 14px; }
.stats div:first-child { padding-left: 0; }
.stats b { display: block; font-size: 34px; font-weight: 700; line-height: 1; }
.stats span { display: block; margin-top: 4px; font-size: 14px; line-height: 1.3; color: var(--silver); }

/* ---------- Buttons ---------- */

.buttons { display: flex; flex-wrap: wrap; gap: 10px; }
.btn { flex: 1 1 200px; min-height: 52px; padding: 0 24px; display: inline-flex; align-items: center; justify-content: center;
  gap: 8px; border-radius: 6px; font-weight: 700; font-size: 18px; text-align: center; text-decoration: none; }
.btn-primary { background: var(--accent); color: #FFFFFF; }
.btn-primary:hover { background: var(--accent-hover); color: #FFFFFF; }
.btn-outline-dark { border: 2px solid var(--silver); color: #FFFFFF; }
.btn-outline-dark:hover { border-color: #FFFFFF; color: #FFFFFF; }
.btn-outline { flex: 0 0 auto; align-self: flex-start; border: 2px solid var(--ink); color: var(--ink); }
.btn-outline:hover { background: var(--ink); color: #FFFFFF; }

.pill { min-height: 44px; padding: 0 20px; display: inline-flex; align-items: center; border-radius: 22px;
  font-weight: 700; text-decoration: none; }
.pill-solid { background: #FFFFFF; color: var(--ink); }
.pill-solid:hover { background: var(--silver); color: var(--ink); }
.pill-outline { border: 2px solid var(--silver); color: #FFFFFF; }
.pill-outline:hover { border-color: #FFFFFF; color: #FFFFFF; }

.more-link { align-self: flex-start; min-height: 44px; display: inline-flex; align-items: center; gap: 6px;
  font-weight: 700; text-decoration: none; }
.more-link svg { flex-shrink: 0; }

/* ---------- Home ---------- */

.tiles-wrap { margin-top: -36px; position: relative; }
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(136px, 1fr)); gap: 12px; }
.tile { min-height: 96px; padding: 16px; display: flex; flex-direction: column; justify-content: space-between; gap: 12px;
  background: var(--surface); border-radius: var(--radius); color: var(--ink); text-decoration: none; font-weight: 700;
  box-shadow: 0 1px 2px rgba(22, 25, 30, 0.06), 0 8px 24px rgba(22, 25, 30, 0.10); }
.tile:hover { color: var(--accent); }
.tile svg { color: var(--accent); }

.section { padding-block: var(--section-pad); }
.section-top { padding-top: var(--section-pad); }

.list-card { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 1px;
  background: var(--divider); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.glance li { display: grid; grid-template-columns: 88px minmax(0, 1fr); gap: 12px; align-items: baseline;
  padding: 16px 18px; background: var(--surface); }
.glance .time { font-weight: 700; font-size: 18px; color: var(--accent); }
.glance .what { font-weight: 600; }

.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px; }
.price-row { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 14px 0; }
.price-row + .price-row { border-top: 1px solid var(--divider); }
.price-row b { font-size: 28px; font-weight: 700; }
.note-box { background: var(--page); border-radius: 6px; padding: 12px; font-size: 15px; color: var(--muted); }

.section-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 8px 24px; }
.grid-240 { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; }

.food-card { padding: 20px; display: flex; flex-direction: column; gap: 14px; background: var(--surface);
  border: 1px solid var(--border); border-radius: var(--radius); color: var(--ink); text-decoration: none; }
.food-card:hover { border-color: var(--accent); color: var(--ink); }
.food-card .kicker, .kicker { font-weight: 600; font-size: 15px; color: var(--accent); }
.food-card .name { font-weight: 800; font-size: 24px; line-height: 1.2; letter-spacing: -0.01em; }
.food-card .items { font-size: 19px; font-weight: 700; line-height: 1.35; }
.food-card .go { margin-top: auto; display: flex; align-items: center; gap: 6px; font-weight: 700; color: var(--accent); }
.food-card.dark { background: var(--ink); color: #FFFFFF; border-color: var(--ink); justify-content: space-between; }
.food-card.dark .kicker { color: var(--silver); }
.candygram { display: flex; gap: 12px; align-items: flex-start; color: var(--silver); }
.candygram svg { flex-shrink: 0; margin-top: 2px; }

.sponsors { background: var(--surface); border-top: 1px solid var(--border); }
.sponsor-lead { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; }
.sponsor-lead .logo { aspect-ratio: 2 / 1; }
.sponsor-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.sponsor-grid .logo { aspect-ratio: 3 / 2; }
.logo { display: flex; align-items: center; justify-content: center; padding: 16px; border: 1px solid var(--divider);
  border-radius: 8px; background: #FFFFFF; }
.logo img { max-width: 100%; max-height: 100%; object-fit: contain; }
.logo.placeholder { background: var(--page); color: var(--muted); font-weight: 600; font-size: 14px; text-align: center; }

/* ---------- Footer (same on every page) ---------- */

.site-footer { background: var(--ink); color: #FFFFFF; border-top: 4px solid var(--silver-band); }
.site-footer a { color: #FFFFFF; font-weight: 700; }
.site-footer a:hover { color: var(--silver); }

.footer-help { padding-block: 20px; display: flex; align-items: center; gap: 12px;
  border-bottom: 1px solid var(--rule-dark); font-weight: 700; font-size: 19px; line-height: 1.3; }
.footer-help svg { flex-shrink: 0; color: var(--silver); }

.footer-main { padding-block: clamp(32px, 5vw, 56px) 40px; display: flex; flex-wrap: wrap; align-items: flex-end;
  justify-content: space-between; gap: 32px 48px; }
.footer-thanks { flex: 2 1 420px; min-width: 0; display: flex; flex-direction: column; gap: 14px; }
.footer-thanks::before { content: ""; width: 28px; height: 4px; background: var(--accent); }
.footer-thanks h2 { font-weight: 700; font-size: clamp(22px, 3vw, 30px); line-height: 1.2; letter-spacing: -0.01em; }
.footer-thanks p { color: var(--silver); max-width: 52ch; }
.footer-thanks .btn { flex: 0 0 auto; align-self: flex-start; margin-top: 6px; }
.site-footer .btn-primary, .site-footer .btn-primary:hover { color: #FFFFFF; }

.footer-contact { flex: 1 1 240px; min-width: 0; display: flex; flex-direction: column; gap: 6px; color: var(--silver); }
.footer-contact .org { font-size: 14px; color: var(--subtle); }
.footer-contact .org a { color: var(--subtle); font-weight: 600; }

.footer-sponsor-list { margin: 4px 0 6px; padding: 0; list-style: none; display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 190px)); gap: 16px; }
.sponsor { display: flex; flex-direction: column; gap: 8px; text-decoration: none; }
.footer-logo { aspect-ratio: 3 / 2; display: flex; align-items: center; justify-content: center; padding: 16px;
  background: #FFFFFF; border-radius: 8px; }
.footer-logo img { max-width: 100%; max-height: 100%; height: auto; object-fit: contain; }
.sponsor-name { font-size: 16px; font-weight: 700; color: #FFFFFF; text-decoration: underline;
  text-decoration-color: var(--accent); text-underline-offset: 4px; }
.sponsor:hover .sponsor-name { color: var(--silver); }

/* ---------- Program ---------- */

.schedule { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 28px clamp(28px, 4vw, 48px); }
.schedule > section { flex: 1 1 420px; min-width: 0; display: flex; flex-direction: column; gap: 14px; }
.half-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.half-head span { font-size: 15px; color: var(--muted); }
.row { display: grid; grid-template-columns: 56px minmax(0, 1fr) auto; gap: 12px; align-items: baseline;
  padding: 13px 16px; background: var(--surface); }
.row .time { font-weight: 700; color: var(--accent); }
.row .band { font-weight: 700; font-size: 19px; line-height: 1.3; }
.row .school { font-size: 14px; line-height: 1.35; color: var(--muted); }
.row .tag { font-size: 14px; font-weight: 600; color: var(--muted); white-space: nowrap; }
.row.event { background: var(--ink); color: #FFFFFF; }
.row.event .time { color: #FFFFFF; }
.row.exhibition { background: var(--page); }
.row.exhibition .tag { color: var(--accent); }
.intermission { padding: 14px 16px; border: 2px dashed var(--silver-band); border-radius: var(--radius);
  text-align: center; color: var(--muted); }
.intermission strong { color: var(--ink); }

.food { background: var(--surface); border-block: 1px solid var(--border); }
.menus { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 20px; align-items: start; }
.menu-card { padding: 20px; display: flex; flex-direction: column; gap: 14px; border: 1px solid var(--border);
  border-radius: var(--radius); }
.menu-card.tinted { background: var(--page); border-color: var(--page); }
.menu { margin: 0; padding: 0; list-style: none; }
.menu li { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 12px; padding: 11px 0;
  border-bottom: 1px solid var(--divider); }
.menu .item, .menu .price { font-weight: 700; }
.menu .desc { grid-column: 1 / -1; font-size: 15px; color: var(--muted); }
.leaders { margin: 0; padding: 0; list-style: none; }
.leaders li { display: flex; align-items: baseline; gap: 8px; padding: 8px 0; border-bottom: 1px solid var(--border); }
.leaders li::after { content: none; }
.leaders .dots { flex-grow: 1; border-bottom: 1px dotted var(--subtle); transform: translateY(-4px); }
.leaders b { font-weight: 700; }
.inset { background: var(--surface); border-radius: 8px; padding: 14px; display: flex; gap: 12px; align-items: center; }
.inset svg { flex-shrink: 0; color: var(--accent); }

/* ---------- Parking ---------- */

.address-card { background: var(--ink-2); border-radius: var(--radius); padding: 18px; display: flex; flex-direction: column; gap: 12px; }
.address-card .label { font-size: 14px; color: var(--silver); }
.address-card .street { font-size: 24px; font-weight: 700; line-height: 1.25; }
.address-card .town, .address-card .note { color: var(--silver); }
.address-card .note { font-size: 15px; }

.map-embed { aspect-ratio: 4 / 3; min-height: 320px; border: 1px solid var(--border); border-radius: var(--radius);
  overflow: hidden; background: var(--placeholder); }
.map-embed iframe { display: block; width: 100%; height: 100%; border: 0; }

.campus-map { margin: 0; display: flex; flex-direction: column; gap: 8px; }
.campus-map a { display: block; border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; background: var(--surface); }
.campus-map img { display: block; width: 100%; height: auto; }
.campus-map figcaption { font-size: 14px; color: var(--muted); }

.steps { display: flex; flex-direction: column; gap: 16px; }
.step { display: grid; grid-template-columns: 32px minmax(0, 1fr); gap: 12px; }
.step-num { width: 32px; height: 32px; border-radius: 16px; background: var(--accent); color: #FFFFFF;
  display: flex; align-items: center; justify-content: center; font-weight: 700; }
.mini-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; }
.mini-cards .card { padding: 14px; }
.card-title { font-weight: 700; }
.card-body { font-size: 15px; color: var(--muted); }

.caution { background: var(--warn-bg); border: 1px solid var(--warn-border); border-radius: var(--radius); padding: 16px;
  display: grid; grid-template-columns: 24px minmax(0, 1fr); gap: 12px; }
.caution svg { color: var(--warn-ink); }
.caution span { color: #4A3A10; }

/* ---------- Directors ---------- */

.numbered { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(320px, 100%), 1fr)); gap: 12px; }
.numbered .card { display: grid; grid-template-columns: 36px minmax(0, 1fr); gap: 12px; }
.numbered .num { font-weight: 800; font-size: 22px; line-height: 1.15; color: var(--accent); }
.numbered h3 { font-weight: 700; font-size: 18px; line-height: 1.35; letter-spacing: 0; }
.numbered p { color: var(--muted); }
.drawer-small { min-height: 48px; padding: 0 20px; display: flex; align-items: center; gap: 6px;
  font-size: 15px; font-weight: 600; color: var(--muted); text-decoration: none; }
.drawer-small:hover { color: var(--accent); }
