/*
 * Homepage hero Commercial Decision Theatre
 * ------------------------------------------
 * Slice 1 of docs/site/homepage-category-brand-upgrade/.
 *
 * The existing semantic four-step rail is intentionally retained for this slice
 * so we can change the visual hierarchy without widening runtime/copy scope. The
 * rail now reads as a compact Decision Spine:
 *
 *   Company Truth + Prospect Evidence -> Commercial Alignment ->
 *   Conversation progression -> Reply-ready handoff
 *
 * Commercial Alignment is the only dominant node. The other steps remain
 * respected inputs/downstream states, but no longer read as four equal features.
 * The old equal-weight vertical dividers are intentionally retired.
 */

.homepage-hero .homepage-hero-rail {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(220px, 1.52fr) minmax(0, 1fr) minmax(0, 0.92fr);
  align-items: stretch;
  max-width: 980px;
  min-height: 112px;
  margin-top: clamp(28px, 3.8vh, 40px);
  padding: 13px;
  border-color: hsl(var(--on-deep) / 0.16);
  border-radius: 20px;
  background: linear-gradient(180deg, hsl(var(--on-deep) / 0.062), hsl(var(--on-deep) / 0.032));
  box-shadow: inset 0 1px 0 hsl(var(--on-deep) / 0.08), 0 22px 60px hsl(193 70% 4% / 0.12);
  backdrop-filter: blur(10px);
}

.homepage-hero .homepage-hero-rail::before {
  content: "";
  pointer-events: none;
  position: absolute;
  left: 7%;
  right: 7%;
  top: 50%;
  z-index: 0;
  height: 1px;
  transform: translateY(-50%);
  background: linear-gradient(90deg, hsl(var(--on-deep) / 0.08), hsl(var(--proof-bright) / 0.34) 30%, hsl(var(--proof-bright) / 0.82) 44%, hsl(var(--proof-bright) / 0.28) 63%, hsl(var(--on-deep) / 0.08));
}

.homepage-hero .homepage-hero-rail-step {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  grid-template-rows: auto 1fr;
  align-content: center;
  column-gap: 10px;
  row-gap: 4px;
  min-width: 0;
  min-height: 84px;
  padding: 15px 16px;
  border: 1px solid transparent;
  border-radius: 14px;
  color: hsl(var(--on-deep-muted));
  text-align: left;
  transition: border-color 180ms ease, background 180ms ease, transform 180ms ease, box-shadow 180ms ease;
}

.homepage-hero .homepage-hero-rail-step:nth-child(1),
.homepage-hero .homepage-hero-rail-step:nth-child(3),
.homepage-hero .homepage-hero-rail-step:nth-child(4) {
  background: hsl(var(--deep) / 0.16);
}

.homepage-hero .homepage-hero-rail-step:nth-child(2) {
  min-height: 96px;
  margin: -5px 5px;
  padding: 17px 18px;
  border-color: hsl(var(--proof-bright) / 0.42);
  background: radial-gradient(circle at 24% 22%, hsl(var(--proof-bright) / 0.13), transparent 44%), linear-gradient(180deg, hsl(var(--on-deep) / 0.095), hsl(var(--on-deep) / 0.052));
  box-shadow: inset 0 1px 0 hsl(var(--on-deep) / 0.11), 0 0 0 1px hsl(var(--proof-bright) / 0.06), 0 18px 48px hsl(193 70% 4% / 0.2);
}

.homepage-hero .homepage-hero-rail-step:nth-child(2)::before,
.homepage-hero .homepage-hero-rail-step:nth-child(2)::after {
  content: "";
  pointer-events: none;
  position: absolute;
  top: 50%;
  width: 8px;
  height: 8px;
  border: 1px solid hsl(var(--proof-bright) / 0.66);
  border-radius: 999px;
  background: hsl(var(--deep));
  box-shadow: 0 0 0 4px hsl(var(--proof-bright) / 0.08);
  transform: translateY(-50%);
}

.homepage-hero .homepage-hero-rail-step:nth-child(2)::before { left: -10px; }
.homepage-hero .homepage-hero-rail-step:nth-child(2)::after { right: -10px; }
.homepage-hero .homepage-hero-rail-step + .homepage-hero-rail-step { border-left-color: transparent; }

.homepage-hero .homepage-hero-rail-step > span {
  grid-column: 1;
  grid-row: 1;
  align-self: end;
  padding-left: 1px;
  font-size: 9px;
  font-weight: 650;
  line-height: 1;
  letter-spacing: 0.1em;
  color: hsl(var(--on-deep-muted));
  opacity: 0.76;
}

.homepage-hero .homepage-hero-rail-step:nth-child(2) > span { color: hsl(var(--proof-bright)); opacity: 1; }

.homepage-hero .homepage-hero-rail-step > svg {
  grid-column: 1;
  grid-row: 2;
  align-self: start;
  width: 18px;
  height: 18px;
  margin-top: 4px;
  color: hsl(var(--on-deep-muted));
  stroke-width: 1.75;
}

.homepage-hero .homepage-hero-rail-step:nth-child(2) > svg {
  width: 21px;
  height: 21px;
  color: hsl(var(--proof-bright));
  filter: drop-shadow(0 0 10px hsl(var(--proof-bright) / 0.22));
}

.homepage-hero .homepage-hero-rail-step > strong {
  grid-column: 2;
  grid-row: 1 / span 2;
  align-self: center;
  overflow: visible;
  max-width: 18ch;
  color: hsl(var(--on-deep) / 0.88);
  font-size: 12.5px;
  font-weight: 600;
  line-height: 1.28;
  letter-spacing: -0.01em;
  text-wrap: balance;
  text-overflow: clip;
  white-space: normal;
}

.homepage-hero .homepage-hero-rail-step:nth-child(2) > strong {
  max-width: none;
  color: hsl(var(--on-deep));
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.018em;
}

.homepage-hero .homepage-hero-rail-step:nth-child(4) {
  border-color: hsl(var(--on-deep) / 0.09);
  background: linear-gradient(180deg, hsl(150 45% 36% / 0.09), hsl(var(--deep) / 0.16));
}

/* Growth bottleneck: turn the former three equal cards into a capacity diagram.
 * The content stays exactly the same; only hierarchy/geometry changes. */
.homepage-section--first .grid.lg\:grid-cols-3 {
  position: relative;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.76fr) minmax(0, 1.34fr);
  gap: 42px;
  max-width: 1080px;
  margin-inline: auto;
  align-items: stretch;
}

.homepage-section--first .grid.lg\:grid-cols-3::before,
.homepage-section--first .grid.lg\:grid-cols-3::after {
  content: "";
  pointer-events: none;
  position: absolute;
  top: 50%;
  z-index: 0;
  width: 42px;
  height: 1px;
  background: linear-gradient(90deg, hsl(var(--border)), hsl(var(--proof) / 0.74));
}

.homepage-section--first .grid.lg\:grid-cols-3::before { left: calc(34.5% - 21px); }
.homepage-section--first .grid.lg\:grid-cols-3::after { right: calc(39% - 21px); }

.homepage-section--first .grid.lg\:grid-cols-3 > article {
  position: relative;
  z-index: 1;
  min-height: 250px;
  border-radius: 18px;
  padding: 22px;
  overflow: hidden;
  box-shadow: 0 24px 70px hsl(var(--deep) / 0.055);
}

.homepage-section--first .grid.lg\:grid-cols-3 > article:nth-child(1) {
  background: linear-gradient(180deg, hsl(var(--card)), hsl(var(--accent) / 0.025));
}

.homepage-section--first .grid.lg\:grid-cols-3 > article:nth-child(1)::after {
  content: "";
  position: absolute;
  left: 22px;
  right: 22px;
  bottom: 22px;
  height: 72px;
  opacity: 0.72;
  background: linear-gradient(90deg, hsl(var(--accent) / 0.13) 1px, transparent 1px) 0 0 / 18px 18px, linear-gradient(hsl(var(--accent) / 0.13) 1px, transparent 1px) 0 0 / 18px 18px;
  border-radius: 10px;
  border: 1px solid hsl(var(--accent) / 0.12);
}

.homepage-section--first .grid.lg\:grid-cols-3 > article:nth-child(2) {
  align-self: center;
  min-height: 188px;
  border-style: dashed;
  background: hsl(var(--secondary) / 0.34);
}

.homepage-section--first .grid.lg\:grid-cols-3 > article:nth-child(2)::before,
.homepage-section--first .grid.lg\:grid-cols-3 > article:nth-child(2)::after {
  content: "";
  position: absolute;
  left: 50%;
  width: 38%;
  height: 1px;
  transform: translateX(-50%);
  background: hsl(var(--proof) / 0.42);
}

.homepage-section--first .grid.lg\:grid-cols-3 > article:nth-child(2)::before { bottom: 44px; }
.homepage-section--first .grid.lg\:grid-cols-3 > article:nth-child(2)::after { bottom: 34px; width: 24%; }

.homepage-section--first .grid.lg\:grid-cols-3 > article:nth-child(3) {
  border-color: hsl(var(--accent) / 0.28);
  background: radial-gradient(circle at 78% 18%, hsl(var(--proof) / 0.08), transparent 10rem), linear-gradient(180deg, hsl(var(--accent) / 0.035), hsl(var(--card)));
}

.homepage-section--first .grid.lg\:grid-cols-3 > article:nth-child(3)::after {
  content: "Governed preparation capacity";
  position: absolute;
  left: 22px;
  right: 22px;
  bottom: 22px;
  padding: 12px 14px;
  border: 1px solid hsl(var(--accent) / 0.2);
  border-radius: 10px;
  background: hsl(var(--accent) / 0.045);
  color: hsl(var(--accent));
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

@media (hover: hover) and (pointer: fine) {
  .homepage-hero .homepage-hero-rail-step:nth-child(2):hover {
    transform: translateY(-2px);
    border-color: hsl(var(--proof-bright) / 0.56);
    box-shadow: inset 0 1px 0 hsl(var(--on-deep) / 0.13), 0 0 0 1px hsl(var(--proof-bright) / 0.08), 0 22px 54px hsl(193 70% 4% / 0.24);
  }
}

@media (max-width: 1100px) {
  .homepage-section--first .grid.lg\:grid-cols-3 {
    grid-template-columns: 1fr;
    gap: 12px;
    max-width: 760px;
  }

  .homepage-section--first .grid.lg\:grid-cols-3::before,
  .homepage-section--first .grid.lg\:grid-cols-3::after { display: none; }

  .homepage-section--first .grid.lg\:grid-cols-3 > article,
  .homepage-section--first .grid.lg\:grid-cols-3 > article:nth-child(2) {
    min-height: 0;
    align-self: stretch;
  }

  .homepage-section--first .grid.lg\:grid-cols-3 > article:nth-child(1)::after,
  .homepage-section--first .grid.lg\:grid-cols-3 > article:nth-child(2)::before,
  .homepage-section--first .grid.lg\:grid-cols-3 > article:nth-child(2)::after,
  .homepage-section--first .grid.lg\:grid-cols-3 > article:nth-child(3)::after { display: none; }
}

@media (max-width: 900px) {
  .homepage-hero .homepage-hero-rail {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    max-width: 680px;
    min-height: 0;
    padding: 11px;
    gap: 8px;
  }

  .homepage-hero .homepage-hero-rail::before { display: none; }

  .homepage-hero .homepage-hero-rail-step {
    min-height: 74px;
    padding: 13px 15px;
    border-color: hsl(var(--on-deep) / 0.07);
    background: hsl(var(--deep) / 0.14);
  }

  .homepage-hero .homepage-hero-rail-step:nth-child(2) {
    grid-column: 1 / -1;
    grid-row: 2;
    min-height: 82px;
    margin: 0;
    border-color: hsl(var(--proof-bright) / 0.4);
  }

  .homepage-hero .homepage-hero-rail-step:nth-child(3) { grid-column: 1; grid-row: 3; }
  .homepage-hero .homepage-hero-rail-step:nth-child(4) { grid-column: 2; grid-row: 3; }

  .homepage-hero .homepage-hero-rail-step:nth-child(2)::before,
  .homepage-hero .homepage-hero-rail-step:nth-child(2)::after { display: none; }

  .homepage-hero .homepage-hero-rail-step > strong { max-width: none; font-size: 13px; }
  .homepage-hero .homepage-hero-rail-step:nth-child(2) > strong { font-size: 15px; }
}

@media (max-width: 767px) {
  .homepage-hero .homepage-hero-rail {
    grid-template-columns: 1fr;
    max-width: 430px;
    margin-top: 26px;
    padding: 8px;
    gap: 6px;
    border-radius: 17px;
  }

  .homepage-hero .homepage-hero-rail-step,
  .homepage-hero .homepage-hero-rail-step:nth-child(2),
  .homepage-hero .homepage-hero-rail-step:nth-child(3),
  .homepage-hero .homepage-hero-rail-step:nth-child(4) {
    grid-column: 1;
    grid-row: auto;
  }

  .homepage-hero .homepage-hero-rail-step { grid-template-columns: 32px minmax(0, 1fr); min-height: 60px; padding: 10px; }
  .homepage-hero .homepage-hero-rail-step:nth-child(2) { min-height: 72px; padding: 13px 12px; }
  .homepage-hero .homepage-hero-rail-step > strong { font-size: 12.5px; line-height: 1.32; }
  .homepage-hero .homepage-hero-rail-step:nth-child(2) > strong { font-size: 14px; }
}

@media (prefers-reduced-motion: reduce) {
  .homepage-hero .homepage-hero-rail { backdrop-filter: none; }
  .homepage-hero .homepage-hero-rail-step,
  .homepage-hero .homepage-hero-rail-step:nth-child(2) { transition: none; transform: none; }
  .homepage-hero .homepage-hero-rail-step:nth-child(2) > svg { filter: none; }
}
