@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@300;400;500;600;700&display=swap');

:root {
  --bg:           #fafaf8;
  --bg-hero:      #FEF676;
  --surface:      #ffffff;
  --surface-2:    #f4f4f0;
  --border:       rgba(0, 0, 0, 0.09);
  --border-hover: #FEF676;
  --yellow:       #FEF676;
  --yellow-dim:   rgba(254, 246, 118, 0.35);
  --black:        #0d0d0d;
  --text:         #0d0d0d;
  --text-muted:   #5c5c5c;
  --text-dim:     #b0b0b0;
  --green:        #15803d;
  --purple:       #7e22ce;
  --amber:        #92400e;
  --blue:         #1d4ed8;
  --rose:         #be123c;
  --orange:       #c2410c;
  --radius:       14px;
  --radius-sm:    8px;
  --nav-h:        60px;
  --shadow-sm:    0 1px 3px rgba(0,0,0,0.07), 0 4px 12px rgba(0,0,0,0.04);
  --shadow-md:    0 4px 20px rgba(0,0,0,0.1);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  font-family: 'Space Grotesk', system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
}

/* ─── NAV ──────────────────────────────────────────────────────────────── */
.site-nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--nav-h);
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  padding: 0 2rem;
  gap: 2rem;
  z-index: 100;
}

.nav-logo {
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--black);
  text-decoration: none;
  white-space: nowrap;
}

.nav-links {
  display: flex;
  gap: 0.25rem;
  list-style: none;
  margin-left: auto;
}

.nav-links a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 500;
  padding: 0.375rem 0.875rem;
  border-radius: var(--radius-sm);
  transition: color 0.15s, background 0.15s;
}

.nav-links a:hover { color: var(--black); background: var(--yellow-dim); }
.nav-links a.active { color: var(--black); background: var(--yellow); }

/* ─── PAGE WRAPPER ─────────────────────────────────────────────────────── */
.page { padding-top: var(--nav-h); }

/* ─── HERO ─────────────────────────────────────────────────────────────── */
.hero {
  position: relative;
  min-height: calc(100vh - var(--nav-h));
  background: var(--bg-hero);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: 4rem 2rem;
}

#quantum-canvas {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 1;
  text-align: center;
  max-width: 740px;
}

.hero-eyebrow {
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--black);
  opacity: 0.5;
  margin-bottom: 1.25rem;
}

.hero-title {
  font-size: clamp(2.75rem, 7vw, 5rem);
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -0.02em;
  color: var(--black);
  margin-bottom: 1.5rem;
}

.hero-sub {
  font-size: 1.0625rem;
  color: var(--black);
  opacity: 0.6;
  max-width: 540px;
  margin: 0 auto 2.5rem;
  line-height: 1.75;
  font-weight: 400;
}

.hero-credit {
  font-size: 0.875rem;
  color: var(--black);
  opacity: 0.5;
  margin: -1.5rem auto 2rem;
}
.hero-credit a {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.hero-credit a:hover { opacity: 0.8; }
.ig-icon {
  width: 0.95em;
  height: 0.95em;
  vertical-align: -0.1em;
  margin-right: 0.2em;
}

.hero-ctas {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

/* ─── BUTTONS ───────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.625rem 1.375rem;
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  font-weight: 600;
  font-family: inherit;
  text-decoration: none;
  cursor: pointer;
  border: 1.5px solid transparent;
  transition: all 0.15s;
  white-space: nowrap;
  line-height: 1;
}

.btn--primary  { background: var(--black); color: #fff; border-color: var(--black); }
.btn--primary:hover  { background: #2a2a2a; transform: translateY(-1px); box-shadow: 0 4px 12px rgba(0,0,0,0.2); }

.btn--outline  { background: transparent; color: var(--black); border-color: var(--black); }
.btn--outline:hover  { background: var(--yellow-dim); }

.btn--ghost    { background: transparent; color: var(--text-muted); border-color: var(--border); }
.btn--ghost:hover    { color: var(--black); border-color: rgba(0,0,0,0.25); }

.btn--sm { padding: 0.4rem 0.9rem; font-size: 0.8125rem; }

/* ─── SECTION ───────────────────────────────────────────────────────────── */
.section {
  max-width: 1200px;
  margin: 0 auto;
  padding: 5rem 2rem;
}

.section-header {
  margin-bottom: 3rem;
  text-align: center;
}

.section-title {
  font-size: clamp(1.75rem, 3.5vw, 2.75rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--black);
  margin-bottom: 0.75rem;
}

.section-sub { color: var(--text-muted); font-size: 1rem; }

/* ─── LANDING: ABOUT ────────────────────────────────────────────────────── */
.landing-about { max-width: 860px; }

.about-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  margin-bottom: 3.5rem;
}

.about-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.375rem;
  padding: 1.75rem 1rem;
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  text-align: center;
  box-shadow: var(--shadow-sm);
  transition: border-color 0.2s, box-shadow 0.2s;
}

.about-stat:hover {
  border-color: var(--yellow);
  box-shadow: 0 0 0 3px var(--yellow-dim), var(--shadow-md);
}

.stat-num {
  font-size: 2.75rem;
  font-weight: 700;
  line-height: 1;
  color: var(--black);
  letter-spacing: -0.03em;
}

.stat-label {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.about-body {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  color: var(--text-muted);
  font-size: 1rem;
  line-height: 1.8;
  max-width: 640px;
  margin: 0 auto;
  text-align: center;
}

.about-body em { color: var(--black); font-style: normal; font-weight: 500; }

.about-actions {
  display: flex;
  gap: 0.875rem;
  flex-wrap: wrap;
  justify-content: center;
  margin-top: 0.75rem;
}

/* ─── CARDS GRID ────────────────────────────────────────────────────────── */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 1.5rem;
}

/* ─── CARD ──────────────────────────────────────────────────────────────── */
.card {
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-sm);
  transition: border-color 0.2s, box-shadow 0.2s, transform 0.2s;
}

.card:not(.card--empty):hover {
  border-color: var(--yellow);
  box-shadow: 0 0 0 3px var(--yellow-dim), var(--shadow-md);
  transform: translateY(-2px);
}

.card--empty {
  opacity: 0.65;
  border-style: dashed;
  box-shadow: none;
}

.card--empty:hover {
  border-color: var(--border-hover);
  box-shadow: 0 0 0 3px var(--yellow-dim);
  transform: translateY(-2px);
}

/* ─── THUMBNAIL ─────────────────────────────────────────────────────────── */
.card-thumb {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: var(--surface-2);
  overflow: hidden;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.card-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.3s;
}

.card:hover .card-thumb img { transform: scale(1.03); }


.card-thumb--fallback img { display: none; }

.card-thumb--fallback::after {
  content: 'Preview coming soon';
  font-size: 0.6875rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-dim);
  font-weight: 500;
}

/* ─── CARD BODY ─────────────────────────────────────────────────────────── */
.card-body {
  padding: 1.375rem 1.5rem 1.5rem;
  display: flex;
  flex-direction: column;
  flex: 1;
  gap: 0.75rem;
}

.card-meta {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.5rem;
}

.badge-group { display: flex; gap: 0.375rem; flex-wrap: wrap; }

.team-num {
  font-size: 0.6875rem;
  font-weight: 600;
  color: var(--text-dim);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  white-space: nowrap;
  padding-top: 0.2rem;
}

.card-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--black);
  line-height: 1.3;
}

.card-desc {
  font-size: 0.875rem;
  color: var(--text-muted);
  line-height: 1.65;
  flex: 1;
}

/* ─── BADGES ────────────────────────────────────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  white-space: nowrap;
  border: 1px solid transparent;
}

.badge--live    { background: #dcfce7; color: var(--green);  border-color: #bbf7d0; }
.badge--demo    { background: #f3e8ff; color: var(--purple); border-color: #e9d5ff; }
.badge--theater { background: #fef3c7; color: var(--amber);  border-color: #fde68a; }
.badge--pres    { background: #dbeafe; color: var(--blue);   border-color: #bfdbfe; }
.badge--video   { background: #ffe4e6; color: var(--rose);   border-color: #fecdd3; }
.badge--art     { background: #ffedd5; color: var(--orange); border-color: #fed7aa; }

/* ─── MEMBERS ───────────────────────────────────────────────────────────── */
.members {
  display: flex;
  flex-wrap: wrap;
  gap: 0.375rem;
}

.member-chip {
  font-size: 0.6875rem;
  font-weight: 500;
  padding: 0.2rem 0.55rem;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--text-muted);
}

.member-chip--star {
  border-color: #fde68a;
  color: var(--amber);
  background: #fef9c3;
}

/* ─── CARD ACTIONS ──────────────────────────────────────────────────────── */
.card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.25rem;
}

/* ─── SCRIPT FLYOUT ─────────────────────────────────────────────────────── */
.script-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(3px);
  z-index: 199;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.script-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

.script-panel {
  position: fixed;
  top: 0;
  right: 0;
  height: 100dvh;
  width: min(520px, 94vw);
  background: var(--surface);
  z-index: 200;
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: -8px 0 48px rgba(0, 0, 0, 0.12);
}

.script-panel.open {
  transform: translateX(0);
}

.script-panel-header {
  background: var(--yellow);
  padding: 2rem 1.75rem 1.75rem;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  flex-shrink: 0;
  border-bottom: 1.5px solid rgba(0,0,0,0.08);
}

.script-eyebrow {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--black);
  opacity: 0.5;
  margin-bottom: 0.5rem;
}

.script-title {
  font-size: 1.625rem;
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: var(--black);
  margin-bottom: 0.5rem;
}

.script-subtitle {
  font-size: 0.8125rem;
  color: var(--black);
  opacity: 0.55;
  font-style: italic;
}

.script-close {
  background: rgba(0,0,0,0.08);
  border: none;
  color: var(--black);
  width: 32px;
  height: 32px;
  border-radius: 50%;
  font-size: 0.875rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background 0.15s;
  margin-top: 0.125rem;
}

.script-close:hover { background: rgba(0,0,0,0.16); }

.script-body {
  overflow-y: auto;
  padding: 2rem 1.75rem 3rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  flex: 1;
}

.script-preamble {
  font-size: 0.875rem;
  color: var(--text-muted);
  line-height: 1.7;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--border);
  margin-bottom: 0.5rem;
}

.script-act {
  padding: 1.5rem 0;
  border-bottom: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.script-act:last-child { border-bottom: none; }

.act-heading {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 1rem;
  font-weight: 700;
  color: var(--black);
  letter-spacing: -0.01em;
}

.act-num {
  background: var(--yellow);
  color: var(--black);
  font-size: 0.6875rem;
  font-weight: 700;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  letter-spacing: 0.04em;
  flex-shrink: 0;
}

.script-act p {
  font-size: 0.875rem;
  color: var(--text-muted);
  line-height: 1.7;
}

.script-act p em { color: var(--text); font-style: italic; }
.script-act p strong { color: var(--black); font-weight: 600; }

.script-act ul {
  padding-left: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.script-act li {
  font-size: 0.875rem;
  color: var(--text-muted);
  line-height: 1.6;
}

.physics-gloss {
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--black);
  background: var(--yellow-dim);
  border-left: 3px solid var(--yellow);
  padding: 0.5rem 0.75rem;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  margin-top: 0.25rem;
}

/* ─── VIDEO MODAL ───────────────────────────────────────────────────────── */
dialog#video-modal {
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: 0;
  max-width: min(920px, 94vw);
  width: 100%;
  color: var(--text);
  box-shadow: var(--shadow-md);
  /* center in viewport */
  position: fixed;
  top: 50%;
  left: 50%;
  translate: -50% -50%;
  margin: 0;
}

dialog#video-modal::backdrop {
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
}

.modal-inner { position: relative; padding: 1.25rem; }

.modal-close {
  position: absolute;
  top: 0.75rem; right: 0.75rem;
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--text-muted);
  width: 30px; height: 30px;
  border-radius: 50%;
  font-size: 0.875rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.15s, background 0.15s;
  z-index: 1;
}

.modal-close:hover { color: var(--black); background: var(--yellow); }

#modal-video {
  width: 100%;
  border-radius: var(--radius-sm);
  display: block;
  background: #000;
}

#modal-slides {
  width: 100%;
  aspect-ratio: 16 / 9;
  border: 0;
  border-radius: var(--radius-sm);
  display: none;
}

/* ─── SPONSORS ──────────────────────────────────────────────────────────── */
.sponsors {
  max-width: 860px;
  margin: 0 auto;
  padding: 0 2rem 5rem;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.75rem;
}

.sponsors-meta {
  font-size: 0.8125rem;
  color: var(--text-muted);
  letter-spacing: 0.01em;
}

.sponsors-meta strong {
  color: var(--black);
  font-weight: 700;
}

.sponsors-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.875rem;
  flex-wrap: wrap;
}

.sponsor {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.25rem;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--black);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  transition: border-color 0.15s, box-shadow 0.15s;
}

.sponsor:hover {
  border-color: var(--yellow);
  box-shadow: 0 0 0 3px var(--yellow-dim);
}

.sponsor-logo {
  height: 22px;
  width: auto;
  flex-shrink: 0;
  object-fit: contain;
  mix-blend-mode: multiply;
}

.sponsor-logo--dark {
  background: var(--black);
  padding: 3px 5px;
  border-radius: 4px;
}

/* ─── PHOTOS PAGE ───────────────────────────────────────────────────────── */
.photos-hero {
  background: var(--bg-hero);
  min-height: calc(100vh - var(--nav-h));
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4rem 2rem;
}

.photos-icon {
  font-size: 3.5rem;
  margin-bottom: 1.5rem;
  display: block;
}

/* ─── FOOTER ────────────────────────────────────────────────────────────── */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 2rem;
  text-align: center;
  color: var(--text-dim);
  font-size: 0.8125rem;
  background: var(--surface);
}

.site-footer a { color: var(--text-muted); text-decoration: none; }
.site-footer a:hover { color: var(--black); }

/* ─── RESPONSIVE ────────────────────────────────────────────────────────── */
@media (max-width: 768px) {
  .about-stats { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 640px) {
  .site-nav {
    flex-wrap: wrap;
    height: auto;
    padding: 0.625rem 1.25rem 0;
    gap: 0;
  }
  .nav-logo { font-size: 0.75rem; }
  .nav-links {
    order: 1;
    width: 100%;
    justify-content: stretch;
    gap: 0;
    margin-left: 0;
    margin-top: 0.5rem;
  }
  .nav-links li { flex: 1; }
  .nav-links a {
    display: block;
    text-align: center;
    border-radius: var(--radius-sm) var(--radius-sm) 0 0;
    padding: 0.5rem 0;
  }
  .page { padding-top: 90px; }
  .section { padding: 3rem 1.25rem; }
  .cards-grid { grid-template-columns: 1fr; }
  .hero-ctas { flex-direction: column; align-items: center; }
}
