.product-hero {
  overflow: hidden;
  background: radial-gradient(circle at 78% 45%, rgba(124, 140, 255, 0.12), transparent 28%);
}

.product-hero__layout {
  display: grid;
  align-items: center;
  gap: var(--space-10);
}

.product-hero h1 {
  max-width: 14ch;
}

.product-hero .button-row {
  margin-top: var(--space-7);
}

.product-hero img {
  width: 100%;
  border-radius: var(--radius-lg);
  background: #090d15;
  box-shadow: var(--shadow-lg);
}

.product-index {
  position: sticky;
  z-index: 20;
  top: var(--header-height, 4.5rem);
  border-block: 1px solid var(--line);
  background: color-mix(in srgb, var(--surface-0), transparent 8%);
  backdrop-filter: blur(1rem);
}

.product-index .container {
  display: flex;
  overflow-x: auto;
}

.product-index a {
  min-width: max-content;
  padding: var(--space-4) var(--space-5);
  color: var(--ink-3);
  font-size: 0.75rem;
  text-decoration: none;
}

.product-index a:is(:hover, :focus-visible) {
  color: var(--ink-0);
  background: var(--surface-1);
}

.product-story {
  padding-block: clamp(5rem, 11vw, 9rem);
  scroll-margin-top: 8rem;
}

.product-story--tinted {
  border-block: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(124, 140, 255, 0.035), transparent 75%);
}

.product-story__header {
  display: grid;
  gap: var(--space-6);
  margin-bottom: clamp(3rem, 7vw, 6rem);
}

.product-story__header > div > .badge {
  margin-right: var(--space-3);
}

.product-story__number {
  color: var(--ink-3);
  font: 0.7rem var(--font-mono);
}

.product-story__header h2 {
  max-width: 17ch;
  margin-top: var(--space-5);
  font-size: clamp(2rem, 5vw, 4.5rem);
  text-wrap: balance;
}

.product-story__problem {
  display: grid;
  gap: var(--space-5);
  margin-bottom: var(--space-10);
}

.product-story__problem > div {
  padding: var(--space-6);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface-1);
}

.product-story__problem h3,
.story-step h3 {
  margin-block: var(--space-4) var(--space-2);
  font-size: clamp(1.25rem, 3vw, 1.8rem);
}

.product-preview {
  display: grid;
  min-height: 30rem;
  grid-template-columns: 4.5rem 1fr;
  overflow: hidden;
  border: 1px solid rgba(177, 196, 226, 0.16);
  border-radius: var(--radius-lg);
  color: #edf2ff;
  background:
    radial-gradient(circle at 80% 20%, rgba(124, 140, 255, 0.14), transparent 30%),
    #090d15;
  box-shadow: var(--shadow-lg);
}

.product-preview__rail {
  display: flex;
  align-items: center;
  flex-direction: column;
  gap: 1.8rem;
  padding-top: var(--space-6);
  border-right: 1px solid rgba(177, 196, 226, 0.12);
}

.product-preview__mark {
  width: 1.3rem;
  height: 1.3rem;
  border: 1px solid #a6b0ff;
  border-radius: 0.25rem;
  background: rgba(124, 140, 255, 0.18);
  transform: rotate(45deg);
}

.product-preview__rail i {
  width: 1.2rem;
  height: 0.15rem;
  border-radius: 1rem;
  background: #566175;
}

.product-preview__body {
  min-width: 0;
  padding: clamp(1.5rem, 5vw, 4rem);
}

.product-preview__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  color: #7d899f;
  font: 0.68rem var(--font-mono);
}

.product-preview__body > h3 {
  margin-block: var(--space-8);
  font-size: clamp(1.5rem, 4vw, 2.8rem);
}

.preview-metrics {
  display: grid;
  gap: var(--space-3);
}

.preview-metrics > div {
  min-height: 9rem;
  padding: var(--space-5);
  border: 1px solid rgba(177, 196, 226, 0.13);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.025);
}

.preview-metrics small,
.preview-metrics strong,
.preview-metrics span {
  display: block;
}

.preview-metrics small,
.preview-metrics span {
  color: #7d899f;
}

.preview-metrics strong {
  margin-block: var(--space-4) var(--space-1);
  font: 600 1.8rem var(--font-display);
}

.preview-chart {
  display: flex;
  height: 5rem;
  align-items: end;
  gap: var(--space-3);
  margin-top: var(--space-6);
}

.preview-chart span {
  flex: 1;
  height: 35%;
  border-radius: 0.3rem 0.3rem 0 0;
  background: linear-gradient(#7c8cff, rgba(124, 140, 255, 0.22));
}

.preview-chart span:nth-child(2) { height: 52%; }
.preview-chart span:nth-child(3) { height: 46%; }
.preview-chart span:nth-child(4) { height: 72%; }
.preview-chart span:nth-child(5) { height: 62%; }
.preview-chart span:nth-child(6) { height: 88%; }
.preview-chart span:nth-child(7) { height: 100%; }

.product-story__details,
.product-story__split {
  display: grid;
  gap: var(--space-10);
  margin-top: clamp(3rem, 8vw, 7rem);
}

.benefit-list {
  margin: var(--space-5) 0 0;
  padding: 0;
  border-top: 1px solid var(--line);
  list-style: none;
}

.benefit-list li {
  display: grid;
  gap: var(--space-1);
  padding-block: var(--space-4);
  border-bottom: 1px solid var(--line);
}

.benefit-list strong {
  color: var(--ink-1);
}

.benefit-list span {
  color: var(--ink-3);
  font-size: 0.8rem;
}

.product-story__details h3 {
  margin-block: var(--space-4);
}

.product-story__details .button-row {
  margin-top: var(--space-7);
}

.product-story__split img {
  width: 100%;
  border-radius: var(--radius-lg);
  background: #090d15;
  box-shadow: var(--shadow-lg);
}

.story-step {
  padding-block: var(--space-5);
  border-bottom: 1px solid var(--line);
}

.story-step > span {
  color: var(--brand-bright);
  font: 0.68rem var(--font-mono);
  text-transform: uppercase;
}

.product-story__footer {
  display: flex;
  align-items: flex-start;
  flex-direction: column;
  gap: var(--space-6);
  justify-content: space-between;
  margin-top: clamp(3rem, 8vw, 7rem);
  padding-top: var(--space-8);
  border-top: 1px solid var(--line);
}

.product-story__footer strong {
  display: block;
  max-width: 40rem;
  margin-top: var(--space-3);
  color: var(--ink-1);
  font-size: 1.1rem;
}

.api-preview {
  align-self: start;
  box-shadow: var(--shadow-lg);
}

.api-preview pre {
  min-height: 27rem;
  padding-block: var(--space-7);
}

.download-card__platform {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
}

.download-card__platform span {
  color: var(--ink-3);
  font-size: 0.7rem;
}

@media (min-width: 48rem) {
  .product-story__header {
    grid-template-columns: minmax(0, 1.35fr) minmax(18rem, 0.65fr);
    align-items: end;
  }

  .product-story__problem,
  .product-story__details,
  .product-story__split {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .preview-metrics {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .product-story__footer {
    align-items: center;
    flex-direction: row;
  }
}

@media (min-width: 64rem) {
  .product-hero__layout {
    grid-template-columns: minmax(0, 0.9fr) minmax(30rem, 1.1fr);
    gap: var(--space-16);
  }

  .product-story__split {
    grid-template-columns: minmax(28rem, 1.08fr) minmax(0, 0.92fr);
    align-items: center;
    gap: clamp(4rem, 9vw, 9rem);
  }

  .product-story__split--reverse > :first-child {
    grid-column: 2;
    grid-row: 1;
  }

  .product-story__split--reverse > :last-child {
    grid-column: 1;
    grid-row: 1;
  }
}
