/* ==========================================================================
   TEMAQUA — vrstva interakcií (12. 11. 2026, úprava 26. 11. 2026)
   Doplnok k style.css. Všetko platí len s triedou html.tqx, ktorú pridá
   interakcie.js – bez JavaScriptu (napr. náhľad v Pošte) ostáva web ako doteraz.

   1  Tlačidlá – jasná odozva (zdvih, stlačenie, vlnka)
   2  Prechody medzi sekciami (priebeh v lište, bod v menu, nadpisy, línia Váhu)
   3  Postupné odhaľovanie pri posúvaní (čísla, ikony, zoznamy, fľaše)
   4  Produkty – výklad (farba variantu, linka nad radom fliaš, potiahnutie prstom)
   5  Jemný posun obrázkov pod kurzorom
   6  Obmedzený pohyb (prefers-reduced-motion)
   ========================================================================== */

@property --tqx-glow { syntax: "<color>"; inherits: true; initial-value: rgba(0, 156, 222, 0); }

/* Plynulý prechod aj medzi stránkami webu (SK ↔ EN, právne stránky) – Chrome, Edge, Safari */
@view-transition { navigation: auto; }


/* 1  Tlačidlá --------------------------------------------------------------- */
html.tqx .btn {
  position: relative; overflow: hidden; isolation: isolate;
  transition: background-color .25s var(--ease), color .25s var(--ease), border-color .25s var(--ease),
              transform .22s cubic-bezier(.3, .7, .4, 1), box-shadow .25s var(--ease);
}
@media (hover: hover) {
  html.tqx .btn:hover { transform: translateY(-2px); box-shadow: 0 14px 26px -16px rgba(8, 20, 56, .6); }
}
html.tqx .btn:active { transform: translateY(0) scale(.965); box-shadow: 0 4px 10px -8px rgba(8, 20, 56, .6); transition-duration: .08s; }

/* vlnka z miesta dotyku */
.tqx-ripple {
  position: absolute; z-index: -1; border-radius: 50%; pointer-events: none;
  background: currentColor; opacity: 0; transform: scale(0);
  animation: tqx-ripple .65s cubic-bezier(.2, .7, .3, 1) forwards;
}
@keyframes tqx-ripple { from { transform: scale(0); opacity: .26; } to { transform: scale(1); opacity: 0; } }

html.tqx .lineup button:active img { transform: translateY(-2px) scale(1.08); transition-duration: .1s; }


/* 2  Prechody medzi sekciami ------------------------------------------------ */
/* priebeh čítania – tenká linka na spodku lišty */
html.tqx .site-header__bar { position: relative; }
.tqx-progress {
  position: absolute; left: 26px; right: 26px; bottom: 0; height: 2px; border-radius: 2px;
  background: var(--tq-sky); transform: scaleX(0); transform-origin: 0 50%; pointer-events: none;
}
@media (max-width: 1080px) { .tqx-progress { left: 20px; right: 20px; } }

/* bod aktívnej sekcie sa v menu presúva plynule z položky na položku */
html.tqx .site-nav { position: relative; }
html.tqx .site-nav a::after { display: none; }
.tqx-navdot {
  position: absolute; left: 0; bottom: -6px; width: 7px; height: 7px; border-radius: 50%;
  border: 1.5px solid var(--tq-sky); opacity: 0; pointer-events: none;
  transition: transform .55s cubic-bezier(.65, 0, .35, 1), opacity .3s var(--ease);
}
.tqx-navdot.is-on { opacity: 1; }

/* nadpisy sekcií sa odkryjú zdola */
html.tqx .h-section { transition: clip-path 1s cubic-bezier(.2, .7, .2, 1), transform 1s cubic-bezier(.2, .7, .2, 1); }
html.tqx .h-section:not(.tqx-in) { clip-path: inset(0 -8% 100% -8%); transform: translateY(.32em); }
html.tqx .h-section.tqx-in { clip-path: inset(-12% -8% -16% -8%); }

/* svetlo-sivé sekcie začínajú plynulo z bielej, bez ostrej hrany */
html.tqx .section--mist { background: linear-gradient(180deg, #fff 0, var(--mist) clamp(90px, 12vw, 180px)); }

/* línia Váhu medzi sekciami sa pri posúvaní „zdvihne“ – vysunie sa zospodu (Chrome, Edge, Safari 26;
   inde ostáva statická). Od 26. 11. 2026 posun namiesto natiahnutia: natiahnutú líniu Chrome občas
   vykreslil rozmazane. overflow: clip (nie hidden), aby sa nezmenil posuvník pre view(). */
@supports (animation-timeline: view()) {
  html.tqx .section .edge, html.tqx .site-footer__edge { overflow: clip; }
  html.tqx .section .edge svg, html.tqx .site-footer__edge svg {
    animation: tqx-ridge linear both; animation-timeline: view(); animation-range: entry 0% cover 35%;
  }
}
@keyframes tqx-ridge { from { transform: translateY(70%); } to { transform: none; } }


/* 3  Postupné odhaľovanie pri posúvaní ------------------------------------- */
/* ikony výhod sa dokrútia na miesto (kruhový text sa „odvinie“) */
html.tqx .benefit .tq-icon { transition: rotate 1.1s cubic-bezier(.2, .7, .2, 1), scale 1.1s cubic-bezier(.2, .7, .2, 1); transition-delay: calc(var(--delay, 0s) + .15s); }
html.tqx .benefit:not(.is-in) .tq-icon { rotate: -28deg; scale: .86; }

/* zoznam „Prirodzene zodpovedne“: fajky sa dokreslia jedna po druhej */
html.tqx .trade__list svg circle, html.tqx .trade__list svg path { stroke-dasharray: 1; stroke-dashoffset: 1; transition: stroke-dashoffset .9s cubic-bezier(.2, .7, .2, 1); }
html.tqx .trade__list svg path { transition-delay: .35s; }
html.tqx .trade__list li.tqx-in svg circle, html.tqx .trade__list li.tqx-in svg path { stroke-dashoffset: 0; }
html.tqx .trade__list li > div { transition: opacity .7s var(--ease) .15s, transform .7s var(--ease) .15s; }
html.tqx .trade__list li:not(.tqx-in) > div { opacity: 0; transform: translateX(14px); }

/* tri fľaše na modrom paneli vyjdú postupne, znak „Vyrobené na Slovensku“ sa dotočí */
html.tqx .trade__visual img {
  transform-origin: 50% 100%;
  transition: translate 1s cubic-bezier(.2, .7, .2, 1), opacity .8s var(--ease), rotate .7s var(--ease);
}
html.tqx .trade__visual img:nth-child(2) { transition-delay: .12s; }
html.tqx .trade__visual img:nth-child(3) { transition-delay: .24s; }
html.tqx .trade__visual:not(.is-in) img { opacity: 0; translate: 0 22%; }
html.tqx .trade__visual .tq-emblem { transition: rotate 1.2s cubic-bezier(.2, .7, .2, 1) .35s, scale 1.2s cubic-bezier(.2, .7, .2, 1) .35s, opacity .8s var(--ease) .35s; }
html.tqx .trade__visual:not(.is-in) .tq-emblem { rotate: -50deg; scale: .7; opacity: 0; }

/* ukazovatele v sekcii Zloženie a v „Zdroj v číslach“ sa napočítajú (interakcie.js) */
html.tqx .stat__value, html.tqx .facts-row__value { font-variant-numeric: tabular-nums; }


/* 4  Produkty – výklad -------------------------------------------------------- */
/* jemná žiara vo farbe variantu (pásik na etikete) */
html.tqx .products__grid { --tqx-glow: color-mix(in srgb, var(--sw, var(--c-nesytena)) 15%, transparent); transition: --tqx-glow .9s var(--ease); }
html.tqx .product-stage::after {
  content: ""; position: absolute; inset: -10%; z-index: -1; pointer-events: none;
  background: radial-gradient(closest-side, var(--tqx-glow), transparent);
  translate: calc(var(--tqx-mx, 0) * -14px) calc(var(--tqx-my, 0) * -10px);
  transition: translate 1s cubic-bezier(.2, .7, .2, 1);
}
html.tqx .product-stage { touch-action: pan-y; }

/* bežiaca linka nad radom fliaš ukazuje vybranú fľašu */
html.tqx .lineup { position: relative; }
html.tqx .lineup::after {
  content: ""; position: absolute; top: 0; left: 0; height: 2px; border-radius: 2px;
  width: var(--tqx-w, 0); transform: translateX(var(--tqx-x, 0));
  background: var(--tqx-c, var(--tq-blue));
  transition: transform .6s cubic-bezier(.65, 0, .35, 1), width .6s cubic-bezier(.65, 0, .35, 1), background-color .6s var(--ease);
}
html.tqx .lineup.tqx-instant::after { transition: none; }

/* dotykové displeje: fľaše sa dajú meniť potiahnutím prsta do strany */
.tqx-swipe { display: none; }
@media (hover: none) {
  html.tqx .tqx-swipe {
    display: inline-flex; align-items: center; gap: 10px;
    position: absolute; right: 14px; top: 22px; z-index: 3;
    margin: 0; padding: 6px 12px; border-radius: 999px; background: rgba(255, 255, 255, .9);
    font-size: .74rem; font-weight: 500; letter-spacing: .04em; color: var(--ink-3); white-space: nowrap;
    transition: opacity .5s var(--ease);
  }
  html.tqx .tqx-swipe::before, html.tqx .tqx-swipe::after { content: "‹"; font-size: 1.1rem; line-height: .8; color: var(--tq-blue); animation: tqx-nudge 1.8s var(--ease) infinite; }
  html.tqx .tqx-swipe::after { content: "›"; animation-direction: reverse; }
  html.tqx .tqx-swipe.is-done { opacity: 0; }
}
@keyframes tqx-nudge { 0%, 100% { transform: translateX(0); } 50% { transform: translateX(-3px); } }


/* 5  Jemný posun obrázkov pod kurzorom (len myš / touchpad) ------------------ */
@media (hover: hover) and (pointer: fine) {
  /* Q a fľaša sa posúvajú spolu (konštrukcia Q s fľašou ostáva presná), pozadie opačne */
  html.tqx .product-stage__frame { translate: calc(var(--tqx-mx, 0) * 12px) calc(var(--tqx-my, 0) * 8px); transition: translate 1s cubic-bezier(.2, .7, .2, 1); }
  html.tqx .product-stage .bubbles { translate: calc(var(--tqx-mx, 0) * -10px) calc(var(--tqx-my, 0) * -6px); transition: translate 1.2s cubic-bezier(.2, .7, .2, 1); }
  html.tqx .hero .qframe { translate: calc(var(--tqx-mx, 0) * 10px) calc(var(--tqx-my, 0) * 6px); transition: translate 1.2s cubic-bezier(.2, .7, .2, 1); }

  /* modrý panel s tromi fľašami: fľaše sa jemne rozostúpia, reliéf sa posunie */
  html.tqx .trade__visual::before { transition: background-position 1.4s cubic-bezier(.2, .7, .2, 1); }
  html.tqx .trade__visual:hover::before { background-position: 64% 4%; }
  html.tqx .trade__visual.is-in:hover img:nth-child(1) { translate: -7% 0; rotate: -3deg; transition-delay: 0s; }
  html.tqx .trade__visual.is-in:hover img:nth-child(2) { translate: 0 -3%; transition-delay: 0s; }
  html.tqx .trade__visual.is-in:hover img:nth-child(3) { translate: 7% 0; rotate: 3deg; transition-delay: 0s; }
  html.tqx .trade__visual.is-in:hover .tq-emblem { rotate: 12deg; transition-delay: 0s; }

  /* ikony výhod sa pri prejdení kurzorom pootočia */
  html.tqx .benefit.is-in:hover .tq-icon { rotate: 14deg; transition-delay: 0s; transition-duration: .9s; }
}


/* 6  Obmedzený pohyb ---------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  html.tqx .h-section, html.tqx .trade__list li > div, html.tqx .trade__visual img, html.tqx .trade__visual .tq-emblem { opacity: 1 !important; transform: none !important; translate: none !important; rotate: none !important; scale: none !important; clip-path: none !important; }
  html.tqx .trade__list svg circle, html.tqx .trade__list svg path { stroke-dashoffset: 0 !important; }
  html.tqx .benefit .tq-icon { rotate: none !important; scale: none !important; }
  html.tqx .section .edge svg, html.tqx .site-footer__edge svg { animation: none !important; }
  .tqx-ripple, .tqx-swipe::before, .tqx-swipe::after { animation: none !important; }
}
