/* ===== Reset & Base ===== */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  -webkit-user-select: none;
  user-select: none;
}

input, textarea {
  -webkit-user-select: text;
  user-select: text;
}

:root {
  --bg: #060608;
  --bg-subtle: #0c0c10;
  --bg-card: #0f0f14;
  --bg-card-hover: #141419;
  --text: #e8e6e3;
  --text-dim: #8a8a92;
  --text-muted: #3a3a42;
  --accent: #d4a843;
  --accent-soft: #c4983a;
  --accent-glow: rgba(212, 168, 67, 0.12);
  --accent-glow-strong: rgba(212, 168, 67, 0.25);
  --blue: #4a8fd4;
  --teal: #3ab5a0;
  --purple: #8b6ec0;
  --rose: #d46a7e;
  --coral: #e07850;
  --font-sans: 'Space Grotesk', -apple-system, sans-serif;
  --font-mono: 'Space Mono', monospace;
}

html {
  color-scheme: dark;
  overscroll-behavior: none;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  scroll-behavior: auto;
  scroll-snap-type: y mandatory;
  overflow-y: scroll;
  height: 100%;
}

body {
  background: var(--bg);
  margin: 0;
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: opacity 0.3s;
}
a:hover { opacity: 0.7; }

/* ===== Cursor Glow ===== */
#cursor-glow {
  position: fixed;
  width: 900px;
  height: 900px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(212, 168, 67, 0.018) 0%, rgba(212, 168, 67, 0.008) 30%, rgba(212, 168, 67, 0.003) 55%, transparent 75%);
  pointer-events: none;
  z-index: 0;
  transform: translate(-50%, -50%);
  transition: opacity 0.3s;
}

/* ===== Shared Section ===== */
.section {
  min-height: 100vh;
  height: 100vh;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  scroll-snap-align: start;
  cursor: default;
}

.section::before,
.section::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  height: 15vh;
  pointer-events: none;
  z-index: 2;
}

.section::before {
  top: 0;
  background: linear-gradient(to bottom, var(--bg), transparent);
}

.section::after {
  bottom: 0;
  background: linear-gradient(to top, var(--bg), transparent);
}

#hero::before {
  display: none;
}

#contact::after {
  display: none;
}

.section-label {
  font-family: var(--font-mono);
  font-size: 1rem;
  color: var(--accent);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  margin-bottom: 1.5rem;
}

/* ===== Animations ===== */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes scrollPulse {
  0%, 100% { opacity: 0.2; }
  50% { opacity: 0.7; }
}

@keyframes pulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.4); opacity: 0.5; }
}

@keyframes ripple {
  0% { transform: translate(-50%, -50%) scale(1); opacity: 0; }
  8% { transform: translate(-50%, -50%) scale(1.05); opacity: var(--ripple-peak-opacity, 0.24); }
  36% { transform: translate(-50%, -50%) scale(1.55); opacity: calc(var(--ripple-peak-opacity, 0.24) * 0.72); }
  68% { transform: translate(-50%, -50%) scale(2.08); opacity: calc(var(--ripple-peak-opacity, 0.24) * 0.12); }
  100% { transform: translate(-50%, -50%) scale(2.5); opacity: 0; }
}

@keyframes seqPulse {
  0%, 100% { opacity: 0.4; }
  50% { opacity: 1; }
}

/* ===== 1. HERO ===== */
#hero {
  flex-direction: column;
  background: var(--bg);
}

#hero-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  cursor: default;
  user-select: none;
  -webkit-user-select: none;
}

.hero-inner {
  position: relative;
  z-index: 1;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0;
  padding: 2rem;
  width: 100%;
  pointer-events: none;
}
.hero-inner .listen-btn {
  pointer-events: auto;
}

.hero-badge {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: var(--accent);
  letter-spacing: 0.25em;
  text-transform: uppercase;
  border: 1px solid rgba(212, 168, 67, 0.25);
  padding: 0.4rem 1.2rem;
  border-radius: 100px;
  margin-bottom: 2.5rem;
  opacity: 0;
  animation: fadeUp 1s ease forwards 0.2s;
}

.hero-title {
  font-size: clamp(4rem, 14vw, 12rem);
  font-weight: 300;
  letter-spacing: 0.15em;
  line-height: 1;
  margin-bottom: 0.5rem;
  opacity: 0;
  animation: fadeUp 1.2s ease forwards 0.4s;
  position: relative;
  z-index: 0;
}

.hero-title::before {
  content: '';
  position: absolute;
  inset: -0.03em -0.06em;
  border-radius: 8px;
  background: rgba(6, 6, 8, 0.36);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.3);
  z-index: -1;
}

.hero-title .glow-wrap {
  display: inline-block;
  position: relative;
  background: linear-gradient(135deg, rgb(255, 252, 235) 0%, rgb(255, 224, 105) 72%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Shimmer overlay on top of the base gradient */
.hero-title .glow-wrap::after {
  content: 'SONARA';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  font-size: inherit;
  font-weight: inherit;
  letter-spacing: inherit;
  line-height: inherit;
  background: linear-gradient(
    90deg,
    transparent 0%,
    transparent 20%,
    rgba(255, 245, 220, 0.4) 38%,
    rgba(255, 250, 235, 0.7) 50%,
    rgba(255, 245, 220, 0.4) 62%,
    transparent 80%,
    transparent 100%
  );
  background-size: 250% 100%;
  background-repeat: no-repeat;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: letterShimmer 5s linear infinite;
  pointer-events: none;
}

@keyframes letterShimmer {
  0% { background-position: 130% 0; }
  100% { background-position: -80% 0; }
}

/* Rays canvas overlays the title — rays project FORWARD toward viewer */
#rays-canvas {
  position: absolute;
  top: -80%;
  left: -20%;
  width: 140%;
  height: 300%;
  z-index: 2;
  pointer-events: none;
  mix-blend-mode: screen;
}

.hero-expansion {
  font-family: var(--font-mono);
  /* previous:
  font-size: clamp(1.14rem, 1.95vw, 1.42rem);
  letter-spacing: 0.2em;
  */
  position: relative;
  z-index: 0;
  font-size: clamp(1.14rem, 1.95vw, 1.42rem);
  color: rgba(208, 182, 122, 0.9);
  font-weight: 420;
  letter-spacing: 0.2em;
  margin-bottom: 1.5rem;
  opacity: 0;
  animation: fadeUp 1s ease forwards 0.7s;
}

.hero-expansion::before {
  content: '';
  position: absolute;
  inset: -0.04rem -0.08rem;
  border-radius: 4px;
  background: rgba(6, 6, 8, 0.27);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.22);
  z-index: -1;
}

.hero-expansion-lead {
  font-weight: 700;
}

.hero-expansion-strong {
  font-weight: 700;
}

.hero-tagline {
  font-size: clamp(1rem, 2vw, 1.35rem);
  color: rgba(226, 216, 188, 0.94);
  font-weight: 360;
  font-style: italic;
  width: min(440px, 88vw);
  line-height: 1.6;
  margin-top: 22px;
  margin-bottom: 3rem;
  opacity: 0;
  animation: fadeUp 1s ease forwards 0.9s;
}

.hero-tagline-line {
  display: inline-block;
  padding: 0.01rem 0.08rem;
  border-radius: 1.5px;
  background: rgba(6, 6, 8, 0.24);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.2);
}

/* Listen Button */
.listen-btn {
  position: relative;
  display: flex;
  align-items: center;
  gap: 1rem;
  background: rgba(6, 6, 8, 0.5);
  border: 1px solid rgba(212, 168, 67, 0.35);
  color: rgba(228, 188, 88, 0.96);
  padding: 1rem 2rem;
  border-radius: 100px;
  font-family: var(--font-mono);
  font-size: 0.86rem;
  letter-spacing: 0.05em;
  cursor: pointer;
  opacity: 0;
  animation: fadeUp 1s ease forwards 1.1s;
  transition: border-color 0.4s ease, background-color 0.4s ease, box-shadow 0.4s ease;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.26);
}

/* After entrance fadeUp completes, pulse until first click */
.listen-btn.entrance-done:not(.settled) {
  animation: listenPulse 2.2s ease-in-out infinite;
  opacity: 1;
}

/* After first click: stable, no more pulse */
.listen-btn.settled {
  animation: none;
  opacity: 1;
}

@keyframes listenPulse {
  0%, 100% {
    border-color: rgba(212, 168, 67, 0.35);
    background: rgba(34, 26, 12, 0.5);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.26);
  }
  50% {
    border-color: rgba(212, 168, 67, 0.82);
    background: rgba(42, 32, 15, 0.6);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.28), 0 0 16px rgba(212, 168, 67, 0.42), 0 0 34px rgba(212, 168, 67, 0.14);
  }
}

.listen-btn:hover {
  border-color: rgba(212, 168, 67, 0.35);
  background: rgba(34, 26, 12, 0.5);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.26);
}

/* Playing: on state */
.listen-btn.playing {
  animation: none;
  opacity: 1;
  border-color: var(--accent);
  background: rgba(212, 168, 67, 0.1);
  box-shadow: 0 0 16px rgba(212, 168, 67, 0.42), 0 0 34px rgba(212, 168, 67, 0.14);
}

.sound-trigger.fading {
  transition: all 1.5s ease !important;
}

.listen-btn.fading {
  opacity: 1;
  border-color: rgba(212, 168, 67, 0.35);
  background: transparent;
}

.listen-btn.fading .listen-ring {
  animation: none;
  opacity: 0;
}

.hero-audio-meta {
  position: relative;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
}

.hero-data-caption {
  position: absolute;
  top: calc(100% + 0.9rem);
  left: 50%;
  z-index: 0;
  width: max-content;
  max-width: min(80vw, 34rem);
  transform: translateX(-50%);
  padding: 0.15rem 0.55rem;
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  line-height: 1.2;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  color: rgba(214, 183, 116, 0.73);
  text-shadow: 0 0 12px rgba(212, 168, 67, 0.17);
  white-space: nowrap;
  opacity: 0;
  filter: blur(2px);
  transition: opacity 5.2s ease, filter 5.2s ease;
  transition-delay: 0s;
  pointer-events: none;
}

.hero-data-caption::before {
  content: '';
  position: absolute;
  inset: -0.15rem -0.4rem;
  border-radius: 8px;
  background: rgba(6, 6, 8, 0.32);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.24);
  z-index: -1;
}

.listen-btn.playing + .hero-data-caption {
  opacity: 1;
  filter: blur(0);
  transition-delay: 3.5s;
}

.music-listen.fading {
  border-color: var(--text-muted);
  color: var(--text);
}

.edu-listen.fading {
  border-color: var(--text-muted);
  color: var(--text);
}

.sound-trigger.fading .sound-icon {
  background: var(--text-muted);
  box-shadow: none;
  animation: none;
  transition: all 1.5s ease;
}

.listen-ring {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 100%;
  height: 100%;
  border-radius: 100px;
  border: 1px solid var(--accent);
  pointer-events: none;
  opacity: 0;
  transform: translate(-50%, -50%) scale(1);
}


/* Ripples are now spawned dynamically by transient detection in visuals.js */

.listen-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(212, 168, 67, 0.15);
}

.listen-icon svg {
  transform: translateX(2px);
}

.listen-btn.playing .listen-icon svg {
  opacity: 0;
}

.listen-btn.playing .listen-icon::before,
.listen-btn.playing .listen-icon::after {
  content: '';
  position: absolute;
  top: 8px;
  bottom: 8px;
  width: 3px;
  border-radius: 2px;
  background: currentColor;
  box-shadow: 0 0 8px currentColor;
}

.listen-btn.playing .listen-icon::before {
  left: 11px;
}

.listen-btn.playing .listen-icon::after {
  right: 11px;
}

.listen-btn.fading .listen-icon svg {
  opacity: 1;
}

.listen-btn.fading .listen-icon::before,
.listen-btn.fading .listen-icon::after {
  opacity: 0;
}

.listen-text {
  white-space: nowrap;
}

.scroll-hint {
  position: absolute;
  top: var(--hero-scroll-hint-top, calc(100% - 232px));
  left: 50%;
  transform: translateX(-50%);
  pointer-events: none;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.14rem;
  opacity: 0;
  transition: opacity 2.8s ease;
}

.scroll-hint.visible {
  opacity: 1;
}

.scroll-hint-text {
  font-family: var(--font-mono);
  font-size: 0.84rem;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  position: relative;
  z-index: 0;
  color: rgba(228, 188, 88, 0.96);
  text-shadow: 0 0 8px rgba(212, 168, 67, 0.14);
  opacity: 0;
  filter: blur(1.5px);
  transition: opacity 1.6s ease, filter 1.6s ease;
  will-change: opacity, filter, color, text-shadow;
}

.scroll-hint.visible .scroll-hint-text {
  opacity: 0.96;
  filter: blur(0);
}

.scroll-hint-text::before {
  content: '';
  position: absolute;
  inset: -0.12rem -0.3rem;
  border-radius: 6px;
  background: rgba(6, 6, 8, 0.32);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.24);
  z-index: -1;
}

.scroll-hint.show-copy .scroll-hint-text {
  opacity: 0.96;
  filter: blur(0);
}

.scroll-hint.pulsing.show-copy .scroll-hint-text {
  animation: hintTextGlow 1.7s ease-in-out infinite;
}

.scroll-hint.pulsing .section-down-chevron {
  animation: hintPulse 1.7s ease-in-out infinite;
}

.section-down-cue {
  position: fixed;
  left: 50%;
  bottom: 2rem;
  pointer-events: none;
  z-index: 3;
  opacity: 0;
  transition: opacity 3.1s ease, transform 3.1s ease;
  --cue-local-y: 8px;
  --cue-scroll-y: 0px;
  transform: translateX(-50%) translateY(calc(var(--cue-local-y) + var(--cue-scroll-y)));
  display: flex;
  flex-direction: column;
  align-items: center;
}

.section.cue-page-tied .section-down-cue {
  position: absolute;
}

.section-down-chevron {
  font-family: var(--font-sans);
  font-size: 2rem;
  line-height: 0.8;
  color: rgba(212, 168, 67, 0.76);
  text-shadow: 0 0 10px rgba(212, 168, 67, 0.18);
}

.section.has-down-cue.show-down-cue .section-down-cue {
  opacity: 0.72;
  --cue-local-y: 0px;
}

.section.has-down-cue.cue-fading-out .section-down-cue {
  opacity: 0;
  --cue-local-y: -14px;
  transition-duration: 0.25s;
  transition-timing-function: ease-out;
}

.scroll-hint .section-down-chevron {
  display: block;
  font-size: 2rem;
  opacity: 1;
  transform: scale(1);
  filter: brightness(1.08) saturate(1);
  color: rgba(228, 188, 88, 0.96);
  text-shadow: 0 0 10px rgba(212, 168, 67, 0.18);
  will-change: opacity, transform, filter, text-shadow;
}

@keyframes hintPulse {
  0%, 100% {
    opacity: 1;
    transform: scale(1);
    filter: brightness(1.08) saturate(1);
    color: rgba(228, 188, 88, 0.96);
    text-shadow: 0 0 10px rgba(212, 168, 67, 0.18);
  }
  50% {
    opacity: 0.76;
    transform: scale(1);
    filter: brightness(1) saturate(1);
    color: rgba(212, 168, 67, 0.92);
    text-shadow: 0 0 8px rgba(212, 168, 67, 0.14);
  }
}

@keyframes hintTextGlow {
  0%, 100% {
    color: rgba(228, 188, 88, 0.96);
    text-shadow: 0 0 8px rgba(212, 168, 67, 0.14);
    filter: blur(0);
  }
  50% {
    color: rgba(214, 183, 116, 0.78);
    text-shadow: 0 0 6px rgba(212, 168, 67, 0.1);
    filter: brightness(1) saturate(1) blur(0);
  }
}

/* ===== 2. VISION ===== */
#vision {
  flex-direction: column;
  padding: 0;
}

#vision-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
}

.vision-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 20% 30%, rgba(212, 168, 67, 0.06) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 70%, rgba(74, 143, 212, 0.04) 0%, transparent 50%);
  opacity: 0;
  transition: opacity 1.5s ease;
}

.section.in-view .vision-bg { opacity: 1; }

.vision-content {
  width: 100%;
  max-width: 1200px;
  padding: 4rem 3rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4rem;
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.9s ease, transform 0.9s ease;
}

.section.in-view .vision-content {
  opacity: 1;
  transform: translateY(0);
}

.vision-center {
  text-align: center;
  max-width: 980px;
}

.vision-headline {
  font-size: clamp(2rem, 4.5vw, 3.5rem);
  font-weight: 300;
  line-height: 1.2;
  margin-bottom: 2rem;
  letter-spacing: -0.01em;
}

.vision-body {
  font-size: clamp(1rem, 1.3vw, 1.15rem);
  line-height: 1.8;
  color: rgba(232, 230, 227, 0.74);
}

.vision-body em {
  color: var(--accent);
  font-style: normal;
}

/* Curiosity Cascade */
.curiosity-cascade {
  display: flex;
  align-items: stretch;
  gap: 1.5rem;
  width: 100%;
  max-width: 1000px;
}

.cascade-step {
  flex: 1;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 12px;
  padding: 2rem;
  text-align: center;
  transition: transform 0.4s ease, border-color 0.4s ease;
}

.cascade-step:hover {
  border-color: rgba(212, 168, 67, 0.15);
}

.cascade-icon {
  margin-bottom: 1rem;
  color: var(--accent);
  opacity: 0.8;
}

.cascade-icon-img {
  width: 52px;
  height: 52px;
  display: inline-block;
}

.telescope-flip {
  transform: scaleX(-1);
}

.cascade-step[data-step="3"] .cascade-icon {
  opacity: 0.8;
  color: var(--accent);
}

.cascade-step p {
  font-size: 0.95rem;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.65);
}

.cascade-step p em {
  color: var(--accent);
  font-style: italic;
}

.cascade-arrow {
  display: flex;
  align-items: center;
  color: var(--text-muted);
  font-size: 2.5rem;
  flex-shrink: 0;
}

.cascade-label {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--accent);
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

/* ===== 3. CITIZEN SCIENCE ===== */
#citizen-science {
  padding: 0;
}

#cs-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
}

.cs-content {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 1300px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
  padding: 4rem;
  margin-left: calc(-5rem - 10px);
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.9s ease, transform 0.9s ease;
}

.section.in-view .cs-content {
  opacity: 1;
  transform: translateY(0);
}

.cs-title {
  font-size: clamp(3rem, 6vw, 4.5rem);
  font-weight: 300;
  color: var(--teal);
  margin-bottom: 1.5rem;
  line-height: 1.1;
}

.cs-body {
  font-size: 1.2rem;
  line-height: 1.8;
  color: rgba(255, 255, 255, 0.8);
  margin-bottom: 1.2rem;
}

.cs-listen {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  width: 12.5rem;
  justify-content: center;
  background: none;
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: rgba(255, 255, 255, 0.8);
  padding: 0.7rem 1.2rem;
  border-radius: 100px;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  cursor: pointer;
  margin-top: 1rem;
  transition: all 0.4s ease;
}

.cs-listen:hover {
  border-color: var(--teal);
  color: var(--teal);
}

.cs-listen.playing {
  border-color: var(--teal);
  color: var(--teal);
}

.cs-right a {
  display: block;
  text-decoration: none;
  opacity: 0.75;
  transform: translateY(0);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.cs-right a:hover {
  opacity: 1;
  transform: translateY(-4px);
}

.cs-right a img {
  display: block;
  width: 135%;
  border-radius: 12px;
}

.cs-right .cs-image-caption {
  display: block;
  text-align: center;
  width: 135%;
  margin-top: 0.75rem;
  font-family: var(--font-mono);
  font-size: 0.95rem;
  color: rgba(255, 255, 255, 0.5);
  letter-spacing: 0.06em;
}

.cs-stats-block {
  display: flex;
  flex-direction: column;
  gap: 2.5rem;
  padding: 3rem;
  background: var(--bg-card);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
}

.cs-stat {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 0.25rem;
}

.cs-stat-number {
  font-family: var(--font-mono);
  font-size: clamp(3rem, 6vw, 4.5rem);
  font-weight: 700;
  color: var(--teal);
  line-height: 1;
}

.cs-stat-plus {
  font-family: var(--font-mono);
  font-size: clamp(1.5rem, 3vw, 2.5rem);
  color: var(--teal);
  font-weight: 300;
}

.cs-stat-label {
  display: block;
  width: 100%;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.6);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-top: 0.5rem;
}

.cs-stat-paper {
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.cs-paper-title {
  display: block;
  font-size: 1rem;
  color: rgba(255, 255, 255, 0.75);
  font-style: italic;
  margin-bottom: 0.4rem;
  transition: color 0.3s ease;
}

.cs-paper-title.pulsing {
  animation: paper-pulse 2s ease-in-out infinite;
}

@keyframes paper-pulse {
  0%, 100% { color: var(--text-dim); }
  50% { color: var(--accent); text-shadow: 0 0 12px var(--accent); }
}

.cs-paper-journal {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: rgba(255, 255, 255, 0.5);
  letter-spacing: 0.05em;
}

/* ===== 4. STEM-MUSIC ===== */
#stem-music {
  flex-direction: column;
  padding: 3rem 2rem;
}

#spectrum-canvas,
#globe-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
}

.music-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 30% 60%, rgba(139, 110, 192, 0.06) 0%, transparent 50%),
    radial-gradient(ellipse at 70% 30%, rgba(212, 168, 67, 0.04) 0%, transparent 50%);
  opacity: 0;
  transition: opacity 1.5s ease;
}

.section.in-view .music-bg { opacity: 1; }

.music-content {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 1400px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2.5rem;
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.9s ease, transform 0.9s ease;
}

.section.in-view .music-content {
  opacity: 1;
  transform: translateY(0);
}

.music-header {
  text-align: center;
}

.music-title {
  font-size: clamp(3rem, 6vw, 4.5rem);
  font-weight: 300;
  color: var(--purple);
  margin-bottom: 0.75rem;
  line-height: 1.1;
}

.music-subtitle {
  font-size: 1.25rem;
  color: var(--text-dim);
}

/* Instruments Grid */
.instruments-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  width: 100%;
}

.instrument-card {
  background: #161620;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 0;
  overflow: hidden;
  transition: transform 0.4s ease, border-color 0.4s ease;
}

.instrument-card:hover {
  border-color: rgba(139, 110, 192, 0.2);
}

.instrument-card h3 {
  font-size: 1.1rem;
  font-weight: 500;
  padding: 1.25rem 1.5rem 0.5rem;
}

.demo-tag {
  color: rgba(255, 255, 255, 0.35);
  font-weight: 400;
  font-size: 0.75em;
}

.instrument-card p {
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.6);
  line-height: 1.6;
  padding: 0 1.5rem 1.5rem;
}

.instrument-visual {
  width: 100%;
  height: 140px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.02);
  border-bottom: 1px solid rgba(255, 255, 255, 0.03);
  overflow: hidden;
}

.sequencer-visual {
  height: auto;
  overflow: visible;
}

/* Sequencer toolbar */
.seq-toolbar {
  display: flex;
  width: 100%;
  margin-bottom: -2.1rem;
  padding-left: calc(1rem + 28px);
}
.seq-play,
.seq-loop,
.seq-randomize {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(160, 130, 210, 0.9);
  background: rgba(60, 45, 90, 0.6);
  border: 1px solid rgba(120, 100, 170, 0.4);
  border-radius: 4px;
  padding: 0.3rem 0.7rem;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s;
}
.seq-play {
  width: 5.9rem;
  height: 1.8rem;
  line-height: 1;
  text-align: center;
  animation: seqPlayPulse 0.9s ease-in-out infinite;
}

.seq-play.clicked {
  animation: none;
  box-shadow: none;
}

@keyframes seqPlayPulse {
  0%, 100% {
    border-color: rgba(120, 100, 170, 0.3);
    background: rgba(60, 45, 90, 0.5);
    box-shadow: 0 0 6px rgba(139, 110, 192, 0), 0 0 20px rgba(139, 110, 192, 0);
  }
  50% {
    border-color: rgba(120, 100, 170, 0.6);
    background: rgba(60, 45, 90, 0.7);
    box-shadow: 0 0 8px rgba(139, 110, 192, 0.4), 0 0 24px rgba(139, 110, 192, 0.15);
  }
}

.seq-play:hover,
.seq-loop:hover,
.seq-randomize:hover {
  background: rgba(60, 45, 90, 0.75);
  border-color: rgba(120, 100, 170, 0.55);
}

.seq-loop {
  color: rgba(160, 130, 210, 0.55);
  background: rgba(60, 45, 90, 0.35);
  border-color: rgba(120, 100, 170, 0.25);
}

.seq-loop.active {
  color: rgba(160, 130, 210, 0.9);
  background: rgba(60, 45, 90, 0.6);
  border: 1px solid rgba(120, 100, 170, 0.4);
  box-shadow: 0 0 6px rgba(139, 110, 192, 0.2);
}
.seq-toolbar { gap: 0.5rem; }

.seq-loop.flash {
  color: rgba(160, 130, 210, 1);
  background: rgba(160, 130, 210, 0.45);
  border-color: rgba(160, 130, 210, 0.7);
  box-shadow: 0 0 10px rgba(139, 110, 192, 0.5);
}

/* Sequencer visual */
.seq-grid {
  display: grid;
  grid-template-columns: auto repeat(16, 1fr);
  gap: 3px;
  padding: 0.75rem 1rem 0.5rem;
  width: 100%;
}

.seq-label {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  padding-right: 6px;
  white-space: nowrap;
}
.seq-row-syn .seq-label { color: rgba(160, 130, 210, 1); }
.seq-row-hat .seq-label { color: rgba(80, 190, 190, 1); }
.seq-row-kck .seq-label { color: rgba(212, 168, 67, 1); }

.seq-cell {
  aspect-ratio: 1;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.06);
  cursor: pointer;
  transition: background 0.15s, box-shadow 0.15s, border-color 0.15s;
}

/* Row-colored inactive cells */
.seq-row-syn .seq-cell { background: rgba(160, 130, 210, 0.06); border-color: rgba(160, 130, 210, 0.1); }
.seq-row-hat .seq-cell { background: rgba(80, 190, 190, 0.06); border-color: rgba(80, 190, 190, 0.1); }
.seq-row-kck .seq-cell { background: rgba(212, 168, 67, 0.06); border-color: rgba(212, 168, 67, 0.1); }

/* Synth rows — purple */
.seq-row-syn .seq-cell.active {
  background: rgba(139, 110, 192, 0.3);
  border-color: rgba(139, 110, 192, 0.4);
}
.seq-row-syn .seq-cell.active.lit {
  background: rgba(139, 110, 192, 0.85);
  border-color: rgba(180, 150, 230, 0.9);
  box-shadow: 0 0 10px rgba(139, 110, 192, 0.5);
}

/* Hat row — cyan/teal */
.seq-row-hat .seq-cell.active {
  background: rgba(80, 190, 190, 0.3);
  border-color: rgba(80, 190, 190, 0.4);
}
.seq-row-hat .seq-cell.active.lit {
  background: rgba(80, 210, 210, 0.85);
  border-color: rgba(120, 230, 230, 0.9);
  box-shadow: 0 0 10px rgba(80, 190, 190, 0.5);
}

/* Kick row — warm orange */
.seq-row-kck .seq-cell.active {
  background: rgba(212, 168, 67, 0.3);
  border-color: rgba(212, 168, 67, 0.4);
}
.seq-row-kck .seq-cell.active.lit {
  background: rgba(230, 180, 70, 0.85);
  border-color: rgba(245, 200, 100, 0.9);
  box-shadow: 0 0 10px rgba(212, 168, 67, 0.5);
}

.seq-cell.playhead {
  border-color: rgba(255, 255, 255, 0.3);
}

/* Synth wavetable label */
.synth-wt-label {
  position: absolute;
  top: 0.6rem;
  left: 0.8rem;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.04em;
}

.synth-fx-btns {
  position: absolute;
  top: 0.6rem;
  right: 0.8rem;
  z-index: 2;
  display: flex;
  gap: 0.35rem;
}
.synth-fx-btn {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(160, 130, 210, 0.55);
  background: rgba(60, 45, 90, 0.35);
  border: 1px solid rgba(120, 100, 170, 0.25);
  border-radius: 4px;
  padding: 0.2rem 0.5rem;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s, color 0.2s;
}
.synth-fx-btn:hover {
  background: rgba(60, 45, 90, 0.55);
  border-color: rgba(120, 100, 170, 0.4);
}
.synth-fx-btn.active {
  color: rgba(160, 130, 210, 0.9);
  background: rgba(60, 45, 90, 0.6);
  border: 1px solid rgba(120, 100, 170, 0.4);
  box-shadow: 0 0 6px rgba(139, 110, 192, 0.2);
}

.wt-prefix {
  color: var(--text-dim);
  text-transform: uppercase;
}

.wt-select {
  position: relative;
}

.wt-current {
  background: none;
  border: none;
  color: var(--purple);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  cursor: pointer;
  padding: 0;
}

.wt-list {
  display: none;
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  background: #111118;
  border: 1px solid rgba(139, 110, 192, 0.3);
  border-radius: 6px;
  padding: 0.3rem 0;
  z-index: 50;
  min-width: 160px;
}

.wt-select.open .wt-list {
  display: block;
}

.wt-list button {
  display: block;
  width: 100%;
  background: none;
  border: none;
  color: var(--text-dim);
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.03em;
  text-align: left;
  padding: 0.3rem 0.6rem;
  cursor: pointer;
}

.wt-list button:hover {
  background: rgba(139, 110, 192, 0.15);
  color: var(--purple);
}

.wt-list button.active {
  color: var(--purple);
}

/* Synth wave canvas */
.synth-visual {
  position: relative;
}

#synth-wave-canvas {
  width: 100%;
  height: 100%;
}

/* Catalog visual */
.catalog-rows {
  width: 100%;
  padding: 1rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.catalog-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-dim);
  padding: 0.4rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.03);
}

.cat-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  flex-shrink: 0;
}

/* Evidence Stats Bar */
.music-evidence {
  display: flex;
  justify-content: center;
  gap: 4rem;
  width: 100%;
  padding: 1.5rem 0;
  border-top: 1px solid rgba(255, 255, 255, 0.04);
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.evidence-stat {
  text-align: center;
}

.evidence-number {
  display: block;
  font-family: var(--font-mono);
  font-size: clamp(1.5rem, 3vw, 2.2rem);
  font-weight: 700;
  color: var(--text);
}

.evidence-label {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: rgba(255, 255, 255, 0.5);
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

/* Music listen button */
.music-listen {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  background: none;
  border: 1px solid var(--text-muted);
  color: var(--text-dim);
  padding: 0.7rem 1.2rem;
  border-radius: 100px;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  cursor: pointer;
  transition: all 0.4s ease;
}

.music-listen:hover {
  border-color: var(--purple);
  color: var(--purple);
}

.music-listen.playing {
  border-color: var(--purple);
  color: var(--purple);
}

/* ===== 5. EDUCATION ===== */
#education {
  flex-direction: column;
}

#edu-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
}

.edu-content {
  position: relative;
  z-index: 1;
  pointer-events: none;
  user-select: none;
  width: 100%;
  max-width: 1200px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  padding: 2rem 3rem;
  text-align: center;
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.9s ease, transform 0.9s ease;
}

.section.in-view .edu-content {
  opacity: 1;
  transform: translateY(0);
}

.edu-center {
  max-width: 980px;
}

.edu-title {
  font-size: clamp(2.5rem, 5vw, 3.5rem);
  font-weight: 300;
  color: var(--blue);
  margin-bottom: 0.75rem;
  line-height: 1.1;
}

.edu-body {
  font-size: 1.1rem;
  line-height: 1.6;
  color: rgba(232, 230, 227, 0.74);
}

.edu-hero-image {
  max-width: 800px;
  width: 100%;
}

.edu-hero-image img {
  width: 100%;
  border-radius: 12px;
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.5);
  opacity: 0.85;
}

.edu-image-caption {
  display: block;
  margin-top: 0.8rem;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--text-muted);
  letter-spacing: 0.08em;
}

.edu-details {
  display: flex;
  gap: 3rem;
  flex-wrap: wrap;
  justify-content: center;
}

.edu-detail {
  background: var(--bg-card);
  border: 1px solid rgba(255, 255, 255, 0.04);
  border-radius: 12px;
  padding: 2rem 2.5rem;
  text-align: center;
  min-width: 200px;
  transition: transform 0.3s, border-color 0.3s;
}

.edu-detail:hover {
  transform: translateY(-3px);
  border-color: rgba(74, 143, 212, 0.2);
}

.edu-detail-num {
  display: block;
  font-family: var(--font-mono);
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--blue);
  margin-bottom: 0.5rem;
}

.edu-detail-label {
  font-size: 0.85rem;
  color: var(--text-dim);
  line-height: 1.5;
}

.edu-detail-label small {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: var(--text-muted);
  margin-top: 0.3rem;
  letter-spacing: 0.05em;
}

.edu-listen,
.edu-content .sound-trigger {
  pointer-events: auto;
}

.edu-listen {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  background: none;
  border: 1px solid var(--text-muted);
  color: var(--text-dim);
  padding: 0.7rem 1.2rem;
  border-radius: 100px;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  cursor: pointer;
  transition: all 0.4s ease;
}

.edu-listen:hover {
  border-color: var(--blue);
  color: var(--blue);
}

.edu-listen.playing {
  border-color: var(--blue);
  color: var(--blue);
}

/* ===== 6. TEAM ===== */
#team {
  padding: 4rem 2rem;
  flex-direction: column;
}

.team-content {
  width: 100%;
  max-width: 1200px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2.5rem;
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.9s ease, transform 0.9s ease;
}

.section.in-view .team-content {
  opacity: 1;
  transform: translateY(0);
}

.team-label { text-align: center; }

.team-title {
  font-size: clamp(1.5rem, 3vw, 2.2rem);
  font-weight: 300;
  text-align: center;
  margin-top: -1rem;
  color: var(--text-dim);
}

.team-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
  width: 100%;
}

.team-card {
  background: var(--bg-card);
  border: 1px solid rgba(255, 255, 255, 0.04);
  border-radius: 12px;
  padding: 1.75rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 1rem;
  transition: transform 0.3s, border-color 0.3s;
}

.team-card:hover {
  transform: translateY(-3px);
  border-color: rgba(212, 168, 67, 0.15);
}

.team-card.featured {
  border-color: rgba(212, 168, 67, 0.12);
  background: linear-gradient(135deg, var(--bg-card) 0%, rgba(212, 168, 67, 0.04) 100%);
}

.team-photo {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  overflow: hidden;
  border: 2px solid rgba(212, 168, 67, 0.2);
  flex-shrink: 0;
}

.team-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(20%);
  transition: filter 0.3s;
}

.team-card:hover .team-photo img {
  filter: grayscale(0%);
}

.team-avatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: var(--bg-subtle);
  border: 1px solid rgba(255, 255, 255, 0.06);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.team-avatar span {
  font-family: var(--font-mono);
  font-size: 1.2rem;
  color: var(--text-muted);
  font-weight: 700;
}

.team-info h3 {
  font-size: 1rem;
  font-weight: 500;
}

.team-role {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--accent);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  display: block;
}

.team-org {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--text-muted);
  display: block;
  margin-top: 0.15rem;
}

.team-bio {
  font-size: 0.85rem;
  color: var(--text-dim);
  line-height: 1.5;
  margin-top: 0.25rem;
}

/* ===== 7. PARTNERS & IMPACT ===== */
#partners {
  flex-direction: column;
  padding: 4rem 2rem;
}

.partners-content {
  width: 100%;
  max-width: 1200px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3rem;
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.9s ease, transform 0.9s ease;
}

.section.in-view .partners-content {
  opacity: 1;
  transform: translateY(0);
}

.partners-top {
  text-align: center;
}

.partners-title {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 300;
  margin-top: -0.5rem;
}


.partners-grid {
  display: grid;
  grid-template-columns: repeat(9, minmax(0, 1fr));
  gap: 0.7rem;
  width: 100%;
  /* Flip to "grid" to show logos — content re-centers when hidden */
  display: none;
}

.partner-logo {
  background: var(--bg-card);
  border: 1px solid rgba(255, 255, 255, 0.04);
  border-radius: 8px;
  padding: 0.8rem;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 96px;
  transition: border-color 0.3s, transform 0.3s;
}

.partner-logo:hover {
  border-color: rgba(212, 168, 67, 0.15);
  transform: translateY(-2px);
}

.partner-logo span {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-dim);
}

.partner-logo img {
  width: 100%;
  max-width: 160px;
  max-height: 64px;
  object-fit: contain;
  display: block;
}

.partner-logo img.logo-ucla {
  width: 100%;
  max-width: 200px;
  max-height: 82px;
  transform: scale(1.35);
  transform-origin: center;
}

.partner-logo.partner-logo-ucla {
  padding-left: 0.35rem;
  padding-right: 0.35rem;
}

.partner-logo img.logo-iowa {
  max-width: 190px;
  max-height: 78px;
  transform: scale(1.25);
  transform-origin: center;
}

.partner-logo img.logo-vt {
  transform: translateX(-18px);
}

.partner-logo img.logo-cu-boulder {
  transform: translateX(18px);
}

.partner-logo small {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  color: var(--text-muted);
  letter-spacing: 0.05em;
}

/* Impact MLOs */
.impact-framework {
  width: 100%;
}

.mlo-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
}

.mlo {
  text-align: center;
  padding: 1.5rem;
}

.mlo-icon {
  font-size: 1.2rem;
  color: var(--accent);
  margin-bottom: 0.75rem;
}

.mlo h4 {
  font-size: 1rem;
  font-weight: 500;
  margin-bottom: 0.5rem;
}

.mlo p {
  font-size: 0.85rem;
  color: var(--text-dim);
  line-height: 1.5;
}

.partners-closing {
  text-align: center;
  max-width: 700px;
  border-top: 1px solid rgba(255, 255, 255, 0.04);
  padding-top: 2.5rem;
}

.partners-closing p {
  font-size: 1.15rem;
  color: var(--text-dim);
  line-height: 1.7;
  font-style: italic;
}

.cs-listen .sound-icon {
  width: 12px;
  height: 12px;
  flex: 0 0 12px;
}

.cs-listen > span:last-child {
  flex: 0 0 auto;
  min-width: 8.9rem;
  text-align: center;
}

/* ===== Footer ===== */
footer {
  padding: 3rem 2rem;
  text-align: center;
  border-top: 1px solid rgba(255, 255, 255, 0.03);
}

.footer-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.3rem;
}

.footer-brand {
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  color: var(--text-muted);
}

.footer-sub {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: var(--text-muted);
  letter-spacing: 0.1em;
}

.footer-copy {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  color: var(--text-muted);
  margin-top: 0.5rem;
}

/* ===== Sound Icons (shared) ===== */
.sound-icon {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--text-muted);
  transition: background 0.3s, box-shadow 0.3s;
  flex-shrink: 0;
}

.sound-trigger.playing .sound-icon,
.cs-listen.playing .sound-icon {
  background: currentColor;
  box-shadow: 0 0 10px currentColor;
  animation: pulse 1.5s ease-in-out infinite;
}

.cs-listen .sound-icon {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.cs-listen.playing .sound-icon {
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  animation: none;
}

.cs-listen.playing .sound-icon::before,
.cs-listen.playing .sound-icon::after {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  width: 3px;
  border-radius: 2px;
  background: currentColor;
  box-shadow: 0 0 8px currentColor;
}

.cs-listen.playing .sound-icon::before {
  left: 1px;
}

.cs-listen.playing .sound-icon::after {
  right: 1px;
}

/* ===== Dot Navigation ===== */
.dot-nav {
  position: fixed;
  right: 1.5rem;
  top: 50%;
  transform: translateY(-50%);
  z-index: 100;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.dot-nav button {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 1px solid var(--text-muted);
  background: transparent;
  cursor: pointer;
  padding: 0;
  transition: background 0.3s, border-color 0.3s, transform 0.3s;
  position: relative;
}

.dot-nav button:hover {
  border-color: var(--text-dim);
  transform: scale(1.4);
}

.dot-nav button.active {
  background: var(--accent-soft);
  border-color: var(--accent-soft);
  box-shadow: 0 0 6px var(--accent-glow);
}

.dot-nav button .dot-tooltip {
  position: absolute;
  right: 20px;
  top: 50%;
  transform: translateY(-50%);
  background: var(--bg-card);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--text-dim);
  font-family: var(--font-mono);
  font-size: 0.6rem;
  letter-spacing: 0.05em;
  padding: 0.3rem 0.6rem;
  border-radius: 4px;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
}

.dot-nav button:hover .dot-tooltip {
  opacity: 1;
}

/* ===== Scrollbar ===== */
::-webkit-scrollbar {
  width: 0;
  display: none;
}

/* ===== Selection ===== */
::selection {
  background: rgba(212, 168, 67, 0.3);
  color: var(--text);
}

/* ===== CONTACT ===== */
#contact {
  padding: 4rem 2rem;
  flex-direction: column;
}

.contact-content {
  width: 100%;
  max-width: 900px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2rem;
  margin-top: -1vh;
  pointer-events: none;
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.9s ease, transform 0.9s ease;
}

.section.in-view .contact-content {
  opacity: 1;
  transform: translateY(0);
}

.contact-title {
  font-size: clamp(1.5rem, 3vw, 2.2rem);
  font-weight: 300;
  text-align: center;
  margin-top: -1rem;
  color: var(--text-dim);
}

.contact-body {
  text-align: center;
  color: var(--text-dim);
  line-height: 1.7;
  max-width: 800px;
}

.contact-accent-word {
  color: var(--accent) !important;
  font-style: normal;
}

.contact-offerings {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
  width: 100%;
  margin-top: 1rem;
}

.contact-card {
  background: rgba(18, 18, 26, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  padding: 1.5rem;
  pointer-events: auto;
}

.contact-card h3 {
  font-size: 0.95rem;
  font-weight: 500;
  margin-bottom: 0.6rem;
  color: var(--text);
}

.contact-card p {
  font-size: 0.85rem;
  color: var(--text-dim);
  line-height: 1.6;
}

.contact-cta {
  text-align: center;
  margin-top: 2rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.2rem;
}

.contact-reach {
  color: var(--text-dim);
  font-size: 0.95rem;
}

.contact-btn {
  display: inline-block;
  padding: 0.8rem 2.4rem;
  border: 1px solid rgba(212, 168, 67, 0.34);
  border-radius: 100px;
  color: rgba(212, 168, 67, 0.78);
  background: rgba(212, 168, 67, 0.08);
  text-decoration: none;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  letter-spacing: 0.06em;
  box-shadow: none;
  transition: background 0.24s ease, color 0.24s ease, border-color 0.24s ease, opacity 0.24s ease;
  pointer-events: auto;
}

.contact-btn:hover {
  background: rgba(212, 168, 67, 0.11);
  color: rgba(212, 168, 67, 0.84);
  border-color: rgba(212, 168, 67, 0.42);
  box-shadow: none;
  opacity: 1;
}

/* ===== Mobile Overlay ===== */
#mobile-overlay {
  display: none;
}

/* Mobile lockout — detected once at page load via .is-mobile class on <html>.
   Desktop users who resize their window will never trigger this. */
html.is-mobile {
  overflow: hidden !important;
  scroll-snap-type: none !important;
  height: 100vh !important;
}
html.is-mobile body {
  overflow: hidden !important;
  height: 100vh !important;
}

/* Hide everything except hero */
.is-mobile #vision, .is-mobile #education, .is-mobile #citizen-science,
.is-mobile #stem-music, .is-mobile #team, .is-mobile #contact,
.is-mobile .dot-nav, .is-mobile .scroll-hint {
  display: none !important;
}

/* Hero fills viewport */
.is-mobile #hero {
  height: 100vh !important;
  min-height: 100vh !important;
}

/* Hide the listen button and hero text content */
.is-mobile .hero-tagline,
.is-mobile .hero-expansion,
.is-mobile .hero-audio-meta,
.is-mobile .scroll-hint {
  display: none !important;
}

/* Show mobile overlay — positioned below hero title */
.is-mobile #mobile-overlay {
  display: flex;
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  top: 0;
  z-index: 2;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  padding-top: 14vh;
}

.is-mobile .mobile-overlay-content {
  text-align: center;
  padding: 2rem;
  max-width: 320px;
}

.is-mobile .mobile-overlay-text {
  font-family: var(--font-sans);
  font-size: 1.1rem;
  font-weight: 400;
  color: rgba(232, 230, 227, 0.72);
  line-height: 1.6;
  letter-spacing: 0.02em;
  margin-bottom: 1rem;
}

.is-mobile .mobile-overlay-sub {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(212, 168, 67, 0.42);
  line-height: 1.5;
}

/* Keep SONARA title centered higher */
.is-mobile .hero-inner {
  justify-content: center;
  padding-bottom: 12vh;
}

/* ===== Responsive ===== */
@media (max-width: 1024px) {
  .instruments-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  .team-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 768px) {
  .section {
    height: auto;
    min-height: 100vh;
  }

  .cs-content {
    grid-template-columns: 1fr;
    gap: 2rem;
    padding: 3rem 1.5rem;
  }

  .instruments-grid {
    grid-template-columns: 1fr;
    max-width: 400px;
    margin: 0 auto;
  }

  .music-evidence {
    flex-direction: column;
    gap: 1.5rem;
    align-items: center;
  }

  .team-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
  }

  .mlo-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .edu-details {
    flex-direction: column;
    align-items: center;
    gap: 1rem;
  }

  .curiosity-cascade {
    flex-direction: column;
    gap: 0.75rem;
  }

  .cascade-arrow {
    transform: rotate(90deg);
    justify-content: center;
  }

  .dot-nav {
    right: 0.75rem;
    gap: 0.6rem;
  }

  .dot-nav button {
    width: 11px;
    height: 11px;
  }

  .dot-nav button .dot-tooltip {
    display: none;
  }

  .vision-content,
  .edu-content,
  .partners-content {
    padding: 3rem 1.5rem;
  }
}

@media (max-width: 480px) {
  .hero-title {
    font-size: 3.5rem;
  }

  .team-grid {
    grid-template-columns: 1fr;
  }

  .mlo-grid {
    grid-template-columns: 1fr;
  }
}

#team { display: none; }
