/* ══════════════════════════════════════════════════════
   BostonSWUG shared site styles — homepage + meeting archive
   Design system matches fest2026 (Syne + Instrument Sans, dark/red)
   ══════════════════════════════════════════════════════ */

:root {
  --ink: #0a0b0f;
  --ink2: #13151c;
  --ink3: #1c1f2a;
  --gold: #c1292e;
  --gold2: #d9403a;
  --gold-dim: rgba(193,41,46,.12);
  --white: #f5f3ee;
  --white2: #ccc9c0;
  --white3: #a8a49e;
  --line: rgba(245,243,238,.08);
  --r: 6px;
  --ff-display: 'Syne', sans-serif;
  --ff-body: 'Instrument Sans', sans-serif;
  --sidebar-w: 280px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; background: var(--ink); }
body {
  background: var(--ink);
  color: var(--white);
  font-family: var(--ff-body);
  font-size: 16px;
  line-height: 1.6;
  overflow-x: hidden;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.04'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 1000;
  opacity: .5;
}

a { color: inherit; }

/* ── SCROLLBARS ── */
html { scrollbar-color: var(--gold) var(--ink2); scrollbar-width: thin; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--ink2); }
::-webkit-scrollbar-thumb { background: rgba(193,41,46,.55); border-radius: 999px; border: 2px solid var(--ink2); }
::-webkit-scrollbar-thumb:hover { background: var(--gold); }

.sidebar { scrollbar-color: var(--gold) var(--ink2); scrollbar-width: thin; }
.sidebar::-webkit-scrollbar { width: 8px; }
.sidebar::-webkit-scrollbar-track { background: var(--ink2); }
.sidebar::-webkit-scrollbar-thumb { background: rgba(193,41,46,.55); border-radius: 999px; border: none; }
.sidebar::-webkit-scrollbar-thumb:hover { background: var(--gold); }

/* ── SIDEBAR ── */
.sidebar {
  position: fixed;
  top: 0; left: 0; bottom: 0;
  width: var(--sidebar-w);
  background: var(--ink2);
  border-right: 1px solid var(--line);
  overflow-y: auto;
  z-index: 300;
  padding: 24px 18px 32px;
  display: flex;
  flex-direction: column;
  gap: 22px;
}
.sidebar-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  padding: 4px 4px 4px;
}
.sidebar-logo img { height: 38px; width: auto; display: block; }
.sidebar-logo-text {
  font-family: var(--ff-display);
  font-weight: 800;
  font-size: 14px;
  line-height: 1.25;
  color: var(--white);
}
.sidebar-logo-text span { color: var(--gold); }

.sidebar-block { display: flex; flex-direction: column; gap: 8px; }
.sidebar-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .15em;
  text-transform: uppercase;
  color: var(--white3);
  padding: 0 8px;
}

.sidebar-collapse-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  margin: 0;
  padding: 0 8px;
  background: none;
  border: none;
  border-radius: 0;
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
  font: inherit;
  text-align: left;
  color: var(--white3);
  transition: color .15s;
}
.sidebar-collapse-toggle:hover { color: var(--white2); }
.sidebar-collapse-icon { flex-shrink: 0; transition: transform .2s ease; }
.sidebar-collapse-toggle[aria-expanded="true"] .sidebar-collapse-icon { transform: rotate(180deg); }

.sidebar-collapse {
  display: flex;
  flex-direction: column;
  gap: 8px;
  overflow: hidden;
  max-height: 0;
  transition: max-height .3s ease;
}

.sidebar-cta {
  display: block;
  text-decoration: none;
  border-radius: var(--r);
  padding: 12px;
  border: 1px solid rgba(193,41,46,.3);
  background: linear-gradient(160deg, rgba(193,41,46,.18), rgba(193,41,46,.03));
  transition: border-color .2s, background .2s;
}
.sidebar-cta:hover { border-color: rgba(193,41,46,.55); background: linear-gradient(160deg, rgba(193,41,46,.26), rgba(193,41,46,.05)); }
.sidebar-cta-eyebrow {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--gold2);
  margin-bottom: 5px;
}
.sidebar-cta-title {
  font-family: var(--ff-display);
  font-weight: 700;
  font-size: 14px;
  color: var(--white);
  line-height: 1.3;
  margin-bottom: 3px;
}
.sidebar-cta-meta { font-size: 11px; color: var(--white3); }

.sidebar-link {
  display: flex;
  flex-direction: column;
  gap: 1px;
  padding: 9px 10px;
  border-radius: var(--r);
  text-decoration: none;
  color: var(--white2);
  transition: background .15s, color .15s;
}
.sidebar-link:hover { background: var(--ink3); color: var(--white); }
.sidebar-link.active { background: var(--gold-dim); color: var(--white); }
.sidebar-link .sl-title { font-size: 13px; font-weight: 600; }
.sidebar-link .sl-meta { font-size: 10.5px; color: var(--white3); }

.sidebar-note {
  font-size: 11px;
  color: var(--white3);
  line-height: 1.6;
  padding: 8px 8px 0;
}

.sidebar-toggle {
  display: none;
  position: fixed;
  top: 16px; left: 16px;
  z-index: 400;
  width: 42px; height: 42px;
  background: rgba(19,21,28,.9);
  border: 1px solid var(--line);
  border-radius: 50%;
  backdrop-filter: blur(10px);
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.sidebar-toggle span {
  display: block;
  width: 18px; height: 2px;
  background: var(--white);
  border-radius: 2px;
  position: relative;
}
.sidebar-toggle span::before, .sidebar-toggle span::after {
  content: '';
  position: absolute;
  left: 0;
  width: 18px; height: 2px;
  background: var(--white);
  border-radius: 2px;
}
.sidebar-toggle span::before { top: -6px; }
.sidebar-toggle span::after { top: 6px; }

.sidebar-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(5,6,9,.7);
  z-index: 290;
}

/* ── MAIN LAYOUT ── */
.site-main { margin-left: var(--sidebar-w); }

@media (max-width: 980px) {
  .sidebar {
    transform: translateX(-100%);
    transition: transform .28s ease;
    box-shadow: 24px 0 48px rgba(0,0,0,.4);
  }
  .sidebar.open { transform: translateX(0); }
  .sidebar-backdrop.open { display: block; }
  .site-main { margin-left: 0; }
  .sidebar-toggle { display: flex; }
}

/* ── HERO ── */
.page-hero {
  padding: 100px 48px 64px;
  background: var(--ink);
  position: relative;
  overflow: hidden;
}
.page-hero-glow {
  position: absolute;
  top: -20%; right: -10%;
  width: 55vw; height: 55vw;
  background: radial-gradient(ellipse, rgba(193,41,46,.12) 0%, transparent 65%);
  pointer-events: none;
}
.page-hero-grid { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }
.page-hero-grid svg { position: absolute; inset: 0; width: 100%; height: 100%; opacity: .05; }
.hero-inner { position: relative; max-width: 980px; }
.hero-eyebrow {
  font-family: var(--ff-display);
  font-size: 11px; font-weight: 600;
  letter-spacing: .2em; text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 18px;
  display: flex; align-items: center; gap: 12px;
}
.hero-eyebrow::before { content: ''; display: block; width: 28px; height: 1px; background: var(--gold); }
.hero-title {
  font-family: var(--ff-display);
  font-weight: 800;
  font-size: clamp(32px, 5vw, 60px);
  line-height: .98;
  letter-spacing: -.02em;
  color: var(--white);
  margin-bottom: 20px;
}
.hero-title em { font-style: normal; color: var(--gold); }
.hero-sub { font-size: 16px; color: var(--white2); line-height: 1.7; max-width: 620px; margin-bottom: 22px; }
.hero-meta { display: flex; align-items: center; gap: 24px; flex-wrap: wrap; }
.hero-meta-item { display: flex; flex-direction: column; gap: 2px; }
.hero-meta-label { font-size: 10px; font-weight: 600; letter-spacing: .15em; text-transform: uppercase; color: var(--white3); }
.hero-meta-value { font-size: 14px; font-weight: 600; color: var(--white); }
.hero-meta-sep { width: 1px; height: 34px; background: var(--line); flex-shrink: 0; }

/* ── SECTIONS ── */
.section { padding: 56px 48px 64px; }
.section-inner { max-width: 980px; }
.section-inner.wide { max-width: 1200px; }
.section-label {
  font-family: var(--ff-display);
  font-weight: 700;
  font-size: 22px;
  color: var(--white);
  margin-bottom: 20px;
}
.section-eyebrow {
  font-family: var(--ff-display);
  font-size: 11px; font-weight: 600;
  letter-spacing: .2em; text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 14px;
  display: flex; align-items: center; gap: 10px;
}
.section-eyebrow::before { content:''; display:block; width:22px; height:1px; background:var(--gold); }

.prose p { color: var(--white2); font-size: 15.5px; line-height: 1.8; margin-bottom: 16px; }
.prose p:last-child { margin-bottom: 0; }
.prose strong { color: var(--white); }

.card {
  background: var(--ink2);
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 26px;
}
.card + .card { margin-top: 14px; }

/* ── MEETING GRID (homepage timeline preview) ── */
.meeting-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.meeting-card {
  display: block;
  text-decoration: none;
  background: var(--ink2);
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 20px;
  transition: border-color .2s, transform .2s;
}
.meeting-card:hover { border-color: rgba(193,41,46,.3); transform: translateY(-2px); }
.meeting-card-date {
  font-family: var(--ff-display);
  font-size: 11px; font-weight: 700;
  letter-spacing: .1em; text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 8px;
}
.meeting-card-title { font-family: var(--ff-display); font-weight: 700; font-size: 17px; color: var(--white); margin-bottom: 6px; }
.meeting-card-venue { font-size: 13px; color: var(--white3); }

/* ── PHOTO GALLERY (shared with fest2026 pattern) ── */
.photo-columns { columns: 3; column-gap: 10px; }
.photo-item {
  break-inside: avoid;
  margin-bottom: 10px;
  border-radius: var(--r);
  overflow: hidden;
  cursor: pointer;
  position: relative;
  border: 1px solid var(--line);
  display: block;
}
.photo-item img { width: 100%; height: auto; display: block; transition: transform .4s ease; }
.photo-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(10,11,15,.7) 0%, transparent 50%);
  opacity: 0; transition: opacity .25s;
  display: flex; align-items: flex-end; padding: 14px;
}
.photo-overlay-icon {
  width: 32px; height: 32px;
  background: rgba(193,41,46,.85);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  margin-left: auto;
}
.photo-overlay-icon svg { width: 14px; height: 14px; fill: var(--white); }
.photo-item:hover img { transform: scale(1.03); }
.photo-item:hover .photo-overlay { opacity: 1; }

.photos-empty {
  border: 1px dashed var(--line);
  border-radius: var(--r);
  padding: 40px;
  text-align: center;
  color: var(--white3);
  font-size: 14px;
}

.lightbox {
  position: fixed; inset: 0; z-index: 500;
  display: none; align-items: center; justify-content: center;
}
.lightbox.open { display: flex; }
.lb-backdrop { position: absolute; inset: 0; background: rgba(5,6,9,.95); cursor: pointer; }
.lb-img-wrap { position: relative; z-index: 1; max-width: min(90vw, 1200px); max-height: 90vh; display: flex; flex-direction: column; align-items: center; }
.lb-img { max-width: 100%; max-height: 85vh; object-fit: contain; border-radius: var(--r); display: block; box-shadow: 0 32px 80px rgba(0,0,0,.6); }
.lb-counter { margin-top: 14px; font-size: 12px; font-weight: 500; letter-spacing: .1em; color: var(--white3); font-family: var(--ff-display); }
.lb-close {
  position: fixed; top: 24px; right: 28px; z-index: 2;
  background: rgba(28,31,42,.8); border: 1px solid var(--line); color: var(--white);
  font-size: 22px; line-height: 1; width: 42px; height: 42px; border-radius: 50%;
  cursor: pointer; display: flex; align-items: center; justify-content: center; transition: background .2s;
}
.lb-close:hover { background: rgba(193,41,46,.4); }
.lb-prev, .lb-next {
  position: fixed; top: 50%; transform: translateY(-50%); z-index: 2;
  background: rgba(28,31,42,.8); border: 1px solid var(--line); color: var(--white);
  font-size: 20px; width: 48px; height: 48px; border-radius: 50%;
  cursor: pointer; display: flex; align-items: center; justify-content: center; transition: background .2s;
}
.lb-prev:hover, .lb-next:hover { background: rgba(193,41,46,.3); }
.lb-prev { left: 20px; }
.lb-next { right: 20px; }

/* ── FOOTER ── */
footer {
  background: var(--ink);
  border-top: 1px solid var(--line);
  padding: 36px 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}
.footer-brand { font-family: var(--ff-display); font-size: 14px; font-weight: 700; color: var(--white2); }
.footer-brand span { color: var(--gold); }
.footer-copy { font-size: 12px; color: var(--white3); }

/* ── BUTTONS ── */
.btn-primary {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  background: var(--gold); color: var(--ink);
  font-family: var(--ff-body); font-weight: 600; font-size: 14px;
  padding: 12px 22px; border-radius: var(--r); text-decoration: none;
  transition: background .2s, transform .15s;
}
.btn-primary:hover { background: var(--gold2); transform: translateY(-2px); }
.btn-secondary {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  background: rgba(0,0,0,.35); color: #e0ddd6;
  font-family: var(--ff-body); font-weight: 500; font-size: 14px;
  padding: 12px 22px; border-radius: var(--r);
  border: 1px solid rgba(245,243,238,.25); text-decoration: none;
  transition: border-color .2s, color .2s, transform .15s;
}
.btn-secondary:hover { border-color: rgba(245,243,238,.5); color: var(--white); transform: translateY(-2px); }
.btn-row { display: flex; gap: 12px; flex-wrap: wrap; }

/* ── RESPONSIVE ── */
@media (max-width: 900px) {
  .page-hero { padding: 88px 24px 48px; }
  .section { padding: 40px 24px 48px; }
  footer { padding: 28px 24px; }
  .photo-columns { columns: 2; }
}
@media (max-width: 480px) {
  .photo-columns { columns: 1; }
}
