/* N-Tuner — 2026 */
@view-transition { navigation: auto; }

:root {
  --bg: #0d0b10;
  --bg-2: #16131b;
  --card: #1d1923;
  --line: #2c2633;
  --text: #f4f1f6;
  --muted: #b3aabb;
  --red: #e4202a;
  --orange: #ff7a3d;
  --grad: linear-gradient(120deg, #ffb347 0%, var(--orange) 35%, var(--red) 100%);
  --radius: 20px;
  --wrap: 1180px;
  --font: "Segoe UI Variable Display", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Roboto, Arial, sans-serif;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 1.0625rem/1.65 var(--font);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
p { margin: 0 0 1em; }
h1, h2, h3 { line-height: 1.08; letter-spacing: -0.02em; margin: 0 0 .5em; font-weight: 800; text-wrap: balance; }
h1 { font-size: clamp(2.6rem, 7vw, 5.5rem); letter-spacing: -0.035em; }
h2 { font-size: clamp(1.9rem, 4vw, 3rem); }
h3 { font-size: 1.3rem; letter-spacing: -0.01em; }
:focus-visible { outline: 3px solid var(--orange); outline-offset: 3px; border-radius: 6px; }

.wrap { width: min(100% - 32px, var(--wrap)); margin-inline: auto; }
.grad-text { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.eyebrow {
  display: inline-block; font-size: .8rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase;
  color: var(--orange); margin-bottom: 1rem;
}
.lead { font-size: clamp(1.1rem, 2vw, 1.3rem); color: var(--muted); max-width: 60ch; }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 16px; z-index: 100; background: var(--text); color: var(--bg); padding: .6em 1em; border-radius: 10px; }

/* ---------- Przyciski ---------- */
.btn {
  display: inline-flex; align-items: center; gap: .55em; justify-content: center;
  min-height: 52px; padding: 0 1.5em; border-radius: 999px; border: 0;
  font: 700 1rem var(--font); text-decoration: none; cursor: pointer;
  transition: transform .2s ease, box-shadow .2s ease, background-color .2s ease;
}
.btn svg { width: 1.2em; height: 1.2em; flex: none; }
.btn-primary { background: var(--grad); color: #fff; box-shadow: 0 10px 30px -10px rgba(228, 32, 42, .7); }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 16px 36px -10px rgba(228, 32, 42, .85); }
.btn-ghost { background: rgba(255, 255, 255, .08); color: var(--text); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .22); backdrop-filter: blur(8px); }
.btn-ghost:hover { background: rgba(255, 255, 255, .16); }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; }

/* ---------- Nagłówek ---------- */
.site-header {
  position: fixed; inset: 0 0 auto; z-index: 50;
  transition: background-color .3s ease, box-shadow .3s ease;
}
.site-header.scrolled, .site-header.solid {
  background: rgba(13, 11, 16, .78); backdrop-filter: saturate(160%) blur(16px);
  box-shadow: 0 1px 0 var(--line);
}
.nav { display: flex; align-items: center; justify-content: space-between; height: 72px; }
.logo { display: block; background: #fff; border-radius: 12px; padding: 5px 8px; line-height: 0; }
.logo img { width: 112px; height: 40px; }
.menu-btn {
  display: grid; place-items: center; width: 48px; height: 48px; border-radius: 14px; border: 0;
  background: rgba(255, 255, 255, .1); color: var(--text); cursor: pointer;
}
.menu-btn svg { width: 24px; height: 24px; }
#menu {
  /* mobile: popover pełnoekranowy */
  inset: 0; width: 100%; height: 100dvh; max-width: none; max-height: none; margin: 0; border: 0; padding: 96px 24px 32px;
  background: rgba(13, 11, 16, .97); color: var(--text);
}
#menu:popover-open, #menu.open { display: flex; flex-direction: column; gap: 6px; }
/* Starsze przeglądarki bez Popover API (np. iOS 16) */
@supports not selector(:popover-open) {
  #menu { display: none; position: fixed; z-index: 60; }
  #menu.open { display: flex; }
}
#menu a {
  font-size: 2rem; font-weight: 800; letter-spacing: -0.02em; text-decoration: none;
  padding: .3em 0; border-bottom: 1px solid var(--line);
}
#menu a[aria-current="page"] { color: var(--orange); }
#menu .menu-close { position: absolute; top: 12px; right: 16px; }
#menu .btn { margin-top: 24px; font-size: 1.1rem; border: 0; }

@media (min-width: 860px) {
  .menu-btn { display: none; }
  #menu, #menu:popover-open, #menu.open {
    display: flex; flex-direction: row; align-items: center; gap: 4px;
    position: static; inset: auto; width: auto; height: auto; padding: 0; background: none; overflow: visible;
  }
  #menu .menu-close { display: none; }
  #menu a { font-size: .98rem; font-weight: 600; letter-spacing: 0; padding: .55em 1em; border: 0; border-radius: 999px; color: var(--muted); transition: color .2s, background-color .2s; }
  #menu a:hover { color: var(--text); background: rgba(255, 255, 255, .08); }
  #menu a[aria-current="page"] { color: var(--text); background: rgba(255, 255, 255, .1); }
  #menu .btn { margin: 0 0 0 10px; min-height: 44px; padding: 0 1.2em; font-size: .95rem; color: #fff; }
  #menu .btn:hover { background: var(--grad); }
}

/* ---------- Hero ---------- */
.hero {
  position: relative; min-height: min(100svh, 920px); display: flex; align-items: flex-end;
  padding: 140px 0 72px; isolation: isolate; overflow: hidden;
}
.hero-bg { position: absolute; inset: 0; z-index: -2; }
.hero-bg img { width: 100%; height: 100%; object-fit: cover; object-position: 55% 60%; }
.hero::after {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background:
    linear-gradient(180deg, rgba(13, 11, 16, .55) 0%, rgba(13, 11, 16, 0) 30%),
    linear-gradient(0deg, var(--bg) 0%, rgba(13, 11, 16, .75) 30%, rgba(13, 11, 16, 0) 70%);
}
.hero h1 { max-width: 14ch; }
.hero .lead { color: #e6dfea; margin-bottom: 2rem; }
.hero-small { min-height: 0; padding: 160px 0 56px; }
.hero-small h1 { font-size: clamp(2.4rem, 6vw, 4.2rem); max-width: none; }

.badges { display: flex; flex-wrap: wrap; gap: 10px 22px; margin-top: 2.2rem; color: var(--muted); font-size: .95rem; }
.badges span { display: inline-flex; align-items: center; gap: .5em; }
.badges svg { width: 18px; height: 18px; color: var(--orange); }

/* ---------- Sekcje ---------- */
.section { padding: clamp(64px, 10vw, 120px) 0; }
.section-alt { background: var(--bg-2); }
.section-head { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 16px 40px; margin-bottom: 40px; }
.section-head p { color: var(--muted); max-width: 46ch; margin: 0; }
.section-head h2 { margin: 0; }

.offer { display: grid; gap: 18px; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.card {
  position: relative; overflow: hidden; border-radius: var(--radius); background: var(--card);
  border: 1px solid var(--line); display: flex; flex-direction: column;
  transition: transform .3s ease, border-color .3s ease;
}
.card:hover { transform: translateY(-4px); border-color: rgba(255, 122, 61, .5); }
.card img { aspect-ratio: 4 / 3; object-fit: cover; width: 100%; transition: transform .6s ease; }
.card:hover img { transform: scale(1.04); }
.card-body { padding: 22px 22px 26px; }
.card-body p { color: var(--muted); margin: 0; font-size: .98rem; }
.card-tag {
  position: absolute; top: 14px; left: 14px; padding: .3em .8em; border-radius: 999px;
  background: rgba(13, 11, 16, .7); backdrop-filter: blur(8px); font-size: .78rem; font-weight: 700; letter-spacing: .04em;
}

.split { display: grid; gap: clamp(32px, 6vw, 72px); align-items: center; }
@media (min-width: 900px) { .split { grid-template-columns: 1.05fr 1fr; } .split.rev > :first-child { order: 2; } }
.split-media { border-radius: var(--radius); overflow: hidden; }
.split-media img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.checks { list-style: none; padding: 0; margin: 1.5rem 0 2rem; display: grid; gap: 12px; }
.checks li { display: flex; gap: 12px; align-items: flex-start; }
.checks svg { flex: none; width: 24px; height: 24px; color: var(--orange); margin-top: 2px; }

.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 18px; margin-top: 48px; }
.stat { padding: 22px; border-radius: var(--radius); background: var(--card); border: 1px solid var(--line); }
.stat strong { display: block; font-size: 2.2rem; line-height: 1.1; font-weight: 800; }
.stat span { color: var(--muted); font-size: .95rem; }

.prose { max-width: 70ch; }
.prose p { color: #d9d2de; }

/* ---------- Strona prawna ---------- */
.legal { padding-top: 140px; }
.legal h1 { font-size: clamp(2.2rem, 5vw, 3.4rem); }
.legal h2 { font-size: 1.5rem; margin-top: 2.4em; padding-top: 1em; border-top: 1px solid var(--line); }
.legal h3 { font-size: 1.1rem; margin-top: 1.6em; }
.legal ul { color: #d9d2de; padding-left: 1.2em; margin: 0 0 1em; }
.legal li { margin-bottom: .35em; }
.legal a { color: var(--orange); }
.legal small { color: var(--muted); }
.legal mark { background: rgba(255, 179, 71, .2); color: #ffcf8a; padding: 0 .3em; border-radius: 4px; }
/* ---------- Galeria ---------- */
.gallery { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr)); grid-auto-flow: dense; }
.gallery figure { margin: 0; position: relative; }
.gallery figure > figcaption { pointer-events: none; border-radius: 0 0 16px 16px; }
.gallery figcaption a { pointer-events: auto; color: #fff; text-decoration: underline; text-decoration-color: var(--orange); text-underline-offset: 3px; }
.lightbox figcaption a { color: var(--orange); }
.gallery a { position: relative; height: 100%; display: block; border-radius: 16px; overflow: hidden; background: var(--card); }
.gallery img { width: 100%; height: 100%; aspect-ratio: 3 / 2; object-fit: cover; transition: transform .5s ease, filter .5s ease; }
.gallery a:hover img { transform: scale(1.05); }
.gallery figcaption {
  position: absolute; inset: auto 0 0; padding: 40px 16px 14px; font-weight: 700; font-size: .95rem;
  background: linear-gradient(0deg, rgba(0, 0, 0, .75), transparent);
}
@media (min-width: 700px) {
  .gallery .wide { grid-column: span 2; }
  .gallery .tall { grid-row: span 2; }
  .gallery .tall img { aspect-ratio: auto; }
}
.gallery-preview { grid-template-columns: repeat(auto-fill, minmax(min(100%, 220px), 1fr)); }

.lightbox {
  border: 0; padding: 0; margin: 0; width: 100vw; height: 100dvh; max-width: none; max-height: none;
  background: rgba(8, 6, 10, .96); color: var(--text);
}
.lightbox[open] { display: grid; grid-template-rows: 1fr auto; }
.lightbox::backdrop { background: rgba(0, 0, 0, .8); }
.lightbox figure { margin: 0; display: grid; place-items: center; min-height: 0; padding: 64px 12px 0; }
.lightbox img { max-width: 100%; max-height: calc(100dvh - 150px); width: auto; object-fit: contain; border-radius: 10px; }
.lightbox figcaption { text-align: center; padding: 16px; font-weight: 700; }
.lb-btn {
  position: absolute; display: grid; place-items: center; width: 52px; height: 52px; border-radius: 50%;
  border: 0; background: rgba(255, 255, 255, .12); color: #fff; cursor: pointer; transition: background-color .2s;
}
.lb-btn:hover { background: rgba(255, 255, 255, .25); }
.lb-btn svg { width: 24px; height: 24px; }
.lb-close { top: 12px; right: 12px; }
.lb-prev, .lb-next { top: 50%; translate: 0 -50%; }
.lb-prev { left: 12px; }
.lb-next { right: 12px; }
.lb-count { position: absolute; top: 24px; left: 20px; color: var(--muted); font-size: .9rem; }

/* ---------- Kontakt ---------- */
.contact-grid { display: grid; gap: 18px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.contact-card {
  display: flex; flex-direction: column; gap: 6px; padding: 26px; border-radius: var(--radius);
  background: var(--card); border: 1px solid var(--line); text-decoration: none; transition: border-color .25s, transform .25s;
}
a.contact-card:hover { border-color: rgba(255, 122, 61, .6); transform: translateY(-3px); }
.contact-card svg { width: 30px; height: 30px; color: var(--orange); margin-bottom: 10px; }
.contact-card small { color: var(--muted); font-size: .9rem; }
.contact-card strong { font-size: 1.3rem; letter-spacing: -0.01em; overflow-wrap: anywhere; }

.map {
  margin-top: 18px; position: relative; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line);
  aspect-ratio: 16 / 9; min-height: 300px; background: var(--card) url("../img/opt/zamek-800.jpg") center / cover;
}
.map::before { content: ""; position: absolute; inset: 0; background: rgba(13, 11, 16, .78); }
.map-consent { position: absolute; inset: 0; display: grid; align-content: center; justify-items: center; text-align: center; gap: 14px; padding: 24px; }
.map-consent p { color: var(--muted); max-width: 46ch; margin: 0; font-size: .95rem; }
.map iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* ---------- CTA ---------- */
.cta {
  position: relative; overflow: hidden; border-radius: 28px; padding: clamp(36px, 6vw, 72px);
  background: var(--grad); color: #fff; isolation: isolate;
}
.cta::after {
  content: ""; position: absolute; inset: auto -10% -60% auto; width: 60%; aspect-ratio: 1; z-index: -1;
  background: radial-gradient(circle, rgba(255, 255, 255, .28), transparent 65%);
}
.cta h2 { max-width: 18ch; }
.cta p { max-width: 50ch; opacity: .92; }
.cta .btn-primary { background: #fff; color: var(--red); box-shadow: 0 12px 30px -12px rgba(0, 0, 0, .5); }
.cta .btn-ghost { background: rgba(0, 0, 0, .15); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .5); }

/* ---------- Stopka ---------- */
.site-footer { border-top: 1px solid var(--line); padding: 56px 0 120px; color: var(--muted); font-size: .95rem; }
@media (min-width: 860px) { .site-footer { padding-bottom: 48px; } }
.footer-grid { display: grid; gap: 32px; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.site-footer h3 { color: var(--text); font-size: 1rem; margin-bottom: .8em; }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.site-footer a { text-decoration: none; }
.site-footer a:hover { color: var(--text); }
.site-footer a.partner { color: var(--text); text-decoration: underline; text-decoration-color: var(--orange); text-underline-offset: 3px; }
.site-footer a.partner:hover { color: var(--orange); }
.social { display: flex; gap: 10px; margin-top: 14px; }
.social a {
  display: grid; place-items: center; width: 44px; height: 44px; border-radius: 12px;
  background: rgba(255, 255, 255, .07); transition: background-color .2s, color .2s;
}
.social a:hover { background: var(--red); color: #fff; }
.social svg { width: 20px; height: 20px; }
.copy { margin-top: 40px; padding-top: 24px; border-top: 1px solid var(--line); font-size: .85rem; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; }

/* Pasek akcji na telefonie */
.callbar {
  position: fixed; z-index: 40; left: 12px; right: 12px; bottom: max(12px, env(safe-area-inset-bottom));
  display: grid; grid-template-columns: 1fr 1fr; gap: 8px; padding: 8px; border-radius: 20px;
  background: rgba(22, 19, 27, .85); backdrop-filter: blur(16px); box-shadow: 0 10px 40px rgba(0, 0, 0, .5), inset 0 0 0 1px var(--line);
}
.callbar .btn { min-height: 48px; padding: 0 1em; }
@media (min-width: 860px) { .callbar { display: none; } }

/* ---------- Animacje (progressive enhancement) ---------- */
@supports (animation-timeline: view()) {
  .reveal { animation: reveal linear both; animation-timeline: view(); animation-range: entry 0% entry 60%; }
  @keyframes reveal { from { opacity: 0; translate: 0 40px; } to { opacity: 1; translate: 0 0; } }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
