/* Homepage hero film. Homepage only. */
.hero--cinematic { overflow: hidden; }
.hero--cinematic .hero-gallery { position: absolute; inset: 0; z-index: 0; overflow: hidden; background: #030914; }
.hero-frame { position: absolute; inset: 0; display: block; opacity: 0; }
.hero-frame.is-current, .hero-frame.is-entering, .hero-frame.is-leaving { opacity: 1; }
.hero-frame > img, .hero-frame > video { display: block; width: 100%; height: 100%; object-fit: cover; object-position: center; }
.hero-frame > video { filter: contrast(1.04); }
.hero-frame--poster > img { filter: contrast(1.04); }
.hero-frame.is-current { z-index: 1; }
.hero-frame.is-leaving { z-index: 1; }
.hero-frame.is-entering { z-index: 2; }

/* Transition: a cross-dissolve with both shots still moving; the incoming shot
   settles from a slight push-in. Dissolve length is set per cut by the script. */
.hero-frame.is-entering { animation: krc-dissolve var(--dissolve, 1200ms) cubic-bezier(.45, 0, .25, 1) forwards; }
.hero-frame.is-entering > video { animation: krc-settle 2000ms cubic-bezier(.2, .6, .2, 1) both; }
@keyframes krc-dissolve { from { opacity: 0; } to { opacity: 1; } }
@keyframes krc-settle { from { transform: scale(1.035); } to { transform: scale(1); } }

.hero--cinematic .hero-shade { background: linear-gradient(90deg, rgba(2,7,17,.82), rgba(2,7,17,.5) 40%, rgba(2,7,17,.06) 80%), linear-gradient(0deg, rgba(2,7,17,.82), transparent 35%, transparent 70%, rgba(2,7,17,.5)); }
.hero--cinematic .hero-content { pointer-events: none; }
.hero--cinematic .hero-content a { pointer-events: auto; }

.hero-gallery-controls { position: absolute; left: 0; right: 0; bottom: 108px; z-index: 4; display: flex; align-items: center; justify-content: flex-end; gap: 23px; pointer-events: none; }
.hero-gallery-controls[hidden] { display: none; }
.hero-scene-meta { display: flex; align-items: center; gap: 15px; color: #fff; font-size: 10px; letter-spacing: .04em; }
.hero-scene-meta [data-hero-count] { font-variant-numeric: tabular-nums; opacity: .7; }
.hero-scene-rule { position: relative; width: 56px; height: 1px; background: rgba(255,255,255,.28); overflow: hidden; }
.hero-scene-rule > i { position: absolute; inset: 0; background: #fff; transform: scaleX(0); transform-origin: left center; }
.hero-scene-meta [data-hero-label] { min-width: 150px; }
.hero-scene-buttons { display: flex; gap: 4px; pointer-events: auto; }
.hero-scene-buttons button { display: grid; place-items: center; width: 42px; height: 42px; padding: 0; color: #fff; background: rgba(2,7,17,.15); border: 1px solid rgba(255,255,255,.4); cursor: pointer; transition: background 180ms ease; }
.hero-scene-buttons button:hover { background: rgba(255,255,255,.14); }
.hero-scene-buttons button:focus-visible { outline: 2px solid #fff; outline-offset: 4px; }
.hero-scene-buttons svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.4; }
.hero-scene-buttons svg[hidden] { display: none; }

@media (max-width: 700px) {
  .hero--cinematic { min-height: 800px; height: max(800px, 100svh); max-height: none; }
  .hero--cinematic .hero-content { padding-top: 100px; padding-bottom: 190px; }
  .hero--cinematic .hero-shade { background: linear-gradient(90deg, rgba(2,7,17,.68), rgba(2,7,17,.28)), linear-gradient(0deg, rgba(2,7,17,.9), rgba(2,7,17,.08) 56%, rgba(2,7,17,.42)); }
  .hero-gallery-controls { bottom: 118px; justify-content: space-between; gap: 12px; }
  .hero-scene-meta { gap: 10px; font-size: 9px; }
  .hero-scene-rule { width: 32px; }
  .hero-scene-meta [data-hero-label] { min-width: 0; max-width: 120px; }
  .hero-scene-buttons { gap: 3px; }
  .hero-scene-buttons button { width: 38px; height: 42px; }
  .hero--cinematic .hero-foot { bottom: 25px; }
}
/* Clean frame: no scene title, counter or arrows. The pause control stays reachable by
   keyboard and screen readers (auto-playing video must be pausable) and appears only on focus. */
.hero-scene-meta, [data-hero-prev], [data-hero-next] { display: none !important; }
.hero-scene-buttons [data-hero-pause]:not(:focus-visible) {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; border: 0;
  overflow: hidden; clip-path: inset(50%); white-space: nowrap;
}
.hero--cinematic[data-motion="off"] .hero-gallery-controls { display: none; }
@media (prefers-reduced-motion: reduce) {
  .hero-frame.is-entering, .hero-frame.is-entering > video { animation: none; }
}
@media print { .hero-gallery-controls { display: none !important; } }

/* EUV scene: a vector drawing of an EUV light source, rendered live at the screen's own
   resolution. Tin droplets fall through the focus, CO2 laser pulses fire through the
   collector's aperture, each hit flashes into plasma, and EUV light reflects off the
   ellipsoidal collector to the intermediate focus. Animations run only while the scene
   is playing (.run), so pause and the dissolve timing behave like the video scenes. */
.hero-frame--graphic .euv { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.euv:not(.run) * { animation-play-state: paused !important; }
.euv .euv-cam { transform-origin: 1150px 430px; animation: euv-cam 6s cubic-bezier(.2, .6, .2, 1) both; }
.euv .euv-ghost * { fill: none; stroke: #fff; stroke-opacity: .09; stroke-width: 1; stroke-dasharray: 4 7; }
.euv .euv-mirror path { fill: none; stroke: #f2f4f7; stroke-width: 1.6; stroke-dasharray: var(--len); stroke-dashoffset: var(--len); animation: euv-draw 1.6s cubic-bezier(.6, 0, .2, 1) .1s forwards; }
.euv .euv-rays path { fill: none; stroke: #fff; stroke-opacity: .22; stroke-width: 1; stroke-dasharray: var(--len); stroke-dashoffset: var(--len); animation: euv-draw 1.8s cubic-bezier(.6, 0, .2, 1) .6s forwards; }
.euv .euv-pulses path { fill: none; stroke: #d8d0ff; stroke-width: 1.6; stroke-linecap: round; stroke-dasharray: 46 var(--len); stroke-dashoffset: 0; opacity: 0; animation: euv-flow .95s linear infinite, euv-in .6s ease 1.4s forwards; }
.euv .euv-beyond * { fill: none; stroke: #fff; stroke-opacity: .16; stroke-width: 1; }
.euv .euv-beyond path { stroke-dasharray: var(--len); stroke-dashoffset: var(--len); animation: euv-draw 1.4s cubic-bezier(.6, 0, .2, 1) 1.6s forwards; }
.euv .euv-laser line { stroke: #ff3b30; stroke-width: 1.1; opacity: .2; animation: euv-pulse .55s linear -.044s infinite; }
.euv .euv-nozzle * { fill: none; stroke: #f2f4f7; stroke-opacity: .7; stroke-width: 1.2; }
.euv .euv-drops circle { fill: #f2f4f7; animation: euv-drop .55s linear infinite; }
.euv .euv-stream { stroke: #f2f4f7; stroke-opacity: .28; stroke-width: 2; stroke-dasharray: 1.5 13; stroke-linecap: round; animation: euv-stream .55s linear infinite; }
.euv .euv-plasma { transform-origin: 1150px 430px; opacity: .15; animation: euv-flash .55s linear -.05s infinite; }
.euv .euv-core { fill: #fff; transform-origin: 1150px 430px; animation: euv-flash .55s linear -.05s infinite; }
.euv .euv-if { fill: #d8d0ff; opacity: 0; animation: euv-in .8s ease 1.6s forwards; }
@keyframes euv-cam { from { transform: scale(1); } to { transform: scale(1.06); } }
@keyframes euv-draw { to { stroke-dashoffset: 0; } }
@keyframes euv-flow { from { stroke-dashoffset: 0; } to { stroke-dashoffset: calc(var(--len) * -1); } }
@keyframes euv-in { to { opacity: 1; } }
@keyframes euv-pulse { 0% { opacity: .18; } 8% { opacity: 1; } 30% { opacity: .28; } 100% { opacity: .18; } }
@keyframes euv-drop { 0% { transform: translateY(66px); opacity: 1; } 96% { opacity: 1; } 100% { transform: translateY(440px); opacity: 0; } }
@keyframes euv-stream { from { stroke-dashoffset: 14.5; } to { stroke-dashoffset: 0; } }
@keyframes euv-flash { 0% { opacity: .12; transform: scale(.55); } 9% { opacity: 1; transform: scale(1.15); } 40% { opacity: .3; transform: scale(.8); } 100% { opacity: .12; transform: scale(.55); } }
