/* CADi product descriptions — widescreen editorial layout.

   Full product pages share one responsive composition: on wide screens the
   product identity becomes a persistent left masthead while the evidence and
   product detail read as a compact dossier on the right. The original linear
   document remains intact below the breakpoint, which keeps phone, tablet and
   iframe-preview behaviour predictable. */

:root {
  --product-rail: clamp(390px, 34vw, 680px);
}

/* Oversized decorative elements must never create horizontal scrolling on
   narrow phones. `clip` avoids turning either element into a scroll container. */
html,
body {
  overflow-x: clip;
}

/* Shared touch targets, including standalone briefs that do not load
   partner-signal.css. */
.video-scroll-cue,
.partner-signal {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
}

.video-scroll-cue {
  flex-direction: column;
}

@media (min-width: 1180px) {
  html {
    scroll-padding-top: 2rem;
  }

  body {
    min-height: 100vh;
  }

  body > .ring {
    top: -24vw;
    right: auto;
    left: -31vw;
    width: 78vw;
    height: 78vw;
    opacity: 0.42;
  }

  body > .hero {
    position: fixed;
    inset: 0 auto 0 0;
    z-index: 2;
    display: flex;
    width: var(--product-rail);
    min-height: 100vh;
    align-items: center;
    overflow-y: auto;
    padding: 0;
    border-right: 1px solid var(--halo-line);
    background:
      radial-gradient(circle at 82% 18%, var(--halo-soft), transparent 34%),
      linear-gradient(145deg, rgba(10, 13, 16, 0.94), rgba(0, 0, 0, 0.985) 68%);
    box-shadow: 28px 0 80px rgba(0, 0, 0, 0.38);
    scrollbar-color: var(--halo-line) transparent;
    scrollbar-width: thin;
  }

  body > .hero::after {
    position: absolute;
    inset: 0 0 0 auto;
    width: 1px;
    background: linear-gradient(180deg, transparent, var(--halo), transparent);
    content: "";
    opacity: 0.48;
    pointer-events: none;
  }

  body > .hero > .wrap {
    width: 100%;
    max-width: none;
    margin: 0;
    padding: clamp(2rem, 3.4vw, 4.5rem);
  }

  body > .hero h1 {
    max-width: 8.8em;
    font-size: clamp(3rem, 4.15vw, 5.35rem);
  }

  body > .hero .lede {
    max-width: 29em;
    margin-top: clamp(1.1rem, 2.5vh, 1.8rem);
    font-size: clamp(1rem, 1.22vw, 1.3rem);
  }

  body > .hero .oneliner {
    max-width: 31em;
    margin-top: 1rem;
    font-size: clamp(0.92rem, 1vw, 1.08rem);
    color: var(--ink-2);
  }

  body > .hero .agent-film-frame,
  body > .hero .player-film-frame,
  body > .hero .proof-film-frame,
  body > .hero .pay-film-frame {
    margin-top: clamp(1.5rem, 3vh, 2.5rem);
  }

  body > .hero .video-scroll-cue {
    margin-top: 0.8rem;
  }

  body > section:not(.hero),
  body > footer {
    width: calc(100% - var(--product-rail));
    margin-left: var(--product-rail);
  }

  body > section:not(.hero) > .wrap,
  body > footer > .wrap {
    width: 100%;
    max-width: 1180px;
    padding-right: clamp(2rem, 4.25vw, 5rem);
    padding-left: clamp(2rem, 4.25vw, 5rem);
  }

  .sec {
    padding: clamp(2.2rem, 3.5vw, 3.8rem) 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.045);
  }

  .sec > .wrap {
    display: grid;
    grid-template-columns: minmax(155px, 0.5fr) minmax(0, 1.5fr);
    gap: 1rem clamp(2rem, 3vw, 3.5rem);
    align-items: start;
  }

  .sec > .wrap > h2 {
    display: block;
    grid-column: 1;
    grid-row: 1;
    margin: 0;
    font-size: clamp(1.45rem, 1.75vw, 2rem);
  }

  .sec > .wrap > :not(h2) {
    grid-column: 2;
  }

  .sec > .wrap > p {
    max-width: 66ch;
    margin-bottom: 0.8rem;
  }

  .sec > .wrap > .cards,
  .sec > .wrap > .levels {
    grid-column: 1 / -1;
    margin-top: 0.7rem;
  }

  .cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: clamp(0.75rem, 1.1vw, 1.15rem);
  }

  .card {
    min-height: 100%;
    padding: clamp(1rem, 1.25vw, 1.4rem);
    background:
      linear-gradient(135deg, var(--card-2), transparent 72%),
      var(--card);
  }

  .levels {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: clamp(0.8rem, 1.25vw, 1.25rem);
  }

  .level {
    min-height: 100%;
  }

  .sec > .wrap > .note:only-child {
    grid-column: 1 / -1;
  }

  .note {
    display: grid;
    width: 100%;
    max-width: none;
    grid-template-columns: minmax(145px, 0.4fr) minmax(0, 1.6fr);
    gap: 0.7rem clamp(1.5rem, 2.5vw, 2.8rem);
    margin-top: 0;
    padding: clamp(1.25rem, 1.75vw, 1.8rem);
  }

  .note h3 {
    grid-column: 1;
    grid-row: 1 / span 3;
    margin: 0;
  }

  .note p {
    grid-column: 2;
    margin: 0;
  }

  .cta {
    padding: clamp(2.25rem, 3.8vw, 4rem) 0;
    text-align: left;
  }

  .cta > .wrap {
    display: grid;
    grid-template-columns: minmax(180px, 0.62fr) minmax(0, 1.38fr);
    gap: 0.8rem clamp(2rem, 3vw, 3.5rem);
    align-items: center;
  }

  .cta h2,
  .partner-callout-title {
    grid-column: 1;
    grid-row: 1 / span 2;
    justify-content: flex-start;
    width: auto;
    margin: 0;
    text-align: left;
  }

  .cta p {
    grid-column: 2;
    max-width: 64ch;
    margin: 0;
    text-align: left;
  }

  .cta .btn {
    grid-column: 2;
    justify-self: start;
    margin-top: 0.45rem;
  }

  .partner-callout-title::after {
    right: auto;
    width: min(100%, 10rem);
    transform-origin: left;
  }

  footer {
    margin-top: 0;
    padding: 1.5rem 0 1.8rem;
  }
}

@media (min-width: 1680px) {
  .cards:has(> .card:nth-child(4)) {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (min-width: 1180px) and (max-height: 760px) {
  body > .hero {
    align-items: flex-start;
  }

  body > .hero > .wrap {
    padding-top: 2rem;
    padding-bottom: 2rem;
  }

  body > .hero .agent-film-frame,
  body > .hero .player-film-frame,
  body > .hero .proof-film-frame,
  body > .hero .pay-film-frame {
    margin-top: 1.25rem;
  }
}

@media (max-width: 1179px) {
  body > .hero,
  body > section:not(.hero),
  body > footer {
    position: relative;
    width: auto;
    margin-left: 0;
  }
}
