/* TableTalk 3D phone section. Scoped to .p3d-pin; html.p3d-on (set in <head> by the gate script) = 3D mode, otherwise static poster + the page's own players. */
.p3d-pin { position: relative; --p3d-blue: #1E4FD8; --p3d-mut: #5C6670; }
.p3d-pin [hidden] { display: none !important; }
.p3d-sticky { position: relative; display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center; max-width: calc(var(--max, 1180px) + 2 * var(--gutter, 32px)); margin: 0 auto; padding: 80px var(--gutter, 32px); }
.p3d-mount, .p3d-fx { display: none; }
.p3d-main { order: 1; }
.p3d-poster { order: 2; justify-self: center; width: auto; height: auto; max-width: 100%; max-height: 520px; }
.p3d-3d-only { display: none; }
.p3d-copy { max-width: 440px; }
.p3d-eyebrow { font: 500 13px/1 var(--font-mono, "Geist Mono", monospace); letter-spacing: .08em; text-transform: uppercase; color: var(--p3d-mut); margin: 0 0 18px; }
.p3d-pin h2 { font: 600 clamp(36px, 4.6vw, 62px)/1.02 var(--font-display, "Clash Display", system-ui, sans-serif); letter-spacing: -.02em; margin: 0 0 20px; text-wrap: balance; }
.p3d-pin h2 em { font-style: normal; color: var(--p3d-blue); }
.p3d-lede { color: var(--p3d-mut); max-width: 34ch; margin: 0 0 28px; text-wrap: pretty; }
.p3d-num { font-family: var(--font-mono, "Geist Mono", monospace); color: var(--ink); }
@media (max-width: 820px) { .p3d-sticky { grid-template-columns: 1fr; gap: 28px; padding: 48px var(--gutter, 24px); } .p3d-poster { max-height: 420px; } }

/* ---------- 3D mode: 4 screens of scroll, sticky stage, height reserved from first paint (no layout shift) ---------- */
html.p3d-on .p3d-pin { height: 400vh; height: 400svh; }
html.p3d-on .p3d-sticky { background: var(--bg, #FFFFFF); position: sticky; top: 0; height: 100vh; height: 100svh; display: block; max-width: none; margin: 0; padding: 0; overflow: hidden; }
html.p3d-on .p3d-3d-only { display: inline; }
html.p3d-on .p3d-mount, html.p3d-on .p3d-fx { display: block; }
html.p3d-on .p3d-poster { position: absolute; z-index: 1; left: 72%; top: 50%; height: 66%; max-height: none; transform: translate(-50%, -50%); }
html.p3d-on .p3d-pin.p3d-ready .p3d-poster { display: none; }
html.p3d-on .p3d-mount.p3d { position: absolute; inset: 0; z-index: 1; height: auto; min-height: 0; display: block; }
html.p3d-on .p3d-mount .p3d-stage { position: absolute; inset: 0; }
html.p3d-on .p3d-mount .p3d-stage canvas { -webkit-mask: none; mask: none; }
html.p3d-on .p3d-mount .p3d-controls { position: absolute; left: 72%; bottom: 22px; transform: translateX(-50%); opacity: calc(1 - var(--z, 0) * 2); }
html.p3d-on .p3d-mount.p3d-hide-ui .p3d-controls, html.p3d-on .p3d-mount.p3d-hide-ui .p3d-ticket { display: none; }
html.p3d-on .p3d-main { position: absolute; inset: 0; z-index: 2; max-width: calc(var(--max, 1200px) + 2 * var(--gutter, 48px)); margin: 0 auto; padding: 68px var(--gutter, 48px) 24px; display: flex; align-items: center; pointer-events: none; }
@media (min-width: 821px) { /* two-line heading, pinned to the top so the copy does not jump as the ticket fills */
  html.p3d-on .p3d-main { align-items: flex-start; padding-top: clamp(80px, 22vh, 220px); }
  html.p3d-on .p3d-copy { max-width: 560px; }
  html.p3d-on .p3d-pin h2 { max-width: 560px; font-size: clamp(36px, 3.4vw, 50px); }
}
html.p3d-on .p3d-copy { pointer-events: auto; }
.p3d-ticket-slot:empty { display: none; }
.p3d-ticket { border-radius: 0; } /* top and bottom dashed rules only: rounded ends made the 2px-padded text touch the curve */

/* quiet drifting layers behind everything */
.p3d-map { position: absolute; inset: 0; z-index: 0; opacity: 0; visibility: hidden; overflow: hidden; pointer-events: none; }
.p3d-layer { position: absolute; border-radius: 46% 54% 58% 42% / 52% 40% 60% 48%; opacity: .6; animation: p3d-drift 38s ease-in-out infinite alternate; will-change: transform; }
.p3d-layer.a { width: 62vmax; height: 46vmax; left: -14vmax; top: -10vmax; background: radial-gradient(closest-side, rgba(30,79,216,.14), rgba(30,79,216,0)); }
.p3d-layer.b { width: 54vmax; height: 40vmax; right: -12vmax; bottom: -12vmax; background: radial-gradient(closest-side, rgba(30,79,216,.09), rgba(30,79,216,0)); animation-duration: 46s; animation-delay: -9s; }
.p3d-layer.c { width: 40vmax; height: 54vmax; left: 30%; top: 12%; background: radial-gradient(closest-side, rgba(30,79,216,.07), rgba(30,79,216,0)); animation-duration: 54s; animation-direction: alternate-reverse; }
.p3d-layer.d { width: 34vmax; height: 26vmax; right: 14%; top: -8vmax; background: radial-gradient(closest-side, rgba(30,79,216,.10), rgba(30,79,216,0)); animation-duration: 42s; animation-delay: -20s; }
@keyframes p3d-drift { from { transform: translate3d(-5%, 3%, 0) rotate(-6deg) scale(1); } to { transform: translate3d(6%, -4%, 0) rotate(9deg) scale(1.14); } }
/* x-ray: drawing marks round the phone + a signal wire into the step list */
.p3d-diagram { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 3; pointer-events: none; visibility: hidden; opacity: 0; }
.p3d-diagram .mono { font: 500 11px var(--font-mono, "Geist Mono", monospace); letter-spacing: .12em; text-transform: uppercase; fill: #5C6670; }
.p3d-frame { fill: none; stroke: rgba(30,79,216,.55); stroke-width: 1.2; }
.p3d-wire { fill: none; stroke: #1E4FD8; stroke-width: 1.3; stroke-dasharray: 4 5; }
.p3d-diagram.run .p3d-wire { animation: p3d-march .9s linear infinite; }
@keyframes p3d-march { to { stroke-dashoffset: -18; } }
.p3d-dot { position: absolute; left: 0; top: 0; z-index: 3; width: 6px; height: 6px; border-radius: 50%; background: #1E4FD8; box-shadow: 0 0 0 2px rgba(30,79,216,.18), 0 0 10px 2px rgba(30,79,216,.3); offset-rotate: 0deg; visibility: hidden; opacity: 0; pointer-events: none; animation: p3d-run 1.8s linear infinite paused; }
.p3d-dot + .p3d-dot { animation-delay: -.9s; }
.p3d-dot.run { animation-play-state: running; }
@media (max-width: 820px) { .p3d-dot + .p3d-dot { display: none; } }
@keyframes p3d-run { from { offset-distance: 0%; } to { offset-distance: 100%; } }

/* the step list: what TableTalk asks, what it captures */
.p3d-seq { position: absolute; z-index: 3; visibility: visible; opacity: .01; pointer-events: none; will-change: opacity; font-size: 16px; color: var(--ink); padding: 1.1em 1.25em .5em; background: #FFFFFF; border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 24px 60px -28px rgba(31,36,40,.3); }
.p3d-seq p { margin: 0; }
.sq-head { display: grid; grid-template-columns: 1fr auto; align-items: baseline; gap: .55em 1em; }
.sq-eye { font: 500 .69em/1 var(--font-mono, "Geist Mono", monospace); letter-spacing: .12em; text-transform: uppercase; color: var(--accent-text); }
.sq-title { grid-column: 1 / -1; font: 600 1.5em/1.05 var(--font-display, "Clash Display", system-ui, sans-serif); letter-spacing: -.01em; }
.sq-clock { font: 500 .75em/1.2 var(--font-mono, "Geist Mono", monospace); color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
.sq-clock b { font-weight: 500; color: var(--ink); }
.sq-bar { grid-column: 1 / -1; display: block; height: 2px; background: var(--surface-2); border-radius: 1px; overflow: hidden; }
.sq-bar b { display: block; height: 100%; background: #1E4FD8; transform: scaleX(0); transform-origin: left; }
.sq-cols, .sq-list li { display: grid; grid-template-columns: 1.75em 1fr 34%; column-gap: 1em; }
.sq-cols { padding: 1em 0 .5em; }
.sq-cols span { font: 500 .62em/1 var(--font-mono, "Geist Mono", monospace); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.sq-list { list-style: none; margin: 0; padding: 0; }
.sq-list li { position: relative; grid-template-areas: "n k cap" "n q cap"; grid-template-rows: auto auto; row-gap: .25em; margin: 0 -1.25em; padding: .6em 1.25em; border-top: 1px solid var(--line); transition: background .3s; }
.sq-list li::before { content: ""; position: absolute; left: calc(1.25em + .875em); top: 0; bottom: 0; width: 1px; background: #C9D1DA; }
.sq-list li:first-child::before { top: 1.4em; }
.sq-list li:last-child::before { bottom: auto; height: 1.4em; }
.sq-list li.done::before { background: #1E4FD8; }
.sq-list li.on { background: linear-gradient(90deg, rgba(30,79,216,.11), rgba(30,79,216,.04) 70%, rgba(30,79,216,0)); }
.sq-n { grid-area: n; position: relative; align-self: start; display: grid; place-items: center; height: 2em; margin-top: .1em; font: 500 .7em/1 var(--font-mono, "Geist Mono", monospace); color: var(--muted); background: #FFFFFF; border: 1px solid #B9C1CB; border-radius: 4px; transition: background .3s, color .3s, border-color .3s, box-shadow .3s; }
.sq-list li.done .sq-n { color: var(--accent-text); border-color: #1E4FD8; }
.sq-list li.on .sq-n { color: #fff; background: #1E4FD8; border-color: #1E4FD8; box-shadow: 0 0 0 4px rgba(30,79,216,.16); }
.sq-k { grid-area: k; display: flex; justify-content: space-between; gap: 1em; font: 500 .66em/1.35 var(--font-mono, "Geist Mono", monospace); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.sq-k span { color: var(--muted); white-space: nowrap; }
.sq-q { grid-area: q; min-height: 0; overflow: hidden; }
.sq-q q { display: block; font: 500 1.02em/1.32 var(--font-sans, Satoshi, system-ui, sans-serif); color: var(--muted); text-wrap: pretty; transition: color .3s; }
.sq-list li.done .sq-q q { color: #3B444D; }
.sq-list li.on .sq-q q { color: var(--ink); }
.sq-cap { grid-area: cap; display: flex; flex-direction: column; align-items: flex-start; gap: .3em; padding-top: 1.15em; min-width: 0; }
.sq-cap span, .sq-nc span { max-width: 100%; font: 500 .68em/1.3 var(--font-mono, "Geist Mono", monospace); letter-spacing: .04em; text-transform: uppercase; color: var(--accent-text); background: rgba(30,79,216,.08); border: 1px solid rgba(30,79,216,.35); border-radius: 4px; padding: .4em .6em; transition: color .3s, background .3s, border-color .3s; }
.sq-list li:not(.on):not(.done) .sq-cap span { color: transparent; background: none; border-style: dashed; border-color: #B9C1CB; }
/* phone-sized: one line per step; the live step's line sits in one fixed slot (rows that open would shift layout, CLS) */
.p3d-seq.sq-m { padding: .85em .9em .35em; border-radius: var(--radius-card); }
.sq-m .sq-title { font-size: 1.2em; }
.sq-m .sq-cols, .sq-m .sq-k span, .sq-m .sq-eye span { display: none; }
.sq-m .sq-list li { grid-template-columns: 1.75em 1fr auto; grid-template-areas: "n k cap"; grid-template-rows: auto; column-gap: .7em; align-items: center; margin: 0 -.9em; padding: .42em .9em; }
.sq-m .sq-list li::before { left: calc(.9em + .875em); }
.sq-m .sq-n { margin: 0; }
.sq-m .sq-q { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; } /* still read out, the slot is aria-hidden */
.sq-now { display: none; }
.sq-m .sq-now { display: grid; margin: .75em 0 .5em; padding: .65em .75em .7em; background: rgba(30,79,216,.07); border: 1px solid rgba(30,79,216,.25); border-radius: 8px; }
.sq-now > div { grid-area: 1 / 1; align-self: center; opacity: 0; transition: opacity .3s; }
.sq-now > div.on { opacity: 1; }
.sq-nk { display: flex; justify-content: space-between; gap: 1em; font: 500 .62em/1.3 var(--font-mono, "Geist Mono", monospace); letter-spacing: .1em; text-transform: uppercase; color: var(--accent-text); }
.sq-nk span { color: var(--muted); white-space: nowrap; }
.sq-now q { display: block; margin: .35em 0 .5em; font: 500 1em/1.3 var(--font-sans, Satoshi, system-ui, sans-serif); color: var(--ink); text-wrap: pretty; }
.sq-nc { display: flex; flex-wrap: wrap; gap: .3em; }
.sq-m .sq-cap { padding: 0; max-width: 40vw; }
.sq-m .sq-cap span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sq-m .sq-cap span + span { display: none; }
.p3d-grain { position: absolute; inset: 0; z-index: 4; pointer-events: none; opacity: .03; background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/></filter><rect width='160' height='160' filter='url(%23n)'/></svg>"); }
.p3d-cue, .p3d-keep { position: absolute; z-index: 5; display: flex; align-items: center; gap: 10px; font: 500 11px/1 var(--font-mono, "Geist Mono", monospace); letter-spacing: .1em; text-transform: uppercase; color: var(--p3d-mut); pointer-events: none; }
.p3d-cue { left: max(var(--gutter, 24px), calc((100vw - var(--max, 1200px)) / 2)); bottom: 30px; }
.p3d-keep { left: 50%; bottom: 44px; transform: translateX(-50%); flex-direction: column; opacity: 0; }
.p3d-mouse { width: 16px; height: 25px; border: 1.3px solid var(--p3d-mut); border-radius: 9px; position: relative; flex: none; }
.p3d-mouse::after { content: ""; position: absolute; left: 50%; top: 5px; width: 2px; height: 5px; margin-left: -1px; border-radius: 1px; background: var(--p3d-mut); animation: p3d-wheel 1.8s ease-in-out infinite; }
.p3d-chev { width: 10px; height: 10px; border-right: 1.3px solid var(--p3d-mut); border-bottom: 1.3px solid var(--p3d-mut); transform: rotate(45deg); animation: p3d-chev 1.8s ease-in-out infinite; }
@keyframes p3d-wheel { 0% { transform: translateY(0); opacity: 1; } 70% { transform: translateY(8px); opacity: 0; } 100% { opacity: 0; } }
@keyframes p3d-chev { 0%, 100% { transform: translateY(0) rotate(45deg); opacity: .4; } 50% { transform: translateY(5px) rotate(45deg); opacity: 1; } }
.p3d-rail { position: absolute; z-index: 5; right: 22px; top: 50%; height: 240px; transform: translateY(-50%); width: 1px; background: rgba(31,36,40,.16); pointer-events: none; }
.p3d-rail i { position: absolute; left: 0; top: 0; width: 1px; height: 100%; background: var(--p3d-blue); transform-origin: top; transform: scaleY(0); }
.p3d-rail b { position: absolute; right: -2px; width: 5px; height: 1px; background: var(--p3d-mut); }
.p3d-rail span { text-transform: uppercase; position: absolute; right: 14px; transform: translateY(-50%); font: 500 10px/1 var(--font-mono, "Geist Mono", monospace); letter-spacing: .1em; color: var(--p3d-mut); white-space: nowrap; }

@media (max-width: 820px) {
  .p3d-cue { left: var(--gutter, 24px); bottom: 176px; } .p3d-ready:has(.p3d-ticket:not([data-state="incoming"])) .p3d-cue { opacity: 0 !important; } /* the filled ticket grows over it */ .p3d-rail { display: none; } .p3d-keep { bottom: 150px; }
  html.p3d-on .p3d-main { align-items: flex-start; padding: 84px var(--gutter, 24px) 18px; }
  html.p3d-on .p3d-lede, html.p3d-on .p3d-eyebrow { display: none; }
  html.p3d-on .p3d-pin h2 { font-size: 30px; margin: 0; }
  html.p3d-on .p3d-poster { left: 50%; height: 56%; }
  html.p3d-on .p3d-mount .p3d-controls { left: 50%; bottom: 14px; }
  html.p3d-on .p3d-mount .p3d-ticket { opacity: calc(1 - var(--z, 0) * 2); position: absolute; left: var(--gutter, 24px); right: var(--gutter, 24px); bottom: 74px; width: auto; }
}
@media (prefers-reduced-motion: reduce) { .p3d-layer { animation: none; } }
