/* Mandroya Senses - drobne style spinajace pre-renderowany HTML.
   Wieksza czesc wygladu pochodzi z tokenow Design Systemu i inline-styli
   z Claude Design; tu tylko: menu mobilne, dostepnosc focusa, [hidden]. */

[hidden] { display: none !important; }

/* Animacje wejscia sekcji (ms-anim). Progressive enhancement: tylko gdy JS
   wlaczony (html.ms-js) sekcje startuja ukryte i pojawiaja sie przy wejsciu w
   widok (klasa is-in dodawana przez IntersectionObserver w mandroya.js). Bez JS
   / dla crawlerow: brak html.ms-js -> tresc od razu widoczna w HTML. */
html.ms-js .ms-anim {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 1.4s var(--ease-out-soft, ease), transform 1.4s var(--ease-out-soft, ease);
  will-change: opacity, transform;
}
html.ms-js .ms-anim.is-in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html.ms-js .ms-anim { opacity: 1; transform: none; transition: none; }
}

/* Neutralizacja starego mechanizmu .reveal z designu (gdyby jakis element
   zachowal klase) - zawsze widoczny; animacje przejmuje ms-anim. */
.reveal { opacity: 1 !important; transform: none !important; }

/* Stopka: linki + przyciski social (klasy wstrzykiwane w build.mjs) */
.ms-foot-link { color: var(--warm-050); text-decoration: none; transition: opacity 0.2s ease; }
.ms-foot-link:hover, .ms-foot-link:focus-visible { opacity: 1 !important; text-decoration: underline; }
.ms-foot-social { transition: opacity 0.2s ease, background 0.2s ease; }
.ms-foot-social:hover, .ms-foot-social:focus-visible { opacity: 1 !important; background: rgba(255, 255, 255, 0.2) !important; }

/* === Mikroanimacje strony glownej === */

/* Kaskada: elementy .ms-rise wjezdzaja po kolei, gdy kontener .ms-stagger
   wchodzi w widok (opoznienia ustawia JS). transform (reveal) i translate
   (hover) to osobne wlasciwosci - nie koliduja. Wspolna transition, zeby
   element z .ms-rise i .ms-lift nie gubil zadnego przejscia. */
html.ms-js .ms-rise { opacity: 0; transform: translateY(20px); }
html.ms-js .ms-stagger.is-in .ms-rise { opacity: 1; transform: none; }
html.ms-js .ms-rise,
.ms-lift {
  transition: opacity 1s var(--ease-out-soft, ease), transform 1s var(--ease-out-soft, ease),
              translate 0.35s var(--ease-out-soft, ease), box-shadow 0.35s ease;
}

/* Hover-lift na kartach */
.ms-lift:hover { translate: 0 -4px; box-shadow: var(--shadow-lg); }

/* Hover na przyciskach CTA */
.ms-btn { transition: translate 0.2s var(--ease-out-soft, ease), filter 0.2s ease, box-shadow 0.2s ease; }
.ms-btn:hover { translate: 0 -1px; filter: brightness(1.04); }

/* Numer kroku (1/2/3) - delikatny pop tuz po odsloni karty */
html.ms-js .ms-rise .ms-step-num {
  transform: scale(0.55); opacity: 0;
  transition: transform 0.6s var(--ease-out-soft, ease) 0.22s, opacity 0.6s ease 0.22s;
}
html.ms-js .ms-stagger.is-in .ms-rise .ms-step-num { transform: none; opacity: 1; }

/* Cennik - crossfade cen przy przelaczaniu + przelacznik */
.ms-price-cell { transition: opacity 0.18s ease; }
.ms-toggle-btn { transition: background 0.25s ease, color 0.25s ease, box-shadow 0.25s ease; }

/* Sticky header - delikatny cien po zjechaniu w dol */
header { transition: box-shadow 0.3s ease; }
header.ms-scrolled { box-shadow: 0 4px 20px rgba(28, 43, 30, 0.08); }

@media (prefers-reduced-motion: reduce) {
  html.ms-js .ms-rise,
  html.ms-js .ms-rise .ms-step-num { opacity: 1; transform: none; transition: none; }
  .ms-lift:hover, .ms-btn:hover { translate: none; }
}

/* --- Menu mobilne (drawer) --- */
.ms-drawer {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: flex;
  justify-content: flex-end;
  background: rgba(28, 43, 30, 0.45);
  backdrop-filter: blur(3px);
  opacity: 0;
  transition: opacity var(--dur-base, 220ms) var(--ease-calm, ease);
}
.ms-drawer.is-open { opacity: 1; }
.ms-drawer__panel {
  width: min(82vw, 340px);
  height: 100%;
  background: var(--bg-surface, #fff);
  box-shadow: var(--shadow-lg);
  display: flex;
  flex-direction: column;
  transform: translateX(16px);
  transition: transform var(--dur-base, 220ms) var(--ease-out-soft, ease);
}
.ms-drawer.is-open .ms-drawer__panel { transform: none; }
.ms-drawer__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 18px;
  border-bottom: 1px solid var(--border-soft);
}
.ms-drawer__head button {
  width: 40px;
  height: 40px;
  border: none;
  border-radius: var(--radius-md);
  background: var(--bg-page);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.ms-drawer nav {
  display: flex;
  flex-direction: column;
  padding: 10px 12px;
  gap: 2px;
  overflow-y: auto;
}
.ms-drawer nav a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 15px 14px;
  min-height: 50px;
  border-radius: var(--radius-md);
  font-size: 16.5px;
  font-weight: 500;
  color: var(--text-strong);
  text-decoration: none;
}
.ms-drawer nav a:hover { background: var(--green-050); }

/* --- Dostepnosc: widoczny focus na klawiaturze --- */
a:focus-visible,
button:focus-visible {
  outline: none;
  box-shadow: var(--shadow-focus, 0 0 0 3px rgba(74, 140, 87, 0.45));
  border-radius: var(--radius-sm, 6px);
}

/* --- Panel zgod na pliki cookies (consent.js) ---------------------------
   Baner pojawia sie tylko wtedy, gdy jest o co pytac - patrz komentarz
   na gorze assets/js/consent.js. Styl celowo taki sam jak reszta strony:
   tokeny DS, mobile-first, przyciski rownorzedne. */
.msc {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 70;
  padding: 12px;
  display: flex;
  justify-content: center;
  opacity: 0;
  transform: translateY(12px);
  transition: opacity var(--dur-base, 220ms) var(--ease-out-soft, ease),
              transform var(--dur-base, 220ms) var(--ease-out-soft, ease);
}
.msc.is-open { opacity: 1; transform: none; }
.msc__box {
  width: 100%;
  max-width: 560px;
  max-height: calc(100vh - 24px);
  overflow-y: auto;
  background: var(--bg-surface, #fff);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
  padding: clamp(18px, 4vw, 26px);
}
.msc__h {
  font-size: clamp(17px, 2.4vw, 20px);
  font-weight: 600;
  color: var(--text-strong);
  margin: 0 0 8px;
  letter-spacing: var(--ls-heading);
}
.msc__p {
  font-size: 14.5px;
  font-weight: 300;
  line-height: 1.55;
  color: var(--text-muted);
  margin: 0 0 16px;
}
.msc__p a { color: var(--text-brand); }
.msc__btns { display: flex; flex-wrap: wrap; gap: 10px; }
/* Obie decyzje maja identyczna wage wizualna - "Akceptuje" nie moze byc
   latwiejsze do klikniecia niz "Tylko niezbedne". */
.msc__btn {
  flex: 1 1 200px;
  min-height: 46px;
  padding: 0 18px;
  border-radius: var(--radius-md);
  font-family: var(--font-sans);
  font-size: 14.5px;
  font-weight: 600;
  cursor: pointer;
}
.msc__btn--solid {
  border: 1px solid var(--green-600);
  background: var(--green-600);
  color: var(--text-on-green, #fff);
}
.msc__btn--solid:hover { filter: brightness(1.05); }
.msc__link {
  display: block;
  margin: 12px auto 0;
  border: 0;
  background: none;
  padding: 4px;
  font-family: var(--font-sans);
  font-size: 13.5px;
  color: var(--text-subtle);
  text-decoration: underline;
  cursor: pointer;
}
.msc__link:hover { color: var(--text-brand); }
.msc__cats { margin: 0 0 18px; }
.msc__cat + .msc__cat { margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--border-soft); }
.msc__catHead { display: flex; align-items: center; gap: 10px; cursor: pointer; }
.msc__catHead input { width: 18px; height: 18px; flex: 0 0 auto; accent-color: var(--green-600); }
.msc__catHead input:disabled { cursor: default; }
.msc__catName { font-size: 15px; font-weight: 600; color: var(--text-strong); }
.msc__catDesc {
  font-size: 13.5px;
  font-weight: 300;
  line-height: 1.5;
  color: var(--text-muted);
  margin: 6px 0 0 28px;
}
@media (prefers-reduced-motion: reduce) {
  .msc { transition: none; transform: none; }
}
