/* moneypage-hero-slider.css — money-page hero-suwak „czyste szkło ↔ technika".
 * Port z artboardu „Hero money page - nadruk/grawer.html" (.mg*), root → .sn-mgx
 * (scope kolizjo-odporny; dzieci mgx__* unikatowe). Header NIE portowany (motywowy).
 * Wysokość jak hero kategorii (clamp), nie 100vh — bo header to lity pasek nad hero.
 * Enqueue warunkowy (functions.php): tylko landing z mapą mp-clean + warstwą techniki.
 * Tokeny: colors_and_type.css (--ember-*, --brass-*, --font-poster=Anton). */

.sn-mgx {
  position: relative; width: 100%;
  height: clamp(620px, 82vh, 840px); overflow: hidden;
  background: radial-gradient(56% 60% at 50% 50%, #1c1410 0%, #0c0a08 62%, #060504 100%);
  isolation: isolate; user-select: none;
  font-family: var(--font-body);
  /* krawędź kontenera strony — boki nie uciekają na brzeg ekranu (jak hero kategorii):
     na szerokim ekranie margines do max-1200, na wąskim mały inset. */
  --mgx-edge: max(clamp(20px, 4vw, 40px), calc((100% - var(--content-max, 1200px)) / 2));
}

/* wrapper „ekran 1": desktop = display:contents (bez wpływu na layout); mobile = flex 100svh */
.mgx__s1 { display: contents; }
/* wrapper sceny: desktop = pełna sekcja (warstwy/suwak jak dotąd); mobile = blok flow */
.mgx__stage { position: absolute; inset: 0; }
/* elementy WYŁĄCZNIE mobilne — desktop ukryte (boki .mgx__side niosą Przed/Po + CTA na desktopie) */
.mgx__lede, .mgx__act, .mgx__cmp { display: none; }

/* warstwy: czyste szkło (lewa, zawsze) → technika (prawa, odsłaniana suwakiem) */
.mgx__layer { position: absolute; inset: 0; background-repeat: no-repeat; background-size: auto 93%; background-position: center 45%; z-index: 2; }
.mgx__layer--tech { clip-path: inset(0 0 0 var(--x, 50%)); }

.mgx__veil { position: absolute; inset: 0; z-index: 3; pointer-events: none;
  background: linear-gradient(180deg, rgba(8,7,6,0.72) 0%, transparent 18%, transparent 78%, rgba(8,7,6,0.78) 96%); }

/* światło + cień kontaktowy wokół nóżki — pod szkłem (z1), grounding podstawy */
.mgx__footglow { position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background:
    radial-gradient(22% 9% at 50% 88%, rgba(235,209,154,0.20) 0%, rgba(235,209,154,0.06) 48%, transparent 80%),
    radial-gradient(13% 4% at 50% 90%, rgba(0,0,0,0.55) 0%, rgba(0,0,0,0.24) 55%, transparent 85%); }

/* H1 za szkłem */
.mgx__top { position: absolute; top: 33%; left: 0; right: 0; z-index: 1; text-align: center; padding: 0 24px; pointer-events: none; transform: translateY(-50%); }
.mgx__h1 { font-family: var(--font-poster); font-weight: 400; text-transform: uppercase; color: transparent;
  -webkit-text-stroke: 1.1px rgba(255,255,255,0.42);
  font-size: clamp(48px, 8.2vw, 156px); line-height: 1.0; letter-spacing: 0.006em; margin: 0; }
/* desktop: <em> (technika) dziedziczy obrys H1 — bez italiku, bez zmiany wyglądu. Akcent koloru tylko mobile. */
.mgx__h1 em { font-style: normal; }

/* boczne etykiety przed/po — nisko (jak grupy w hero kategorii) */
.mgx__side { position: absolute; top: 70%; z-index: 4; transform: translateY(-50%); display: flex; flex-direction: column; gap: 11px; }
.mgx__side--l { left: var(--mgx-edge); align-items: flex-start; text-align: left; padding-left: 22px; max-width: min(26vw, 300px); }
.mgx__side--r { right: var(--mgx-edge); align-items: flex-end; text-align: right; padding-right: 22px; max-width: min(28vw, 340px); }
.mgx__side::before { content: ""; position: absolute; top: 0; bottom: 0; width: 1px; }
.mgx__side--l::before { left: 0; background: linear-gradient(180deg, transparent, rgba(255,255,255,0.28), transparent); }
.mgx__side--r::before { right: 0; background: linear-gradient(180deg, transparent, rgba(230,128,60,0.7), transparent); }

.mgx__tag { font-size: 10px; font-weight: 700; letter-spacing: 0.24em; text-transform: uppercase; padding: 4px 11px; border-radius: var(--radius-pill); border: 1px solid; }
.mgx__side--l .mgx__tag { color: var(--fg-on-dark-3); border-color: rgba(255,255,255,0.22); }
/* tag „PO" na szaro — jak „PRZED" po lewej (decyzja Jarka) */
.mgx__side--r .mgx__tag { color: var(--fg-on-dark-3); border-color: rgba(255,255,255,0.22); }
.mgx__kick { font-size: 11px; font-weight: 700; letter-spacing: 0.2em; text-transform: uppercase; margin-top: 3px; }
.mgx__side--l .mgx__kick { color: var(--fg-on-dark-3); }
.mgx__side--r .mgx__kick { color: var(--fg-on-dark-3); }
.mgx__big { font-family: var(--font-poster); font-weight: 400; text-transform: uppercase; color: #fff; font-size: clamp(24px, 2.6vw, 40px); line-height: 1.04; margin: 0; white-space: nowrap; }
.mgx__side--l .mgx__big { color: rgba(255,255,255,0.46); }
.mgx__side--r .mgx__big { color: #fff; }
.mgx__cap { display: inline-flex; align-items: center; gap: 11px; font-size: 12px; letter-spacing: 0.02em; color: var(--fg-on-dark-3); margin-top: 2px; }
.mgx__cap::before { content: ""; width: 26px; height: 1px; background: currentColor; opacity: 0.5; }
/* kreska ozdobna po lewej stronie podpisu także w prawym boku (decyzja Jarka) */
.mgx__side--r .mgx__cap { flex-direction: row; }

/* CTA wypełniony ember + krzyżowy link */
.mgx__cta { display: inline-flex; align-items: center; gap: 8px; margin-top: 14px; padding: 10px 18px; border-radius: var(--radius-pill);
  font-size: 11.5px; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase; text-decoration: none;
  background: var(--ember-500); color: var(--ink-1000); transition: background 180ms; }
.mgx__cta:hover { background: var(--ember-400); }
.mgx__cta svg { width: 14px; height: 14px; }
.mgx__xunder { display: inline-flex; align-items: center; gap: 7px; margin-top: 12px; font-size: 11px; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase;
  color: var(--fg-on-dark-3); text-decoration: none; opacity: 0.9; transition: gap 200ms, color 200ms; }
.mgx__xunder:hover { gap: 11px; color: rgba(255,255,255,0.85); }
.mgx__xunder svg { width: 13px; height: 13px; }

/* uchwyt suwaka */
.mgx__handle { position: absolute; top: 84px; bottom: 92px; left: var(--x, 50%); width: 2px; z-index: 5;
  background: linear-gradient(180deg, transparent, rgba(255,255,255,0.82) 16%, rgba(255,255,255,0.82) 84%, transparent);
  transform: translateX(-50%); cursor: ew-resize; }
.mgx__grip { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); width: 54px; height: 54px; border-radius: 50%;
  background: rgba(13,10,8,0.55); border: 1.5px solid rgba(255,255,255,0.9); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
  display: grid; place-items: center; box-shadow: 0 8px 30px rgba(0,0,0,0.5); }
.mgx__grip svg { width: 28px; height: 28px; stroke: #fff; }
.mgx__hint { position: absolute; left: 50%; top: calc(50% + 56px); transform: translateX(-50%); z-index: 5;
  padding: 6px 15px; border-radius: var(--radius-pill); background: rgba(8,7,6,0.5); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px);
  font-size: 10.5px; letter-spacing: 0.16em; text-transform: uppercase; color: #fff; text-shadow: 0 1px 9px rgba(0,0,0,0.9); pointer-events: none; white-space: nowrap; }

/* dolny pasek „dla kogo" (spójny z hero kategorii) */
.mgx__aud { position: absolute; left: 0; right: 0; bottom: 0; z-index: 6; display: flex; align-items: center; justify-content: center;
  gap: clamp(14px, 2.4vw, 34px); flex-wrap: wrap; padding: 18px clamp(24px, 4vw, 56px) clamp(22px, 3vw, 30px); border-top: 1px solid rgba(255,255,255,0.12); }
.mgx__aud-h { font-size: 10px; font-weight: 700; letter-spacing: 0.32em; text-transform: uppercase; color: #fff; }
.mgx__seg { display: flex; align-items: center; gap: clamp(14px, 2.4vw, 34px); flex-wrap: wrap; }
.mgx__seg a { font-size: 12px; font-weight: 300; letter-spacing: 0.12em; text-transform: uppercase; color: rgba(255,255,255,0.78); text-decoration: none; transition: color 180ms; position: relative; }
.mgx__seg a:hover { color: #fff; }
.mgx__seg a::after { content: ""; position: absolute; left: 0; right: 100%; bottom: -5px; height: 1px; background: rgba(230,128,60,0.42); transition: right 220ms var(--ease-out); }
.mgx__seg a:hover::after { right: 0; }
.mgx__aud-note { font-family: var(--font-body); font-size: 12.5px; font-style: italic; letter-spacing: 0.03em; color: var(--ember-400); white-space: nowrap; }

/* ── Wariant GRAWER: akcent brass zamiast ember (jak na hero kategorii / handover grawera).
   Nadruk = ember (domyślnie). Tag „PO" zostaje szary (decyzja Jarka, niezależnie od osi). ── */
.sn-mgx[data-axis="grawer"] .mgx__side--r::before { background: linear-gradient(180deg, transparent, rgba(194,152,76,0.75), transparent); }
.sn-mgx[data-axis="grawer"] .mgx__cta { background: var(--brass-500); }
.sn-mgx[data-axis="grawer"] .mgx__cta:hover { background: var(--brass-400); }
.sn-mgx[data-axis="grawer"] .mgx__aud-note { color: var(--brass-400); }
.sn-mgx[data-axis="grawer"] .mgx__seg a::after { background: rgba(194,152,76,0.42); }

/* MOBILE (G20-rev, handover Jarka): money-page = strona przewijalna. Ekran 1 (intro +
 * lede + szkło Przed→Po z suwakiem + CTA „Wyceń" + link krzyżowy) na ~100svh, niżej
 * „Dla kogo". Header position:absolute → intro z górnym odstępem. Boki .mgx__side schowane. */
@media (max-width: 760px) {
  .sn-mgx { height: auto; min-height: 0; overflow: visible; }
  .mgx__veil, .mgx__side { display: none; }

  /* ── Ekran 1 ── */
  .mgx__s1 { display: flex; flex-direction: column; min-height: 100svh; min-height: 100dvh;
    padding: calc(env(safe-area-inset-top, 0px) + 92px) 0 24px; box-sizing: border-box; }

  /* intro */
  .mgx__top { position: static; transform: none; top: auto; padding: 0 24px; text-align: center; }
  .mgx__h1 { font-size: clamp(32px, 9.6vw, 44px); line-height: 1.08; color: #fff; -webkit-text-stroke: 0; }
  .sn-mgx[data-axis="nadruk"] .mgx__h1 em { font-style: normal; color: var(--ember-400); }
  .sn-mgx[data-axis="grawer"] .mgx__h1 em { font-style: normal; color: var(--brass-300); }
  .mgx__lede { display: block; font-size: 13.5px; line-height: 1.5; color: var(--fg-on-dark-2);
    margin: 16px auto 0; max-width: 40ch; text-wrap: balance; }

  /* scena */
  .mgx__stage { position: relative; inset: auto; flex: 1 1 auto; min-height: 220px; margin-top: 6px; }
  .mgx__layer { background-size: auto 82%; background-position: center 50%; }
  .mgx__handle { top: 8%; bottom: 12%; }
  .mgx__hint { top: auto; bottom: 4%; }

  /* tagi Przed/Po flankujące suwak */
  .mgx__cmp { display: flex; position: absolute; top: 33%; left: 0; right: 0; z-index: 4;
    justify-content: space-between; padding: 0 18px; pointer-events: none; }
  .mgx__cmp b { font-size: 9.5px; font-weight: 700; letter-spacing: 0.16em; text-transform: uppercase;
    padding: 4px 9px; border: 1px solid; border-radius: var(--radius-tight); }
  .mgx__cmp-l { color: var(--fg-on-dark-3); border-color: rgba(255,255,255,0.2); }
  .mgx__cmp-r { color: var(--ember-400); border-color: rgba(217,100,30,0.5); }
  .sn-mgx[data-axis="grawer"] .mgx__cmp-r { color: var(--brass-300); border-color: rgba(194,152,76,0.5); }

  /* CTA „Wyceń" + link krzyżowy */
  .mgx__act { display: block; padding: 0 20px; margin-top: 22px; }
  .mgx__cta-main { display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%;
    box-sizing: border-box; text-decoration: none; background: var(--ember-500); color: #1A1206;
    padding: 17px; border-radius: var(--radius-tight); font-family: var(--font-heading);
    font-size: 16px; font-weight: 700; letter-spacing: 0.02em; transition: background 180ms; }
  .mgx__cta-main svg { width: 18px; height: 18px; }
  .mgx__cta-main:active { background: var(--ember-400); }
  .sn-mgx[data-axis="grawer"] .mgx__cta-main { background: var(--brass-500); }
  .sn-mgx[data-axis="grawer"] .mgx__cta-main:active { background: var(--brass-400); }
  .mgx__xlink { display: flex; align-items: center; justify-content: center; gap: 7px; margin-top: 13px;
    font-size: 11px; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase;
    color: var(--fg-on-dark-3); text-decoration: none; }
  .mgx__xlink svg { width: 13px; height: 13px; }

  /* ── Ekran 2: „Dla kogo" w flow ── */
  .mgx__aud { position: static; left: auto; right: auto; bottom: auto;
    flex-direction: column; align-items: stretch; flex-wrap: wrap; gap: 14px;
    padding: 40px 24px 28px; margin-top: 4px; border-top: 1px solid rgba(255,255,255,0.07); }
  .mgx__aud-h { display: flex; align-items: center; gap: 14px; }
  .mgx__aud-h::after { content: ""; flex: 1; height: 1px; background: rgba(255,255,255,0.12); }
  .mgx__seg { flex-wrap: wrap; gap: 8px 18px; }
  .mgx__seg a { font-size: 14px; font-weight: 600; color: #fff; text-transform: none; }
  .mgx__aud-note { display: block; }
}

@media (prefers-reduced-motion: reduce) {
  .mgx__cta, .mgx__xunder, .mgx__seg a::after { transition: none; }
}

/* ── Kufle do piwa: jak na hero kategorii — kufel niski/szeroki, baza auto 93% ucinała
 * pianę i zasłaniała H1. Mniejszy + niżej. Scope per kategoria (data-cat). Wariant A. */
/* kufel: nudge w prawo (ucho spycha logo na lewo od linii) + lekko w górę. Tylko desktop. */
.sn-mgx[data-cat="kufle-do-piwa"] .mgx__layer { background-size: auto 74%; background-position: calc(50% + 58px) calc(55% - 20px); }
/* H1 w jednej linii „KUFLE Z NADRUKIEM/GRAWEREM" — tylko desktop; 140px na ≥1440, niżej skaluje vw.
 * separator to spacja (PHP), więc na mobile H1 zawija się naturalnie do dwóch linii. */
@media (min-width: 761px) {
  .sn-mgx[data-cat="kufle-do-piwa"] .mgx__h1 { font-size: clamp(48px, 9.7vw, 140px); white-space: nowrap; }
}

/* Szklanki do piwa: ~10% mniejsza (93%→84%) i 40px w górę. Tylko desktop. */
@media (min-width: 761px) {
  .sn-mgx[data-cat="szklanki-do-piwa"] .mgx__layer { background-size: auto 84%; background-position: center calc(45% - 40px); }
}
/* Szklanki do whisky: -20% (93%→74%) i 35px w górę — analogicznie jak kategoria. Tylko desktop. */
@media (min-width: 761px) {
  .sn-mgx[data-cat="szklanki-do-whisky"] .mgx__layer { background-size: auto 74%; background-position: center calc(45% - 35px); }
  /* H1 „Szklanki do whisky z…": linia 1 ma się mieścić w kontenerze (logo↔menu), ale na tyle duża,
     by krótsza linia 2 wystawała zza szklanki. 7.8vw = kompromis (7vw chowało linię 2 za szkłem). */
  .sn-mgx[data-cat="szklanki-do-whisky"] .mgx__h1 { font-size: clamp(40px, 7.8vw, 140px); }
}
/* Kieliszki do wina: H1 „Kieliszki do wina z…" długie — jak whisky, by linia 1 mieściła się w kontenerze.
   Kieliszek 30px w górę (decyzja Jarka, jak na kategorii). */
@media (min-width: 761px) {
  .sn-mgx[data-cat="kieliszki-i-szklanki-do-wina"] .mgx__h1 { font-size: clamp(40px, 7.8vw, 140px); }
  .sn-mgx[data-cat="kieliszki-i-szklanki-do-wina"] .mgx__layer { background-position: center calc(45% - 30px); }
}
/* Kubki szklane: rozmiar i umiejscowienie kubka 1:1 z hero kategorii (decyzja Jarka).
 * Te same wartości bezwzględne co .sn-hsx[data-cat="kubki-szklane"] (kontener tej samej
 * wysokości) → kubek wygląda identycznie mimo innej bazy money-page. Tylko desktop. */
@media (min-width: 761px) {
  .sn-mgx[data-cat="kubki-szklane"] .mgx__layer { background-size: auto 76%; background-position: calc(50% + 71px) calc(47% - 30px); }
}

/* Szklanki do drinków: rozmiar i umiejscowienie 1:1 z hero kategorii (auto 80%, 30px w górę).
 * Wartości bezwzględne jak .sn-hsx[data-cat="szklanki-do-drinkow"]. Tylko desktop. */
@media (min-width: 761px) {
  .sn-mgx[data-cat="szklanki-do-drinkow"] .mgx__layer { background-size: auto 80%; background-position: center calc(47% - 30px); }
}
/* Kubki ceramiczne: 1:1 z hero kategorii (auto 72%, +75px w prawo, 5px w górę). Tylko desktop. */
@media (min-width: 761px) {
  .sn-mgx[data-cat="kubki-ceramiczne"] .mgx__layer { background-size: auto 72%; background-position: calc(50% + 70px) calc(47% - 5px); }
}

@media (max-width: 760px) {
  /* kufel niski/szeroki — w scenie flow trochę mniejszy niż smukłe szkła, wyśrodkowany */
  .sn-mgx[data-cat="kufle-do-piwa"] .mgx__layer { background-size: auto 64%; background-position: center 50%; }
}
