/* ============================================================
   wdrozenie.ai — Słownik
   Global styles. Ported verbatim from the source design's <helmet>
   block; only the responsive nav rule at the bottom is new.
   Per-element styling stays inline in index.html (as in the source),
   so this file only carries what has to be global:
   reset, the language switch, the scroll-spy highlight, keyframes.
   ============================================================ */

html { scroll-behavior: smooth; }
body { margin: 0; background: #faf7f2; -webkit-font-smoothing: antialiased; }
* { box-sizing: border-box; }
canvas { display: block; }
::selection { background: #d2321e; color: #faf7f2; }

/* --- language switch (data-lang on root drives PL/EN visibility) --- */
.l-en { display: none; }
[data-lang="en"] .l-en { display: contents; }
[data-lang="en"] .l-pl { display: none; }

/* --- scroll-spy: the active case highlights its row in the declension
       table (data-cur on root) and its nav abbreviation --- */
[data-cur="mianownik"] .tr-mianownik, [data-cur="dopelniacz"] .tr-dopelniacz, [data-cur="celownik"] .tr-celownik, [data-cur="biernik"] .tr-biernik, [data-cur="narzednik"] .tr-narzednik, [data-cur="miejscownik"] .tr-miejscownik, [data-cur="wolacz"] .tr-wolacz { background: #141210 !important; }
[data-cur="mianownik"] .tr-mianownik .tmut, [data-cur="dopelniacz"] .tr-dopelniacz .tmut, [data-cur="celownik"] .tr-celownik .tmut, [data-cur="biernik"] .tr-biernik .tmut, [data-cur="narzednik"] .tr-narzednik .tmut, [data-cur="miejscownik"] .tr-miejscownik .tmut, [data-cur="wolacz"] .tr-wolacz .tmut { color: rgba(250,247,242,0.55) !important; }
[data-cur="mianownik"] .tr-mianownik .twrd, [data-cur="dopelniacz"] .tr-dopelniacz .twrd, [data-cur="celownik"] .tr-celownik .twrd, [data-cur="biernik"] .tr-biernik .twrd, [data-cur="narzednik"] .tr-narzednik .twrd, [data-cur="miejscownik"] .tr-miejscownik .twrd, [data-cur="wolacz"] .tr-wolacz .twrd { color: #faf7f2 !important; }
[data-cur="mianownik"] .tr-mianownik .tacc, [data-cur="dopelniacz"] .tr-dopelniacz .tacc, [data-cur="celownik"] .tr-celownik .tacc, [data-cur="biernik"] .tr-biernik .tacc, [data-cur="narzednik"] .tr-narzednik .tacc, [data-cur="miejscownik"] .tr-miejscownik .tacc, [data-cur="wolacz"] .tr-wolacz .tacc { color: #ff6b4a !important; }
[data-cur="dopelniacz"] .nl-dopelniacz, [data-cur="celownik"] .nl-celownik, [data-cur="biernik"] .nl-biernik, [data-cur="narzednik"] .nl-narzednik, [data-cur="miejscownik"] .nl-miejscownik, [data-cur="wolacz"] .nl-wolacz { color: #d2321e !important; }

/* --- animations --- */
@keyframes ink-rise { 0% { transform: translateY(52vh); } 100% { transform: translateY(-56vh); } }
@keyframes ink-land { 0% { transform: translateY(0); } 40% { transform: translateY(3px); } 100% { transform: translateY(0); } }
@keyframes ink-pop { 0% { opacity: 1; transform: scale(0.6); } 100% { opacity: 0; transform: scale(1.5); } }

/* ============================================================
   Additions for the standalone build (not in the source <style>)
   ============================================================ */

/* The declension nav links are desktop-only (source gated them behind
   isDesktop = viewport wider than 960px). */
@media (max-width: 960px) { .nav-cases { display: none !important; } }

/* Respect users who prefer no motion: freeze the floating ink specks and
   the burst pop. The scroll-driven stack still assembles (it is content),
   but nothing loops on its own. */
@media (prefers-reduced-motion: reduce) {
  [style*="ink-rise"] { animation: none !important; }
  #burst { display: none !important; }
}
