/* Gazelle Design System homepage. Shared docs chrome lives in docs.css. */

.home {
  background: var(--color-surface-page);
}

.home main {
  padding-bottom: 0;
  overflow: hidden;
}

/* Same container as the docs `.wrap` (shared --wrap-max / --wrap-pad tokens
   from docs.css) so the content column lines up exactly with every other
   screen at every breakpoint. `width: 100%` guards against sections where
   this is also a grid container nested in a grid parent (e.g. the hero) —
   without it, browsers size the item by content instead of stretching it
   to the full column, quietly narrowing it below --wrap-max. */
.home-wrap {
  width: 100%;
  max-width: var(--wrap-max);
  margin-inline: auto;
  padding-inline: var(--wrap-pad);
}

.home-eyebrow {
  color: var(--color-fg-brand);
}

.home-hero {
  position: relative;
  min-height: min(780px, calc(100vh - var(--nav-h)));
  display: grid;
  align-items: center;
  background:
    linear-gradient(90deg, transparent 49.95%, rgb(3 58 126 / 7%) 50%, transparent 50.05%),
    linear-gradient(rgb(3 58 126 / 7%) 1px, transparent 1px),
    var(--color-surface-oyster);
  background-size: 100% 100%, 100% 80px, auto;
}

.home-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 76% 48%, rgb(150 230 240 / 30%), transparent 26%);
  pointer-events: none;
}

.home-hero__grid {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(400px, .9fr);
  align-items: center;
  gap: clamp(var(--space-12), 8vw, var(--space-20));
  padding-block: var(--space-16);
}

.home-hero__copy {
  max-width: 720px;
}

.home-hero__title {
  max-width: 9ch;
  margin: var(--space-4) 0 0;
  color: var(--color-fg-brand);
  font-family: var(--font-brand);
  font-size: clamp(var(--text-64), 8vw, 112px);
  font-weight: var(--font-weight-light);
  line-height: .88;
  letter-spacing: var(--tracking-tight);
  text-wrap: balance;
}

.home-hero__lede {
  max-width: 52ch;
  margin: var(--space-6) 0 0;
  color: var(--color-fg-muted);
}

.home-hero__actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--space-6);
  margin-top: var(--space-8);
}

.system-orbit {
  position: relative;
  width: min(100%, 500px);
  aspect-ratio: 1;
  justify-self: center;
}

.system-orbit__ring {
  position: absolute;
  border: 1px solid rgb(3 58 126 / 25%);
  border-radius: 50%;
}

.system-orbit__ring--outer {
  inset: 3%;
}

.system-orbit__ring--inner {
  inset: 22%;
  border-style: dashed;
}

.system-orbit__core {
  position: absolute;
  inset: 35%;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: var(--space-2);
  color: var(--color-fg-inverse);
  background: var(--color-surface-brand);
  border-radius: 50%;
  box-shadow: var(--shadow-lg);
}

.system-orbit__core .gz-text-label-sm {
  color: inherit;
}

.system-orbit__mark {
  font-size: clamp(var(--text-40), 5vw, var(--text-64));
  font-weight: var(--font-weight-light);
  line-height: 1;
}

.system-orbit__node {
  position: absolute;
  display: grid;
  place-content: center;
  width: clamp(56px, 7vw, 76px);
  aspect-ratio: 1;
  color: var(--color-fg-brand);
  background: var(--color-surface-card);
  border: 1px solid var(--color-border-subtle);
  border-radius: 50%;
  box-shadow: var(--shadow-md);
  font-size: var(--text-14);
  font-weight: var(--font-weight-medium);
}

.system-orbit__node--color {
  top: 1%;
  left: 42%;
  width: clamp(72px, 8vw, 96px);
}

.system-orbit__node--type {
  top: 46%;
  right: 0;
  color: var(--color-neutral-grey-950);
  background: var(--color-theme-yellow-500);
  font-size: var(--text-28);
  font-weight: var(--font-weight-light);
}

.system-orbit__node--space {
  bottom: 2%;
  left: 42%;
  color: var(--color-neutral-grey-950);
  background: var(--color-theme-light-green-500);
  font-size: var(--text-20);
}

.system-orbit__node--shape {
  top: 46%;
  left: 0;
  background: var(--color-theme-pink-500);
  border-radius: var(--radius-md);
  transform: rotate(12deg);
}

.home-snapshot {
  color: var(--color-fg-inverse);
  background: var(--color-surface-brand);
}

.home-snapshot__grid {
  display: grid;
  grid-template-columns: repeat(3, auto) 1fr;
  align-items: center;
  gap: clamp(var(--space-6), 5vw, var(--space-16));
  padding-block: var(--space-8);
}

.home-stat {
  display: flex;
  align-items: baseline;
  gap: var(--space-2);
}

.home-stat__value {
  font-size: var(--text-32);
  font-weight: var(--font-weight-light);
  line-height: 1;
}

.home-stat .gz-text-caption-lg {
  color: inherit;
  opacity: .75;
}

.home-snapshot__statement {
  margin: 0;
  justify-self: end;
  font-size: clamp(var(--text-20), 2vw, var(--text-28));
  font-weight: var(--font-weight-light);
  letter-spacing: var(--tracking-tight);
}

.home-paths {
  padding-block: clamp(var(--space-16), 9vw, 120px);
}

.home-section-head {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: end;
  gap: var(--space-6);
  margin-bottom: var(--space-12);
}

.home-section-head .home-eyebrow {
  grid-column: 1 / -1;
}

.home-section-head .gz-text-body-lg {
  max-width: 46ch;
  justify-self: end;
  color: var(--color-fg-muted);
}

.home-paths__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border-top: 1px solid var(--color-border-subtle);
  border-left: 1px solid var(--color-border-subtle);
}

.home-path {
  min-height: 480px;
  display: flex;
  flex-direction: column;
  padding: clamp(var(--space-6), 4vw, var(--space-10));
  color: var(--color-fg-primary);
  background: var(--color-surface-card);
  border-right: 1px solid var(--color-border-subtle);
  border-bottom: 1px solid var(--color-border-subtle);
  text-decoration: none;
  transition: background-color 180ms ease, color 180ms ease;
}

.home-path:hover {
  color: var(--color-fg-inverse);
  background: var(--color-surface-brand);
}

.home-path:focus-visible {
  position: relative;
  z-index: 1;
  outline: 3px solid var(--color-focus-ring);
  outline-offset: -3px;
}

.home-path__index {
  color: var(--color-fg-brand);
  transition: color 180ms ease;
}

.home-path__visual {
  height: 140px;
  display: flex;
  align-items: center;
  margin-block: var(--space-10) var(--space-8);
}

.home-path__visual--palette {
  align-items: flex-end;
  gap: var(--space-2);
}

.home-path__visual--palette i {
  width: 22%;
  border-radius: var(--radius-sm) var(--radius-sm) 0 0;
}

.home-path__visual--palette i:nth-child(1) {
  height: 55%;
  background: var(--color-brand-blue-gazelle-900);
}

.home-path__visual--palette i:nth-child(2) {
  height: 78%;
  background: var(--color-theme-light-blue-500);
}

.home-path__visual--palette i:nth-child(3) {
  height: 100%;
  background: var(--color-theme-light-green-500);
}

.home-path__visual--palette i:nth-child(4) {
  height: 68%;
  background: var(--color-theme-yellow-500);
}

/* Real gz-btn / gz-checkbox / gz-radio atoms, shown as static previews. Plain
   <span> stand-ins (not <button>/<label>/<input>) since the card itself is a
   link — same classes and tokens as the live components, just non-interactive
   and forced to their "checked" visual state. */
.home-path__visual--controls {
  gap: var(--space-6);
}

.home-path__visual--controls .gz-btn {
  pointer-events: none;
}

.home-path__visual--controls .gz-checkbox,
.home-path__visual--controls .gz-radio {
  cursor: inherit;
}

.home-path__visual--controls .gz-checkbox__box,
.home-path__visual--controls .gz-radio__dot {
  background: var(--color-surface-brand);
  border-color: var(--color-surface-brand);
}

/* The card itself turns brand-navy on hover — ring the controls in white so
   their shape stays legible instead of vanishing into the same fill. The
   button switches to the system's own --white style, exactly as the atom
   is meant to be used on a brand-navy surface. */
.home-path:hover .home-path__visual--controls .gz-checkbox__box,
.home-path:hover .home-path__visual--controls .gz-radio__dot {
  border-color: var(--color-fg-inverse);
}

.home-path:hover .home-path__visual--controls .gz-btn--primary {
  background: var(--color-neutral-grey-50);
  border-color: var(--color-neutral-grey-50);
  color: var(--color-fg-brand);
}

.home-path__visual--controls .gz-checkbox__check {
  opacity: 1;
  transform: scale(1);
}

.home-path__visual--controls .gz-radio__dot::after {
  transform: translate(-50%, -50%) scale(1);
}

.home-path__visual--icons {
  gap: var(--space-6);
  color: var(--color-fg-brand);
}

/* The card turns brand-navy on hover — lighten the icon strokes to
   Brand/50 so they stay visible instead of reading as navy-on-navy. */
.home-path:hover .home-path__visual--icons {
  color: var(--color-brand-blue-gazelle-50);
}

.home-path__visual--icons svg {
  width: clamp(48px, 7vw, 72px);
  height: auto;
}

.home-path__visual--spec {
  display: grid;
  align-content: center;
  gap: var(--space-3);
  padding: var(--space-5);
  color: var(--color-neutral-grey-100);
  background: var(--color-neutral-grey-950);
  border-radius: var(--radius-md);
  font-family: var(--mono);
  font-size: clamp(var(--text-12), 1.4vw, var(--text-14));
}

.home-path__visual--spec code {
  font: inherit;
}

.home-path__visual--spec b {
  color: var(--color-theme-light-blue-500);
  font-weight: var(--font-weight-normal);
}

.home-path__title {
  margin-top: auto;
  color: inherit;
}

.home-path__description {
  max-width: 44ch;
  margin-top: var(--space-3);
  color: var(--color-fg-muted);
  transition: color 180ms ease;
}

.home-path__link {
  margin-top: var(--space-6);
  color: var(--color-fg-brand);
  font-size: var(--text-14);
  font-weight: var(--font-weight-medium);
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
  transition: color 180ms ease;
}

.home-path__link span {
  display: inline-block;
  transition: transform 180ms ease;
}

.home-path:hover .home-path__index,
.home-path:hover .home-path__description,
.home-path:hover .home-path__link {
  color: inherit;
}

.home-path:hover .home-path__description {
  opacity: .75;
}

.home-path:hover .home-path__link span {
  transform: translateX(4px);
}

.home-path:hover .home-path__visual {
  filter: saturate(.8) brightness(1.12);
}

/* Keep the real atom colors exact — no hover filter drift. */
.home-path:hover .home-path__visual--controls {
  filter: none;
}

.home-flow {
  padding-block: clamp(var(--space-16), 9vw, 120px);
  color: var(--color-fg-inverse);
  background: var(--color-neutral-grey-950);
}

.home-flow__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(360px, .95fr);
  gap: clamp(var(--space-12), 8vw, 120px);
}

.home-flow .home-eyebrow {
  color: var(--color-theme-light-blue-500);
}

.home-flow__intro .gz-text-display-sm {
  max-width: 8ch;
  margin-top: var(--space-5);
  color: inherit;
}

.home-flow__steps {
  list-style: none;
  margin: 0;
  padding: 0;
  border-top: 1px solid rgb(255 255 255 / 20%);
}

.home-flow__steps li {
  display: grid;
  grid-template-columns: 48px 1fr;
  gap: var(--space-4);
  padding-block: var(--space-6);
  border-bottom: 1px solid rgb(255 255 255 / 20%);
}

.home-flow__number {
  color: var(--color-theme-light-blue-500);
  font-size: var(--text-14);
  font-weight: var(--font-weight-medium);
}

.home-flow__steps .gz-text-h4-lg {
  color: inherit;
}

.home-flow__steps .gz-text-body-sm {
  max-width: 42ch;
  margin-top: var(--space-2);
  color: var(--color-neutral-grey-300);
}

.home-footer {
  background: var(--color-surface-page);
}

.home-footer__inner {
  min-height: 120px;
  display: flex;
  align-items: center;
  gap: var(--space-8);
}

.home-footer__inner p {
  color: var(--color-fg-muted);
}

.home-footer__inner a {
  margin-left: auto;
  color: var(--color-fg-brand);
  text-decoration: none;
}

.home-footer__inner a:hover {
  text-decoration: underline;
}

.home-footer__inner a:focus-visible {
  outline: 3px solid var(--color-focus-ring);
  outline-offset: var(--space-1);
}

@media (max-width: 900px) {
  .home-hero {
    min-height: 0;
  }

  .home-hero__grid {
    grid-template-columns: 1fr;
  }

  .home-hero__copy {
    max-width: 760px;
  }

  .system-orbit {
    width: min(72vw, 460px);
  }

  .home-snapshot__grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .home-snapshot__statement {
    grid-column: 1 / -1;
    justify-self: start;
  }

  .home-section-head,
  .home-flow__grid {
    grid-template-columns: 1fr;
  }

  .home-section-head .gz-text-body-lg {
    justify-self: start;
  }

  .home-flow__intro .gz-text-display-sm {
    max-width: 11ch;
  }
}

@media (max-width: 720px) {
  .home .site-nav {
    height: auto;
  }

  .home .site-nav__inner {
    flex-wrap: wrap;
    padding-block: var(--space-4);
  }

  .home .site-nav__links {
    order: 2;
    width: 100%;
    justify-content: space-between;
    gap: var(--space-3);
  }

  .home .site-nav__link {
    font-size: var(--text-14);
  }

  .home-hero__grid {
    gap: var(--space-12);
    padding-block: var(--space-12);
  }

  .home-hero__title {
    font-size: clamp(var(--text-56), 18vw, var(--text-80));
  }

  .home-paths__grid {
    grid-template-columns: 1fr;
  }

  .home-path {
    min-height: 420px;
  }

  .home-path__visual {
    margin-block: var(--space-8) var(--space-6);
  }

  .home-footer__inner {
    align-items: flex-start;
    flex-direction: column;
    gap: var(--space-3);
    padding-block: var(--space-8);
  }

  .home-footer__inner a {
    margin-left: 0;
  }
}

@media (max-width: 480px) {
  .home-snapshot__grid {
    grid-template-columns: 1fr;
    gap: var(--space-4);
  }

  .home-stat {
    justify-content: space-between;
    padding-bottom: var(--space-3);
    border-bottom: 1px solid rgb(255 255 255 / 20%);
  }

  .home-snapshot__statement {
    margin-top: var(--space-3);
  }

  .home-section-head {
    margin-bottom: var(--space-8);
  }

  .home-path {
    min-height: 390px;
  }

  .home-flow__steps li {
    grid-template-columns: 36px 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  .home-path,
  .home-path__index,
  .home-path__description,
  .home-path__link,
  .home-path__link span {
    transition: none;
  }
}
