/* House Intent — Monolith Video-First Layout */
:root {
  --bg: #000000;
  --hairline: rgba(255, 255, 255, 0.08);
  --text: #f5f5f7;
  --text-secondary: #a1a1aa;
  --text-soft: #63636e;
  --sans: 'Geist', 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

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

html {
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  overflow-x: hidden;
  line-height: 1.55;
}

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

.container {
  width: min(1140px, calc(100% - 48px));
  margin-inline: auto;
}

/* Header */
.site-nav {
  position: sticky;
  top: 0;
  z-index: 40;
  height: 64px;
  background: rgba(0, 0, 0, 0.78);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--hairline);
}

.nav-inner {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  font-size: 0.94rem;
  font-weight: 600;
  letter-spacing: -0.025em;
  color: #ffffff;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
  font-size: 0.86rem;
  color: var(--text-secondary);
}

.nav-links a {
  transition: color 150ms ease;
}

.nav-links a:hover {
  color: #ffffff;
}

/* Hero */
.hero {
  min-height: calc(100svh - 64px);
  padding: clamp(44px, 6.5vh, 72px) 0 clamp(48px, 7vh, 80px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

.hero-copy {
  text-align: center;
  max-width: 720px;
}

.hero-copy h1 {
  margin: 0;
  font-size: clamp(3rem, 7vw, 5.25rem);
  line-height: 0.98;
  font-weight: 600;
  letter-spacing: -0.055em;
  color: #ffffff;
}

.hero-lead {
  margin: 20px 0 0;
  font-size: clamp(1.04rem, 1.55vw, 1.24rem);
  line-height: 1.45;
  color: var(--text-secondary);
  letter-spacing: -0.015em;
}

.hero-powered {
  margin: 6px 0 0;
  font-size: clamp(0.88rem, 1.1vw, 0.98rem);
  color: var(--text-soft);
  letter-spacing: -0.01em;
}

/* Hero 3D Stage: Shared Plane (Voice PE Puck + Angled Glass Terminal Pane) */
.hero-stage {
  position: relative;
  width: min(820px, calc(100% - 40px));
  margin: clamp(32px, 5vh, 52px) auto 0;
  padding: 0 12px 24px 0;
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  align-items: end;
  gap: 0;
  perspective: 1150px;
  perspective-origin: 48% 55%;
}

/* Shared obsidian tabletop plane reflection linking puck & glass pane */
.hero-stage::before {
  content: "";
  position: absolute;
  left: 6%;
  right: 4%;
  bottom: 10px;
  height: 72px;
  border-radius: 50%;
  background: radial-gradient(
    ellipse 62% 55% at 42% 50%,
    rgba(56, 189, 248, 0.14) 0%,
    rgba(125, 211, 252, 0.05) 45%,
    transparent 76%
  );
  filter: blur(18px);
  pointer-events: none;
  opacity: 0;
  transition: opacity 720ms cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 0;
}

.hero-stage.is-awake::before {
  opacity: 1;
}

.hero-puck {
  position: relative;
  z-index: 2;
  min-width: 0;
  aspect-ratio: 800 / 640;
  mix-blend-mode: lighten;
  mask-image: radial-gradient(ellipse 88% 88% at 50% 50%, #000 70%, transparent 100%);
  -webkit-mask-image: radial-gradient(ellipse 88% 88% at 50% 50%, #000 70%, transparent 100%);
}

/* Seamless Video Presentation */
.demo-video {
  display: block;
  width: 100%;
  height: auto;
  background: #000000;
  cursor: pointer;
}

.feature-media .demo-video {
  mix-blend-mode: lighten;
}

.puck-video-intro {
  position: relative;
  z-index: 2;
}

.puck-video-loop {
  position: absolute;
  inset: 0;
  z-index: 1;
}

.hero-puck.is-looping .puck-video-intro {
  visibility: hidden;
  pointer-events: none;
}

.hero-puck.is-looping .puck-video-loop {
  z-index: 2;
}

/* 3D Angled Glass Terminal Pane seated on the same ground plane */
.hero-glass-wrap {
  position: relative;
  z-index: 2;
  min-width: 0;
  margin-left: -14px;
  padding-bottom: 7.5%;
  transform-style: preserve-3d;
}

.hero-glass-pane {
  position: relative;
  border-radius: 15px;
  padding: 12px 14px;
  overflow: hidden;
  background:
    radial-gradient(ellipse 75% 85% at 0% 62%, rgba(56, 189, 248, 0.15) 0%, transparent 65%),
    linear-gradient(138deg, rgba(255, 255, 255, 0.075) 0%, rgba(16, 20, 30, 0.44) 48%, rgba(6, 7, 11, 0.82) 100%);
  border: 1px solid rgba(255, 255, 255, 0.13);
  box-shadow:
    inset 1px 0 0 rgba(125, 211, 252, 0.36),
    inset 0 1px 0 rgba(255, 255, 255, 0.2),
    inset 0 -1px 0 rgba(125, 211, 252, 0.12),
    -26px 28px 64px rgba(0, 0, 0, 0.9),
    -12px 10px 44px rgba(56, 189, 248, 0.11);
  backdrop-filter: blur(18px) saturate(140%);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  transform-origin: left bottom;
  transform-style: preserve-3d;
  /* Hidden until the Voice PE puck lights up */
  opacity: 0;
  filter: blur(6px);
  transform: rotateY(-30deg) rotateX(8deg) rotateZ(-0.6deg) translate3d(-18px, 6px, -24px) scale(0.84);
  pointer-events: none;
  transition:
    opacity 640ms cubic-bezier(0.16, 1, 0.3, 1),
    filter 640ms cubic-bezier(0.16, 1, 0.3, 1),
    transform 680ms cubic-bezier(0.16, 1, 0.3, 1);
}

.hero-stage.is-awake .hero-glass-pane {
  opacity: 1;
  filter: blur(0);
  transform: rotateY(-24deg) rotateX(6deg) rotateZ(-0.5deg) translate3d(0, 0, 0) scale(0.88);
  pointer-events: auto;
}

.hero-stage.is-interactive .hero-glass-pane {
  transition: transform 240ms cubic-bezier(0.22, 1, 0.36, 1);
}

.hero-glass-pane::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  border-radius: inherit;
  background: linear-gradient(
    122deg,
    rgba(255, 255, 255, 0.09) 0%,
    rgba(255, 255, 255, 0.025) 26%,
    transparent 48%,
    rgba(125, 211, 252, 0.03) 100%
  );
}

.term-video {
  position: relative;
  z-index: 1;
  aspect-ratio: 838 / 480;
  background: transparent;
  mix-blend-mode: screen;
  border-radius: 6px;
}

/* Feature Bands */
.feature-band {
  border-top: 1px solid var(--hairline);
  padding: 112px 0;
}

.feature-grid {
  display: grid;
  grid-template-columns: 0.78fr 1.22fr;
  gap: 64px;
  align-items: center;
}

.feature-grid-reverse {
  grid-template-columns: 1.22fr 0.78fr;
}

.feature-copy {
  max-width: 440px;
}

.feature-copy h2 {
  margin: 0;
  font-size: clamp(1.9rem, 3.2vw, 2.55rem);
  line-height: 1.08;
  font-weight: 600;
  letter-spacing: -0.04em;
  color: #ffffff;
}

.feature-copy p {
  margin: 16px 0 0;
  font-size: 1rem;
  line-height: 1.6;
  color: var(--text-secondary);
}

/* Rex-inspired Caret List */
.caret-list {
  margin: 28px 0 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.caret-list li {
  position: relative;
  padding-left: 20px;
  font-size: 0.94rem;
  line-height: 1.5;
  color: var(--text);
}

.caret-list li::before {
  content: ">";
  position: absolute;
  left: 0;
  top: 0;
  color: var(--text-soft);
  font-weight: 500;
}

.feature-media {
  min-width: 0;
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--hairline);
  padding: 28px 0 40px;
  font-size: 0.84rem;
  color: var(--text-soft);
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.site-footer a {
  color: var(--text-secondary);
  transition: color 150ms ease;
}

.site-footer a:hover {
  color: #ffffff;
}

/* Responsive */
@media (max-width: 960px) {
  .hero {
    padding: 64px 0 44px;
  }

  .feature-band {
    padding: 72px 0;
  }

  .feature-grid,
  .feature-grid-reverse {
    grid-template-columns: 1fr;
    gap: 36px;
  }

  .feature-grid-reverse .feature-media {
    order: 2;
  }

  .feature-grid-reverse .feature-copy {
    order: 1;
  }

  .feature-copy {
    max-width: 560px;
  }
}

@media (max-width: 680px) {
  .hero {
    min-height: auto;
    padding: 44px 0 48px;
  }

  .hero-stage {
    width: calc(100% - 16px);
    padding: 0 6px 14px 0;
    grid-template-columns: 0.74fr 1.26fr;
    gap: 0;
    margin-top: 24px;
    perspective: 760px;
  }

  .hero-glass-wrap {
    margin-left: -6px;
    padding-bottom: 7%;
  }

  .hero-glass-pane {
    padding: 6px 7px;
    border-radius: 10px;
  }

  .hero-stage.is-awake .hero-glass-pane {
    transform: rotateY(-18deg) rotateX(4deg) rotateZ(-0.4deg) translate3d(0, 0, 0) scale(0.92);
  }
}

@media (max-width: 520px) {
  .container {
    width: calc(100% - 32px);
  }

  .nav-links {
    gap: 18px;
  }
}
