/* ==========================================================================
   Moja Kuchnia 2.0 — base.css
   Wspólne elementy CAŁEJ witryny: tokeny, przyciski, nagłówek, stopka,
   ciemne hero podstron. Ładowany na stronie głównej ORAZ na podstronach
   (na podstronach zawsze PO styles.css, żeby nadpisywać stare style).
   ========================================================================== */

:root {
  /* paleta */
  --forest: #122b1d;
  --forest-2: #1a3a28;
  --forest-3: #0d2015;
  --green: #2f7d52;
  --green-strong: #215f3d;
  --cream: #faf5ea;
  --cream-2: #f2ebdb;
  --paper: #fffdf7;
  --saffron: #e8a13c;
  --saffron-deep: #c9822a;
  --paprika: #b6473e;
  --paprika-strong: #94372f;
  --ink: #1e2b21;
  --muted: #5f6e60;
  --muted-light: #b9c9bb;
  --line: #e3dcc9;
  --line-dark: rgba(250, 245, 234, 0.14);

  /* typografia */
  --font-display: "Fraunces", Georgia, "Times New Roman", serif;
  --font-body: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;

  /* geometria */
  --shell: 1180px;
  --r-xl: 30px;
  --r-lg: 22px;
  --r-md: 16px;
  --r-pill: 999px;
  --shadow-lg: 0 30px 70px rgba(18, 43, 29, 0.22);
  --shadow-md: 0 16px 40px rgba(18, 43, 29, 0.12);
  --shadow-sm: 0 8px 22px rgba(18, 43, 29, 0.08);

  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
}

/* ------------------------------ narzędzia ------------------------------ */
.shell { width: min(100% - 40px, var(--shell)); margin-inline: auto; }

.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.skip-link {
  position: absolute; left: 16px; top: -60px; z-index: 100;
  background: var(--ink); color: var(--cream);
  padding: 10px 16px; border-radius: 10px; text-decoration: none;
  transition: top 0.2s var(--ease-out);
}
.skip-link:focus { top: 12px; }

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

/* ------------------------------ przyciski ------------------------------ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  min-height: 46px; padding: 11px 20px;
  border-radius: var(--r-pill);
  border: 1.5px solid transparent;
  font-weight: 700; font-size: 0.98rem;
  text-decoration: none; cursor: pointer;
  transition: transform 0.22s var(--ease-out), box-shadow 0.22s var(--ease-out),
              background 0.22s var(--ease-out), border-color 0.22s var(--ease-out),
              color 0.22s var(--ease-out);
}
.btn:hover { transform: translateY(-2px); text-decoration: none; }
.btn:active { transform: translateY(0); }
.btn-lg { min-height: 54px; padding: 14px 26px; font-size: 1.04rem; }

.btn-saffron {
  background: var(--saffron); color: var(--forest-3);
  box-shadow: 0 12px 28px rgba(232, 161, 60, 0.32);
}
.btn-saffron:hover { background: #f0ad4d; box-shadow: 0 16px 34px rgba(232, 161, 60, 0.42); color: var(--forest-3); }

.btn-ghost { background: transparent; color: var(--cream); border-color: rgba(250, 245, 234, 0.36); }
.btn-ghost:hover { border-color: rgba(250, 245, 234, 0.7); background: rgba(250, 245, 234, 0.07); color: var(--cream); }

.btn-outline { background: var(--paper); color: var(--green-strong); border-color: var(--line); }
.btn-outline:hover { border-color: var(--green); }

.btn-forest { background: var(--forest); color: var(--cream); box-shadow: var(--shadow-md); }
.btn-forest:hover { background: var(--forest-2); color: var(--cream); }

.btn-danger { background: var(--paprika); color: #fff; }
.btn-danger:hover { background: var(--paprika-strong); color: #fff; }

/* ------------------------------ nagłówek ------------------------------ */
.site-top {
  position: fixed; inset: 0 0 auto; z-index: 60;
  transition: background 0.3s var(--ease-out), box-shadow 0.3s var(--ease-out),
              border-color 0.3s var(--ease-out);
  border-bottom: 1px solid transparent;
  --nav-fg: var(--cream);
  --nav-fg-soft: rgba(250, 245, 234, 0.72);
}
.site-top.is-scrolled {
  background: rgba(250, 245, 234, 0.88);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom-color: var(--line);
  --nav-fg: var(--ink);
  --nav-fg-soft: var(--muted);
}

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

.site-top .brand { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; color: var(--nav-fg); font-weight: 400; }
.site-top .brand:hover { text-decoration: none; }
.logo-mark {
  display: grid; place-items: center;
  width: 44px; height: 44px; border-radius: 14px;
  background: linear-gradient(135deg, var(--green), #6db584);
  color: #fff; font-weight: 800; font-size: 0.95rem;
  box-shadow: 0 10px 22px rgba(47, 125, 82, 0.35);
}
.site-top .brand-text { display: flex; flex-direction: column; line-height: 1.12; }
.site-top .brand-name { font-weight: 800; letter-spacing: -0.02em; font-size: 1.05rem; }
.brand-ver { color: var(--saffron); }
.site-top .brand-sub { font-size: 0.72rem; font-weight: 600; color: var(--nav-fg-soft); }

.top-links { display: flex; align-items: center; gap: 4px; }
.top-links a {
  color: var(--nav-fg-soft);
  font-weight: 650; font-size: 0.95rem;
  padding: 9px 13px; border-radius: var(--r-pill);
  text-decoration: none;
  transition: color 0.2s, background 0.2s;
}
.top-links a:hover { color: var(--nav-fg); text-decoration: none; }
.top-links a.is-active,
.top-links a[aria-current="page"] { color: var(--nav-fg); background: rgba(127, 127, 127, 0.14); }

.nav-actions { display: flex; align-items: center; gap: 12px; }
.btn-nav { min-height: 42px; padding: 9px 18px; }

.nav-burger {
  display: none;
  width: 44px; height: 44px;
  border: 1.5px solid rgba(127, 127, 127, 0.35);
  background: transparent; border-radius: 12px;
  cursor: pointer; position: relative;
}
.burger-lines, .burger-lines::before, .burger-lines::after {
  content: ""; position: absolute; left: 11px; right: 11px; height: 2px;
  background: var(--nav-fg); border-radius: 2px;
  transition: transform 0.25s var(--ease-out), opacity 0.2s;
}
.burger-lines { top: 50%; margin-top: -1px; }
.burger-lines::before { top: -7px; left: 0; right: 0; }
.burger-lines::after { top: 7px; left: 0; right: 0; }
.nav-burger[aria-expanded="true"] .burger-lines { transform: rotate(45deg); }
.nav-burger[aria-expanded="true"] .burger-lines::before { transform: translateY(7px) rotate(-90deg); }
.nav-burger[aria-expanded="true"] .burger-lines::after { opacity: 0; }

.mobile-menu {
  display: none;
  background: var(--forest);
  border-top: 1px solid var(--line-dark);
  padding: 18px 24px 26px;
  max-height: calc(100vh - 78px);
  overflow-y: auto;
}
.mobile-menu.is-open { display: block; }
.mobile-menu nav { display: flex; flex-direction: column; gap: 2px; }
.mobile-menu a {
  color: var(--cream); text-decoration: none;
  font-weight: 650; font-size: 1.08rem;
  padding: 11px 6px; border-radius: 10px;
}
.mobile-menu a:hover { background: rgba(250, 245, 234, 0.08); text-decoration: none; }
.mobile-menu-legal {
  display: flex; flex-direction: column; gap: 2px;
  margin-top: 14px; padding-top: 14px;
  border-top: 1px solid var(--line-dark);
}
.mobile-menu-legal a { font-size: 0.95rem; font-weight: 500; color: var(--muted-light); }

body.menu-open { overflow: hidden; }

/* ------------------------------ ciemne hero podstron ------------------------------ */
.page-hero,
.download-hero {
  position: relative;
  background:
    radial-gradient(46rem 26rem at 85% -20%, rgba(47, 125, 82, 0.5), transparent 60%),
    radial-gradient(36rem 22rem at -6% 120%, rgba(232, 161, 60, 0.12), transparent 55%),
    linear-gradient(178deg, var(--forest-3), var(--forest) 55%, var(--forest-2));
  color: var(--cream);
  padding: clamp(132px, 15vh, 172px) 0 clamp(46px, 6vw, 68px);
  overflow: hidden;
}
.download-hero { padding-bottom: clamp(58px, 7vw, 88px); }

.page-hero .eyebrow,
.download-hero .eyebrow {
  background: none; border: 0; padding: 0;
  color: var(--saffron);
  font-size: 0.82rem; font-weight: 750;
  letter-spacing: 0.16em; text-transform: uppercase;
}
.page-hero h1,
.download-hero h1 {
  color: var(--cream);
  font-family: var(--font-display); font-weight: 560;
  font-size: clamp(2.15rem, 4.4vw, 3.5rem);
  line-height: 1.08; letter-spacing: -0.015em;
  max-width: 22ch;
}
.page-hero .lead,
.download-hero .lead { color: rgba(250, 245, 234, 0.78); }

/* elementy strony Pobierz na ciemnym tle */
.download-hero .download-status {
  background: rgba(250, 245, 234, 0.08);
  border-color: rgba(250, 245, 234, 0.24);
  color: rgba(250, 245, 234, 0.9);
}
.download-hero .store-placeholder,
.download-hero .store-link {
  background: var(--cream);
  color: var(--forest-3);
  box-shadow: var(--shadow-md);
}
.download-hero .store-placeholder-icon { color: var(--green-strong); }
.download-hero .btn-secondary { background: transparent; color: var(--cream); border-color: rgba(250, 245, 234, 0.36); }
.download-hero .btn-secondary:hover { border-color: rgba(250, 245, 234, 0.7); background: rgba(250, 245, 234, 0.07); color: var(--cream); }

/* przyciski w hero 404 */
.page-hero .btn-secondary { background: transparent; color: var(--cream); border-color: rgba(250, 245, 234, 0.36); }
.page-hero .btn-secondary:hover { border-color: rgba(250, 245, 234, 0.7); background: rgba(250, 245, 234, 0.07); color: var(--cream); }

/* ------------------------------ stopka ------------------------------ */
.site-footer {
  background: var(--forest-3);
  color: var(--cream);
  padding: 70px 0 34px;
  border-top: 0;
}
.footer-main {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 36px;
  padding-bottom: 44px;
  border-bottom: 1px solid var(--line-dark);
}
.footer-brand p { color: var(--muted-light); font-size: 0.93rem; max-width: 34ch; margin-top: 16px; }
.footer-email { color: var(--saffron); font-weight: 700; text-decoration: none; font-size: 0.95rem; }
.footer-email:hover { text-decoration: underline; }

.site-footer .brand { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; color: var(--cream); }
.site-footer .brand-text { display: flex; flex-direction: column; line-height: 1.12; }
.site-footer .brand-name { font-weight: 800; letter-spacing: -0.02em; font-size: 1.05rem; }
.site-footer .brand-sub { font-size: 0.72rem; font-weight: 600; color: var(--muted-light); }

.footer-col { display: flex; flex-direction: column; gap: 10px; }
.footer-col strong {
  font-size: 0.8rem; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--muted-light); margin-bottom: 6px;
}
.footer-col a { color: rgba(250, 245, 234, 0.85); text-decoration: none; font-size: 0.95rem; }
.footer-col a:hover { color: var(--saffron); text-decoration: none; }

.footer-bottom {
  display: flex; flex-wrap: wrap; gap: 12px;
  justify-content: space-between;
  padding-top: 26px;
  border-top: 0;
  color: var(--muted-light); font-size: 0.87rem;
}
.footer-bottom a { color: var(--cream); }

/* ------------------------------ responsywność ------------------------------ */
@media (max-width: 1060px) {
  .top-links { display: none; }
  .nav-burger { display: block; }
  .footer-main { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 780px) {
  .footer-main { grid-template-columns: 1fr; gap: 28px; }
  .footer-bottom { flex-direction: column; }
}

/* ------------------------------ dostępność: ruch ------------------------------ */
@media (prefers-reduced-motion: reduce) {
  .site-top, .btn, .skip-link, .burger-lines,
  .burger-lines::before, .burger-lines::after { transition: none; }
}
