/* ===========================================================================
   SECTIONS — everything after film one.

   Two registers, on purpose.

   Film two (`.film-flow`) reuses the film machinery: a pinned frame, two
   panels cross-fading over one persistent object. The object is a diagram
   rather than a mesh, which is the whole argument for building the driver in
   main.js generically — the effect was never the renderer, it was holding one
   thing still while the copy changes over it.

   Everything below that stops moving. A reader who has scrolled this far is
   comparing packages, not being persuaded, and a page that keeps performing
   during a price comparison reads as a page with something to hide. The only
   motion left is a reveal on entry.
   =========================================================================== */

/* ---------------------------------------------------------------------------
   Film two — the stage
   --------------------------------------------------------------------------- */

/* The diagram takes a column the same way the object does, and it takes it
   from the same `data-side` — a film that reads left-to-right while its
   neighbours read right-to-left is the one thing a zig-zag cannot survive.
   A property, not a `left`, so the narrow block at the foot of this section
   can go on collapsing it into a strip. */
.film-flow{
  --flow-left:  calc(var(--gutter) + clamp(1.5rem, 3vw, 3rem));
  --flow-right: auto;
}
.film-flow[data-side="left"]{
  --flow-left:  auto;
  --flow-right: calc(var(--gutter) + clamp(1.5rem, 3vw, 3rem));
}

/* Film one gets its grid from the canvas. This one has no canvas, so the grid
   is drawn in CSS and masked to the diagram's column — without it the pane's
   blur has nothing behind it and the glass goes back to being a dark card.
   Mirrored bodily when the diagram changes sides, for the same reason the
   screen-light wash in layout.css is. */
/* Opaque for the same reason the static bands are: the 3D stage is fixed to
   the viewport, and this film does not use it. */
.film-flow .film-pin{ background: var(--bg); }

.film-flow[data-side="left"] .film-pin::before { transform: scaleX(-1); }

.film-flow .film-pin::before{
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  background:
    linear-gradient(to right,  var(--line) 1px, transparent 1px) 0 0 / 84px 84px,
    linear-gradient(to bottom, var(--line) 1px, transparent 1px) 0 0 / 84px 84px;
  -webkit-mask-image: radial-gradient(ellipse 52% 62% at 24% 50%, #000, transparent 76%);
          mask-image: radial-gradient(ellipse 52% 62% at 24% 50%, #000, transparent 76%);
}

.stage-flow{
  position: absolute;
  z-index: 2;
  left: var(--flow-left);
  right: var(--flow-right);
  width: calc(var(--frame-w) * var(--split) - clamp(4rem, 8vw, 7rem));
  top: 50%;
  transform: translateY(-50%);
  display: grid;
  gap: var(--s3);
}

.stage-caption{
  font-family: var(--mono);
  font-size: .68rem;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--faint);
}

.flow-wrap{ position: relative; }

.flow{
  display: grid;
  gap: clamp(.35rem, 1.4vh, 1rem);
}

.flow-step{
  display: grid;
  grid-template-columns: 12px 1fr;
  column-gap: var(--s2);
  align-items: start;
  opacity: .3;
  transition: opacity .55s var(--ease);
}
.flow-step.is-lit { opacity: 1; }

.flow-dot{
  grid-row: span 2;
  width: 9px;
  height: 9px;
  margin-top: .48rem;
  border-radius: 50%;
  background: var(--bg-3);
  border: 1px solid var(--line-firm);
  transition: background .45s var(--ease), border-color .45s var(--ease),
              box-shadow .45s var(--ease), transform .45s var(--settle);
}
.flow-step.is-lit .flow-dot{
  background: var(--accent);
  border-color: var(--accent);
  box-shadow: 0 0 16px var(--accent-glow);
  transform: scale(1.18);
}

.flow-name{
  font-weight: 600;
  font-size: 1.02rem;
  letter-spacing: -.01em;
}
.flow-note{
  font-size: .84rem;
  line-height: 1.5;
  color: var(--faint);
}

/* The pipe. Ends faded so it reads as a run that continues past the frame
   rather than a bar with two hard stops. */
.flow-track{
  position: absolute;
  top: 0; bottom: 0;
  left: 6px;
  width: 1px;
  background: var(--line-firm);
  -webkit-mask-image: linear-gradient(transparent, #000 7%, #000 93%, transparent);
          mask-image: linear-gradient(transparent, #000 7%, #000 93%, transparent);
}
/* `--beam` is the one number JS writes here; which axis it fills is the
   stylesheet's business, so the horizontal mobile layout needs no JS branch. */
.flow-beam{
  display: block;
  width: 100%;
  height: var(--beam, 0%);
  background: linear-gradient(var(--violet), var(--accent));
  box-shadow: 0 0 14px var(--accent-glow);
}

.fact-list{
  display: grid;
  gap: .55rem;
  margin-top: var(--s3);
  max-width: 46ch;
  font-size: .95rem;
  color: var(--soft);
}
/* Marker absolutely placed, not a grid column. These list items mix a <b> with
   a run of text, and a grid would make each of those its own item — the tail
   of the sentence lands in the 0.9rem marker column and sets one word a line. */
.fact-list li{
  position: relative;
  padding-left: 1.5rem;
}
.fact-list li::before{
  content: "→";
  position: absolute;
  left: 0;
  top: 0;
  color: var(--accent);
  font-size: .8rem;
}
.fact-list b { color: var(--ink); font-weight: 600; }

/* Narrow: the diagram loses its column and becomes a strip along the top,
   above the pane rather than behind it — six words are unreadable through
   glass, and a diagram you cannot read is just texture. */
@media (max-width: 960px){
  .stage-flow{
    left: clamp(.75rem, 3vw, 1.25rem);
    right: clamp(.75rem, 3vw, 1.25rem);
    width: auto;
    top: calc(var(--header-h) + .35rem);
    transform: none;
  }
  .stage-caption { display: none; }
  .flow{
    display: flex;
    justify-content: space-between;
    gap: .3rem;
  }
  .flow-step{
    grid-template-columns: 1fr;
    justify-items: center;
    gap: .4rem;
    text-align: center;
  }
  .flow-dot { grid-row: auto; margin-top: 0; }
  .flow-note { display: none; }
  .flow-name{
    font-family: var(--mono);
    font-size: .58rem;
    font-weight: 400;
    letter-spacing: .04em;
    color: var(--soft);
  }
  .flow-track{
    top: 4px;
    bottom: auto;
    left: 4px;
    right: 4px;
    width: auto;
    height: 1px;
    -webkit-mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
            mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
  }
  .flow-beam{
    width: var(--beam, 0%);
    height: 100%;
    background: linear-gradient(90deg, var(--violet), var(--accent));
  }
  .film-flow .film-pin::before{
    -webkit-mask-image: radial-gradient(ellipse 90% 40% at 50% 22%, #000, transparent 78%);
            mask-image: radial-gradient(ellipse 90% 40% at 50% 22%, #000, transparent 78%);
  }
}

/* No JS: the pin never engages, so the stage cannot stay absolutely positioned
   — it would land on top of the panels it is meant to sit beside. */
html:not(.js) .stage-flow{
  position: static;
  transform: none;
  width: min(100%, 46rem);
  margin-inline: auto;
  padding-inline: clamp(1.4rem, 5vw, 2rem);
  margin-bottom: var(--s5);
}
html:not(.js) .flow-step { opacity: 1; }
html:not(.js) .flow-beam { display: none; }
html:not(.js) .film-flow .film-pin::before { display: none; }
/* No pins, so no seams to hide — and a gradient over the first lines of a
   section that now starts in ordinary flow is just a section starting dim. */
html:not(.js) .film::before,
html:not(.js) .band::after,
html:not(.js) .site-footer::after { display: none; }

/* ---------------------------------------------------------------------------
   Static bands
   --------------------------------------------------------------------------- */
/* Opaque and above the stage. The 3D canvas is fixed to the viewport now, so a
   transparent band would let the object show through from under a section that
   is meant to have replaced it. */
.band{
  position: relative;
  z-index: 1;
  background: var(--bg);
  padding-block: clamp(4.5rem, 11vh, 8rem);
  border-top: 1px solid var(--line);
}

/* The seams.

   A sticky pin does not slide out of view, it gets shorter — the section
   behind it eats the pin from the bottom while the top scrolls away. So where
   a film meets a static section there is a horizontal cut across the screen
   with the 3D grid live on one side of it and page colour on the other. The
   film dissolving as it shrinks (`handover` in main.js) takes most of that
   away; these take the rest, by having each side paint a run-up of its own
   background over the other.

   Both reach outside their own box on purpose, so neither element may clip.
   Harmless where a band follows a band — page colour fading into page colour.

   A departing film, softened by the arriving section: */
.band::after,
.site-footer::after{
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: calc(-1 * var(--seam));
  height: var(--seam);
  pointer-events: none;
  background: linear-gradient(to bottom, transparent, var(--bg));
}

/* And the mirror — an arriving film, softened by the section above it. No
   z-index: sitting before the pin in source order is what keeps it under the
   pane, whose top edge can reach into this strip on a short viewport. */
.film::before{
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: var(--seam);
  pointer-events: none;
  background: linear-gradient(to bottom, var(--bg), transparent);
}
.wrap{
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: var(--wrap-pad);
}
.wrap-narrow { max-width: 52rem; }

.band-head{
  max-width: 46rem;
  margin-bottom: clamp(2.5rem, 5vh, 4rem);
}
.band-head .lede { max-width: 54ch; }

/* The reveal. Base state lives behind `html.js` so a page without JS — where
   nothing will ever add `.is-in` — shows every section at full opacity
   instead of a column of invisible boxes. */
html.js [data-reveal]{
  opacity: 0;
  transform: translate3d(0, 24px, 0);
  transition: opacity .8s var(--ease), transform .9s var(--settle);
}
html.js [data-reveal].is-in{
  opacity: 1;
  transform: none;
}
/* Stagger inside a grid, so a row of three arrives as a row and not as three
   simultaneous boxes. */
.card-grid  > :nth-child(2), .price-grid > :nth-child(2) { transition-delay: .09s; }
.card-grid  > :nth-child(3), .price-grid > :nth-child(3) { transition-delay: .18s; }

/* ---------------------------------------------------------------------------
   Audience cards
   --------------------------------------------------------------------------- */
.card-grid{
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(17rem, 1fr));
  gap: var(--s3);
}
.card{
  padding: clamp(1.5rem, 2.6vw, 2.1rem);
  border-radius: var(--radius);
  border: 1px solid var(--glass-line);
  background: var(--pane-sheen), var(--glass);
  box-shadow: var(--glass-edge);
  transition: border-color .4s var(--ease), transform .5s var(--settle);
}
.card:hover{
  border-color: rgba(217,61,240,.34);
  transform: translateY(-3px);
}
.card h3{
  font-size: 1.18rem;
  font-weight: 600;
  letter-spacing: -.015em;
  margin-bottom: var(--s2);
}
.card p{
  font-size: .96rem;
  color: var(--soft);
}

.claim-strip{
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr));
  gap: var(--s2) var(--s5);
  margin-top: clamp(2.5rem, 5vh, 4rem);
  padding-top: var(--s4);
  border-top: 1px solid var(--line);
}
.claim-strip b{
  display: block;
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: -.025em;
  color: var(--accent);
}
.claim-strip span{
  display: block;
  margin-top: .3rem;
  font-size: .9rem;
  color: var(--faint);
}

/* ---------------------------------------------------------------------------
   Pricing
   --------------------------------------------------------------------------- */
.band-pricing::before{
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(ellipse 60% 50% at 50% 0%, var(--violet-tint), transparent 70%);
}
.band-pricing > .wrap { position: relative; }

.price-grid{
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--s3);
  /* Stretched, not start-aligned: the three spec lists are different lengths,
     and equal-height cards are what puts the three buttons on one line. */
  align-items: stretch;
}

.price-card{
  position: relative;
  display: flex;
  flex-direction: column;
  padding: clamp(1.6rem, 2.6vw, 2.2rem);
  border-radius: var(--radius);
  border: 1px solid var(--glass-line);
  background: var(--pane-sheen), var(--pane-scrim);
  backdrop-filter: blur(18px) saturate(1.5);
  -webkit-backdrop-filter: blur(18px) saturate(1.5);
  box-shadow: var(--glass-edge);
}

/* The middle card is raised by a hairline and a glow, not by a size jump. A
   scaled card breaks the alignment of three spec lists, which is the one thing
   a pricing table exists to make comparable. */
.price-card.is-featured{
  border-color: rgba(217,61,240,.46);
  background:
    var(--pane-sheen),
    linear-gradient(180deg, var(--accent-tint), transparent 42%),
    var(--pane-scrim);
  box-shadow: 0 0 60px -26px var(--accent-glow), var(--glass-edge);
}

.price-flag{
  position: absolute;
  top: 0;
  left: clamp(1.6rem, 2.6vw, 2.2rem);
  transform: translateY(-50%);
  padding: .3rem .8rem;
  border-radius: var(--radius-pill);
  border: 1px solid rgba(217,61,240,.44);
  background: #17111F;
  font-family: var(--mono);
  font-size: .64rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--accent);
}

.price-name{
  font-family: var(--mono);
  font-size: .74rem;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--soft);
}
.price-tag{
  display: flex;
  align-items: baseline;
  margin-top: var(--s1);
  font-size: 3rem;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -.04em;
}
.price-cur{
  margin-right: .12em;
  font-size: 1.35rem;
  font-weight: 500;
  color: var(--soft);
}
.price-per{
  margin-left: .35rem;
  font-family: var(--mono);
  font-size: .74rem;
  font-weight: 400;
  letter-spacing: .06em;
  color: var(--faint);
}
.price-line{
  margin-top: var(--s2);
  padding-bottom: var(--s3);
  border-bottom: 1px solid var(--line);
  font-size: .92rem;
  color: var(--soft);
}

.price-specs{
  display: grid;
  gap: .55rem;
  margin-top: var(--s3);
  margin-bottom: var(--s4);
  font-size: .93rem;
  color: var(--soft);
}
.price-specs li{
  position: relative;
  padding-left: 1.5rem;
}
.price-specs li::before{
  content: "✓";
  position: absolute;
  left: 0;
  top: 0;
  font-size: .74rem;
  color: var(--accent);
}
.price-specs b { color: var(--ink); font-weight: 600; }
.price-specs .soon{
  font-family: var(--mono);
  font-size: .72rem;
  color: var(--faint);
}

/* Pushes the button to the bottom edge whatever the spec list does, so the
   three calls to action sit on one line. */
.price-card > :last-child { margin-top: auto; }

.btn-line{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: .7rem 1.4rem;
  border-radius: var(--radius-pill);
  border: 1px solid var(--line-firm);
  font-family: var(--mono);
  font-size: .74rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--soft);
  transition: border-color .35s var(--ease), color .35s var(--ease),
              background .35s var(--ease);
}
.btn-line:hover{
  border-color: var(--glass-line);
  background: var(--glass);
  color: var(--ink);
}
.price-card .btn-glass{ margin-top: auto; width: 100%; justify-content: center; }

.price-foot{
  margin-top: var(--s5);
  max-width: 62ch;
  font-size: .9rem;
  color: var(--soft);
}
.price-foot b { color: var(--ink); font-weight: 600; }
.price-caveat{
  display: block;
  margin-top: var(--s2);
  font-size: .84rem;
  color: var(--faint);
}

@media (max-width: 900px){
  .price-grid { grid-template-columns: 1fr; gap: var(--s4); }
  .card-grid  > :nth-child(n), .price-grid > :nth-child(n) { transition-delay: 0s; }
}

/* ---------------------------------------------------------------------------
   FAQ
   --------------------------------------------------------------------------- */
.faq{
  border-top: 1px solid var(--line);
}
.faq details{
  border-bottom: 1px solid var(--line);
}
.faq summary{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s3);
  padding: var(--s3) 0;
  cursor: pointer;
  list-style: none;
  font-size: 1.06rem;
  font-weight: 600;
  letter-spacing: -.012em;
  transition: color .3s var(--ease);
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after{
  content: "+";
  flex: none;
  font-family: var(--mono);
  font-size: 1.2rem;
  font-weight: 400;
  color: var(--accent);
  transition: transform .35s var(--settle);
}
.faq details[open] summary::after { transform: rotate(45deg); }
.faq summary:hover { color: var(--accent); }
.faq details p{
  max-width: 62ch;
  padding-bottom: var(--s3);
  font-size: .96rem;
  color: var(--soft);
}

/* ---------------------------------------------------------------------------
   The embed band — the snippet, at a stop

   It used to ride inside the Embed act, where a reader had a cross-fade's
   worth of time to read two lines of code before the panel slid off. Code is
   the one thing on this page that has to survive being looked at twice.
   --------------------------------------------------------------------------- */
.split-band{
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: center;
}
.split-band .band-head { margin-bottom: 0; max-width: none; }

.embed-card.is-big{
  margin-top: 0;
  border-radius: var(--radius);
  background: rgba(0,0,0,.42);
  box-shadow: var(--glass-edge);
}
.embed-card.is-big .embed-chrome{
  padding: .8rem 1.1rem;
  font-size: .74rem;
}
.embed-card.is-big .embed-snippet{
  padding: clamp(1.2rem, 2.4vw, 2rem);
  font-size: clamp(.78rem, .72rem + .2vw, .92rem);
}

@media (max-width: 860px){
  .split-band { grid-template-columns: 1fr; }
}
