/* VVid website — the second design pass: exploding editor layers, bento features, the color grading demo,
   studio zoom callouts, the page timeline rail and global polish (spotlight, grain, magnet, title reveals). */

/* ---------- global polish ---------- */
.spot { position: absolute; left: 0; top: 0; width: 780px; height: 780px; margin: -390px 0 0 -390px; border-radius: 50%; opacity: 0;
  background: radial-gradient(circle, rgba(79, 140, 255, 0.14), rgba(155, 123, 255, 0.06) 38%, transparent 64%); will-change: transform; transition: opacity 1.2s var(--soft); }
.spot.on { opacity: 1; }
.grain { position: fixed; inset: 0; z-index: 55; pointer-events: none; opacity: 0.06; background-size: 180px 180px; animation: grain 0.9s steps(6) infinite;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"); }
@keyframes grain { 0% { background-position: 0 0; } 17% { background-position: -40px 60px; } 33% { background-position: 70px -20px; } 50% { background-position: -90px -70px; } 67% { background-position: 30px 90px; } 83% { background-position: 100px 30px; } 100% { background-position: 0 0; } }

.btn[data-magnet] { transition: translate .7s var(--glide), transform .45s var(--glide), box-shadow .6s var(--soft), background-color .45s var(--soft), border-color .45s var(--soft), opacity .4s var(--soft); }

/* "Generate." keeps a slow sheen moving through it */
.hw.g > span { background: linear-gradient(100deg, #4f8cff 0%, #7ce6ff 25%, #b48cff 50%, #7ce6ff 75%, #4f8cff 100%); background-size: 200% 100%;
  -webkit-background-clip: text; background-clip: text; animation: wordUp 1.1s var(--glide) forwards, sheen 8s linear 1.6s infinite; animation-delay: calc(.12s + var(--i) * .14s), 1.6s; }
@keyframes sheen { to { background-position: 200% 0; } }

/* section titles come into focus word by word, like a focus pull */
.split .w { display: inline-block; opacity: 0; filter: blur(12px); transform: translate3d(0, .3em, 0);
  transition: opacity .9s var(--soft), filter 1.1s var(--soft), transform 1.2s var(--glide); transition-delay: calc(var(--wi, 0) * 70ms + .05s); }
.split.in .w { opacity: 1; filter: blur(0); transform: none; }

/* ---------- hero: the editor comes apart into its layers ---------- */
.ed { overflow: visible; transform: rotateX(calc(var(--rx) + var(--x, 0) * 18deg)) rotateY(calc(var(--ry) - var(--x, 0) * 22deg)) scale(calc(1 - var(--x, 0) * .08)); }
.ed-bar { border-radius: 13px 13px 0 0; }
.ed-foot { border-radius: 0 0 13px 13px; }
.ed-body, .ed-view { transform-style: preserve-3d; }
.ed-lib, .ed-insp { position: relative; }
.lyr { transform: translateZ(calc(var(--x, 0) * var(--d, 40) * 1px)); box-shadow: 0 calc(var(--x, 0) * 24px) calc(var(--x, 0) * 46px) -14px rgba(0, 0, 0, .75); }
.ed-words.lyr { box-shadow: none; outline: 1px dashed rgba(124, 230, 255, calc(var(--x, 0) * .9)); outline-offset: -1px; }
.ly-tag { position: absolute; left: 8px; top: -9px; z-index: 3; padding: 2px 7px; border-radius: 5px; font: 700 9px/1.4 var(--mono); letter-spacing: .06em; color: #fff; white-space: nowrap;
  background: rgba(79, 140, 255, .92); box-shadow: 0 4px 12px rgba(0, 0, 0, .4); opacity: calc(var(--x, 0) * 2 - .5); pointer-events: none; }
.ed-screen .ly-tag { top: auto; bottom: 6px; left: 6px; background: rgba(255, 74, 93, .92); }
.ed-words .ly-tag { background: rgba(242, 169, 59, .95); color: #2b1a00; }
.ed-tl { cursor: ew-resize; touch-action: pan-y; }
.ed-tl.scrubbing { cursor: grabbing; }
.ed-tl.scrubbing .ed-ph::before { box-shadow: 0 0 14px 2px rgba(255, 74, 93, .9); }
.scrub-hint { position: absolute; right: 10px; top: -13px; z-index: 4; display: flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px; font-size: 10.5px; font-weight: 700;
  color: #06101f; background: var(--grad); box-shadow: 0 8px 20px -6px rgba(79, 140, 255, .8); opacity: 0; transform: translateY(6px); transition: opacity .6s var(--soft), transform .7s var(--glide); pointer-events: none; }
.scrub-hint.show { opacity: 1; transform: none; animation: nudge 1.6s ease-in-out .6s 3; }
@keyframes nudge { 50% { translate: -8px 0; } }

/* ---------- studio tour: zoom into each screen with callouts ---------- */
.frame-in { position: absolute; inset: 0; display: block; transform-origin: var(--ox, 50%) var(--oy, 50%); transform: scale(var(--z, 1)); will-change: transform; }
.hots { position: absolute; inset: 0; opacity: 0; transition: opacity .5s var(--soft); pointer-events: none; }
.hots.on { opacity: 1; }
.hot { position: absolute; display: flex; align-items: center; gap: 7px; transform-origin: 0 50%; transform: translate(-6px, -50%) scale(calc(1 / var(--z, 1))); }
.hot.lft { flex-direction: row-reverse; transform-origin: 100% 50%; transform: translate(calc(-100% + 6px), -50%) scale(calc(1 / var(--z, 1))); }
.hot i { width: 12px; height: 12px; flex-shrink: 0; border-radius: 50%; background: var(--cyan); border: 2px solid #fff; animation: ping 2s var(--soft) infinite; }
.hot b { padding: 5px 10px; border-radius: 8px; font-size: 12.5px; font-weight: 650; color: #fff; white-space: nowrap;
  background: rgba(8, 9, 14, .86); border: 1px solid rgba(124, 230, 255, .4); box-shadow: 0 8px 22px -8px rgba(0, 0, 0, .8); }
.viewer { top: max(90px, calc(50vh - 280px)); }
.v-chips { position: relative; display: flex; flex-wrap: wrap; gap: 4px; margin-top: 14px; }
.v-chips button { position: relative; z-index: 1; padding: 6px 11px; border-radius: 8px; font-size: 12.5px; font-weight: 650; color: var(--dim); transition: color .4s var(--soft); }
.v-chips button:hover, .v-chips button.on { color: var(--ink); }
.v-ink { position: absolute; z-index: 0; left: 0; top: 0; width: 0; height: 0; border-radius: 8px; background: rgba(79, 140, 255, .16); box-shadow: inset 0 0 0 1px rgba(79, 140, 255, .5);
  transition: transform .6s var(--glide), width .6s var(--glide), height .6s var(--glide); }

/* ---------- bento features ---------- */
.bento { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.bx { padding: 0; display: flex; flex-direction: column; }
.bx.w2 { grid-column: span 2; }
.bx-vis { position: relative; height: 170px; margin: 12px 12px 0; border-radius: 12px; overflow: hidden; background: #0d0e13; border: 1px solid #20232b; }
.bx h3 { margin: 18px 22px 6px; font-size: 18px; }
.bx p { margin: 0 22px 22px; font-size: 14.5px; }
.bx.slim { flex-direction: row; align-items: center; }
.bx.slim .bx-txt { flex: 1; padding: 22px 8px 22px 24px; }
.bx.slim h3 { margin: 0 0 6px; }
.bx.slim p { margin: 0; }
.bx.slim .bx-vis { flex: 0 0 46%; height: 112px; margin: 12px 12px 12px 0; }
.bento:not(.live) .bx-vis, .bento:not(.live) .bx-vis * { animation-play-state: paused !important; }
.bx-vis .lbl { position: absolute; left: 10px; top: 9px; z-index: 3; padding: 2px 8px; border-radius: 6px; font: 600 10.5px var(--mono); color: #cfd6e6; background: rgba(8, 9, 14, .7); }

/* timeline with J/K/L */
.v-tl { padding: 28px 14px 0; }
.vt-ruler { position: absolute; left: 14px; right: 14px; top: 12px; height: 8px; background: repeating-linear-gradient(90deg, rgba(255, 255, 255, .2) 0 1px, transparent 1px 22px); }
.vt-row { position: relative; height: 24px; margin-top: 8px; border-radius: 5px; background: #15161c; }
.vt-row i { position: absolute; top: 3px; bottom: 3px; border-radius: 3px; background: var(--c); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .14); }
.vt-row i.trim { animation: trim 6s var(--soft) infinite; }
.vt-row i.trim::after { content: ""; position: absolute; right: -2px; top: -3px; bottom: -3px; width: 4px; border-radius: 2px; background: #ffcf2e; opacity: 0; animation: trimH 6s infinite; }
@keyframes trim { 0%, 34% { width: 30%; } 46%, 84% { width: 19%; } 96%, 100% { width: 30%; } }
@keyframes trimH { 0%, 32% { opacity: 0; } 35%, 46% { opacity: 1; } 49%, 82% { opacity: 0; } 85%, 96% { opacity: 1; } 99%, 100% { opacity: 0; } }
.vt-ph { position: absolute; top: 8px; height: 112px; left: 6%; width: 2px; margin-left: -1px; background: #ff4a5d; box-shadow: 0 0 10px rgba(255, 74, 93, .85); animation: jkl 6s linear infinite; }
.vt-ph::before { content: ""; position: absolute; top: -2px; left: -5px; border: 6px solid transparent; border-top: 7px solid #ff4a5d; }
@keyframes jkl { 0% { left: 6%; } 30% { left: 58%; } 42% { left: 58%; } 62% { left: 32%; } 72% { left: 32%; } 96%, 100% { left: 90%; } }
.vt-keys { position: absolute; right: 12px; bottom: 10px; display: flex; gap: 6px; }
.vt-keys kbd { width: 28px; height: 28px; display: grid; place-items: center; border-radius: 7px; font: 700 12px var(--mono); color: #cfd2da; background: #1c1e25; box-shadow: inset 0 -2px 0 rgba(0, 0, 0, .45), 0 0 0 1px #2a2d36; }
.vt-keys .kl { animation: keyL 6s infinite; } .vt-keys .kk { animation: keyK 6s infinite; } .vt-keys .kj { animation: keyJ 6s infinite; }
@keyframes keyL { 0%, 29.9% { background: var(--blue); color: #fff; transform: translateY(1px); } 30%, 71.9% { background: #1c1e25; color: #cfd2da; transform: none; } 72%, 95.9% { background: var(--blue); color: #fff; transform: translateY(1px); } 96%, 100% { background: #1c1e25; color: #cfd2da; transform: none; } }
@keyframes keyK { 0%, 29.9% { background: #1c1e25; color: #cfd2da; } 30%, 41.9% { background: var(--amber); color: #2b1a00; } 42%, 61.9% { background: #1c1e25; color: #cfd2da; } 62%, 71.9% { background: var(--amber); color: #2b1a00; } 72%, 100% { background: #1c1e25; color: #cfd2da; } }
@keyframes keyJ { 0%, 41.9% { background: #1c1e25; color: #cfd2da; } 42%, 61.9% { background: var(--pink); color: #fff; } 62%, 100% { background: #1c1e25; color: #cfd2da; } }
.vt-legend { position: absolute; left: 14px; bottom: 14px; font: 600 11px var(--mono); color: var(--faint); }

/* multicam */
.v-mc { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; padding: 8px; }
.v-mc span { position: relative; border-radius: 6px; background: center / cover; animation: live 8s infinite; }
.v-mc span:nth-child(2) { animation-delay: 2s; } .v-mc span:nth-child(3) { animation-delay: 4s; } .v-mc span:nth-child(4) { animation-delay: 6s; }
.v-mc span b { position: absolute; left: 5px; bottom: 4px; font: 700 9px var(--mono); color: #fff; text-shadow: 0 1px 3px #000; }
.v-mc span::after { content: "LIVE"; position: absolute; right: 5px; top: 5px; padding: 1px 5px; border-radius: 3px; font: 800 8px var(--mono); color: #fff; background: #ff4a5d; opacity: 0; animation: liveTag 8s infinite; animation-delay: inherit; }
@keyframes live { 0%, 24% { box-shadow: inset 0 0 0 2px #ff4a5d, 0 0 18px -4px #ff4a5d; filter: none; } 25%, 100% { box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .12); filter: brightness(.55) saturate(.6); } }
@keyframes liveTag { 0%, 24% { opacity: 1; } 25%, 100% { opacity: 0; } }

/* keyframe curve (SVG) */
.v-kf svg { width: 100%; height: 100%; }
.v-kf .grid { stroke: rgba(255, 255, 255, .06); }
.v-kf .curve { fill: none; stroke: url(#kfg); stroke-width: 3; stroke-linecap: round; }
.v-kf .hdl { stroke: rgba(255, 255, 255, .35); stroke-width: 1.2; stroke-dasharray: 3 3; }
.v-kf .kd { fill: var(--amber); }
.v-kf .dot { fill: #fff; filter: drop-shadow(0 0 6px rgba(124, 230, 255, .9)); }
.v-kf text { font: 600 10px var(--mono); fill: #8b92a5; }

/* captions with speakers */
.v-cap { background: center / cover; }
.v-cap::before { content: ""; position: absolute; inset: 0; background: linear-gradient(transparent 30%, rgba(0, 0, 0, .75)); }
.cap { position: absolute; left: 0; right: 0; bottom: 16px; display: flex; flex-direction: column; align-items: center; gap: 5px; opacity: 0; }
.cap em { font: 800 9px var(--mono); font-style: normal; letter-spacing: .1em; padding: 1px 6px; border-radius: 4px; color: #fff; background: var(--c); }
.cap span { font-family: var(--display); font-weight: 800; font-size: 17px; color: #fff; text-shadow: 0 2px 8px #000; }
.cap b { color: rgba(255, 255, 255, .5); animation: say 6s infinite; animation-delay: calc(.25s + var(--i) * .38s); }
.cap.b b { animation-delay: calc(3.25s + var(--i) * .38s); }
.cap.a { animation: capA 6s infinite; } .cap.b { animation: capB 6s infinite; }
@keyframes capA { 0%, 47% { opacity: 1; } 50%, 100% { opacity: 0; } }
@keyframes capB { 0%, 49% { opacity: 0; } 52%, 97% { opacity: 1; } 100% { opacity: 0; } }
@keyframes say { 0% { color: rgba(255, 255, 255, .5); } 2%, 18% { color: #ffcf2e; } 26%, 100% { color: #fff; } }

/* color match */
.v-cm { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; padding: 8px 8px 44px; }
.v-cm span { position: relative; border-radius: 6px; background: center / cover; }
.v-cm span b { position: absolute; left: 6px; top: 5px; font: 700 9px var(--mono); color: #fff; padding: 1px 5px; border-radius: 3px; background: rgba(0, 0, 0, .55); }
.cm-a { background-position: 30% 50% !important; }
.cm-b { background-position: 75% 50% !important; animation: match 7s var(--soft) infinite; }
@keyframes match { 0%, 34% { filter: hue-rotate(-50deg) saturate(.5) brightness(.75) contrast(.9); } 50%, 88% { filter: none; } 100% { filter: hue-rotate(-50deg) saturate(.5) brightness(.75) contrast(.9); } }
.cm-btn { position: absolute; left: 50%; bottom: 10px; translate: -50% 0; padding: 4px 12px; border-radius: 6px; font: 600 11px var(--text); font-style: normal; color: #fff; background: #1d2027; animation: cmBtn 7s infinite; white-space: nowrap; }
@keyframes cmBtn { 0%, 30% { background: #1d2027; transform: none; } 34% { background: var(--blue); transform: scale(.94); } 38%, 46% { background: var(--blue); transform: none; } 52%, 100% { background: #1d2027; } }

/* 3D cube */
.v-3d { display: grid; place-items: center; perspective: 620px; background: radial-gradient(60% 70% at 50% 40%, #16203a, #0d0e13); }
.cube { position: relative; width: 74px; height: 74px; transform-style: preserve-3d; animation: spin3d 10s linear infinite; }
.cube i { position: absolute; inset: 0; background: center / cover; border: 1px solid rgba(124, 230, 255, .55); box-shadow: inset 0 0 22px rgba(79, 140, 255, .35); }
.cube .f1 { transform: translateZ(37px); } .cube .f2 { transform: rotateY(90deg) translateZ(37px); } .cube .f3 { transform: rotateY(180deg) translateZ(37px); }
.cube .f4 { transform: rotateY(-90deg) translateZ(37px); } .cube .f5 { transform: rotateX(90deg) translateZ(37px); background: linear-gradient(140deg, #4f8cff, #7ce6ff); } .cube .f6 { transform: rotateX(-90deg) translateZ(37px); background: linear-gradient(140deg, #9b7bff, #4f8cff); }
@keyframes spin3d { from { transform: rotateX(-24deg) rotateY(0deg); } to { transform: rotateX(-24deg) rotateY(360deg); } }
.c-shadow { position: absolute; left: 50%; bottom: 22px; width: 90px; height: 14px; margin-left: -45px; border-radius: 50%; background: radial-gradient(closest-side, rgba(0, 0, 0, .7), transparent); }

/* radial visualizer (bars built by site.js) */
.v-viz { display: grid; place-items: center; background: radial-gradient(50% 60% at 50% 50%, #1b1533, #0d0e13); }
.ring { position: relative; width: 2px; height: 2px; }
.ring i { position: absolute; left: -2px; top: 0; width: 4px; height: 66px; transform-origin: 50% 0; transform: rotate(var(--r)); }
.ring i b { position: absolute; left: 0; top: 30px; width: 4px; height: 30px; border-radius: 2px; transform-origin: 50% 0; background: hsl(var(--h) 90% 66%); animation: eq 1.1s ease-in-out infinite alternate; animation-delay: var(--d); }
.ring::after { content: ""; position: absolute; left: -26px; top: -26px; width: 52px; height: 52px; border-radius: 50%; background: var(--grad); box-shadow: 0 0 30px rgba(79, 140, 255, .6); animation: thump 1.1s ease-in-out infinite alternate; }
@keyframes thump { from { transform: scale(.88); } to { transform: scale(1.04); } }

/* title designer */
.v-title { display: grid; place-items: center; background: radial-gradient(70% 90% at 50% 50%, #191d33, #0d0e13); }
.tt-box { position: relative; padding: 10px 18px; border: 1px dashed rgba(124, 230, 255, .7); animation: boxTw 6s ease-in-out infinite; }
.tt-box > i { position: absolute; width: 8px; height: 8px; background: #fff; border: 1px solid var(--blue); }
.tt-box .h1 { left: -5px; top: -5px; } .tt-box .h2 { right: -5px; top: -5px; } .tt-box .h3 { left: -5px; bottom: -5px; } .tt-box .h4 { right: -5px; bottom: -5px; }
.tt { display: block; font-family: var(--display); font-weight: 900; font-size: clamp(30px, 3.6vw, 44px); letter-spacing: .02em; line-height: 1; white-space: nowrap; }
.tt b { display: inline-block; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; animation: pop 4.5s var(--pop) infinite; animation-delay: calc(var(--i) * 70ms); }
@keyframes pop { 0% { opacity: 0; transform: translateY(18px) scale(.4); } 10% { opacity: 1; transform: translateY(-4px) scale(1.15); } 15%, 82% { opacity: 1; transform: none; } 92%, 100% { opacity: 0; transform: translateY(-10px); } }
@keyframes boxTw { 0%, 100% { transform: rotate(-2deg); } 50% { transform: rotate(1.5deg) scale(1.04); } }
.tt-presets { position: absolute; right: 10px; bottom: 10px; display: flex; gap: 4px; }
.tt-presets span { padding: 3px 8px; border-radius: 5px; font-size: 10.5px; font-weight: 600; color: #b9bdc8; background: #1b1d23; }
.tt-presets span.on { color: #fff; background: rgba(79, 140, 255, .3); box-shadow: inset 0 0 0 1px rgba(79, 140, 255, .7); }

/* masks: a tracked circle reveals color */
@property --mx { syntax: "<percentage>"; inherits: true; initial-value: 30%; }
@property --my { syntax: "<percentage>"; inherits: true; initial-value: 45%; }
.v-mask { --mx: 30%; --my: 45%; animation: mk 7s ease-in-out infinite; }
.v-mask .mk { position: absolute; inset: 0; background: center / cover; }
.v-mask .mk.base { filter: grayscale(1) brightness(.42); }
.v-mask .mk.top { -webkit-mask: radial-gradient(46px at var(--mx) var(--my), #000 97%, transparent 100%); mask: radial-gradient(46px at var(--mx) var(--my), #000 97%, transparent 100%); }
.mk-ring { position: absolute; left: var(--mx); top: var(--my); width: 92px; height: 92px; translate: -50% -50%; border-radius: 50%; border: 1.5px dashed #ffcf2e; }
.mk-ring::before, .mk-ring::after { content: ""; position: absolute; width: 7px; height: 7px; border-radius: 2px; background: #ffcf2e; }
.mk-ring::before { left: 50%; top: -4px; margin-left: -3.5px; } .mk-ring::after { right: -4px; top: 50%; margin-top: -3.5px; }
@keyframes mk { 0%, 100% { --mx: 26%; --my: 44%; } 33% { --mx: 60%; --my: 34%; } 66% { --mx: 74%; --my: 62%; } }

/* Ctrl+K search */
.v-search { padding: 14px; }
.sb { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-radius: 8px; background: #17181e; border: 1px solid #2a2d36; font-size: 12.5px; color: #e9ebf0; }
.sb svg { width: 14px; height: 14px; fill: none; stroke: #8b92a5; stroke-width: 2; stroke-linecap: round; flex-shrink: 0; }
.typed { display: inline-block; overflow: hidden; white-space: nowrap; width: 0; font-family: var(--mono); animation: typing 6s steps(4, end) infinite; }
@keyframes typing { 0%, 8% { width: 0; } 28%, 88% { width: 4ch; } 94%, 100% { width: 0; } }
.sb .caret { width: 2px; height: 14px; background: var(--cyan); animation: blink 1s steps(1) infinite; }
.sb kbd { margin-left: auto; font: 600 10px var(--mono); color: #6b7285; }
.sr { list-style: none; margin-top: 8px; display: grid; gap: 4px; }
.sr li { display: flex; justify-content: space-between; gap: 8px; padding: 6px 10px; border-radius: 7px; font-size: 12px; color: #dfe2ea; opacity: 0; animation: res 6s infinite; animation-delay: calc(var(--i) * .15s); }
.sr li:first-child { background: rgba(79, 140, 255, .18); box-shadow: inset 0 0 0 1px rgba(79, 140, 255, .45); }
.sr li span { color: #8b92a5; font-size: 11px; }
@keyframes res { 0%, 30% { opacity: 0; transform: translateY(6px); } 36%, 86% { opacity: 1; transform: none; } 92%, 100% { opacity: 0; } }

/* crash recovery + extensions (slim cards) */
.v-rec, .v-ext { display: flex; align-items: center; gap: 12px; padding: 0 16px; }
.v-rec svg { width: 44px; height: 44px; flex-shrink: 0; transform: rotate(-90deg); }
.v-rec .trk { fill: none; stroke: #22252d; stroke-width: 3.5; }
.v-rec .prg { fill: none; stroke: var(--green); stroke-width: 3.5; stroke-linecap: round; stroke-dasharray: 100; stroke-dashoffset: 100; animation: save 5s var(--soft) infinite; }
@keyframes save { 0% { stroke-dashoffset: 100; } 70%, 100% { stroke-dashoffset: 0; } }
.v-rec b, .v-ext b { display: block; font-size: 13px; color: #e9ecf3; }
.v-rec span, .v-ext span { font-size: 11.5px; color: var(--faint); }
.v-rec .tick { animation: tickIn 5s infinite; }
@keyframes tickIn { 0%, 66% { opacity: .35; } 72%, 100% { opacity: 1; } }
.v-ext { flex-direction: column; align-items: stretch; justify-content: center; gap: 6px; padding: 0 14px; }
.v-ext div { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 6px 10px; border-radius: 7px; background: #15161c; }
.v-ext i { width: 30px; height: 17px; border-radius: 999px; background: #2a2d36; position: relative; flex-shrink: 0; animation: sw 6s infinite; animation-delay: var(--d, 0s); }
.v-ext i::after { content: ""; position: absolute; left: 2px; top: 2px; width: 13px; height: 13px; border-radius: 50%; background: #fff; animation: swk 6s infinite; animation-delay: var(--d, 0s); }
@keyframes sw { 0%, 20% { background: #2a2d36; } 26%, 100% { background: var(--green); } }
@keyframes swk { 0%, 20% { transform: none; } 26%, 100% { transform: translateX(13px); } }

/* ---------- color grading demo ---------- */
.grade { position: relative; }
.gr-top { display: grid; grid-template-columns: minmax(0, 1fr) 280px; }
.gr-view { position: relative; aspect-ratio: 16 / 9; overflow: hidden; background: #000; cursor: ew-resize; user-select: none; -webkit-user-select: none; touch-action: pan-y; --split: 50%; }
.gr-view img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; pointer-events: none; }
.gr-after { position: absolute; inset: 0; clip-path: inset(0 0 0 var(--split)); }

.gr-split { position: absolute; top: 0; bottom: 0; left: var(--split); width: 0; z-index: 2; outline: none; }
.gr-split::before { content: ""; position: absolute; top: 0; bottom: 0; left: -1px; width: 2px; background: #fff; box-shadow: 0 0 12px rgba(0, 0, 0, .6); }
.gr-split i { position: absolute; top: 50%; left: -19px; width: 38px; height: 38px; margin-top: -19px; border-radius: 50%; background: rgba(8, 9, 14, .65); border: 2px solid #fff; box-shadow: 0 6px 20px rgba(0, 0, 0, .5);
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); display: grid; place-items: center; transition: transform .4s var(--glide); }
.gr-split i::before { content: "‹ ›"; font: 800 15px var(--text); color: #fff; letter-spacing: 2px; margin-top: -2px; }
.gr-view:hover .gr-split i, .gr-split:focus-visible i { transform: scale(1.12); }
.gr-split:focus-visible i { box-shadow: 0 0 0 3px var(--cyan); }
.gr-tag { position: absolute; top: 10px; z-index: 3; padding: 3px 9px; border-radius: 6px; font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: #fff; background: rgba(0, 0, 0, .55); pointer-events: none; }
.gr-tag.l { left: 10px; } .gr-tag.r { right: 10px; background: rgba(79, 140, 255, .75); }
.gr-side { display: flex; flex-direction: column; gap: 10px; padding: 14px; background: #14151a; border-left: 1px solid #1d1f26; min-width: 0; }
.gr-side .ed-cap { font-size: 10px; font-weight: 750; letter-spacing: .1em; color: #7f8390; }
.gr-clips { display: flex; gap: 6px; }
.gr-clips button { flex: 1; aspect-ratio: 16 / 9; border-radius: 6px; background: center / cover; opacity: .55; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .14); transition: opacity .3s, box-shadow .3s; }
.gr-clips button:hover { opacity: .85; }
.gr-clips button[aria-pressed="true"] { opacity: 1; box-shadow: inset 0 0 0 2px var(--cyan); }
.gr-scope { width: 100%; height: auto; aspect-ratio: 240 / 110; border-radius: 8px; background: #0a0b0f; border: 1px solid #22252d; }
.gr-looks { display: grid; grid-template-columns: 1fr 1fr; gap: 5px; }
.gr-looks button { padding: 7px 9px; border-radius: 7px; font-size: 12px; font-weight: 600; text-align: left; color: #cfd2da; background: #1d2027; transition: background-color .3s, box-shadow .3s, color .3s; }
.gr-looks button:hover { background: #262a33; color: #fff; }
.gr-looks button[aria-pressed="true"] { color: #fff; background: rgba(79, 140, 255, .22); box-shadow: inset 0 0 0 1px rgba(79, 140, 255, .65); }
.gr-bottom { display: flex; flex-wrap: wrap; align-items: center; gap: 20px 34px; padding: 18px 22px; background: #121318; border-top: 1px solid #1d1f26; }
.gr-wheels { display: flex; gap: 26px; }
.wheel { display: grid; justify-items: center; gap: 8px; font-size: 12px; font-weight: 600; color: #b9bdc8; }
.wh { --tr: 45px; position: relative; width: 110px; height: 110px; border-radius: 50%; cursor: grab; touch-action: none; outline: none;
  background: radial-gradient(circle, #23252d 0%, rgba(35, 37, 45, .35) 52%, rgba(35, 37, 45, 0) 72%), conic-gradient(from 0deg, #ff5050, #ffd850, #50ff70, #50f0ff, #5070ff, #e050ff, #ff5050);
  box-shadow: inset 0 0 0 2px rgba(0, 0, 0, .45), 0 0 0 1px #2a2d36, 0 10px 26px -12px rgba(0, 0, 0, .8); transition: box-shadow .3s; }
.wh::before, .wh::after { content: ""; position: absolute; background: rgba(0, 0, 0, .25); }
.wh::before { left: 50%; top: 12px; bottom: 12px; width: 1px; } .wh::after { top: 50%; left: 12px; right: 12px; height: 1px; }
.wh:focus-visible { box-shadow: inset 0 0 0 2px rgba(0, 0, 0, .45), 0 0 0 3px var(--cyan); }
.wh.drag { cursor: grabbing; }
.puck { position: absolute; left: 50%; top: 50%; z-index: 1; width: 18px; height: 18px; margin: -9px; border-radius: 50%; border: 3px solid #fff; background: rgba(0, 0, 0, .25);
  box-shadow: 0 0 0 1px rgba(0, 0, 0, .55), 0 3px 8px rgba(0, 0, 0, .6); transform: translate(calc(var(--wx, 0) * var(--tr)), calc(var(--wy, 0) * var(--tr))); }
.wh.drag .puck { scale: 1.2; }
.vals { display: flex; gap: 6px; font: 500 10.5px var(--mono); }
.vals b { font-weight: 600; } .vals b:nth-child(1) { color: #ff8080; } .vals b:nth-child(2) { color: #7dffa0; } .vals b:nth-child(3) { color: #80aaff; }
.gr-sliders { flex: 1; min-width: 220px; display: grid; gap: 14px; }
.gr-hint { position: absolute; left: 50%; bottom: 14px; z-index: 3; translate: -50% 0; padding: 6px 12px; border-radius: 999px; font-size: 12px; font-weight: 650; color: #fff; background: rgba(8, 9, 14, .75); pointer-events: none; transition: opacity .6s; white-space: nowrap; }
.gr-hint.gone { opacity: 0; }
.svg-defs { position: absolute; width: 0; height: 0; overflow: hidden; }

/* ---------- page timeline rail ---------- */
.rail { position: fixed; right: 24px; top: 50%; z-index: 30; width: 26px; height: 58vh; translate: 0 -50%; opacity: 0; pointer-events: none; transition: opacity .7s var(--soft); }
.rail.on { opacity: 1; pointer-events: auto; }
.rail::before { content: ""; position: absolute; left: 50%; top: 0; bottom: 0; width: 2px; margin-left: -1px; border-radius: 1px; background: rgba(255, 255, 255, .12); }
.rail-fill { position: absolute; left: 50%; top: 0; width: 2px; height: 100%; margin-left: -1px; border-radius: 1px; transform-origin: 50% 0; transform: scaleY(0); background: linear-gradient(var(--blue), var(--cyan)); }
.rail a { position: absolute; left: 50%; width: 18px; height: 18px; margin: -9px 0 0 -9px; display: grid; place-items: center; }
.rail a i { width: 8px; height: 8px; border-radius: 2px; transform: rotate(45deg); background: #3a3f4d; transition: background-color .4s, box-shadow .4s, scale .4s var(--pop); }
.rail a.past i { background: var(--amber); }
.rail a.on i { background: var(--cyan); box-shadow: 0 0 10px var(--cyan); scale: 1.35; }
.rail a span { position: absolute; right: 22px; top: 50%; translate: 0 -50%; padding: 4px 9px; border-radius: 6px; font-size: 12px; font-weight: 650; white-space: nowrap;
  color: var(--ink); background: rgba(12, 14, 20, .92); border: 1px solid var(--line); opacity: 0; transform: translateX(6px); transition: opacity .3s, transform .4s var(--glide); pointer-events: none; }
.rail a:hover span, .rail a:focus-visible span { opacity: 1; transform: none; }
.rail-ph { position: absolute; left: -4px; right: -4px; top: 0; height: 2px; margin-top: -1px; background: #ff4a5d; box-shadow: 0 0 10px rgba(255, 74, 93, .9); will-change: transform; pointer-events: none; }
.rail-ph::after { content: ""; position: absolute; right: -9px; top: -5px; border: 6px solid transparent; border-left: 7px solid #ff4a5d; }
.rail-tc { position: absolute; right: 30px; top: 0; margin-top: -8px; font: 600 10.5px var(--mono); color: #ff8a96; white-space: nowrap; will-change: transform; pointer-events: none; }
.rail:hover .rail-tc { opacity: 0; }

/* ---------- smaller screens ---------- */
@media (max-width: 1359px) { .rail { display: none; } }
@media (max-width: 1080px) {
  .bento { grid-template-columns: 1fr 1fr; }
  .bx.w2 { grid-column: span 2; }
  .gr-top { grid-template-columns: 1fr; }
  .gr-side { border-left: 0; border-top: 1px solid #1d1f26; }
  .gr-looks { grid-template-columns: repeat(3, 1fr); }
  .gr-scope { max-width: 480px; }
}
@media (max-width: 720px) {
  .bento { grid-template-columns: 1fr; }
  .bx.w2 { grid-column: span 1; }
  .bx.slim { flex-direction: column; align-items: stretch; }
  .bx.slim .bx-vis { order: 0; flex: none; margin: 12px 12px 0; }
  .bx.slim .bx-txt { padding: 18px 22px 22px; }
  .gr-side { display: flex; }
  .gr-bottom { padding: 16px; }
  .gr-wheels { width: 100%; justify-content: space-between; gap: 8px; }
  .wh { --tr: 34px; width: 88px; height: 88px; }
  .vals { font-size: 9.5px; gap: 4px; }
  .hot b { font-size: 11px; }
}
@media (prefers-reduced-motion: reduce) {
  .grain, .spot { display: none; }
  .split .w { opacity: 1; filter: none; transform: none; transition: none; }
}

/* small fixes for the bento visuals */
.v-kf .grid, .v-kf .hdl { fill: none; }
.v-ext em { font-style: normal; min-width: 0; }
.v-ext em b, .v-ext em span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
