/* Zweitlicht – «Die Funke» product page. Builds on css/site.css: tokens, type, buttons, header, footer, door, story pieces
   (.site-progress, .site-dots, .site-cue, .site-claim). Here only layout, scenes and the canvas.
   Default = calm static page; html.film = the scroll-driven exploded view. */
html.film{scroll-behavior:auto}
.nb{white-space:nowrap}
.chips,.colors,.lbls{list-style:none;margin:0;padding:0}
.site-tag .no{color:var(--zl-fg-3);letter-spacing:.08em;margin-right:12px}
/* the site's content column (same left edge as the header wordmark: .site-header-in / .site-wrap) */
:root{--fk-col:max(var(--zl-gutter),calc((100% - var(--zl-max)) / 2))}

/* ---------- canvas ---------- */
#stage{display:none}
.film #stage{display:block;position:fixed;inset:0;width:100%;height:100%;z-index:0;pointer-events:none}
main{position:relative;z-index:1}

/* ---------- text pieces ---------- */
.hero h1{margin:0 0 22px}
.hero .site-lead{max-width:30em;margin-bottom:30px}
.copy h2{margin:0 0 18px;max-width:14ch}
.body{color:var(--zl-fg-2);max-width:31em}
.body + .body{margin-top:12px}
.buyline{display:flex;align-items:center;gap:12px 22px;flex-wrap:wrap}
.sub{margin:24px 0 12px}
.opts{margin-top:26px;display:flex;flex-direction:column;border-top:1px solid var(--zl-line)}
.opts > div{display:grid;grid-template-columns:7.5em 1fr;gap:14px;align-items:baseline;padding:12px 0;border-bottom:1px solid var(--zl-line)}
.opts dt{font:400 11px/1.6 var(--zl-f-mono);letter-spacing:.16em;text-transform:uppercase;color:var(--zl-fg-3)}
.opts dd{font-size:16px;line-height:1.5;color:var(--zl-fg)}
.copy .opts + .body{margin-top:22px}
.chips{display:flex;flex-wrap:wrap;gap:4px 18px}
.chips li{position:relative;color:var(--zl-fg-2)}
/* separators trail each item, so a wrapped line never starts with «·» */
.chips li:not(:last-child)::after{content:"·";position:absolute;right:-12px;color:var(--zl-fg-3)}
.film .chips[data-k] li{color:var(--zl-fg-3)}
.film .chips[data-k] li.on{color:var(--zl-amber)}
.colors{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:9px 14px;max-width:420px}
.colors li{display:flex;align-items:center;gap:10px;font-size:15px;color:var(--zl-fg-2)}
.colors li::before{content:"";flex:none;width:11px;height:11px;border-radius:50%;background:var(--c);box-shadow:0 0 0 1px var(--zl-line)}
.film .colors li{color:var(--zl-fg-3)}
.film .colors li.on{color:var(--zl-fg)}
.film .colors li.on::before{transform:scale(1.35);box-shadow:0 0 0 1px var(--zl-line-2),0 0 14px 2px var(--c)}
.lvl{display:inline-flex;gap:4px;align-items:flex-end;margin-right:12px;vertical-align:-1px}
.lvl i{display:block;width:5px;border-radius:2px;background:var(--zl-fg-2)}
.lvl i:nth-child(1){height:5px}.lvl i:nth-child(2){height:7px}.lvl i:nth-child(3){height:9px}.lvl i:nth-child(4){height:11px}.lvl i:nth-child(5){height:13px}.lvl i:nth-child(6){height:15px}
.film .lvl i{background:var(--zl-line-2)}
.film .lvl i.on{background:var(--zl-amber);box-shadow:var(--zl-glow-amber)}
/* (option highlights have no CSS transition: they follow the scroll exactly, one option lit at a time, scrolling back rewinds) */
.chip{margin-top:16px;align-self:flex-start;justify-self:start;width:max-content} /* one chip size everywhere: never stretched by the flex/grid column */

/* ---------- DEFAULT (no JS / reduced motion): a calm stacked page ---------- */
.scene{padding:84px var(--zl-gutter) 72px;border-top:1px solid var(--zl-line)}
.scene:first-of-type{padding-top:calc(var(--zl-header) + 56px);border-top:0}
.scene .pin{max-width:var(--zl-max);margin:0 auto;display:flex;flex-direction:column;gap:28px}
.still{color:var(--zl-clear)}
.still svg{width:100%;height:auto}
.still path{vector-effect:non-scaling-stroke} /* same line style as geschichte.html's stills (tools/d-lamp-still.mjs) */
.still-lamp{width:min(300px,70%)}
.still-exploded{width:min(520px,100%)}
.still .tagfill{fill:var(--zl-night)} /* the tag hides the bottle line behind it (tools/d-lamp-still.mjs) */
.scene.ignite .still .tagfill{fill:var(--zl-green)}
.lbls{display:flex;flex-wrap:wrap;gap:6px 18px;font:400 11px/1.5 var(--zl-f-mono);letter-spacing:.14em;text-transform:uppercase;color:var(--zl-fg-3)}
.scene.ignite{background:var(--zl-green)}
html:not(.film) .cue{display:none}
html:not(.film) .scene .pin{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);align-items:center;column-gap:56px}
html:not(.film) .scene .still{grid-column:2;grid-row:1 / span 3;justify-self:center}
html:not(.film) .scene .copy,html:not(.film) .scene .site-cue,html:not(.film) .scene .lbls,html:not(.film) .scene .site-claim{grid-column:1}
/* text-only beats: tag + title on the left, the details on the right (no empty half) */
html:not(.film) .scene.beat .pin{grid-template-columns:minmax(0,1fr)}
html:not(.film) .scene.beat .copy{display:grid;grid-template-columns:minmax(0,5fr) minmax(0,7fr);column-gap:56px;align-items:start}
html:not(.film) .scene.beat .copy > *{grid-column:2}
html:not(.film) .scene.beat .copy > .chip{justify-self:start}
html:not(.film) .scene.beat .copy > .site-tag{grid-column:1;grid-row:1}
html:not(.film) .scene.beat .copy > h2{grid-column:1;grid-row:2 / span 12}
html:not(.film) #licht .pin{grid-template-columns:minmax(0,1fr);row-gap:56px}

/* ---------- FILM ---------- */
.film .scene{height:calc(var(--len) * 100vh);height:calc(var(--len) * 100svh);padding:0;background:transparent;border:0}
.film .scene + .scene{margin-top:-100vh;margin-top:-100svh}
.film .scene .pin{position:sticky;top:0;height:100vh;height:100svh;max-width:none;margin:0;display:block;overflow:hidden;pointer-events:none}
.film .still{display:none}
.film .t{position:absolute;opacity:0;visibility:hidden}
.film .t a,.film .t button{pointer-events:auto}
.film .copy{left:var(--fk-col);top:0;bottom:0;width:min(470px,35vw);display:flex;flex-direction:column;justify-content:center;padding-top:var(--zl-header)}
.film .hero{width:min(540px,40vw)}
.film .hero-in{animation:fk-in 1.3s .25s var(--zl-ease) both}
.film.instant .hero-in{animation:none}
@keyframes fk-in{from{opacity:0;transform:translateY(20px)}to{opacity:1;transform:none}}
.film .lbls{inset:0;display:block;font-size:11px}
.film .lbl{position:absolute;left:0;top:0;white-space:nowrap;color:var(--zl-fg-2);will-change:transform;line-height:1}
.film .claim{width:min(640px,44vw)} /* position + size: .film .site-claim in site.css */
.film .site-dots{transition:opacity var(--zl-t)}
.site-dots.away{opacity:0;pointer-events:none}

/* ---------- the real lamp + buy block (end of the last pin) ----------
   img/start-an.webp: the rendered lamp alone on alpha (no room, no card) – it stands directly on the lit surface */
.photo{position:relative;margin:0;overflow:hidden;aspect-ratio:4/5;width:min(440px,100%)}
.photo img{width:100%;height:100%;object-fit:cover}
/* (the LED disc is amber in the picture itself: re-graded by tools/d-led-amber.py, so no colour overlay is needed) */
.photo.noimg img{visibility:hidden}
.final h2{margin:0 0 26px}
.final .note{margin-top:24px;color:var(--zl-fg-2);max-width:30em}
/* film: the picture opens out of the lamp – a soft circle (radius set per frame by js/funke.js) grows from the lamp in the picture */
.film .photo{position:absolute;right:max(86px,calc((100% - var(--zl-max)) / 2));top:calc(var(--zl-header) + 1vh);height:calc(100vh - var(--zl-header) - 2vh);height:calc(100svh - var(--zl-header) - 2svh);
  aspect-ratio:11/20;width:auto;max-width:none;
  -webkit-mask-image:radial-gradient(circle at var(--rvx,50%) var(--rvy,56%),black var(--rv0,0px),transparent var(--rv1,1px));
  mask-image:radial-gradient(circle at var(--rvx,50%) var(--rvy,56%),black var(--rv0,0px),transparent var(--rv1,1px))}
.film .photo.rv-full{-webkit-mask-image:none;mask-image:none}
.film .final{justify-content:center}
.film .photo.noimg{box-shadow:inset 0 0 0 1px var(--zl-line-2)}
html:not(.film) .scene.ignite .pin{grid-template-columns:minmax(0,1fr) minmax(0,1fr)}
html:not(.film) .scene.ignite .photo{grid-column:2;grid-row:1 / span 2;justify-self:center}

/* ---------- Auf einen Blick: the same lit surface as the ignition, flat (no seam to the canvas), then the door ---------- */
.glance.site-lit{background:var(--zl-green);padding:var(--zl-section) 0 calc(var(--zl-section) * .6)}
.glance h2{margin-bottom:40px}
.spec{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));column-gap:clamp(32px,5vw,72px);border-top:1px solid var(--zl-line)}
.spec > div{display:grid;grid-template-columns:9.5em 1fr;gap:16px;padding:13px 0;border-bottom:1px solid var(--zl-line)}
.spec dt{font:500 11px/1.75 var(--zl-f-mono);letter-spacing:.14em;text-transform:uppercase;color:var(--zl-accent)}
.spec dd{font-size:16.5px;line-height:1.5;color:var(--zl-fg)}
.spec a{color:var(--zl-fg);text-decoration-color:var(--zl-accent);text-underline-offset:3px;display:inline-block;padding:12px 0;margin:-12px 0}
.glance + .site-next{background:var(--zl-green);padding-top:0}

/* ---------- phone ---------- */
@media (max-width:760px), (max-aspect-ratio:4/5){
  .film .scene{height:calc((1 + (var(--len) - 1) * .88) * 100vh);height:calc((1 + (var(--len) - 1) * .88) * 100svh)}
  html:not(.film) .scene .pin{grid-template-columns:1fr}
  html:not(.film) .scene .still{grid-column:1;grid-row:auto}
  html:not(.film) #licht .pin{grid-template-columns:1fr}
  html:not(.film) .scene.beat .copy{display:block}
  .body{font-size:16px;line-height:1.5}
  .film .copy,.film .hero{left:var(--fk-col);right:var(--fk-col);width:auto;top:auto;bottom:calc(20px + env(safe-area-inset-bottom,0px));padding-top:0;display:block}
  .film .hero h1{margin-bottom:12px}
  .film .hero .site-lead{font-size:15.5px;line-height:1.5;margin-bottom:18px}
  .film main .site-tag{margin-bottom:10px}
  .film .copy h2{margin-bottom:10px}
  .film .body{font-size:15px;line-height:1.48}
  .film .body + .body{margin-top:6px}
  .film .opts{margin-top:14px}
  .film .opts > div{padding:8px 0;grid-template-columns:7.4em 1fr;gap:10px}
  .film .opts dd{font-size:15px}
  .film .copy .opts + .body{margin-top:12px}
  .film .sub{margin:12px 0 8px}
  .film .colors{gap:5px 10px}
  .film .colors li{font-size:15px;gap:8px}
  .film .chip{margin-top:10px}
  .film .buyline{gap:8px 16px}
  .film .cue{display:none}
  .film .claim{width:auto}
  .film .lbls{font-size:11px}
  .film .photo{left:50%;right:auto;top:calc(var(--zl-header) + 8px);height:var(--ph-h,min(44vh,calc(100vw - 40px) * 1.25));margin-left:calc(var(--ph-h,0px) * -.275)}
  .film .final h2{margin-bottom:14px}
  .film .final .note{font-size:15px;margin-top:12px}
  html:not(.film) .scene.ignite .pin{grid-template-columns:1fr}
  html:not(.film) .scene.ignite .photo{grid-column:1;grid-row:auto}
  .glance.site-lit{padding:64px 0 40px}
  .glance h2{margin-bottom:24px}
  .spec{grid-template-columns:1fr}
  .spec > div{grid-template-columns:8.6em 1fr;gap:10px;padding:9px 0}
  .spec dt{font-size:11px}
  .spec dd{font-size:15px;line-height:1.42}
}

/* ---------- short screens (phone landscape, small laptop windows): lamp beside the copy, smaller type steps ---------- */
@media (max-height:500px) and (min-width:761px) and (min-aspect-ratio:4/5){
  .film .scene{height:calc((1 + (var(--len) - 1) * .88) * 100vh);height:calc((1 + (var(--len) - 1) * .88) * 100svh)}
  .film .copy{width:min(430px,46vw);padding-top:calc(var(--zl-header) + 6px);padding-bottom:calc(8px + env(safe-area-inset-bottom,0px))}
  .film .hero{width:min(460px,48vw)}
  .film main .site-tag{margin-bottom:6px}
  .film .hero h1{font-size:var(--zl-fs-h2);margin-bottom:10px}
  .film .hero .site-lead{font-size:var(--zl-fs-small);line-height:1.45;margin-bottom:12px}
  .film .copy h2{font-size:var(--zl-fs-h3);font-weight:800;margin-bottom:8px;max-width:none}
  .film .body{font-size:var(--zl-fs-small);line-height:1.42}
  .film .body + .body{margin-top:4px}
  .film .opts{margin-top:8px}
  .film .opts > div{padding:4px 0;grid-template-columns:7.2em 1fr;gap:8px}
  .film .opts dd{font-size:var(--zl-fs-small)}
  .film .copy .opts + .body{margin-top:8px}
  .film .sub{margin:6px 0 4px}
  .film .colors{grid-template-columns:repeat(4,minmax(0,1fr));gap:2px 8px;max-width:none}
  .film .colors li{font-size:var(--zl-fs-small);gap:7px}
  .film .chip{margin-top:6px}
  .film .site-price{font-size:var(--zl-fs-h3)}
  .film .buyline{gap:4px 14px}
  .film .buyline .site-btn--lg{min-height:48px;padding:0 22px;font-size:15px}
  .film .cue{display:none}
  .film .final h2{margin-bottom:10px}
  .film .final .note{margin-top:8px;font-size:var(--zl-fs-small)}
  .film .photo{top:calc(var(--zl-header) + 4px);height:calc(100vh - var(--zl-header) - 8px);height:calc(100svh - var(--zl-header) - 8px)}
  .glance.site-lit{padding:56px 0 32px}
  .glance h2{margin-bottom:24px}
  .spec > div{padding:8px 0}
}
@media (prefers-reduced-motion:reduce){.site-dots{transition:none}}
