/* the lively parts: a director to try, a running programme strip, formats and styles to click */

/* hero strip: a playhead runs through the episode */
.bars { position: relative; }
@media (prefers-reduced-motion: no-preference) {
  .bars::after { content: ""; position: absolute; top: -4px; bottom: -4px; left: 0; width: 2px; background: #fff; box-shadow: 0 0 10px rgba(255, 255, 255, 0.7); animation: playhead 18s linear infinite; }
  @keyframes playhead { to { left: 100%; } }
}

/* fade in while scrolling: pure CSS on the scroll position; browsers without it show everything at once */
@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    :is(.sec-head, .step, .small > div, .ctl, .setup, .chain li, .keys > div, .big article, .table-wrap, .ticket, .dir, .photo) {
      animation: rise linear both; animation-timeline: view(); animation-range: entry 0% entry 35%;
    }
    @keyframes rise { from { opacity: 0; transform: translateY(18px); } }
  }
}

/* --- the director to try --- */
.dir { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2.2fr); gap: 20px; align-items: start; }
@media (max-width: 860px) { .dir { grid-template-columns: 1fr; } }
.dir-side { display: grid; gap: 16px; align-content: start; }
.room { border: 1px solid var(--line); border-radius: 6px; background: var(--panel); padding: 12px; }
.room svg { display: block; width: 100%; height: auto; max-height: 240px; }
.room .tbl { fill: #2a2420; stroke: #4a3f37; stroke-width: 1.5; }
.room .ring { fill: none; stroke: currentColor; stroke-width: 2; opacity: 0; transform-box: fill-box; transform-origin: center; }
.room .seat-btn { cursor: pointer; }
.room .seat-btn:focus-visible { outline: none; }
.room .seat-btn:focus-visible circle.dot { stroke: #fff; stroke-width: 2.5; }
.room .talk .ring { opacity: 1; animation: voice 0.9s ease-out infinite; }
@keyframes voice { from { transform: scale(1); opacity: 0.9; } to { transform: scale(1.9); opacity: 0; } }
.room .cone { fill: rgba(255, 255, 255, 0.1); stroke: rgba(255, 255, 255, 0.45); stroke-width: 1; transform-origin: 100px 100px; transform: rotate(var(--yaw, 0deg)); transition: transform 0.9s cubic-bezier(0.5, 0, 0.2, 1), opacity 0.3s; }
.room .cone.cut { transition: opacity 0.3s; }
.room .wide-ring { fill: none; stroke: rgba(255, 255, 255, 0.45); stroke-width: 1; stroke-dasharray: 3 4; opacity: 0; transition: opacity 0.3s; }
.room.is-wide .cone { opacity: 0; }
.room.is-wide .wide-ring { opacity: 1; }
.room text { font: 600 11px var(--body); fill: var(--fg); text-anchor: middle; pointer-events: none; }
.room .cam { fill: var(--tally); }

.dir-keys { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.dir-keys button { display: grid; gap: 6px; justify-items: center; padding: 10px 6px; border: 1px solid var(--line); border-radius: 6px; background: var(--bg); color: var(--fg); font: 500 13px/1 var(--body); cursor: pointer; transition: border-color 0.2s, background 0.2s; }
.dir-keys button:hover { border-color: var(--muted); }
.dir-keys button:focus-visible { outline: 2px solid var(--tally); outline-offset: 2px; }
.dir-keys button.on { border-color: var(--c, var(--fg)); background: color-mix(in srgb, var(--c, var(--fg)) 14%, var(--bg)); }
.dir-keys kbd { font-size: 12px; }
.dir-keys .k1 { --c: var(--p1); } .dir-keys .k2 { --c: var(--p2); } .dir-keys .k3 { --c: var(--p3); } .dir-keys .k0 { --c: var(--wide); }
.dir-hint { margin: 0; color: var(--muted); font-size: 14px; }

.dir-main { display: grid; gap: 10px; min-width: 0; }
.pgm { position: relative; aspect-ratio: 16 / 9; border-radius: 6px; overflow: hidden; border: 1px solid var(--line); background: #1a1714; }
.pgm .tag-pgm { position: absolute; left: 12px; top: 12px; z-index: 3; background: var(--tally); color: #fff; font: 600 11px/1 var(--mono); padding: 5px 7px; border-radius: 3px; letter-spacing: 0.08em; }
.pgm .mode { position: absolute; right: 12px; top: 12px; z-index: 3; font: 500 11px/1 var(--mono); color: #fff; background: rgba(0, 0, 0, 0.55); border: 1px solid rgba(255, 255, 255, 0.2); padding: 5px 7px; border-radius: 3px; letter-spacing: 0.08em; }
.pgm .mode.mine { color: #111; background: #fff; }
.pgm .shot-name { position: absolute; left: 12px; bottom: 12px; z-index: 3; font: 500 12px/1 var(--mono); color: #fff; background: rgba(0, 0, 0, 0.55); padding: 6px 8px; border-radius: 3px; }
.pgm .sub { position: absolute; left: 50%; bottom: 12%; z-index: 3; transform: translateX(-50%); max-width: 80%; text-align: center; font: 600 clamp(12px, 1.7vw, 17px)/1.35 var(--body); color: #fff; text-shadow: 0 1px 3px #000, 0 0 12px rgba(0, 0, 0, 0.8); transition: opacity 0.2s; }
.pgm .emo { position: absolute; z-index: 3; left: 62%; top: 16%; background: rgba(0, 0, 0, 0.55); border: 1px solid rgba(255, 255, 255, 0.2); padding: 7px 9px; font: 11px/1.5 var(--mono); color: #eee; opacity: 0; transition: opacity 0.4s; }
.pgm .emo b { color: #ff9a1f; font-weight: 500; }
.pgm .emo.on { opacity: 1; }

/* the room as a panorama: three seats side by side, the frame pans and cuts over it */
.pano { position: absolute; left: 0; top: 0; width: 300%; height: 100%; display: flex; transform-origin: 0 0; transform: var(--t, none); transition: transform 0.9s cubic-bezier(0.5, 0, 0.2, 1); background:
  radial-gradient(ellipse 9% 18% at 12% 30%, rgba(255, 196, 120, 0.55), transparent 70%),
  radial-gradient(ellipse 9% 18% at 54% 26%, rgba(255, 196, 120, 0.45), transparent 70%),
  radial-gradient(ellipse 9% 18% at 88% 30%, rgba(255, 196, 120, 0.5), transparent 70%),
  linear-gradient(#26211d, #191614 62%, #3a2a1e 62%, #2a1f17); }
.pano.cut { transition: none; }
.pano .onair { position: absolute; left: 47%; top: 12%; width: 1.2%; aspect-ratio: 1; border-radius: 50%; background: var(--tally); box-shadow: 0 0 14px 4px rgba(255, 70, 54, 0.5); }
.seat { position: relative; flex: 1 1 0; }
.seat::after { content: ""; position: absolute; left: 0; right: 0; top: 80%; bottom: 0; background: linear-gradient(#5a3e29, #3b2819); box-shadow: 0 -2px 0 #6e4e35; }
.person { position: absolute; inset: 0; transform-origin: 50% 70%; }
.person .body { position: absolute; left: 35%; top: 50%; width: 30%; height: 40%; border-radius: 44% 44% 10% 10%; background: color-mix(in srgb, var(--c) 55%, #1b1b1b); }
.person .neck { position: absolute; left: 47.4%; top: 44%; width: 5.2%; height: 8%; background: #b98a6b; border-radius: 30%; }
.person .head { position: absolute; left: 44%; top: 25%; width: 12%; aspect-ratio: 1 / 1.22; border-radius: 46% 46% 50% 50%; background: radial-gradient(circle at 40% 35%, #e6bf9f, #a97c5f 78%); }
.person .hair { position: absolute; left: 43.2%; top: 23.4%; width: 13.6%; height: 9%; border-radius: 50% 50% 35% 35%; background: var(--hair, #2a1d16); }
.person .mouth { position: absolute; left: 48.6%; top: 42.3%; width: 2.8%; height: 1.1%; border-radius: 40%; background: #5a2e25; transform-origin: center; }
.person .eyes { position: absolute; left: 46.4%; top: 35%; width: 7.2%; height: 1.4%; background: radial-gradient(circle at 18% 50%, #1d1d1d 0 30%, transparent 36%), radial-gradient(circle at 82% 50%, #1d1d1d 0 30%, transparent 36%); }
.person .mic { position: absolute; left: 53.5%; top: 41.5%; width: 16%; height: 1.2%; background: #0d0d0d; transform: rotate(-14deg); transform-origin: left center; border-radius: 2px; }
.person .mic::before { content: ""; position: absolute; left: -12%; top: -320%; width: 16%; height: 760%; border-radius: 40%; background: #262626; }
.seat.p1 .person { --c: var(--p1); --hair: #3a2416; }
.seat.p2 .person { --c: var(--p2); --hair: #8f8f8f; }
.seat.p3 .person { --c: var(--p3); --hair: #141110; }
.seat.talk .mouth { animation: talk 0.22s ease-in-out infinite alternate; }
@keyframes talk { to { transform: scaleY(3.4); } }
.seat.laugh .person { animation: laugh 0.35s ease-in-out infinite alternate; }
.seat.laugh .mouth { transform: scaleY(4) scaleX(1.4); }
@keyframes laugh { to { transform: rotate(-3deg) translateY(-1.5%); } }

.track { display: flex; height: 22px; border-radius: 3px; overflow: hidden; background: #0d0e10; border: 1px solid var(--line); }
.track span { display: block; height: 100%; flex: 0 0 auto; background: var(--wide); }
.track .s1 { background: var(--p1); } .track .s2 { background: var(--p2); } .track .s3 { background: var(--p3); }
.track .mine { box-shadow: inset 0 3px 0 #fff; }
.track-legend { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px; font: 11px/1.3 var(--mono); color: var(--muted); }
.track-legend i { display: inline-block; width: 18px; height: 6px; vertical-align: 1px; margin-right: 6px; box-shadow: inset 0 3px 0 #fff; background: var(--wide); }
.dir-play { justify-self: start; padding: 8px 14px; border: 1px solid var(--line); border-radius: 4px; background: var(--bg); color: var(--fg); font: 500 13px/1 var(--body); cursor: pointer; }
.dir-play:hover { border-color: var(--muted); }
.dir-play:focus-visible { outline: 2px solid var(--tally); outline-offset: 2px; }

/* --- styles to click: the cut changes with the style --- */
.style-try { margin-top: 32px; border: 1px solid var(--line); border-radius: 6px; background: var(--panel); padding: 16px; display: grid; gap: 12px; }
.style-try .pick { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.style-try .pick span { font: 500 12px/1 var(--mono); color: var(--muted); margin-right: 6px; letter-spacing: 0.1em; text-transform: uppercase; }
.chip { padding: 8px 12px; border-radius: 999px; border: 1px solid var(--line); background: transparent; color: var(--fg); font: 500 14px/1 var(--body); cursor: pointer; transition: background 0.2s, color 0.2s, border-color 0.2s; }
.chip:hover { border-color: var(--muted); }
.chip:focus-visible { outline: 2px solid var(--tally); outline-offset: 2px; }
.chip[aria-pressed="true"] { background: var(--fg); color: var(--bg); border-color: var(--fg); }
.style-try .bars { height: 40px; }
.style-try .bars span { transform-origin: left; }
@media (prefers-reduced-motion: no-preference) {
  .style-try .bars.grow span { animation: grow 0.5s cubic-bezier(0.2, 0.7, 0.2, 1) both; animation-delay: var(--d, 0s); }
  @keyframes grow { from { transform: scaleX(0); opacity: 0; } }
}
.style-try .stats { font: 12px/1.4 var(--mono); color: var(--muted); }

/* --- formats to click: one recording, reframed --- */
.fmt-stage { display: grid; place-items: center; height: clamp(240px, 42vw, 380px); margin-bottom: 22px; }
.fmt-frame { position: relative; overflow: hidden; border: 1.5px solid var(--fg); border-radius: 4px; width: var(--w, 320px); height: var(--h, 180px); transition: width 0.6s cubic-bezier(0.5, 0, 0.2, 1), height 0.6s cubic-bezier(0.5, 0, 0.2, 1); background: #1a1714; }
.fmt-frame.instant { transition: none; }
.fmt-frame .pano { width: auto; height: 100%; aspect-ratio: 48 / 9; left: 50%; transform: translateX(-50%); transition: none; }
.fmt-frame .seat { flex: 1 1 0; }
.fmt-frame .label { position: absolute; right: 8px; bottom: 8px; font: 500 11px/1 var(--mono); color: #fff; background: rgba(0, 0, 0, 0.55); padding: 5px 7px; border-radius: 3px; }
.formats figure.fig { all: unset; cursor: pointer; display: grid; gap: 8px; justify-items: center; border-radius: 4px; padding: 6px; }
.formats figure.fig:focus-visible { outline: 2px solid var(--tally); outline-offset: 2px; }
.formats figure.fig .f { transition: background 0.2s, border-color 0.2s; }
.formats figure.fig:hover .f { border-color: var(--tally); }
.formats figure.fig[aria-pressed="true"] .f { background: rgba(255, 70, 54, 0.16); border-color: var(--tally); }
.formats figure.fig[aria-pressed="true"] figcaption, .formats figure.fig[aria-pressed="true"] span { color: var(--fg); }

/* --- photos --- */
.hero-photo { margin: 0 -20px; order: 4; }
.hero-photo img { display: block; width: 100%; height: auto; aspect-ratio: 21 / 9; object-fit: cover; object-position: 50% 52%;
  -webkit-mask-image: linear-gradient(to bottom, #000 72%, transparent 100%); mask-image: linear-gradient(to bottom, #000 72%, transparent 100%); }
.hero .strip { order: 5; margin-top: -110px; position: relative; z-index: 1; background: rgba(27, 29, 32, 0.92); backdrop-filter: blur(6px); }
@media (min-width: 1200px) { .hero-photo { margin: 0 -40px; } }
@media (max-width: 760px) { .hero-photo img { aspect-ratio: 4 / 3; object-position: 50% 50%; } .hero .strip { margin-top: -48px; } }

.photo { margin: 0; display: grid; gap: 10px; }
.photo img { display: block; width: 100%; height: auto; border-radius: 6px; border: 1px solid var(--line); }
.photo figcaption { font: 12px/1.5 var(--mono); color: var(--muted); }
.photo.wide { margin-bottom: 36px; }
.photo.side { max-width: 760px; margin: 0 auto 28px; }

.why-head { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 32px; align-items: center; margin-bottom: 36px; }
.why-head .sec-head { margin-bottom: 0; }
@media (max-width: 860px) { .why-head { grid-template-columns: 1fr; } }

/* a feature: the result as a photo, the plugin's panel laid over it */
.stack { position: relative; min-width: 0; }
.stack > img { display: block; width: 100%; height: auto; border-radius: 4px; }
.stack .ui { position: absolute; left: -5%; bottom: -8%; width: 52%; box-shadow: 0 18px 40px rgba(0, 0, 0, 0.6); }
@media (max-width: 760px) { .stack .ui { position: static; width: 100%; margin-top: 12px; box-shadow: none; } }
.big article:first-child { padding-bottom: 54px; }

.photo-hud { background: #000; }
.photo-hud img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.photo-hud .face { left: 13%; top: 11%; width: 21%; height: 33%; }
.photo-hud .tag { left: 58%; top: 10%; z-index: 1; }
.photo-hud .tag span { display: block; color: #aaa; font-size: 10px; }

.setup > img { display: block; width: calc(100% + 36px); max-width: none; height: auto; aspect-ratio: 4 / 3; object-fit: cover; margin: -18px -18px 0; border-radius: 6px 6px 0 0; }
footer a { color: inherit; }
