:root {
  color-scheme: dark;
  --ink: #f8fbff;
  --muted: #b9c6cc;
  --soft: #81919b;
  --night: #060909;
  --night-2: #0d1212;
  --line: rgba(240, 250, 248, 0.15);
  --glass: rgba(6, 12, 12, 0.62);
  --mint: #35f0b4;
  --cyan: #62d7ff;
  --amber: #ffbe66;
  --coral: #ff766f;
  --green: #9dff7e;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  background: var(--night);
}

body {
  margin: 0;
  min-width: 320px;
  overflow-x: hidden;
  color: var(--ink);
  background: var(--night);
  font-family:
    Inter,
    ui-sans-serif,
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
}

body::selection {
  color: #04100e;
  background: rgba(53, 240, 180, 0.68);
}

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

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

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

.topbar {
  position: fixed;
  inset: 0 0 auto;
  z-index: 30;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 28px;
  padding: 16px clamp(18px, 4vw, 56px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(5, 8, 9, 0.68);
  backdrop-filter: blur(22px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  width: max-content;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 8px;
  color: #04100e;
  font-weight: 900;
  background:
    linear-gradient(135deg, var(--mint), var(--cyan) 52%, var(--amber));
  box-shadow: 0 16px 38px rgba(53, 240, 180, 0.2);
}

.brand strong,
.brand small {
  display: block;
  letter-spacing: 0;
}

.brand strong {
  font-size: 15px;
}

.brand small {
  margin-top: 2px;
  color: var(--soft);
  font-size: 12px;
}

.navlinks {
  display: flex;
  align-items: center;
  gap: 28px;
  color: #d9e3e7;
  font-size: 14px;
}

.navlinks a {
  position: relative;
  padding: 9px 0;
}

.navlinks a::after {
  position: absolute;
  right: 100%;
  bottom: 2px;
  left: 0;
  height: 2px;
  content: "";
  background: var(--mint);
  transition: right 220ms ease;
}

.navlinks a:hover::after {
  right: 0;
}

.nav-cta,
.primary-link,
.secondary-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  border-radius: 999px;
  font-weight: 850;
  letter-spacing: 0;
}

.nav-cta {
  justify-self: end;
  padding: 0 22px;
  color: #04100e;
  background: var(--mint);
  box-shadow: 0 18px 38px rgba(53, 240, 180, 0.18);
}

.cinema-flow {
  position: relative;
  min-height: 500vh;
}

.sticky-cinema {
  position: sticky;
  top: 0;
  z-index: 1;
  width: 100%;
  height: 100vh;
  margin-bottom: -100vh;
  overflow: hidden;
  background: #050707;
}

.video-stack,
.scene-video,
.scene-grade,
.film-grain,
#three-canvas {
  position: absolute;
  inset: 0;
}

.scene-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  filter: saturate(1.06) contrast(1.08);
  transform: scale(1.045);
  transition:
    opacity 900ms ease,
    transform 5600ms ease;
}

.scene-video.is-active {
  opacity: 1;
  transform: scale(1.015);
}

#three-canvas {
  z-index: 4;
  width: 100%;
  height: 100%;
  pointer-events: none;
  opacity: 0.8;
  mix-blend-mode: screen;
}

.scene-grade {
  z-index: 5;
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(3, 5, 6, 0.84), rgba(3, 5, 6, 0.4) 28%, rgba(3, 5, 6, 0.14) 52%, rgba(3, 5, 6, 0.64)),
    linear-gradient(180deg, rgba(3, 5, 6, 0.76), transparent 24%, transparent 62%, rgba(3, 5, 6, 0.88));
}

.film-grain {
  z-index: 7;
  pointer-events: none;
  opacity: 0.15;
  background-image:
    repeating-linear-gradient(12deg, rgba(255, 255, 255, 0.05) 0 1px, transparent 1px 10px),
    repeating-linear-gradient(96deg, rgba(0, 0, 0, 0.16) 0 2px, transparent 2px 18px);
  mix-blend-mode: overlay;
}

.product-layer {
  position: absolute;
  right: clamp(20px, 7vw, 112px);
  top: 15vh;
  z-index: 9;
  width: min(38vw, 580px);
  height: 70vh;
  pointer-events: none;
  perspective: 1500px;
}

.phone-device,
.dashboard-device {
  position: absolute;
  right: 0;
  top: 50%;
  transform-style: preserve-3d;
  transition:
    opacity 680ms ease,
    transform 900ms cubic-bezier(0.19, 1, 0.22, 1),
    filter 680ms ease;
}

.phone-device {
  width: min(290px, 38vw);
  transform: translate3d(0, -50%, 0) rotateY(-22deg) rotateZ(4deg);
}

.dashboard-device {
  width: min(560px, 44vw);
  transform: translate3d(22px, -50%, 0) rotateY(-17deg) rotateX(2deg);
}

.phone-frame,
.dashboard-frame {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(5, 10, 11, 0.88);
  box-shadow:
    0 36px 90px rgba(0, 0, 0, 0.5),
    inset 0 1px 0 rgba(255, 255, 255, 0.18);
}

.phone-frame {
  aspect-ratio: 0.47;
  border-width: 10px;
  border-color: #0b1215;
  border-radius: 38px;
}

.phone-notch {
  position: absolute;
  top: 12px;
  left: 50%;
  z-index: 2;
  width: 68px;
  height: 8px;
  border-radius: 999px;
  transform: translateX(-50%);
  background: rgba(9, 14, 15, 0.22);
}

.phone-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition:
    opacity 180ms ease,
    transform 580ms ease;
}

.dashboard-frame {
  padding: 16px;
  border-radius: 8px;
}

.dashboard-topline {
  display: block;
  width: 120px;
  height: 8px;
  margin-bottom: 14px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--mint), var(--cyan));
  opacity: 0.78;
}

.dashboard-frame img {
  width: 100%;
  border-radius: 6px;
  box-shadow: 0 20px 46px rgba(0, 0, 0, 0.28);
  transition:
    opacity 180ms ease,
    transform 580ms ease;
}

.device-shadow {
  position: absolute;
  right: 8%;
  bottom: -26px;
  left: 8%;
  height: 52px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.5);
  filter: blur(22px);
}

body[data-visual="phone"] .dashboard-device,
body[data-visual="dashboard"] .phone-device {
  opacity: 0;
  filter: blur(8px);
}

body[data-visual="phone"] .phone-device,
body[data-visual="dashboard"] .dashboard-device {
  opacity: 1;
  filter: blur(0);
}

body[data-scene="hero"] .phone-device {
  transform: translate3d(0, -48%, 0) rotateY(-24deg) rotateZ(6deg) scale(1.02);
}

body[data-scene="scan"] .phone-device {
  transform: translate3d(-42px, -52%, 0) rotateY(-18deg) rotateZ(-2deg) scale(1.04);
}

body[data-scene="split"] .phone-device {
  transform: translate3d(-12vw, -48%, 0) rotateY(-12deg) rotateZ(-7deg) scale(0.96);
}

body[data-scene="ops"] .dashboard-device {
  transform: translate3d(0, -50%, 0) rotateY(-12deg) rotateX(3deg) scale(1.02);
}

body[data-scene="self"] .phone-device {
  transform: translate3d(-3vw, -50%, 0) rotateY(-20deg) rotateZ(4deg) scale(1);
}

.scene-index {
  position: absolute;
  right: 28px;
  top: 50%;
  z-index: 12;
  display: grid;
  gap: 12px;
  transform: translateY(-50%);
}

.scene-index span {
  width: 9px;
  height: 32px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.22);
  transition:
    height 260ms ease,
    background 260ms ease;
}

.scene-index span.is-active {
  height: 56px;
  background: var(--mint);
}

.chapter {
  position: relative;
  z-index: 10;
  display: grid;
  min-height: 100vh;
  align-items: center;
  padding: 120px clamp(20px, 7vw, 104px);
}

.hero-chapter {
  min-height: 96vh;
  padding-top: 132px;
  padding-bottom: 88px;
}

.hero-copy {
  width: min(760px, calc(100vw - 44px));
  text-shadow: 0 22px 58px rgba(0, 0, 0, 0.74);
}

.chapter-right {
  justify-items: start;
}

.chapter-left {
  justify-items: start;
}

.chapter-copy {
  width: min(560px, 92vw);
  padding: 28px 0 28px 28px;
  border-left: 3px solid var(--mint);
  background:
    linear-gradient(90deg, rgba(4, 8, 9, 0.72), rgba(4, 8, 9, 0.22) 72%, transparent);
  text-shadow: 0 18px 42px rgba(0, 0, 0, 0.86);
}

.eyebrow {
  margin: 0 0 18px;
  color: var(--mint);
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  letter-spacing: 0;
}

h1 {
  margin: 0;
  font-size: clamp(68px, 12vw, 162px);
  line-height: 0.84;
}

h2 {
  margin: 0;
  font-size: clamp(40px, 5vw, 82px);
  line-height: 0.94;
}

h3 {
  margin: 0;
  font-size: 26px;
  line-height: 1.12;
}

.hero-line,
.chapter-copy p,
.section-heading p,
.pilot-content p {
  color: var(--muted);
  font-size: clamp(18px, 2vw, 22px);
  line-height: 1.62;
}

.hero-line {
  max-width: 680px;
  margin: 26px 0 0;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 34px;
}

.primary-link {
  padding: 0 26px;
  color: #04100e;
  background: var(--mint);
  box-shadow: 0 22px 46px rgba(53, 240, 180, 0.2);
}

.secondary-link {
  padding: 0 24px;
  color: var(--ink);
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(18px);
}

.hero-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 32px;
  color: #e8fff7;
}

.hero-facts span {
  padding: 10px 14px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  background: rgba(4, 9, 10, 0.38);
  backdrop-filter: blur(16px);
  font-size: 14px;
  font-weight: 800;
}

.step {
  display: inline-grid;
  place-items: center;
  min-width: 52px;
  height: 32px;
  margin-bottom: 24px;
  border-radius: 999px;
  color: #07100f;
  background: var(--amber);
  font-weight: 900;
}

.systems-section,
.proof-section,
.pilot-section {
  position: relative;
  z-index: 11;
  padding: 120px clamp(20px, 7vw, 104px);
  background:
    linear-gradient(180deg, #060909, #0c1111 52%, #060909);
}

.section-heading,
.pilot-content {
  max-width: 900px;
}

.system-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin-top: 48px;
}

.system-card,
.proof-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.055);
  box-shadow: 0 28px 72px rgba(0, 0, 0, 0.28);
}

.system-card {
  overflow: hidden;
  color: #07100f;
  background: #f4f8f6;
}

.system-card img {
  width: 100%;
  aspect-ratio: 1.35;
  object-fit: cover;
  object-position: top center;
}

.system-card div {
  padding: 26px;
}

.system-card span,
.proof-card span {
  display: inline-block;
  margin-bottom: 18px;
  color: #137257;
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.system-card p,
.proof-card p {
  color: #53615f;
  line-height: 1.58;
}

.proof-section {
  padding-top: 0;
}

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

.proof-card {
  min-height: 260px;
  padding: 28px;
  color: var(--ink);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.035));
}

.proof-card span {
  color: var(--amber);
}

.proof-card h3 {
  margin-top: 34px;
}

.proof-card p {
  color: var(--muted);
}

.pilot-section {
  display: grid;
  min-height: 92vh;
  place-items: center;
  text-align: center;
  background:
    linear-gradient(140deg, rgba(53, 240, 180, 0.12), transparent 32%),
    linear-gradient(230deg, rgba(255, 190, 102, 0.12), transparent 34%),
    #060909;
}

.pilot-content {
  display: grid;
  justify-items: center;
}

.pilot-content img {
  width: min(270px, 66vw);
  margin-bottom: 36px;
  opacity: 0.9;
}

.pilot-content .primary-link {
  margin-top: 18px;
}

.reveal {
  opacity: 0;
  transform: translateY(34px);
  transition:
    opacity 720ms ease,
    transform 720ms cubic-bezier(0.19, 1, 0.22, 1);
}

.reveal.in-view {
  opacity: 1;
  transform: translateY(0);
}

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

  .navlinks {
    display: none;
  }

  .product-layer {
    right: 24px;
    top: 12vh;
    width: min(48vw, 430px);
  }

  .dashboard-device {
    width: min(520px, 56vw);
  }

  .chapter-left,
  .chapter-right {
    justify-items: start;
  }

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

@media (max-width: 740px) {
  .topbar {
    padding: 13px 16px;
  }

  .brand small,
  .scene-index {
    display: none;
  }

  .nav-cta {
    min-height: 42px;
    padding: 0 14px;
    font-size: 13px;
  }

  .sticky-cinema {
    height: 62vh;
  }

  .cinema-flow {
    min-height: auto;
  }

  .product-layer {
    display: none;
  }

  .phone-device {
    width: min(170px, 42vw);
  }

  .dashboard-device {
    width: min(360px, 66vw);
  }

  .dashboard-frame {
    padding: 10px;
  }

  .chapter {
    min-height: 88vh;
    align-items: end;
    padding: 56vh 20px 54px;
  }

  .hero-chapter {
    min-height: 96vh;
    padding-top: 52vh;
  }

  .chapter-copy {
    width: 100%;
    padding: 22px 0 22px 20px;
  }

  h1 {
    font-size: clamp(58px, 20vw, 94px);
  }

  h2 {
    font-size: clamp(34px, 11vw, 52px);
  }

  .hero-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .primary-link,
  .secondary-link {
    width: 100%;
  }

  .systems-section,
  .proof-section,
  .pilot-section {
    padding: 86px 20px;
  }

  .system-grid,
  .proof-grid {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
