/* Hero: light surface with hash pattern + L-bracket corners.
   Transparent bg-color so the body grid shows through under the
   class-applied hash pattern image. */
.hero {
  position: relative;
  overflow: hidden;
  background-color: transparent;
  color: var(--color-foreground);
  padding-block: clamp(1rem, 2vw, 2rem);
}

/* Aura variant: when a Unicorn Studio background is mounted behind the
   glass strip, keep the strip translucent enough that the animated
   WebGL layer shows through as a colored haze. Previous 82% white tint
   was opaque enough to hide the aura almost entirely; 55% with an 18px
   blur is the balance point where the aura is clearly visible but
   body copy stays legible on top. Scoped to the hero so the global
   .site-main .container rule (see base.css) stays intact on every
   other section. */
.hero--aura > .container.hero__inner {
  background: color-mix(in oklch, var(--color-background) 55%, transparent);
  backdrop-filter: blur(18px) saturate(135%);
  -webkit-backdrop-filter: blur(18px) saturate(135%);
  box-shadow:
    0 1px 0 color-mix(in oklch, white 55%, transparent) inset,
    0 20px 40px -24px rgb(16 17 20 / 18%);
}

/* Gradient-accented word inside the H1. Uses only the two brand
   accents (teal → blue) so we stay on palette. */
.hero__title-accent {
  background: linear-gradient(90deg, var(--brand-teal) 0%, var(--brand-blue) 100%);
  background-clip: text;
  -webkit-background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
}

/* Strip the card's own padding from the hero so the right-hand media can
   run to the card edges. The copy column carries the padding instead. */
.site-main > .hero > .container {
  padding: 0;
  /* Clip the edge-to-edge media to the card's rounded corners now that
     its right/top/bottom edges are crisp (only the left edge feathers). */
  overflow: hidden;
}

.hero__inner {
  position: relative;
  display: grid;
  /* 60/40 split. Viz column needs width to breathe — the stage-path
     widget shows seven nodes in a row, the fleet-yield widget shows
     an 8×3 grid, and the convergence widget's SVG reads better wider.
     Copy column stays capped at max-width: 44rem (see below) so it
     doesn't get stretched thin at the expense of line-length. */
  grid-template-columns: minmax(0, 60fr) minmax(0, 40fr);
  align-items: stretch;
  gap: clamp(2rem, 5vw, 4rem);
  z-index: 1;
  /* No padding here — the copy column owns the inset; the media column
     runs to the card edges so the image reads larger. */
  padding-block: 0;
}

.hero__copy {
  max-width: 44rem;
  align-self: center;
  padding-block: clamp(2.5rem, 4vw, 3.5rem);
  padding-inline-start: var(--container-pad);
}

.hero__title {
  font-family: var(--font-display);
  font-size: clamp(2.75rem, 5.4vw, 4rem);
  font-weight: var(--font-weight-display);
  letter-spacing: -0.025em;
  line-height: 1.08;
  color: var(--color-foreground);
  margin: 1.5rem 0 1.5rem;
  max-width: 48rem;
  text-transform: capitalize;
}

.hero__subhead {
  font-size: clamp(1.125rem, 1.6vw, 1.25rem);
  font-weight: var(--font-weight-display);
  line-height: 1.35;
  letter-spacing: -0.01em;
  color: var(--color-foreground);
  margin: 0 0 1.5rem;
  max-width: 48ch;
}

.hero__body {
  font-size: var(--fs-base);
  line-height: var(--lh-normal);
  color: var(--color-muted-foreground);
  margin: 0 0 2.25rem;
  max-width: 58ch;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

/* --- Hero stepper --------------------------------------------------- */

/* Media column fills the row edge-to-edge and top-to-bottom so the image
   reads as large as the card. */
.hero__stepper-wrap { min-width: 0; height: 100%; }
.hero__stepper-wrap .media-ph { height: 100%; }

/* Hero media feathers on the LEFT edge only (where it meets the copy);
   the other edges run crisp to the card edges. Overrides the component's
   all-edges mask with a single left-to-right gradient. */
.hero__stepper-wrap .media-ph {
  -webkit-mask-image: linear-gradient(to right, transparent 0, #000 var(--media-ph-feather), #000 100%);
          mask-image: linear-gradient(to right, transparent 0, #000 var(--media-ph-feather), #000 100%);
}

.hero-stepper {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.hero-stepper__row {
  position: relative;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.875rem;
  padding: 0.875rem 1rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-card);
}

.hero-stepper__row--active {
  border-color: transparent;
  background: color-mix(in oklch, var(--brand-teal) 8%, transparent);
}

/* Active row: teal L-bracket corners, built on the row itself */
.hero-stepper__row--active::before,
.hero-stepper__row--active::after {
  content: "";
  position: absolute;
  width: 0.875rem;
  height: 0.875rem;
  pointer-events: none;
  border: 0 solid var(--brand-teal);
}
.hero-stepper__row--active::before {
  top: -1px; left: -1px;
  border-left-width: 1px; border-top-width: 1px;
}
.hero-stepper__row--active::after {
  top: -1px; right: -1px;
  border-right-width: 1px; border-top-width: 1px;
}
.hero-stepper__row--active .hero-stepper__corner-bl,
.hero-stepper__row--active .hero-stepper__corner-br {
  display: block;
}

.hero-stepper__num {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  font-weight: var(--font-weight-medium);
  color: var(--color-muted-foreground);
  letter-spacing: 0.08em;
  padding-top: 0.125rem;
}

.hero-stepper__row--active .hero-stepper__num { color: var(--brand-teal); }

.hero-stepper__text { min-width: 0; }

.hero-stepper__title {
  margin: 0 0 0.125rem;
  font-size: var(--fs-sm);
  font-weight: var(--font-weight-display);
  color: var(--color-foreground);
  line-height: var(--lh-tight);
  letter-spacing: -0.01em;
}

.hero-stepper__desc {
  margin: 0;
  font-size: var(--fs-xs);
  color: var(--color-muted-foreground);
  line-height: var(--lh-snug);
}

.hero-stepper__footer {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0.75rem 0 0 1rem;
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  font-weight: var(--font-weight-medium);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--brand-teal);
}

/* --- Responsive ----------------------------------------------------- */

@media (max-width: 960px) {
  .hero__inner {
    grid-template-columns: 1fr;
  }
  .hero__copy {
    max-width: none;
    padding-inline: var(--container-pad);
    padding-bottom: clamp(1rem, 3vw, 1.5rem);
  }
  /* Stacked: the media reverts to its own aspect ratio and is inset from
     the card edges like the copy. */
  .hero__stepper-wrap {
    max-width: 32rem;
    height: auto;
    padding-inline: var(--container-pad);
    padding-bottom: clamp(2rem, 6vw, 3rem);
  }
  .hero__stepper-wrap .media-ph { height: auto; }
}
