/* ================================================================
   chrome.css — wspólny nagłówek + stopka + beta-bar + menu mobilne.
   Jedno źródło prawdy dla nav/footer całego serwisu apparto.pl.
   Linkowany na każdej stronie PO inline <style>, więc nadpisuje dryf.
   Zmieniasz nav/stopkę? Zmieniasz TU raz. Zmienne :root per-strona.
   ================================================================ */

/* Waga 600 fontu Wix Madefor — brakująca na stronach-artykułach (blog, poradniki,
   wyjscie, centrum-pomocy…). Bez niej nav (font-weight:600) syntetyzuje faux-bold z 400,
   co daje inną czcionkę niż na stronach głównych. Ładowana z chrome.css = spójna wszędzie. */
@font-face {
  font-weight: 600;
  font-family: "Wix Madefor Display";
  src: url("fonts/wix-madefor-display-600.woff2") format("woff2");
  font-display: swap;
}

/* Globalny reset proporcji obrazków — przywrócony ze zniesionego per-stronowego inline.
   Bez tego <img> z atrybutami width/height + CSS width:100% trzyma wysokość z atrybutu
   (rozciągnięcie w pionie, np. mockupy w osi „Twój rok"). Wygrywa jako ostatni arkusz. */
img {
  height: auto;
}

.beta-bar {
  padding: 8px 0;
  color: #fff;
  font-size: 13px;
  line-height: 1.5;
  text-align: center;
  background: linear-gradient(135deg, #f97316 0%, #c2410c 100%);
}

.beta-bar a.container {
  display: block;
  color: #fff;
  text-decoration: none;
}

.beta-bar a.container:hover .arr {
  text-decoration: underline;
  text-underline-offset: 2px;
}

.beta-bar strong {
  font-weight: 700;
}

/* stylelint-disable-next-line no-descending-specificity -- osobny element, brak realnego konfliktu kaskady */
.beta-bar .arr {
  font-weight: 600;
  white-space: nowrap;
}

@media (max-width: 540px) {
  .beta-bar {
    padding: 7px 0;
    font-size: 12px;
  }
}

.nav {
  position: fixed;
  top: 0;
  right: 0;
  left: 0;
  z-index: 50;
  background: color-mix(in oklch, var(--bg) 80%, transparent);
  border-bottom: 1px solid color-mix(in oklch, var(--border) 60%, transparent);
  box-shadow: none;
  /* stylelint-disable-next-line property-no-vendor-prefix -- iOS Safari <18 wymaga prefiksu dla rozmycia nav */
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
}

.nav-row {
  display: flex;
  gap: 24px;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}

.brand {
  display: inline-flex;
  align-items: center;
  color: var(--ink);
  text-decoration: none;
}

.brand-logo {
  display: block;
  width: auto;
  height: 30px;
  color: var(--ink);
}

.nav-links {
  display: flex;
  gap: 28px;
  align-items: center;
  margin: 0;
  padding: 0;
  list-style: none;
}

.nav-links a {
  color: var(--text-2);
  font-weight: 600;
  font-size: 14px;
  text-decoration: none;
  transition: color 0.15s;
}

.nav-links a:hover {
  color: var(--ink);
}

.nav-links a[aria-current="page"],
.nav-links a.spy-active {
  color: var(--ink);
  font-weight: 600;
}

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

.nav-actions .btn {
  height: 40px;
  padding: 0 24px;
  font-size: 14px;
  border-radius: 18px;
}

@media (max-width: 880px) {
  .nav-links {
    display: none;
  }
}

@media (max-width: 540px) {
  .nav-row {
    height: 60px;
  }

  .nav-actions .btn-ghost {
    display: none;
  }

  .nav-actions .btn {
    height: 36px;
    padding: 0 20px;
    font-size: 13px;
    border-radius: 16px;
  }
}

.nav-dd {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.nav-dd-btn {
  display: inline-flex;
  gap: 5px;
  align-items: center;
  padding: 0;
  color: var(--text-2);
  font-weight: 600;
  font-size: 14px;
  font-family: var(--font);
  background: none;
  border: none;
  cursor: pointer;
  transition: color 0.15s;
}

.nav-dd-btn:hover,
.nav-dd:hover .nav-dd-btn,
.nav-dd:focus-within .nav-dd-btn {
  color: var(--ink);
}

.nav-dd-btn svg {
  transition: transform 0.2s ease;
}

.nav-dd:hover .nav-dd-btn svg,
.nav-dd:focus-within .nav-dd-btn svg {
  transform: rotate(180deg);
}

.nav-dd::after {
  position: absolute;
  top: 100%;
  right: -24px;
  left: -24px;
  height: 18px;
  content: "";
}

.nav-dd-menu {
  position: absolute;
  top: calc(100% + 14px);
  left: 50%;
  z-index: 60;
  min-width: 268px;
  padding: 8px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: 0 8px 30px rgb(15 14 26 / 10%), 0 1px 3px rgb(15 14 26 / 4%);
  transform: translateX(-50%) translateY(6px);
  visibility: hidden;
  opacity: 0;
  transition: opacity 0.18s ease, transform 0.18s ease;
}

.nav-dd:hover .nav-dd-menu,
.nav-dd:focus-within .nav-dd-menu {
  transform: translateX(-50%) translateY(0);
  visibility: visible;
  opacity: 1;
}

/* stylelint-disable-next-line no-descending-specificity -- osobny element, brak realnego konfliktu kaskady */
.nav-dd-menu a {
  display: block;
  padding: 10px 12px;
  color: var(--ink);
  font-weight: 600;
  font-size: 14px;
  text-decoration: none;
  border-radius: 10px;
}

.nav-dd-menu a span {
  display: block;
  margin-top: 2px;
  color: var(--text-3);
  font-weight: 400;
  font-size: 12px;
}

.nav-dd-menu a:hover {
  background: var(--bg-2);
}

.nav-burger {
  display: none;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  color: var(--ink);
  background: transparent;
  border: 1px solid var(--border-2);
  border-radius: 10px;
  cursor: pointer;
}

@media (max-width: 880px) {
  .nav-burger {
    display: inline-flex;
  }
}

.mobile-menu {
  position: fixed;
  z-index: 60;
  display: none;
  flex-direction: column;
  padding: 16px 24px;
  overflow-y: auto;
  background: var(--bg);
  inset: 0;
}

.mobile-menu.open {
  display: flex;
}

.mobile-menu .mm-head {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  height: 56px;
  margin-bottom: 8px;
}

.mobile-menu .mm-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  color: var(--ink);
  background: transparent;
  border: 1px solid var(--border-2);
  border-radius: 10px;
  cursor: pointer;
}

.mobile-menu a.mm-link {
  padding: 16px 0;
  color: var(--ink);
  font-weight: 700;
  font-size: 26px;
  letter-spacing: -0.025em;
  text-decoration: none;
  border-bottom: 1px solid var(--border);
}

.mobile-menu .mm-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: auto;
  padding: 24px 0;
}

.mobile-menu .mm-actions .btn {
  width: 100%;
}

.footer {
  padding: 64px 0 40px;
  background: var(--bg-2);
  border-top: 1px solid var(--border);
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr 1fr;
  gap: 32px;
  margin-bottom: 48px;
}

@media (max-width: 960px) {
  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 40px 32px;
  }
}

@media (max-width: 540px) {
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }
}

.footer-brand-block {
  max-width: 320px;
}

.footer-brand-block p {
  margin-top: 12px;
  color: var(--text-2);
  font-size: 14.5px;
  line-height: 1.55;
}

.footer-col h4 {
  margin-bottom: 16px;
  color: var(--text-3);
  font-weight: 600;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.footer-col ul {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

/* stylelint-disable-next-line no-descending-specificity -- osobny element, brak realnego konfliktu kaskady */
.footer-col a {
  color: var(--text-2);
  font-size: 14.5px;
  text-decoration: none;
}

.footer-col a:hover {
  color: var(--ink);
}

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: center;
  justify-content: space-between;
  padding-top: 28px;
  color: var(--text-3);
  font-size: 13px;
  border-top: 1px solid var(--border);
}

/* SCRUM-1372: badge App Store + Google Play w bloku marki stopki (pod opisem, bez osobnego paska/etykiety).
   Plik Google został przycięty do samego przycisku (usunięty wbudowany przezroczysty margines pionowy:
   250px→192px), dzięki czemu oba badge są „ciasne" jak Apple. Apple 44px, Google 43px — 1px mniej dla
   balansu wizualnego (Google jest szerszy). Assety oficjalne; przycięty tylko pusty margines, przycisk bez zmian. */
.footer-brand-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  margin-top: 20px;
}

/* stylelint-disable-next-line no-descending-specificity -- osobny element, brak konfliktu kaskady */
.footer-brand-badges a {
  display: inline-flex;
  border-radius: 10px;
  transition: transform 0.15s ease, opacity 0.15s ease;
}

.footer-brand-badges a:hover {
  transform: translateY(-1px);
  opacity: 0.88;
}

.footer-brand-badges a:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

.store-badge {
  display: block;
  width: auto;
}

.store-badge-apple {
  height: 44px;
}

.store-badge-google {
  height: 43px;
}

/* Liquid glass — wszystkie fioletowe primary CTA (hero, cennik, sticky, nav „Załóż wspólnotę") */
.btn-primary.brand {
  background:
    radial-gradient(57% 57% at 14% 16%, rgb(255 255 255 / 22%), rgb(255 255 255 / 0%) 100%),
    linear-gradient(180deg, rgb(255 255 255 / 10%), rgb(255 255 255 / 0%) 40%, rgb(0 0 0 / 10%) 100%),
    color-mix(in srgb, var(--primary) 85%, transparent);
  box-shadow:
    inset 6px 6px 2px -7px rgb(255 255 255 / 60%),
    inset 4px 4px 3px -4px rgb(255 255 255 / 28%),
    inset -4px -4px 4px -4px rgb(40 12 90 / 50%),
    inset 0 0 0 1.5px rgb(255 255 255 / 14%),
    inset 0 0 40px rgb(255 255 255 / 10%),
    0 12px 34px -8px color-mix(in oklch, var(--primary) 55%, transparent);
  /* stylelint-disable-next-line property-no-vendor-prefix -- iOS Safari <18 wymaga prefiksu dla backdrop-filter */
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
}

.btn-primary.brand:hover {
  background:
    radial-gradient(57% 57% at 14% 16%, rgb(255 255 255 / 26%), rgb(255 255 255 / 0%) 100%),
    linear-gradient(180deg, rgb(255 255 255 / 12%), rgb(255 255 255 / 0%) 40%, rgb(0 0 0 / 12%) 100%),
    color-mix(in srgb, var(--primary-600) 88%, transparent);
}
