/* GENERIRANO iz animacije.css (tools/boja.py) – glavna boja #2980B9, ne uređivati ručno */
/* =====================================================================
   ENERGONOVA v9 — animacije (assets/js/animacije.js): uvod + otkrivanje pri skrolu
   ===================================================================== */

/* ---------- UVOD: dok traje, hero je prazan, header čeka ---------- */
html.is-intro:not(.is-hdr) .hdr { transform: translate3d(0, -110%, 0); }
html.is-intro .hero :is(.hero__3d, .hero__pipes, .hero__dith, .hv__sym, .hv__x,
  .hero__k, .hv__ann, .hero__lead, .hv__r li, .hero__actions > *, .hero__stats > div, .hv__strip > span, .hero__side > *, .hero__svc > a) { opacity: 0; }
html.is-intro:not(.is-t) .hero__title .sw__i { transform: translate3d(0, 108%, 0); transition: none; }
html.is-intro .lab { opacity: 0; pointer-events: none; }
.lab { transition: opacity .5s; }

/* Plava zavjesa */
.an-cur { position: fixed; inset: 0; z-index: 200; display: grid; place-items: center; background: #2980b9; color: #fff; pointer-events: none; }
.an-cur__in { display: grid; justify-items: center; gap: 16px; }
.an-cur__logo { display: inline-flex; padding: 12px 16px; border-radius: 16px; background: #fff; }
.an-cur__logo img { display: block; width: 190px; height: auto; }
.an-cur__t { font-size: 13px; font-weight: 500; letter-spacing: .14em; text-transform: uppercase; color: rgba(255, 255, 255, .78); }
.an-cur__bar { display: block; width: 160px; height: 2px; border-radius: 2px; background: rgba(255, 255, 255, .25); overflow: hidden; }
.an-cur__bar b { display: block; height: 100%; background: #fff; transform-origin: 0 50%; }

/* Mjerne crte */
.an-ln { position: fixed; inset: 0; z-index: 70; pointer-events: none; --c: rgba(41, 128, 185, .28); }
html[data-hero="vercel"][data-vct="dark"] .an-ln, html[data-hero="kartica3d"] .an-ln { --c: rgba(255, 255, 255, .3); }
.an-ln__v { position: absolute; top: 0; bottom: 0; left: calc(var(--i) * 100% / 6); width: 1px; background: var(--c); transform-origin: 50% 0; }
.an-ln__v:nth-child(even) { transform-origin: 50% 100%; }
.an-ln__h { position: absolute; left: 0; right: 0; top: calc(var(--i) * 100% / 3); height: 1px; background: var(--c); transform-origin: 0 50%; }
.an-ln__h:nth-of-type(2n) { transform-origin: 100% 50%; }
.an-ln__x { position: absolute; width: 15px; height: 15px; translate: -7px -7px; }
.an-ln__x::before, .an-ln__x::after { content: ""; position: absolute; background: #2980b9; }
.an-ln__x::before { left: 7px; top: 0; width: 1px; height: 15px; }
.an-ln__x::after { top: 7px; left: 0; height: 1px; width: 15px; }
.an-ln__x--1 { left: calc(100% / 6); top: calc(100% / 3); }
.an-ln__x--2 { left: calc(500% / 6); top: calc(200% / 3); }
@media (max-width: 760px) { .an-ln__v:nth-child(n+4) { display: none; } .an-ln__v { left: calc(var(--i) * 100% / 4); } .an-ln__x--2 { left: calc(300% / 4); } .an-ln__x--1 { left: 25%; } }

/* ---------- PRI SKROLU: "Crte + brisanje" — crta preko vrha sekcije ---------- */
.an-sl { position: absolute; top: 0; left: var(--gut, 64px); right: var(--gut, 64px); height: 1px; background: rgba(41, 128, 185, .35); transform: scaleX(0); transform-origin: 0 50%; transition: transform 1.3s cubic-bezier(.65, 0, .35, 1); pointer-events: none; z-index: 2; }
.an-sl::after { content: ""; position: absolute; right: 0; top: -3px; width: 7px; height: 7px; border-radius: 50%; background: #2980b9; opacity: 0; transition: opacity .3s 1.1s; }
.an-sl.is-in { transform: none; }
.an-sl.is-in::after { opacity: 1; }
.cta .an-sl, .nb .an-sl { background: rgba(255, 255, 255, .4); }

@media (prefers-reduced-motion: reduce) {
  html.is-intro .hero * { opacity: 1 !important; }
  .an-cur, .an-ln, .an-sl { display: none; }
}

/* Lab: gumb "Ponovi uvod" */
.lab__go--btn { width: 100%; border: 0; cursor: pointer; font-family: inherit; }
.lab__sw { display: inline-block; width: 10px; height: 10px; margin-right: 6px; border-radius: 50%; vertical-align: -1px; }
.lab__copy { margin: 0 0 12px; background: var(--ink, #0a0a0b); color: #fff; }
.lab__copy.is-done { background: #16a34a; }
