/* =========================================================
   BOSTON BUILT WEEK — DESIGN TOKENS
   Palette: Navy / Red / Gray / White (official brand colors)
   Type: Archivo Black (display) + IBM Plex Mono (data/labels) + Inter (body)
   ========================================================= */

:root {
  /* -- Color: official Boston Built Week palette -- */
  --navy: #011D41;
  --red: #C40D3C;
  --red-dark: #A30A31;
  --gray: #BABABA;
  --white: #FFFFFF;

  /* -- Derived tones (tints/opacities of the four brand colors above) -- */
  --bg-light: #FFFFFF;
  --bg-light-alt: #F4F4F4;
  --ink-muted: rgba(1, 29, 65, 0.68);          /* secondary text on light backgrounds */
  --on-dark-muted: rgba(255, 255, 255, 0.72);  /* secondary text on navy backgrounds */
  --hairline-light: rgba(1, 29, 65, 0.18);     /* dividers on light backgrounds */
  --hairline-dark: rgba(255, 255, 255, 0.22);  /* dividers on navy backgrounds */
  --red-on-dark: #FF3355; /* vivid red for accent text on navy — reads as red, not pink */

  /* -- Type -- */
  --font-display: 'Archivo Black', 'Archivo', Arial, sans-serif;
  --font-heading: 'Archivo', Arial, sans-serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'IBM Plex Mono', 'Courier New', monospace;

  /* -- Layout -- */
  --wrap-max: 1200px;
  --radius: 2px;
  --transition: 200ms ease;
}

/* =========================================================
   RESET
   ========================================================= */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--navy);
  background: var(--bg-light);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
h1, h2, h3, h4 { margin: 0; font-family: var(--font-heading); font-weight: 800; line-height: 1.1; }
p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
button { font: inherit; cursor: pointer; }

.mono { font-family: var(--font-mono); letter-spacing: 0.02em; }
.sr-only {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0,0,0,0); white-space: nowrap;
}

.skip-link {
  position: absolute; left: -9999px; top: 0;
  background: var(--red); color: var(--white); padding: 12px 20px;
  z-index: 200; font-family: var(--font-mono);
}
.skip-link:focus { left: 0; }

:focus-visible {
  outline: 3px solid var(--red);
  outline-offset: 2px;
}

.wrap {
  max-width: var(--wrap-max);
  margin: 0 auto;
  padding: 0 24px;
}

/* =========================================================
   BUTTONS
   ========================================================= */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 22px;
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: 0.85rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  text-decoration: none;
  border: 2px solid transparent;
  border-radius: var(--radius);
  transition: transform var(--transition), background var(--transition), color var(--transition), border-color var(--transition);
  white-space: nowrap;
}
.btn:hover { transform: translateY(-2px); }
.btn-primary { background: var(--red); color: var(--white); border-color: var(--red); }
.btn-primary:hover { background: var(--red-dark); border-color: var(--red-dark); }
.btn-outline { background: transparent; color: var(--navy); border-color: var(--navy); }
.btn-outline:hover { background: var(--navy); color: var(--white); }
.btn-ghost { background: transparent; color: var(--navy); border-color: transparent; }
.btn-ghost:hover { color: var(--red); }
.btn-lg { padding: 16px 30px; font-size: 0.9rem; }
.btn-disabled {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 22px; font-family: var(--font-mono); font-size: 0.8rem;
  text-transform: uppercase; letter-spacing: 0.04em;
  color: var(--ink-muted); border: 2px dashed var(--hairline-light);
  border-radius: var(--radius);
}

/* =========================================================
   HEADER / NAV
   ========================================================= */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--bg-light);
  border-bottom: 2px solid var(--navy);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding-top: 12px;
  padding-bottom: 12px;
}
.brand {
  display: flex;
  align-items: center;
  text-decoration: none;
  color: var(--navy);
  flex-shrink: 0;
}
.brand-logo { height: 69px; width: auto; }

.main-nav {
  display: flex;
  gap: 28px;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.main-nav a { text-decoration: none; position: relative; padding: 4px 0; }
.main-nav a:hover { color: var(--red); }

.header-cta { display: flex; align-items: center; gap: 12px; }

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 40px; height: 40px;
  background: transparent;
  border: 2px solid var(--navy);
  border-radius: var(--radius);
}
.nav-toggle span { display: block; width: 18px; height: 2px; background: var(--navy); margin: 0 auto; }

.mobile-nav {
  display: none;
  flex-direction: column;
  gap: 2px;
  border-top: 2px solid var(--navy);
  background: var(--bg-light);
}
.mobile-nav a {
  padding: 16px 24px;
  text-decoration: none;
  border-bottom: 1px solid var(--bg-light-alt);
  font-family: var(--font-mono);
  text-transform: uppercase;
  font-size: 0.9rem;
}
.mobile-nav.is-open { display: flex; }

@media (max-width: 860px) {
  .main-nav, .header-cta { display: none; }
  .nav-toggle { display: flex; }
}

/* =========================================================
   HERO
   ========================================================= */
.hero {
  position: relative;
  background: var(--navy);
  color: var(--white);
  overflow: hidden;
  padding: 96px 0 80px;
}
.hero-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.08) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse at 50% 30%, black 40%, transparent 85%);
}
.hero-inner { position: relative; z-index: 1; max-width: 900px; }
.eyebrow {
  text-transform: uppercase;
  font-size: 0.8rem;
  color: var(--red);
  margin-bottom: 18px;
  display: inline-block;
}
.hero .eyebrow { color: var(--red-on-dark); } /* vivid red — reads as red, not pink, while keeping contrast on navy */
.hero-title {
  font-family: var(--font-display);
  text-transform: uppercase;
  font-size: clamp(2.6rem, 8vw, 5.5rem);
  line-height: 0.98;
  margin-bottom: 24px;
}
.hero-title-accent { color: var(--red-on-dark); }
.hero-sub {
  font-size: 1.15rem;
  max-width: 640px;
  color: rgba(255,255,255,0.88);
  margin-bottom: 36px;
}
.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 28px;
  margin-bottom: 40px;
  padding: 20px 0;
  border-top: 1px solid var(--hairline-dark);
  border-bottom: 1px solid var(--hairline-dark);
}
.dim-line { display: flex; flex-direction: column; gap: 4px; font-size: 0.85rem; }
.dim-label { color: var(--red-on-dark); letter-spacing: 0.1em; font-size: 0.7rem; }
.dim-value { color: var(--white); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 16px; }
.hero .btn-outline { border-color: var(--white); color: var(--white); }
.hero .btn-outline:hover { background: var(--white); color: var(--navy); }

/* =========================================================
   YEAR IN REVIEW / STAT STRIP
   ========================================================= */
.stat-strip {
  background: var(--navy);
  color: var(--white);
  border-bottom: 2px solid var(--red);
  padding: 56px 0;
}
.stat-strip-head { text-align: center; margin-bottom: 36px; }
.stat-strip-head .eyebrow { color: var(--red-on-dark); }
.stat-strip-head h2 { color: var(--white); }
.stat-strip-inner {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  text-align: center;
}
.stat { padding: 8px 12px; border-left: 1px solid var(--hairline-dark); }
.stat:first-child { border-left: none; }
.stat-num { display: block; font-family: var(--font-display); font-size: clamp(1.8rem, 3.4vw, 2.6rem); color: var(--red-on-dark); }
.stat-label { display: block; font-size: 0.75rem; text-transform: uppercase; margin-top: 8px; letter-spacing: 0.06em; color: rgba(255,255,255,0.8); }

@media (max-width: 700px) {
  .stat-strip-inner { grid-template-columns: 1fr; gap: 24px; }
  .stat { border-left: none; border-top: 1px solid var(--hairline-dark); padding-top: 20px; }
  .stat:first-child { border-top: none; padding-top: 0; }
}

/* =========================================================
   SECTION GENERICS
   ========================================================= */
section { padding: 96px 0; }
.section-sub { max-width: 640px; margin-top: 16px; color: var(--ink-muted); font-size: 1.05rem; }
h2 { font-size: clamp(1.8rem, 4vw, 2.6rem); text-transform: uppercase; }

/* =========================================================
   ANCHOR EVENTS
   ========================================================= */
.anchor-events { background: var(--white); }
.anchor-grid {
  margin-top: 48px;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}
.anchor-card {
  border: 2px solid var(--navy);
  border-radius: var(--radius);
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  background: var(--bg-light);
  transition: box-shadow var(--transition), transform var(--transition);
  position: relative;
}
.anchor-card:hover { box-shadow: 6px 6px 0 var(--navy); transform: translateY(-2px); }
.anchor-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  font-size: 0.75rem;
  color: var(--red);
  text-transform: uppercase;
}
.anchor-card h3 { font-size: 1.35rem; text-transform: uppercase; }
.anchor-card p { color: var(--ink-muted); font-size: 0.98rem; }
.anchor-card-footer { margin-top: auto; padding-top: 10px; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.anchor-tag {
  display: inline-block;
  padding: 3px 10px;
  background: var(--gray);
  color: var(--navy);
  font-family: var(--font-mono);
  font-size: 0.62rem;
  text-transform: uppercase;
  border-radius: var(--radius);
}
.anchor-tag.invite-only { background: var(--navy); color: var(--white); }
.anchor-card-invite { padding-top: 44px; }
.anchor-badge-corner {
  position: absolute;
  top: 16px;
  right: 16px;
}

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

/* =========================================================
   PHOTO GALLERY / COLLAGE
   ========================================================= */
.gallery { background: var(--white); }
.gallery-grid {
  margin-top: 40px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-template-rows: repeat(2, 200px);
  gap: 12px;
}
.gallery-item {
  position: relative;
  margin: 0;
  overflow: hidden;
  border-radius: var(--radius);
  border: 2px solid var(--navy);
}
.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 400ms ease;
}
.gallery-item:hover img { transform: scale(1.06); }
.gallery-item-1 { grid-column: 1 / 3; grid-row: 1 / 3; }
.gallery-item-2 { grid-column: 3; grid-row: 1; }
.gallery-item-3 { grid-column: 4; grid-row: 1; }
.gallery-item-4 { grid-column: 3; grid-row: 2; }
.gallery-item-5 { grid-column: 4; grid-row: 2; }

@media (max-width: 860px) {
  .gallery-grid { grid-template-columns: repeat(2, 1fr); grid-template-rows: repeat(3, 170px); }
  .gallery-item-1 { grid-column: 1 / 3; grid-row: 1; }
  .gallery-item-2 { grid-column: 1; grid-row: 2; }
  .gallery-item-3 { grid-column: 2; grid-row: 2; }
  .gallery-item-4 { grid-column: 1; grid-row: 3; }
  .gallery-item-5 { grid-column: 2; grid-row: 3; }
}
@media (max-width: 520px) {
  .gallery-grid { grid-template-columns: 1fr; grid-template-rows: repeat(5, 220px); }
  .gallery-item-1, .gallery-item-2, .gallery-item-3, .gallery-item-4, .gallery-item-5 {
    grid-column: 1; grid-row: auto;
  }
}

/* =========================================================
   CALENDAR COMING SOON
   ========================================================= */
.calendar-soon { background: var(--bg-light-alt); border-top: 2px solid var(--navy); border-bottom: 2px solid var(--navy); }
.calendar-soon-inner { text-align: center; max-width: 640px; margin: 0 auto; }
.calendar-soon-inner .eyebrow { color: var(--red); }
.calendar-soon-inner p { margin-top: 16px; color: var(--ink-muted); font-size: 1.05rem; }
.calendar-soon-inner .btn { margin-top: 28px; }

/* =========================================================
   SPONSORS
   ========================================================= */
.sponsors { background: var(--white); }
.sponsor-tier { margin-top: 44px; }
.sponsor-tier:first-of-type { margin-top: 48px; }
.sponsor-tier-label {
  display: block;
  text-transform: uppercase;
  font-size: 0.75rem;
  color: var(--red);
  margin-bottom: 18px;
  letter-spacing: 0.05em;
}
.sponsor-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 18px;
}
.sponsor-logo-tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 120px;
  padding: 20px;
  background: var(--bg-light-alt);
  border: 1px solid var(--hairline-light);
  border-radius: var(--radius);
}
.sponsor-logo-tile img { max-height: 56px; width: auto; max-width: 100%; }
.sponsor-logo-tile .sponsor-caption {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: var(--ink-muted);
  text-align: center;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

/* Anchor Event Partners — larger tiles, 3 per row */
.sponsor-row-anchor {
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.sponsor-row-anchor .sponsor-logo-tile { min-height: 170px; padding: 34px; }
.sponsor-row-anchor .sponsor-logo-tile img { max-height: 92px; }
@media (max-width: 860px) {
  .sponsor-row-anchor { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 540px) {
  .sponsor-row-anchor { grid-template-columns: 1fr; }
}

/* Community Partners — smaller tiles */
.sponsor-row-community {
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  max-width: 460px;
  gap: 14px;
}
.sponsor-row-community .sponsor-logo-tile { min-height: 76px; padding: 12px; }
.sponsor-row-community .sponsor-logo-tile img { max-height: 30px; }
.sponsor-cta { margin-top: 44px; color: var(--ink-muted); }
.sponsor-cta a { color: var(--red); text-decoration: underline; }

/* =========================================================
   GET INVOLVED / FORMS
   ========================================================= */
.get-involved { background: var(--navy); color: var(--white); }
.get-involved .eyebrow { color: var(--red-on-dark); }
.get-involved h2 { color: var(--white); }
.get-involved .section-sub { color: rgba(255,255,255,0.78); }
.involve-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 32px;
  margin-top: 48px;
}
.involve-card {
  background: rgba(255,255,255,0.05);
  border: 2px solid var(--hairline-dark);
  border-radius: var(--radius);
  padding: 32px;
  position: relative;
}
.involve-index {
  position: absolute;
  top: 24px; right: 28px;
  color: rgba(255,107,138,0.55);
  font-size: 1.6rem;
}
.involve-card h3 { font-size: 1.4rem; text-transform: uppercase; margin-bottom: 14px; max-width: 80%; color: var(--white); }
.involve-card p { color: rgba(255,255,255,0.82); margin-bottom: 24px; }

.form-panel { margin-top: 28px; }
.form-embed-wrap {
  background: var(--white);
  border-radius: var(--radius);
  overflow: hidden;
  border: 2px solid var(--navy);
}
.airtable-embed {
  width: 100%;
  height: 620px;
  border: none;
}
.form-fallback { margin-top: 10px; font-size: 0.8rem; color: rgba(255,255,255,0.6); }
.form-fallback a { color: var(--red-on-dark); }

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

.collab-directory {
  margin-top: 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  flex-wrap: wrap;
  background: rgba(255,255,255,0.05);
  border: 2px dashed var(--hairline-dark);
  border-radius: var(--radius);
  padding: 32px;
  position: relative;
}
.collab-directory-text { max-width: 640px; padding-left: 44px; position: relative; }
.collab-directory-text .involve-index { position: absolute; top: 0; left: 0; right: auto; }
.collab-directory-text h3 { font-size: 1.3rem; text-transform: uppercase; color: var(--white); margin-bottom: 10px; }
.collab-directory-text p { color: rgba(255,255,255,0.8); margin-bottom: 0; }
.collab-directory .btn { border-color: var(--white); color: var(--white); flex-shrink: 0; }
.collab-directory .btn:hover { background: var(--white); color: var(--navy); }

@media (max-width: 700px) {
  .collab-directory { flex-direction: column; align-items: flex-start; }
}

/* =========================================================
   FAQ
   ========================================================= */
.faq { background: var(--white); }
.faq-list { margin-top: 40px; border-top: 2px solid var(--navy); }
.faq-item { border-bottom: 2px solid var(--navy); }
.faq-question {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 22px 0;
  background: none;
  border: none;
  text-align: left;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--navy);
}
.faq-icon {
  font-family: var(--font-mono);
  font-size: 1.3rem;
  color: var(--red);
  transition: transform var(--transition);
  flex-shrink: 0;
}
.faq-question[aria-expanded="true"] .faq-icon { transform: rotate(45deg); }
.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height var(--transition);
}
.faq-answer p { padding-bottom: 22px; color: var(--ink-muted); max-width: 640px; }

/* =========================================================
   FOOTER
   ========================================================= */
.site-footer { background: var(--navy); color: var(--white); padding: 56px 0 32px; }
.footer-inner { display: flex; flex-direction: column; gap: 20px; }
.footer-brand { display: flex; align-items: center; }
.footer-logo { height: 40px; width: auto; }
.footer-note a { color: var(--red-on-dark); }
.footer-links { display: flex; flex-wrap: wrap; gap: 20px; font-family: var(--font-mono); font-size: 0.85rem; text-transform: uppercase; }
.footer-links a { text-decoration: none; }
.footer-links a:hover { color: var(--red-on-dark); }
.footer-legal { color: rgba(255,255,255,0.5); font-size: 0.75rem; margin-top: 12px; }

/* =========================================================
   RESPONSIVE — global tightening
   ========================================================= */
@media (max-width: 700px) {
  section { padding: 64px 0; }
  .hero { padding: 72px 0 56px; }
}
