:root {
  --ink: #14120f;
  --ink-2: #1d1a16;
  --ivory: #f4f1ec;
  --ivory-dim: rgba(244, 241, 236, .72);
  --brass: #c4a46a;
  --line: rgba(244, 241, 236, .22);
  --serif: "Cormorant Garamond", "Iowan Old Style", Georgia, serif;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --ease: cubic-bezier(.2, .7, .2, 1);
  --header-h: 64px;
  --p: 0;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
body {
  margin: 0; background: var(--ink); color: var(--ivory);
  font: 300 1rem/1.6 var(--sans); -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip { position: fixed; left: 12px; top: -60px; z-index: 100; background: var(--ivory); color: var(--ink); padding: .6rem 1rem; border-radius: 4px; transition: top .2s; }
.skip:focus { top: 12px; }
:focus-visible { outline: 2px solid var(--brass); outline-offset: 3px; }

/* ---------- loader ---------- */
#loader {
  position: fixed; inset: 0; z-index: 90; display: grid; place-items: center;
  background: var(--ink); transition: opacity .9s var(--ease), visibility .9s;
}
#loader.is-done { opacity: 0; visibility: hidden; }
.loader__inner { width: min(320px, 72vw); text-align: center; }
.loader__brand { font: 400 1.7rem/1.1 var(--serif); letter-spacing: .04em; margin-bottom: 2rem; }
.loader__bar { height: 1px; background: var(--line); overflow: hidden; }
.loader__bar span { display: block; height: 100%; width: 100%; background: var(--brass); transform: scaleX(0); transform-origin: left; transition: transform .25s linear; }
.loader__pct { margin-top: .9rem; font-size: .72rem; letter-spacing: .2em; color: var(--ivory-dim); }

/* ---------- header ---------- */
.top {
  position: fixed; inset: 0 0 auto 0; z-index: 50; height: var(--header-h);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 clamp(16px, 4vw, 48px);
  background: linear-gradient(to bottom, rgba(20,18,15,.55), rgba(20,18,15,0));
}
.logo { text-decoration: none; font: 500 1.15rem/1 var(--serif); letter-spacing: .08em; text-transform: uppercase; }
.logo span { color: var(--brass); }
.top__nav { display: flex; align-items: center; gap: clamp(14px, 2.4vw, 34px); font-size: .8rem; letter-spacing: .12em; text-transform: uppercase; }
.top__nav a { text-decoration: none; opacity: .86; }
.top__nav a:hover { opacity: 1; }
.btn {
  display: inline-block; padding: .85rem 1.5rem; border: 1px solid var(--ivory-dim); border-radius: 999px;
  text-decoration: none; font-size: .8rem; letter-spacing: .14em; text-transform: uppercase; color: var(--ivory);
  background: rgba(20,18,15,.25); backdrop-filter: blur(6px); transition: background .3s, color .3s, border-color .3s;
  cursor: pointer; font-family: var(--sans);
}
.btn:hover { background: var(--ivory); color: var(--ink); border-color: var(--ivory); }
.btn--sm { padding: .6rem 1.1rem; font-size: .7rem; }
.btn--solid { background: var(--brass); border-color: var(--brass); color: var(--ink); }
.btn--solid:hover { background: var(--ivory); border-color: var(--ivory); }

/* ---------- scroll stage ---------- */
#track { position: relative; height: 1250vh; }
#stage { position: sticky; top: 0; height: 100vh; height: 100svh; overflow: hidden; background: var(--ink); }
.canvaswrap { position: absolute; inset: 0; }
#cv { width: 100%; height: 100%; display: block; background: var(--ink); }
.scrim { position: absolute; inset: 0; pointer-events: none; }
.scrim--vignette { background: radial-gradient(ellipse at 50% 50%, rgba(0,0,0,0) 55%, rgba(0,0,0,.38) 100%); opacity: .9; transition: opacity .6s; }
.scrim--grad { background: linear-gradient(to top, rgba(20,18,15,.42), rgba(20,18,15,0) 38%), linear-gradient(to bottom, rgba(20,18,15,.28), rgba(20,18,15,0) 24%); }
.flash { position: absolute; inset: 0; pointer-events: none; opacity: 0; background: radial-gradient(circle at 50% 55%, #fff4dc 0%, #f6dfb4 55%, #e8c88e 100%); mix-blend-mode: screen; will-change: opacity; }
.grain {
  position: absolute; inset: 0; pointer-events: none; opacity: .055; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='180' height='180'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}

/* ---------- chapters ---------- */
.chapters { position: absolute; inset: 0; pointer-events: none; }
.chap {
  position: absolute; max-width: 34rem; padding: 0 0 0 0;
  opacity: 0; translate: 0 26px; visibility: hidden;
  transition: opacity .7s var(--ease), translate .7s var(--ease), visibility 0s linear .7s;
  text-shadow: 0 1px 24px rgba(0,0,0,.35);
}
.chap::before {
  content: ""; position: absolute; inset: -4rem -5rem; z-index: -1; pointer-events: none;
  background: radial-gradient(ellipse at center, rgba(20,18,15,.62) 0%, rgba(20,18,15,.34) 48%, rgba(20,18,15,0) 74%);
}
.chap.is-active { opacity: 1; translate: 0 0; visibility: visible; pointer-events: auto; transition-delay: 0s; }
.pos-tl { left: clamp(20px, 6vw, 96px); top: clamp(96px, 19vh, 220px); }
.pos-tr { right: clamp(20px, 6vw, 96px); top: clamp(96px, 19vh, 220px); }
.pos-bl { left: clamp(20px, 6vw, 96px); bottom: clamp(48px, 7.5vh, 100px); }
.pos-bc { left: 0; right: 0; margin-inline: auto; width: min(46rem, 88vw); max-width: none; bottom: clamp(70px, 13vh, 150px); text-align: center; }
.eyebrow { margin: 0 0 .9rem; font-size: .72rem; font-weight: 500; letter-spacing: .26em; text-transform: uppercase; color: #e3c88f; text-shadow: 0 1px 12px rgba(0,0,0,.7); }
.chap h1, .chap h2 { margin: 0 0 .9rem; font: 400 clamp(2rem, 3.7vw, 3.5rem)/1.05 var(--serif); letter-spacing: -.005em; }
.chap .lead { margin: 0; font-size: clamp(.95rem, 1.2vw, 1.08rem); color: var(--ivory-dim); max-width: 30rem; }
.pos-bc .lead { margin-inline: auto; }
.chips { list-style: none; margin: 1.4rem 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: .5rem; }
.chips li { font-size: .72rem; letter-spacing: .1em; text-transform: uppercase; padding: .42rem .8rem; border: 1px solid var(--line); border-radius: 999px; background: rgba(20,18,15,.3); backdrop-filter: blur(4px); }
.cta { margin-top: 1.8rem; display: flex; flex-wrap: wrap; justify-content: center; gap: .8rem; }

/* ---------- UI chrome ---------- */
.hint { position: absolute; left: 50%; bottom: 28px; translate: -50% 0; display: flex; flex-direction: column; align-items: center; gap: .6rem; font-size: .68rem; letter-spacing: .28em; text-transform: uppercase; color: var(--ivory-dim); transition: opacity .6s; pointer-events: none; }
.hint i { width: 1px; height: 38px; background: linear-gradient(to bottom, var(--ivory), transparent); transform-origin: top; animation: drip 2.2s var(--ease) infinite; }
@keyframes drip { 0% { transform: scaleY(0); opacity: 1; } 70% { transform: scaleY(1); opacity: 1; } 100% { transform: scaleY(1); opacity: 0; } }
.hint.is-hidden { opacity: 0; }
.badge { position: absolute; left: clamp(16px, 2vw, 32px); bottom: 14px; margin: 0; font-size: .62rem; letter-spacing: .16em; text-transform: uppercase; color: rgba(244,241,236,.55); pointer-events: none; }

.rail { position: absolute; right: clamp(14px, 2vw, 30px); top: 50%; translate: 0 -50%; z-index: 5; }
.rail ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; position: relative; }
.rail ol::before { content: ""; position: absolute; right: 4px; top: 6px; bottom: 6px; width: 1px; background: var(--line); }
.rail ol::after { content: ""; position: absolute; right: 4px; top: 6px; width: 1px; height: calc((100% - 12px) * var(--p)); background: var(--brass); }
.rail button { all: unset; cursor: pointer; display: flex; align-items: center; justify-content: flex-end; gap: 12px; position: relative; z-index: 1; }
.rail button span { font-size: .66rem; letter-spacing: .18em; text-transform: uppercase; opacity: 0; translate: 6px 0; transition: opacity .3s, translate .3s; white-space: nowrap; text-shadow: 0 1px 8px rgba(0,0,0,.6); }
.rail button i { width: 9px; height: 9px; border-radius: 50%; border: 1px solid var(--ivory-dim); background: var(--ink); transition: background .3s, border-color .3s, transform .3s; }
.rail button:hover span, .rail button:focus-visible span, .rail li.is-active span { opacity: 1; translate: 0 0; }
.rail li.is-active i { background: var(--brass); border-color: var(--brass); transform: scale(1.3); }
.rail li.is-past i { background: var(--ivory-dim); }

.minimap { position: absolute; right: clamp(48px, 5vw, 84px); bottom: 24px; width: clamp(150px, 15vw, 230px); aspect-ratio: 1586 / 992; border: 1px solid var(--line); border-radius: 6px; overflow: hidden; background: rgba(20,18,15,.55); backdrop-filter: blur(6px); box-shadow: 0 10px 30px rgba(0,0,0,.35); opacity: .92; }
.minimap img { width: 100%; height: 100%; object-fit: cover; opacity: .9; }
.minimap i { position: absolute; width: 11px; height: 11px; margin: -5.5px 0 0 -5.5px; border-radius: 50%; background: var(--brass); box-shadow: 0 0 0 4px rgba(196,164,106,.3), 0 0 14px rgba(196,164,106,.9); left: 0; top: 0; will-change: transform, left, top; }

/* ---------- static sections ---------- */
.details { background: var(--ivory); color: var(--ink); padding: clamp(64px, 10vw, 140px) 0; position: relative; z-index: 2; }
.details--plan { background: #ebe6dd; }
.details--contact { background: var(--ink); color: var(--ivory); }
.wrap { width: min(1120px, 90vw); margin-inline: auto; }
.wrap--narrow { width: min(560px, 90vw); }
.details h2 { margin: 0 0 2rem; font: 400 clamp(2rem, 4vw, 3.2rem)/1.05 var(--serif); }
.specs { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 0; margin: 0 0 2rem; border-top: 1px solid rgba(20,18,15,.18); }
.specs div { padding: 1.2rem 0; border-bottom: 1px solid rgba(20,18,15,.18); }
.specs dt { font-size: .7rem; letter-spacing: .18em; text-transform: uppercase; color: rgba(20,18,15,.6); }
.specs dd { margin: .3rem 0 0; font: 400 1.6rem/1.2 var(--serif); }
.note { font-size: .8rem; color: rgba(20,18,15,.6); max-width: 42rem; }
.plan { width: 100%; border-radius: 6px; box-shadow: 0 20px 60px rgba(20,18,15,.18); }
.details--contact .lead { color: var(--ivory-dim); margin: 0 0 2rem; }
form { display: grid; gap: 1.1rem; }
label { display: grid; gap: .4rem; font-size: .72rem; letter-spacing: .14em; text-transform: uppercase; color: var(--ivory-dim); }
input:not([type=checkbox]) { font: 300 1rem var(--sans); padding: .85rem 0; border: 0; border-bottom: 1px solid var(--line); background: transparent; color: var(--ivory); border-radius: 0; }
input:focus { outline: none; border-bottom-color: var(--brass); }
.check { display: flex; gap: .7rem; align-items: flex-start; text-transform: none; letter-spacing: 0; font-size: .82rem; line-height: 1.5; }
.check input { margin-top: .25rem; accent-color: var(--brass); }
.form__msg { min-height: 1.4rem; margin: 0; font-size: .85rem; color: var(--brass); }
.foot { padding: 28px 5vw; background: #0e0d0b; color: rgba(244,241,236,.5); font-size: .75rem; text-align: center; }
.foot p { margin: 0; }

.gallery { background: var(--ink); padding: 96px 5vw 48px; }
.gallery[hidden] { display: none; }
.gallery h2 { font: 400 2.4rem var(--serif); margin: 0 0 2rem; }
.gallery__opt { margin: 0 0 2rem; color: var(--ivory-dim); font-size: .9rem; display: flex; flex-wrap: wrap; align-items: center; gap: .8rem; }
.gallery figure { margin: 0 0 2rem; }
.gallery img { width: 100%; border-radius: 4px; }
.gallery figcaption { margin-top: .6rem; font-size: .75rem; letter-spacing: .2em; text-transform: uppercase; color: var(--brass); }

/* ---------- reduced motion / no-JS ---------- */
.is-reduced #track { display: none; }
.is-reduced .top { background: rgba(20,18,15,.9); }
.is-reduced #loader { transition: none; }

/* ---------- mobile: kadr 16:9 u góry, treść w panelu pod spodem ---------- */
@media (max-width: 820px) {
  :root { --header-h: 56px; }
  #track { height: 950vh; }
  .top { background: #14120f; }
  .logo { font-size: .92rem; white-space: nowrap; }
  .top__nav a:not(.btn) { display: none; }
  .btn--sm { padding: .5rem .85rem; font-size: .62rem; white-space: nowrap; }
  .canvaswrap { inset: var(--header-h) 0 auto 0; height: 56.25vw; }
  .scrim--vignette, .scrim--grad { display: none; }
  .chapters { inset: calc(var(--header-h) + 56.25vw) 0 0 0; background: linear-gradient(to bottom, #14120f, #0e0d0b); pointer-events: none; }
  .chap, .pos-tl, .pos-tr, .pos-bl, .pos-bc { left: 0; right: 0; top: 0; bottom: auto; margin: 0; width: auto; max-width: none; padding: 1.4rem 5vw 0; text-align: left; text-shadow: none; }
  .chap::before { display: none; }
  .chap h1, .chap h2 { font-size: clamp(1.75rem, 7.6vw, 2.4rem); }
  .chap .lead { max-width: none; }
  .pos-bc { text-align: left; }
  .cta { justify-content: flex-start; }
  .rail { right: 0; left: 0; top: var(--header-h); translate: 0; }
  .rail ol { display: block; height: 3px; background: var(--line); }
  .rail ol::before { display: none; }
  .rail ol::after { right: auto; left: 0; top: 0; width: calc(100% * var(--p)); height: 3px; }
  .rail li { display: none; }
  .minimap { display: none; }
  .hint { bottom: 18px; }
  .badge { bottom: 6px; left: 5vw; }
}
