/* ============================================================
   M5 Research — Production Website
   
   Aesthetic: Linear.app typography + institutional quant finance
   Palette: #040816 deep navy
   Typography: Inter neo-grotesk only — thin weights, tight spacing
   ============================================================ */

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

/* ─── Design Tokens ───────────────────────────────────────── */

:root {
  /* Palette — #040816 base */
  --bg-deep: #040816;
  --bg-elevated: #060c1a;
  --bg-surface: #0a1224;
  --bg-card: rgba(8, 16, 32, 0.6);

  --border-subtle: rgba(255, 255, 255, 0.04);
  --border-card: rgba(255, 255, 255, 0.06);
  --border-hover: rgba(255, 255, 255, 0.1);

  /* Text — off-white, extremely restrained */
  --text-primary: rgba(255, 255, 255, 0.87);
  --text-secondary: rgba(255, 255, 255, 0.50);
  --text-muted: rgba(255, 255, 255, 0.30);
  --text-faint: rgba(255, 255, 255, 0.18);

  /* Accent — barely there blue-gray */
  --accent: rgba(130, 160, 210, 0.15);
  --accent-hover: rgba(130, 160, 210, 0.25);
  --scroll-blue: rgba(76, 134, 204, 0.48);
  --scroll-blue-active: rgba(114, 174, 236, 0.78);
  --section-lift: rgba(10, 20, 38, 0.72);
  --section-lift-soft: rgba(15, 29, 52, 0.52);
  --border-lift: rgba(145, 180, 230, 0.12);

  /* Typography — Inter only */
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;

  /* Spacing */
  --container-max: 1080px;
  --container-pad: clamp(1.5rem, 5vw, 3rem);
  --section-gap: clamp(6rem, 12vh, 10rem);

  /* Motion */
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-smooth: cubic-bezier(0.4, 0, 0.2, 1);
  --t-fast: 150ms;
  --t-base: 300ms;
  --t-slow: 600ms;
}

/* ─── Reset ───────────────────────────────────────────────── */

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 72px;
}

body {
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.6;
  color: var(--text-primary);
  background: var(--bg-deep);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  letter-spacing: -0.01em;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  cursor: pointer;
  border: none;
  background: none;
  font-family: inherit;
}

/* ─── Layout ──────────────────────────────────────────────── */

.container {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--container-pad);
}

/* ─── Navigation ──────────────────────────────────────────── */

.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  padding: 1.25rem 0;
  transition: all var(--t-base) var(--ease-smooth);
}

.navbar.scrolled {
  padding: 0.875rem 0;
  background: rgba(4, 8, 22, 0.8);
  backdrop-filter: blur(24px) saturate(1.2);
  -webkit-backdrop-filter: blur(24px) saturate(1.2);
  border-bottom: 1px solid var(--border-subtle);
}

.nav-inner {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--container-pad);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-primary);
  letter-spacing: -0.02em;
  text-decoration: none;
}

.nav-menu {
  display: flex;
  list-style: none;
  gap: 2rem;
  align-items: center;
}

.nav-link {
  font-size: 0.8rem;
  font-weight: 400;
  color: var(--text-muted);
  letter-spacing: 0.02em;
  transition: color var(--t-fast) var(--ease-smooth);
}

.nav-link:hover,
.nav-link.active {
  color: var(--text-secondary);
}

/* Mobile Toggle */
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 4px;
  padding: 4px;
}

.nav-toggle .bar {
  width: 18px;
  height: 1.5px;
  background: var(--text-muted);
  transition: all var(--t-base) var(--ease-smooth);
  border-radius: 1px;
}

/* ─── Hero ────────────────────────────────────────────────── */

.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

/* Signal canvas — the centerpiece */
.hero-canvas {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero-canvas canvas {
  width: 100%;
  height: 100%;
  display: block;
}

/* Option chain animation */
.contact-option-chain {
  position: relative;
  z-index: 1;
  --option-chain-scale: 1;
  width: min(100%, 470px);
  margin-top: clamp(4.25rem, 6vw, 5.25rem);
  pointer-events: none;
  opacity: 0;
  mask-image: radial-gradient(ellipse at center, black 42%, rgba(0, 0, 0, 0.68) 68%, transparent 100%);
  -webkit-mask-image: radial-gradient(ellipse at center, black 42%, rgba(0, 0, 0, 0.68) 68%, transparent 100%);
  animation: optionChainReveal 1.8s var(--ease) 0.3s forwards;
}

.option-chain-grid {
  display: flex;
  flex-direction: column;
  gap: 1px;
  padding: 1px;
  border: 1px solid rgba(130, 160, 210, 0.055);
  border-radius: 8px;
  background: rgba(130, 160, 210, 0.035);
  box-shadow:
    0 28px 90px rgba(0, 0, 0, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.018);
  transform: perspective(900px) rotateX(2deg) scale(var(--option-chain-scale));
  animation: optionChainDrift 18s ease-in-out infinite;
}

.oc-row {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 1px;
}

.oc-cell {
  min-height: 1.62rem;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding: 0 0.55rem;
  overflow: hidden;
  color: rgba(255, 255, 255, 0.18);
  background: rgba(6, 12, 26, 0.32);
  font-size: 0.58rem;
  font-weight: 400;
  line-height: 1;
  letter-spacing: 0.04em;
  font-variant-numeric: tabular-nums;
}

.oc-head .oc-cell {
  justify-content: center;
  min-height: 1.25rem;
  color: rgba(255, 255, 255, 0.16);
  background: rgba(10, 20, 38, 0.44);
  font-size: 0.48rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.oc-strike {
  justify-content: center;
  color: rgba(255, 255, 255, 0.32);
  background: rgba(12, 22, 42, 0.46);
}

@keyframes optionChainReveal {
  from {
    opacity: 0;
    transform: translateY(10px) scale(0.985);
  }
  to {
    opacity: 0.63;
    transform: translateY(0) scale(1);
  }
}

@keyframes optionChainDrift {
  0%, 100% {
    transform: perspective(900px) rotateX(2deg) translate3d(0, -4px, 0) scale(var(--option-chain-scale));
  }
  50% {
    transform: perspective(900px) rotateX(2deg) translate3d(0, 6px, 0) scale(var(--option-chain-scale));
  }
}

/* Hero content — small, centered, restrained */
.hero-content {
  position: relative;
  z-index: 10;
  text-align: center;
  padding: 0 var(--container-pad);
}

/* Hero title — text, clean, Linear.app style */
.hero-title {
  font-size: clamp(1.32rem, 3.9vw, 3.20rem);
  font-weight: 300;
  color: var(--text-primary);
  letter-spacing: -0.045em;
  line-height: 0.96;
  margin-bottom: 1.15rem;
  opacity: 0;
  animation: fadeIn 2.5s var(--ease) 0.3s forwards;
}

.hero-subtitle {
  font-size: clamp(0.82rem, 1.15vw, 0.98rem);
  font-weight: 300;
  color: var(--text-muted);
  letter-spacing: 0.08em;
  opacity: 0;
  animation: fadeIn 2s var(--ease) 0.9s forwards;
}

/* Hero telemetry strip — tiny operational status at bottom */
.hero-telemetry {
  position: absolute;
  bottom: 4.5rem;
  left: 0;
  right: 0;
  z-index: 10;
  display: flex;
  justify-content: center;
  gap: clamp(1.5rem, 4vw, 3rem);
  padding: 0 var(--container-pad);
  opacity: 0;
  animation: fadeIn 2s var(--ease) 2.5s forwards;
}

.ht-item {
  display: flex;
  align-items: baseline;
  gap: 0.35rem;
  font-size: 0.55rem;
  font-weight: 400;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.45);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.ht-label {
  opacity: 0.65;
}

.ht-val {
  opacity: 0.95;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Value update flash animation */
.value-flash {
  animation: numFlash 2.2s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes numFlash {
  0% {
    color: #ffffff;
    opacity: 1;
    text-shadow: 0 0 4px rgba(255, 255, 255, 0.65);
  }
  100% {
    /* Transitions back to defaults */
  }
}

/* Scroll indicator */
.hero-scroll {
  position: absolute;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10;
  opacity: 0;
  animation: fadeIn 1.5s var(--ease) 3s forwards;
}

.scroll-line {
  width: 1px;
  height: 32px;
  background: linear-gradient(180deg, var(--scroll-blue), transparent);
  position: relative;
  overflow: hidden;
}

.scroll-line::after {
  content: '';
  position: absolute;
  top: -32px;
  left: 0;
  width: 1px;
  height: 16px;
  background: var(--scroll-blue-active);
  box-shadow: 0 0 14px rgba(92, 154, 225, 0.45);
  animation: scrollDrop 3s ease-in-out infinite;
}

@keyframes scrollDrop {
  0% { top: -16px; opacity: 0; }
  20% { opacity: 1; }
  100% { top: 32px; opacity: 0; }
}

/* ─── Section ─────────────────────────────────────────────── */

.section {
  position: relative;
  padding: var(--section-gap) 0;
}

.section-header {
  margin-bottom: clamp(3rem, 6vh, 4.5rem);
}

.section-label {
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-faint);
  margin-bottom: 1.25rem;
}

.section-title {
  font-size: clamp(1.3rem, 2.5vw, 1.75rem);
  font-weight: 300;
  color: var(--text-primary);
  letter-spacing: -0.025em;
  line-height: 1.35;
  max-width: 560px;
}

.section-subtitle {
  font-size: 0.85rem;
  font-weight: 300;
  color: var(--text-secondary);
  max-width: 480px;
  line-height: 1.65;
  margin-top: 0.75rem;
}

/* ─── Research Grid ───────────────────────────────────────── */

.research-section {
  overflow: hidden;
  border-top: 1px solid var(--border-subtle);
}

.research-section::before {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse at 50% 56%, rgba(58, 104, 170, 0.12), transparent 46%),
    linear-gradient(180deg, transparent, rgba(8, 16, 32, 0.18) 58%, transparent);
}

.research-section > .container {
  position: relative;
  z-index: 1;
}

.research-grid {
  position: relative;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--border-subtle);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.25);
}

.research-card {
  background: var(--bg-card);
  padding: 2.25rem 2rem;
  transition:
    background 0.4s var(--ease-smooth),
    box-shadow 0.4s var(--ease-smooth);
  position: relative;
}

.research-card:hover {
  background: 
    radial-gradient(320px circle at var(--mouse-x, 50%) var(--mouse-y, 50%), rgba(0, 178, 255, 0.08), transparent 75%),
    rgba(12, 22, 42, 0.85);
  box-shadow: inset 0 0 0 1px rgba(0, 178, 255, 0.18);
}

.research-card.is-active {
  background: 
    radial-gradient(320px circle at var(--mouse-x, 50%) var(--mouse-y, 50%), rgba(0, 178, 255, 0.04), transparent 75%),
    rgba(13, 25, 45, 0.78);
  box-shadow: inset 0 0 0 1px rgba(118, 165, 220, 0.18);
}

.research-card.is-active::after {
  content: '';
  position: absolute;
  left: 1.75rem;
  right: 1.75rem;
  bottom: 1.5rem;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(110, 172, 235, 0.38), transparent);
  opacity: 0.75;
}

.card-number {
  font-family: 'Courier New', Courier, monospace;
  font-size: 0.6rem;
  font-weight: 500;
  color: rgba(140, 195, 255, 0.5);
  letter-spacing: 0.15em;
  margin-bottom: 1.5rem;
  display: inline-block;
}

.card-number::before {
  content: '// ';
  color: rgba(0, 178, 255, 0.55);
}

.card-title {
  font-size: 0.95rem;
  font-weight: 400;
  color: var(--text-primary);
  margin-bottom: 0.6rem;
  letter-spacing: -0.01em;
}

.card-description {
  font-size: 0.8rem;
  font-weight: 300;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* ─── Infrastructure ──────────────────────────────────────── */

.infra-section {
  border-top: 1px solid var(--border-subtle);
  background:
    radial-gradient(circle at 72% 34%, rgba(35, 75, 130, 0.12), transparent 34%),
    linear-gradient(180deg, rgba(5, 10, 24, 0), rgba(9, 18, 34, 0.34) 42%, rgba(5, 10, 24, 0.1));
}

.infra-section > .container,
.contact-section > .container {
  position: relative;
  z-index: 1;
}

.infra-layout {
  max-width: 980px;
  display: grid;
  grid-template-columns: minmax(0, 440px) minmax(360px, 470px);
  column-gap: clamp(3rem, 8vw, 6rem);
  align-items: stretch;
}

.infra-text {
  display: flex;
  flex-direction: column;
  gap: 1.8rem;
  padding-top: 0.5rem;
  min-width: 0;
}

.infra-item {
  padding-left: 1.25rem;
  border-left: 1px solid var(--border-lift);
  transition: border-color var(--t-base) var(--ease-smooth);
}

.infra-item:hover {
  border-left-color: rgba(145, 180, 230, 0.28);
}

.infra-item-title {
  font-size: 0.9rem;
  font-weight: 400;
  color: var(--text-primary);
  margin-bottom: 0.4rem;
  letter-spacing: -0.01em;
}

.infra-item-desc {
  font-size: 0.8rem;
  font-weight: 300;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* Visualization panel */
.infra-panel {
  display: flex;
  flex-direction: column;
  position: relative;
  width: 100%;
  min-height: 335px;
  height: 100%;
  border-radius: 8px;
  overflow: hidden;
  min-width: 0;
  border: 1px solid var(--border-lift);
  background:
    linear-gradient(180deg, var(--section-lift), rgba(7, 15, 29, 0.62)),
    rgba(4, 8, 22, 0.5);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.03),
    0 24px 80px rgba(0, 0, 0, 0.18);
}

.infra-canvas-wrapper {
  position: relative;
  flex: 1;
  min-height: 180px;
}

.infra-canvas-wrapper canvas {
  width: 100%;
  height: 100%;
  display: block;
}

.infra-console {
  height: 110px;
  border-top: 1px solid var(--border-lift);
  background: rgba(4, 8, 18, 0.82);
  font-family: monospace;
  display: flex;
  flex-direction: column;
  padding: 0.5rem 0.75rem;
  overflow: hidden;
  box-sizing: border-box;
}

.console-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.52rem;
  color: rgba(145, 180, 230, 0.45);
  letter-spacing: 0.08em;
  margin-bottom: 0.35rem;
  border-bottom: 1px solid rgba(145, 180, 230, 0.08);
  padding-bottom: 0.25rem;
}

.console-status {
  color: #10b981;
  text-shadow: 0 0 6px rgba(16, 185, 129, 0.45);
}

.console-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  font-size: 0.55rem;
  color: rgba(255, 255, 255, 0.7);
  overflow-y: hidden;
  box-sizing: border-box;
 text-align: left;
}

.console-line {
  line-height: 1.35;
  white-space: nowrap;
  animation: consoleFadeIn 0.3s ease-out forwards;
}

.c-time {
  color: rgba(145, 180, 230, 0.34);
}

.console-ok {
  color: #10b981;
  font-weight: 500;
}

.console-info {
  color: #3b82f6;
  font-weight: 500;
}

.console-warn {
  color: #f59e0b;
  font-weight: 500;
}

@keyframes consoleFadeIn {
  from {
    opacity: 0;
    transform: translateY(3px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Telemetry overlay */
.telemetry {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  padding: 0.7rem;
}

.tv {
  position: absolute;
  font-size: 0.52rem;
  font-weight: 400;
  color: rgba(190, 215, 245, 0.28);
  letter-spacing: 0.06em;
  font-variant-numeric: tabular-nums;
}

.tv-1 { top: 0.7rem; left: 0.7rem; }
.tv-2 { top: 0.7rem; right: 0.7rem; }
.tv-3 { bottom: 0.7rem; left: 0.7rem; }
.tv-4 { bottom: 0.7rem; right: 0.7rem; }
.tv-5 { top: 50%; left: 0.7rem; transform: translateY(-50%); }

/* ─── Contact ─────────────────────────────────────────────── */

.contact-section {
  border-top: 1px solid var(--border-subtle);
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(6, 13, 28, 0.08), rgba(10, 20, 38, 0.28));
}

.contact-section::before {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 24% 28%, rgba(50, 92, 150, 0.07), transparent 32%),
    linear-gradient(90deg, rgba(13, 28, 50, 0.14), transparent 58%);
}

.contact-inner {
  max-width: 980px;
  display: grid;
  grid-template-columns: minmax(0, 440px) minmax(360px, 470px);
  column-gap: clamp(3rem, 8vw, 6rem);
  align-items: start;
}

.contact-info {
  grid-column: 1;
  min-width: 0;
}

.contact-copy {
  min-width: 0;
}

.contact-section .section-label {
  color: rgba(190, 215, 245, 0.26);
}

.contact-section .section-subtitle,
.contact-email {
  color: rgba(210, 225, 245, 0.56);
}

.contact-email {
  display: inline-block;
  font-size: 0.9rem;
  font-weight: 300;
  letter-spacing: 0.01em;
  margin-top: 1.5rem;
  padding: 0.625rem 0;
  border-bottom: 1px solid var(--border-subtle);
  transition: all var(--t-base) var(--ease-smooth);
}

.contact-email:hover {
  color: var(--text-primary);
  border-bottom-color: var(--scroll-blue);
}

/* Minimal form */
.contact-form {
  grid-column: 1;
  margin-top: 2.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.form-field {
  width: 100%;
  background: transparent;
  border: none;
  border-bottom: 1px solid rgba(145, 180, 230, 0.12);
  padding: 0.75rem 0;
  color: var(--text-primary);
  font-family: var(--font);
  font-size: 0.85rem;
  font-weight: 300;
  outline: none;
  transition: border-color var(--t-base) var(--ease-smooth);
  border-radius: 0;
}

.form-field::placeholder {
  color: rgba(190, 215, 245, 0.32);
}

.form-field:focus {
  border-bottom-color: rgba(145, 180, 230, 0.3);
}

textarea.form-field {
  resize: none;
  min-height: 80px;
}

.form-submit {
  align-self: flex-start;
  margin-top: 0.5rem;
  padding: 0.625rem 1.5rem;
  font-size: 0.75rem;
  font-weight: 400;
  color: var(--text-secondary);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border: 1px solid rgba(145, 180, 230, 0.14);
  border-radius: 6px;
  transition: all var(--t-base) var(--ease-smooth);
  cursor: pointer;
  background: rgba(12, 24, 44, 0.24);
}

.form-submit:hover {
  color: var(--text-primary);
  border-color: var(--border-hover);
}

/* ─── Footer ──────────────────────────────────────────────── */

.footer {
  padding: 2rem 0;
  border-top: 1px solid var(--border-subtle);
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 2rem;
}

.footer-copy {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.footer-left {
  font-size: 0.75rem;
  font-weight: 400;
  color: var(--text-faint);
  letter-spacing: -0.01em;
}

.footer-slogan {
  font-size: 0.72rem;
  font-weight: 300;
  color: rgba(190, 215, 245, 0.34);
  letter-spacing: 0.06em;
}

.footer-right {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 1rem;
  font-size: 0.65rem;
  color: var(--text-faint);
  letter-spacing: 0.02em;
}

.footer-socials {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.55rem;
}

.footer-social-link {
  width: 1.9rem;
  height: 1.9rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: rgba(190, 215, 245, 0.42);
  border: 1px solid rgba(145, 180, 230, 0.1);
  border-radius: 6px;
  background: rgba(12, 24, 44, 0.18);
  transition:
    color var(--t-base) var(--ease-smooth),
    border-color var(--t-base) var(--ease-smooth),
    background var(--t-base) var(--ease-smooth);
}

.footer-social-link:hover {
  color: var(--text-primary);
  border-color: rgba(145, 180, 230, 0.26);
  background: rgba(12, 24, 44, 0.42);
}

/* ─── Scroll Reveal ───────────────────────────────────────── */

.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.8s var(--ease);
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

.reveal-d1 { transition-delay: 0.05s; }
.reveal-d2 { transition-delay: 0.1s; }
.reveal-d3 { transition-delay: 0.15s; }
.reveal-d4 { transition-delay: 0.2s; }
.reveal-d5 { transition-delay: 0.25s; }
.reveal-d6 { transition-delay: 0.3s; }

/* ─── Responsive ──────────────────────────────────────────── */

@media (max-width: 900px) {
  .contact-inner {
    grid-template-columns: 1fr;
  }

  .contact-option-chain {
    width: min(100%, 520px);
    margin-top: 1.5rem;
  }

  .oc-cell {
    min-height: 1.45rem;
    padding: 0 0.4rem;
    font-size: 0.5rem;
  }

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

  .infra-layout {
    max-width: 100%;
    grid-template-columns: 1fr;
  }

  .infra-console {
    display: none;
  }

  .infra-panel {
    height: 160px;
    min-height: 0;
    margin-top: 1.5rem;
  }
}

@media (max-width: 640px) {
  .contact-option-chain {
    width: 100%;
    --option-chain-scale: 0.92;
  }

  .oc-row {
    grid-template-columns: 0.9fr 0.9fr 0.9fr 1fr 0.8fr 0.9fr 0.9fr;
  }

  .oc-cell {
    min-height: 1.35rem;
    padding: 0 0.28rem;
    font-size: 0.44rem;
  }

  .nav-menu {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(4, 8, 22, 0.97);
    backdrop-filter: blur(20px);
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 1.5rem;
    z-index: 999;
  }

  .nav-menu.open {
    display: flex;
  }

  .nav-toggle {
    display: flex;
    z-index: 1001;
  }

  .nav-toggle.open .bar:nth-child(1) {
    transform: translateY(5.5px) rotate(45deg);
  }

  .nav-toggle.open .bar:nth-child(2) {
    opacity: 0;
  }

  .nav-toggle.open .bar:nth-child(3) {
    transform: translateY(-5.5px) rotate(-45deg);
  }

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

  .footer-inner {
    flex-direction: column;
    gap: 0.75rem;
    text-align: center;
  }
}

/* ─── Selection & Scrollbar ───────────────────────────────── */

::selection {
  background: rgba(130, 160, 210, 0.15);
  color: var(--text-primary);
}

::-webkit-scrollbar {
  width: 5px;
}

::-webkit-scrollbar-track {
  background: var(--bg-deep);
}

::-webkit-scrollbar-thumb {
  background: rgba(76, 134, 204, 0.24);
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(114, 174, 236, 0.42);
}

/* ─── Utilities ───────────────────────────────────────────── */

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

/* Hide telemetry on very small screens */
@media (max-width: 480px) {
  .hero-telemetry {
    display: none;
  }
}