:root {
  color-scheme: dark;
  --bg: #030305;
  --panel: rgba(18, 18, 22, 0.72);
  --panel-strong: rgba(30, 30, 36, 0.82);
  --line: rgba(255, 255, 255, 0.11);
  --line-bright: rgba(255, 255, 255, 0.22);
  --text: #f5f5f7;
  --muted: #a1a1aa;
  --soft: #72727c;
  --accent: #e8edf7;
  --cyan: #76d8ff;
  --green: #94f0c3;
  --violet: #b9a8ff;
  --shadow: 0 32px 90px rgba(0, 0, 0, 0.52);
  /*
   * Section vertical rhythm (global).
   * Each section uses padding-block: var(--section-y).
   * Adjacent sections → visual gap ≈ 2 × --section-y
   * (matches Products ↔ Art Gallery feel when --section-y is 36px → ~72px).
   */
  --section-y: 100px;
  /* Hero → first section (Products) stays a bit tighter */
  --section-y-hero: 32px;
  --section-y-closing: 32px;
  /* Research module cards (2DGS / FSR / …) — gap between project cards */
  --research-gap: 100px;

  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 50% 0%, rgba(255, 255, 255, 0.12), transparent 27rem),
    linear-gradient(180deg, #09090d 0%, var(--bg) 42%, #050507 100%);
  color: var(--text);
  overflow-x: hidden;
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  content: "";
  background-image: linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px);
  background-size: 80px 80px;
  mask-image: linear-gradient(to bottom, transparent, black 18%, black 68%, transparent);
}

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

button,
a {
  -webkit-tap-highlight-color: transparent;
}

#field {
  position: fixed;
  inset: 0;
  z-index: -1;
  width: 100%;
  height: 100%;
  opacity: 0.58;
}

.topbar {
  position: fixed;
  top: 0;
  left: 50%;
  z-index: 20;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  width: min(1120px, calc(100% - 32px));
  height: 64px;
  transform: translateX(-50%);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(24px) saturate(140%);
}

.brand,
.nav {
  display: flex;
  align-items: center;
}

.brand {
  gap: 10px;
  font-size: 15px;
  font-weight: 650;
  letter-spacing: 0;
}

.brand-mark {
  width: 21px;
  height: 21px;
  border: 1px solid var(--line-bright);
  border-radius: 50%;
  background:
    radial-gradient(circle at 35% 30%, #ffffff, transparent 24%),
    linear-gradient(135deg, #2f333b, #08090c);
  box-shadow: 0 0 22px rgba(255, 255, 255, 0.12);
}

.nav {
  gap: 8px;
  padding: 5px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.035);
}

.nav a {
  padding: 7px 13px;
  border-radius: 999px;
  color: var(--muted);
  font-size: 13px;
  transition: color 160ms ease, background 160ms ease;
}

.nav a:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.08);
}

.icon-button {
  justify-self: end;
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.04);
  cursor: pointer;
}

.icon-button span {
  display: block;
  width: 4px;
  height: 4px;
  margin: 1px;
  border-radius: 50%;
  background: var(--text);
}

.hero {
  /* Single-column intro (no side device preview) — stay compact, not full-viewport */
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0;
  align-items: center;
  width: min(1180px, calc(100% - 40px));
  min-height: 0;
  margin: 0 auto;
  padding: 96px 0 var(--section-y-hero);
}

.apple-hero {
  padding-bottom: var(--section-y-hero);
}

.hero-copy {
  padding-top: 8px;
  max-width: 720px;
}

.eyebrow {
  margin: 0 0 16px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  max-width: 620px;
  margin-bottom: 18px;
  font-size: clamp(42px, 6.2vw, 72px);
  line-height: 0.98;
  font-weight: 760;
  letter-spacing: 0;
}

.lead {
  max-width: 520px;
  margin-bottom: 22px;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.78;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 0;
}

/* Products sits directly under hero — use tight rhythm */
.hero + .section-band,
#products.section-band {
  padding-top: var(--section-y-hero);
  padding-bottom: var(--section-y);
}

.primary-action,
.secondary-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 20px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 650;
}

.primary-action {
  color: #050507;
  background: linear-gradient(180deg, #ffffff, #c9cbd1);
  box-shadow: 0 16px 48px rgba(255, 255, 255, 0.16);
}

.secondary-action {
  border: 1px solid var(--line);
  color: var(--text);
  background: rgba(255, 255, 255, 0.045);
}

.console,
.hero-device {
  position: relative;
  min-height: 640px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.09), transparent 34%),
    rgba(11, 11, 14, 0.82);
  box-shadow: var(--shadow);
  backdrop-filter: blur(26px) saturate(140%);
}

.console::before,
.hero-device::before {
  position: absolute;
  inset: 0;
  content: "";
  pointer-events: none;
  background:
    radial-gradient(circle at 70% 16%, rgba(118, 216, 255, 0.16), transparent 22rem),
    radial-gradient(circle at 22% 76%, rgba(148, 240, 195, 0.08), transparent 18rem);
}

.console-bar {
  position: relative;
  z-index: 1;
  display: flex;
  gap: 18px;
  align-items: center;
  height: 48px;
  padding: 0 18px;
  border-bottom: 1px solid var(--line);
  color: var(--soft);
  font-family: "SF Mono", Consolas, monospace;
  font-size: 12px;
}

.traffic {
  display: flex;
  gap: 7px;
}

.traffic i {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.28);
}

.console-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  grid-template-rows: 1.2fr 0.8fr;
  gap: 14px;
  height: calc(100% - 48px);
  min-height: 572px;
  padding: 14px;
}

.hero-device {
  min-height: 590px;
}

.hero-device-body {
  position: relative;
  z-index: 1;
  min-height: 542px;
  overflow: hidden;
}

.device-orbit {
  position: absolute;
  inset: 32px 0 96px;
  display: grid;
  place-items: center;
}

.device-stack {
  position: absolute;
  right: 18px;
  bottom: 18px;
  left: 18px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.device-stack span {
  display: grid;
  place-items: center;
  min-height: 58px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.045);
  font-size: 12px;
}

.compact-feature {
  min-height: 190px;
}

.panel {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

.panel-head {
  position: relative;
  z-index: 1;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 16px;
  color: var(--muted);
  font-size: 13px;
}

.panel-head strong {
  color: var(--text);
  font-weight: 650;
}

.command-panel {
  grid-row: span 2;
  min-height: 444px;
  background:
    radial-gradient(circle at 50% 48%, rgba(255, 255, 255, 0.1), transparent 18rem),
    var(--panel);
}

.orbital {
  position: absolute;
  inset: 56px 14px 14px;
  display: grid;
  place-items: center;
}

.core,
.ring,
.node {
  position: absolute;
  border-radius: 50%;
}

.core {
  width: 96px;
  height: 96px;
  background:
    radial-gradient(circle at 35% 28%, #ffffff, transparent 26%),
    linear-gradient(145deg, #dce7ef, #3c444f 45%, #0d0f13);
  box-shadow: 0 0 64px rgba(255, 255, 255, 0.18), inset 0 0 26px rgba(255, 255, 255, 0.14);
}

.ring {
  border: 1px solid rgba(255, 255, 255, 0.18);
  transform: rotateX(72deg) rotateZ(-18deg);
}

.ring-one {
  width: 310px;
  height: 310px;
  animation: drift 12s linear infinite;
}

.ring-two {
  width: 430px;
  height: 430px;
  border-color: rgba(118, 216, 255, 0.18);
  animation: drift 18s linear infinite reverse;
}

.node {
  width: 13px;
  height: 13px;
  background: #f5f5f7;
  box-shadow: 0 0 24px rgba(118, 216, 255, 0.54);
}

.node-a {
  transform: translate(155px, -62px);
}

.node-b {
  transform: translate(-204px, 76px);
  background: var(--green);
}

.node-c {
  transform: translate(82px, 188px);
  background: var(--violet);
}

.prompt-panel {
  min-height: 296px;
}

.prompt-lines {
  display: grid;
  gap: 13px;
  padding: 8px 16px 18px;
}

.prompt-lines span {
  height: 12px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.18), rgba(255, 255, 255, 0.035));
}

.prompt-lines span:nth-child(1) {
  width: 86%;
}

.prompt-lines span:nth-child(2) {
  width: 68%;
}

.prompt-lines span:nth-child(3) {
  width: 92%;
}

.prompt-lines span:nth-child(4) {
  width: 54%;
}

.agent-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  padding: 0 16px 16px;
}

.agent-row b {
  display: grid;
  place-items: center;
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.04);
  font-size: 12px;
}

.metric-panel {
  min-height: 220px;
}

.bars {
  position: absolute;
  inset: 64px 16px 18px;
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 8px;
  align-items: end;
}

.bars span {
  height: var(--h);
  min-height: 26px;
  border-radius: 8px 8px 2px 2px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.76), rgba(118, 216, 255, 0.14));
}

.review-panel {
  grid-column: span 2;
  min-height: 126px;
}

.review-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  padding: 0 16px 16px;
}

.review-list span {
  display: flex;
  gap: 8px;
  align-items: center;
  min-height: 42px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
}

.review-list i {
  width: 7px;
  height: 7px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 18px rgba(148, 240, 195, 0.55);
}

.section-band,
.closing {
  width: min(1120px, calc(100% - 40px));
  margin: 0 auto;
  padding: var(--section-y-closing) 0;
}

.section-title {
  max-width: 760px;
  margin-bottom: 28px;
}

.centered {
  margin-right: auto;
  margin-left: auto;
  text-align: center;
}

h2 {
  margin-bottom: 18px;
  font-size: clamp(32px, 5vw, 58px);
  line-height: 1.05;
  font-weight: 740;
  letter-spacing: 0;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.feature {
  min-height: 232px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.035);
  backdrop-filter: blur(18px);
}

.feature-icon {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  margin-bottom: 42px;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--text);
}

.feature h3 {
  margin-bottom: 10px;
  font-size: 20px;
}

.feature p,
.closing p {
  margin-bottom: 0;
  color: var(--muted);
  line-height: 1.75;
}

.signal-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  width: min(1120px, calc(100% - 40px));
  margin: 16px auto 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.045);
}

.signal-strip div {
  display: grid;
  gap: 8px;
  min-height: 116px;
  padding: 22px;
  border-right: 1px solid var(--line);
}

.signal-strip div:last-child {
  border-right: 0;
}

.signal-strip span {
  color: var(--soft);
  font-size: 12px;
  text-transform: uppercase;
}

.signal-strip strong {
  align-self: end;
  font-size: clamp(24px, 3vw, 40px);
  font-weight: 720;
}

/* ======================== CONTACT ======================== */
.contact-section .section-title {
  margin-left: auto;
  margin-right: auto;
  text-align: center;
}

.contact-lead {
  max-width: 620px;
  margin: 0 auto;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.72;
}

.contact-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  width: 100%;
}

.contact-card {
  display: grid;
  gap: 8px;
  align-content: start;
  min-height: 168px;
  padding: 22px 20px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.06), transparent 42%),
    rgba(255, 255, 255, 0.035);
  backdrop-filter: blur(18px);
  transition: border-color 180ms ease, background 180ms ease, transform 180ms ease;
}

.contact-card:hover {
  border-color: var(--line-bright);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.09), transparent 42%),
    rgba(255, 255, 255, 0.05);
  transform: translateY(-2px);
}

.contact-card-icon {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  margin-bottom: 10px;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--text);
  font-size: 14px;
  font-weight: 650;
}

.contact-card-label {
  color: var(--soft);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.contact-card-value {
  color: var(--text);
  font-size: clamp(15px, 1.5vw, 18px);
  font-weight: 650;
  letter-spacing: -0.01em;
  word-break: break-word;
}

.contact-card-hint {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.closing {
  max-width: 900px;
  padding-bottom: calc(var(--section-y) * 2);
  text-align: center;
}

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

@media (max-width: 960px) {
  .topbar {
    grid-template-columns: 1fr auto;
  }

  .nav {
    display: none;
  }

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

  .hero {
    grid-template-columns: 1fr;
    gap: 0;
    min-height: 0;
    padding: 88px 0 var(--section-y-hero);
  }

  .hero + .section-band,
  #products.section-band {
    padding-top: var(--section-y-hero);
    padding-bottom: var(--section-y);
  }

  .console {
    min-height: 560px;
  }

  .hero-device {
    min-height: 520px;
  }

  .device-stack {
    grid-template-columns: 1fr;
  }

  .device-stack span {
    min-height: 44px;
  }

  .gallery-mosaic {
    grid-template-columns: repeat(6, minmax(0, 1fr));
    grid-auto-rows: 64px;
  }

  .gallery-tile--hero,
  .gallery-tile--wide {
    grid-column: span 6;
    grid-row: span 4;
  }

  .gallery-tile--tall,
  .gallery-tile--normal {
    grid-column: span 3;
    grid-row: span 3;
  }

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

  .product-card {
    min-height: 500px;
  }

  .product-card--wide {
    grid-column: auto;
  }

  .feature-grid,
  .signal-strip {
    grid-template-columns: 1fr 1fr;
  }

  .review-list {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .hero,
  .art-gallery-section,
  .lab-section,
  .journal-section,
  .team-section,
  .connections-section,
  .section-band,
  .closing,
  .signal-strip {
    width: min(100% - 28px, 1120px);
  }

  .team-card {
    width: 168px;
  }

  .gallery-mosaic {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-auto-rows: 120px;
    gap: 8px;
  }

  .gallery-tile--hero,
  .gallery-tile--wide,
  .gallery-tile--tall,
  .gallery-tile--normal {
    grid-column: span 2;
    grid-row: span 2;
  }

  .gallery-tile--normal:nth-child(3n) {
    grid-column: span 1;
    grid-row: span 2;
  }

  .gallery-lightbox-nav--prev {
    left: 8px;
  }

  .gallery-lightbox-nav--next {
    right: 8px;
  }

  .lead {
    font-size: 16px;
  }

  .console-grid {
    grid-template-columns: 1fr;
    grid-template-rows: auto;
  }

  .command-panel,
  .review-panel {
    grid-column: auto;
    grid-row: auto;
  }

  .hero-device-body {
    min-height: 492px;
  }

  .command-panel {
    min-height: 330px;
  }

  .orbital {
    inset: 52px 0 0;
    transform: scale(0.72);
  }

  .agent-row,
  .feature-grid,
  .signal-strip {
    grid-template-columns: 1fr;
  }

  .signal-strip div {
    min-height: 96px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .signal-strip div:last-child {
    border-bottom: 0;
  }
}
