/* Vars */
:root {
  --bg: #F1F4EE;
  --surface: #FBFCF9;
  --text: #1C2A20;
  --muted: #4E5E52;
  --accent: #2F6B45;
  --accentText: #F1F4EE;
  --plateBg: #1C2A20;
  --plateText: #F1F4EE;
  --line: #C9D3C6;
  --fontBody: 'Avenir Next', Avenir, 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
  --radiusCard: 20px;
  --radiusBtn: 999px;
  --shadowSoft: 0 1px 2px rgb(0 0 0 / .06), 0 12px 32px rgb(0 0 0 / .08);
  --padSide: clamp(20px, 4vw, 40px);
  --gapSec: clamp(64px, 9vw, 128px);
}

/* Base */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--fontBody);
  font-size: clamp(1rem, 0.96rem + 0.2vw, 1.125rem);
  line-height: 1.65;
  color: var(--text);
  background-color: var(--bg);
  background-image: radial-gradient(var(--accent) 3px, transparent 3.5px);
  background-size: 34px 34px;
  background-position: 0 0;
}
body::before {
  content: "";
  position: fixed;
  inset: 0;
  background: radial-gradient(ellipse at 20% 0%, rgba(251,252,249,.88), rgba(251,252,249,.55) 60%, rgba(251,252,249,.25));
  pointer-events: none;
  z-index: -1;
}
img { max-width: 100%; height: auto; display: block; object-fit: cover; }
h1, h2, h3, h4 { font-weight: 700; line-height: 1.15; letter-spacing: -0.01em; }
h1 { font-size: clamp(2.5rem, 5vw + 0.5rem, 4rem); line-height: 1.05; letter-spacing: -0.02em; text-wrap: balance; }
h2 { font-size: clamp(1.8rem, 2.6vw + 0.8rem, 3rem); line-height: 1.15; }
h3 { font-size: clamp(1.2rem, 1rem + 0.6vw, 1.5rem); }
p { max-width: 68ch; }
a { color: var(--accent); text-underline-offset: 3px; }
.wrap { max-width: 1200px; margin: 0 auto; padding: 0 var(--padSide); }
.wrapNarrow { max-width: 760px; }
.block { padding: clamp(56px, 7vw, 96px) 0; }
.secLead { color: var(--muted); margin: 16px 0 32px; line-height: 1.6; }
.secTitle { margin: 0 0 16px; }
.accentText {
  font-size: clamp(1.6rem, 1.2rem + 2.4vw, 3.4rem);
  font-weight: 700;
  line-height: 1.2;
  color: var(--accent);
}
.skipPath {
  position: absolute;
  left: -9999px;
  top: 8px;
  background: var(--plateBg);
  color: var(--plateText);
  padding: 10px 20px;
  border-radius: var(--radiusBtn);
  z-index: 200;
}
.skipPath:focus { left: 8px; }

/* Header */
.topBar {
  position: fixed;
  top: 12px;
  left: 50%;
  transform: translateX(-50%);
  width: min(1080px, calc(100% - 24px));
  z-index: 120;
}
.topBarInner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radiusBtn);
  box-shadow: var(--shadowSoft);
  padding: 8px 12px;
  min-height: 64px;
}
.brandMark {
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--text);
  text-decoration: none;
}
.brandMark:hover { color: var(--accent); }
.menuBtn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: inherit;
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
  background: transparent;
  border: 1px solid var(--line);
  border-radius: var(--radiusBtn);
  padding: 14px 22px;
  min-height: 48px;
  cursor: pointer;
}
.menuBtnBox, .menuBtnBox::before, .menuBtnBox::after {
  width: 20px; height: 2px;
  background: var(--text);
  content: "";
  display: block;
  position: relative;
}
.menuBtnBox::before { position: absolute; top: -6px; }
.menuBtnBox::after { position: absolute; top: 6px; }
.menuBtn:hover { background: var(--text); color: var(--bg); }
.menuBtn:hover .menuBtnBox, .menuBtn:hover .menuBtnBox::before, .menuBtn:hover .menuBtnBox::after { background: var(--bg); }
.menuBtn:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.menuBtn:active { transform: scale(.96); }
.isOpen .menuBtnBox { background: transparent; }
.isOpen .menuBtnBox::before { transform: translateY(6px) rotate(45deg); }
.isOpen .menuBtnBox::after { transform: translateY(-6px) rotate(-45deg); }

/* Menu overlay */
.menuOverlay {
  position: fixed;
  inset: 0;
  background: var(--plateBg);
  color: var(--plateText);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 32px;
  padding: 96px var(--padSide) 48px;
  z-index: 110;
  opacity: 0;
  visibility: hidden;
  transition: opacity .25s ease, visibility .25s ease;
}
.menuOverlay.isOpen { opacity: 1; visibility: visible; }
.menuList { list-style: none; margin: 0; padding: 0; text-align: center; }
.menuList li { margin: 4px 0; }
.menuLink {
  display: inline-block;
  color: var(--plateText);
  text-decoration: none;
  font-size: clamp(1.5rem, 2.4vw + 1rem, 2.4rem);
  font-weight: 700;
  padding: 8px 16px;
  opacity: 0;
  transform: translateY(16px);
  transition: opacity .35s ease, transform .35s ease, color .2s ease;
}
.menuOverlay.isOpen .menuLink { opacity: 1; transform: translateY(0); }
.menuOverlay.isOpen .menuList li:nth-child(1) .menuLink { transition-delay: .05s; }
.menuOverlay.isOpen .menuList li:nth-child(2) .menuLink { transition-delay: .12s; }
.menuOverlay.isOpen .menuList li:nth-child(3) .menuLink { transition-delay: .19s; }
.menuOverlay.isOpen .menuList li:nth-child(4) .menuLink { transition-delay: .26s; }
.menuOverlay.isOpen .menuList li:nth-child(5) .menuLink { transition-delay: .33s; }
.menuLink:hover { color: var(--line); }
.menuLink:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 8px; }
.menuLink[aria-current="page"] { text-decoration: underline; text-underline-offset: 8px; }
.menuContacts { text-align: center; font-size: 1rem; }
.menuContacts ul { list-style: none; margin: 0; padding: 0; }
.menuContacts li { margin: 6px 0; }
.menuContacts span { color: var(--line); margin-right: 8px; }
.menuContacts a { color: var(--plateText); }

/* Buttons */
.pillBtn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 14px 28px;
  border-radius: var(--radiusBtn);
  border: 2px solid var(--text);
  background: transparent;
  color: var(--text);
  font-family: inherit;
  font-size: 1rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: background-color .2s ease, color .2s ease, transform .15s ease;
}
.pillBtn:hover { background: var(--text); color: var(--bg); }
.pillBtn:focus-visible { outline: 4px solid var(--accent); outline-offset: 3px; }
.pillBtn:active { transform: scale(.95); }
.pillBtnDark { border-color: var(--plateBg); color: var(--plateBg); }
.pillBtnDark:hover { background: var(--plateBg); color: var(--plateText); }

/* Hero */
#hero { padding-top: calc(var(--gapSec) + 40px); }
.heroLayout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 40px;
  align-items: center;
}
@media (min-width: 768px) {
  .heroLayout .heroCopy { max-width: 55%; }
}
.heroCopy > h1 { margin: 0 0 20px; line-height: 1.15; }
.heroCopy > h1 span { display: block; line-height: 1.15; padding: 1px 0; }
.heroCopy > h1 span:nth-child(1) { animation: lineUp .5s ease both; }
.heroCopy > h1 span:nth-child(2) { animation: lineUp .5s ease .15s both; }
.heroCopy > h1 span:nth-child(3) { animation: lineUp .5s ease .3s both; }
@keyframes lineUp {
  from { opacity: .4; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}
.heroLead { font-size: 1.1rem; color: var(--muted); margin: 0 0 28px; }
.heroCollage {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 16px;
  align-items: start;
  max-width: 560px;
}
.collageMain { aspect-ratio: 1 / 1; width: 100%; }
.collageSide { aspect-ratio: 3 / 4; width: 100%; max-height: 520px; object-fit: cover; }
.collageMain, .collageSide {
  border: 1px solid var(--line);
  border-radius: 0;
  background: var(--surface);
}

/* Stats plate */
.statsBar {
  display: flex;
  flex-wrap: wrap;
  gap: 24px 48px;
  align-items: center;
}
.statsBar .statItem { display: flex; align-items: baseline; gap: 12px; }
.statNum { font-size: clamp(2rem, 1.6rem + 2vw, 3.2rem); font-weight: 700; color: var(--accent); line-height: 1; }
.statLabel { color: var(--muted); }

/* Cards */
div:has(> .tileCard) {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
  grid-auto-rows: 1fr;
}
.tileCard {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radiusCard);
  box-shadow: var(--shadowSoft);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform .25s ease, box-shadow .25s ease;
}
.tileCard:hover { transform: translateY(-6px); box-shadow: 0 2px 4px rgb(0 0 0 / .07), 0 18px 40px rgb(0 0 0 / .12); }
.tileCard img { aspect-ratio: 4 / 3; width: 100%; border-bottom: 1px solid var(--line); }
.cardBody { padding: 24px 28px 28px; display: flex; flex-direction: column; gap: 12px; flex: 1; }
.cardBody p { margin: 0; color: var(--muted); max-width: 56ch; line-height: 1.6; }
.cardBody h3 { margin: 0; }

/* Package switch */
.packSwitch {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 8px 0 24px;
}
.switchTab {
  font-family: inherit;
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
  background: var(--surface);
  border: 2px solid var(--line);
  border-radius: var(--radiusBtn);
  padding: 10px 22px;
  min-height: 48px;
  cursor: pointer;
  transition: background-color .2s ease, color .2s ease, border-color .2s ease;
}
.switchTab[aria-selected="true"] { background: var(--accent); border-color: var(--accent); color: var(--accentText); }
.switchTab:hover { border-color: var(--accent); }
.switchTab:focus-visible { outline: 4px solid var(--accent); outline-offset: 3px; }
.switchTab:active { transform: scale(.96); }
.darkPlate {
  background: var(--plateBg);
  color: var(--plateText);
  border-radius: var(--radiusCard);
  padding: clamp(24px, 4vw, 40px);
}
.darkPlate p { max-width: 60ch; line-height: 1.65; }
.darkPlate h3 { color: var(--plateText); margin: 0 0 12px; }
.darkPlate p { color: var(--plateText); margin: 0; }
.platePanel[hidden] { display: none; }

/* Form */
.leadForm {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radiusCard);
  box-shadow: var(--shadowSoft);
  padding: clamp(24px, 4vw, 40px);
  max-width: 640px;
  margin: 8px auto 0;
}
.formRow { margin-bottom: 20px; }
.rowLabel { display: block; font-weight: 600; margin-bottom: 6px; }
.rowInput {
  width: 100%;
  font-family: inherit;
  font-size: 1rem;
  color: var(--text);
  background: var(--bg);
  border: 2px solid var(--line);
  border-radius: 12px;
  padding: 12px 14px;
}
.rowInput::placeholder { color: var(--muted); opacity: 1; }
.rowInput:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.rowArea { resize: vertical; }
.rowCheck { display: flex; gap: 12px; align-items: flex-start; margin: 20px 0; }
.rowCheck input { width: 20px; height: 20px; margin-top: 3px; accent-color: var(--accent); }
.rowError { color: #8C2F24; font-size: .95rem; margin: 6px 0 0; }
.formHint { color: var(--muted); font-size: .95rem; margin: 16px 0 20px; }
.formSend { margin-top: 8px; }
.isLocked { opacity: .6; pointer-events: none; }

/* FAQ */
.qaList { display: flex; flex-direction: column; gap: 12px; max-width: 760px; }
.qaList details {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radiusCard);
  padding: 18px 24px;
}
.qaList summary {
  font-weight: 700;
  cursor: pointer;
  list-style-position: inside;
}
.qaList summary:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.qaList p { color: var(--muted); margin: 12px 0 0; }

/* Service area */
.areaNote { max-width: none; }

/* Footer */
.pageEnd {
  background: var(--surface);
  border-top: 1px solid var(--line);
  padding: 56px 0 32px;
}
.pageEndGrid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 32px;
}
.pageEndNote { color: var(--muted); font-size: .95rem; margin: 12px 0 0; }
.pageEndNav ul, .pageEndDocs ul, .pageEndContacts ul { list-style: none; margin: 0; padding: 0; }
.pageEndNav li, .pageEndDocs li { margin: 8px 0; }
.pageEndNav a, .pageEndDocs a { color: var(--text); text-decoration: none; }
.pageEndNav a:hover, .pageEndDocs a:hover { color: var(--accent); text-decoration: underline; }
.pageEndOwner address { font-style: normal; color: var(--muted); font-size: .95rem; }
.pageEndOwner p { margin: 0 0 8px; }
.pageEndContacts { margin: 32px 0 0; }
.pageEndContacts li { margin: 6px 0; }
.pageEndContacts span { color: var(--muted); margin-right: 8px; }
.pageEndCopy { color: var(--muted); font-size: .95rem; margin: 24px 0 0; }

/* Prose */
.readFlow h2 { margin: 40px 0 12px; }
.readFlow h3 { margin: 32px 0 10px; }
.readFlow p { color: var(--text); }
.readFlow ul, .readFlow ol { padding-left: 24px; max-width: 68ch; }
.readFlow li { margin: 6px 0; }
.readFlow table {
  width: 100%;
  border-collapse: collapse;
  margin: 20px 0;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
}
.readFlow th, .readFlow td {
  text-align: left;
  padding: 10px 14px;
  border-bottom: 1px solid var(--line);
}
.readFlow th { background: var(--bg); font-weight: 700; }

/* Inner pages */
.pageHead { padding-top: calc(var(--gapSec) + 24px); }
.pageHead p { color: var(--muted); font-size: 1.1rem; }
.stepList { counter-reset: step; list-style: none; padding: 0; max-width: 760px; }
.stepList li {
  counter-increment: step;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radiusCard);
  padding: 20px 24px 20px 72px;
  margin: 12px 0;
  position: relative;
}
.stepList li::before {
  content: counter(step);
  position: absolute;
  left: 20px;
  top: 22px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--accent);
  color: var(--accentText);
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}
.galleryGrid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
}
.galleryGrid img { border: 1px solid var(--line); width: 100%; }
.contactCard {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radiusCard);
  box-shadow: var(--shadowSoft);
  padding: 28px 32px;
  max-width: 760px;
}
.contactCard ul { list-style: none; margin: 0; padding: 0; }
.contactCard li { margin: 10px 0; }
.contactCard span { color: var(--muted); margin-right: 8px; font-weight: 600; }

/* Thanks / 404 */
.confirmBox { text-align: center; padding: var(--gapSec) 0; }
.confirmBox .pillBtn { margin: 8px 8px 8px 0; }
.linkRow { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; }

/* Reveal */
.fadeUp { opacity: 1; }
html.hasJs .fadeUp { opacity: 0; transform: translateY(24px); transition: opacity .5s ease, transform .5s ease; }
html.hasJs .fadeUp.isShown { opacity: 1; transform: translateY(0); }

/* Breakpoints */
@media (max-width: 479px) {
  .heroCollage { grid-template-columns: 1fr; }
  .topBarInner { padding: 6px 8px; }
  .menuBtnLabel { display: none; }
  .pageEndGrid { gap: 24px; }
}
@media (min-width: 480px) {
  .statsBar { justify-content: center; }
}
@media (min-width: 640px) {
  div:has(> .tileCard) { grid-template-columns: repeat(2, 1fr); }
  .cardWide { grid-column: span 2; }
  .galleryGrid { grid-template-columns: repeat(2, 1fr); }
  .pageEndGrid { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 768px) {
  .heroLayout { grid-template-columns: 1.15fr .85fr; gap: 48px; }
  .stepList li { padding-left: 84px; }
}
@media (min-width: 1024px) {
  div:has(> .tileCard) { grid-template-columns: repeat(3, 1fr); grid-auto-flow: dense; }
  .cardWide { grid-column: span 2; }
  .galleryGrid { grid-template-columns: repeat(3, 1fr); }
  .pageEndGrid { grid-template-columns: 2fr 1fr 1fr 1.4fr; }
}
@media (min-width: 1280px) {
  .wrap { padding: 0 40px; }
  .heroCollage { max-width: 600px; }
}

/* Short screens */
@media (max-height: 600px) {
  #hero { padding-top: calc(var(--gapSec) * 0.5 + 60px); }
  .menuOverlay { justify-content: flex-start; overflow-y: auto; padding-top: 100px; }
  .menuLink { font-size: 1.4rem; }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
  html.hasJs .fadeUp { opacity: 1; transform: none; }
  .menuLink { opacity: 1; transform: none; }
  .menuOverlay { opacity: 1; }
}

/* Section rhythm */
#zapytanie .secLead { margin-bottom: 40px; }
#pakiety .secLead:last-of-type { margin-top: 24px; }
@media (max-width: 479px) {
  .collageSide { display: none; }
  .heroCollage { max-width: 100%; }
  .darkPlate { padding: 24px; }
  .cardBody { padding: 20px; }
}
@media (min-width: 768px) and (max-width: 1023px) {
  .cardWide { grid-column: span 2; }
}

.darkPlate a { color: #B9E3C6; }
.darkPlate a:hover { color: #DFF3E5; }
