/* ═══════════════════════════════════════════════════════════════════════════
   v2.thereisnoagency.com — JUDESIO SLUOKSNIS (portas iš thereisnosystem)
   ⛔ TRYS TAISYKLĖS:
   1. Geometrija nesikeičia — judesys tik PRIDEDAMAS; galutinė padėtis = maketo.
   2. NIEKADA `transform:` — elementai turi inline `rotate`. Naudojam atskiras
      savybes: translate / rotate / scale.
   3. Trys kanalai (--rv atskleidimas · --py paralaksas · --fl plaukiojimas)
      suplaukia į VIENĄ translate per @property — niekada nekonkuruoja.
   ═══════════════════════════════════════════════════════════════════════════ */

@property --rv { syntax: "<length>"; inherits: false; initial-value: 0px; }
@property --py { syntax: "<length>"; inherits: false; initial-value: 0px; }
@property --fl { syntax: "<length>"; inherits: false; initial-value: 0px; }
@property --ro { syntax: "<angle>";  inherits: false; initial-value: 0deg;  }

html.fx [data-rv], html.fx [data-fx] {
  translate: 0 calc(var(--rv) + var(--py) + var(--fl));
}
html.fx [data-fx="pill"] { rotate: var(--ro); }

/* ── ATSKLEIDIMAS — kiekvienas tipas savaip ── */
html.fx [data-rv]              { opacity: 0; }
html.fx [data-rv].rv-in        { opacity: 1; }
html.fx [data-rv=""]           { --rv: 18px; transition: opacity .7s cubic-bezier(.2,.75,.2,1), --rv .7s cubic-bezier(.2,.75,.2,1); }
html.fx [data-rv="head"]       { --rv: 26px; transition: opacity .72s cubic-bezier(.2,.75,.2,1), --rv .72s cubic-bezier(.2,.75,.2,1); }
html.fx [data-rv="card"]       { --rv: 40px; scale: .984; transition: opacity .86s cubic-bezier(.2,.75,.2,1), --rv .86s cubic-bezier(.2,.75,.2,1), scale .86s cubic-bezier(.2,.75,.2,1); }
html.fx [data-rv="card"].rv-in { scale: 1; }
html.fx [data-fx="pill"]       { --rv: 0px; scale: .82; transition: opacity .6s cubic-bezier(.2,1.5,.4,1), scale .6s cubic-bezier(.2,1.5,.4,1); }
html.fx [data-fx="pill"].rv-in { scale: 1; }
html.fx [data-rv].rv-in        { --rv: 0px; }

/* žodžiai pakyla iš po linijos (JS suskaido, po to sudeda atgal) */
html.fx .w-line { display: inline-block; overflow: hidden; vertical-align: bottom; }
html.fx .w      { display: inline-block; translate: 0 108%; opacity: 0;
                  transition: translate .78s cubic-bezier(.16,.84,.24,1), opacity .5s linear; }
html.fx .w-go .w { translate: 0 0; opacity: 1; }

/* jungiamosios linijos nusipiešia */
html.fx path[data-draw] { transition: stroke-dashoffset 1.35s cubic-bezier(.3,.55,.15,1); }

/* ── APLINKOS KVĖPAVIMAS ── */
html.fx [data-fx="float"]   { animation: bob 8.5s ease-in-out infinite; }
html.fx [data-fx="float"]:nth-of-type(2n)  { animation-duration: 10.5s; animation-delay: -3.2s; }
html.fx [data-fx="float"]:nth-of-type(3n)  { animation-duration: 12s;   animation-delay: -6.1s; }
@keyframes bob { 50% { --fl: -7px; } }

html.fx [data-fx="pill"]    { animation: drift 12s ease-in-out infinite; }
html.fx [data-fx="pill"]:nth-of-type(2n) { animation-duration: 15s; animation-delay: -4.5s; }
html.fx [data-fx="pill"]:nth-of-type(3n) { animation-duration: 10s; animation-delay: -7.3s; }
@keyframes drift { 50% { --fl: -6px; --ro: .7deg; } }

html.fx [data-fx="receipt"] { animation: bob 11s ease-in-out infinite; }
html.fx [data-fx="receipt"]:nth-of-type(2n) { animation-delay: -5s; }

/* už ekrano — pauzė (baterija) */
html.fx [data-fx].fx-off { animation-play-state: paused; }

/* gradientas lėtai kvėpuoja */
html.fx .grad, html.fx .gbtn {
  background-size: 220% 100%;
  animation: gflow 16s ease-in-out infinite;
}
@keyframes gflow { 0%,100% { background-position: 0% 50%; } 50% { background-position: 100% 50%; } }

/* ── RODYKLĖS SĄVEIKA (tik tikra pelė) ── */
@media (hover: hover) and (pointer: fine) {
  html.fx .gbtn, html.fx .obtn { transition: translate .18s cubic-bezier(.2,.8,.3,1), box-shadow .25s ease, scale .18s ease; }
  html.fx .gbtn:hover { scale: 1.015; box-shadow: 0 22px 46px -10px rgba(240,62,45,.52); }
  html.fx [data-fx="frame"], html.fx [data-fx="deckcard"] {
    transition: rotate .35s cubic-bezier(.2,.8,.3,1), scale .35s cubic-bezier(.2,.8,.3,1), box-shadow .35s ease;
  }
  html.fx [data-fx="deckcard"]:hover { scale: 1.03; box-shadow: 0 40px 90px -22px rgba(0,0,0,.7); }
}

/* ── SLINKIMO GIJA ── */
.pg { position: fixed; top: 0; left: 0; right: 0; height: 2px; z-index: 90;
      background: linear-gradient(92deg, #FF7A5C, #F03E2D, #CE2038);
      transform-origin: 0 50%; scale: var(--pg, 0) 1;
      opacity: 0; transition: opacity .4s ease; pointer-events: none; }
.pg.on { opacity: 1; }
html.no-js .pg, html:not(.fx) .pg { display: none; }

/* ── SUMAŽINTAS JUDESYS — be .fx nė viena taisyklė negalioja ── */
@media (prefers-reduced-motion: reduce) {
  .pg { display: none; }
}
