/* Mieszkanko w centrum - styl wzorowany na szablonie LP "Luxury Editorial" (templates/page/rental.html.twig):
   biel + krem, granat, zloty akcent, Playfair Display (naglowki) + Inter (tekst), male etykiety wersalikami. */

:root {
    --accent: #c5a059; --navy: #1e293b; --cream: #fdfbf7;
    --ink: #0f172a; --text: #57534e; --muted: #a8a29e; --line: #e7e5e4; --line-soft: #f5f5f4;
    --serif: 'Playfair Display', Georgia, 'Times New Roman', serif;
    --sans: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
    --nav-h: 96px;
    --ease: cubic-bezier(.2, .7, .2, 1);
}

*, *::before, *::after { box-sizing: border-box; }
/* overflow-x na html, nie tylko na body - mobilny Chrome inaczej zle liczy viewport (CLAUDE.md) */
html { overflow-x: hidden; max-width: 100vw; scroll-behavior: smooth; scroll-padding-top: var(--nav-h); -webkit-text-size-adjust: 100%; }
body { margin: 0; overflow-x: hidden; background: #fff; color: var(--text); font: 300 17px/1.7 var(--sans); -webkit-font-smoothing: antialiased; }
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, p, ul, dl, dd, figure, address { margin: 0; padding: 0; }
ul { list-style: none; }
address { font-style: normal; }
button { font: inherit; color: inherit; cursor: pointer; background: none; border: 0; padding: 0; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
::selection { background: var(--accent); color: #fff; }

.wrap { width: min(1280px, 100% - 64px); margin-inline: auto; }
.wide { width: min(1536px, 100% - 64px); margin-inline: auto; }
.muted { color: var(--muted); }

h1, h2, h3 { font-family: var(--serif); font-weight: 400; color: var(--ink); }
h1 { font-size: clamp(54px, 7vw, 100px); line-height: .92; letter-spacing: -.01em; }
h2 { font-size: clamp(34px, 3.6vw, 48px); line-height: 1.15; }
h2 em { font-style: italic; font-weight: 400; }
.label { display: block; margin-bottom: 20px; font-size: 12px; font-weight: 600; letter-spacing: .3em; text-transform: uppercase; color: var(--accent); }
.micro { font-size: 10px; font-weight: 400; letter-spacing: .5em; text-transform: uppercase; color: var(--muted); }
.center { text-align: center; margin-bottom: clamp(36px, 5vw, 64px); }

/* przycisk z obrysem i wjezdzajacym tlem - jak .btn-luxury w szablonie */
.btn-luxury { position: relative; z-index: 1; display: inline-block; overflow: hidden; padding: 14px 32px; border: 1px solid var(--navy); color: var(--ink);
    font-size: 11px; font-weight: 700; letter-spacing: .2em; text-transform: uppercase; line-height: 1.4; white-space: nowrap; transition: color .4s ease; }
.btn-luxury::before { content: ""; position: absolute; z-index: -1; top: 0; left: -101%; width: 101%; height: 100%; background: var(--navy); transition: left .4s ease; }
.btn-luxury:hover { color: #fff; }
.btn-luxury:hover::before { left: 0; }

/* ───────── Pasek i nawigacja ───────── */
.topbar { position: relative; z-index: 60; padding: 8px 16px; background: var(--navy); color: #fff; text-align: center; font-size: 12px; font-weight: 400; letter-spacing: .14em; text-transform: uppercase; }
.nav { position: sticky; top: 0; z-index: 50; background: rgba(255, 255, 255, .9); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-bottom: 1px solid var(--line-soft); transition: box-shadow .3s; }
.nav.scrolled { box-shadow: 0 10px 30px -22px rgba(15, 23, 42, .45); }
.nav-in { width: min(1536px, 100% - 64px); height: var(--nav-h); margin-inline: auto; display: flex; justify-content: space-between; align-items: center; gap: 24px; }
.brand { display: flex; flex-direction: column; }
.brand-name { font-family: var(--serif); font-weight: 700; font-size: 22px; letter-spacing: .1em; text-transform: uppercase; color: var(--ink); line-height: 1.25; white-space: nowrap; }
.brand-tag { font-size: 10px; font-weight: 400; letter-spacing: .4em; text-transform: uppercase; color: var(--muted); }
.nav-links { display: flex; gap: clamp(22px, 3vw, 48px); font-size: 11px; font-weight: 600; letter-spacing: .2em; text-transform: uppercase; color: #57534e; }
.nav-links a { transition: color .2s; }
.nav-links a:hover { color: #000; }
.nav-burger { display: none; flex-direction: column; gap: 5px; padding: 8px; }
.nav-burger span { display: block; width: 22px; height: 2px; background: var(--navy); border-radius: 2px; transition: transform .3s, opacity .3s; }
.nav-burger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-burger.open span:nth-child(2) { opacity: 0; }
.nav-burger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
.mobile-menu { display: none; position: fixed; inset: 0; z-index: 45; background: #fff; flex-direction: column; align-items: center; justify-content: center; gap: 30px; padding-top: var(--nav-h); }
.mobile-menu.open { display: flex; }
.mobile-menu a:not(.btn-luxury) { font-family: var(--serif); font-size: 22px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--navy); }

/* ───────── Hero ───────── */
.hero { padding: clamp(36px, 5vw, 64px) 0 clamp(64px, 8vw, 110px); overflow: hidden; }
.hero-in { width: min(1536px, 100% - 64px); margin-inline: auto; display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 48px; align-items: center; }
.hero-copy { animation: from-left 1.2s var(--ease) both; }
.hero h1 { margin-bottom: 32px; }
.hero-lead { max-width: 24em; margin-bottom: 40px; font-size: 18px; color: #78716c; }
.hero-links { display: flex; align-items: center; gap: 24px; }
.rule { width: 48px; height: 1px; background: #d6d3d1; }
.text-link { font-size: 12px; font-weight: 700; letter-spacing: .2em; text-transform: uppercase; color: var(--ink); transition: color .2s; }
.text-link:hover { color: var(--accent); }
.hero-media { position: relative; min-width: 0; }
/* panele: wysokosc ograniczona, bo zdjecia maja max 1024x768 - nie sa powiekszane ponad swoj rozmiar */
.panels { display: flex; gap: 12px; height: min(76vh, 640px); min-height: 420px; }
.hp { position: relative; flex: 1 1 0; min-width: 0; margin: 0; overflow: hidden; border-radius: 140px 140px 16px 16px; background: var(--cream); cursor: pointer;
    box-shadow: 0 25px 50px -20px rgba(15, 23, 42, .35);
    transition: flex-grow .9s var(--ease), border-radius .9s var(--ease);
    animation: panel-in 1.1s calc(var(--i) * 140ms + 200ms) var(--ease) backwards; }
.hp:nth-child(even) { margin-top: 56px; }          /* schodkowy rytm gornych krawedzi */
.hp.on { flex-grow: 3.4; border-radius: 180px 180px 16px 16px; }
.hp img { width: 100%; height: 100%; object-fit: cover; user-select: none; -webkit-user-drag: none;
    transform: scale(1.14); translate: calc(var(--mx, 0) * -12px) 0; filter: saturate(.55) brightness(.82);
    transition: transform 1.6s var(--ease), filter .9s ease; }
.hp.on img { transform: scale(1.02); filter: none; }   /* powolne "oddalenie" + powrot koloru */
.hp::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 50%, rgba(15, 23, 42, .7)); pointer-events: none; }
.hp figcaption { position: absolute; z-index: 2; inset: 0; pointer-events: none; color: #fff; }
.hp-n { position: absolute; left: 50%; bottom: 22px; transform: translateX(-50%); font-family: var(--serif); font-size: 15px; color: var(--accent);
    transition: left .9s var(--ease), bottom .9s var(--ease), transform .9s var(--ease); }
.hp.on .hp-n { left: 24px; bottom: 56px; transform: none; }
.hp-v { position: absolute; left: 50%; bottom: 64px; transform: translateX(-50%) rotate(180deg); writing-mode: vertical-rl; white-space: nowrap;
    font-size: 10px; font-weight: 600; letter-spacing: .28em; text-transform: uppercase; transition: opacity .4s; }
.hp.on .hp-v { opacity: 0; }
.hp-h { position: absolute; left: 24px; right: 16px; bottom: 24px; font-size: 11px; font-weight: 600; letter-spacing: .2em; text-transform: uppercase; line-height: 1.5;
    opacity: 0; transform: translateY(10px); transition: opacity .4s, transform .6s var(--ease); }
.hp.on .hp-h { opacity: 1; transform: none; transition-delay: .35s; }
/* zloty pasek odliczajacy czas do nastepnego zdjecia */
.hp-bar { position: absolute; z-index: 3; left: 0; right: 0; bottom: 0; height: 3px; background: var(--accent); transform: scaleX(0); transform-origin: left; }
.hp.on .hp-bar { animation: hp-bar 4.5s linear forwards; }
.panels:hover .hp-bar { animation-play-state: paused; }
.rating { position: absolute; z-index: 4; left: -28px; top: 40px; padding: 30px 34px; border-radius: 16px; background: var(--navy); color: #fff; box-shadow: 0 20px 40px -18px rgba(15, 23, 42, .6); animation: panel-in 1s 1s var(--ease) backwards; }
.rating-num { font-family: var(--serif); font-size: 32px; line-height: 1.1; margin-bottom: 6px; }
.rating-lbl { font-size: 10px; font-weight: 400; letter-spacing: .2em; text-transform: uppercase; line-height: 1.6; color: var(--muted); }
@keyframes panel-in { from { opacity: 0; clip-path: inset(100% 0 0 0); } to { clip-path: inset(0 0 0 0); } }
@keyframes hp-bar { to { transform: scaleX(1); } }
@keyframes from-left { from { opacity: 0; transform: translateX(-50px); } }
@keyframes from-right { from { opacity: 0; transform: translateX(50px); } }

/* ───────── Sekcje ───────── */
.sec { padding: clamp(80px, 9vw, 128px) 0; }
.cream { background: var(--cream); }
.navy { background: var(--navy); color: #fff; }
.navy h2, .navy h3 { color: #fff; }

/* o apartamencie - zdjecie w luku + pionowy napis */
.about { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(40px, 7vw, 96px); align-items: center; }
.about-media { position: relative; }
.arch { width: 100%; height: 600px; object-fit: cover; border-radius: 200px 200px 0 0; }
.vertical { position: absolute; top: 50%; right: -40px; transform: translateY(-50%); writing-mode: vertical-rl; font-size: 10px; letter-spacing: .5em; text-transform: uppercase; color: var(--muted); white-space: nowrap; }
.about-copy h2 { margin-bottom: 36px; }
.about-copy p { font-size: 18px; }
.about-copy p + p { margin-top: 22px; }
.facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px 32px; margin: 40px 0; padding-top: 40px; border-top: 1px solid var(--line); }
.facts dt { font-family: var(--serif); font-size: 20px; color: var(--ink); margin-bottom: 4px; }
.facts dd { font-size: 14px; }

/* galeria - poziomy pasek jak karuzela w szablonie */
.gal-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 32px; margin-bottom: 56px; }
.gal-head .label { margin-bottom: 14px; }
.gal-nav { display: flex; align-items: center; gap: 16px; font-size: 13px; font-weight: 600; letter-spacing: .15em; text-transform: uppercase; color: var(--ink); white-space: nowrap; }
.gal-nav span { color: #d6d3d1; }
.gal-nav button { text-transform: inherit; letter-spacing: inherit; font-weight: inherit; transition: color .2s; }
.gal-nav button:hover { color: var(--accent); }
.gal { display: flex; gap: 30px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; -webkit-overflow-scrolling: touch; cursor: grab;
    padding-inline: max(32px, calc((100vw - 1536px) / 2)); scroll-padding-inline: max(32px, calc((100vw - 1536px) / 2)); }
.gal::-webkit-scrollbar { display: none; }
.gal.drag { cursor: grabbing; scroll-snap-type: none; scroll-behavior: auto; }
.gal-item { flex: 0 0 auto; height: 500px; overflow: hidden; border-radius: 12px; scroll-snap-align: start; background: var(--cream); }
.gal-item img { height: 100%; width: auto; max-width: none; object-fit: cover; transition: transform .7s ease; user-select: none; -webkit-user-drag: none; }
.gal-item:hover img { transform: scale(1.05); }

/* udogodnienia + pytania */
.amen { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); gap: clamp(40px, 6vw, 80px); }
.amen-side h2 { margin-bottom: 28px; }
.amen-lead { margin-bottom: 44px; color: var(--muted); }
.dots li { display: flex; align-items: center; gap: 16px; font-size: 13px; font-weight: 600; letter-spacing: .15em; text-transform: uppercase; color: #d6d3d1; line-height: 1.5; }
.dots li + li { margin-top: 22px; }
.dots li::before { content: ""; flex-shrink: 0; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); }
.q { padding: 24px 0; border-bottom: 1px solid rgba(255, 255, 255, .1); }
.q:first-child { padding-top: 0; }
.q h3 { font-size: clamp(20px, 2vw, 24px); line-height: 1.3; margin-bottom: 14px; }
.q p { color: var(--muted); }

/* wyposazenie */
.equip { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 48px 40px; }
.equip-col h3 { font-size: 22px; padding-bottom: 14px; margin-bottom: 16px; border-bottom: 1px solid var(--line); }
.equip-col h3::before { content: ""; display: block; width: 28px; height: 2px; margin-bottom: 16px; background: var(--accent); }
.equip-col li { font-size: 15px; padding: 5px 0; }

/* okolica */
/* tlo sekcji: ciemniejszy, cieplejszy beż niz zwykly krem (bialych kart nie zlewa z tlem) + delikatny zloty poblask */
#okolica.cream { background: radial-gradient(700px 360px at 12% 0%, rgba(197, 160, 89, .14), transparent 70%), linear-gradient(180deg, #f3eee3 0%, #ebe4d4 100%); }
#okolica .near-card { border-color: rgba(120, 100, 60, .12); box-shadow: 0 6px 18px -12px rgba(80, 60, 20, .25); }
.view { position: relative; max-width: 1024px; margin: 0 auto clamp(40px, 5vw, 64px); border-radius: 16px; overflow: hidden; box-shadow: 0 25px 50px -20px rgba(0, 0, 0, .3); }
.view img { width: 100%; height: auto; }
.view figcaption { position: absolute; left: 0; bottom: 0; padding: 14px 22px; background: var(--navy); color: #fff; font-size: 10px; letter-spacing: .25em; text-transform: uppercase; border-top-right-radius: 16px; }
.near-title { margin: 40px 0 20px; font-size: 24px; text-align: center; }
.near-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.near-card { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 24px; background: #fff; border: 1px solid var(--line-soft); border-radius: 12px; box-shadow: 0 1px 2px rgba(0, 0, 0, .05); }
.near-card span { font-weight: 600; font-size: 16px; color: #44403c; line-height: 1.4; }
.near-card b { font-weight: 300; font-size: 14px; color: var(--accent); white-space: nowrap; }

/* stopka - krem, a pod nim ledwo widoczne, czarno-biale zdjecie widoku (zanika ku gorze) + cieply zloty blask */
.foot { position: relative; overflow: hidden; isolation: isolate; padding: clamp(64px, 8vw, 96px) 0 64px; background: var(--cream); }
.foot::before { content: ""; position: absolute; z-index: -2; inset: 0; background: var(--foot-img) center 65% / cover no-repeat; opacity: .13; filter: grayscale(1) contrast(.9);
    -webkit-mask-image: linear-gradient(0deg, #000 10%, transparent 85%); mask-image: linear-gradient(0deg, #000 10%, transparent 85%); }
.foot::after { content: ""; position: absolute; z-index: -1; inset: 0; pointer-events: none;
    background: radial-gradient(600px 320px at 88% 100%, rgba(197, 160, 89, .16), transparent 70%), radial-gradient(500px 300px at 6% 0%, rgba(255, 255, 255, .9), transparent 70%); }
.foot-in { display: flex; justify-content: space-between; align-items: flex-end; flex-wrap: wrap; gap: 48px; padding-top: 64px; border-top: 1px solid var(--line-soft); }
.foot .micro { margin-bottom: 24px; }
.foot address { font-family: var(--serif); font-size: clamp(24px, 2.6vw, 34px); line-height: 1.3; color: var(--ink); }
.foot-links { margin: 18px 0 30px; font-size: 14px; }
.gold { color: var(--accent); }
.gold:hover { text-decoration: underline; text-underline-offset: 4px; }
.foot-right { text-align: right; }
.foot-brand { font-family: var(--serif); font-weight: 700; font-size: 24px; color: var(--ink); }
.foot-copy { margin-top: 16px; font-size: 12px; font-weight: 400; letter-spacing: .15em; text-transform: uppercase; color: var(--muted); }

.mbar { display: none; }

/* lightbox */
.lb { position: fixed; inset: 0; z-index: 100; display: flex; align-items: center; justify-content: center; background: rgba(15, 23, 42, .96); animation: fade .25s; }
.lb[hidden] { display: none; }
@keyframes fade { from { opacity: 0; } }
.lb-fig { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 16px; width: 100%; height: 100%; padding: 70px 16px 30px; }
.lb-fig img { max-width: min(100%, 1024px); max-height: calc(100% - 44px); object-fit: contain; border-radius: 8px; animation: zoom .3s var(--ease); }
@keyframes zoom { from { opacity: 0; transform: scale(.97); } }
.lb-fig figcaption { color: #d6d3d1; font-size: 11px; letter-spacing: .2em; text-transform: uppercase; text-align: center; }
.lb-x, .lb-nav { position: absolute; z-index: 2; display: grid; place-items: center; width: 50px; height: 50px; border: 1px solid rgba(255, 255, 255, .3); color: #fff; font-size: 20px; line-height: 1; transition: background .2s, border-color .2s; }
.lb-x:hover, .lb-nav:hover { background: var(--accent); border-color: var(--accent); }
.lb-x { top: 16px; right: 16px; font-size: 28px; }
.lb-nav { top: 50%; margin-top: -25px; }
.lb-prev { left: 16px; } .lb-next { right: 16px; }

/* pojawianie sie przy scrollu - tylko z JS (klasa .js na <html>), bez JS tresc jest od razu widoczna */
.js .reveal { opacity: 0; transform: translateY(40px); transition: opacity 1.1s var(--d, 0ms) ease, transform 1.1s var(--d, 0ms) var(--ease); }
.js .reveal.in { opacity: 1; transform: none; }

/* ───────── Responsywnosc ───────── */
@media (max-width: 1100px) {
    .nav-links, .nav-cta { display: none; }
    .nav-burger { display: flex; }
    .equip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .near-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .vertical { display: none; }
}
@media (max-width: 900px) {
    :root { --nav-h: 76px; }
    .hero-in, .about, .amen { grid-template-columns: minmax(0, 1fr); }
    .panels { height: 58vh; min-height: 380px; max-height: 540px; gap: 8px; }
    .hp, .hp.on { border-radius: 90px 90px 14px 14px; }
    .hp:nth-child(even) { margin-top: 36px; }
    .rating { left: 12px; top: -34px; padding: 14px 20px; }
    .rating-num { font-size: 26px; margin-bottom: 2px; }
    .arch { height: 480px; border-radius: 160px 160px 0 0; }
    .gal-item { height: 380px; }
    .gal { gap: 16px; }
}
@media (max-width: 600px) {
    body { font-size: 16px; }
    .wrap, .wide, .nav-in, .hero-in { width: calc(100% - 40px); }
    .gal { padding-inline: 20px; scroll-padding-inline: 20px; }
    .topbar { font-size: 10px; letter-spacing: .1em; }
    .brand-name { font-size: 17px; letter-spacing: .06em; }
    .brand-tag { font-size: 9px; letter-spacing: .3em; }
    .gal-head { flex-direction: column; align-items: flex-start; gap: 20px; margin-bottom: 36px; }
    .gal-nav { font-size: 12px; }
    .hp-h { font-size: 10px; letter-spacing: .14em; left: 16px; }
    .hp.on .hp-n { left: 16px; }
    .gal-item { height: 300px; }
    .facts { gap: 22px 20px; }
    .equip { grid-template-columns: minmax(0, 1fr); gap: 36px; }
    .near-grid { grid-template-columns: minmax(0, 1fr); gap: 12px; }
    .near-card { padding: 18px 20px; }
    .foot-in { flex-direction: column; align-items: flex-start; }
    .foot-right { text-align: left; }
    .foot { padding-bottom: 110px; }
    .lb-nav { width: 44px; height: 44px; margin-top: -22px; background: rgba(15, 23, 42, .6); }
    .lb-prev { left: 8px; } .lb-next { right: 8px; }
    .mbar { position: fixed; z-index: 40; inset: auto 0 0 0; display: block; padding: 18px 20px calc(18px + env(safe-area-inset-bottom)); background: var(--navy); color: #fff; text-align: center;
        font-size: 11px; font-weight: 700; letter-spacing: .2em; text-transform: uppercase; transform: translateY(100%); transition: transform .4s var(--ease); }
    .mbar.show { transform: none; }
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after { animation: none !important; transition: none !important; }
    .js .reveal { opacity: 1; transform: none; }
}
