/* The reading surface and its controls are shared by the film and the live talk. */
body { display: flex; flex-direction: column; min-height: 100dvh; }
.top { border-bottom: 1px solid var(--line); min-height: 3.85rem; }
.deck { min-height: 0; flex: 1; }
.stage { isolation: isolate; position: relative; background: var(--paper); }
.screen { width: min(91%, 100rem); position: static; padding-block: clamp(1.6rem, 4.2vh, 3rem); }
.screen .two-up { grid-template-columns: .96fr 1.04fr; gap: clamp(2rem, 4.3vw, 6rem); }
.eyebrow { color: #8b4526; font-size: .85rem; }
.points { gap: .85rem; }
.points li { border-left: 2px solid #ba7e53; padding-left: .9rem; }
.film-visual { width: 100%; min-width: 0; overflow: hidden; border-radius: .6rem; position: relative; isolation: isolate; }
.screen:not(.hero):not(.conclusion) .film-visual { box-shadow: 0 12px 36px #314d3714; }
.hero .two-up, .conclusion .two-up { grid-template-columns: 1.15fr .85fr; }
.hero .text-stack, .conclusion .text-stack, .ending-question { position: relative; z-index: 1; }
.hero .text-stack { max-width: min(68vw, 55rem); padding: clamp(1rem, 3vh, 3rem) 0; }
.hero h1 { font-size: clamp(3.8rem, 6.9vw, 8.4rem); }
.hero h1 em { color: #8b4526; }
.hero .subtitle { font-weight: 500; }
.film-reel { pointer-events: none; position: absolute; width: 100%; height: 100%; inset: 0; border-radius: 0; z-index: -1; opacity: .14; }
.film-shot, .film-shot img, .film-reel::after { position: absolute; inset: 0; width: 100%; height: 100%; }
.film-reel[data-animated] .film-shot { opacity: 0; animation: film-dissolve 24s linear infinite; animation-delay: var(--shot-delay); }
.film-reel[data-animated] .film-shot:first-child { opacity: 1; }
.film-shot img { object-fit: cover; object-position: 60% 55%; filter: saturate(.72); }
.film-reel[data-animated] img { animation: camera-push 24s linear infinite; animation-delay: var(--shot-delay); }
.film-reel::after {
  content: '';
  background: linear-gradient(90deg, #fbfaf48c, #fbfaf43d 48%, transparent 87%);
}
.ending-question { align-self: end; background: var(--surface); border-left: .25rem solid #ad6b46; padding: 1.4rem 1.7rem; max-width: 32rem; }
.ending-question > p:nth-child(2) { font: 500 clamp(1.8rem, 2.9vw, 3.2rem)/1.12 var(--serif); letter-spacing: -.045em; margin: 0 0 .7rem; }
.ending-question small { color: var(--ink-soft); font-size: 1.03rem; }
.screen { --entry-x: 1rem; }
.screen[data-direction="back"] { --entry-x: -1rem; }
.screen .text-stack > *, .screen .points li, .ending-question { animation: text-entrance .64s cubic-bezier(.2,.7,.2,1) both; }
.screen .text-stack > :nth-child(2) { animation-delay: .05s; }
.screen .text-stack > :nth-child(3) { animation-delay: .12s; }
.screen .text-stack > :nth-child(4) { animation-delay: .16s; }
.screen .text-stack > :nth-child(5), .screen .points li:nth-child(2) { animation-delay: .23s; }
.screen .points li:nth-child(3), .ending-question { animation-delay: .32s; }
.film-visual:not(.film-reel) { animation: scene-entrance .55s cubic-bezier(.18,.6,.22,1) both; }
.bottom { width: 100%; padding: .7rem max(4.5vw, 1rem) .9rem; background: var(--surface); }
.controls { grid-template-columns: 1fr auto 1fr; }
dialog .eyebrow { color: #69422b; }

@keyframes film-dissolve {
  0%, 29% { opacity: 1; }
  34%, 95% { opacity: 0; }
  100% { opacity: 1; }
}
@keyframes camera-push {
  0% { transform: scale(1.045) translate(-.35%, -.15%); }
  34% { transform: scale(1.16) translate(.7%, .4%); }
  36%, 100% { transform: scale(1.04); }
}
@keyframes text-entrance {
  from { opacity: 0; transform: translate(var(--entry-x), .45rem); }
  to { opacity: 1; transform: none; }
}
@keyframes scene-entrance {
  from { opacity: .35; transform: translateX(var(--entry-x)) scale(.985); }
  to { opacity: 1; transform: none; }
}
body:has(dialog[open]) .screen *,
body:has(dialog[open]) .screen *::before,
body:has(dialog[open]) .screen *::after { animation-play-state: paused !important; }
@media (prefers-reduced-motion: reduce) {
  .screen *, .screen *::after, .screen *::before { animation: none !important; transition: none !important; }
}
@media (min-width: 52.01rem) and (max-height: 48rem) {
  .top { min-height: 3.4rem; }
  .deck { min-height: 0; }
  .screen { padding-block: 1.2rem; }
}
@media (min-width: 52.01rem) and (max-height: 53rem) {
  .film-visual .s1-network .s1-map { width: min(100%, 51vh); align-self: center; }
  .film-visual .s1-network .s1-body { gap: .8rem; padding: 1.15rem 1.5rem; }
}
@media (max-width: 52rem) {
  .top { align-items: center; }
  .screen .two-up { grid-template-columns: 1fr; gap: 1.4rem; }
  .hero .text-stack { max-width: 95%; padding-block: 2.2rem; }
  .hero h1 { font-size: clamp(3.5rem, 10vw, 6rem); }
  .film-reel { opacity: .10; }
  .screen .film-visual:not(.film-reel) { width: min(100%, 38rem); justify-self: center; }
  .move button { min-height: 2.55rem; }
  .speaker span { display: inline; margin-left: .5rem; }
  .bottom { z-index: 3; }
}
@media (max-width: 33rem) {
  .top { flex-wrap: wrap; padding-block: .55rem; }
  .top .brand { max-width: none; font-size: .70rem; }
  .speaker { font-size: .85rem; }
  .speaker span { margin: 0; display: block; font-size: .76rem; }
  .bottom { padding-block: .55rem; }
}

.bookend-column { position: relative; align-self: center; min-width: 0; z-index: 1; }
.product-stage { position: relative; display: grid; width: 100%; height: clamp(16rem, 38vw, 35rem); }
.product-stage .bookend-scene { position: relative; z-index: 1; }
.conclusion .product-stage { height: clamp(11rem, 22vh, 17rem); }
.bookend-column .ending-question { margin: 0 auto; }

/* The frame moves in depth at each cut, while the words settle first. */
@media (prefers-reduced-motion: no-preference) {
  .film-visual:not(.film-reel) { transform-origin: 60% 55%; animation: frame-arrival .84s cubic-bezier(.15,.72,.18,1) both; }
  .screen[data-direction="back"] .film-visual { transform-origin: 25% 55%; }
  .eyebrow::before { transform-origin: left; animation: line-reveal .75s ease-out both; }
  .screen .points li { position: relative; }
  .screen .points li::before {
    content: ''; position: absolute; top: 0; bottom: 0; left: -2px; width: 2px;
    background: #9b4a24; opacity: 0; transform-origin: top;
    animation: point-accent 14s ease-in-out infinite;
  }
  .screen .points li:nth-child(2)::before { animation-delay: 4.5s; }
  .screen .points li:nth-child(3)::before { animation-delay: 9s; }
}
@keyframes frame-arrival {
  from { transform: perspective(72rem) translateX(var(--entry-x)) rotateY(-9deg) scale(.94); opacity: .35; }
  to { transform: perspective(72rem) translateX(0) rotateY(0) scale(1); opacity: 1; }
}
@keyframes line-reveal { from { transform: scaleX(.12); } to { transform: scaleX(1); } }
@keyframes point-accent {
  0%, 100% { transform: scaleY(.05); opacity: 0; }
  5%, 20% { transform: scaleY(1); opacity: 1; }
  29%, 99% { transform: scaleY(1); opacity: 0; }
}

html.immersive, .immersive body { background: var(--paper); }
.immersive .top, .immersive #speaker, .immersive #counter { display: none; }
.immersive .deck { min-height: 100dvh; }
.immersive .bottom {
  position: fixed; inset: auto 0 0; pointer-events: none; z-index: 3;
  background: transparent; border: 0; padding: 0 max(3.1vw, .8rem) .75rem;
}
.immersive .controls { display: flex; justify-content: flex-end; }
.immersive .move { pointer-events: auto; }
.immersive .move button:not(.next) { background: var(--surface); }
.immersive .move button:not(.next):hover:not(:disabled) { background: #e1e8d7; }
.immersive .screen { padding-bottom: max(4.1rem, 5vh); }
@media (max-width: 52rem) {
  .hero .product-stage { height: clamp(10rem, 44vw, 16rem); max-width: 35rem; margin: auto; }
  .hero .text-stack { padding-block: 1.2rem 0; }
  .hero .two-up { gap: .2rem; }
  .conclusion .product-stage { height: 8rem; }
}
@media (min-width: 52.01rem) and (max-height: 49rem) {
  .hero .product-stage { height: clamp(16rem, 52vh, 25rem); }
  .conclusion .product-stage { height: 9.25rem; }
}


.keyboard-hints { margin: 0; color: var(--ink-soft); font-size: .82rem; }
.keyboard-hints span { padding-inline: .35rem; color: #8b4526; }
kbd {
  padding: .12em .28em; margin-right: .2em; border: 1px solid currentColor; border-radius: .2rem;
  font: 650 .85em/1 var(--sans);
}
.dialog-head span { white-space: nowrap; font-size: .83rem; color: #385543; }
.move button {
  display: grid; place-items: center; padding: 0; width: 3.15rem; min-height: 2.7rem;
  font: 600 1.55rem/1 var(--sans);
}
@media (max-width: 33rem) {
  .top .brand { padding: 0; }
  .keyboard-hints { font-size: .73rem; white-space: nowrap; }
  .keyboard-hints span { padding-inline: .14rem; }
  .controls { gap: .5rem; }
  .move button { width: 2.7rem; }
}
@media (pointer: coarse) {
  .keyboard-hints { display: none; }
}
