/* =========================================================
   Działka ze stawem – Barczewko
   Czysty CSS, bez JavaScript
   ========================================================= */

:root {
  --forest: #1f3a30;
  --forest-2: #2c5243;
  --water: #2f6670;
  --reed: #c9a96a;
  --paper: #f5f2ea;
  --tint: #ebe7dc;
  --ink: #1c2421;
  --muted: #5c6862;
  --line: #d9d3c4;
  --white: #ffffff;
  --radius: 14px;
  --shadow: 0 10px 30px rgb(20 35 28 / .12);
  --serif: "Fraunces", Georgia, "Times New Roman", serif;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --header-h: 64px;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 12px);
  -webkit-text-size-adjust: 100%;
}
@media (prefers-reduced-motion: reduce) {
  html, .track { scroll-behavior: auto; }
}

body {
  margin: 0;
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--ink);
  background: var(--paper);
  overflow-x: hidden;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--water); }
h1, h2, h3 { font-family: var(--serif); font-weight: 600; line-height: 1.15; margin: 0 0 .6em; color: var(--forest); }
h2 { font-size: clamp(1.75rem, 3.5vw, 2.5rem); letter-spacing: -.01em; }
h3 { font-size: 1.2rem; }
p { margin: 0 0 1em; }

.wrap { width: min(1180px, 100% - 32px); margin-inline: auto; }
.narrow { width: min(820px, 100% - 32px); }
.center { text-align: center; }
.nowrap { white-space: nowrap; }

.skip {
  position: absolute; left: -9999px; top: 8px; z-index: 100;
  background: var(--forest); color: var(--white); padding: 8px 14px; border-radius: 8px;
}
.skip:focus { left: 8px; }

:focus-visible { outline: 3px solid var(--reed); outline-offset: 3px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5em;
  min-height: 48px; padding: .7em 1.4em;
  font: 600 1rem/1.2 var(--sans); text-decoration: none;
  color: var(--forest); background: var(--reed);
  border: 2px solid var(--reed); border-radius: 999px;
  transition: transform .15s ease, background .15s ease;
}
.btn:hover { transform: translateY(-1px); background: #d6b97c; }
.btn--ghost { background: transparent; color: var(--white); border-color: rgb(255 255 255 / .7); }
.btn--ghost:hover { background: rgb(255 255 255 / .12); }
.btn--light { background: var(--white); border-color: var(--white); }
.btn--small { min-height: 40px; padding: .45em 1.1em; font-size: .9rem; }

/* ---------- Header ---------- */
.topbar {
  position: sticky; top: 0; z-index: 50;
  background: rgb(245 242 234 / .92);
  -webkit-backdrop-filter: saturate(1.4) blur(10px);
  backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--line);
}
.topbar__inner { display: flex; align-items: center; gap: 24px; height: var(--header-h); }
.brand { font: 600 1.2rem/1 var(--serif); color: var(--forest); text-decoration: none; margin-right: auto; }
.brand span { font-weight: 400; color: var(--muted); }
.menu { display: flex; gap: 22px; list-style: none; margin: 0; padding: 0; }
.menu a { color: var(--ink); text-decoration: none; font-weight: 500; font-size: .95rem; }
.menu a:hover { color: var(--water); }
@media (max-width: 820px) {
  .menu { display: none; }
  .brand span { display: none; }
}

/* ---------- Hero ---------- */
.hero {
  position: relative; isolation: isolate;
  min-height: min(88vh, 760px);
  display: flex; align-items: flex-end;
  color: var(--white);
  overflow: hidden;
}
.hero__bg {
  position: absolute; inset: 0; z-index: -2;
  width: 100%; height: 100%; object-fit: cover; object-position: 40% 60%;
}
.hero::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(180deg, rgb(15 30 24 / .15) 0%, rgb(15 30 24 / .45) 45%, rgb(15 30 24 / .88) 100%);
}
.hero__content { padding-block: 120px 56px; }
.eyebrow { text-transform: uppercase; letter-spacing: .14em; font-size: .78rem; font-weight: 600; color: var(--reed); margin-bottom: 1em; }
.hero h1 { color: var(--white); font-size: clamp(2.1rem, 5.6vw, 4rem); max-width: 20ch; margin-bottom: .4em; }
.hero__lead { font-size: clamp(1.05rem, 1.8vw, 1.25rem); max-width: 56ch; color: rgb(255 255 255 / .9); }
.stats { list-style: none; padding: 0; margin: 28px 0 32px; display: flex; flex-wrap: wrap; gap: 12px; }
.stats li {
  padding: 14px 20px; border-radius: var(--radius);
  background: rgb(255 255 255 / .1); border: 1px solid rgb(255 255 255 / .22);
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
}
.stats strong { display: block; font: 600 1.5rem/1.1 var(--serif); }
.stats span { font-size: .85rem; color: rgb(255 255 255 / .8); }
.hero__cta { display: flex; flex-wrap: wrap; gap: 12px; }

/* ---------- Sections ---------- */
.section { padding-block: clamp(56px, 8vw, 104px); }
.section--tint { background: var(--tint); }
.lead { font-size: 1.1rem; color: var(--muted); }
.grid-2 { display: grid; gap: clamp(32px, 5vw, 64px); grid-template-columns: 1.25fr 1fr; align-items: start; }
.grid-2--map { grid-template-columns: 1fr 1.4fr; align-items: center; }
@media (max-width: 900px) { .grid-2, .grid-2--map { grid-template-columns: 1fr; } }
.prose p { max-width: 64ch; }

/* ---------- Gallery (CSS-only carousel) ---------- */
.track {
  list-style: none; margin: 0; padding: 0;
  display: flex; overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  overscroll-behavior-x: contain;
  border-radius: var(--radius);
  background: #0f1a16;
  box-shadow: var(--shadow);
  scrollbar-width: none;
}
.track::-webkit-scrollbar { display: none; }
.slide {
  position: relative;
  flex: 0 0 100%;
  scroll-snap-align: start;
  scroll-snap-stop: always;
}
.slide figure { margin: 0; }
.slide img {
  width: 100%; aspect-ratio: 16 / 10; object-fit: contain; background: #0f1a16;
}
.slide figcaption {
  position: absolute; left: 0; right: 0; bottom: 0;
  padding: 40px 20px 16px;
  color: var(--white); font-size: .95rem;
  background: linear-gradient(transparent, rgb(0 0 0 / .7));
}
.slide__count { font-variant-numeric: tabular-nums; color: var(--reed); font-weight: 600; margin-right: .6em; }
.slide__nav {
  position: absolute; top: 50%; translate: 0 -50%;
  width: 48px; height: 48px; border-radius: 50%;
  display: grid; place-items: center;
  font-size: 1.3rem; text-decoration: none;
  color: var(--forest); background: rgb(255 255 255 / .88);
  box-shadow: 0 4px 14px rgb(0 0 0 / .25);
  transition: background .15s ease, scale .15s ease;
}
.slide__nav:hover { background: var(--white); scale: 1.06; }
.slide__nav--prev { left: 14px; }
.slide__nav--next { right: 14px; }
@media (max-width: 600px) {
  .slide img { aspect-ratio: 4 / 3; }
  .slide__nav { width: 40px; height: 40px; font-size: 1.1rem; }
  .slide figcaption { position: static; font-size: .85rem; padding: 10px 14px 14px; background: #0f1a16; }
  .slide__nav { top: calc((100vw - 32px) * .375); }
}

.thumbs {
  list-style: none; margin: 14px 0 0; padding: 4px 2px;
  display: grid; grid-auto-flow: column; grid-auto-columns: 96px; gap: 10px;
  overflow-x: auto; scrollbar-width: thin;
}
.thumbs a { display: block; border-radius: 8px; overflow: hidden; opacity: .65; outline-offset: 2px; transition: opacity .15s ease; }
.thumbs a:hover { opacity: 1; }
.thumbs img { width: 96px; height: 72px; object-fit: cover; }
@media (min-width: 1100px) { .thumbs { grid-auto-flow: row; grid-template-columns: repeat(11, 1fr); grid-auto-columns: auto; } .thumbs img { width: 100%; } }

/* Aktywna miniatura (przeglądarki z obsługą :has) */
.gallery:has(#foto-1:target) .thumbs li:nth-child(1) a,
.gallery:has(#foto-2:target) .thumbs li:nth-child(2) a,
.gallery:has(#foto-3:target) .thumbs li:nth-child(3) a,
.gallery:has(#foto-4:target) .thumbs li:nth-child(4) a,
.gallery:has(#foto-5:target) .thumbs li:nth-child(5) a,
.gallery:has(#foto-6:target) .thumbs li:nth-child(6) a,
.gallery:has(#foto-7:target) .thumbs li:nth-child(7) a,
.gallery:has(#foto-8:target) .thumbs li:nth-child(8) a,
.gallery:has(#foto-9:target) .thumbs li:nth-child(9) a,
.gallery:has(#foto-10:target) .thumbs li:nth-child(10) a,
.gallery:has(#foto-11:target) .thumbs li:nth-child(11) a { opacity: 1; box-shadow: 0 0 0 3px var(--reed); }

/* ---------- Plots table ---------- */
.card { background: var(--white); border-radius: var(--radius); padding: 28px; box-shadow: var(--shadow); }
.plots { width: 100%; border-collapse: collapse; font-size: .95rem; }
.plots th, .plots td { text-align: left; padding: 12px 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
.plots thead th { font-size: .78rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-weight: 600; }
.plots tbody th { font-family: var(--serif); white-space: nowrap; }
.plots td:nth-child(2) { white-space: nowrap; font-weight: 600; }
.plots tfoot th, .plots tfoot td { border-bottom: 0; font-weight: 600; color: var(--forest); }
.tag { display: inline-block; padding: 1px 8px; margin-right: 4px; border-radius: 6px; font-size: .75rem; font-weight: 700; background: #f2cdb4; color: #7a3a14; }
.tag--zn { background: #c3e0d4; color: var(--forest); }

/* ---------- Features ---------- */
.features { list-style: none; margin: 0; padding: 0; display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
.features li { background: var(--paper); border-radius: var(--radius); padding: 24px; border-top: 4px solid var(--water); }
.features h3 { font-size: 1.15rem; margin-bottom: .35em; }
.features p { margin: 0; color: var(--muted); font-size: .97rem; }

/* ---------- Specs & price ---------- */
.specs { margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 0 24px; }
.specs div { padding: 14px 0; border-bottom: 1px solid var(--line); }
.specs dt { font-size: .78rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-weight: 600; }
.specs dd { margin: 2px 0 0; font-weight: 500; }

.price {
  background: var(--forest); color: var(--white);
  border-radius: var(--radius); padding: clamp(28px, 4vw, 44px);
  box-shadow: var(--shadow);
}
.price__label { color: var(--reed); font: 600 .8rem/1 var(--sans); text-transform: uppercase; letter-spacing: .14em; }
.price__value { font: 600 clamp(2.4rem, 5vw, 3.4rem)/1.05 var(--serif); margin-bottom: .4em; }
.price__calc { color: rgb(255 255 255 / .82); }
.price__bonus { padding: 12px 16px; border-radius: 10px; background: rgb(255 255 255 / .08); margin-bottom: 1.5em; }

/* ---------- Building rules ---------- */
.rules { list-style: none; counter-reset: r; margin: 32px 0; padding: 0; display: grid; gap: 14px; }
.rules li {
  counter-increment: r; position: relative;
  background: var(--paper); border-radius: var(--radius); padding: 22px 24px 22px 76px;
}
.rules li::before {
  content: counter(r); position: absolute; left: 22px; top: 20px;
  width: 36px; height: 36px; border-radius: 50%;
  display: grid; place-items: center;
  font: 600 1rem/1 var(--serif); color: var(--white); background: var(--water);
}
.rules h3 { margin-bottom: .3em; }
.rules p { margin: 0; }

.download {
  display: flex; align-items: center; gap: 18px;
  padding: 20px 24px; border-radius: var(--radius);
  background: var(--white); color: var(--ink); text-decoration: none;
  border: 2px dashed var(--water);
  transition: background .15s ease;
}
.download:hover { background: #f4faf9; }
.download small { color: var(--muted); }
.download__icon {
  flex: none; width: 56px; height: 64px; border-radius: 8px;
  display: grid; place-items: end center; padding-bottom: 10px;
  font: 700 .8rem/1 var(--sans); color: var(--white); background: #b5452f;
}

/* ---------- Location ---------- */
.distances { list-style: none; margin: 0 0 24px; padding: 0; }
.distances li { display: flex; justify-content: space-between; gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.distances strong { font-family: var(--serif); color: var(--forest); white-space: nowrap; }
.map-links { display: flex; flex-wrap: wrap; gap: 20px; font-weight: 600; }
.map { border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); background: var(--tint); }
.map iframe { display: block; width: 100%; height: auto; aspect-ratio: 10 / 7; border: 0; }
@media (max-width: 600px) { .map iframe { aspect-ratio: 1 / 1; } }

/* ---------- FAQ ---------- */
details { background: var(--paper); border-radius: var(--radius); margin-bottom: 10px; }
summary {
  cursor: pointer; list-style: none; padding: 18px 56px 18px 22px; position: relative;
  font: 600 1.05rem/1.4 var(--serif); color: var(--forest);
}
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; position: absolute; right: 22px; top: 50%; translate: 0 -50%; font: 400 1.6rem/1 var(--sans); color: var(--water); }
details[open] summary::after { content: "–"; }
details p { padding: 0 22px 18px; margin: 0; color: var(--muted); }

/* ---------- Contact & footer ---------- */
.contact { background: var(--forest); color: var(--white); }
.contact h2 { color: var(--white); }
.contact p { color: rgb(255 255 255 / .82); }
.contact__actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin: 28px 0; }
.note { font-size: .9rem; }

.footer { background: #142820; color: rgb(255 255 255 / .6); font-size: .85rem; padding: 24px 0; text-align: center; }
.footer p { margin: 0; }

@media print {
  .topbar, .slide__nav, .thumbs, .map, .hero__cta { display: none; }
  .hero { min-height: 0; color: var(--ink); }
  .hero__bg, .hero::before { display: none; }
  .hero h1 { color: var(--forest); }
}
