/* Phantom Live product page (preview at /live-next). Builds on next.css; nothing here touches other pages. */

/* ---------- Device frames (real screenshots inside) ----------
   --W/--H: screenshot size, --r: screen corner radius as a share of screen width. */
.dev { --b: .028; position: relative; display: block; padding: calc(var(--b) * var(--sw-px, 400px)); background: #050506;
  border-radius: calc((var(--r) + var(--b)) * var(--sw-px, 400px));
  box-shadow: 0 0 0 1px #2b2d31, 0 0 0 2.5px #121315, inset 0 0 0 1px rgba(255,255,255,.05), 0 40px 100px -20px rgba(0,0,0,.75); }
.dev .scr { position: relative; overflow: hidden; aspect-ratio: var(--W) / var(--H); border-radius: calc(var(--r) * var(--sw-px, 400px)); background: #0b0b0d; isolation: isolate; }
.dev .scr img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.dev[data-kind="ipad"], .dev[data-kind="ipad-land"] { --b: .022; }
.dev[data-kind^="duo"] { --b: .03; }
.dev .island { display: none; position: absolute; z-index: 3; left: 39.2%; width: 21.6%; top: 1.5%; height: 3.75%; border-radius: 999px; background: #000; pointer-events: none; }
.dev[data-kind="phone"] .island { display: block; }
.dev .crease { display: none; position: absolute; z-index: 3; pointer-events: none; }
.dev[data-kind="duo-open"] .crease { display: block; left: 0; right: 0; top: calc(50% - 6px); height: 12px; background: linear-gradient(180deg, transparent, rgba(255,255,255,.035) 45%, rgba(0,0,0,.25) 55%, transparent); }
.dev[data-kind="duo-side"] .crease { display: block; top: 0; bottom: 0; left: calc(50% - 6px); width: 12px; background: linear-gradient(90deg, transparent, rgba(255,255,255,.035) 45%, rgba(0,0,0,.25) 55%, transparent); }

/* ---------- Hero ---------- */
.pl-hero { padding-top: clamp(56px, 9vh, 112px); overflow-x: clip; }
.pl-hero h1 { font-size: clamp(44px, 5.4vw, 80px); }
.pl-hero h1 span { color: var(--ash); }
.pl-hero .pill-new b { font-weight: 500; }
.pl-hero-stage { position: relative; width: min(1180px, calc(100% - 2 * var(--gutter))); margin: clamp(56px, 9vh, 96px) auto 0; padding-right: clamp(40px, 9vw, 120px); }
.pl-hero-stage::before { content: ""; position: absolute; left: -10%; right: -10%; top: 40%; bottom: -25%; z-index: -1; pointer-events: none;
  background: radial-gradient(50% 55% at 50% 70%, rgba(208,214,224,.16), rgba(208,214,224,.05) 45%, transparent 72%), radial-gradient(40% 40% at 50% 85%, rgba(139,108,255,.18), transparent 70%); filter: blur(8px); }
.pl-hero-ipad { width: 100%; }
.pl-hero-phone { position: absolute; right: 0; bottom: -6%; width: clamp(150px, 23%, 270px); }

/* ---------- Try it ---------- */
.pl-try { padding-top: 192px; }
.pl-demo { margin-top: 64px; display: grid; justify-items: center; gap: 28px; }
.pl-pick { display: grid; justify-items: center; gap: 14px; padding: 0 var(--gutter); }
.pl-pick .toggle { justify-self: center; max-width: 100%; overflow-x: auto; scrollbar-width: none; }
.pl-pick .toggle button { white-space: nowrap; }
.pl-posture { display: flex; gap: 18px; font-size: 13px; }
.pl-posture button { background: none; border: 0; padding: 4px 0; color: var(--ash); font: 400 13px/1 var(--sans); letter-spacing: -0.011em; cursor: pointer; border-bottom: 1px solid transparent; }
.pl-posture button:hover { color: var(--mist); }
.pl-posture button[aria-pressed="true"] { color: var(--paper); border-bottom-color: var(--smoke); }
.pl-stagebox { position: relative; width: min(1180px, calc(100% - 2 * var(--gutter))); height: min(80vh, 860px); min-height: 460px; display: grid; place-items: center; }
.pl-stagebox::before { content: ""; position: absolute; inset: 15% 10% -12%; z-index: -1; pointer-events: none;
  background: radial-gradient(45% 50% at 50% 60%, rgba(208,214,224,.13), transparent 70%), radial-gradient(35% 35% at 50% 80%, rgba(139,108,255,.16), transparent 70%); filter: blur(6px); }
.pl-stagebox .dev { transition: opacity .28s ease, transform .5s cubic-bezier(.16,1,.3,1); }
.pl-stagebox .dev.swap { opacity: 0; transform: scale(.97); }
.pl-stagebox .scr img { transition: opacity .22s ease; }
.pl-stagebox .scr img.b { opacity: 0; }
.pl-stagebox .scr img.b.on { opacity: 1; }
.hots { position: absolute; inset: 0; z-index: 4; }
.hot { position: absolute; display: block; margin: 0; padding: 0; border: 0; background: transparent; cursor: pointer; border-radius: 6px; -webkit-tap-highlight-color: transparent; transition: background .15s; }
.hot:hover { background: rgba(255,255,255,.045); }
.hot:active { background: rgba(255,255,255,.08); }
.hot:focus-visible { outline: 2px solid var(--violet); outline-offset: -2px; }
.hot.invite::after { content: ""; position: absolute; inset: 0; border-radius: 6px; box-shadow: inset 0 0 0 1.5px rgba(139,108,255,.85); animation: pl-invite 2.2s ease-in-out infinite; pointer-events: none; }
@keyframes pl-invite { 0%, 100% { opacity: .15; } 50% { opacity: 1; } }
.pl-status { display: flex; align-items: center; gap: 16px; min-height: 24px; padding: 0 var(--gutter); text-align: center; }
.pl-status p { color: var(--fog); font-size: 15px; }
.pl-reset { background: none; border: 0; padding: 4px 0; color: var(--ash); font: 400 12px/1 var(--mono); text-transform: uppercase; cursor: pointer; }
.pl-reset:hover { color: var(--mist); }

/* ---------- Built for the stage (sticky phone) ---------- */
.pl-story { padding-top: 192px; }
.pl-steps { display: grid; grid-template-columns: 1fr minmax(260px, 380px); gap: 64px; margin-top: 40px; align-items: start; }
.pl-step-list { list-style: none; margin: 0; padding: 0; }
.pl-step { min-height: 64vh; display: flex; flex-direction: column; justify-content: center; gap: 12px; opacity: .3; transition: opacity .4s ease; }
.pl-step.on { opacity: 1; }
.pl-step h3 { font-size: clamp(26px, 3vw, 36px); line-height: 1.12; letter-spacing: -0.022em; max-width: 16ch; }
.pl-step p { color: var(--fog); font-size: 17px; max-width: 36ch; }
.pl-sticky { position: sticky; top: calc(64px + max(4vh, (100vh - 64px - 780px) / 2)); }
.pl-sticky .dev { width: min(100%, 360px); margin-left: auto; }
.pl-sticky .scr img { opacity: 0; transition: opacity .35s ease; }
.pl-sticky .scr img.on { opacity: 1; }

/* ---------- More than an iPhone ---------- */
.pl-more { padding-top: 192px; }
.pl-more-stage { display: grid; grid-template-columns: minmax(0, 30fr) minmax(0, 70fr); gap: clamp(24px, 4vw, 56px); align-items: end; margin-top: 72px; }
.pl-more figure { margin: 0; min-width: 0; }
.pl-more figcaption { margin-top: 18px; display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.pl-stand { padding-bottom: 54px; }
.pl-stand .dev { width: 100%; }
.pl-laptop .lid { padding: 1.6% 1.6% 2.4%; background: #050506; border-radius: 14px 14px 4px 4px; box-shadow: 0 0 0 1px #2b2d31, 0 0 0 2.5px #121315, 0 40px 100px -20px rgba(0,0,0,.75); }
.pl-laptop .base { height: 14px; margin: 0 -5%; border-radius: 0 0 14px 14px; background: linear-gradient(#2a2c30, #141518); box-shadow: 0 1px 0 #34363a inset; }
.pl-live { position: relative; overflow: hidden; border-radius: 4px; background: #0b0b0d; aspect-ratio: 16 / 10; }
.pl-live iframe { position: absolute; left: 0; top: 0; border: 0; transform-origin: 0 0; background: #0b0b0d; }
.pl-live img { width: 100%; height: 100%; object-fit: cover; }
.pl-live-tag { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: var(--fog); }
.pl-live-tag i { width: 6px; height: 6px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 3px rgba(76,195,138,.18); }

/* ---------- Closing ---------- */
.pl-close { padding: 224px 0 176px; text-align: center; }
.pl-close h2 { font-size: clamp(44px, 5.4vw, 80px); line-height: 1; }
.pl-close p { margin-top: 20px; color: var(--fog); font-size: 17px; }
.pl-close .hero-ctas { justify-content: center; margin-top: 32px; }

/* ---------- Small screens ---------- */
@media (max-width: 860px) {
  .pl-try, .pl-story, .pl-more { padding-top: 128px; }
  .pl-demo { margin-top: 40px; }
  .pl-stagebox { height: min(76svh, 720px); min-height: 420px; }
  .pl-steps { grid-template-columns: 1fr; gap: 0; }
  .pl-sticky { display: none; }
  .pl-step { min-height: 0; opacity: 1; padding: 40px 0; gap: 10px; }
  .pl-step::after { content: ""; display: block; width: min(72vw, 300px); aspect-ratio: 820 / 1782; margin: 24px auto 0; background: var(--shot) center / cover no-repeat; border-radius: calc(min(72vw, 300px) * .125); box-shadow: 0 0 0 6px #050506, 0 0 0 7px #2b2d31, 0 30px 80px -20px rgba(0,0,0,.7); }
  .pl-step[data-step="0"] { --shot: url(/assets/live-next/iphone-pro-max/jump-queued-to-bridge.webp); }
  .pl-step[data-step="1"] { --shot: url(/assets/live-next/iphone-pro-max/loop-chorus.webp); }
  .pl-step[data-step="2"] { --shot: url(/assets/live-next/iphone-pro-max/s05-bridge.webp); }
  .pl-step[data-step="3"] { --shot: url(/assets/live-next/iphone-pro-max/mix-muted.webp); }
  .pl-step[data-step="4"] { --shot: url(/assets/live-next/iphone-pro-max/faded-out.webp); }
  .pl-step[data-step="5"] { --shot: url(/assets/live-next/iphone-pro-max/stage.webp); }
  .pl-more-stage { grid-template-columns: 1fr; gap: 56px; margin-top: 48px; }
  .pl-laptop { order: -1; }
  .pl-laptop .lid { padding: 8px; border-radius: 28px; }
  .pl-laptop .base { display: none; }
  .pl-live { border-radius: 20px; aspect-ratio: auto; }
  .pl-stand { width: 86%; margin: 0 auto; padding-bottom: 0; }
  .pl-close { padding: 160px 0 120px; }
}
@media (prefers-reduced-motion: reduce) {
  .hot.invite::after { animation: none; opacity: .8; }
  .pl-stagebox .dev, .pl-stagebox .scr img, .pl-sticky .scr img, .pl-step { transition: none; }
}
