.phone-cascade-page {
  min-height: 100vh;
  overflow-x: hidden;
}

.phone-cascade-main {
  display: flex;
  flex-direction: column;
  gap: 0;
  padding-bottom: 0;
}

.phone-cascade-stage-wrap {
  /* Full-viewport canvas; GSAP pins .phone-cascade-sticky from the top
   * with pinSpacing:false so later siblings can scroll over it.
   * --cascade-runway-vh padding is the in-flow peel runway (set from JS).
   * Pull under the fixed header so pin start is already active at load
   * (avoids mid-scroll pin jumps). Use svh (not dvh): iOS chrome show/hide
   * must not resize the stage mid-scroll (ResizeObserver → WebGL setSize /
   * ScrollTrigger.refresh flicker). */
  --cascade-panel-h: 100vh;
  --cascade-panel-h: 100svh;
  --cascade-runway-vh: 2.55;
  /* Must match PANEL_TUNING.fit heightVh × canvasHeightFill (phone screen band). */
  --cascade-phone-band: 67.2%;
  /* Must match PANEL_TUNING.fit.bandCenterY (phone band vertical center). */
  --cascade-phone-center: 58%;
  position: relative;
  z-index: 0;
  display: block;
  width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-top: calc(-1 * var(--header-height));
  padding-bottom: calc(var(--cascade-runway-vh) * var(--cascade-panel-h));
  border-bottom: 1px solid var(--contour);
  background:
    radial-gradient(ellipse 70% 55% at 50% 55%, color-mix(in srgb, var(--accent) 7%, transparent), transparent 72%),
    color-mix(in srgb, var(--background-2) 94%, transparent);
}

/* Sections after the cascade paint above the indefinitely pinned canvas.
 * One full-bleed opaque shell — container-width sections alone left gaps
 * where the pinned phones showed through during intro animation. */
.phone-cascade-stage-wrap ~ .after-cascade {
  position: relative;
  z-index: 1;
  background: #000;
}

.phone-cascade-stage-wrap ~ * {
  position: relative;
  z-index: 1;
}

body:has(.phone-cascade-stage-wrap) .site-footer {
  position: relative;
  z-index: 1;
  background: #000;
}

.phone-cascade-sticky {
  position: relative;
  width: 100%;
  height: var(--cascade-panel-h);
  overflow: hidden;
}

.phone-cascade-stage {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.phone-cascade-canvas {
  display: block;
  width: 100%;
  height: 100%;
  /* Vertical scroll + pinch-zoom; horizontal swipe is handled in JS (Observer). */
  touch-action: pan-y pinch-zoom;
  cursor: grab;
}

.phone-cascade-canvas:active {
  cursor: grabbing;
}

.phone-cascade-canvas.is-phone-hover {
  cursor: pointer;
}

/* Headline overlays the canvas but lives outside the pin, so it scrolls away. */
.phone-cascade-copy {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 4;
  box-sizing: border-box;
  padding: calc(var(--header-height) + 0.15rem) 1.25rem 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  width: min(36rem, calc(100% - 2.5rem));
  margin: 0 auto;
  text-align: center;
  pointer-events: none;
  background: transparent;
}

@media (max-width: 480px) {
  .phone-cascade-copy {
    padding: calc(var(--header-height) + 0rem) 1.25rem 0;
  }
}
@media (min-width: 728px) {
  .phone-cascade-copy {
    padding: calc(var(--header-height) + 1.85rem) 1.25rem 0;
  }
}

.phone-cascade-title {
  margin: 0;
  font-size: clamp(1.65rem, 3.4vw, 2.35rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.15;
  color: #fff;
  opacity: 0;
  transform: translateY(0.35rem);
  transition: opacity 0.55s ease, transform 0.55s ease;
}

.phone-cascade-title.is-visible {
  opacity: 1;
  transform: none;
}

.phone-cascade-subtitle {
  margin: 0.65rem 0 0;
  font-size: clamp(0.95rem, 1.6vw, 1.08rem);
  font-weight: 400;
  line-height: 1.5;
  color: #9a9a9a;
  opacity: 0;
  transform: translateY(0.35rem);
  transition: opacity 0.55s ease, transform 0.55s ease;
}

.phone-cascade-subtitle.is-visible {
  opacity: 1;
  transform: none;
}

/* Feature copy: beside the center phone on desktop, overlaid on mobile. */
.phone-cascade-feature {
  position: absolute;
  z-index: 3;
  box-sizing: border-box;
  width: min(19rem, 24vw);
  margin: 0;
  padding: 0;
  pointer-events: none;
  opacity: 0;
  color: #fff;
  text-align: left;
  /* Vertically centered on the phone band. */
  top: var(--cascade-phone-center);
  transform: translateY(-50%);
}

.phone-cascade-feature--a {
  /* Right of center while the phone yaws left (peel 1). */
  left: calc(50% + clamp(7.5rem, 14vw, 11.5rem));
  right: auto;
}

.phone-cascade-feature--b {
  /* Left of center while the phone yaws right (peel 2). */
  right: calc(50% + clamp(7.5rem, 14vw, 11.5rem));
  left: auto;
  text-align: right;
}

.phone-cascade-feature-title {
  margin: 0;
  font-size: clamp(1.05rem, 1.85vw, 1.35rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.35;
  color: #fff;
}

.phone-cascade-feature-line {
  display: block;
}

.phone-cascade-feature-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.55rem 0.65rem;
  margin-top: 0.9rem;
}

.phone-cascade-feature-link,
.phone-cascade-feature-next {
  display: inline-flex;
  margin: 0;
  pointer-events: auto;
  font-size: 0.9rem;
  padding: 0.55rem 1rem;
}

.phone-cascade-feature-next {
  color: #fff;
  border-color: color-mix(in srgb, #fff 42%, transparent);
  background: transparent;
  cursor: pointer;
}

.phone-cascade-feature-next:hover {
  color: #fff;
  border-color: color-mix(in srgb, #fff 72%, transparent);
  background: color-mix(in srgb, #fff 12%, transparent);
}

.phone-cascade-feature--b .phone-cascade-feature-actions {
  /* Keep CTAs aligned with right-side copy. */
  justify-content: flex-end;
}

@media (max-width: 767px) {
  .phone-cascade-subtitle {
    margin-top: 0.3rem;
  }

  .phone-cascade-feature {
    top: auto;
    bottom: calc(100% - var(--cascade-phone-center) - var(--cascade-phone-band) / 2 + 0.85rem);
    left: 1rem;
    right: 1rem;
    width: auto;
    max-width: none;
    transform: none;
    text-align: center;
    /* Soft scrim so text stays readable over the phone screen. */
    padding: 0.75rem 0.9rem;
    border-radius: 0.65rem;
    background: color-mix(in srgb, #000 55%, transparent);
  }

  .phone-cascade-feature--a,
  .phone-cascade-feature--b {
    left: 1rem;
    right: 1rem;
    text-align: center;
  }

  .phone-cascade-feature-title {
    font-size: 1rem;
  }

  .phone-cascade-feature-actions {
    margin-top: 0.7rem;
    justify-content: center;
  }

  .phone-cascade-feature--b .phone-cascade-feature-actions {
    justify-content: center;
  }
}

@media (prefers-reduced-motion: reduce) {
  .phone-cascade-title,
  .phone-cascade-subtitle {
    opacity: 1;
    transform: none;
    transition: none;
  }
}
