/* BEST website. Tokens follow the 2026 gala style guide
   (Projects/BEST/projects/best-fundraiser-2026/designs/styles.css); the navy is sampled
   from the 2026 bokeh art, and the deeper golds keep gold type legible on light grounds. */

:root {
  --night: #11244B;
  --night-deep: #0B1833;
  --paper: #F9F9F9;
  --white: #FFFFFF;
  --ink: #1A1A1A;
  --ink-soft: #4A4A4A;
  --on-night: #DCE2EE;
  --gold: #D4AF37;
  --gold-dark: #B8962E;
  --gold-light: #F2DA89;
  --gold-deep: #947018;   /* gold display type on light grounds, 3:1 or better */
  --gold-ink: #806010;    /* gold text under 24 px on light grounds, 4.5:1 or better */
  --rule: rgba(184, 150, 46, 0.4);

  --serif: "Playfair Display", Georgia, "Times New Roman", serif;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --gutter: clamp(16px, 4vw, 40px);
  --measure: 36em;        /* about 70 characters of Inter */
  --wide: 1120px;         /* container width; the header, hero frame and gala text share its edges */
}

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

html { scroll-behavior: smooth; scroll-padding-top: 96px; }

body {
  margin: 0;
  background: var(--white);
  color: var(--ink);
  font: 400 1.0625rem/1.6 var(--sans);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
  font-family: var(--serif);
  font-weight: 600;
  font-variant-numeric: lining-nums;
  line-height: 1.15;
  text-wrap: balance;
  margin: 0;
}

h2 { font-size: clamp(2rem, 4vw, 2.75rem); margin-bottom: 20px; }
h3 { font-size: 1.5rem; margin: 40px 0 12px; }

p { margin: 0 0 16px; max-width: var(--measure); text-wrap: pretty; }

a { color: var(--gold-ink); text-underline-offset: 3px; }
a:hover { color: var(--ink); }

:focus-visible { outline: 3px solid var(--gold-ink); outline-offset: 3px; }

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

.container { max-width: var(--wide); margin: 0 auto; padding: 0 var(--gutter); }
.section { padding: clamp(64px, 9vw, 120px) 0; }
.section-lede { font-size: 1.1875rem; color: var(--ink-soft); max-width: 34em; text-wrap: balance; }
.small { font-size: 0.9375rem; color: var(--ink-soft); }

.visually-hidden {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}

.skip-link {
  position: absolute; left: 16px; top: -64px; z-index: 20;
  background: var(--ink); color: var(--white); padding: 12px 16px;
}
.skip-link:focus { top: 16px; color: var(--white); }

/* Buttons and links */

.button-row { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 24px; margin-top: 28px; }

.button {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 48px; padding: 0 24px;
  font: 600 1rem/1.2 var(--sans);
  text-decoration: none;
  border: 1px solid transparent; border-radius: 2px;
  transition: background-color 0.15s ease, border-color 0.15s ease;
}
.button-gold { background: var(--gold); color: var(--ink); }
.button-gold:hover { background: var(--gold-light); color: var(--ink); }
.button-outline { background: rgba(255, 255, 255, 0.75); border-color: var(--gold-deep); color: var(--ink); }
.button-outline:hover { background: var(--white); color: var(--ink); }

/* Links that stand on their own get a 44 px tap height; links inside sentences do not. */
.text-link, .link-on-dark, .tap-link { display: inline-flex; align-items: center; min-height: 44px; }
.text-link { font-weight: 600; }
.link-on-dark { color: var(--gold-light); font-weight: 600; }
.link-on-dark:hover { color: var(--white); }

/* Header */

.site-header {
  position: sticky; top: 0; z-index: 10;
  background: rgba(255, 255, 255, 0.96);
  border-bottom: 1px solid var(--gold);
}
.header-inner {
  max-width: var(--wide); margin: 0 auto; padding: 12px var(--gutter);
  display: flex; align-items: center; gap: 32px;
}
.wordmark { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--ink); }
.wordmark-logo { display: block; height: 46px; width: auto; }
.wordmark-name { font: 500 0.8125rem/1.25 var(--sans); color: var(--ink-soft); }
.site-nav { display: flex; gap: 24px; margin-left: auto; }
.site-nav a { color: var(--ink); text-decoration: none; font-weight: 500; font-size: 0.9375rem; padding: 8px 0; white-space: nowrap; }
.site-nav a:hover { color: var(--gold-ink); text-decoration: underline; }
.header-cta { min-height: 44px; padding: 0 18px; font-size: 0.9375rem; }

/* Hero */

.hero {
  background: var(--paper) url("../assets/img/stars-2400.webp") center / cover no-repeat;
  padding: clamp(24px, 4vw, 48px) var(--gutter);
}
.hero-frame {
  max-width: calc(var(--wide) - 2 * var(--gutter)); margin: 0 auto;
  min-height: clamp(460px, 70vh, 700px);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center;
  padding: clamp(48px, 8vw, 96px) clamp(20px, 6vw, 80px);
  border: 1px solid var(--gold);
  outline: 1px solid var(--gold); outline-offset: 6px;
  background: radial-gradient(ellipse 62% 58% at 50% 50%, rgba(249, 249, 249, 0.94), rgba(249, 249, 249, 0) 78%);
}
.hero h1 {
  font-size: clamp(2.5rem, 5.6vw, 4.5rem);
  line-height: 1.06; letter-spacing: -0.01em;
  max-width: 15ch; margin-bottom: 24px;
}
.hero-lede { font-size: clamp(1.0625rem, 1.6vw, 1.25rem); max-width: 52ch; margin: 0 auto; }
.hero-event {
  font: italic 400 clamp(1.25rem, 2vw, 1.5rem)/1.35 var(--serif);
  max-width: 34ch; margin: 24px auto 0;
}
.hero-event a { color: var(--ink); font-weight: 500; }
.hero-event a:hover { color: var(--gold-ink); }
.hero .button-row { justify-content: center; }

/* Gala */

.gala {
  display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  background: var(--night); color: var(--on-night);
}
/* The text column is 7/12 of the band, so 100% * 12 / 7 is the band's width and the
   left padding lands on the container's left edge. */
.gala-text {
  padding: clamp(56px, 8vw, 112px) clamp(24px, 6vw, 96px);
  padding-left: max(var(--gutter), calc((100% * 12 / 7 - var(--wide)) / 2 + var(--gutter)));
}
.gala-kicker { color: var(--gold-light); font-weight: 500; margin-bottom: 12px; }
.gala-title { font-size: clamp(3.25rem, 7.5vw, 6rem); line-height: 0.98; color: var(--white); margin: 0; }
.gala-title span { display: block; }
.gala-subtitle {
  font: italic 400 clamp(1.5rem, 3vw, 2.25rem)/1.2 var(--serif);
  color: var(--gold); margin: 12px 0 40px;
}
.gala-facts { margin: 0 0 28px; max-width: 34rem; }
.gala-facts div {
  display: grid; grid-template-columns: 7rem 1fr; gap: 16px;
  padding: 16px 0; border-top: 1px solid rgba(212, 175, 55, 0.45);
}
.gala-facts div:last-child { border-bottom: 1px solid rgba(212, 175, 55, 0.45); }
.gala-facts dt { color: var(--gold-light); font-weight: 600; font-size: 0.9375rem; padding-top: 2px; }
.gala-facts dd { margin: 0; color: var(--white); }
.gala-facts time { font: 600 1.25rem/1.3 var(--serif); font-variant-numeric: lining-nums; }
.gala-facts a { color: var(--gold-light); }
.gala-facts a:hover { color: var(--white); }
.gala-note { color: var(--on-night); max-width: 52ch; }
.gala :focus-visible { outline-color: var(--gold-light); }
.gala-art {
  background: var(--night-deep) url("../assets/img/bokeh-1600.webp") center / cover no-repeat;
  display: grid; place-items: center;
  padding: clamp(48px, 6vw, 80px) clamp(24px, 4vw, 56px);
  overflow: hidden;
}
.gala-flyer {
  width: min(100%, 380px);
  box-shadow: 0 24px 56px rgba(5, 12, 30, 0.45);
  outline: 1px solid rgba(242, 218, 137, 0.7); outline-offset: 10px;
}

/* About */

.about-grid {
  display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 4fr);
  gap: clamp(40px, 6vw, 96px); align-items: start;
}
.funds { list-style: none; margin: 0; padding: 0; max-width: var(--measure); }
.funds li {
  position: relative; padding: 14px 0 14px 34px;
  border-top: 1px solid var(--rule);
}
.funds li:last-child { border-bottom: 1px solid var(--rule); }
.funds li::before {
  content: ""; position: absolute; left: 0; top: 19px; width: 16px; height: 16px;
  background: var(--gold);
  clip-path: polygon(50% 0, 60% 40%, 100% 50%, 60% 60%, 50% 100%, 40% 60%, 0 50%, 40% 40%);
}
.funds strong { font-weight: 600; }
.about-quote { margin: 72px 0 0; padding-top: 28px; border-top: 1px solid var(--gold); }
.about-quote blockquote { margin: 0; }
.about-quote blockquote p {
  font: italic 400 clamp(1.5rem, 2.6vw, 2rem)/1.35 var(--serif);
  color: var(--ink); margin-bottom: 16px;
}
.about-quote figcaption { font-size: 0.9375rem; color: var(--ink-soft); }

/* Coming up: the run-up to the gala as a constellation */

.coming-up { background: var(--paper); }
.constellation-wrap { position: relative; margin-top: 56px; }
/* Stars sit at staggered heights in a band of sky above the text, so the line joining
   them never crosses a word; the text columns share one top edge. */
.constellation {
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 28px;
  position: relative; z-index: 1;
}
.event { position: relative; padding-top: 156px; }
.event:nth-child(1) { --sky: 72px; }
.event:nth-child(2) { --sky: 112px; }
.event:nth-child(3) { --sky: 28px; }
.event:nth-child(4) { --sky: 92px; }
.event:nth-child(5) { --sky: 0px; }
.star { position: absolute; left: 0; top: var(--sky); width: 28px; height: 28px; fill: var(--gold); display: block; }
.event-gala .star { width: 48px; height: 48px; left: -10px; fill: var(--gold-dark); }
.nowrap { white-space: nowrap; }
.event-date { font-weight: 600; font-size: 0.9375rem; color: var(--gold-ink); margin-bottom: 6px; font-variant-numeric: lining-nums; }
.event h3 { font-size: 1.3125rem; line-height: 1.25; margin: 0 0 8px; }
.event p:last-child { font-size: 0.9375rem; color: var(--ink-soft); line-height: 1.55; margin: 0; }
.constellation-lines {
  position: absolute; inset: 0; width: 100%; height: 100%;
  overflow: visible; z-index: 0; pointer-events: none;
}
.constellation-lines polyline { fill: none; stroke: var(--gold); stroke-width: 1; }

/* Contest */

.contest-grid {
  display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 4fr);
  gap: clamp(40px, 6vw, 88px); align-items: start;
}
.contest-main em { font-family: var(--serif); font-style: italic; font-size: 1.0625em; }
/* The same thin gold keyline the gala flyer wears, offset from a hairline edge. */
.contest-flyer {
  width: calc(100% - 20px); margin: 10px;
  box-shadow: 0 0 0 1px var(--rule);
  outline: 1px solid var(--gold); outline-offset: 10px;
}
.entry-box {
  margin-top: 32px; padding: 28px clamp(20px, 3vw, 36px) 32px;
  background: var(--white);
  border: 1px solid var(--gold);
  box-shadow: inset 0 0 0 5px var(--white), inset 0 0 0 6px var(--gold);
  max-width: 40rem;
}
.entry-box h3 { margin-top: 0; }
.entry-box .button-row { margin-top: 20px; }

/* Sponsor */

.sponsor { background: var(--paper); }
.sponsor-grid {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(40px, 6vw, 80px); align-items: start; margin-top: 40px;
}
.levels { width: 100%; border-collapse: collapse; background: var(--white); }
.levels th, .levels td { text-align: left; padding: 14px 16px; border-bottom: 1px solid var(--rule); vertical-align: baseline; text-wrap: balance; }
.levels thead th { font: 600 0.875rem/1.3 var(--sans); color: var(--gold-ink); border-bottom: 1px solid var(--gold); }
.levels tbody th { font: 600 1.125rem/1.3 var(--serif); }
.levels td:nth-child(2) { font-weight: 600; white-space: nowrap; font-variant-numeric: tabular-nums; }
.sponsor-how h3 { margin-top: 0; }
.sponsor-how .small { margin-top: 20px; }
.thanks { margin-top: clamp(56px, 8vw, 88px); padding-top: 40px; border-top: 1px solid var(--gold); }
.thanks h3 { margin-top: 0; }
/* Platinum runs across the top; Silver and Bronze, then the supporters, sit below.
   Names never break across lines. */
.tiers { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); gap: 40px 56px; margin-top: 32px; }
.tier h4 { font: 600 0.875rem/1.3 var(--sans); color: var(--gold-ink); margin: 0 0 10px; }
.tier ul + h4 { margin-top: 28px; }
.tier ul { list-style: none; margin: 0; padding: 0; }
.tier li { padding: 3px 0; white-space: nowrap; }
.tier-platinum { grid-column: 1 / -1; }
.tier-platinum ul { display: flex; flex-wrap: wrap; gap: 4px 40px; }
.tier-platinum li { font: 600 1.25rem/1.35 var(--serif); padding: 5px 0; }
.tier-supporters ul { columns: 2; column-gap: 32px; }
.tier-supporters li { break-inside: avoid; font-size: 0.9375rem; }

/* Give */

.give-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px clamp(28px, 4vw, 48px); align-items: start; }
.give-grid > :first-child { grid-column: 1 / -1; margin-bottom: 16px; }
.give-way { border-top: 1px solid var(--gold); padding-top: 20px; }
.give-way h3 { margin-top: 0; font-size: 1.3125rem; }

/* Board */

.board { background: var(--paper); }
.officers { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px; margin: 40px 0 0; }
.officers div { border-top: 1px solid var(--gold); padding-top: 14px; }
.officers dt { font-weight: 600; font-size: 0.875rem; color: var(--gold-ink); }
.officers dd { margin: 4px 0 0; font: 600 1.25rem/1.3 var(--serif); }
.members-title { font-size: 1.3125rem; margin-top: 48px; }
.members { list-style: none; padding: 0; margin: 0; columns: 4; column-gap: 24px; }
.members li { padding: 4px 0; }

/* Footer */

.site-footer { background: var(--night-deep); color: var(--on-night); padding: 64px 0; font-size: 0.9375rem; }
.footer-grid { display: grid; grid-template-columns: auto 1fr 1fr; gap: clamp(32px, 5vw, 64px); align-items: start; }
.footer-logo { width: 176px; }
.footer-name { font: 600 1.25rem/1.3 var(--serif); color: var(--white); }
.site-footer a { color: var(--gold-light); }
.site-footer a:hover { color: var(--white); }
.site-footer :focus-visible { outline-color: var(--gold-light); }

/* Narrower screens */

/* Below 1000 px the header scrolls away with the page instead of staying pinned, and the
   section links wrap rather than scroll, so every link stays on screen with a whole
   focus ring. */
@media (max-width: 1000px) {
  html { scroll-padding-top: 0; }
  .site-header { position: relative; }
  .header-inner { flex-wrap: wrap; gap: 4px 24px; }
  .site-nav { order: 3; width: 100%; margin: 0; flex-wrap: wrap; gap: 0 24px; }
  .site-nav a { display: inline-flex; align-items: center; min-height: 44px; padding: 0; }
  .header-cta { margin-left: auto; }
  .gala { grid-template-columns: 1fr; }
  .gala-text { padding-inline: var(--gutter); }
  .about-grid, .sponsor-grid { grid-template-columns: 1fr; }
  .about-quote { margin-top: 0; }
  .contest-grid { grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); gap: 40px; }
  .tiers { grid-template-columns: 1fr; }
  .give-grid { grid-template-columns: 1fr; }
  .officers { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .members { columns: 2; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-logo { grid-column: 1 / -1; }

  /* The timeline becomes a vertical line, drawn star to star so it ends at the gala. */
  .constellation { grid-template-columns: 1fr; gap: 32px; padding-left: 48px; }
  .event { padding-top: 0; }
  .event:not(:last-child)::after {
    content: ""; position: absolute; left: -34.5px; top: 14px; bottom: -46px;
    width: 1px; background: var(--gold);
  }
  .star { left: -48px; top: 0; z-index: 1; }
  .event-gala .star { left: -58px; top: -10px; }
  .constellation-lines { display: none; }
}

@media (max-width: 640px) {
  .hero { background-image: url("../assets/img/stars-1200.webp"); }
  .hero .button-row { flex-direction: column; align-items: stretch; width: min(100%, 300px); margin-inline: auto; }
  .wordmark-name { display: none; }
  .site-nav { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 16px; }
  .gala-facts div { grid-template-columns: 1fr; gap: 4px; }
  .gala-art { padding-block: 40px; }
  .gala-flyer { width: min(100%, 260px); }
  .contest-grid { grid-template-columns: 1fr; }
  .contest-flyer { max-width: 340px; }
  .tier-supporters ul { columns: 1; }
  .footer-grid { grid-template-columns: 1fr; }
  .officers { grid-template-columns: 1fr; }
  .members { columns: 1; }
  .levels th, .levels td { padding: 12px 10px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .button { transition: none; }
}
