/* Strona wspomnień PFW 25 lat. Tokeny zgodne z systemem wizualnym nowej strony pfw.org.pl. */
:root {
  --bg: #f4f8fc;
  --bg-alt: #eef2fa;
  --card: #ffffff;
  --head: #0e1e4c;
  --text: #4d577f;
  --muted: #5b6785;
  --brand: #31519e;
  --btn: #31519e;
  --btn-ink: #ffffff;
  --eyebrow: #259dd8;
  --rule: #dfe4ef;
  --field: #ffffff;
  --field-line: #b9c4de;
  --navy: #0e1e4c;
  --gold: #e4b650;
  --cyan: #259dd8;
  --light: #c5cfe6;
  --focus: #259dd8;
  --err: #b3261e;
  --shadow: 0 1px 2px rgba(14, 30, 76, .06), 0 8px 24px rgba(14, 30, 76, .08);
  --r-card: 16px;
  --r-field: 12px;
  --font: "Barlow Semi Condensed", "Arial Narrow", Arial, sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0a1636;
    --bg-alt: #16284e;
    --card: #101e46;
    --head: #f6fbff;
    --text: #a8b5d7;
    --muted: #919fc2;
    --brand: #99c4ff;
    --btn: #4e7ae0;
    --eyebrow: #75d3ff;
    --rule: #1f3166;
    --field: #0a1636;
    --field-line: #3a4d86;
    --err: #ff9a93;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px rgba(0, 0, 0, .3);
    color-scheme: dark;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 18px/1.5 var(--font);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: var(--brand); text-underline-offset: 3px; }
[hidden] { display: none !important; }
.vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; opacity: 0; }
.skip { position: absolute; left: -999px; top: 8px; background: #fff; color: var(--navy); padding: 8px 12px; border-radius: 8px; z-index: 50; }
.skip:focus { left: 8px; }

:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 6px; }

.wrap { width: 100%; max-width: 560px; margin: 0 auto; padding: 0 20px; }

/* ===== Pasek górny (kroki 2-4) ===== */
.bar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  background: var(--navy);
  padding: 10px 16px; padding-top: calc(10px + env(safe-area-inset-top));
  box-shadow: inset 0 -3px 0 var(--gold);
}
.bar-logo img { height: 34px; width: auto; }
.progress { list-style: none; margin: 0; padding: 0; display: flex; gap: 6px; }
.progress li {
  font-size: 14px; font-weight: 600; color: var(--light);
  padding: 4px 10px; border-radius: 999px; opacity: .6; white-space: nowrap;
}
.progress li[aria-current="step"] { background: #fff; color: var(--navy); opacity: 1; }
.progress li.past { opacity: 1; }

/* ===== Hero ===== */
.hero { position: relative; background: var(--navy); color: #fff; overflow: hidden; }
.hero-in { position: relative; z-index: 1; max-width: 560px; margin: 0 auto; padding: calc(28px + env(safe-area-inset-top)) 24px 44px; }
.hero-logo img { width: 190px; height: auto; margin-bottom: 36px; }
.hero h1 {
  margin: 0 0 18px; color: #fff;
  font-size: clamp(40px, 12vw, 58px); line-height: 1.02; font-weight: 700; letter-spacing: -.01em;
  text-wrap: balance;
}
.hero-lead { margin: 0 0 28px; font-size: 20px; line-height: 1.45; color: var(--light); max-width: 30em; }
.hero-note { margin: 12px 0 0; font-size: 15px; color: var(--light); opacity: .85; }
.axis { display: flex; align-items: center; gap: 12px; margin-top: 34px; font-weight: 600; font-size: 17px; color: var(--gold); }
.axis i { position: relative; flex: 1; height: 2px; background: linear-gradient(90deg, var(--gold), rgba(228,182,80,.25)); }
.axis i::after { content: ""; position: absolute; right: 0; top: 50%; width: 11px; height: 11px; margin-top: -5.5px; border-radius: 50%; background: var(--gold); box-shadow: 0 0 0 5px rgba(228,182,80,.2); }
.mark {
  position: absolute; right: -14px; bottom: -34px; z-index: 0;
  font-size: 230px; font-weight: 700; line-height: 1; color: #fff; opacity: .06; pointer-events: none; user-select: none;
}
.stripes { position: relative; z-index: 1; display: block; }
.stripes i { display: block; }
.stripes .gold { height: 2px; background: var(--gold); }
.stripes .cyan { height: 10px; background: var(--cyan); }

/* ===== Jak to działa ===== */
.how { padding: 40px 0 8px; }
.how h2 { margin: 0 0 16px; color: var(--head); font-size: 26px; line-height: 1.15; }
.how-list { list-style: none; counter-reset: s; margin: 0; padding: 0; display: grid; gap: 14px; }
.how-list li {
  counter-increment: s; position: relative;
  background: var(--card); border-radius: var(--r-card); box-shadow: var(--shadow);
  padding: 16px 18px 16px 62px; line-height: 1.4;
}
.how-list li::before {
  content: counter(s); position: absolute; left: 18px; top: 14px;
  width: 30px; height: 30px; border-radius: 50%; background: var(--navy); color: var(--gold);
  display: grid; place-items: center; font-weight: 700; font-size: 17px;
}
.how-list b { display: block; color: var(--head); font-weight: 600; font-size: 19px; }

/* ===== Kroki ===== */
.step:not(.hero) { padding: 28px 0 8px; }
.step-title { margin: 0 0 8px; color: var(--head); font-size: clamp(30px, 8.5vw, 38px); line-height: 1.08; font-weight: 700; letter-spacing: -.005em; text-wrap: balance; }
[tabindex="-1"]:focus, [tabindex="-1"]:focus-visible { outline: none; }
input, textarea, .check { scroll-margin-top: 96px; }
.lead { margin: 0 0 22px; font-size: 19px; }

.block {
  background: var(--card); border-radius: var(--r-card); box-shadow: var(--shadow);
  padding: 20px 18px; margin-bottom: 16px;
}
.block h3, .block .h3 { display: block; margin: 0 0 6px; color: var(--head); font-size: 21px; line-height: 1.2; font-weight: 600; }
.block label:not(.h3):not(.check):not(.file-line) { display: block; margin: 18px 0 6px; color: var(--head); font-weight: 600; font-size: 17px; }
.opt { font-weight: 400; color: var(--muted); }
.hint { margin: 0 0 12px; font-size: 16px; color: var(--muted); line-height: 1.4; }
.meta { margin: 6px 0 0; font-size: 14px; color: var(--muted); text-align: right; }
.fine { margin: 12px 0 0; font-size: 14px; color: var(--muted); line-height: 1.4; }
.err { margin: 8px 0 0; font-size: 16px; font-weight: 600; color: var(--err); min-height: 0; }
.err:empty { display: none; }

input[type="text"], input[type="email"], textarea {
  width: 100%; font: inherit; font-size: 18px; color: var(--head);
  background: var(--field); border: 1.5px solid var(--field-line); border-radius: var(--r-field);
  padding: 13px 14px; min-height: 52px;
}
textarea { resize: vertical; line-height: 1.4; }
input::placeholder, textarea::placeholder { color: var(--muted); opacity: .75; }
input:focus, textarea:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(37,157,216,.28); }
.invalid { border-color: var(--err) !important; }

/* Zdjęcia */
.thumbs { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.thumbs li { position: relative; aspect-ratio: 1; border-radius: 10px; overflow: hidden; background: var(--bg-alt); }
.thumbs img { width: 100%; height: 100%; object-fit: cover; }
.thumbs .rm {
  position: absolute; top: 4px; right: 4px; width: 32px; height: 32px; border-radius: 50%; border: 0;
  background: rgba(14,30,76,.82); color: #fff; font: 600 20px/1 var(--font); cursor: pointer; padding: 0;
}
.thumbs .badge { position: absolute; left: 6px; bottom: 6px; background: var(--gold); color: var(--navy); font-size: 12px; font-weight: 700; padding: 1px 7px; border-radius: 999px; }
.block .thumbs label.add {
  margin: 0; font-size: 16px; color: var(--brand);
  display: grid; place-content: center; text-align: center; gap: 2px; cursor: pointer;
  background: transparent; border: 2px dashed var(--field-line); color: var(--brand); font-weight: 600; font-size: 16px; line-height: 1.15; padding: 6px;
}
.thumbs .add b {
  display: block; font-size: 30px; line-height: 1; font-weight: 500; }
.thumbs .busy { display: grid; place-items: center; font-size: 14px; color: var(--muted); }
.file-line {
  display: block; width: 100%; text-align: center; cursor: pointer;
  border: 2px dashed var(--field-line); border-radius: var(--r-field);
  color: var(--brand); font-weight: 600; font-size: 17px; padding: 14px;
}

/* Rok: oś czasu */
.years {
  position: relative; display: flex; gap: 8px; overflow-x: auto; scroll-snap-type: x proximity;
  margin: 8px -18px 0; padding: 4px 18px 14px; scrollbar-width: thin;
}
.years::after { content: none; }
.years label {
  flex: 0 0 auto; scroll-snap-align: center; position: relative;
  margin: 0 !important; padding: 0 !important; font-weight: 600;
}
.years input { position: absolute; opacity: 0; inset: 0; }
.years span {
  display: block; min-width: 56px; text-align: center; padding: 10px 14px;
  border: 1.5px solid var(--field-line); border-radius: 999px; background: var(--field);
  color: var(--head); font-size: 17px; font-weight: 600; cursor: pointer;
}
.years input:checked + span { background: var(--gold); border-color: var(--gold); color: var(--navy); }
.years input:focus-visible + span { outline: 3px solid var(--focus); outline-offset: 2px; }
.years .none span { color: var(--muted); font-weight: 500; }
.years .none input:checked + span { background: var(--navy); border-color: var(--navy); color: #fff; }
#occasion { margin-top: 0; }

/* Zgoda */
.check { display: grid; grid-template-columns: 26px 1fr; gap: 12px; align-items: start; cursor: pointer; color: var(--head); font-size: 17px; line-height: 1.4; }
.check input { width: 24px; height: 24px; margin: 2px 0 0; accent-color: var(--btn); }

/* Przyciski */
.btn {
  display: inline-flex; align-items: center; justify-content: center; text-align: center;
  min-height: 54px; padding: 0 26px; border-radius: 999px; border: 2px solid transparent;
  font: 600 19px/1 var(--font); text-decoration: none; cursor: pointer;
  transition: transform .12s ease, background-color .12s ease;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--btn); color: var(--btn-ink); box-shadow: 0 6px 16px rgba(49,81,158,.28); }
.btn-primary:hover { filter: brightness(1.06); }
.btn-primary[disabled] { opacity: .55; cursor: default; box-shadow: none; }
.btn-light { background: #fff; color: var(--navy); }
.btn-ghost { background: transparent; border-color: var(--brand); color: var(--brand); }
.btn-ghost:hover { background: rgba(49,81,158,.07); }
.btn-quiet { background: transparent; color: var(--brand); padding: 0 12px; }
.hero .btn { width: 100%; max-width: 360px; }
.actions { display: grid; gap: 10px; margin: 8px 0 24px; }
.actions .btn-primary { width: 100%; }

/* Podgląd */
.card-slot { margin: 6px auto 18px; max-width: 440px; }
.card-slot canvas { display: block; width: 100%; height: auto; border-radius: 6px; box-shadow: 0 10px 34px rgba(14,30,76,.28); background: var(--navy); }
.card-slot.small { max-width: 300px; }
.note { margin: 0 0 14px; font-size: 16px; color: var(--muted); }
.sending { margin: 0 0 16px; }
.bar-track { height: 8px; border-radius: 99px; background: var(--rule); overflow: hidden; }
.bar-track i { display: block; height: 100%; width: 0; background: var(--brand); transition: width .2s ease; }
.sending p { margin: 8px 0 0; font-size: 16px; color: var(--muted); }

/* Udostępnianie */
.share-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 14px 0 14px; }
.share-grid .wide { grid-column: 1 / -1; }
.share-grid .btn { padding: 0 14px; font-size: 18px; }
.share .hint:last-child { margin: 0; }

/* Stopka */
.foot { margin-top: 40px; padding: 26px 0 calc(32px + env(safe-area-inset-bottom)); border-top: 1px solid var(--rule); font-size: 15px; color: var(--muted); }
.foot p { margin: 0 0 4px; }

.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* Jedno zaplanowane wejście: kartka pojawia się w podglądzie */
@keyframes settle { from { opacity: 0; transform: translateY(14px) rotate(-1.2deg); } to { opacity: 1; transform: none; } }
.card-slot canvas { animation: settle .5s cubic-bezier(.2,.7,.2,1) both; }
@media (prefers-reduced-motion: reduce) {
  .card-slot canvas { animation: none; }
  .btn, .bar-track i { transition: none; }
}

@media (min-width: 720px) {
  body { font-size: 19px; }
  .hero-in { padding-top: 48px; padding-bottom: 64px; }
  .hero-logo img { width: 230px; }
}
