@import url("fonts.css");

:root {
  --bg: #faf7f2;
  --bg-2: #f1ebe2;
  --card: #fff;
  --ink: #1a1715;
  --ink-2: #6a6058;
  --line: #e4dacd;
  --line-2: #d3c6b5;
  --brick: #a8482b;
  --brick-dark: #86351d;
  --green: #2f6b45;
  --shadow: 0 1px 2px rgba(26, 23, 21, .04), 0 8px 24px -12px rgba(26, 23, 21, .14);
  --radius: 14px;
  --wrap: 1140px;
  --sans: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --serif: Fraunces, Georgia, "Times New Roman", serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; } }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 17px/1.6 var(--sans);
  -webkit-font-smoothing: antialiased;
  overflow-wrap: break-word;
}

img, video { max-width: 100%; height: auto; display: block; }
/* <picture> znika z układu, żeby <img> był bezpośrednim dzieckiem gridu/flexa */
picture { display: contents; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--brick); outline-offset: 3px; border-radius: 4px; }

.wrap { max-width: var(--wrap); margin-inline: auto; padding-inline: 20px; }
.narrow { max-width: 760px; }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 16px; z-index: 100; background: var(--ink); color: #fff; padding: 10px 16px; border-radius: 8px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- typografia ---------- */
h1, h2, h3 { font-family: var(--serif); font-weight: 600; letter-spacing: -.012em; line-height: 1.12; margin: 0; }
h1 { font-size: clamp(2rem, 1.3rem + 3vw, 3.5rem); }
h2 { font-size: clamp(1.55rem, 1.2rem + 1.5vw, 2.3rem); }
h3 { font-size: 1.2rem; line-height: 1.3; }
p { margin: 0 0 1em; }
.lead { font-size: 1.12rem; color: var(--ink-2); max-width: 62ch; }
.mut { color: var(--ink-2); }
.small { font-size: .875rem; }
section { padding-block: clamp(48px, 7vw, 92px); }
/* kotwice nie chowają się pod przyklejonym nagłówkiem */
section[id], h3[id], [id^="wynajem"], [id^="sprzedaz"] { scroll-margin-top: 84px; }
section > .wrap > h2 { margin-bottom: .5em; }
.eyebrow { font: 600 .8rem/1 var(--sans); letter-spacing: .1em; text-transform: uppercase; color: var(--brick); margin-bottom: 14px; }

/* ---------- przyciski ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 14px 24px; border-radius: 999px; border: 1.5px solid transparent;
  background: var(--brick); color: #fff; text-decoration: none;
  font: 600 1rem/1 var(--sans); cursor: pointer; transition: background .15s, transform .08s, border-color .15s;
}
.btn:hover { background: var(--brick-dark); }
.btn:active { transform: translateY(1px); }
.btn.ghost { background: transparent; color: var(--ink); border-color: var(--line-2); }
.btn.ghost:hover { background: var(--bg-2); border-color: var(--ink); }
.btn.light { background: #fff; color: var(--ink); }
.btn.light:hover { background: var(--bg-2); }
.btn.wa { background: #1f9d55; }
.btn.wa:hover { background: #178043; }
.btn.block { width: 100%; }
.btn.sm { padding: 10px 18px; font-size: .9rem; }

/* ---------- nagłówek ---------- */
.site-head {
  position: sticky; top: 0; z-index: 40;
  background: rgba(250, 247, 242, .88); backdrop-filter: blur(10px);
  border-bottom: 1px solid transparent; transition: border-color .2s;
}
.site-head.scrolled { border-bottom-color: var(--line); }
.site-head .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; height: 68px; }
.logo { font: 600 1.22rem/1 var(--serif); text-decoration: none; letter-spacing: -.01em; white-space: nowrap; }
.logo b { color: var(--brick); font-weight: 600; }
.site-nav { display: flex; align-items: center; gap: 26px; }
.site-nav a:not(.btn) { text-decoration: none; font-size: .95rem; color: var(--ink-2); }
.site-nav a:not(.btn):hover { color: var(--ink); }
.site-nav a[aria-current] { color: var(--ink); font-weight: 500; }
@media (max-width: 900px) { .site-nav { display: none; } }

/* ---------- hero ---------- */
.hero { position: relative; min-height: min(78svh, 680px); display: flex; align-items: flex-end; color: #fff; isolation: isolate; }
.hero picture, .hero img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; }
.hero::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, rgba(20, 16, 12, .5) 0%, rgba(20, 16, 12, .15) 35%, rgba(20, 16, 12, .78) 100%); }
.hero .wrap { padding-block: 56px 48px; }
.hero h1 { max-width: 16ch; text-shadow: 0 2px 24px rgba(0, 0, 0, .35); }
.hero p { max-width: 50ch; font-size: 1.12rem; color: rgba(255, 255, 255, .94); margin-top: 18px; text-shadow: 0 1px 14px rgba(0, 0, 0, .45); }
.hero .btns { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.hero .btns .ghost { color: #fff; border-color: rgba(255, 255, 255, .55); }
.hero .btns .ghost:hover { background: rgba(255, 255, 255, .14); border-color: #fff; }

/* ---------- pasek faktów ---------- */
.facts { background: var(--ink); color: #fff; }
.facts .wrap { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 24px; padding-block: 26px; }
.facts div { font-size: .92rem; color: rgba(255, 255, 255, .72); }
.facts b { display: block; font: 600 1.35rem/1.2 var(--serif); color: #fff; margin-bottom: 3px; }

/* ---------- filtry ---------- */
.filters { display: flex; flex-wrap: wrap; gap: 8px; margin: 26px 0 28px; }
.filters button {
  font: 500 .95rem/1 var(--sans); padding: 11px 20px; border-radius: 999px;
  border: 1.5px solid var(--line-2); background: transparent; color: var(--ink-2); cursor: pointer;
}
.filters button[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: #fff; }

/* ---------- karty ---------- */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 26px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; text-decoration: none; display: flex; flex-direction: column; box-shadow: var(--shadow); transition: transform .18s, box-shadow .18s; }
.card:hover { transform: translateY(-3px); box-shadow: 0 2px 4px rgba(26, 23, 21, .05), 0 18px 40px -16px rgba(26, 23, 21, .26); }
.card .shot { position: relative; aspect-ratio: 4 / 3; background: var(--bg-2); }
.card .shot img { width: 100%; height: 100%; object-fit: cover; }
.card .body { padding: 20px 22px 22px; display: flex; flex-direction: column; flex: 1; }
.card h3 { margin-bottom: 10px; }
.card .price { font: 600 1.35rem/1.2 var(--serif); margin-bottom: 4px; }
.card .price span { font: 400 .9rem/1 var(--sans); color: var(--ink-2); }
.card .meta { font-size: .9rem; color: var(--ink-2); margin-top: auto; padding-top: 12px; }
.card .more { margin-top: 14px; font: 600 .92rem/1 var(--sans); color: var(--brick); }

.badge { position: absolute; top: 14px; left: 14px; font: 600 .72rem/1 var(--sans); letter-spacing: .07em; text-transform: uppercase; padding: 7px 12px; border-radius: 999px; background: rgba(26, 23, 21, .82); color: #fff; backdrop-filter: blur(4px); }
.badge.sale { background: rgba(168, 72, 43, .92); }
.badge.status { left: auto; right: 14px; background: rgba(47, 107, 69, .92); }
.badge.status.off { background: rgba(106, 96, 88, .92); }

/* ---------- galeria ---------- */
.gallery { display: grid; gap: 8px; grid-template-columns: 2fr 1fr 1fr; grid-template-rows: 1fr 1fr; }
.gallery button { padding: 0; border: 0; background: var(--bg-2); border-radius: 10px; overflow: hidden; cursor: pointer; position: relative; aspect-ratio: 4 / 3; }
.gallery button:first-child { grid-row: span 2; grid-column: 1; aspect-ratio: auto; }
.gallery img { width: 100%; height: 100%; object-fit: cover; }
.gallery .rest { position: absolute; inset: 0; display: grid; place-items: center; background: rgba(26, 23, 21, .58); color: #fff; font: 600 1.05rem/1 var(--sans); }
@media (max-width: 760px) {
  .gallery { grid-template-columns: 1fr 1fr; grid-template-rows: auto; }
  .gallery button:first-child { grid-column: span 2; grid-row: auto; aspect-ratio: 4 / 3; }
  .gallery button:nth-child(n+4) { display: none; }
}

/* ---------- lightbox ---------- */
.lb { position: fixed; inset: 0; z-index: 90; background: rgba(16, 13, 11, .96); display: none; flex-direction: column; }
.lb[open], .lb.on { display: flex; }
.lb-stage { flex: 1; display: grid; place-items: center; padding: 56px 12px 8px; min-height: 0; }
.lb-stage img { max-width: 100%; max-height: 100%; object-fit: contain; border-radius: 6px; }
.lb-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 16px 18px; color: rgba(255, 255, 255, .8); font-size: .9rem; }
.lb-cap { flex: 1; min-width: 0; }
.lb button { background: rgba(255, 255, 255, .14); border: 0; color: #fff; width: 46px; height: 46px; border-radius: 50%; cursor: pointer; font-size: 1.3rem; display: grid; place-items: center; flex: none; }
.lb button:hover { background: rgba(255, 255, 255, .28); }
.lb-close { position: absolute; top: 14px; right: 14px; }
.lb-nav { position: absolute; top: 50%; transform: translateY(-50%); }
.lb-prev { left: 14px; } .lb-next { right: 14px; }

/* ---------- karta mieszkania ---------- */
.listing-head { padding-top: 32px; }
.crumbs { font-size: .9rem; color: var(--ink-2); margin-bottom: 18px; }
.crumbs a { text-decoration: none; }
.crumbs a:hover { text-decoration: underline; }
.price-row { display: flex; flex-wrap: wrap; align-items: baseline; gap: 10px 20px; margin: 18px 0 6px; }
.price-row .big { font: 600 clamp(1.8rem, 1.2rem + 2vw, 2.6rem)/1.1 var(--serif); }
.price-row .per { color: var(--ink-2); }
.params { display: flex; flex-wrap: wrap; gap: 8px; margin: 18px 0 4px; }
.params span { background: var(--card); border: 1px solid var(--line); border-radius: 999px; padding: 8px 16px; font-size: .92rem; }
.layout { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(300px, 1fr); gap: 48px; align-items: start; }
@media (max-width: 980px) { .layout { grid-template-columns: 1fr; gap: 32px; } }
.aside { position: sticky; top: 92px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow); }
.aside .btn { width: 100%; margin-bottom: 10px; }
.aside h3 { margin-bottom: 14px; }
@media (max-width: 980px) { .aside { position: static; } }

.prose h2 { margin: 44px 0 14px; }
.prose h2:first-child { margin-top: 0; }
.prose ul { padding-left: 22px; margin: 0 0 1em; }
.prose li { margin: 5px 0; }
.prose table { border-collapse: collapse; width: 100%; background: var(--card); border: 1px solid var(--line); border-radius: 10px; overflow: hidden; font-size: .96rem; }
.prose td, .prose th { padding: 11px 16px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.prose tr:last-child td { border-bottom: 0; }
.prose td:first-child { color: var(--ink-2); width: 42%; }
.prose a { color: var(--brick); }

.note { background: var(--bg-2); border-left: 3px solid var(--brick); border-radius: 0 10px 10px 0; padding: 16px 20px; font-size: .95rem; margin: 20px 0; }

/* ---------- wideo ---------- */
.tabs { display: flex; gap: 6px; margin: 22px 0 14px; }
.tabs button { font: 500 .93rem/1 var(--sans); padding: 10px 18px; border-radius: 999px; border: 1.5px solid var(--line-2); background: transparent; cursor: pointer; color: var(--ink-2); }
.tabs button[aria-selected="true"] { background: var(--ink); border-color: var(--ink); color: #fff; }
.video-wrap { max-width: 400px; margin-inline: auto; border-radius: var(--radius); overflow: hidden; background: #000; aspect-ratio: 9 / 16; position: relative; }
.video-wrap video { width: 100%; height: 100%; object-fit: cover; }
.video-wrap .play { position: absolute; inset: 0; display: grid; place-items: center; border: 0; background: transparent; cursor: pointer; }
.video-wrap .play span { width: 74px; height: 74px; border-radius: 50%; background: rgba(255, 255, 255, .92); display: grid; place-items: center; font-size: 1.6rem; color: var(--ink); padding-left: 6px; box-shadow: 0 8px 30px rgba(0, 0, 0, .3); }
.video-wrap .play img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -1; }

/* ---------- sekcje treściowe ---------- */
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: start; }
@media (max-width: 860px) { .two { grid-template-columns: 1fr; gap: 28px; } }
.strip { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 10px; margin-top: 32px; }
.strip img { aspect-ratio: 4 / 3; object-fit: cover; width: 100%; border-radius: 10px; }
.spec { border-collapse: collapse; width: 100%; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; font-size: .96rem; }
.spec td { padding: 12px 18px; border-bottom: 1px solid var(--line); }
.spec tr:last-child td { border-bottom: 0; }
.spec td:first-child { color: var(--ink-2); width: 44%; }
.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 24px; counter-reset: s; list-style: none; padding: 0; margin: 32px 0 0; }
.steps li { counter-increment: s; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px 24px; }
.steps li::before { content: counter(s); display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; background: var(--brick); color: #fff; font: 600 1rem/1 var(--serif); margin-bottom: 14px; }
.steps h3 { margin-bottom: 6px; }
.steps p { margin: 0; color: var(--ink-2); font-size: .96rem; }

.faq { margin-top: 24px; }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary { cursor: pointer; padding: 18px 40px 18px 0; font-weight: 600; list-style: none; position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 8px; top: 15px; font: 400 1.5rem/1 var(--sans); color: var(--brick); }
.faq details[open] summary::after { content: "−"; }
.faq .ans { padding: 0 0 18px; color: var(--ink-2); max-width: 70ch; }
.faq .ans p:last-child { margin-bottom: 0; }

.map-box { aspect-ratio: 16 / 10; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); background: var(--bg-2); position: relative; display: grid; place-items: center; }
.map-box iframe { width: 100%; height: 100%; border: 0; }
.map-box .ask { text-align: center; padding: 24px; }

/* ---------- formularz ---------- */
.form { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: clamp(22px, 3vw, 34px); box-shadow: var(--shadow); }
.form .f2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 620px) { .form .f2 { grid-template-columns: 1fr; } }
.field { margin-bottom: 16px; }
.field > label { display: block; font: 500 .9rem/1.3 var(--sans); margin-bottom: 7px; }
.field input, .field select, .field textarea {
  width: 100%; padding: 13px 15px; border: 1.5px solid var(--line-2); border-radius: 10px;
  font: 400 1rem/1.4 var(--sans); color: var(--ink); background: var(--bg); -webkit-appearance: none; appearance: none;
}
.field select { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%236a6058' stroke-width='1.8' fill='none' stroke-linecap='round'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 15px center; padding-right: 40px; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--brick); outline: none; background: #fff; }
.field textarea { min-height: 110px; resize: vertical; }
.check { display: flex; gap: 11px; align-items: flex-start; font-size: .9rem; color: var(--ink-2); margin-bottom: 14px; line-height: 1.5; }
.check input { width: 19px; height: 19px; flex: none; margin-top: 2px; accent-color: var(--brick); }
.check a { color: var(--brick); }
.form-msg { padding: 14px 18px; border-radius: 10px; font-size: .95rem; margin-top: 14px; display: none; }
.form-msg.ok { display: block; background: #e8f3ec; color: var(--green); border: 1px solid #bfdfcb; }
.form-msg.err { display: block; background: #fbeae6; color: var(--brick-dark); border: 1px solid #f0cdc3; }
.hp { position: absolute; left: -9999px; }

/* ---------- sticky CTA na telefonie ---------- */
.cta-bar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 50; display: none; gap: 8px; padding: 10px 12px calc(10px + env(safe-area-inset-bottom)); background: rgba(250, 247, 242, .95); backdrop-filter: blur(10px); border-top: 1px solid var(--line); }
.cta-bar .btn { flex: 1; padding: 13px 10px; font-size: .95rem; }
@media (max-width: 980px) { .cta-bar { display: flex; } body { padding-bottom: 76px; } }

/* ---------- stopka ---------- */
.site-foot { background: var(--ink); color: rgba(255, 255, 255, .7); padding-block: 52px 36px; font-size: .92rem; }
.site-foot a { color: rgba(255, 255, 255, .86); }
.site-foot .cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 32px; margin-bottom: 36px; }
.site-foot h4 { font: 600 .78rem/1 var(--sans); letter-spacing: .1em; text-transform: uppercase; color: rgba(255, 255, 255, .5); margin: 0 0 14px; }
.site-foot ul { list-style: none; padding: 0; margin: 0; }
.site-foot li { margin-bottom: 9px; }
.site-foot .bottom { border-top: 1px solid rgba(255, 255, 255, .14); padding-top: 24px; display: flex; flex-wrap: wrap; gap: 10px 24px; justify-content: space-between; font-size: .86rem; color: rgba(255, 255, 255, .5); }
.site-foot .logo { color: #fff; font-size: 1.3rem; display: inline-block; margin-bottom: 12px; }
.site-foot .logo b { color: #d98668; }

/* ---------- baner cookies ---------- */
.cookies { position: fixed; z-index: 80; left: 14px; right: 14px; bottom: 14px; max-width: 520px; background: var(--card); border: 1px solid var(--line-2); border-radius: var(--radius); padding: 22px; box-shadow: 0 20px 60px -20px rgba(26, 23, 21, .45); display: none; }
.cookies.on { display: block; }
@media (max-width: 980px) { .cookies { bottom: 84px; } }
.cookies p { font-size: .9rem; color: var(--ink-2); }
.cookies .row { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }
.cookies .btn { flex: 1; min-width: 140px; }
