/* AI in Practice: one stage and a filmstrip of five equal frames (Dec 1, 2026).
   Without JavaScript the five panels show stacked and the strip is hidden. */

.reel { margin-top: var(--s6); border: 1px solid var(--ink); background: var(--card); display: flex; flex-direction: column; }
.reel-stage { display: grid; }
.reel-panel { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: var(--s6); padding: var(--s5); align-items: center; }
.reel-panel + .reel-panel { border-top: 1px solid var(--rule); }
.reel-panel:focus { outline: none; }
.reel-panel:focus-visible { outline: 2px solid var(--focus, var(--red)); outline-offset: -4px; }

/* Every picture sits in the same 16:10 box, so switching frames never moves the page. */
.reel-media { margin: 0; position: relative; container-type: inline-size; aspect-ratio: 16 / 10; overflow: hidden; background: #111; border: 1px solid var(--ink); }
.reel-media > a { display: block; height: 100%; }
.reel-media img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform .6s cubic-bezier(.2, .7, .2, 1); }
.reel-media a:hover img { transform: scale(1.015); }
.reel-media.top-left img { object-position: left top; }
.reel-media .orbit { height: 100%; border: 0; }
.reel-media .orbit canvas { height: 100%; aspect-ratio: auto; object-fit: cover; }

/* Type over the kit photo: right side, where the frame is data graphics, not a face. */
.reel-media.kit figcaption { position: absolute; inset: 0 0 0 auto; width: 48%; padding: 5cqi 4cqi; display: flex; flex-direction: column; justify-content: center; gap: 1.4cqi; pointer-events: none; background: linear-gradient(90deg, rgba(14, 12, 30, 0), rgba(14, 12, 30, .82) 38%); color: #f5edd8; }
.reel-media.kit figcaption span { font: 500 clamp(8px, 2.1cqi, 11px)/1.4 var(--mono); letter-spacing: .14em; text-transform: uppercase; color: #d8b35a; }
.reel-media.kit figcaption b { font: 400 clamp(17px, 6.4cqi, 44px)/1 var(--serif); }
.reel-media.kit figcaption em { font: italic 400 clamp(12px, 3.6cqi, 24px)/1.2 var(--serif); color: #f0a08e; }

.reel-body { display: grid; gap: var(--s3); align-content: center; min-width: 0; }
.reel-body .kicker { display: flex; justify-content: space-between; align-items: center; gap: var(--s2); }
.reel-body .kicker .label i { font-style: normal; color: var(--red); margin-right: 4px; }
.reel-body h4 { margin: 0; font: 400 clamp(30px, 3vw, 44px)/1.02 var(--serif); letter-spacing: -.01em; }
.reel-body p { margin: 0; font-size: 15.5px; }
.reel-body .bignum b { font-size: clamp(48px, 4.6vw, 64px); }
.reel-body .arc { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; border-top: 1px solid var(--rule); counter-reset: arc; }
.reel-body .arc li { padding: 10px 0; font-size: 14.5px; line-height: 1.5; color: var(--ink-2); counter-increment: arc; border-bottom: 1px solid var(--rule); }
.reel-body .arc li::before { content: "Part " counter(arc); display: block; font: 10.5px/1.6 var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--red); margin-bottom: 2px; }
.reel-body .arc b { color: var(--ink); font-weight: 600; }

/* The filmstrip: film-black, gold edge numbers, one frame per project. */
.reel-strip { display: none; background: #16140f; border-bottom: 1px solid var(--ink); padding: var(--s3) var(--s3) var(--s2); }
html.js .reel-strip { display: block; }
.reel-tabs { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: var(--s2); }
.reel-tabs button { all: unset; box-sizing: border-box; cursor: pointer; display: grid; gap: 6px; align-content: start; padding: 8px; min-height: 44px; border: 1px solid #3a362e; color: #f1ebdd; transition: background .2s, border-color .2s; }
.reel-tabs button:hover { border-color: #8a8170; }
.reel-tabs button[aria-selected="true"] { border-color: #e8705a; background: #2a2620; box-shadow: inset 0 3px 0 #e8705a; }
.reel-tabs button:focus-visible { outline: 2px solid #e8705a; outline-offset: 2px; }
.reel-tabs img { display: block; width: 100%; height: auto; aspect-ratio: 16 / 10; object-fit: cover; opacity: .55; filter: grayscale(.6); transition: opacity .3s, filter .3s; }
.reel-tabs button:hover img, .reel-tabs button[aria-selected="true"] img { opacity: 1; filter: none; }
.reel-tabs .n { font: 500 10px/1.3 var(--mono); letter-spacing: .1em; text-transform: uppercase; color: #d8b35a; }
.reel-tabs b { font: 400 19px/1.1 var(--serif); }
.reel-foot { display: flex; justify-content: space-between; gap: var(--s3); flex-wrap: wrap; margin: var(--s2) 2px 0; font: 500 10px/1.4 var(--mono); letter-spacing: .14em; text-transform: uppercase; color: #b8b0a0; }
.reel-foot a { color: #f1ebdd; text-underline-offset: 3px; display: inline-flex; align-items: center; min-height: 24px; }

/* With JavaScript, one panel at a time. */
/* All five share one grid cell, so the stage is always as tall as the tallest frame and never jumps. */
html.js .reel.ready .reel-stage { grid-template-areas: "frame"; }
html.js .reel.ready .reel-panel { grid-area: frame; }
html.js .reel.ready .reel-panel[hidden] { display: grid; visibility: hidden; }
html.js .reel.ready .reel-panel + .reel-panel { border-top: 0; }
html.js .reel.ready .reel-panel.enter { animation: reel-in .45s cubic-bezier(.2, .7, .2, 1); }
@keyframes reel-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { html.js .reel.ready .reel-panel.enter { animation: none; } .reel-media a:hover img { transform: none; } }

/* Sizes follow the reel's own width (the panel is narrow on tablets even when the window isn't). */
.reel { container: reel / inline-size; min-width: 0; }
.reel > *, .reel-stage, .reel-panel > * { min-width: 0; }
.reel-stage { grid-template-columns: minmax(0, 1fr); }
@container reel (max-width: 700px) {
  .reel-panel { grid-template-columns: minmax(0, 1fr); gap: var(--s4); padding: var(--s4); align-items: start; align-content: start; }
}
@container reel (max-width: 700px) {
  .reel-strip { padding-right: 0; }
  .reel-tabs { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; padding-right: var(--s3); scrollbar-width: none; }
  .reel-tabs::-webkit-scrollbar { display: none; }
  .reel-tabs button { flex: 0 0 136px; scroll-snap-align: start; }
  .reel-tabs b { font-size: 17px; }
  .reel-foot { margin-right: var(--s3); }
}
