/* Self-host: Montserrat 600–700, Inter 400–600; latin + latin-ext. */
@font-face {
  font-family: "Montserrat";
  src: url("/fonts/montserrat-latin.woff2") format("woff2");
  font-weight: 600 700;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Montserrat";
  src: url("/fonts/montserrat-latin-ext.woff2") format("woff2");
  font-weight: 600 700;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Inter";
  src: url("/fonts/inter-latin.woff2") format("woff2");
  font-weight: 400 600;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Inter";
  src: url("/fonts/inter-latin-ext.woff2") format("woff2");
  font-weight: 400 600;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  --granat: #1b2a5e;
  --zloto: #c9a227;
  --zloto-hover: #d4ad2e;
  --zloto-tlo: #f8f3e2;
  --atrament: #0f1730;
  --szary: #5b6478;
  --tlo: #eef1f8;
  --karta: #ffffff;
  --linia: #d4d9e6;
  --linia-slaba: #e6eaf3;
  --ok: #1a7f4b;
  --ok-tlo: #e7f6ee;
  --blad: #a11212;
  --blad-tlo: #fde8e8;
  --dev-tlo: #f4f6fa;
  --dev-kreska: #8b93a7;
  --promien-sm: 8px;
  --promien-md: 12px;
  --promien-lg: 16px;
  --cien: 0 10px 32px rgba(15, 23, 48, 0.08);
  --dotyk: 2.75rem;
}

*,
*::before,
*::after { box-sizing: border-box; }

html {
  overflow-x: clip;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-family: "Inter", system-ui, sans-serif;
  font-weight: 400;
  background:
    radial-gradient(900px 280px at 50% -60px, rgba(201, 162, 39, 0.12), transparent 62%),
    linear-gradient(180deg, #e4e8f3 0%, var(--tlo) 32%, var(--tlo) 100%);
  color: var(--granat);
  line-height: 1.45;
}

.topbar {
  display: flex;
  align-items: stretch;
  gap: 0.85rem;
  background: linear-gradient(180deg, #152047 0%, var(--granat) 100%);
  color: #fff;
  padding: 0.95rem 1.15rem 1rem;
  box-shadow: inset 0 -3px 0 var(--zloto);
}

.brand-akcent {
  width: 3px;
  flex-shrink: 0;
  border-radius: 2px;
  background: linear-gradient(180deg, #e8d48b 0%, var(--zloto) 55%, #8a7020 100%);
}

.brand-blok { min-width: 0; }

.brand {
  font-family: "Montserrat", system-ui, sans-serif;
  font-weight: 700;
  font-size: 1.3rem;
  letter-spacing: 0.14em;
  line-height: 1.15;
}

.brand-sub {
  font-size: 0.74rem;
  opacity: 0.78;
  margin-top: 0.2rem;
  line-height: 1.35;
  max-width: 28rem;
}

.wrap {
  flex: 1;
  width: 100%;
  max-width: 34rem;
  margin: 1.15rem auto 0;
  padding: 0 1rem 1.5rem;
  min-width: 0;
}

/* Wskaźnik postępu: numery / fajki + łączniki, nie pigułki. */
.stepper {
  display: flex;
  list-style: none;
  margin: 0 0 1.25rem;
  padding: 0.1rem 0 0;
  width: 100%;
}

.stepper li {
  flex: 1 1 0;
  min-width: 0;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  color: var(--szary);
  font-size: 0.68rem;
  font-weight: 500;
  line-height: 1.25;
  padding: 0 0.12rem;
}

.stepper-etykieta {
  display: block;
  max-width: 100%;
  overflow-wrap: anywhere;
}

.stepper li::before {
  content: attr(data-step);
  width: 1.75rem;
  height: 1.75rem;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: #fff;
  border: 2px solid #c5cad8;
  color: var(--szary);
  font-family: "Montserrat", system-ui, sans-serif;
  font-weight: 700;
  font-size: 0.75rem;
  margin-bottom: 0.38rem;
  position: relative;
  z-index: 1;
}

.stepper li:not(:last-child)::after {
  content: "";
  position: absolute;
  top: 0.85rem;
  left: calc(50% + 1rem);
  width: calc(100% - 2rem);
  height: 2px;
  background: var(--linia);
  z-index: 0;
}

.stepper li.done { color: var(--granat); }
.stepper li.done::before {
  content: "✓";
  background: var(--granat);
  border-color: var(--granat);
  color: #fff;
}
.stepper li.done:not(:last-child)::after { background: var(--granat); }

.stepper li.active {
  color: var(--atrament);
  font-weight: 600;
}
.stepper li.active::before {
  background: var(--zloto);
  border-color: var(--zloto);
  color: var(--atrament);
  box-shadow: 0 0 0 4px rgba(201, 162, 39, 0.22);
}

.card {
  background: var(--karta);
  border-radius: var(--promien-lg);
  padding: 1.35rem 1.2rem 1.45rem;
  box-shadow: var(--cien);
  border: 1px solid rgba(27, 42, 94, 0.04);
}

.step:not([hidden]) {
  animation: wejscie-kroku 0.32s ease;
}

@keyframes wejscie-kroku {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: none; }
}

h1 {
  font-family: "Montserrat", system-ui, sans-serif;
  font-size: 1.38rem;
  font-weight: 700;
  letter-spacing: -0.015em;
  margin: 0 0 1.05rem;
  line-height: 1.25;
}

.lead {
  margin: -0.35rem 0 1.05rem;
  color: var(--szary);
  font-size: 0.94rem;
}

#form > label,
.wiersz-imienia > label,
.wiersz-telefonu > label {
  display: block;
  margin: 0.85rem 0;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--granat);
}

#form > label[hidden] { display: none; }

.wiersz-imienia,
.wiersz-telefonu {
  display: grid;
  gap: 0 0.75rem;
}

.wiersz-telefonu { grid-template-columns: 120px minmax(0, 1fr); }
.wiersz-imienia > label,
.wiersz-telefonu > label { min-width: 0; }
.wiersz-telefonu select { padding-inline: 0.35rem; }
select option { background: var(--karta); color: var(--atrament); }

.podpowiedz,
.blad-pola {
  margin: -0.4rem 0 0.85rem;
  font-size: 0.78rem;
  color: var(--szary);
}
.blad-pola { color: var(--blad); }

.tylko-b label {
  display: block;
  margin: 0.75rem 0;
  font-size: 0.82rem;
  font-weight: 600;
}

input,
select {
  width: 100%;
  min-height: var(--dotyk);
  padding: 0.55rem 0.8rem;
  margin-top: 0.32rem;
  border: 1px solid var(--linia);
  border-radius: var(--promien-sm);
  font-size: 1rem;
  font-family: inherit;
  background: #fff;
  color: var(--atrament);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

input:hover,
select:hover { border-color: #b7bdd0; }

input:focus,
select:focus {
  outline: none;
  border-color: var(--zloto);
  box-shadow: 0 0 0 3px rgba(201, 162, 39, 0.28);
}

input:user-invalid,
select:user-invalid {
  border-color: var(--blad);
  box-shadow: 0 0 0 3px rgba(161, 18, 18, 0.12);
}

input:disabled {
  background: #f3f5f9;
  color: var(--szary);
  cursor: not-allowed;
}

.typy {
  display: grid;
  gap: 0.65rem;
  margin-bottom: 0.85rem;
}

.typ {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  border: 1.5px solid var(--linia);
  border-radius: var(--promien-md);
  padding: 0.85rem 0.95rem;
  cursor: pointer;
  min-height: 4.4rem;
  background: #fff;
  font-weight: 400;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.typ:hover { border-color: #c0a040; }

.typ input {
  width: 1.15rem;
  height: 1.15rem;
  min-height: 0;
  margin: 0.2rem 0 0;
  flex-shrink: 0;
  accent-color: var(--zloto);
  cursor: pointer;
}

.typ-tresc { min-width: 0; }

.typ b {
  display: block;
  font-family: "Montserrat", system-ui, sans-serif;
  font-size: 0.98rem;
  font-weight: 700;
}

.typ-tresc > span {
  display: block;
  font-size: 0.8rem;
  color: var(--szary);
  margin-top: 0.18rem;
  line-height: 1.35;
}

.typ:has(input:checked) {
  border-color: var(--zloto);
  background: linear-gradient(180deg, var(--zloto-tlo) 0%, #fff 72%);
  box-shadow: 0 0 0 3px rgba(201, 162, 39, 0.16);
}

.typ:has(input:focus-visible) {
  box-shadow: 0 0 0 3px rgba(201, 162, 39, 0.32);
}

.tylko-b {
  margin: 1rem 0 0.35rem;
  padding: 0.85rem 0.95rem 0.35rem;
  background: #f6f7fb;
  border-left: 3px solid var(--zloto);
  border-radius: 0 var(--promien-md) var(--promien-md) 0;
}

.zgody {
  margin-top: 1.15rem;
  padding: 0.35rem 0.95rem;
  background: #f6f7fb;
  border: 1px solid var(--linia-slaba);
  border-radius: var(--promien-md);
}

.zgoda {
  display: flex;
  align-items: flex-start;
  gap: 0.7rem;
  margin: 0;
  padding: 0.7rem 0;
  min-height: var(--dotyk);
  font-size: 0.88rem;
  font-weight: 400;
  line-height: 1.4;
  cursor: pointer;
}

.zgoda + .zgoda { border-top: 1px solid var(--linia-slaba); }

.zgoda input {
  width: 1.15rem;
  height: 1.15rem;
  min-height: 0;
  margin: 0.15rem 0 0;
  flex-shrink: 0;
  accent-color: var(--granat);
  cursor: pointer;
}

.cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 3rem;
  margin-top: 1rem;
  padding: 0.75rem 1rem;
  background: var(--zloto);
  color: var(--atrament);
  border: 0;
  border-radius: 10px;
  font-family: "Montserrat", system-ui, sans-serif;
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  text-align: center;
  text-decoration: none;
  box-shadow: 0 2px 0 rgba(138, 112, 32, 0.25);
  transition: background 0.15s ease, box-shadow 0.15s ease, transform 0.12s ease, opacity 0.15s ease;
}

.cta:hover:not(:disabled) {
  background: var(--zloto-hover);
  box-shadow: 0 4px 14px rgba(201, 162, 39, 0.32);
}

.cta:active:not(:disabled) { transform: translateY(1px); }

.cta:focus-visible {
  outline: 2px solid var(--zloto);
  outline-offset: 3px;
}

.cta:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  box-shadow: none;
}

.cta.ghost {
  background: transparent;
  border: 1.5px solid var(--granat);
  color: var(--granat);
  box-shadow: none;
}

.cta.ghost:hover:not(:disabled) {
  background: #f4f6fb;
  box-shadow: none;
}

.cta-mocny {
  background: var(--granat);
  color: #fff;
  box-shadow: 0 2px 0 #0b1228, 0 8px 20px rgba(27, 42, 94, 0.22);
  letter-spacing: 0.01em;
}

.cta-mocny:hover:not(:disabled) {
  background: #24367a;
  box-shadow: 0 4px 16px rgba(27, 42, 94, 0.28);
}

.cta-mocny:focus-visible {
  outline-color: var(--granat);
}

.weryf { display: grid; gap: 0.85rem; }

.pole {
  border: 1px solid var(--linia-slaba);
  border-radius: var(--promien-md);
  padding: 0.9rem 1rem 1rem;
  background: #fafbfe;
}

.pole > label {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
}

.pole > p {
  margin: 0 0 0.35rem;
  font-size: 0.92rem;
}

#kod {
  letter-spacing: 0.28em;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  text-align: center;
  font-size: 1.2rem;
}

.stan {
  display: inline-flex;
  align-items: center;
  margin-top: 0.55rem;
  font-size: 0.82rem;
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  background: var(--linia-slaba);
  color: var(--szary);
}

.stan.ok {
  background: var(--ok-tlo);
  color: var(--ok);
  font-weight: 600;
}

.alert {
  padding: 0.75rem 1rem;
  border-radius: 10px;
  margin-bottom: 1rem;
  font-size: 0.9rem;
}

.alert.err {
  background: var(--blad-tlo);
  color: var(--blad);
  border: 1px solid #f3c4c4;
}

.alert.ok {
  background: var(--ok-tlo);
  color: var(--ok);
  border: 1px solid #b7e0c8;
}

/* Narzędzie deweloperskie — nie mylić z błędem. */
.dev {
  position: relative;
  margin-top: 1.1rem;
  padding: 0.85rem 0.95rem 0.85rem 3.35rem;
  border-radius: 10px;
  background: var(--dev-tlo);
  border: 1px dashed var(--dev-kreska);
  color: var(--szary);
  font-size: 0.82rem;
  font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
}

.dev::before {
  content: "DEV";
  position: absolute;
  left: 0.65rem;
  top: 0.8rem;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: #5b6478;
  background: #e4e7ef;
  padding: 0.16rem 0.38rem;
  border-radius: 4px;
}

.dev code {
  background: #fff;
  padding: 0.1rem 0.35rem;
  border-radius: 5px;
  font-weight: 600;
  color: var(--atrament);
}

.dev .cta {
  margin-top: 0.7rem;
  font-family: "Montserrat", system-ui, sans-serif;
}

.skladka-bohater {
  text-align: center;
  padding: 1.35rem 0.75rem 1.2rem;
  margin: 0.15rem 0 0.35rem;
  background: linear-gradient(180deg, var(--zloto-tlo) 0%, #fff 74%);
  border: 1px solid #eee4c2;
  border-radius: 14px;
}

.kwota {
  font-family: "Montserrat", system-ui, sans-serif;
  font-weight: 700;
  font-size: clamp(1.7rem, 7.2vw, 2.35rem);
  color: var(--zloto);
  letter-spacing: -0.03em;
  margin: 0 0 0.45rem;
  font-variant-numeric: tabular-nums;
  line-height: 1.15;
}

#opis-skladki {
  margin: 0 auto;
  font-size: 0.88rem;
  color: var(--szary);
  line-height: 1.45;
  max-width: 22rem;
}

.step-sukces {
  text-align: center;
  padding-block: 2rem 1.7rem;
}

.sukces-znak {
  width: 4rem;
  height: 4rem;
  margin: 0 auto 1rem;
  border-radius: 50%;
  background: var(--ok-tlo);
  border: 2px solid #8dcea8;
  box-shadow: 0 0 0 6px rgba(26, 127, 75, 0.08);
  position: relative;
}

.sukces-znak::before {
  content: "";
  position: absolute;
  left: 1.2rem;
  top: 1.05rem;
  width: 0.85rem;
  height: 1.45rem;
  border-right: 3px solid var(--ok);
  border-bottom: 3px solid var(--ok);
  transform: rotate(40deg);
}

#sukces {
  margin: 0 auto;
  max-width: 22rem;
  color: var(--szary);
}

.statusCzlonka {
  display: inline-block;
  margin: 1rem 0 0;
  padding: 0.4rem 0.95rem;
  border-radius: 999px;
  background: #eef1f8;
  font-weight: 600;
  color: var(--granat);
  font-size: 0.92rem;
}

.statusCzlonka:empty { display: none; }

.foot {
  text-align: center;
  color: var(--szary);
  font-size: 0.72rem;
  padding: 0.9rem 1rem 1.35rem;
  letter-spacing: 0.01em;
  opacity: 0.85;
}

@media (min-width: 480px) {
  .wiersz-imienia { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .wrap { margin-top: 1.5rem; }
  .card { padding: 1.65rem 1.6rem 1.7rem; }
  .stepper li { font-size: 0.74rem; }
  .typy { grid-template-columns: 1fr 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  .step:not([hidden]) { animation: none; }
  .cta,
  .typ,
  input,
  select { transition: none; }
  .cta:active:not(:disabled) { transform: none; }
}
