/* Home page sections only: hero, proof strip, solutions bento, use cases,
   the BMR flagship, the hardware pipeline, the Lab band and the company split.
   Everything shared with /lab lives in styles.css. */

/* Wide images inside these grids must not push the page sideways. */
.company-grid > *,
.flagship-grid > *,
.bento > *,
.case-grid > *,
.pipeline > *,
.proof-grid > * { min-width: 0; }

/* ---------------------------------------------------------------- hero */

.hero {
  position: relative;
  display: flex;
  align-items: center;
  min-height: min(760px, 100dvh);
  padding: 152px 0 96px;
  overflow: hidden;
  isolation: isolate;
}

.hero-media {
  position: absolute;
  inset: 0;
  z-index: -1;
}

.hero-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* The footage is decoration. The scrim is what makes the copy legible on it. */
.hero-scrim {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(11, 14, 19, 0.96) 0%, rgba(11, 14, 19, 0.82) 42%, rgba(11, 14, 19, 0.45) 100%),
    linear-gradient(180deg, rgba(11, 14, 19, 0.7) 0%, transparent 30%, rgba(11, 14, 19, 0.85) 100%);
}

.hero-inner { width: 100%; }

.hero-copy h1 {
  font-size: clamp(32px, 4.6vw, 54px);
  line-height: 1.12;
  max-width: 18ch;
}

.hero-copy p {
  margin-top: 22px;
  font-size: 17px;
  color: var(--ink-2);
  max-width: 44ch;
}

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

/* Hero copy arrives on load, not on scroll: it is already in view. The headline
   wipes up behind a clip so the first thing seen has a deliberate beat. */
@media (prefers-reduced-motion: no-preference) {
  .hero-copy h1,
  .hero-copy p,
  .hero-actions {
    animation: hero-rise 900ms var(--ease-out) both;
  }
  .hero-copy h1 { animation-name: hero-wipe; animation-delay: 100ms; }
  .hero-copy p { animation-delay: 260ms; }
  .hero-actions { animation-delay: 380ms; }
}

@keyframes hero-wipe {
  from { opacity: 0; transform: translateY(26px); clip-path: inset(0 0 100% 0); }
  to { opacity: 1; transform: none; clip-path: inset(0 0 -12% 0); }
}

@keyframes hero-rise {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: none; }
}

@supports (animation-timeline: scroll()) {
  @media (prefers-reduced-motion: no-preference) {
    .hero-video {
      animation: hero-drift linear both;
      animation-timeline: scroll(root);
      animation-range: 0 100vh;
    }
  }
}

@keyframes hero-drift {
  from { transform: scale(1.16) translate3d(0, 0, 0); }
  to { transform: scale(1.16) translate3d(0, 7%, 0); }
}

@media (max-width: 900px) {
  .hero { min-height: 0; padding: 124px 0 72px; }
  .hero-copy h1 { max-width: none; }
  .hero-scrim {
    background: linear-gradient(180deg, rgba(11, 14, 19, 0.86) 0%, rgba(11, 14, 19, 0.78) 55%, rgba(11, 14, 19, 0.95) 100%);
  }
}

/* --------------------------------------------------------------- proof */

.proof {
  border-top: 1px solid var(--line-soft);
  border-bottom: 1px solid var(--line-soft);
  background: var(--bg-2);
}

.proof-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 32px;
  padding-top: 40px;
  padding-bottom: 40px;
}
.proof-grid > div {
  position: relative;
  padding-left: 18px;
}
/* Was a static border. As a pseudo-element it can draw itself on entry. */
.proof-grid > div::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--accent);
  transform: scaleY(0);
  transform-origin: top;
  transition: transform 700ms var(--ease-out);
  transition-delay: var(--enter-delay, 0ms);
}
.proof-grid.is-in > div::before { transform: scaleY(1); }
.proof-grid strong {
  display: block;
  font-family: var(--display);
  font-size: 21px;
  font-weight: 400;
}
.proof-grid span {
  font-size: 13.5px;
  color: var(--ink-3);
}

@media (max-width: 900px) {
  .proof-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 520px) {
  .proof-grid { grid-template-columns: minmax(0, 1fr); }
}

/* ----------------------------------------------------------- solutions */

.solutions { padding: 112px 0; }

.bento {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 16px;
}
.cell {
  position: relative;
  grid-column: span 2;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  background: var(--bg-2);
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  overflow: hidden;
}
/* Spotlight sits above the tint but below the text. */
.cell::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0;
  transition: opacity 320ms ease;
  background: radial-gradient(320px circle at var(--mx, 50%) var(--my, 50%), rgba(74, 144, 232, 0.14), transparent 68%);
}
@media (hover: hover) and (pointer: fine) {
  .cell:hover::after { opacity: 1; }
}

.cell h3 { font-size: 21px; }
.cell p { color: var(--ink-2); font-size: 14.5px; }

.cell-wide { grid-column: span 4; }

.cell-tint {
  background:
    radial-gradient(360px 220px at 85% 0%, rgba(74, 144, 232, 0.22), transparent 70%),
    var(--bg-2);
}

@media (max-width: 900px) {
  .solutions { padding: 80px 0; }
  .bento { grid-template-columns: minmax(0, 1fr); }
  .cell, .cell-wide { grid-column: auto; }
}

/* ------------------------------------------------------------ flagship */

.flagship {
  padding: 112px 0;
  background: var(--bg-2);
  border-top: 1px solid var(--line-soft);
  border-bottom: 1px solid var(--line-soft);
}

.flagship-grid {
  display: grid;
  grid-template-columns: minmax(0, 6fr) minmax(0, 5fr);
  gap: 56px;
  align-items: center;
}

.flagship-copy h2 {
  font-size: clamp(26px, 3vw, 36px);
  line-height: 1.18;
}
.flagship-copy > p:not(.eyebrow) {
  margin-top: 18px;
  color: var(--ink-2);
}

@media (max-width: 900px) {
  .flagship { padding: 80px 0; }
  .flagship-grid { grid-template-columns: minmax(0, 1fr); gap: 40px; }
  .flagship-grid .shot { order: 2; }
}

/* ----------------------------------------------------------- use cases */

/* Deliberately not cards: the bento above already owns that layout family.
   These are open entries separated by a single hairline. */
.cases {
  padding: 112px 0;
  background: var(--bg-2);
  border-top: 1px solid var(--line-soft);
  border-bottom: 1px solid var(--line-soft);
}

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

.case {
  position: relative;
  padding-top: 20px;
}
/* The rule draws left to right as the entry lands, which reads as the section
   assembling itself rather than fading in. */
.case::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: rgba(255, 255, 255, 0.14);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 900ms var(--ease-out);
  transition-delay: var(--enter-delay, 0ms);
}
.case.is-in::before { transform: scaleX(1); }
.case h3 {
  font-size: 19px;
  margin-bottom: 8px;
}
.case p {
  color: var(--ink-2);
  font-size: 14.5px;
}

@media (max-width: 900px) {
  .cases { padding: 80px 0; }
  .case-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 34px 28px; }
}
@media (max-width: 560px) {
  .case-grid { grid-template-columns: minmax(0, 1fr); }
}

/* ------------------------------------------------------------ hardware */

.hardware { padding: 112px 0; }

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

.stage {
  padding: 30px 28px 32px;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  background:
    linear-gradient(180deg, rgba(74, 144, 232, 0.07), transparent 55%),
    var(--bg-2);
}
.stage { transition: transform 260ms var(--ease-out), border-color 260ms ease; }
@media (hover: hover) and (pointer: fine) {
  .stage:hover {
    transform: translateY(-4px);
    border-color: rgba(74, 144, 232, 0.4);
  }
}

.stage h3 {
  font-size: 22px;
  margin: 16px 0 10px;
}
.stage p {
  color: var(--ink-2);
  font-size: 14.5px;
}

.pipeline-note {
  margin-top: 28px;
  max-width: 62ch;
  font-size: 14px;
  color: var(--ink-3);
}

@media (max-width: 900px) {
  .hardware { padding: 80px 0; }
  .pipeline { grid-template-columns: minmax(0, 1fr); }
}

/* ------------------------------------------------------------ lab band */

/* A pointer to /lab, not a summary of it. Deliberately one short block on a
   ruled ground so it reads as a doorway rather than another feature section. */
.labband {
  padding: 96px 0;
  border-top: 1px solid var(--line-soft);
  background:
    radial-gradient(760px 380px at 12% 0%, rgba(74, 144, 232, 0.13), transparent 68%),
    var(--bg-2);
}
.labband-inner { max-width: 680px; }
.labband h2 {
  font-size: clamp(26px, 3vw, 36px);
  line-height: 1.18;
}
.labband p {
  margin-top: 18px;
  color: var(--ink-2);
}
.labband .btn { margin-top: 30px; }

@media (max-width: 900px) {
  .labband { padding: 76px 0; }
}

/* ------------------------------------------------------------- company */

.company {
  padding: 112px 0;
  border-top: 1px solid var(--line-soft);
}
.company-grid {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 4fr);
  gap: 56px;
  align-items: center;
}
.company-copy h2 { font-size: clamp(26px, 3vw, 36px); }
.company-copy p {
  margin-top: 20px;
  color: var(--ink-2);
  font-size: 16.5px;
}

@media (max-width: 900px) {
  .company-grid { grid-template-columns: minmax(0, 1fr); gap: 36px; }
  .company-grid .shot-tall { aspect-ratio: 16 / 10; }
}

/* --------------------------------------------------- reduced motion */

@media (prefers-reduced-motion: reduce) {
  .hero-video { display: none; }
  .proof-grid > div::before,
  .case::before {
    transform: none;
    transition: none;
  }
  .stage { transition: none; }
  .cell::after { display: none; }
  .hero-media {
    background: url('assets/img/hero-poster.jpg') center / cover no-repeat;
  }
}
