/* Pryzma landing — style na tokenach z design-system/tokens.css (ładowane jako tokens.css).
   Zasady: tylko zmienne --rz-* semantyczne, zero hex-ów; mobile-first; kontrast AA; bez fontów z sieci. */

/* ---------- reset minimalny ---------- */
*, *::before, *::after { box-sizing: border-box; }
/* scroll-padding-top: kotwice (#faq, #kontakt…) nie chowają nagłówka sekcji pod sticky headerem (64 px + oddech) */
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(64px + var(--rz-space-4)); }
body {
  margin: 0;
  background: var(--rz-bg);
  color: var(--rz-text);
  font-family: var(--rz-font-sans);
  font-feature-settings: var(--rz-font-features);
  font-size: var(--rz-text-md);
  line-height: var(--rz-leading);
  -webkit-font-smoothing: antialiased;
}
img, svg { display: block; max-width: 100%; }
h1, h2, h3, p, ul, ol, figure, blockquote { margin: 0; }
ul, ol { padding: 0; }
a { color: var(--rz-accent); text-underline-offset: 3px; }
a:hover { color: var(--rz-accent-hover); }
:focus-visible { outline: 3px solid var(--rz-focus); outline-offset: 3px; border-radius: var(--rz-radius-sm); }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: 0ms !important; animation: none !important; }
}

/* ---------- utility ---------- */
.container { width: min(100% - 2 * var(--rz-space-4), 1120px); margin-inline: auto; }
.container--narrow { max-width: 760px; }
.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip-link {
  position: absolute; left: var(--rz-space-4); top: -100px;
  background: var(--rz-accent); color: var(--rz-text-on-accent);
  padding: var(--rz-space-2) var(--rz-space-4); border-radius: var(--rz-radius-sm); z-index: 100;
}
.skip-link:focus { top: var(--rz-space-4); }
.placeholder { color: var(--rz-text-3); font-style: italic; }
/* ikony: te same ścieżki co web/src/app/ui/icon (siatka 24×24, obrys currentColor) */
.icon { width: var(--rz-icon); height: var(--rz-icon); flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- typografia ---------- */
h1 { font-size: clamp(var(--rz-text-xl), 6vw + 8px, var(--rz-text-display)); line-height: 1.08; font-weight: var(--rz-weight-black); letter-spacing: -0.02em; }
h1 em { font-style: normal; color: var(--rz-accent); }
h2 { font-size: clamp(var(--rz-text-lg), 3.5vw + 8px, var(--rz-text-2xl)); line-height: 1.15; font-weight: var(--rz-weight-bold); letter-spacing: -0.01em; margin-bottom: var(--rz-space-6); }
h3 { font-size: var(--rz-text-lg); font-weight: var(--rz-weight-bold); margin-bottom: var(--rz-space-2); }
.lead { font-size: var(--rz-text-lg); color: var(--rz-text-2); margin-block: var(--rz-space-6); max-width: 36em; }
.eyebrow { color: var(--rz-accent); font-weight: var(--rz-weight-bold); text-transform: uppercase; letter-spacing: 0.08em; font-size: var(--rz-text-sm); margin-bottom: var(--rz-space-3); }
.section__intro { color: var(--rz-text-2); font-size: var(--rz-text-lg); max-width: 40em; margin-top: calc(-1 * var(--rz-space-3)); margin-bottom: var(--rz-space-8); }

/* ---------- przyciski ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--rz-space-2);
  min-height: var(--rz-control-h); padding: 0 var(--rz-control-pad-x);
  border-radius: var(--rz-radius-md); border: 1px solid var(--rz-border-strong);
  background: var(--rz-surface-2); color: var(--rz-text);
  font: inherit; font-weight: var(--rz-weight-bold); text-decoration: none; cursor: pointer;
  transition: background var(--rz-motion-in), border-color var(--rz-motion-in), transform var(--rz-motion-in);
}
.btn:hover { background: var(--rz-surface-3); color: var(--rz-text); }
.btn:active { transform: translateY(1px); }
.btn--primary { background: var(--rz-accent); border-color: var(--rz-accent); color: var(--rz-text-on-accent); }
.btn--primary:hover { background: var(--rz-accent-hover); border-color: var(--rz-accent-hover); color: var(--rz-text-on-accent); }
.btn--primary:active { background: var(--rz-accent-active); }
.btn--ghost { background: transparent; }
.btn--large { min-height: var(--rz-control-h-lg); padding-inline: var(--rz-space-6); font-size: var(--rz-text-md); }
.btn--small { min-height: var(--rz-touch-min); padding-inline: var(--rz-space-3); font-size: var(--rz-text-sm); }
.btn[disabled], .btn[aria-busy="true"] { opacity: 0.6; cursor: progress; }

/* ---------- nagłówek ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--rz-bg) 88%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--rz-border);
}
.site-header__inner { display: flex; align-items: center; justify-content: space-between; gap: var(--rz-space-4); min-height: 64px; }
.logo { display: inline-flex; align-items: center; min-height: var(--rz-touch-min); gap: var(--rz-space-3); text-decoration: none; color: var(--rz-text); }
.logo__mark { width: 32px; height: 32px; }
.logo__bg { fill: var(--rz-surface-2); }
.logo__flame { fill: var(--rz-accent); }
.brand { font-weight: var(--rz-weight-black); font-size: var(--rz-text-lg); letter-spacing: -0.02em; }
.site-nav { display: flex; align-items: center; gap: var(--rz-space-4); }
.site-nav a:not(.btn) { display: none; color: var(--rz-text-2); text-decoration: none; font-weight: var(--rz-weight-medium); }
.site-nav a:not(.btn):hover { color: var(--rz-text); }
@media (min-width: 720px) { .site-nav a:not(.btn) { display: inline-flex; align-items: center; min-height: var(--rz-touch-min); } }

/* ---------- hero ---------- */
.hero { padding-block: var(--rz-space-12) var(--rz-space-8); position: relative; overflow: hidden; }
.hero::before {
  content: ""; position: absolute; inset: auto -20% -40% -20%; height: 60%;
  background: radial-gradient(ellipse at center, var(--rz-status-low-bg), transparent 70%);
  pointer-events: none;
}
.hero__inner { display: grid; gap: var(--rz-space-8); align-items: center; position: relative; }
.hero__actions { display: flex; flex-wrap: wrap; gap: var(--rz-space-3); }
.hero__facts { display: grid; gap: var(--rz-space-2) var(--rz-space-4); margin-top: var(--rz-space-6); list-style: none; color: var(--rz-text-2); font-size: var(--rz-text-sm); }
.hero__facts li::before { content: "✓ "; color: var(--rz-status-ok); font-weight: var(--rz-weight-bold); }
.hero__visual { justify-self: center; width: min(100%, 300px); }
.hero__visual .phone { filter: drop-shadow(var(--rz-shadow-2)); }
/* podpis pod makietami — dane na ilustracjach są przykładowe, nie pochodzą od klienta */
.mock-note { margin-top: var(--rz-space-3); text-align: center; color: var(--rz-text-3); font-size: var(--rz-text-sm); }
@media (min-width: 560px) { .hero__facts { display: flex; flex-wrap: wrap; } }
@media (min-width: 880px) {
  .hero { padding-block: var(--rz-space-16); }
  .hero__inner { grid-template-columns: 1.2fr 0.8fr; }
  .hero__visual { width: min(100%, 320px); }
}

/* ---------- ilustracje SVG (klasy zamiast atrybutów style — CSP bez unsafe-inline) ---------- */
.phone__body { fill: var(--rz-surface-3); }
.phone__screen { fill: var(--rz-bg); stroke: var(--rz-border); stroke-width: 1; }
.phone__notch { fill: var(--rz-surface-3); }
.store-card__bg { fill: var(--rz-surface); stroke: var(--rz-border); stroke-width: 1.5; }
.bar__track { fill: var(--rz-surface-3); }
.bar__fill--low { fill: var(--rz-status-low); }
.bar__fill--ok { fill: var(--rz-status-ok); }
.bar__threshold { stroke: var(--rz-text-3); stroke-width: 2; stroke-dasharray: 3 3; }
.key { fill: var(--rz-surface-2); stroke: var(--rz-border-strong); stroke-width: 1; }
.tile { fill: var(--rz-surface); stroke: var(--rz-border); stroke-width: 1; }
.tile--active { stroke: var(--rz-accent); stroke-width: 2; fill: var(--rz-surface-2); }
.cta { fill: var(--rz-accent); }
.badge--low { fill: var(--rz-status-low-bg); stroke: var(--rz-status-low); stroke-width: 1; }
.svg-text { font-family: var(--rz-font-sans); fill: var(--rz-text); font-size: 16px; }
.svg-text--xs { font-size: 12px; }
.svg-text--sm { font-size: 14px; }
.svg-text--md { font-size: 16px; }
.svg-text--lg { font-size: 20px; }
.svg-text--strong { font-weight: var(--rz-weight-bold); }
.svg-text--muted { fill: var(--rz-text-3); }
.svg-text--low { fill: var(--rz-status-low); font-weight: var(--rz-weight-bold); }
.svg-text--badge { fill: var(--rz-status-low); font-weight: var(--rz-weight-bold); letter-spacing: 0.04em; }
.svg-text--key { font-size: 36px; font-weight: var(--rz-weight-bold); fill: var(--rz-text); }
.svg-text--counter { font-size: 56px; font-weight: var(--rz-weight-black); fill: var(--rz-text); font-variant-numeric: tabular-nums; }
.svg-text--counter-sm { font-size: 36px; font-weight: var(--rz-weight-black); fill: var(--rz-text); font-variant-numeric: tabular-nums; }
.svg-text--cta { font-size: 24px; font-weight: var(--rz-weight-black); fill: var(--rz-text-on-accent); }

/* ---------- sekcje ---------- */
.section { padding-block: var(--rz-space-12); }
.section--alt { background: var(--rz-surface); border-block: 1px solid var(--rz-border); }
@media (min-width: 880px) { .section { padding-block: var(--rz-space-16); } }

.grid { display: grid; gap: var(--rz-space-4); }
@media (min-width: 720px) { .grid--3 { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 640px) { .grid--4 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1040px) { .grid--4 { grid-template-columns: repeat(4, 1fr); } }

.card {
  background: var(--rz-surface); border: 1px solid var(--rz-border); border-radius: var(--rz-radius-lg);
  padding: var(--rz-space-6); box-shadow: var(--rz-shadow-1);
}
.section--alt .card { background: var(--rz-surface-2); }
.card p { color: var(--rz-text-2); }
.card__icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: var(--rz-touch-min); height: var(--rz-touch-min); border-radius: var(--rz-radius-md);
  background: var(--rz-surface-3); color: var(--rz-accent); margin-bottom: var(--rz-space-3);
}

/* kroki */
.steps { list-style: none; display: grid; gap: var(--rz-space-6); counter-reset: step; }
@media (min-width: 720px) { .steps { grid-template-columns: repeat(3, 1fr); } }
.step { position: relative; padding-top: var(--rz-space-2); }
.step__num {
  display: inline-flex; align-items: center; justify-content: center;
  width: var(--rz-counter-size); height: var(--rz-counter-size); border-radius: var(--rz-radius-pill);
  background: var(--rz-accent); color: var(--rz-text-on-accent); font-weight: var(--rz-weight-black); font-size: var(--rz-text-lg);
  margin-bottom: var(--rz-space-4);
}
.step p { color: var(--rz-text-2); }

/* split (dla palacza / dla właściciela) */
.split { display: grid; gap: var(--rz-space-8); align-items: center; }
@media (min-width: 880px) {
  .split { grid-template-columns: 1fr 1fr; }
  .split--reverse .split__copy { order: 2; }
  .split--reverse .split__aside { order: 1; }
}
.checklist { list-style: none; display: grid; gap: var(--rz-space-3); color: var(--rz-text-2); }
.checklist li { padding-left: var(--rz-space-8); position: relative; }
.checklist li::before {
  content: "✓"; position: absolute; left: 0; top: 0;
  width: 24px; height: 24px; border-radius: var(--rz-radius-pill); display: inline-flex; align-items: center; justify-content: center;
  background: var(--rz-status-ok-bg); color: var(--rz-status-ok); font-weight: var(--rz-weight-bold); font-size: var(--rz-text-sm);
}
.quote {
  background: var(--rz-surface); border: 1px solid var(--rz-border); border-left: 4px solid var(--rz-accent);
  border-radius: var(--rz-radius-lg); padding: var(--rz-space-6);
}
.quote p { font-size: var(--rz-text-xl); font-weight: var(--rz-weight-bold); line-height: 1.25; font-variant-numeric: tabular-nums; }
.quote footer { color: var(--rz-text-3); margin-top: var(--rz-space-3); font-size: var(--rz-text-sm); }
figure.split__aside { margin: 0; }
.store-card { width: 100%; max-width: 420px; margin-inline: auto; filter: drop-shadow(var(--rz-shadow-2)); }

/* ---------- zeszyt / arkusz vs system ---------- */
.compare { background: var(--rz-surface-2); border: 1px solid var(--rz-border); border-radius: var(--rz-radius-lg); overflow: hidden; }
.compare__table { width: 100%; border-collapse: collapse; table-layout: fixed; font-size: var(--rz-text-sm); }
.compare__table th, .compare__table td { padding: var(--rz-space-3); text-align: left; vertical-align: top; border-top: 1px solid var(--rz-border); overflow-wrap: break-word; hyphens: auto; }
.compare__table thead th { border-top: 0; font-weight: var(--rz-weight-bold); color: var(--rz-text-2); }
.compare__table thead th:first-child { width: 26%; }
.compare__table tbody th { font-weight: var(--rz-weight-bold); color: var(--rz-text); }
.compare__table td { color: var(--rz-text-2); }
.compare__table .compare__ours { color: var(--rz-text); background: var(--rz-status-low-bg); }
.compare__table thead .compare__ours { color: var(--rz-text); border-top: 3px solid var(--rz-accent); }
@media (min-width: 720px) {
  .compare__table { font-size: var(--rz-text-md); }
  .compare__table th, .compare__table td { padding: var(--rz-space-4) var(--rz-space-6); }
}

/* ---------- cennik ---------- */
.pricing { align-items: stretch; }
.plan {
  display: flex; flex-direction: column; gap: var(--rz-space-3);
  background: var(--rz-surface); border: 1px solid var(--rz-border); border-radius: var(--rz-radius-lg);
  padding: var(--rz-space-6); position: relative;
}
.plan--featured { border-color: var(--rz-accent); box-shadow: 0 0 0 1px var(--rz-accent), var(--rz-shadow-2); }
.plan__tag {
  position: absolute; top: calc(-1 * var(--rz-space-3)); left: var(--rz-space-6);
  background: var(--rz-accent); color: var(--rz-text-on-accent); font-size: var(--rz-text-xs); font-weight: var(--rz-weight-bold);
  padding: 2px var(--rz-space-3); border-radius: var(--rz-radius-pill); text-transform: uppercase; letter-spacing: 0.06em;
}
.plan h3 { margin: 0; }
.plan__price { display: flex; align-items: baseline; gap: var(--rz-space-2); flex-wrap: wrap; }
.plan__amount { font-size: var(--rz-text-2xl); font-weight: var(--rz-weight-black); letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.plan__amount--text { font-size: var(--rz-text-xl); color: var(--rz-text-2); }
.plan__period { color: var(--rz-text-3); font-size: var(--rz-text-sm); }
.plan__for { color: var(--rz-text-2); }
.plan__features { list-style: none; display: grid; gap: var(--rz-space-2); color: var(--rz-text-2); flex: 1; align-content: start; margin-block: var(--rz-space-2) var(--rz-space-4); }
.plan__features li { padding-left: var(--rz-space-6); position: relative; }
.plan__features > li::before, .plan__sub > li::before { content: "•"; position: absolute; left: var(--rz-space-2); color: var(--rz-accent); font-weight: var(--rz-weight-black); }
/* wyróżnik planu Firma: statystyki kosztów */
.plan__features .plan__key { padding: var(--rz-space-3); background: var(--rz-status-low-bg); border: 1px solid var(--rz-accent); border-radius: var(--rz-radius-md); }
.plan__features .plan__key::before { content: none; }
.plan__key strong { color: var(--rz-text); }
.plan__sub { list-style: none; display: grid; gap: var(--rz-space-2); margin-top: var(--rz-space-2); font-size: var(--rz-text-sm); color: var(--rz-text); }
.plan__sub li { padding-left: var(--rz-space-6); position: relative; }
.pricing__note { margin-top: var(--rz-space-6); color: var(--rz-text-2); font-size: var(--rz-text-sm); max-width: 60em; }

/* ---------- FAQ ---------- */
.faq { display: grid; gap: var(--rz-space-2); }
.faq__item { background: var(--rz-surface-2); border: 1px solid var(--rz-border); border-radius: var(--rz-radius-md); }
.faq__item summary {
  cursor: pointer; list-style: none; padding: var(--rz-space-4) var(--rz-space-12) var(--rz-space-4) var(--rz-space-4);
  font-weight: var(--rz-weight-bold); position: relative; min-height: var(--rz-touch-min);
}
.faq__item summary::-webkit-details-marker { display: none; }
.faq__item summary::after {
  content: "+"; position: absolute; right: var(--rz-space-4); top: 50%; transform: translateY(-50%);
  width: 28px; height: 28px; border-radius: var(--rz-radius-pill); display: inline-flex; align-items: center; justify-content: center;
  background: var(--rz-surface-3); color: var(--rz-accent); font-weight: var(--rz-weight-black); font-size: var(--rz-text-lg);
}
.faq__item[open] summary::after { content: "−"; }
.faq__item p { padding: 0 var(--rz-space-4) var(--rz-space-4); color: var(--rz-text-2); }

/* ---------- formularz ---------- */
.form { display: grid; gap: var(--rz-space-4); background: var(--rz-surface); border: 1px solid var(--rz-border); border-radius: var(--rz-radius-lg); padding: var(--rz-space-6); }
.field { display: grid; gap: var(--rz-space-2); }
.field label { font-weight: var(--rz-weight-medium); }
.field__hint { color: var(--rz-text-3); font-weight: var(--rz-weight-regular); }
.field input[type="text"], .field input[type="number"], .field textarea {
  width: 100%; min-height: var(--rz-control-h); padding: var(--rz-space-3) var(--rz-space-4);
  background: var(--rz-bg); color: var(--rz-text); border: 1px solid var(--rz-border-strong); border-radius: var(--rz-radius-md);
  font: inherit; line-height: 1.3;
}
.field textarea { resize: vertical; }
.field input:focus-visible, .field textarea:focus-visible { outline: 3px solid var(--rz-focus); outline-offset: 1px; border-color: var(--rz-accent); }
.field input[aria-invalid="true"], .field textarea[aria-invalid="true"] { border-color: var(--rz-status-critical); border-width: 2px; }
/* błąd pola: ikona + słowo „Błąd:” + tekst w kolorze podstawowym (kontrast AA), nigdy sam kolor ramki */
.field__error { display: flex; align-items: flex-start; gap: var(--rz-space-2); color: var(--rz-text); font-size: var(--rz-text-sm); font-weight: var(--rz-weight-medium); }
.field__error[hidden] { display: none; }
.field__error .icon { color: var(--rz-status-critical); width: 20px; height: 20px; }
.field--check { grid-template-columns: auto 1fr; align-items: start; gap: var(--rz-space-3); }
.field--check input { width: 24px; height: 24px; margin-top: 2px; accent-color: var(--rz-accent); }
.field--check label { font-weight: var(--rz-weight-regular); color: var(--rz-text-2); font-size: var(--rz-text-sm); }
.field--check .field__error { grid-column: 1 / -1; }
.field--check input[aria-invalid="true"] { outline: 2px solid var(--rz-status-critical); outline-offset: 2px; }
/* honeypot: poza ekranem, nie display:none (niektóre boty to wykrywają) */
.field--hp { position: absolute; left: -10000px; top: auto; width: 1px; height: 1px; overflow: hidden; }
.form__status { min-height: 1.5em; font-weight: var(--rz-weight-medium); }
/* status: tekst w kolorze podstawowym (kontrast AA); stan niesie pasek + tło + treść komunikatu */
.form__status--ok, .form__status--error { padding: var(--rz-space-3) var(--rz-space-4); border-radius: var(--rz-radius-md); border-left: 4px solid; color: var(--rz-text); }
.form__status--ok { background: var(--rz-status-ok-bg); border-left-color: var(--rz-status-ok); }
.form__status--error { background: var(--rz-status-critical-bg); border-left-color: var(--rz-status-critical); }
.form__next { color: var(--rz-text-2); display: grid; gap: var(--rz-space-2); }
.form__next[hidden] { display: none; }
.form__next strong { color: var(--rz-text); }
.form__next ol { padding-left: var(--rz-space-6); display: grid; gap: var(--rz-space-2); }
.form__fineprint { color: var(--rz-text-3); font-size: var(--rz-text-sm); }
.form--sent .field, .form--sent .btn, .form--sent .form__fineprint { display: none; }
.form--sent .form__status { font-size: var(--rz-text-lg); }

/* ---------- stopka ---------- */
.site-footer { border-top: 1px solid var(--rz-border); padding-block: var(--rz-space-8); color: var(--rz-text-2); font-size: var(--rz-text-sm); }
.site-footer__inner { display: grid; gap: var(--rz-space-2); }
.site-footer__copy { color: var(--rz-text-3); }
.site-footer__nav { display: flex; flex-wrap: wrap; gap: 0 var(--rz-space-4); margin-bottom: var(--rz-space-2); }
.site-footer__nav a { display: inline-flex; align-items: center; min-height: var(--rz-touch-min); min-width: var(--rz-touch-min); color: var(--rz-text-2); }
.site-footer__nav a:hover { color: var(--rz-text); }

/* ---------- strona 404 ---------- */
.notfound { min-height: 60vh; display: grid; align-content: center; justify-items: start; gap: var(--rz-space-4); padding-block: var(--rz-space-16); }
.notfound__code { color: var(--rz-accent); font-weight: var(--rz-weight-black); font-size: var(--rz-text-lg); font-variant-numeric: tabular-nums; }
.notfound p { color: var(--rz-text-2); font-size: var(--rz-text-lg); max-width: 32em; }

/* ---------- cennik: „od” przy kwocie ---------- */
.plan__from { color: var(--rz-text-2); font-size: var(--rz-text-sm); }

/* ---------- kontakt poza formularzem, dane firmy w stopce ---------- */
.contact-alt { color: var(--rz-text-2); margin-bottom: var(--rz-space-6); }
.site-footer__company { display: grid; gap: var(--rz-space-1); font-style: normal; }

/* ---------- strona prawna (polityka prywatności) ---------- */
.legal { padding-block: var(--rz-space-12); display: grid; gap: var(--rz-space-4); max-width: 46em; }
.legal h2 { margin-top: var(--rz-space-6); margin-bottom: 0; }
.legal ul { padding-left: var(--rz-space-6); display: grid; gap: var(--rz-space-2); }
.legal p, .legal li { color: var(--rz-text-2); }
.draft-banner {
  padding: var(--rz-space-4); border-radius: var(--rz-radius-md); border-left: 4px solid var(--rz-status-low);
  background: var(--rz-status-low-bg); color: var(--rz-text);
}
.draft-banner strong { color: var(--rz-status-low-text); }
