/* /indexNew: the prompt-to-film hero (hero3d.js) and the layer peel.
   Without JS, WebGL or motion (html:not(.p2f-3d)) both are plain blocks: the prompt, the film, the layers. */

html:has(.home-new) { scroll-behavior: auto; } /* ScrollTrigger scrolls the page itself */
.p2f, .peel { padding: 0; }
.p2f-spark { color: var(--accent); text-shadow: 0 0 14px rgba(245, 165, 36, 0.7); }

/* ---- The hero, static ---------------------------------------------------------------------------- */
.p2f-stage { position: relative; padding: 150px var(--gutter) 80px; }
.p2f-world { display: none; }
.p2f-intro { max-width: 1040px; margin: 0 auto; text-align: center; }
.p2f-h1 { font: 500 13px/1.4 "IBM Plex Mono", monospace; letter-spacing: 0.14em; text-transform: uppercase; color: var(--text-2); margin-bottom: 30px; }
/* The prompt box: an input, as in the studio, with what was attached, the sentence and a toolbar */
.p2f-box {
  position: relative; display: grid; gap: 14px; margin: 0 auto; max-width: 980px; padding: 22px 22px 14px 24px; border-radius: 26px;
  text-align: left; background: linear-gradient(rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.025));
  border: 1px solid rgba(245, 165, 36, 0.5);
  box-shadow: 0 0 0 5px rgba(245, 165, 36, 0.07), 0 0 60px rgba(245, 165, 36, 0.14), 0 30px 80px rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  transition: border-color 0.35s, background 0.35s, box-shadow 0.35s, opacity 0.35s, transform 0.5s var(--ease);
}
.p2f-prompt { display: flex; align-items: baseline; gap: 14px; }
.p2f-prompt .p2f-spark { flex: none; font-size: clamp(18px, 2vw, 26px); transform: translateY(-0.06em); }
.p2f-line {
  margin: 0; text-align: left; font: 500 clamp(22px, 2.5vw, 36px)/1.3 "Clarity City", system-ui, sans-serif;
  letter-spacing: -0.02em; color: #fff; min-height: 1.3em;
}
.p2f-line.empty::after { content: attr(data-placeholder); color: rgba(245, 245, 247, 0.34); } /* after the caret, as in a field */
.p2f-tools { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  padding-top: 12px; border-top: 1px solid var(--line); }
.p2f-attach {
  display: inline-flex; align-items: center; gap: 8px; padding: 7px 12px 7px 9px; border-radius: 999px; cursor: pointer;
  border: 1px dashed var(--line-2); background: none; color: rgba(245, 245, 247, 0.72); font: 500 13.5px "Clarity City", sans-serif;
  transition: border-color 0.25s, color 0.25s, background 0.25s;
}
.p2f-attach svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.p2f-attach:hover { border-color: rgba(245, 165, 36, 0.7); color: #fff; background: rgba(245, 165, 36, 0.06); }
.p2f.has-inputs .p2f-attach { visibility: hidden; }
.pw-word {
  font: inherit; letter-spacing: inherit; color: var(--accent); background: none; border: 0; padding: 0; cursor: pointer;
  text-decoration: underline dashed rgba(245, 165, 36, 0.7); text-decoration-thickness: 0.06em; text-underline-offset: 0.18em;
  border-radius: 6px; transition: background 0.2s, text-shadow 0.2s;
}
.pw-word:hover, .pw-word[aria-expanded="true"] { background: rgba(245, 165, 36, 0.12); text-shadow: 0 0 22px rgba(245, 165, 36, 0.55); }
.pw-word:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
.pw-word:not(:empty)::after { /* it opens a menu */
  content: ""; display: inline-block; width: 0.42em; height: 0.42em; margin: 0 0.04em 0 0.16em; vertical-align: 0.14em;
  border-right: 0.08em solid currentColor; border-bottom: 0.08em solid currentColor; transform: rotate(45deg) translateY(-0.1em);
  opacity: 0.75; transition: transform 0.3s var(--ease); }
.pw-word[aria-expanded="true"]::after { transform: rotate(-135deg) translate(-0.12em, -0.06em); }
.p2f-caret { display: inline-block; width: 0.09em; min-width: 3px; height: 1.02em; margin-left: 0.06em; vertical-align: -0.16em;
  background: var(--accent); box-shadow: 0 0 12px var(--accent); animation: p2f-blink 1.05s steps(1) infinite; }
.p2f-line.typing .p2f-caret { animation: none; }
@keyframes p2f-blink { 50% { opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .p2f-caret { animation: none; } }

/* What came with the prompt: photos and a website, uploaded one by one (the restaurant film) */
.p2f-inputs { display: flex; justify-content: flex-start; align-items: flex-end; flex-wrap: wrap; gap: 10px; margin: 0; }
.pl-inputs { justify-content: center; }
.p2f-inputs[hidden] { display: none; }
.pi { position: relative; margin: 0; }
figure.pi { width: 80px; }
figure.pi img { display: block; width: 80px; height: 80px; object-fit: cover; border-radius: 13px;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.16), 0 14px 30px rgba(0, 0, 0, 0.5); }
figure.pi figcaption { margin-top: 7px; font: 500 10.5px "IBM Plex Mono", monospace; letter-spacing: 0.06em; text-transform: uppercase;
  white-space: nowrap;
  color: var(--text-2); text-align: center; }
.pi-bar { position: absolute; left: 10px; right: 10px; top: 66px; height: 3px; border-radius: 2px; overflow: hidden; background: rgba(0, 0, 0, 0.45);
  transition: opacity 0.3s; }
.pi-bar::after { content: ""; position: absolute; inset: 0; background: var(--accent); transform: scaleX(0); transform-origin: left; }
.pi-url { display: inline-flex; align-items: center; gap: 8px; height: 40px; margin-bottom: 26px; padding: 0 14px 0 12px; border-radius: 999px;
  background: rgba(255, 255, 255, 0.06); border: 1px solid var(--line-2); font-size: 14px; color: #fff; }
.pi-url svg { width: 16px; height: 16px; fill: none; stroke: var(--accent); stroke-width: 2; stroke-linecap: round; }
.pi-url em { font: 500 10px "IBM Plex Mono", monospace; font-style: normal; letter-spacing: 0.08em; text-transform: uppercase;
  padding: 3px 7px; border-radius: 999px; background: rgba(245, 165, 36, 0.16); color: var(--accent-2); }
.p2f-inputs.done .pi-bar, html:not(.p2f-3d) .pi-bar { opacity: 0; }
.p2f-3d .p2f-intro .p2f-inputs:not(.done) .pi { opacity: 0; transform: translateY(28px) scale(0.9); }
.p2f-3d .p2f-intro .p2f-inputs.go .pi { animation: pi-drop 0.55s var(--ease) calc(var(--i) * 0.38s) forwards; }
.p2f-3d .p2f-intro .p2f-inputs.go .pi-bar::after { animation: pi-fill 0.5s linear calc(var(--i) * 0.38s + 0.22s) forwards; }
@keyframes pi-drop { to { opacity: 1; transform: none; } }
@keyframes pi-fill { to { transform: none; } }
.p2f-3d .p2f.burst .p2f-intro .p2f-inputs { opacity: 0; }
.p2f-3d .p2f-intro.uploading .p2f-line::after { opacity: 0; }
.p2f-intro.long .p2f-line { font-size: clamp(17px, 1.7vw, 24px); line-height: 1.45; letter-spacing: -0.012em; }
.p2f-intro.long .p2f-prompt .p2f-spark { font-size: clamp(15px, 1.4vw, 20px); }


.p2f-go {
  display: inline-flex; align-items: center; gap: 10px; margin-left: auto; padding: 6px 6px 6px 16px; border-radius: 999px; cursor: pointer;
  border: 0; background: #fff; color: #050505; font: 500 14.5px "Clarity City", sans-serif;
  transition: box-shadow 0.25s, opacity 0.3s;
}
.p2f-go kbd { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: #050505; color: #fff;
  font: 600 14px "IBM Plex Mono", monospace; }
.p2f-go:hover, .p2f-go.nudge { box-shadow: 0 0 0 5px rgba(245, 165, 36, 0.18), 0 0 40px rgba(245, 165, 36, 0.35); }
.p2f-go.nudge kbd { animation: p2f-key 1.6s var(--ease) infinite; }
@keyframes p2f-key { 0%, 60%, 100% { transform: none; } 30% { transform: translateY(2px); box-shadow: inset 0 2px 0 rgba(0, 0, 0, 0.2); } }
.p2f-hint { margin-top: 22px; font-size: 14px; color: var(--text-2); }
.p2f-hint .u { text-decoration: underline dashed rgba(245, 165, 36, 0.7); text-underline-offset: 3px; }

.p2f-menu {
  position: absolute; z-index: 5; width: 300px; padding: 8px; border-radius: 18px; text-align: left;
  background: rgba(14, 14, 18, 0.94); border: 1px solid var(--line-2); box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  transform-origin: var(--ox, 50%) 0; opacity: 0; transform: translateY(-8px) scale(0.94); visibility: hidden; pointer-events: none;
  transition: opacity 0.18s, transform 0.22s var(--ease), visibility 0s 0.22s;
}
.p2f-menu.open { opacity: 1; transform: none; visibility: visible; pointer-events: auto;
  transition: opacity 0.22s, transform 0.4s cubic-bezier(0.2, 1.2, 0.3, 1), visibility 0s; }
.p2f-menu.open button { animation: p2f-item 0.38s var(--ease) calc(0.04s + var(--i, 0) * 0.045s) both; }
@keyframes p2f-item { from { opacity: 0; transform: translateY(-6px); } }
.p2f-menu p { margin: 6px 10px 8px; font: 500 11px "IBM Plex Mono", monospace; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-2); }
.p2f-menu button {
  display: grid; width: 100%; gap: 2px; padding: 10px 12px; border: 0; border-radius: 12px; background: none; color: #fff;
  text-align: left; cursor: pointer; font: inherit;
}
.p2f-menu button b { font-weight: 500; font-size: 17px; }
.p2f-menu button span { font-size: 13px; color: var(--text-2); }
.p2f-menu button:hover, .p2f-menu button:focus-visible { background: rgba(255, 255, 255, 0.07); outline: none; }
.p2f-menu button[aria-checked="true"] b { color: var(--accent); }
.p2f-menu button[aria-checked="true"] b::after { content: " ✓"; }

.p2f-dock, .p2f-vo, .p2f-scroll { display: none; }

/* The player: the finished film with its timeline */
.p2f-player { max-width: 880px; margin: 64px auto 0; }
.pp-screen { position: relative; aspect-ratio: 16 / 9; border-radius: 16px; overflow: hidden; background: #000;
  border: 1px solid rgba(255, 255, 255, 0.14); box-shadow: 0 40px 120px -30px rgba(245, 165, 36, 0.35), 0 30px 80px rgba(0, 0, 0, 0.6); }
.pp-screen img, .pp-screen video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.pp-screen video, .pf-shot video, .pl-screen video { z-index: 1; }
.pp-bar { display: flex; align-items: center; gap: 14px; margin-top: 14px; font-size: 13px; }
.pp-play, .p2f-sound {
  width: 38px; height: 38px; flex: none; border-radius: 50%; border: 1px solid var(--line-2); background: rgba(255, 255, 255, 0.05);
  color: #fff; display: grid; place-items: center; cursor: pointer; padding: 0; transition: background 0.2s, border-color 0.2s;
}
.pp-play:hover, .p2f-sound:hover { border-color: rgba(255, 255, 255, 0.4); }
.pp-play svg, .p2f-sound svg { width: 18px; height: 18px; }
.pp-play path { fill: currentColor; }
.pp-play .i-pause, .pp-play.playing .i-play { display: none; }
.pp-play.playing .i-pause { display: inline; }
.p2f-sound path { fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.p2f-sound .spk { fill: currentColor; stroke: none; }
.p2f-sound .waves { display: none; }
.p2f-sound[aria-pressed="true"] .waves { display: inline; }
.p2f-sound[aria-pressed="true"] .mute { display: none; }
.p2f-sound[aria-pressed="true"] { border-color: rgba(245, 165, 36, 0.6); color: var(--accent-2); }
.pp-tc { font: 500 12px "IBM Plex Mono", monospace; color: var(--accent-2); white-space: nowrap; }
.pp-name { flex: 1; min-width: 0; display: grid; line-height: 1.3; }
.pp-name b { font-weight: 500; text-transform: capitalize; }
.pp-name b, .pp-name span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pp-name span { color: var(--text-2); font-size: 12px; }
.pp-export {
  display: inline-flex; align-items: center; gap: 8px; padding: 10px 16px; border-radius: 999px; white-space: nowrap;
  border: 1px solid var(--line-2); color: rgba(255, 255, 255, 0.82); text-decoration: none; font-weight: 500; font-size: 14px;
  transition: background 0.5s, color 0.5s, box-shadow 0.5s, border-color 0.5s;
}
.pp-export svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.pp-export.lit, html:not(.p2f-3d) .pp-export { background: var(--accent); border-color: var(--accent); color: #111; }
.pp-export.lit { box-shadow: 0 0 0 6px rgba(245, 165, 36, 0.16), 0 0 46px rgba(245, 165, 36, 0.55); animation: p2f-lit 2.4s ease-in-out infinite; }
@keyframes p2f-lit { 50% { box-shadow: 0 0 0 10px rgba(245, 165, 36, 0.06), 0 0 60px rgba(245, 165, 36, 0.35); } }

.pp-timeline { position: relative; margin-top: 14px; padding-bottom: 2px; cursor: pointer; }
.pp-tracks { display: flex; gap: 3px; height: 50px; }
.pp-seg { position: relative; min-width: 0; border-radius: 8px; overflow: hidden; background: #111 center / cover no-repeat;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.12); }
.pp-seg::after { content: ""; position: absolute; inset: 0; background: linear-gradient(transparent 30%, rgba(0, 0, 0, 0.75)); }
.pp-seg span { position: absolute; left: 7px; bottom: 5px; right: 6px; z-index: 1; font: 500 10px "IBM Plex Mono", monospace;
  color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pp-seg.on { box-shadow: inset 0 0 0 2px var(--accent); }
.pp-vo { display: block; width: 100%; height: 18px; margin-top: 5px; }
.pp-vo rect { fill: rgba(255, 255, 255, 0.28); }
.pp-vo rect.said { fill: var(--accent); }
.pp-head { position: absolute; top: -4px; bottom: -2px; left: 0; width: 2px; border-radius: 2px; background: #fff;
  box-shadow: 0 0 10px rgba(255, 255, 255, 0.8); transform: translateX(calc(var(--x, 0) * 1px)); pointer-events: none; }
.pp-cta { margin-top: 18px; font-size: 14px; color: var(--text-2); text-align: center; }
.pp-cta a { display: inline-flex; align-items: center; gap: 8px; margin-left: 6px; color: #fff; font-weight: 500; text-decoration: none; }
.pp-cta .arrow { width: 22px; height: 22px; background: #fff center / 11px no-repeat;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 14 14' fill='none' stroke='%23050505' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 10l6-6M5 4h5v5'/%3E%3C/svg%3E"); }

/* ---- The hero as a film set (WebGL and motion) ---------------------------------------------------- */
.p2f-3d .p2f-stage {
  height: 100vh; height: 100svh; padding: 0; overflow: hidden;
  background: radial-gradient(120% 80% at 50% 40%, #0c0c11 0%, var(--bg) 62%);
}
.p2f-3d .p2f-stage::after { /* a vignette over the set, under the HUD */
  content: ""; position: absolute; inset: 0; pointer-events: none; z-index: 1;
  background: radial-gradient(140% 100% at 50% 50%, transparent 55%, rgba(0, 0, 0, 0.55));
}
.p2f-3d .p2f-world { display: block; position: absolute; inset: 0; }
.p2f-world > * { position: absolute !important; inset: 0; }
.p2f-world canvas { pointer-events: none; z-index: 1; }
.p2f-3d .p2f-hud { position: absolute; inset: 0; z-index: 2; pointer-events: none; }
.p2f-3d .p2f-hud > * { pointer-events: auto; }
.p2f-3d .p2f-intro { position: absolute; left: 50%; top: 50%; width: min(1000px, calc(100% - 32px)); transform: translate(-50%, -52%); }
.p2f-3d .p2f-intro .p2f-h1, .p2f-3d .p2f-hint, .p2f-3d .p2f-tools { transition: opacity 0.6s, transform 0.6s var(--ease); }
.p2f-3d .p2f-intro:not(.ready) .p2f-hint { opacity: 0; transform: translateY(10px); }
.p2f-3d .p2f-intro:not(.ready) .p2f-go { opacity: 0.45; pointer-events: none; }
.p2f-3d .p2f.gone .p2f-intro { pointer-events: none; }
.p2f-3d .p2f.gone .p2f-h1, .p2f-3d .p2f.gone .p2f-hint { opacity: 0; transform: translateY(-14px); }
.p2f-3d .p2f.burst .p2f-box { border-color: transparent; background: transparent; box-shadow: none;
  backdrop-filter: none; -webkit-backdrop-filter: none; }
.p2f-3d .p2f.burst .p2f-tools { opacity: 0; border-color: transparent; }
.p2f-3d .p2f-line .pw-before, .p2f-3d .p2f-line .pw-word, .p2f-3d .p2f-line .pw-after { transition: opacity 0.12s; }
.p2f-3d .p2f.burst .p2f-intro .p2f-line > :not(.p2f-caret), .p2f-3d .p2f.burst .p2f-intro .p2f-spark { opacity: 0; }
.p2f-3d .p2f.burst .p2f-intro .p2f-caret { opacity: 0; animation: none; }

.p2f-3d .p2f-dock {
  display: flex; align-items: center; gap: 10px; position: absolute; top: 84px; left: 50%; max-width: min(860px, calc(100% - 32px));
  padding: 9px 18px 9px 14px; border-radius: 999px; background: rgba(12, 12, 16, 0.72); border: 1px solid var(--line);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  opacity: 0; transform: translate(-50%, -8px); transition: opacity 0.5s, transform 0.5s var(--ease); pointer-events: none;
}
.p2f-3d .p2f-dock.on { opacity: 1; transform: translate(-50%, 0); pointer-events: auto; }
.p2f-dock .p2f-line { font-size: 15px; line-height: 1.35; letter-spacing: -0.01em; min-height: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.p2f-dock .pw-word { text-decoration-thickness: 1px; }


.p2f-3d .p2f-vo {
  display: grid; grid-template-columns: auto minmax(0, 1fr) minmax(0, 1.25fr); align-items: center; gap: 16px;
  position: absolute; left: 50%; bottom: 26px; width: min(820px, calc(100% - 32px)); padding: 10px 20px 10px 10px;
  border-radius: 999px; background: rgba(12, 12, 16, 0.78); border: 1px solid var(--line-2);
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); cursor: pointer;
  opacity: 0; transform: translate(-50%, 16px); transition: opacity 0.45s, transform 0.45s var(--ease); pointer-events: none;
}
.p2f-3d .p2f-vo.on { opacity: 1; transform: translate(-50%, 0); pointer-events: auto; }
.p2f-vo .p2f-sound { width: 44px; height: 44px; }
.p2f-wave { display: flex; align-items: center; gap: 2px; height: 40px; }
.p2f-wave i { flex: 1; min-width: 1px; height: calc(var(--h) * 100%); min-height: 2px; border-radius: 2px; background: rgba(255, 255, 255, 0.26);
  transform: scaleY(var(--s, 1)); transition: background 0.15s; }
.p2f-wave i.said { background: var(--film-accent, var(--accent)); }
.p2f-wave i.now { background: #fff; box-shadow: 0 0 10px #fff; }
.p2f-vo-text { display: grid; min-width: 0; line-height: 1.3; }
.p2f-vo-text p { margin: 0; font-size: 14px; color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.p2f-vo-text p .said { color: #fff; }
.p2f-vo-text > span { font: 500 10.5px "IBM Plex Mono", monospace; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-2); }

.p2f-3d .p2f-player {
  position: absolute; left: 50%; top: 54%; width: min(860px, calc(100% - 32px), calc((100svh - 370px) * 16 / 9)); margin: 0;
  transform: translate(-50%, -50%) scale(0.96); opacity: 0; pointer-events: none; transition: opacity 0.5s, transform 0.6s var(--ease);
}
.p2f-3d .p2f-player.on { opacity: 1; transform: translate(-50%, -50%); pointer-events: auto; }
.p2f-3d .p2f-player .pp-screen { box-shadow: 0 50px 140px -30px color-mix(in srgb, var(--film-accent, var(--accent)) 45%, transparent), 0 30px 80px rgba(0, 0, 0, 0.6); }

.p2f-3d .p2f-scroll {
  display: flex; flex-direction: column; align-items: center; gap: 10px; position: absolute; left: 50%; bottom: 26px; margin: 0;
  transform: translateX(-50%); font: 500 11px "IBM Plex Mono", monospace; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--text-2); transition: opacity 0.4s; pointer-events: none;
}
.p2f-scroll i { width: 1px; height: 34px; background: linear-gradient(transparent, rgba(255, 255, 255, 0.6)); animation: p2f-drop 1.8s ease-in-out infinite; transform-origin: top; }
@keyframes p2f-drop { 0% { transform: scaleY(0); } 50% { transform: scaleY(1); transform-origin: top; } 51% { transform-origin: bottom; } 100% { transform: scaleY(0); transform-origin: bottom; } }
.p2f-3d .p2f.gone .p2f-scroll { opacity: 0; }

/* The storyboard frames (CSS3D objects: drawn at 1280 px wide and scaled by the camera, so they stay sharp up close) */
.p2f-frame { width: 1280px; height: 910px; color: #fff; font-family: "Clarity City", system-ui, sans-serif; }
.pf-shot { position: relative; width: 1280px; height: 720px; border-radius: 26px; overflow: hidden; background: #0b0f14;
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.14), 0 60px 120px rgba(0, 0, 0, 0.65); }
.pf-shot img, .pf-shot video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.pf-shot .pf-dim { position: absolute; inset: 0; z-index: 2; background: #030304; opacity: var(--dim, 0); pointer-events: none; }
.pf-focus .pf-shot { box-shadow: 0 0 0 4px var(--film-accent, var(--accent)), 0 0 90px color-mix(in srgb, var(--film-accent, var(--accent)) 55%, transparent), 0 60px 120px rgba(0, 0, 0, 0.65); }
.pf-word { position: absolute; top: 30px; left: 30px; z-index: 3; padding: 12px 22px; border-radius: 999px; font: 500 30px "IBM Plex Mono", monospace;
  background: var(--film-accent, var(--accent)); color: #111; box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4); opacity: var(--word, 0); }
.pf-word::before { content: "✦ "; }
.pf-word:empty { display: none; }
.pf-cap { display: grid; grid-template-columns: auto 1fr auto; gap: 6px 22px; align-items: baseline; padding: 30px 8px 0; opacity: var(--cap, 1); }
.pf-cap b { font: 500 34px "IBM Plex Mono", monospace; color: var(--film-accent, var(--accent)); }
.pf-cap strong { font-weight: 600; font-size: 44px; letter-spacing: -0.02em; }
.pf-cap em { font: 400 30px "IBM Plex Mono", monospace; font-style: normal; color: var(--text-2); }
.pf-cap p { grid-column: 2 / -1; margin: 0; font-size: 36px; line-height: 1.3; color: rgba(245, 245, 247, 0.66);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

/* ---- The layer peel --------------------------------------------------------------------------------- */
.peel-stage { display: grid; grid-template-columns: minmax(260px, 400px) minmax(0, 1fr); gap: 64px; align-items: center;
  padding: 120px var(--gutter); }
.peel-kicker { font: 500 12px "IBM Plex Mono", monospace; letter-spacing: 0.14em; text-transform: uppercase; color: var(--accent); margin-bottom: 18px; }
.peel h2 { font-size: clamp(34px, 4.2vw, 56px); line-height: 1.02; }
.peel-steps { margin-top: 34px; display: grid; gap: 4px; counter-reset: peel; }
.peel-steps li { counter-increment: peel; display: grid; grid-template-columns: 30px 1fr; gap: 2px 8px; padding: 12px 14px; border-radius: 14px;
  color: var(--text-2); transition: background 0.3s, color 0.3s; }
.peel-steps li::before { content: "0" counter(peel); grid-row: span 2; font: 500 12px/1.9 "IBM Plex Mono", monospace; }
.peel-steps b { font-weight: 500; font-size: 18px; color: rgba(245, 245, 247, 0.75); }
.peel-steps span { font-size: 14px; }
.peel-steps li.on { background: rgba(255, 255, 255, 0.05); color: rgba(245, 245, 247, 0.8); }
.peel-steps li.on b { color: #fff; }
.peel-steps li.on::before { color: var(--accent); }
.peel-steps li.past b { text-decoration: line-through; text-decoration-color: rgba(255, 255, 255, 0.3); }

.peel-stack { position: relative; aspect-ratio: 16 / 11; perspective: 1800px; perspective-origin: 50% -20%; }
.peel-layer {
  --k: 0; position: absolute; inset: 0; display: flex; flex-direction: column; border-radius: 20px; overflow: hidden;
  background: #0b0b0f; border: 1px solid var(--line-2); transform-origin: 50% 0;
  box-shadow: 0 40px 90px -20px rgba(0, 0, 0, 0.8);
  transform: translateY(calc(var(--k) * 22px)) scale(calc(1 - var(--k) * 0.035));
}
.peel-layer::after { /* the light on a layer as it lifts */
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: var(--sheen, 0);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.22), transparent 45%, rgba(0, 0, 0, 0.5));
}
.peel-layer header { display: flex; justify-content: space-between; gap: 12px; padding: 13px 18px; border-bottom: 1px solid var(--line);
  font: 500 12px "IBM Plex Mono", monospace; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-2); }
.peel-layer header b { color: #fff; font-weight: 500; }
.pl-body { position: relative; flex: 1; min-height: 0; }
.pl-screen { position: absolute; inset: 0; background: #000; }
.pl-screen video, .pl-screen img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.l-anim .pl-body { background: #0e0e13; }
.pl-tracks { position: absolute; inset: 18px; display: grid; grid-template-rows: 1fr auto auto; gap: 10px; }
.pl-strip { display: flex; gap: 4px; min-height: 0; }
.pl-strip div { position: relative; min-width: 0; border-radius: 8px; background: #111 center / cover; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.12); }
.pl-strip div span { position: absolute; left: 8px; bottom: 6px; font: 500 10px "IBM Plex Mono", monospace; color: #fff; text-shadow: 0 1px 4px #000; }
.pl-lane { display: flex; gap: 4px; height: 18px; }
.pl-lane i { border-radius: 4px; background: rgba(255, 255, 255, 0.08); position: relative; }
.pl-lane i::before { content: ""; position: absolute; top: 4px; bottom: 4px; left: var(--a); right: var(--b); border-radius: 3px; background: var(--c); opacity: 0.85; }
.pl-legend { display: flex; flex-wrap: wrap; gap: 14px; font: 500 10.5px "IBM Plex Mono", monospace; color: var(--text-2); text-transform: uppercase; letter-spacing: 0.06em; }
.pl-legend span::before { content: ""; display: inline-block; width: 8px; height: 8px; border-radius: 2px; margin-right: 6px; background: var(--c); }
.l-voice .pl-body { background: #0c0c10; }
.pl-voice { position: absolute; inset: 22px; display: grid; grid-template-rows: 1fr auto; gap: 16px; }
.pl-voice svg { width: 100%; height: 100%; }
.pl-voice svg rect { fill: var(--accent); }
.pl-voice p { margin: 0; font-size: 15px; line-height: 1.45; color: var(--text-2); max-height: 4.4em; overflow: hidden; }
.l-script .pl-body { background: #f4f1ea; color: #1b1a17; }
.pl-script { position: absolute; inset: 0; padding: 22px 26px; overflow: hidden; display: grid; align-content: start; gap: 12px;
  font: 400 14px/1.5 "IBM Plex Mono", monospace; }
.pl-script li { display: grid; grid-template-columns: 70px 1fr; gap: 12px; }
.pl-script li b { font-weight: 500; color: #8a8478; }
.l-prompt .pl-body { display: grid; place-items: center; background: radial-gradient(80% 90% at 50% 50%, #15151b, #09090c); }
.pl-ask { display: grid; justify-items: center; gap: 18px; max-width: 84%; }
.pl-inputs { margin: 0; }
.pl-inputs:empty { display: none; }
.pl-inputs figure.pi, .pl-inputs figure.pi img { width: 74px; }
.pl-inputs figure.pi img { height: 74px; }
.pl-inputs .pi-bar { display: none; }
.pl-prompt { display: flex; gap: 12px; font: 500 clamp(17px, 1.8vw, 24px)/1.4 "Clarity City", sans-serif; color: #fff; }

@media (max-width: 860px) {
  .peel-stage { grid-template-columns: minmax(0, 1fr); gap: 28px; padding-top: 90px; padding-bottom: 60px; }
  .peel-copy { min-width: 0; }
  .peel-steps { grid-template-columns: repeat(5, minmax(0, auto)); justify-content: start; gap: 2px; margin-top: 18px; }
  .peel-steps li { grid-template-columns: 1fr; padding: 7px 8px; min-width: 0; }
  .peel-steps li::before, .peel-steps span { display: none; }
  .peel-steps b { font-size: 13px; }
  .peel-stack { aspect-ratio: 4 / 3.4; }
  .pl-script { font-size: 12px; padding: 16px; }
  .pl-script li { grid-template-columns: 44px 1fr; }
}
@media (max-width: 640px) {
  .p2f-box { padding: 16px 14px 12px 16px; border-radius: 20px; gap: 12px; }
  .p2f-attach span { font-size: 12.5px; }
  .p2f-go { padding-left: 13px; font-size: 13.5px; }
  figure.pi, figure.pi img { width: 62px; }
  figure.pi img { height: 62px; }
  .pi-bar { top: 50px; }
  .p2f-inputs { gap: 8px; margin-bottom: 18px; }
  .pi-url { margin-bottom: 0; }
  .p2f-3d .p2f-vo { grid-template-columns: auto minmax(0, 1fr); border-radius: 22px; bottom: 16px; }
  .p2f-3d .p2f-vo .p2f-vo-text { grid-column: 1 / -1; padding: 0 6px 4px; }
  .p2f-3d .p2f-dock { top: 72px; }
  .pp-name { display: none; }
  .pp-bar { gap: 10px; }
  .pp-export { margin-left: auto; padding: 9px 14px; }
  .pp-seg span { display: none; }
  .pp-tracks { height: 38px; }
  .pf-cap p { -webkit-line-clamp: 3; }
}

/* The peel without motion: the five layers side by side */
.peel.flat .peel-stack { aspect-ratio: auto; display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; perspective: none; }
.peel.flat .peel-layer { position: relative; inset: auto; height: 240px; transform: none !important; opacity: 1 !important; }
