/* ==========================================================================
   Beskid Calm — base: reset, typografia, layout-chrome (header/nav/footer)
   Źródło wzorców: demo/index.html (CSS:54-420, markup header/footer).
   CSP-safe: zero inline; interakcje w js/site.js (delegacja).
   ========================================================================== */

*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    transition: none !important;
    animation: none !important;
  }
}

body {
  font-family: var(--font-body);
  background: var(--paper);
  color: var(--ink);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3,
h4 {
  font-family: var(--font-head);
  font-weight: 700;
  line-height: 1.2;
  color: var(--ink);
}

img {
  display: block;
  max-width: 100%;
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
  color: inherit;
}

a {
  color: inherit;
}

:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

/* ---------- Layout ---------- */
.wrap,
.container {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 20px;
}

.container--narrow {
  max-width: 720px;
}

.section {
  padding: 64px 0;
}

@media (max-width: 560px) {
  .section {
    padding: 44px 0;
  }
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* ---------- Typografia pomocnicza ---------- */
.eyebrow {
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--green-dark);
}

.lead {
  font-size: 1.08rem;
  color: var(--lead);
}

.muted-note {
  color: var(--muted);
}

.form--inline {
  display: inline;
}

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--header-bg);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

/* Logo powiekszone o 30% wzgl. poprzedniego stanu (45.6px -> 59.28px); wczesniej +20% (38 -> 45.6) */
.logo img {
  height: 59.28px;
  width: auto;
}

.logo-name {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 1rem;
  color: var(--green-dark);
}

/* Logo: dwa warianty (sygnet zielony w obu, zmienia sie kolor napisu).
   Wariant wybierany po TLE, na ktorym logo lezy:
   -on-light-bg = czarny napis, -on-dark-bg = bialy napis. */
.logo-img--on-light-bg {
  display: block;
}

.logo-img--on-dark-bg {
  display: none;
}

/* Header ma tlo zalezne od motywu -> podmiana wariantu po [data-theme] */
[data-theme="dark"] .site-header .logo-img--on-light-bg {
  display: none;
}

[data-theme="dark"] .site-header .logo-img--on-dark-bg {
  display: block;
}

.nav {
  display: flex;
  gap: 8px;
  align-items: center;
}

.nav a,
.nav button {
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 0.85rem;
  color: var(--ink);
  padding: 8px 14px;
  border-radius: var(--radius-md);
  transition: background 0.2s, color 0.2s;
  text-decoration: none;
}

.nav a:hover,
.nav button:hover {
  background: var(--green);
  color: var(--white);
}

.nav .nav__cta {
  background: var(--green-dark);
  color: var(--white);
}

.nav .nav__cta:hover {
  background: #33463a;
}

.nav__user {
  font-size: 0.85rem;
  color: var(--muted);
  padding: 0 6px;
}

.theme-toggle {
  font-size: 1.05rem;
  line-height: 1;
  padding: 6px 10px;
  border-radius: var(--radius-md);
  border: 1px solid var(--lead);
  min-width: 44px;
  min-height: 44px;
}

.theme-toggle:hover {
  background: var(--green);
  color: var(--white);
}

.nav-toggle {
  display: none;
  font-size: 1.35rem;
  line-height: 1;
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  color: var(--ink);
  background: transparent;
}

.nav-toggle:hover {
  background: var(--green);
  color: var(--white);
}

@media (max-width: 760px) {
  .nav-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    min-height: 44px;
  }
  .nav {
    position: fixed;
    top: 68px;
    left: 0;
    right: 0;
    background: var(--paper);
    border-bottom: 1px solid var(--line);
    flex-direction: column;
    align-items: stretch;
    padding: 12px 20px 20px;
    gap: 4px;
    display: none;
    z-index: 60;
    box-shadow: var(--shadow-soft);
  }
  .nav.mobile-open {
    display: flex;
  }
  .nav a,
  .nav button {
    width: 100%;
    text-align: left;
    padding: 14px 12px;
    font-size: 1.05rem;
    border-radius: var(--radius-md);
  }
  .nav .theme-toggle {
    width: auto;
    margin-top: 6px;
  }
  .nav .form--inline {
    display: block;
  }
  .logo-name {
    display: none;
  }

}

/* ---------- Footer ---------- */
.site-footer {
  background: #22301f;
  color: #d7ddd4;
  padding: 44px 0 32px;
  margin-top: 64px;
}

[data-theme="dark"] .site-footer {
  background: #0d120c;
  color: #cfd8cb;
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 24px;
  flex-wrap: wrap;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* Logo w stopce powiekszone o 20% (36px -> 43.2px) */
.footer-brand img {
  height: 43.2px;
  width: auto;
}

.footer-brand__name {
  font-family: var(--font-head);
  font-weight: 700;
  color: #fff;
}

.footer-locs {
  font-size: 0.85rem;
  margin-top: 10px;
  color: #b6c0b2;
}

.footer-locs a {
  color: #d7ddd4;
  text-decoration: none;
}

.footer-locs a:hover {
  color: #fff;
}

/* Social media w stopce (FB + IG) */
.footer-social {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
  list-style: none;
  margin: 16px 0 0;
  padding: 0;
}

.footer-social a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  font-weight: 500;
  color: #d7ddd4;
  text-decoration: none;
}

.footer-social a:hover {
  color: #fff;
}

.footer-social svg {
  flex: none;
}

.footer-nav {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
}

.footer-nav a {
  font-size: 0.88rem;
  text-decoration: none;
  color: #d7ddd4;
  font-weight: 500;
}

.footer-nav a:hover {
  color: #fff;
}

.footer-copy {
  margin-top: 28px;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.15);
  font-size: 0.8rem;
  color: #a9b4a6;
}


/* ---------- Stopka: kolumna z nawigacja + konto uzytkownika ----------
   Konto przeniesione z naglowka 2026-09-15; przelacznik jezyka zostaje w naglowku. */
.footer-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 16px;
}

.footer-utility {
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
}

.footer-utility a,
.footer-utility .footer-linklike {
  font-size: 0.88rem;
  font-weight: 500;
  color: #d7ddd4;
  text-decoration: none;
}

.footer-utility a:hover,
.footer-utility .footer-linklike:hover {
  color: #fff;
}

.footer-user {
  font-size: 0.85rem;
  color: #b6c0b2;
}

.footer-linklike {
  background: none;
  border: 0;
  padding: 0;
  margin: 0;
  font: inherit;
  cursor: pointer;
}

/* ---------- Stopka na mobile ----------
   Reguly MUSZA byc na koncu pliku: przy rownej specyficznosci
   wygrywa pozniejsza regula, a bazowe .footer-inner (display:flex,
   align-items:flex-start) jest wyzej w pliku. */
@media (max-width: 760px) {
  .footer-inner {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .footer-brand,
  .footer-social,
  .footer-nav {
    justify-content: center;
  }

  .footer-right {
    align-items: center;
  }

  .footer-utility {
    justify-content: center;
  }

  .footer-locs,
  .footer-copy {
    text-align: center;
  }

  /* Wieksze pole dotyku dla linkow social (WCAG 44px) */
  .footer-social a {
    min-height: 44px;
    padding: 4px 2px;
  }
}
