/* Naslovna: otvaranje, poglavlja, iskre, Drag the sun, Measured */
.opener{position:fixed;inset:0;z-index:70;display:flex;align-items:center;justify-content:center;background:#0b0a09;pointer-events:none}
html:not(.seq) .opener{display:none}
.opener img{width:min(340px,64vw);height:auto;opacity:0}
.opener.play{animation:curtainUp 1s cubic-bezier(.76,0,.18,1) 1.25s forwards}
.opener.play img{animation:logoIn 1.1s ease .1s forwards}
@keyframes logoIn{0%{opacity:0;transform:translateY(8px)}60%,100%{opacity:1;transform:none}}
@keyframes curtainUp{to{clip-path:inset(0 0 100% 0)}}
.opener{clip-path:inset(0)}
.opener.off{animation:none;opacity:0;transition:opacity .3s}

.chapters{position:absolute;z-index:10;left:var(--gutter);bottom:20px;display:flex;gap:6px;margin:0;padding:0;list-style:none}
html:not(.seq) .chapters{display:none}
.chapters button{position:relative;display:flex;align-items:baseline;gap:7px;min-height:44px;padding:14px 12px 10px 0;background:none;border:0;color:#fff;font:inherit;font-size:15px;opacity:.72;cursor:pointer;text-shadow:0 1px 8px rgba(0,0,0,.7);transition:opacity .3s}
.chapters small{font-size:13px}
.chapters button::after{content:"";position:absolute;left:0;right:12px;bottom:6px;height:1px;background:rgba(255,255,255,.5)}
.chapters button:hover{opacity:1}
.show[data-step="0"] [data-go="0"],.show[data-step="1"] [data-go="1"],.show[data-step="2"] [data-go="2"],.show[data-step="3"] [data-go="3"]{opacity:1}
.show[data-step="0"] [data-go="0"]::after,.show[data-step="1"] [data-go="1"]::after,.show[data-step="2"] [data-go="2"]::after,.show[data-step="3"] [data-go="3"]::after{height:2px;background:var(--glow)}
/* Hint stoji iznad poglavlja da ne prekrije tocke na sceni */
@media (min-width:761px) and (orientation:landscape){.show__hint{position:absolute;left:var(--gutter);bottom:48px}}
@media (max-width:1180px){.chapters span{display:none}.chapters button{padding-right:14px}}
@media (max-width:760px),(orientation:portrait){.chapters{left:auto;right:var(--gutter);bottom:auto;top:calc(50% - 22px);flex-direction:column;gap:0}.chapters button{padding:6px 0 6px 12px;min-height:30px}.chapters small{font-size:12px}.chapters button::after{left:0;right:auto;top:6px;bottom:6px;width:1px;height:auto}.show[data-step="0"] [data-go="0"]::after,.show[data-step="1"] [data-go="1"]::after,.show[data-step="2"] [data-go="2"]::after,.show[data-step="3"] [data-go="3"]::after{height:auto;width:2px}}

.embers{position:absolute;left:58%;top:18%;width:32%;height:54%;pointer-events:none}
@media (max-width:760px),(orientation:portrait){.embers{left:69%;top:39%;width:30%;height:36%}} /* K27: iskre iznad vatrista u novom uspravnom kadru (plamen na 84% / 72%); prije su ostale na mjestu starog kadra, iznad kuhinje */

.sun{padding:var(--section) var(--gutter) 0}
.sun__head{display:flex;flex-wrap:wrap;align-items:baseline;justify-content:space-between;gap:12px 30px;margin-bottom:clamp(16px,2vw,26px)}
.sun h2{margin:0;font-weight:300;font-size:var(--fs-h2);line-height:1}
.sun__tabs{display:flex;gap:24px}
.sun__tabs button{position:relative;min-height:44px;padding:10px 0;background:none;border:0;color:var(--ink-2);font:inherit;font-size:var(--fs-lead);cursor:pointer;transition:color .25s}
.sun__tabs button:hover,.sun__tabs button.on{color:var(--ink)}
.sun__tabs button.on::after{content:"";position:absolute;left:0;right:0;bottom:4px;height:2px;background:var(--glow)}
.sun__stage{--x:50%;position:relative;aspect-ratio:16/9;max-height:84vh;width:100%;overflow:hidden;background:#141312;user-select:none;touch-action:pan-y}
.sun__stage img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;transition:opacity .5s}
.sun__stage.swap img{opacity:0}
.sun__a{clip-path:inset(0 calc(100% - var(--x)) 0 0)}
.sun__tag{position:absolute;z-index:2;top:18px;padding:6px 12px;background:rgba(18,17,16,.66);font-size:15px;pointer-events:none}
.sun__tag--a{left:18px}.sun__tag--b{right:18px}
/* sloj preko cijele pozornice, pomak transformom (bez layout shifta); crta je ::before */
.sun__line{position:absolute;z-index:3;inset:0;transform:translateX(var(--x));pointer-events:none}
.sun__line::before{content:"";position:absolute;top:0;bottom:0;left:-.75px;width:1.5px;background:var(--glow);box-shadow:0 0 18px 3px rgba(255,190,120,.75)}
.sun__line i{position:absolute;left:0;top:50%;width:72px;height:72px;margin:-36px;border-radius:50%;background:radial-gradient(circle,#fff5e0 0 26%,#ffce85 34%,rgba(255,180,90,.34) 52%,rgba(255,170,80,0) 72%)}
.sun__range{position:absolute;z-index:4;inset:0;width:100%;height:100%;margin:0;opacity:0;cursor:ew-resize}
.sun__range:focus-visible~*{outline:none}
.sun__stage:focus-within .sun__line::before{box-shadow:0 0 22px 5px rgba(255,190,120,.95)}

.sx-measure__d{position:relative;display:block;overflow:hidden}
.sx-measure__d img{display:block;width:100%;height:auto}
.seq .sx-measure__d img{clip-path:inset(0 100% 0 0)}
/* skener: sloj sirine crteza klizi transformom, crta je ::before */
.sx-measure__d i{position:absolute;inset:0;opacity:0;pointer-events:none}
.sx-measure__d i::before{content:"";position:absolute;top:0;bottom:0;left:0;width:1.5px;background:var(--glow);box-shadow:0 0 16px 2px rgba(255,190,120,.8)}
.sx-measure.go .sx-measure__d img{animation:mDraw 2.8s cubic-bezier(.45,.05,.3,1) forwards}
.sx-measure.go .sx-measure__d i{animation:mScan 2.8s cubic-bezier(.45,.05,.3,1) forwards}
@keyframes mDraw{to{clip-path:inset(0)}}
@keyframes mScan{0%{transform:translateX(0);opacity:1}96%{opacity:1}100%{transform:translateX(100%);opacity:0}}
.sx-measure ul{display:flex;flex-wrap:wrap;gap:10px 44px;margin:18px 0 0;padding:0;list-style:none}
.seq .sx-measure li{opacity:0}
.sx-measure.go li{animation:mDim .8s var(--ease) both;animation-delay:calc(2.3s + var(--i)*.28s)}
@keyframes mDim{from{opacity:0;transform:translateY(10px)}to{opacity:1;transform:none}}
.sx-measure small{display:block;font-size:var(--fs-label);color:var(--ink-2)}
.sx-measure b{font-weight:300;font-size:clamp(20px,1.9vw,26px)}
@media (prefers-reduced-motion:reduce){.sx-measure.go .sx-measure__d img,.sx-measure.go .sx-measure__d i,.sx-measure.go li{animation:none}}

/* W6: poglavlja na mobitelu imaju punu metu za prst */
@media (max-width:760px),(orientation:portrait){.chapters button{min-width:44px;min-height:44px;justify-content:flex-end}}
.chapters button:hover small,.chapters button:focus-visible small{color:var(--glow)}
