/* ===== Reset ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
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; }
}
img, picture, svg, iframe { display: block; max-width: 100%; }
img { height: auto; }
body { min-height: 100vh; text-rendering: optimizeLegibility; -webkit-font-smoothing: antialiased; }
a { color: inherit; }
table { border-collapse: collapse; width: 100%; }

/* Sticky-header offset for in-page anchor targets */
[id] { scroll-margin-top: 76px; }

/* ===== Tokeny ===== */
:root {
  --c-white: #ffffff;
  --c-bg: #ffffff;
  --c-bg-alt: #f2f2f0;
  --c-fg: #2b2b2b;
  --c-muted: #6b6b67;
  --c-accent: #293133;
  --c-line: #e2e2de;
  --c-warm: #5c6b3f;
  --c-warm-soft: color-mix(in srgb, var(--c-warm) 10%, var(--c-bg-alt));

  --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;

  --space-1: .25rem; --space-2: .5rem; --space-3: .75rem; --space-4: 1rem;
  --space-5: 1.5rem; --space-6: 2rem; --space-7: 3rem; --space-8: 5rem;

  --maxw: 1120px;
  --radius: 8px;
}

body {
  font-family: var(--font);
  color: var(--c-fg);
  background: var(--c-bg);
  font-size: clamp(1rem, 0.95rem + 0.2vw, 1.0625rem);
  line-height: 1.65;
}

:focus-visible { outline: 2px solid var(--c-accent); outline-offset: 2px; }

.container { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: var(--space-5); }
.visually-hidden {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ===== Header / Nav ===== */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--c-white) 92%, transparent);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--c-line);
}
.site-header__inner { display: flex; align-items: center; justify-content: space-between; min-height: 64px; }
.brand { display: flex; flex-direction: column; gap: .1rem; text-decoration: none; line-height: 1; }
.brand__name { font-size: .68rem; font-weight: 600; text-transform: uppercase; letter-spacing: .18em; color: var(--c-muted); }
.brand__num { font-size: 1.7rem; font-weight: 700; letter-spacing: -.01em; color: var(--c-warm); }
.nav ul { list-style: none; display: flex; gap: var(--space-5); align-items: center; }
.nav a { text-decoration: none; font-size: .95rem; color: var(--c-muted); transition: color .15s; }
.nav a:hover, .nav a:focus-visible { color: var(--c-fg); }
.nav__cta { color: var(--c-fg) !important; border: 1px solid var(--c-fg); padding: .4rem .9rem; border-radius: var(--radius); }
.nav__cta:hover { background: var(--c-fg); color: var(--c-white) !important; }

.nav-toggle { display: none; }
html:not(.js) .nav-toggle { display: none; }

@media (max-width: 820px) {
  html.js .nav-toggle {
    display: inline-flex; align-items: center; justify-content: center;
    width: 44px; height: 44px; background: none; border: 1px solid var(--c-line);
    border-radius: var(--radius); cursor: pointer;
  }
  .nav-toggle__bar, .nav-toggle__bar::before, .nav-toggle__bar::after {
    content: ""; display: block; width: 18px; height: 2px; background: var(--c-fg); position: relative;
  }
  .nav-toggle__bar::before { position: absolute; top: -6px; }
  .nav-toggle__bar::after { position: absolute; top: 6px; }
  html.js .nav {
    position: fixed; inset: 64px 0 auto 0; background: var(--c-white);
    border-bottom: 1px solid var(--c-line); transform: translateY(-120%); visibility: hidden;
    transition: transform .25s ease, visibility .25s; padding: var(--space-4) 0;
  }
  html.js body[data-nav-open] .nav { transform: translateY(0); visibility: visible; }
  html.js .nav ul { flex-direction: column; gap: 0; }
  html:not(.js) .nav ul { flex-flow: row wrap; }
  .nav li { width: 100%; }
  .nav a { display: block; padding: var(--space-4) var(--space-5); font-size: 1.05rem; }
  html:not(.js) .nav li { width: auto; }
  html:not(.js) .nav a { padding: var(--space-2) var(--space-4); }
  .nav__cta { border: 0; margin: var(--space-2) var(--space-5) 0; text-align: center; }
}

/* ===== Hero ===== */
.hero { position: relative; color: var(--c-white); min-height: min(78vh, 680px); display: flex; align-items: flex-end; }
.hero__bg { position: absolute; inset: 0; }
.hero__bg img { width: 100%; height: 100%; object-fit: cover; }
.hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(20,22,23,.15) 0%, rgba(20,22,23,.78) 100%); }
.hero__content { position: relative; z-index: 1; padding-block: var(--space-8) var(--space-7); }
.hero__eyebrow { text-transform: uppercase; letter-spacing: .18em; font-size: .78rem; opacity: .9; margin-bottom: var(--space-3); }
.hero h1 { font-size: clamp(2rem, 1.3rem + 3.4vw, 3.6rem); line-height: 1.08; font-weight: 600; max-width: 16ch; }
.hero__lead { margin-top: var(--space-4); max-width: 46ch; font-size: 1.1rem; opacity: .92; }
.hero__actions { margin-top: var(--space-5); display: flex; gap: var(--space-3); flex-wrap: wrap; }
.hero :focus-visible { outline-color: var(--c-white); }

.btn { display: inline-block; padding: .8rem 1.5rem; border-radius: var(--radius); text-decoration: none; font-weight: 500; font-size: .95rem; transition: background .15s, color .15s; }
.btn--solid { background: var(--c-warm); color: var(--c-white); }
.btn--solid:hover { background: color-mix(in srgb, var(--c-warm) 85%, black); }
.btn--ghost { border: 1px solid rgba(255,255,255,.6); color: var(--c-white); }
.btn--ghost:hover { background: rgba(255,255,255,.12); }

/* ===== Sections ===== */
.section { padding-block: clamp(var(--space-7), 6vw, var(--space-8)); }
.section--alt { background: var(--c-bg-alt); }
html.js .section { opacity: 0; transform: translateY(16px); transition: opacity .5s ease, transform .5s ease; }
html.js .section.is-visible { opacity: 1; transform: translateY(0); }
.section h2 { font-size: clamp(1.6rem, 1.2rem + 1.6vw, 2.3rem); font-weight: 600; margin-bottom: var(--space-5); letter-spacing: -.01em; }
.section h3 { font-size: 1.15rem; font-weight: 600; margin: var(--space-6) 0 var(--space-3); }
.section__intro { color: var(--c-muted); max-width: 52ch; margin-bottom: var(--space-5); }
.section__note { color: var(--c-muted); font-size: .9rem; margin-top: var(--space-4); max-width: 60ch; }
.prose p { max-width: 62ch; margin-bottom: var(--space-4); }
.is-muted { color: var(--c-muted); font-style: italic; }

/* ===== Ikony ===== */
.icon { width: 22px; height: 22px; stroke: var(--c-muted); stroke-width: 1.5; fill: none; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }

/* ===== Info list (punkty z ikoną) ===== */
.info-list { list-style: none; display: grid; gap: var(--space-5); }
.info-list li { display: flex; gap: var(--space-4); align-items: flex-start; }
.info-list .icon { width: 26px; height: 26px; margin-top: .2rem; stroke: var(--c-warm); }
.info-list__label { display: block; font-size: 1.05rem; margin-bottom: var(--space-2); }
.info-list p { max-width: 62ch; }

/* ===== Facts ===== */
.facts { list-style: none; display: grid; gap: var(--space-4); grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); margin-top: var(--space-6); }
.facts li { display: grid; gap: var(--space-2); background: var(--c-warm-soft); border-top: 3px solid var(--c-warm); border-radius: var(--radius); padding: var(--space-4); }
.facts__num { display: block; font-size: 1.5rem; font-weight: 600; }
.facts__label { display: block; color: var(--c-muted); font-size: .9rem; }

/* ===== Cards ===== */
.cards { display: grid; gap: var(--space-5); grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.card { background: var(--c-white); border: 1px solid var(--c-line); padding: var(--space-5); border-radius: var(--radius); transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease; }
.card:hover, .card:focus-within { transform: translateY(-4px); box-shadow: 0 8px 20px rgba(0,0,0,.08); border-color: var(--c-accent); }
.section--alt .card { background: var(--c-white); }
.card h3 { margin-top: 0; display: flex; align-items: baseline; justify-content: space-between; gap: var(--space-2); }
.card__status { font-size: .72rem; text-transform: uppercase; letter-spacing: .12em; color: var(--c-white); background: var(--c-warm); padding: .25rem .5rem; border-radius: var(--radius); white-space: nowrap; }
.card__specs { display: grid; gap: var(--space-3); margin-top: var(--space-4); }
.card__specs > div { display: flex; justify-content: space-between; gap: var(--space-3); }
.card__specs dt { color: var(--c-muted); font-size: .9rem; }
.card__specs dd { font-weight: 600; white-space: nowrap; }

.card__quick { display: flex; flex-wrap: wrap; gap: var(--space-4); margin-bottom: var(--space-4); padding-bottom: var(--space-4); border-bottom: 1px solid var(--c-line); }
.quick-stat { display: flex; align-items: center; gap: var(--space-2); font-size: .9rem; }
.quick-stat strong { font-weight: 600; }

/* ===== Stat grid (zamiennik tabeli dla krótkich zestawień) ===== */
.stat-grid { list-style: none; display: grid; gap: var(--space-3); grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); margin: var(--space-5) 0 0; }
.stat-grid li { background: var(--c-bg-alt); border-radius: var(--radius); padding: var(--space-3) var(--space-4); }
.section--alt .stat-grid li { background: var(--c-white); }
.stat-grid strong { display: block; font-size: 1.25rem; font-weight: 600; font-variant-numeric: tabular-nums; }
.stat-grid span { display: block; color: var(--c-muted); font-size: .85rem; }

/* ===== Tables ===== */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; border: 1px solid var(--c-line); border-radius: var(--radius); }
.table-wrap:focus-visible { outline: 2px solid var(--c-accent); outline-offset: 2px; }
table { min-width: 380px; }
caption { text-align: left; }
th, td { text-align: left; padding: .85rem 1.1rem; border-bottom: 1px solid var(--c-line); }
thead th { background: var(--c-bg-alt); font-size: .82rem; text-transform: uppercase; letter-spacing: .06em; color: var(--c-muted); }
tbody th { font-weight: 500; }
td { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
tr:last-child th, tr:last-child td { border-bottom: 0; }
.is-total th, .is-total td { font-weight: 700; background: color-mix(in srgb, var(--c-accent) 6%, transparent); }

/* ===== Spec accordions ===== */
.spec { border-bottom: 1px solid var(--c-line); }
.spec summary { cursor: pointer; padding: var(--space-4) 0; font-weight: 600; list-style: none; display: flex; justify-content: space-between; align-items: center; }
.spec summary::-webkit-details-marker { display: none; }
.spec summary::after { content: "+"; font-weight: 400; font-size: 1.3rem; color: var(--c-muted); }
.spec[open] summary::after { content: "\2212"; }
.spec ul { padding: 0 0 var(--space-5) var(--space-5); display: grid; gap: var(--space-3); color: var(--c-fg); }
.spec li { max-width: 68ch; }

/* ===== Gallery ===== */
.gallery { display: grid; gap: var(--space-3); grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.gallery__item { overflow: hidden; border-radius: var(--radius); background: var(--c-bg-alt); }
.gallery__item a { display: block; }
.gallery__item a:focus-visible { outline-offset: -3px; }
.gallery__item img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; transition: transform .3s ease; }
.gallery__item a:hover img, .gallery__item a:focus-visible img { transform: scale(1.03); }

/* ===== Map ===== */
.map { border: 1px solid var(--c-line); border-radius: var(--radius); overflow: hidden; }
.map iframe { width: 100%; height: clamp(280px, 40vw, 440px); border: 0; }

/* ===== Contact ===== */
.contact { list-style: none; display: grid; gap: var(--space-4); max-width: 420px; }
.contact li { display: grid; gap: var(--space-1); border-top: 1px solid var(--c-line); padding-top: var(--space-3); }
.contact__label { color: var(--c-muted); font-size: .82rem; text-transform: uppercase; letter-spacing: .1em; }
.contact__value { font-size: 1.15rem; font-weight: 500; text-decoration: none; }
a.contact__value:hover { text-decoration: underline; }

/* ===== Footer ===== */
.site-footer { background: var(--c-accent); color: color-mix(in srgb, var(--c-white) 80%, transparent); padding-block: var(--space-7); font-size: .85rem; }
.site-footer__brand { color: var(--c-white); font-weight: 600; margin-bottom: var(--space-3); }
.site-footer__disclaimer { max-width: 80ch; margin-bottom: var(--space-3); line-height: 1.6; }
.site-footer__meta { color: color-mix(in srgb, var(--c-white) 55%, transparent); font-size: .8rem; margin-top: var(--space-3); }

/* ===== Lightbox ===== */
.lightbox { position: fixed; inset: 0; z-index: 100; display: none; align-items: center; justify-content: center;
  background: rgba(15,16,17,.94); padding: clamp(1rem, 4vw, 3rem); }
.lightbox.is-open { display: flex; }
.lightbox__stage { max-width: 1100px; width: 100%; text-align: center; }
.lightbox__stage img { width: 100%; max-height: 78vh; object-fit: contain; }
.lightbox__stage figcaption { color: rgba(255,255,255,.75); font-size: .85rem; margin-top: var(--space-3); }
.lightbox__close, .lightbox__nav { position: absolute; background: rgba(255,255,255,.1); color: #fff; border: 0;
  cursor: pointer; width: 48px; height: 48px; border-radius: 50%; font-size: 1.5rem; line-height: 1; }
.lightbox__close { top: 1rem; right: 1rem; }
.lightbox__nav--prev { left: 1rem; top: 50%; transform: translateY(-50%); }
.lightbox__nav--next { right: 1rem; top: 50%; transform: translateY(-50%); }
.lightbox__close:hover, .lightbox__nav:hover { background: rgba(255,255,255,.22); }
@media (max-width: 620px) {
  .lightbox__nav { bottom: 1rem; top: auto; transform: none; }
  .lightbox__nav--prev { left: 1rem; } .lightbox__nav--next { right: 1rem; }
}
