/* ==========================================
   Q-SUCCEED-NORTH — homepage styles
   Shares the CNY navy/orange family, adds a cyan accent.
   ========================================== */

:root {
  --navy-950: #030617;
  --navy-900: #040820;
  --navy-800: #070d2e;
  --navy-700: #0a1152;
  --orange: #e36515;
  --orange-hi: #ff8a3d;
  --cyan: #3fd8ff;
  --cyan-soft: rgba(63, 216, 255, 0.28);
  --orange-soft: rgba(227, 101, 21, 0.35);
  --text: #eaf0ff;
  --muted: #bcc7ea;
  --glass: rgba(10, 18, 58, 0.58);
  --glass-strong: rgba(8, 14, 46, 0.78);
  --radius: 14px;
  --header-h: 72px;
  --font-display: 'Orbitron', 'Space Grotesk', system-ui, sans-serif;
  --font-ui: 'Space Grotesk', 'Inter', system-ui, sans-serif;
  --font-game: 'Press Start 2P', 'Courier New', monospace;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

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

html {
  overflow-x: hidden;
  overflow-x: clip;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  position: relative;
  min-height: 100vh;
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.7;
  color: var(--text);
  background-color: var(--navy-900);
  background-image:
    radial-gradient(1200px 700px at 12% -8%, rgba(63, 216, 255, 0.12), transparent 60%),
    radial-gradient(1000px 640px at 92% 6%, rgba(227, 101, 21, 0.12), transparent 60%),
    linear-gradient(180deg, var(--navy-900) 0%, var(--navy-700) 55%, var(--navy-950) 100%);
  background-attachment: fixed;
  overflow-x: hidden;
  overflow-x: clip;
}

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

a {
  color: inherit;
}

:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 3px;
  border-radius: 4px;
}

.skip-link {
  position: absolute;
  left: 16px;
  top: -60px;
  z-index: 2000;
  padding: 10px 16px;
  background: var(--cyan);
  color: var(--navy-900);
  font-weight: 600;
  border-radius: 8px;
  text-decoration: none;
}

.skip-link:focus {
  top: 12px;
}

/* ==========================================
   BACKGROUND LAYERS
   ========================================== */
#lattice {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
  opacity: 0.85;
}

/* Die-grid / blueprint pattern below the hero */
.bg-grid {
  position: absolute;
  top: 90vh;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(63, 216, 255, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(63, 216, 255, 0.06) 1px, transparent 1px),
    linear-gradient(rgba(63, 216, 255, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(63, 216, 255, 0.025) 1px, transparent 1px);
  background-size: 120px 96px, 120px 96px, 24px 24px, 24px 24px;
  background-position: center top;
  -webkit-mask-image: linear-gradient(to bottom, transparent 0, #000 240px);
  mask-image: linear-gradient(to bottom, transparent 0, #000 240px);
}

/* Section watermarks (chip outline + Bloch sphere) */
.wm {
  position: absolute;
  z-index: -1;
  fill: none;
  stroke: var(--cyan);
  stroke-width: 1.2;
  opacity: 0.09;
  pointer-events: none;
  animation: wm-float 14s ease-in-out infinite;
}

.wm .fill,
.wm use {
  fill: none;
}

.wm-bloch {
  stroke: var(--orange-hi);
}

.wm-intro { width: 220px; height: 220px; right: -40px; top: -50px; }
.wm-images { width: 180px; height: 180px; left: -50px; bottom: -40px; animation-delay: -4s; }
.wm-team { width: 260px; height: 260px; right: -70px; top: 0; animation-delay: -8s; }
.wm-affiliated { width: 160px; height: 160px; left: 4%; top: -30px; animation-delay: -2s; }

@keyframes wm-float {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-14px) rotate(6deg); }
}

/* ==========================================
   HEADER
   ========================================== */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 clamp(16px, 4vw, 48px);
  background: rgba(4, 8, 32, 0.6);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  backdrop-filter: blur(14px) saturate(140%);
  border-bottom: 1px solid rgba(63, 216, 255, 0.14);
  transition: background 0.3s ease, box-shadow 0.3s ease;
}

.header::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--cyan), var(--orange), transparent);
  opacity: 0.6;
}

.header.scrolled {
  background: rgba(4, 8, 32, 0.85);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.35), 0 0 24px rgba(63, 216, 255, 0.08);
}

.logo {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(1rem, 2.2vw, 1.3rem);
  letter-spacing: 0.06em;
  color: var(--text);
  text-decoration: none;
  white-space: nowrap;
}

.logo span {
  color: var(--cyan);
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: clamp(14px, 2.2vw, 30px);
}

.desktop-nav a {
  position: relative;
  font-family: var(--font-ui);
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: 0.04em;
  color: var(--text);
  text-decoration: none;
  padding: 6px 0;
}

.desktop-nav a::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, var(--cyan), var(--orange));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s ease;
}

.desktop-nav a:hover::after,
.desktop-nav a:focus-visible::after {
  transform: scaleX(1);
}

.desktop-nav .nav-cta {
  padding: 8px 18px;
  border: 1px solid var(--orange);
  border-radius: 999px;
  background: rgba(227, 101, 21, 0.14);
  transition: background 0.3s ease, box-shadow 0.3s ease;
}

.desktop-nav .nav-cta::after {
  display: none;
}

.desktop-nav .nav-cta:hover {
  background: rgba(227, 101, 21, 0.3);
  box-shadow: 0 0 18px rgba(227, 101, 21, 0.45);
}

.hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  padding: 10px;
  background: rgba(63, 216, 255, 0.08);
  border: 1px solid var(--cyan-soft);
  border-radius: 10px;
  cursor: pointer;
}

.hamburger span {
  display: block;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
}

/* ==========================================
   MOBILE MENU
   ========================================== */
.mobile-menu {
  position: fixed;
  inset: 0;
  z-index: 1500;
  overflow: hidden;
  background: rgba(2, 4, 16, 0.6);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.mobile-menu.active {
  opacity: 1;
  visibility: visible;
}

.mobile-menu-panel {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(320px, 86vw);
  padding: 80px 28px 28px;
  background: var(--glass-strong);
  -webkit-backdrop-filter: blur(18px);
  backdrop-filter: blur(18px);
  border-left: 1px solid var(--cyan-soft);
  box-shadow: -10px 0 40px rgba(0, 0, 0, 0.4);
  transform: translateX(100%);
  transition: transform 0.35s ease;
  overflow-y: auto;
}

.mobile-menu.active .mobile-menu-panel {
  transform: translateX(0);
}

.mobile-menu-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 44px;
  height: 44px;
  font-size: 1.8rem;
  line-height: 1;
  color: var(--text);
  background: none;
  border: 1px solid var(--cyan-soft);
  border-radius: 10px;
  cursor: pointer;
}

.mobile-menu nav {
  display: flex;
  flex-direction: column;
}

.mobile-menu nav a {
  font-family: var(--font-ui);
  font-weight: 600;
  font-size: 1.15rem;
  color: var(--text);
  text-decoration: none;
  padding: 14px 4px;
  border-bottom: 1px solid rgba(63, 216, 255, 0.12);
}

.mobile-menu nav a:hover,
.mobile-menu nav a:focus-visible {
  color: var(--cyan);
}

/* ==========================================
   HERO
   ========================================== */
.hero {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  min-height: 100svh;
  display: grid;
  place-items: center;
  padding: calc(var(--header-h) + 32px) 16px 96px;
  overflow: hidden;
  isolation: isolate;
}

/* Soft dark vignette behind the text for readability (under the wafer, over the traces) */
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background: radial-gradient(ellipse 60% 45% at 50% 50%, rgba(4, 8, 32, 0.75), transparent 75%);
  pointer-events: none;
}

.wafer {
  position: absolute;
  top: 50%;
  left: 50%;
  width: min(1100px, 140vw);
  aspect-ratio: 1;
  margin-left: calc(min(1100px, 140vw) / -2);
  margin-top: calc(min(1100px, 140vw) / -2);
  z-index: 0;
  color: #a8ecff;
  opacity: 0.09;
  pointer-events: none;
  animation: wafer-spin 80s linear infinite;
}

/* a few dies light up in turn, like chips on a probe station */
.die-lit {
  opacity: 0.25;
  animation: die-pulse 5s ease-in-out var(--d, 0s) infinite;
}

.die-lit--o { fill: #ff8a3d; }
.die-lit--c { fill: #7fe9ff; }

@keyframes die-pulse {
  0%, 100% { opacity: 0.05; }
  45%, 55% { opacity: 0.4; }
}

.wafer svg {
  width: 100%;
  height: 100%;
}

@keyframes wafer-spin {
  to { transform: rotate(360deg); }
}

.circuits {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: -2;
  pointer-events: none;
}

.circuits .traces path {
  fill: none;
  stroke: rgba(63, 216, 255, 0.22);
  stroke-width: 1.5;
}

.circuits .vias circle {
  fill: var(--navy-900);
  stroke: rgba(63, 216, 255, 0.45);
  stroke-width: 1.5;
}

.circuits .signals path {
  fill: none;
  stroke: var(--cyan);
  stroke-width: 2.4;
  stroke-linecap: round;
  stroke-dasharray: 36 964;
  stroke-dashoffset: 1000;
  animation: signal var(--d, 8s) linear var(--delay, 0s) infinite;
}

.circuits .signals path.alt {
  stroke: var(--orange-hi);
}

@keyframes signal {
  to { stroke-dashoffset: 0; }
}

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

.hero-eyebrow {
  display: inline-block;
  margin-bottom: 22px;
  padding: 6px 14px;
  font-family: var(--font-ui);
  font-weight: 600;
  font-size: 0.8rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--cyan);
  background: rgba(63, 216, 255, 0.08);
  border: 1px solid var(--cyan-soft);
  border-radius: 999px;
}

.title-frame {
  position: relative;
  display: inline-block;
  max-width: 100%;
  padding: 0.35em 0.7em;
  margin-bottom: 30px;
}

.hero-title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(1.45rem, 5.6vw, 4.4rem);
  line-height: 1.1;
  letter-spacing: 0.05em;
  color: #fff;
  text-shadow:
    0 0 18px rgba(63, 216, 255, 0.45),
    0 0 42px rgba(63, 216, 255, 0.2),
    0 2px 0 rgba(227, 101, 21, 0.5);
  overflow-wrap: anywhere;
}

/* Animated corner brackets */
.bracket {
  position: absolute;
  width: clamp(16px, 2.4vw, 30px);
  height: clamp(16px, 2.4vw, 30px);
  border: 0 solid var(--cyan);
  filter: drop-shadow(0 0 6px rgba(63, 216, 255, 0.7));
  animation:
    bracket-in 0.9s cubic-bezier(.2, .8, .2, 1) both,
    bracket-pulse 3.2s ease-in-out 0.9s infinite;
}

.bracket.tl { top: 0; left: 0; border-top-width: 2px; border-left-width: 2px; --dx: -6px; --dy: -6px; }
.bracket.tr { top: 0; right: 0; border-top-width: 2px; border-right-width: 2px; --dx: 6px; --dy: -6px; border-color: var(--orange-hi); filter: drop-shadow(0 0 6px rgba(227, 101, 21, 0.7)); }
.bracket.bl { bottom: 0; left: 0; border-bottom-width: 2px; border-left-width: 2px; --dx: -6px; --dy: 6px; border-color: var(--orange-hi); filter: drop-shadow(0 0 6px rgba(227, 101, 21, 0.7)); }
.bracket.br { bottom: 0; right: 0; border-bottom-width: 2px; border-right-width: 2px; --dx: 6px; --dy: 6px; }

@keyframes bracket-in {
  from { opacity: 0; transform: translate(calc(var(--dx) * 6), calc(var(--dy) * 6)); }
  to { opacity: 1; transform: translate(0, 0); }
}

@keyframes bracket-pulse {
  0%, 100% { transform: translate(0, 0); }
  50% { transform: translate(var(--dx), var(--dy)); }
}

/* Subtitle box with scanlines + shimmer */
.hero-subtitle-box {
  position: relative;
  max-width: 820px;
  margin: 0 auto;
  padding: clamp(18px, 3vw, 28px) clamp(18px, 4vw, 40px);
  background: var(--glass-strong);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border: 1px solid var(--cyan-soft);
  border-radius: var(--radius);
  box-shadow: 0 0 0 1px rgba(227, 101, 21, 0.12) inset, 0 20px 50px rgba(0, 0, 0, 0.35), 0 0 40px rgba(63, 216, 255, 0.08);
  overflow: hidden;
}

.hero-subtitle-box::before {
  content: '';
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.035) 0 1px, transparent 1px 3px);
  pointer-events: none;
}

.hero-subtitle-box::after {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  left: -40%;
  width: 40%;
  background: linear-gradient(100deg, transparent, rgba(63, 216, 255, 0.12), rgba(255, 255, 255, 0.08), transparent);
  animation: shimmer 6s ease-in-out 1.2s infinite;
  pointer-events: none;
}

@keyframes shimmer {
  0% { transform: translateX(0); }
  60%, 100% { transform: translateX(350%); }
}

.hero-subtitle {
  position: relative;
  z-index: 1;
  font-family: var(--font-ui);
  font-weight: 500;
  font-size: clamp(1rem, 2.1vw, 1.35rem);
  line-height: 1.55;
  color: var(--text);
}

.scroll-indicator {
  position: absolute;
  left: 50%;
  bottom: 28px;
  z-index: 1;
  width: 26px;
  height: 42px;
  margin-left: -13px;
  border: 2px solid var(--cyan-soft);
  border-radius: 14px;
}

.scroll-indicator span {
  position: absolute;
  left: 50%;
  top: 8px;
  width: 4px;
  height: 8px;
  margin-left: -2px;
  background: var(--cyan);
  border-radius: 2px;
  animation: scroll-dot 1.8s ease-in-out infinite;
}

@keyframes scroll-dot {
  0% { opacity: 0; transform: translateY(0); }
  40% { opacity: 1; }
  100% { opacity: 0; transform: translateY(14px); }
}

/* ==========================================
   SECTIONS + GLASS CARDS
   ========================================== */
main {
  position: relative;
  z-index: 1;
  overflow-x: hidden;
  overflow-x: clip; /* keeps edge watermarks from widening the page */
}

.section {
  position: relative;
  z-index: 0;
  max-width: 1200px;
  margin: 0 auto;
  padding: clamp(48px, 7vw, 88px) clamp(16px, 4vw, 40px);
  scroll-margin-top: var(--header-h);
}

.glass-card {
  position: relative;
  background: var(--glass);
  -webkit-backdrop-filter: blur(16px) saturate(130%);
  backdrop-filter: blur(16px) saturate(130%);
  border: 1px solid var(--cyan-soft);
  border-radius: var(--radius);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.3);
  transition: border-color 0.35s ease, box-shadow 0.35s ease, transform 0.35s ease;
}

.glass-card:hover {
  border-color: var(--orange-soft);
  box-shadow:
    0 18px 50px rgba(0, 0, 0, 0.35),
    0 0 0 1px rgba(227, 101, 21, 0.2),
    0 0 32px rgba(63, 216, 255, 0.18),
    0 0 60px rgba(227, 101, 21, 0.12);
}

.section-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.5rem, 3.4vw, 2.3rem);
  letter-spacing: 0.06em;
  text-align: center;
  margin-bottom: clamp(28px, 4vw, 48px);
}

.section-title::after {
  content: '';
  display: block;
  width: 96px;
  height: 2px;
  margin: 16px auto 0;
  background: linear-gradient(90deg, var(--cyan), var(--orange));
  box-shadow: 0 0 12px rgba(63, 216, 255, 0.6);
}

/* Intro */
.intro-card {
  padding: clamp(24px, 4.5vw, 52px);
}

.hud-corner {
  position: absolute;
  width: 22px;
  height: 22px;
  border: 0 solid var(--cyan);
}

.hud-corner.tl { top: 10px; left: 10px; border-top-width: 2px; border-left-width: 2px; }
.hud-corner.br { bottom: 10px; right: 10px; border-bottom-width: 2px; border-right-width: 2px; border-color: var(--orange-hi); }

.intro-heading-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 22px;
}

.intro-heading-row h2 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.25rem, 2.8vw, 2rem);
  line-height: 1.3;
  letter-spacing: 0.03em;
}

.nsf-logo-inline {
  flex-shrink: 0;
  width: clamp(52px, 7vw, 72px);
  height: auto;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 0 2px rgba(63, 216, 255, 0.4), 0 0 20px rgba(63, 216, 255, 0.25);
}

.intro-card p {
  color: var(--muted);
  font-size: 1.05rem;
}

.intro-card p + p {
  margin-top: 16px;
}

.intro-card .lead {
  color: var(--text);
  font-size: clamp(1.05rem, 1.6vw, 1.2rem);
}

/* Beam Rush: arcade laser game on a real-looking optical breadboard.
   Layout is a 1600 x 900 unit space; JS places static parts in % of it
   and draws targets, blocks, beam and sparks on the canvas. */
.lab-section {
  padding-top: 0;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.lab {
  max-width: 1100px;
  margin: 0 auto;
}

.bench {
  position: relative;
  aspect-ratio: 16 / 9;
  border-radius: 14px;
  overflow: hidden;
  background: #17181c url('images/game/board.jpg') 0 0 / 25% auto repeat;
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 26px 60px rgba(0, 0, 0, 0.55), 0 0 40px rgba(63, 216, 255, 0.08);
  user-select: none;
  -webkit-user-select: none;
  touch-action: pan-y;
  outline: none;
}

.bench.is-playing {
  touch-action: none;
  cursor: crosshair;
}

/* soft studio vignette */
.bench::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 4;
  background: radial-gradient(ellipse 75% 70% at 50% 45%, transparent 55%, rgba(0, 0, 0, 0.55));
  pointer-events: none;
}

.bench.is-shaking {
  animation: bench-shake 0.14s linear;
}

@keyframes bench-shake {
  25% { transform: translate(3px, -2px); }
  50% { transform: translate(-3px, 2px); }
  75% { transform: translate(2px, 1px); }
}

.bench-item {
  position: absolute;
  z-index: 2;
  display: block;
  filter: drop-shadow(0 10px 12px rgba(0, 0, 0, 0.65));
  pointer-events: none;
}

.bench-item img,
img.bench-item {
  display: block;
  width: 100%;
  height: auto;
}

.mirror-art img {
  /* pivot on the centre of the silver mirror strip */
  transform-origin: 48.8% 44.9%;
  transform: rotate(var(--angle, -45deg));
}

.flip-ctl {
  z-index: 3;
  padding: 0;
  border: 0;
  background: none;
  border-radius: 50%;
  cursor: pointer;
  pointer-events: auto;
}

.flip-ctl img {
  transition: transform 0.15s ease;
}

.flip-ctl::after {
  content: '';
  position: absolute;
  left: 48.8%;
  top: 44.9%;
  width: 72%;
  aspect-ratio: 1;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  border: 1px dashed rgba(255, 170, 60, 0.75);
  opacity: 0;
  transition: opacity 0.2s ease;
}

.bench.is-playing .flip-ctl::after,
.flip-ctl:hover::after,
.flip-ctl:focus-visible::after {
  opacity: 1;
}

.flip-ctl:focus-visible {
  outline: none;
}

.bench-beam {
  position: absolute;
  inset: 0;
  z-index: 3;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.rush-hud {
  position: absolute;
  left: 2%;
  right: 2%;
  top: 3%;
  z-index: 6;
  display: flex;
  align-items: center;
  gap: 2%;
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

.bench.is-playing .rush-hud {
  opacity: 1;
}

.rush-time {
  flex: 1;
  height: clamp(5px, 0.8vw, 9px);
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.12);
  overflow: hidden;
}

.rush-time span {
  display: block;
  height: 100%;
  width: calc(var(--t, 1) * 100%);
  background: linear-gradient(90deg, var(--orange), #ff3b2f);
  box-shadow: 0 0 12px rgba(255, 60, 40, 0.7);
}

.rush-time.is-low span {
  animation: time-blink 0.4s steps(2, jump-none) infinite;
}

@keyframes time-blink {
  0% { opacity: 1; }
  100% { opacity: 0.35; }
}

.rush-stats {
  display: flex;
  align-items: baseline;
  gap: clamp(8px, 1.4vw, 16px);
  padding: 0.4em 0.9em;
  background: rgba(8, 10, 22, 0.75);
  border: 1px solid rgba(63, 216, 255, 0.25);
  border-radius: 10px;
}

.rush-score {
  min-width: 4ch;
  text-align: right;
  font: 400 clamp(0.65rem, 1.5vw, 1.15rem) / 1 var(--font-game);
  color: #fff;
}

.rush-score.pop {
  animation: combo-pop 0.25s ease;
}

.rush-score.neg {
  color: #ff6a5a;
}

.rush-switch {
  padding: 0.7em 1em;
  font: 400 clamp(0.45rem, 0.85vw, 0.65rem) / 1 var(--font-game);
  color: #fff;
  background: rgba(8, 10, 22, 0.75);
  border: 1px solid rgba(255, 170, 60, 0.6);
  border-radius: 999px;
  cursor: pointer;
  pointer-events: auto;
}

.rush-key {
  color: var(--orange-hi);
}

@keyframes combo-pop {
  0% { transform: scale(1); }
  40% { transform: scale(1.45); }
  100% { transform: scale(1); }
}

/* Title / results screen over the live demo */
.rush-overlay {
  position: absolute;
  inset: 0;
  z-index: 7;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: clamp(6px, 1.2vw, 14px);
  padding: 4%;
  text-align: center;
  background: radial-gradient(ellipse at center, rgba(4, 8, 32, 0.78), rgba(4, 8, 32, 0.45) 70%);
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.bench.is-playing .rush-overlay {
  opacity: 0;
  visibility: hidden;
}

.rush-title {
  font: 400 clamp(1.1rem, 3.8vw, 2.8rem) / 1.2 var(--font-game);
  letter-spacing: 0.04em;
  color: #fff;
  text-shadow: 0 0 22px rgba(255, 60, 40, 0.6), 0 0 44px rgba(255, 60, 40, 0.25);
}

.rush-result {
  font: 400 clamp(0.6rem, 1.6vw, 1.1rem) / 1.4 var(--font-game);
  color: var(--orange-hi);
}

.rush-result:empty {
  display: none;
}

.rush-play {
  padding: clamp(8px, 1.1vw, 13px) clamp(26px, 3.6vw, 44px);
  font: 400 clamp(0.6rem, 1.2vw, 0.9rem) / 1 var(--font-game);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #fff;
  background: linear-gradient(135deg, #ff3b2f, var(--orange));
  border: 0;
  border-radius: 999px;
  box-shadow: 0 0 24px rgba(255, 60, 40, 0.55);
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.2s ease;
}

.rush-play:hover {
  transform: scale(1.06);
  box-shadow: 0 0 34px rgba(255, 60, 40, 0.8);
}

/* Learn more + lab photos */
.labs-more {
  padding-top: 0;
}

.labs-more-head {
  max-width: 720px;
  margin: 0 auto clamp(24px, 4vw, 40px);
  text-align: center;
}

.labs-more-head h2 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.25rem, 2.8vw, 1.9rem);
  line-height: 1.3;
  letter-spacing: 0.03em;
  margin-bottom: 12px;
}

.labs-more-head p {
  color: var(--muted);
  margin-bottom: 20px;
}

.labs-more-btn {
  display: inline-block;
  padding: 12px 28px;
  font-family: var(--font-ui);
  font-weight: 600;
  color: #fff;
  text-decoration: none;
  background: linear-gradient(var(--navy-800), var(--navy-800)) padding-box, linear-gradient(90deg, var(--orange), var(--cyan)) border-box;
  border: 1.5px solid transparent;
  border-radius: 999px;
  transition: box-shadow 0.3s ease, transform 0.3s ease;
}

.labs-more-btn:hover,
.labs-more-btn:focus-visible {
  box-shadow: 0 0 24px rgba(63, 216, 255, 0.35), 0 0 40px rgba(227, 101, 21, 0.25);
  transform: translateY(-2px);
}

.lab-photos {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-auto-rows: clamp(120px, 17vw, 220px);
  gap: clamp(8px, 1.4vw, 16px);
}

/* tall feature photo on the left, wide banner photo along the bottom */
.lab-photo:nth-child(1) { grid-row: span 2; }
.lab-photo:nth-child(6) { grid-column: span 3; }

.lab-photo {
  position: relative;
  margin: 0;
  overflow: hidden;
  border-radius: 12px;
  border: 1px solid var(--cyan-soft);
  background: var(--navy-800);
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.35);
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.lab-photo::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 60%, rgba(4, 8, 32, 0.5));
  pointer-events: none;
}

.lab-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s ease;
}

/* keep the optics in frame on the portrait shots */
.lab-photo:nth-child(1) img { object-position: center 70%; }
.lab-photo:nth-child(3) img { object-position: center 85%; }

.lab-photo:hover {
  border-color: var(--orange-soft);
  box-shadow: 0 20px 44px rgba(0, 0, 0, 0.4), 0 0 26px rgba(63, 216, 255, 0.2);
}

.lab-photo:hover img {
  transform: scale(1.05);
}

@media (max-width: 768px) {
  .lab-photos {
    grid-template-columns: repeat(2, 1fr);
    grid-auto-rows: 130px;
  }

  .lab-photo:nth-child(1) { grid-column: span 2; grid-row: span 2; }
  .lab-photo:nth-child(6) { grid-column: span 2; }
}

/* Chip-to-qubit band */
.nexus {
  position: relative;
  z-index: 0;
  padding: clamp(16px, 3vw, 40px) 0 clamp(40px, 6vw, 72px);
  overflow: hidden;
}

/* "Learn about:" eases in (soft blur, letters settle together) as the band scrolls into view */
.nexus-intro {
  position: relative;
  z-index: 1;
  margin-bottom: clamp(-28px, -2vw, -10px);
  text-align: center;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.2rem, 2.8vw, 2rem);
  letter-spacing: 0.12em;
  color: var(--text);
  text-shadow: 0 0 18px rgba(63, 216, 255, 0.45);
  transition: opacity 1.1s ease, filter 1.1s ease, letter-spacing 1.4s cubic-bezier(.2, .8, .2, 1), transform 1.1s ease;
}

.js .nexus:not(.intro-in) .nexus-intro {
  opacity: 0;
  filter: blur(8px);
  letter-spacing: 0.5em;
  transform: translateY(12px);
}

.nexus-frame {
  position: relative;
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  aspect-ratio: 1672 / 941;
  -webkit-mask-image:
    linear-gradient(to bottom, transparent 0, #000 16%, #000 84%, transparent 100%),
    linear-gradient(to right, transparent 0, #000 12%, #000 88%, transparent 100%);
  -webkit-mask-composite: source-in;
  mask-image:
    linear-gradient(to bottom, transparent 0, #000 16%, #000 84%, transparent 100%),
    linear-gradient(to right, transparent 0, #000 12%, #000 88%, transparent 100%);
  mask-composite: intersect;
}

/* Image + reticles move together so the targets stay on the chip / wave / cryostat */
.nexus-layer {
  position: absolute;
  inset: 0;
  transform: translate3d(0, var(--nexus-y, 0px), 0) scale(1.08);
  will-change: transform;
}

/* Only the photo is dimmed; the reticles stay crisp on top */
.nexus-layer img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: var(--nexus-op, 0.3);
  filter: saturate(0.75) brightness(0.85);
}

.nexus-hud {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.reticle {
  --c: var(--cyan);
  position: absolute;
  left: var(--x);
  top: var(--y);
  width: clamp(40px, 6vw, 84px);
  aspect-ratio: 1;
  transform: translate(-50%, -50%);
  background:
    linear-gradient(var(--c), var(--c)) top left / 30% 2px no-repeat,
    linear-gradient(var(--c), var(--c)) top left / 2px 30% no-repeat,
    linear-gradient(var(--c), var(--c)) top right / 30% 2px no-repeat,
    linear-gradient(var(--c), var(--c)) top right / 2px 30% no-repeat,
    linear-gradient(var(--c), var(--c)) bottom left / 30% 2px no-repeat,
    linear-gradient(var(--c), var(--c)) bottom left / 2px 30% no-repeat,
    linear-gradient(var(--c), var(--c)) bottom right / 30% 2px no-repeat,
    linear-gradient(var(--c), var(--c)) bottom right / 2px 30% no-repeat;
  filter: drop-shadow(0 0 6px rgba(63, 216, 255, 0.8));
  transition:
    transform 0.7s cubic-bezier(.2, .8, .2, 1) calc(var(--i) * 0.3s + 0.2s),
    opacity 0.5s ease calc(var(--i) * 0.3s + 0.2s);
}

/* Centre dot */
.reticle::before {
  content: '';
  position: absolute;
  left: 50%;
  top: 50%;
  width: 6px;
  height: 6px;
  margin: -3px 0 0 -3px;
  border-radius: 50%;
  background: var(--orange-hi);
  box-shadow: 0 0 10px var(--orange);
  animation: reticle-blink 1.4s steps(2, jump-none) infinite;
}

/* Lock-on ping */
.reticle::after {
  content: '';
  position: absolute;
  inset: 0;
  border: 1px solid rgba(63, 216, 255, 0.7);
  opacity: 0;
}

.nexus.in-view .reticle::after {
  animation: reticle-ping 2.6s ease-out calc(var(--i) * 0.3s + 1s) infinite;
}

.reticle-ring {
  position: absolute;
  inset: 18%;
  border: 1px dashed rgba(63, 216, 255, 0.75);
  border-radius: 50%;
  animation: wafer-spin 6s linear infinite;
}

.reticle-tag {
  position: absolute;
  top: 0;
  left: 100%;
  margin-left: 8px;
  padding: 3px 8px;
  font-family: var(--font-ui);
  font-weight: 600;
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  white-space: nowrap;
  color: var(--cyan);
  background: rgba(4, 8, 32, 0.85);
  border: 1px solid var(--cyan-soft);
  border-radius: 4px;
  transform: translateY(-50%);
  transition: clip-path 0.6s steps(14, end) calc(var(--i) * 0.3s + 0.7s), opacity 0.2s ease calc(var(--i) * 0.3s + 0.7s);
}

.reticle--left .reticle-tag {
  left: auto;
  right: 100%;
  margin: 0 8px 0 0;
}

/* Hidden until the band scrolls into view, then the reticles "lock on" */
.js .nexus:not(.in-view) .reticle {
  opacity: 0;
  transform: translate(-50%, -50%) scale(1.8);
}

.js .nexus:not(.in-view) .reticle-tag {
  opacity: 0;
  clip-path: inset(0 100% 0 0);
}

@keyframes reticle-blink {
  0% { opacity: 1; }
  100% { opacity: 0.25; }
}

@keyframes reticle-ping {
  0% { opacity: 0.8; transform: scale(1); }
  70%, 100% { opacity: 0; transform: scale(1.7); }
}

/* Team */
.team-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 420px));
  justify-content: center;
  gap: clamp(16px, 2.4vw, 26px);
}

.team-card {
  padding: 30px 24px 26px;
  overflow: hidden;
}

.team-card:hover {
  transform: translateY(-4px);
}

.team-bar {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--orange), var(--orange-hi), var(--cyan));
  box-shadow: 0 0 14px rgba(227, 101, 21, 0.5);
}

.team-card h3 {
  font-family: var(--font-ui);
  font-weight: 700;
  font-size: 1.2rem;
  line-height: 1.35;
  margin-bottom: 4px;
}

.team-name-link {
  color: #fff;
  text-decoration: none;
  background-image: linear-gradient(var(--cyan), var(--cyan));
  background-size: 0 1px;
  background-position: 0 100%;
  background-repeat: no-repeat;
  transition: color 0.25s ease, background-size 0.3s ease;
}

.team-name-link:hover,
.team-name-link:focus-visible {
  color: var(--cyan);
  background-size: 100% 1px;
}

.team-role {
  font-family: var(--font-ui);
  font-weight: 600;
  font-size: 0.82rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--orange-hi);
  margin-bottom: 12px;
}

.team-description {
  color: var(--muted);
  font-size: 0.95rem;
}

.team-description + .team-description {
  margin-top: 10px;
}

.team-divider {
  border: none;
  border-top: 1px solid rgba(63, 216, 255, 0.22);
  margin: 18px 0;
}

.learn-more-btn {
  display: table;
  margin: clamp(32px, 5vw, 52px) auto 0;
  padding: 14px 34px;
  font-family: var(--font-ui);
  font-weight: 600;
  font-size: 1rem;
  letter-spacing: 0.04em;
  color: #fff;
  text-decoration: none;
  background: linear-gradient(var(--navy-800), var(--navy-800)) padding-box, linear-gradient(90deg, var(--orange), var(--cyan)) border-box;
  border: 1.5px solid transparent;
  border-radius: 999px;
  transition: box-shadow 0.3s ease, transform 0.3s ease;
}

.learn-more-btn:hover,
.learn-more-btn:focus-visible {
  box-shadow: 0 0 24px rgba(63, 216, 255, 0.35), 0 0 40px rgba(227, 101, 21, 0.25);
  transform: translateY(-2px);
}

/* Affiliated organizations marquee */
.companies-marquee {
  overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
}

.companies-list {
  display: flex;
  width: max-content;
  gap: 20px;
  list-style: none;
  animation: marquee 32s linear infinite;
}

.companies-marquee:hover .companies-list {
  animation-play-state: paused;
}

.company {
  flex-shrink: 0;
  padding: 18px 28px;
  font-family: var(--font-ui);
  font-weight: 600;
  font-size: 1.02rem;
  color: var(--text);
  white-space: nowrap;
  background: var(--glass);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border: 1px solid var(--cyan-soft);
  border-radius: 12px;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.company:hover {
  border-color: var(--orange-soft);
  box-shadow: 0 0 22px rgba(227, 101, 21, 0.25);
}

/* Short list: show it centred and still instead of scrolling */
.companies-marquee.is-static {
  -webkit-mask-image: none;
  mask-image: none;
}

.companies-marquee.is-static .companies-list {
  width: auto;
  flex-wrap: wrap;
  justify-content: center;
  animation: none;
}

@keyframes marquee {
  to { transform: translateX(calc(-50% - 10px)); }
}

/* ==========================================
   FOOTER
   ========================================== */
.footer {
  position: relative;
  z-index: 1;
  margin-top: clamp(32px, 5vw, 64px);
  background: rgba(3, 6, 23, 0.82);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border-top: 1px solid rgba(63, 216, 255, 0.18);
}

.footer::before {
  content: '';
  position: absolute;
  top: -1px;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--orange), var(--cyan), transparent);
}

.footer-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 56px clamp(16px, 4vw, 40px) 40px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 40px;
}

.footer-section {
  display: flex;
  flex-direction: column;
  gap: 8px;
  color: var(--muted);
}

.footer-section h3 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: 0.08em;
  color: var(--text);
  margin-bottom: 8px;
}

.footer-section a {
  color: var(--muted);
  text-decoration: none;
  width: fit-content;
  transition: color 0.25s ease;
}

.footer-section a:hover,
.footer-section a:focus-visible {
  color: var(--cyan);
}

.footer-section .inline-link {
  color: var(--cyan);
}

.footer-logo {
  max-width: 180px;
  margin-bottom: 8px;
}

.footer-brand {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--text);
}

.social-icons {
  display: flex;
  gap: 12px;
  margin-top: 10px;
}

.footer-section .social-icon {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border: 1px solid var(--cyan-soft);
  border-radius: 10px;
  color: var(--text);
  transition: color 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.footer-section .social-icon:hover,
.footer-section .social-icon:focus-visible {
  color: var(--cyan);
  border-color: var(--cyan);
  box-shadow: 0 0 16px rgba(63, 216, 255, 0.35);
}

.footer-bottom {
  padding: 20px 16px;
  text-align: center;
  font-size: 0.88rem;
  color: var(--muted);
  border-top: 1px solid rgba(63, 216, 255, 0.1);
}

/* Back-to-top */
.scroll-to-top {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 900;
  width: 48px;
  height: 48px;
  font-size: 1.3rem;
  color: #fff;
  background: rgba(8, 14, 46, 0.85);
  border: 1px solid var(--cyan-soft);
  border-radius: 12px;
  box-shadow: 0 0 18px rgba(63, 216, 255, 0.2);
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: opacity 0.3s ease, visibility 0.3s ease, transform 0.3s ease, border-color 0.3s ease;
}

.scroll-to-top.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.scroll-to-top:hover {
  border-color: var(--orange);
}

/* ==========================================
   SCROLL REVEAL (only hidden when JS runs)
   ========================================== */
.js .reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 0.8s ease, transform 0.8s cubic-bezier(.2, .8, .2, 1);
  transition-delay: var(--reveal-delay, 0s);
}

.js .reveal.is-visible {
  opacity: 1;
  transform: none;
}

/* Glass card hover lift still works after reveal */
.js .team-card.reveal.is-visible:hover {
  transform: translateY(-4px);
}

/* ==========================================
   RESPONSIVE
   ========================================== */
@media (max-width: 960px) {
  .desktop-nav {
    display: none;
  }

  .hamburger {
    display: flex;
  }
}

@media (max-width: 768px) {
  :root {
    --header-h: 64px;
  }

  /* no keyboard on phones: just "Switch" */
  .rush-key {
    display: none;
  }

  .reticle--mid {
    display: none;
  }

  .reticle-tag {
    font-size: 0.6rem;
    letter-spacing: 0.12em;
    padding: 2px 6px;
  }

  .desktop-only {
    display: none;
  }


  .footer-content {
    grid-template-columns: 1fr;
    gap: 32px;
    text-align: left;
  }

  .wm-team,
  .wm-intro {
    width: 150px;
    height: 150px;
    right: -30px;
  }

  .scroll-to-top {
    right: 16px;
    bottom: 16px;
  }
}

@media (max-width: 480px) {
  .intro-heading-row {
    align-items: flex-start;
  }

  .company {
    padding: 14px 20px;
    font-size: 0.95rem;
  }
}

/* No backdrop-filter support: use more opaque glass so text stays readable */
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .glass-card,
  .company,
  .hero-subtitle-box {
    background: rgba(7, 13, 46, 0.94);
  }
}

/* ==========================================
   REDUCED MOTION
   ========================================== */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  #lattice,
  .circuits .signals {
    display: none;
  }

  .wafer,
  .die-lit,
  .wm,
  .bracket,
  .hero-subtitle-box::after,
  .scroll-indicator span {
    animation: none;
  }

  .hero-subtitle-box::after {
    display: none;
  }

  .companies-marquee {
    -webkit-mask-image: none;
    mask-image: none;
  }

  .companies-list {
    animation: none;
    width: auto;
    flex-wrap: wrap;
    justify-content: center;
  }

  .companies-list [aria-hidden="true"] {
    display: none;
  }

  .bench.is-shaking {
    animation: none;
  }

  .nexus-layer {
    --nexus-op: 0.3;
    transform: none;
  }

  .reticle::before,
  .reticle-ring,
  .nexus.in-view .reticle::after {
    animation: none;
  }

  .js .nexus:not(.intro-in) .nexus-intro {
    opacity: 1;
    filter: none;
    letter-spacing: 0.12em;
    transform: none;
  }

  .js .nexus:not(.in-view) .reticle {
    opacity: 1;
    transform: translate(-50%, -50%);
  }

  .js .nexus:not(.in-view) .reticle-tag {
    opacity: 1;
    clip-path: none;
  }

  .js .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }

  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
  }
}


/* ---------- "View More Activities" button under Lab Highlights (homepage) ---------- */
.activities-more {
  margin-top: 28px;
  text-align: center;
}

/* ==========================================
   ACTIVITIES & EXPERIMENTS PAGE
   ========================================== */
.activities-page main {
  position: relative;
  z-index: 1;
  padding: calc(var(--header-h) + 24px) clamp(16px, 4vw, 48px) 40px;
}

/* ---------- Decorative background (fixed, behind everything) ---------- */
.act-deco {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

.act-traces {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.act-traces path,
.act-traces circle {
  fill: none;
  stroke-width: 1.2;
}

.trace-base path,
.trace-base circle {
  stroke: rgba(63, 216, 255, 0.16);
}

.trace-pulse path {
  stroke: var(--cyan);
  stroke-width: 1.6;
  stroke-dasharray: 26 400;
  stroke-dashoffset: 0;
  filter: drop-shadow(0 0 4px rgba(63, 216, 255, 0.9));
  animation: trace-run 9s linear infinite;
}

.trace-pulse path:nth-child(even) {
  stroke: var(--orange-hi);
  filter: drop-shadow(0 0 4px rgba(255, 138, 61, 0.9));
}

@keyframes trace-run {
  to { stroke-dashoffset: -426; }
}

.float-chip {
  position: absolute;
  fill: none;
  stroke: var(--cyan);
  stroke-width: 1.4;
  opacity: 0.1;
  animation: chip-drift 22s ease-in-out infinite;
}

.float-chip.fc-2,
.float-chip.fc-4 { stroke: var(--orange-hi); }

.fc-1 { width: 150px; height: 150px; left: 2.5%; top: 30%; }
.fc-2 { width: 110px; height: 110px; right: 3%; top: 16%; animation-delay: -6s; }
.fc-3 { width: 90px;  height: 90px;  right: 6%; top: 68%; animation-delay: -12s; }
.fc-4 { width: 120px; height: 120px; left: 5%; top: 78%; animation-delay: -17s; }

@keyframes chip-drift {
  0%, 100% { transform: translate3d(0, 0, 0) rotate(0deg); }
  50%      { transform: translate3d(0, -22px, 0) rotate(6deg); }
}

.particle {
  position: absolute;
  left: var(--x);
  bottom: -10px;
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: var(--cyan);
  box-shadow: 0 0 8px var(--cyan);
  opacity: 0;
  animation: particle-rise var(--t) linear infinite;
  animation-delay: var(--d);
}

.particle:nth-child(3n) {
  background: var(--orange-hi);
  box-shadow: 0 0 8px var(--orange-hi);
}

@keyframes particle-rise {
  0%   { transform: translateY(0); opacity: 0; }
  10%  { opacity: 0.7; }
  90%  { opacity: 0.5; }
  100% { transform: translateY(-105vh); opacity: 0; }
}

/* ---------- Hero ---------- */
.act-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  gap: clamp(28px, 5vw, 72px);
  align-items: center;
  max-width: 1240px;
  margin: 0 auto;
  padding: clamp(28px, 5vw, 64px) 0 clamp(24px, 4vw, 48px);
}

.act-hero .hero-eyebrow {
  display: inline-block;
  margin-bottom: 18px;
}

.act-hero h1 {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(2rem, 4.6vw, 3.6rem);
  line-height: 1.08;
  letter-spacing: 0.03em;
  text-shadow: 0 0 22px rgba(63, 216, 255, 0.35);
}

.act-hero h1 span {
  color: var(--orange-hi);
}

.act-lede {
  margin: 18px 0 26px;
  max-width: 560px;
  font-size: 1.08rem;
  line-height: 1.75;
  color: var(--muted);
}

/* hero photos: three circular "portholes" that pop in, then float gently */
.act-hero-stack {
  position: relative;
  aspect-ratio: 1 / 0.86;
  max-width: 560px;
  width: 100%;
  margin-left: auto;
}

/* thin orbit rings behind the circles */
.act-hero-stack::before,
.act-hero-stack::after {
  content: '';
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
}

.act-hero-stack::before {
  inset: 4% 6% 2% 4%;
  border: 1px dashed rgba(63, 216, 255, 0.28);
  animation: orbit-spin 60s linear infinite;
}

.act-hero-stack::after {
  inset: 14% 16% 12% 14%;
  border: 1px solid rgba(227, 101, 21, 0.18);
}

@keyframes orbit-spin {
  to { transform: rotate(360deg); }
}

.act-hero-stack img {
  position: absolute;
  display: block;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 50%;
  border: 3px solid rgba(255, 255, 255, 0.85);
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.55), 0 0 0 8px rgba(63, 216, 255, 0.12);
  opacity: 0;
  animation:
    pop-in 0.9s cubic-bezier(.34, 1.56, .64, 1) forwards,
    bob 7s ease-in-out infinite;
}

/* big circle center-left, two smaller circles around it */
.stack-2 { width: 62%; left: 6%;  top: 14%; animation-delay: 0.1s, 1.1s; z-index: 2; }
.stack-1 { width: 38%; right: 2%; top: 0;   animation-delay: 0.35s, 2.2s; z-index: 1;
           box-shadow: 0 18px 44px rgba(0, 0, 0, 0.55), 0 0 0 8px rgba(192, 140, 255, 0.14); }
.stack-3 { width: 40%; right: 0;  bottom: 0; animation-delay: 0.6s, 3.3s; z-index: 3;
           box-shadow: 0 18px 44px rgba(0, 0, 0, 0.55), 0 0 0 8px rgba(227, 101, 21, 0.16); }

@keyframes pop-in {
  0%   { opacity: 0; transform: scale(0.4); }
  100% { opacity: 1; transform: scale(1); }
}

@keyframes bob {
  0%, 100% { translate: 0 0; }
  50%      { translate: 0 -10px; }
}

.act-hero-stack img:hover {
  scale: 1.05;
  box-shadow: 0 22px 50px rgba(0, 0, 0, 0.6), 0 0 0 10px rgba(63, 216, 255, 0.22);
}

.stack-chip {
  position: absolute;
  left: 4%;
  bottom: 6%;
  z-index: 2;
  width: 56px;
  height: 56px;
  padding: 10px;
  border-radius: 14px;
  border: 1px solid var(--orange-soft);
  background: var(--glass-strong);
  box-shadow: 0 0 26px rgba(227, 101, 21, 0.35);
}

.stack-chip svg {
  width: 100%;
  height: 100%;
  fill: none;
  stroke: var(--orange-hi);
  stroke-width: 3;
}

/* ---------- Experiment showcase ---------- */
.exp,
.field-trips {
  position: relative;
  max-width: 1240px;
  margin: 0 auto clamp(48px, 7vw, 88px);
  scroll-margin-top: calc(var(--header-h) + 16px);
}

/* text card beside a clean photo grid: feature photo + 4 small */
.exp-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  grid-template-areas:
    "card feature"
    "card thumbs";
  gap: 14px 28px;
  align-items: start;
}

.exp--flip .exp-grid {
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  grid-template-areas:
    "feature card"
    "thumbs card";
}

.ph-feature { grid-area: feature; }

.exp-card {
  grid-area: card;
  align-self: center;
  padding: clamp(22px, 2.6vw, 34px);
  border: 1px solid rgba(var(--accent-rgb), 0.3);
  border-radius: 16px;
  background: linear-gradient(150deg, rgba(var(--accent-rgb), 0.1), var(--glass-strong) 60%);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.35);
}

.exp-thumbs {
  grid-area: thumbs;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.exp--3 .exp-thumbs { grid-template-columns: repeat(3, minmax(0, 1fr)); }

.exp-kicker {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
  font-family: var(--font-ui);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
}

.exp-icon {
  flex: none;
  width: 32px;
  height: 32px;
  padding: 6px;
  border-radius: 10px;
  border: 1px solid rgba(var(--accent-rgb), 0.45);
  background: rgba(var(--accent-rgb), 0.1);
  fill: none;
  stroke: var(--accent);
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.exp-card h2,
.trip-card h3 {
  font-family: var(--font-display);
  font-size: clamp(1.25rem, 2.2vw, 1.7rem);
  line-height: 1.25;
  letter-spacing: 0.03em;
  margin-bottom: 12px;
}

.exp-card h2::after {
  content: '';
  display: block;
  width: 56px;
  height: 2px;
  margin-top: 12px;
  background: linear-gradient(90deg, var(--accent), transparent);
}

.exp-card p {
  line-height: 1.75;
  color: rgba(234, 240, 255, 0.88);
}

/* ---------- Photos ---------- */
.ph {
  position: relative;
  display: block;
  overflow: hidden;
  border-radius: 14px;
  border: 1px solid rgba(var(--accent-rgb, 63, 216, 255), 0.25);
  background: var(--navy-800);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.4);
  transition: transform 0.4s ease, box-shadow 0.4s ease, border-color 0.4s ease;
}

.ph img {
  display: block;
  width: 100%;
  height: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  transition: transform 0.6s cubic-bezier(.2, .7, .2, 1), filter 0.4s ease;
}

.ph-feature img { aspect-ratio: 16 / 9; }

.ph::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(115deg, transparent 40%, rgba(255, 255, 255, 0.14) 50%, transparent 60%);
  transform: translateX(-100%);
  transition: transform 0.8s ease;
  pointer-events: none;
}

.ph:hover,
.ph:focus-visible {
  transform: translateY(-4px);
  border-color: rgba(var(--accent-rgb, 63, 216, 255), 0.8);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5), 0 0 26px rgba(var(--accent-rgb, 63, 216, 255), 0.3);
}

.ph:hover img,
.ph:focus-visible img {
  transform: scale(1.05);
  filter: saturate(1.1);
}

.ph:hover::after,
.ph:focus-visible::after {
  transform: translateX(100%);
}

/* ---------- Field trip ---------- */
.ft-head {
  text-align: center;
  margin-bottom: 28px;
}

.ft-head .exp-kicker {
  justify-content: center;
}

.ft-title {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}

.trip-card {
  max-width: 900px;
  margin: 0 auto;
  text-align: center;
}

.trip-card .trip-meta {
  font-family: var(--font-ui);
  font-size: 0.82rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 8px;
}

.trip-card p + p {
  margin-top: 10px;
}



.trip-mosaic {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  grid-auto-flow: dense;
  gap: 12px;
  margin-top: 16px;
}


/* ---------- Tablet ---------- */
@media (max-width: 1024px) {
  .exp-grid,
  .exp--flip .exp-grid {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas: "feature" "card" "thumbs";
  }


  .trip-mosaic { grid-template-columns: repeat(3, minmax(0, 1fr)); }

  .fc-1, .fc-4 { display: none; }
}

/* ---------- Phone ---------- */
@media (max-width: 768px) {
  .act-hero { grid-template-columns: minmax(0, 1fr); }
  .act-hero-stack { max-width: 460px; width: 100%; margin: 0 auto; }
  .stack-chip { left: 2%; bottom: 4%; width: 46px; height: 46px; padding: 8px; }

  .exp-thumbs,
  .exp--3 .exp-thumbs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .exp--3 .exp-thumbs .ph:last-child { grid-column: span 2; }

  .trip-mosaic { grid-template-columns: repeat(2, minmax(0, 1fr)); }

  .float-chip, .particle { display: none; }
  .act-traces { opacity: 0.5; }
}

@media (prefers-reduced-motion: reduce) {
  .trace-pulse,
  .particle { display: none; }

  .float-chip { animation: none; }

  .act-hero-stack::before { animation: none; }
  .act-hero-stack img { animation: none; opacity: 1; }

  .act-hero-stack img,
  .ph,
  .ph img,
  .ph::after { transition: none; }
}

/* ---------- Section jump buttons (hero) ---------- */
.act-jump {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.act-jump-btn {
  padding: 11px 24px;
  border: 1px solid var(--cyan);
  border-radius: 999px;
  background: rgba(63, 216, 255, 0.12);
  color: var(--text);
  font-family: var(--font-ui);
  font-weight: 600;
  text-decoration: none;
  transition: background 0.3s ease, box-shadow 0.3s ease;
}

.act-jump-btn--alt {
  border-color: var(--orange);
  background: rgba(227, 101, 21, 0.14);
}

.act-jump-btn:hover,
.act-jump-btn:focus-visible {
  background: rgba(63, 216, 255, 0.24);
  box-shadow: 0 0 18px rgba(63, 216, 255, 0.4);
}

.act-jump-btn--alt:hover,
.act-jump-btn--alt:focus-visible {
  background: rgba(227, 101, 21, 0.3);
  box-shadow: 0 0 18px rgba(227, 101, 21, 0.45);
}

/* Featured area as three portrait photos side by side */
.ph-tri {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.ph-tri .ph-tri-item img,
.exp-grid .ph-tri .ph-tri-item img {
  position: static;
  aspect-ratio: 3 / 4;
}
