/* 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; }

/* --- 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);
}
