/* NIOB Finance product detail pages */

.product-release-note { max-width: 60ch; margin-block: 1.5rem; color: var(--text-soft); font-size: 1rem; line-height: 1.7; }

.product-detail-page {
  background:
    radial-gradient(circle at 82% 10%, rgba(125, 69, 255, 0.13), transparent 31rem),
    radial-gradient(circle at 10% 46%, rgba(120, 232, 255, 0.055), transparent 34rem),
    var(--void);
}

.product-detail-page .global-header {
  border-bottom-color: rgba(229, 220, 255, 0.08);
  background: rgba(5, 2, 10, 0.84);
  backdrop-filter: blur(18px);
}

.product-detail-page main {
  overflow: clip;
}

.product-detail-hero {
  position: relative;
  min-height: clamp(43rem, 82vh, 58rem);
  padding-block: calc(var(--header-height) + clamp(4.5rem, 8vw, 8rem)) clamp(5rem, 9vw, 8rem);
  overflow: clip;
  border-bottom: 1px solid rgba(229, 220, 255, 0.1);
  background:
    linear-gradient(rgba(191, 164, 255, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(191, 164, 255, 0.045) 1px, transparent 1px),
    radial-gradient(circle at 76% 36%, rgba(125, 69, 255, 0.2), transparent 26rem),
    linear-gradient(155deg, #08030f, #020106 70%);
  background-size: 4rem 4rem, 4rem 4rem, auto, auto;
}

.product-detail-hero::after {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(2, 1, 6, 0.12), transparent 35%, rgba(2, 1, 6, 0.2)),
    linear-gradient(180deg, transparent 62%, var(--void));
  content: "";
  pointer-events: none;
}

.product-detail-hero__glow,
.product-detail-hero__backdrop {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.product-detail-hero__glow::before,
.product-detail-hero__glow::after,
.product-detail-hero__backdrop > span {
  position: absolute;
  border: 1px solid rgba(155, 104, 255, 0.16);
  border-radius: 50%;
  content: "";
}

.product-detail-hero__glow::before {
  top: 9%;
  right: 6%;
  width: min(48vw, 44rem);
  aspect-ratio: 1;
  box-shadow: 0 0 8rem rgba(125, 69, 255, 0.15);
}

.product-detail-hero__glow::after {
  top: 23%;
  right: 17%;
  width: min(22vw, 19rem);
  aspect-ratio: 1;
  border-style: dashed;
  border-color: rgba(120, 232, 255, 0.16);
}

.product-detail-hero__backdrop > span:nth-child(1) { top: 10%; right: 8%; width: 34rem; aspect-ratio: 1; }
.product-detail-hero__backdrop > span:nth-child(2) { top: 23%; right: 17%; width: 18rem; aspect-ratio: 1; border-style: dashed; }
.product-detail-hero__backdrop > span:nth-child(3) { right: 23%; bottom: 10%; width: 7rem; aspect-ratio: 1; border-color: rgba(120, 232, 255, 0.2); }

.product-detail-hero__inner,
.product-detail-hero__grid {
  position: relative;
  z-index: 1;
}

.product-detail-hero__inner,
.product-detail-hero__grid {
  display: grid;
  min-height: 32rem;
  align-items: center;
  grid-template-columns: minmax(0, 0.95fr) minmax(25rem, 0.85fr);
  gap: clamp(3rem, 7vw, 8rem);
}

.product-detail-hero__inner > .product-detail-hero__back,
.product-detail-hero__inner > .product-detail-hero__module-nav {
  grid-column: 1 / -1;
}

.product-detail-hero__inner:has(.product-detail-hero__module-nav) {
  align-content: center;
  grid-template-columns: minmax(0, 0.9fr) minmax(32rem, 1.1fr);
  grid-template-rows: auto minmax(0, 1fr);
}

.product-detail-hero__inner:has(.product-detail-hero__module-nav) .product-detail-hero__copy {
  grid-column: 1;
  grid-row: 2;
}

.product-detail-hero__inner:has(.product-detail-hero__module-nav) .product-detail-hero__back {
  margin-bottom: 0;
  grid-column: 1;
  grid-row: 1;
}

.product-detail-hero__back {
  width: max-content;
  margin-bottom: clamp(1rem, 2vw, 2rem);
  color: var(--muted);
}

.product-detail-hero__back::after {
  display: none;
}

.product-detail-hero__copy {
  display: grid;
  max-width: 48rem;
  align-content: center;
  gap: var(--space-5);
}

.product-detail-hero__copy h1 {
  max-width: 13ch;
  font-size: clamp(3.2rem, 2.1rem + 4.5vw, 7.6rem);
  line-height: 0.9;
  letter-spacing: -0.065em;
}

.product-detail-hero__copy h1 span {
  color: var(--violet-bright);
}

.product-detail-hero__lead {
  max-width: 38rem;
  color: var(--text);
  font-size: clamp(1.25rem, 1.04rem + 0.8vw, 1.8rem);
  font-weight: 580;
  line-height: 1.35;
}

.product-detail-hero__body,
.product-detail-hero__copy > p:not(.eyebrow, .product-detail-hero__lead) {
  max-width: 42rem;
  color: var(--muted);
  font-size: var(--step-1);
  line-height: 1.7;
}

.product-detail-hero__module-nav {
  display: grid;
  margin-top: 0;
  grid-column: 2 !important;
  grid-row: 1 / 3;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-self: center;
  border-top: 1px solid var(--border);
  border-left: 1px solid var(--border);
}

.product-detail-hero__module-nav a {
  display: grid;
  min-height: 5.7rem;
  padding: 1.1rem 1.3rem;
  grid-template-columns: 2.1rem minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.65rem;
  border-right: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  background: rgba(8, 4, 14, 0.58);
  color: var(--text-soft);
  font-size: 0.92rem;
  font-weight: 620;
  text-decoration: none;
  transition: background-color var(--duration-fast) ease, color var(--duration-fast) ease;
}

.product-detail-hero__module-nav a::after {
  color: var(--violet-bright);
  content: "↘";
}

.product-detail-hero__module-nav a:hover {
  background: rgba(125, 69, 255, 0.11);
  color: #fff;
}

.product-detail-hero__module-nav a span {
  color: var(--cyan);
  font-size: 0.65rem;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.12em;
}

.product-detail-hero__visual {
  position: relative;
  display: grid;
  min-height: 31rem;
  place-items: center;
  overflow: hidden;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-xl);
  background:
    radial-gradient(circle at 50% 48%, rgba(125, 69, 255, 0.22), transparent 18rem),
    linear-gradient(145deg, rgba(19, 11, 32, 0.82), rgba(5, 2, 10, 0.95));
  box-shadow: var(--shadow-raised);
}

.product-detail-hero__visual::after {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.05);
  content: "";
  pointer-events: none;
}

.product-detail-hero__core {
  position: relative;
  display: grid;
  width: min(84%, 26rem);
  aspect-ratio: 1;
  place-items: center;
  border: 1px solid rgba(155, 104, 255, 0.25);
  border-radius: 50%;
}

.product-detail-hero__core::before,
.product-detail-hero__core::after {
  position: absolute;
  border-radius: 50%;
  content: "";
}

.product-detail-hero__core::before { inset: 17%; border: 1px dashed rgba(120, 232, 255, 0.2); }
.product-detail-hero__core::after { inset: 34%; background: radial-gradient(circle, #261144, #07030d 70%); box-shadow: 0 0 4rem rgba(125, 69, 255, 0.3); }

.product-detail-hero__mark {
  position: relative;
  z-index: 2;
  font-size: 0.86rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  line-height: 1.35;
  text-align: center;
  text-transform: uppercase;
}

.product-detail-hero__signals span {
  position: absolute;
  z-index: 3;
  display: grid;
  min-width: 6.5rem;
  min-height: 2.7rem;
  place-items: center;
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  background: rgba(8, 4, 14, 0.92);
  color: var(--text-soft);
  font-size: 0.62rem;
  font-weight: 650;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.product-detail-hero__signals span:nth-child(1) { top: 3%; left: 50%; transform: translateX(-50%); }
.product-detail-hero__signals span:nth-child(2) { top: 50%; right: -4%; transform: translateY(-50%); }
.product-detail-hero__signals span:nth-child(3) { bottom: 3%; left: 50%; transform: translateX(-50%); }
.product-detail-hero__signals span:nth-child(4) { top: 50%; left: -4%; transform: translateY(-50%); }

.product-detail-hero__visual-label {
  position: absolute;
  z-index: 2;
  top: 1.25rem;
  left: 1.25rem;
  color: var(--cyan-soft);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.product-detail-hero__path {
  display: grid;
  width: min(82%, 31rem);
  gap: 0.8rem;
}

.product-detail-hero__path li {
  display: grid;
  min-height: 5.2rem;
  padding: 1rem 1.2rem;
  grid-template-columns: 2.2rem 1fr;
  align-items: center;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: rgba(8, 4, 14, 0.76);
  color: var(--text-soft);
  font-weight: 650;
}

.product-detail-hero__path li:nth-child(2) { margin-left: 8%; }
.product-detail-hero__path li:nth-child(3) { margin-left: 16%; border-color: rgba(120, 232, 255, 0.25); }
.product-detail-hero__path span { color: var(--cyan); font-size: 0.66rem; letter-spacing: 0.12em; }

.product-detail-modules,
.product-detail-story,
.product-insights-preview {
  position: relative;
  border-bottom: 1px solid rgba(229, 220, 255, 0.07);
}

.product-detail-modules {
  padding-block: clamp(6rem, 10vw, 10rem);
  background: linear-gradient(180deg, var(--void), #07030d 55%, var(--void));
}

.product-detail-modules__intro {
  margin-bottom: clamp(3.5rem, 7vw, 6rem);
}

.product-detail-modules__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border-top: 1px solid var(--border);
  border-left: 1px solid var(--border);
}

.product-module-card {
  display: grid;
  min-height: 26rem;
  padding: clamp(1.7rem, 3.5vw, 3.4rem);
  align-content: space-between;
  gap: var(--space-6);
  border-right: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  background:
    radial-gradient(circle at 90% 10%, rgba(125, 69, 255, 0.08), transparent 13rem),
    rgba(8, 4, 14, 0.42);
  scroll-margin-top: calc(var(--header-height) + 2rem);
}

.product-module-card__index,
.product-pillar__index {
  color: var(--cyan);
  font-size: 0.68rem;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.15em;
}

.product-module-card__copy {
  display: grid;
  gap: 0.85rem;
}

.product-module-card h3 {
  font-size: clamp(1.8rem, 1.55rem + 0.9vw, 2.55rem);
  line-height: 1;
}

.product-module-card__tagline {
  color: var(--text-soft) !important;
  font-size: var(--step-1) !important;
  font-weight: 580;
  line-height: 1.35 !important;
}

.product-module-card p {
  max-width: 38rem;
  color: var(--muted);
  font-size: 0.94rem;
  line-height: 1.7;
}

.product-detail-story__intro,
.product-detail-story__grid {
  display: grid;
  grid-template-columns: minmax(0, 0.88fr) minmax(24rem, 0.72fr);
  gap: clamp(3rem, 7vw, 8rem);
}

.product-detail-story__intro > div:first-child,
.product-detail-story__grid > .section-heading {
  display: grid;
  align-content: start;
  gap: var(--space-4);
}

.product-detail-story__intro h2,
.product-detail-story__grid h2 {
  max-width: 15ch;
  font-size: var(--step-4);
  line-height: 1.02;
}

.product-detail-story__copy,
.product-detail-story__body {
  display: grid;
  align-content: start;
  gap: var(--space-5);
}

.product-detail-story__copy p,
.product-detail-story__body > p {
  color: var(--muted);
  font-size: var(--step-1);
  line-height: 1.7;
}

.product-detail-story__body .product-risk-note {
  margin-top: var(--space-3);
  padding: 1.35rem 1.5rem;
  grid-template-columns: 1fr;
  gap: 0.55rem;
  border-radius: var(--radius-md);
}

.product-detail-story__body .product-risk-note > p {
  margin: 0;
}

.product-pillar-grid {
  display: grid;
  margin-top: clamp(3rem, 7vw, 6rem);
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border-top: 1px solid var(--border);
  border-left: 1px solid var(--border);
}

.product-pillar {
  display: grid;
  min-height: 17rem;
  padding: clamp(1.5rem, 3vw, 2.6rem);
  align-content: start;
  gap: var(--space-5);
  border-right: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  background: rgba(8, 4, 14, 0.34);
}

.product-pillar h3 {
  font-size: var(--step-2);
  line-height: 1.05;
}

.product-pillar p {
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.65;
}

.product-risk-note {
  display: grid;
  margin-top: clamp(4rem, 8vw, 7rem);
  padding: clamp(1.7rem, 4vw, 3.5rem);
  grid-template-columns: minmax(14rem, 0.6fr) minmax(20rem, 1.15fr) auto;
  align-items: center;
  gap: clamp(1.5rem, 4vw, 4rem);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  background:
    radial-gradient(circle at 0% 50%, rgba(125, 69, 255, 0.14), transparent 22rem),
    rgba(10, 5, 17, 0.82);
}

.product-risk-note > div,
.product-risk-note:not(:has(> div)) {
  align-content: start;
}

.product-risk-note h2 {
  margin-top: 0.65rem;
  font-size: var(--step-2);
  line-height: 1.08;
}

.product-risk-note > p {
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.65;
}

.product-risk-note > span {
  color: var(--cyan);
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.product-risk-note > strong {
  font-size: var(--step-2);
}

.product-insights-preview {
  background: linear-gradient(180deg, #07030d, var(--void));
}

.product-detail-cta {
  position: relative;
  overflow: clip;
  border-block: 1px solid rgba(229, 220, 255, 0.08);
  background:
    radial-gradient(circle at 78% 50%, rgba(125, 69, 255, 0.2), transparent 28rem),
    linear-gradient(125deg, rgba(14, 7, 24, 0.96), rgba(4, 2, 8, 0.98));
}

.product-detail-cta::before {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(rgba(191, 164, 255, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(191, 164, 255, 0.04) 1px, transparent 1px);
  background-size: 4rem 4rem;
  content: "";
  pointer-events: none;
}

.product-detail-cta .container {
  position: relative;
  z-index: 1;
  display: grid;
  max-width: 58rem;
  justify-items: center;
  gap: var(--space-5);
  text-align: center;
}

.product-detail-cta h2 {
  max-width: 15ch;
  font-size: var(--step-4);
  line-height: 1;
}

.product-detail-cta .container > p:not(.eyebrow) {
  max-width: 42rem;
  color: var(--muted);
  font-size: var(--step-1);
  line-height: 1.7;
}

.product-detail-cta .button-row {
  justify-content: center;
}

.product-insights-preview__gallery {
  display: grid;
  margin-top: clamp(3.5rem, 7vw, 6rem);
  grid-template-columns: repeat(5, minmax(0, 1fr));
  align-items: start;
  gap: clamp(0.8rem, 1.6vw, 1.4rem);
}

.product-insights-preview__gallery figure {
  min-width: 0;
}

.product-insights-preview__gallery figure:nth-child(even) {
  margin-top: 3.5rem;
}

.product-insights-preview__gallery img {
  width: 100%;
  border: 1px solid var(--border-strong);
  border-radius: clamp(1rem, 2vw, 1.7rem);
  box-shadow: 0 1.6rem 4rem rgba(0, 0, 0, 0.38);
}

.product-insights-preview__gallery figcaption {
  margin-top: 0.85rem;
  color: var(--muted);
  font-size: 0.76rem;
  text-align: center;
}

.product-detail-footer {
  border-top: 1px solid rgba(229, 220, 255, 0.08);
}

@media (max-width: 74rem) {
  .product-detail-hero__inner,
  .product-detail-hero__grid,
  .product-detail-hero__inner:has(.product-detail-hero__module-nav) {
    grid-template-columns: minmax(0, 0.9fr) minmax(24rem, 1.1fr);
    gap: 3.5rem;
  }

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

@media (max-width: 64rem) {
  .product-detail-hero {
    min-height: auto;
  }

  .product-detail-hero__inner,
  .product-detail-hero__grid,
  .product-detail-hero__inner:has(.product-detail-hero__module-nav) {
    min-height: 0;
    grid-template-columns: 1fr;
  }

  .product-detail-hero__inner:has(.product-detail-hero__module-nav) .product-detail-hero__copy,
  .product-detail-hero__inner:has(.product-detail-hero__module-nav) .product-detail-hero__back,
  .product-detail-hero__module-nav {
    grid-column: 1 !important;
    grid-row: auto;
  }

  .product-detail-hero__inner:has(.product-detail-hero__module-nav) {
    grid-template-rows: auto;
  }

  .product-detail-hero__visual {
    min-height: min(70vw, 34rem);
  }

  .product-detail-story__intro,
  .product-detail-story__grid {
    grid-template-columns: 1fr;
  }

  .product-risk-note {
    grid-template-columns: 1fr;
  }

  .product-risk-note .text-link {
    width: max-content;
  }
}

@media (max-width: 48rem) {
  .product-detail-hero {
    padding-block: calc(var(--header-height) + 3.5rem) 5rem;
    background-size: 2.5rem 2.5rem, 2.5rem 2.5rem, auto, auto;
  }

  .product-detail-hero__copy h1 {
    max-width: none;
    font-size: clamp(2.9rem, 13vw, 4.6rem);
  }

  .product-detail-hero__lead {
    font-size: 1.2rem;
  }

  .product-detail-hero__module-nav {
    grid-template-columns: 1fr;
  }

  .product-detail-hero__module-nav a {
    min-height: 4.5rem;
  }

  .product-detail-hero__visual {
    min-height: 29rem;
    border-radius: var(--radius-lg);
  }

  .product-detail-hero__core {
    width: min(82%, 21rem);
  }

  .product-detail-modules__grid,
  .product-pillar-grid {
    grid-template-columns: 1fr;
  }

  .product-module-card {
    min-height: 23rem;
  }

  .product-pillar {
    min-height: auto;
  }

  .product-risk-note {
    padding: 1.5rem;
  }

  .product-detail-cta::before {
    background-size: 2.5rem 2.5rem;
  }

  .product-insights-preview__gallery {
    display: flex;
    margin-inline: -1rem;
    padding: 0.5rem 1rem 2rem;
    overflow-x: auto;
    gap: 0.9rem;
    scroll-padding-left: 1rem;
    scroll-snap-type: x mandatory;
    scrollbar-width: thin;
  }

  .product-insights-preview__gallery figure,
  .product-insights-preview__gallery figure:nth-child(even) {
    width: min(72vw, 18.5rem);
    margin-top: 0;
    flex: 0 0 auto;
    scroll-snap-align: start;
  }
}

@media (prefers-reduced-motion: reduce) {
  .product-detail-hero *,
  .product-detail-modules *,
  .product-detail-story * {
    scroll-behavior: auto !important;
  }
}

@media print {
  .product-detail-page .global-header,
  .product-detail-page .global-footer,
  .product-detail-hero__module-nav .button-row {
    display: none !important;
  }

  .product-detail-hero,
  .product-detail-modules,
  .product-detail-story {
    min-height: auto;
    padding-block: 2rem;
    background: #fff !important;
    color: #111;
  }
}
