/* Author: PixelShark.eu */
:root {
  --brand: #2F3735;
  --stone-0: #f7f5f1;
  --ink: #2F3735;
  --glass: rgba(255, 255, 255, .18);
  --stroke: rgba(47, 55, 53, .18);
  --radius: 18px;
  --shadow: 0 14px 40px rgba(47, 55, 53, .22);
  --header: 68px
}

* { box-sizing: border-box }
html, body { height: 100% }
body {
  margin: 0;
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Inter, Roboto, Arial, sans-serif;
  color: var(--ink);
  background: var(--stone-0);
  overflow-x: hidden;
}

img { max-width: 100%; display: block }
a { color: inherit; text-decoration: none }
button { font: inherit; color: inherit }
ul { list-style: none; margin: 0; padding: 0 }

.container { width: min(1160px, 92%); margin-inline: auto }

/* HEADER */
.site-header {
  position: fixed; inset: 0 0 auto 0; z-index: 100; height: var(--header);
  background: linear-gradient(180deg, rgba(255, 255, 255, .9), rgba(255, 255, 255, .6));
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(47, 55, 53, .08)
}
.head { height: 100%; display: flex; align-items: center; justify-content: space-between }
.brand { font-weight: 900; letter-spacing: .3px; color: var(--brand) }
.nav { position: relative }
.nav-list { display: flex; gap: .6rem; align-items: center }
.nav-link {
  display: inline-flex; gap: .45rem; align-items: center;
  background: transparent; border: 0; padding: .55rem .7rem; border-radius: 12px; color: var(--brand)
}
/* desktop hover/active (mobilnie wyłączymy niżej) */
.nav-link:hover, .nav-link.active { background: rgba(47, 55, 53, .08) }

.has-sub { position: relative }
.sub-toggle { display: inline-flex; gap: .45rem; align-items: center }
.chev { transition: transform .25s ease }
.has-sub.open .chev { transform: rotate(180deg) }

.sub {
  position: absolute; top: calc(100% + 8px); left: 0; min-width: 260px;
  background: #fff; border: 1px solid rgba(47, 55, 53, .12); border-radius: 14px;
  box-shadow: 0 18px 40px rgba(47, 55, 53, .18); padding: 8px; display: none; opacity: 0;
  transform: translateY(6px) scale(.98); pointer-events: none;
  transition: opacity .18s ease, transform .18s ease
}
.has-sub.open .sub { display: block; opacity: 1; transform: translateY(0) scale(1); pointer-events: auto }
.sub li+li { margin-top: 4px }
.sub-link { display: block; padding: 10px 12px; border-radius: 10px; color: var(--brand) }
.sub-link:hover { background: rgba(47, 55, 53, .06) }

/* Hamburger */
.nav-toggle {
  display: none; width: 44px; height: 44px; border: 1px solid var(--stroke);
  border-radius: 12px; background: #ffffffc8; position: relative; color: var(--brand);
  transition: background .25s ease; z-index: 140; /* nad panelem */
}
.nav-toggle span,
.nav-toggle span:before,
.nav-toggle span:after {
  content: ""; position: absolute; left: 9px; right: 9px; height: 2px;
  background: var(--brand); border-radius: 2px;
  transition: transform .3s ease, top .3s ease, background .2s ease
}
.nav-toggle span { top: 50%; transform: translateY(-50%) }
.nav-toggle span:before { top: -8px }
.nav-toggle span:after  { top: 8px }

/* STAN OTWARTY – nie chowamy pseudo-elementów, tylko środkową kreskę robimy przezroczystą */
.nav-toggle[aria-expanded="true"] { background: #fff }
.nav-toggle[aria-expanded="true"] span { background: transparent } /* środkowa kreska znika */
.nav-toggle[aria-expanded="true"] span:before { top: 0; transform: rotate(45deg) }
.nav-toggle[aria-expanded="true"] span:after  { top: 0; transform: rotate(-45deg) }

/* HERO + SLIDER */
.hero { position: relative; min-height: 100svh; display: grid; place-items: center; isolation: isolate }
.hero-media { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover }
.hero-shade { position: absolute; inset: 0; background:
  radial-gradient(900px 520px at 36% 30%, rgba(217, 195, 163, .16), transparent 60%),
  linear-gradient(180deg, rgba(70, 78, 76, .08), rgba(70, 78, 76, .28)) }

.hero-inner { position: relative; min-height: calc(100svh - var(--header)); display: grid; align-content: center }
.hero-copy { width: min(820px, 92%); display: grid; gap: 1rem; justify-items: start; align-items: center }
.h1 { font-size: clamp(2rem, 4.6vw, 3.6rem); line-height: 1.05; color: #fff; text-align: left }

.slider {
  width: min(720px, 92%); background: var(--glass); border: 1px solid rgba(47, 55, 53, .12);
  backdrop-filter: blur(8px); border-radius: var(--radius); padding: 1rem 1.2rem; position: relative
}
.slides { position: relative; height: 200px }
.slide { position: absolute; inset: 0; opacity: 0; pointer-events: none }
.slide.active { opacity: 1; pointer-events: auto }
.slide.in  { animation: fadeIn .7s cubic-bezier(.2, .8, .2, 1) forwards }
.slide.out { animation: fadeOut .6s cubic-bezier(.2, .8, .2, 1) forwards }
@keyframes fadeIn { from{opacity:0} to{opacity:1} }
@keyframes fadeOut { from{opacity:1} to{opacity:0} }

.slide-inner {
  position: absolute; inset: 0; display: grid; grid-template-rows: 1fr auto;
  align-content: center; justify-items: center; gap: .6rem; padding: .2rem .2rem 3.2rem .2rem;
  text-align: center
}
.slide h2 { margin: 0 0 .2rem 0; font-size: clamp(1.2rem, 2.6vw, 2rem); color: #fff }

/* CTA button */
.btn { display: inline-flex; align-items: center; gap: .5rem; justify-content: center;
  padding: .6rem 1.4rem; border-radius: 999px; font-weight: 600; transition: box-shadow .2s, background .2s, color .2s }
.btn.soft { background: #ffffffcc; color: #2F3735; border: 1px solid rgba(47, 55, 53, .12) }
.btn.soft:hover { box-shadow: 0 6px 18px rgba(47, 55, 53, .18) }
.btn-fixed { position: absolute; left: 50%; transform: translateX(-50%); bottom: 16px; min-width: 190px }

/* Slider controls */
.slider-controls {
  position: absolute; left: 0; right: 0; bottom: -56px;
  display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 10px
}
.ctrl {
  width: 42px; height: 42px; border-radius: 999px; border: 1px solid rgba(47, 55, 53, .18);
  background: #ffffffcc; color: #2F3735; display: grid; place-items: center; font-size: 1.05rem
}
.ctrl:hover { background: #fff }
.dots { display: flex; justify-content: center; gap: .4rem }
.dots button { width: 10px; height: 10px; border-radius: 999px; border: 0; background: #b9bebb }
.dots button[aria-pressed="true"] { width: 26px; border-radius: 8px; background: #2F3735 }

.split .word { display: inline-block; opacity: 0; transform: translateY(14px);
  transition: transform .6s ease, opacity .6s ease }
.split.ready .word { opacity: 1; transform: none }

/* Bottom bar */
.bottom-bar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 40;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0), rgba(255, 255, 255, .55));
  backdrop-filter: blur(6px); border-top: 1px solid rgba(47, 55, 53, .12)
}
.bottom-inner { height: 42px; display: flex; align-items: center; justify-content: space-between; gap: .8rem; font-size: .92rem; color: #2F3735 }
.bottom-nav { display: flex; gap: .6rem; align-items: center }
.bottom-nav a { opacity: .9 }
.bottom-nav a:hover { opacity: 1; text-decoration: underline }

/* ========================================================= */
/* =============== MENU – RESPONSYWNE POPRAWKI ============= */
/* ========================================================= */

/* MOBILE (<=960px) — ten sam UL jest panelem */
@media (max-width: 960px) {
  :root { --header: 62px }

  .nav > .nav-list {
    position: fixed;
    left: 0; right: 0; top: var(--header);
    z-index: 130;
    background: rgba(255,255,255,.96);
    backdrop-filter: blur(6px);
    box-shadow: 0 16px 40px rgba(47,55,53,.18) inset;
    /* ZMIANA: rozwijanie od GÓRY – animujemy wysokość zamiast przesuwania z dołu */
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    visibility: visible;            /* widoczny dla screen readerów */
    pointer-events: none;
    transition: max-height .35s cubic-bezier(.2,.8,.2,1), opacity .25s ease;
    display: flex;
    flex-direction: column;
    gap: 0;
    padding: 0;                     /* bez paddingu gdy zamknięte */
    border-top: 1px solid rgba(47,55,53,.12);
  }
  .nav > .nav-list.open {
    max-height: calc(100svh - var(--header));
    opacity: 1;
    pointer-events: auto;
    padding: 8px 0;                 /* pojawia się po otwarciu */
  }
  body.menu-open { overflow: hidden }

  /* ZMIANA: większy „X” (i hamburger) – ~2× */
  .nav-toggle { display: inline-block; width: 56px; height: 56px; border-radius: 22px }
  .nav-toggle span,
  .nav-toggle span:before,
  .nav-toggle span:after {
     height: 2px; /* grubsze i dłuższe linie */
  }
  .nav-toggle span:before { top: -10px }
  .nav-toggle span:after  { top: 10px }

  .nav > .nav-list li { position: relative }
  /* separator 90% szerokości */
  .nav > .nav-list li+li::before {
    content: ""; position: absolute; left: 5%; right: 5%; top: 0; height: 1px; background: rgba(47, 55, 53, .18)
  }

  .nav > .nav-list .nav-link { padding: 14px 18px; width: 100% }

  /* ZMIANA: brak podświetlenia aktywnej/hover w panelu mobilnym */
  .nav > .nav-list .nav-link:hover,
  .nav > .nav-list .nav-link.active {
    background: transparent;
  }

  /* Submenu jako akordeon */
  .nav > .nav-list .has-sub .sub {
    position: static; max-height: 0; overflow: hidden; opacity: 0; padding: 0;
    border: 0; border-radius: 0; box-shadow: none; background: transparent;
    transition: max-height .28s ease, opacity .22s ease
  }
  .nav > .nav-list .has-sub.open .sub { max-height: 320px; opacity: 1; padding: 6px 0 }
  .nav > .nav-list .sub-link { padding: 12px 18px }

  /* Hero/Slider drobne dostosowania */
  .hero-copy { width: 100% }
  .slider { width: calc(100% - 24px); margin-inline: 12px }
  .slides { height: 230px }
  .slide-inner { place-items: center; justify-items: center; text-align: center }
  .btn-fixed { left: 16px; right: 16px; transform: none; bottom: 14px; width: auto; justify-content: center }
  .slider-controls { position: static; margin-top: .6rem; grid-template-columns: auto 1fr auto }
  .ctrl { width: 44px; height: 44px }
}

/* DESKTOP (>=961px) — klasyczne dropdowny */
@media (min-width: 961px) {
  .nav > .nav-list { position: static; transform: none; visibility: visible; pointer-events: auto; flex-direction: row; background: transparent; height: auto; box-shadow: none }
}

/* Preferencje ruchu */
@media (prefers-reduced-motion:reduce) {
  * { scroll-behavior: auto }
  .btn, .split .word { transition: none }
}
