/* Fonty marki (DM Sans, DM Serif Display), hostowane lokalnie */
@font-face {
  font-family: "DM Sans";
  font-style: normal;
  font-weight: 100 1000;
  font-display: swap;
  src: url("../fonts/dm-sans-latin-ext-wght-normal.woff2") format("woff2-variations");
  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: "DM Sans";
  font-style: normal;
  font-weight: 100 1000;
  font-display: swap;
  src: url("../fonts/dm-sans-latin-wght-normal.woff2") format("woff2-variations");
  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: "DM Serif Display";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/dm-serif-display-latin-ext-400-normal.woff2") format("woff2");
  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: "DM Serif Display";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/dm-serif-display-latin-400-normal.woff2") format("woff2");
  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;
}

/* Paleta marki Mięsna Paczka */
:root {
  --brown: #3e2f22;
  --cream: #fffcf6;
  --beige: #f1ecdf;
  --bg: #f1ecdf;
  --card: #fffdfb;
  --ink: #1a1a1a;
  --muted: #5d6c7b;
  --line: #e4dbc9;
  --input-line: #b3a58a;
  --cta: #cf441a;
  --cta-hover: #b23912;
  --focus: #e55529;
  --error: #b42318;
  --success: #487622;
  --radius: 16px;
  --serif: "DM Serif Display", Georgia, serif;
  color-scheme: light;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 16px/1.5 "DM Sans", system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
}
a { color: inherit; }

/* Nagłówek z logo */
/* Nagłówek: brązowe tło na całą szerokość, treść na szerokość formularza */
.hero {
  background: var(--brown);
  color: var(--cream);
}
.hero-inner {
  max-width: 860px;
  margin: 0 auto;
  padding: 24px 16px 44px;
}
.logo { display: inline-block; margin-bottom: 36px; }
.logo img { display: block; height: 40px; width: auto; }
.hero h1 {
  margin: 0 0 12px;
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(2rem, 1.3rem + 3vw, 3rem);
  line-height: 1.08;
  letter-spacing: -0.005em;
}
.lead {
  margin: 0 0 20px;
  color: #e6dccb;
  font-size: 1.05rem;
}
.lead strong { color: var(--cream); }
.email {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 10px;
}
/* Adres e-mail kopiowany do schowka po kliknięciu */
.email-address {
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  font-weight: 600;
  text-decoration: underline;
  text-decoration-color: currentColor;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  cursor: pointer;
  user-select: text;
}
.email-address:hover { text-decoration-thickness: 2px; }
.email-address:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; border-radius: 3px; }
.email .email-address, .steps .email-address { color: var(--cream); text-decoration-color: rgba(255, 252, 246, 0.45); }
.copy {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border: 1px solid rgba(255, 252, 246, 0.3);
  border-radius: 999px;
  background: rgba(255, 252, 246, 0.08);
  color: var(--cream);
  font: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
}
.copy:hover { background: rgba(255, 252, 246, 0.16); }
.copy:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }

.toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  z-index: 10;
  display: flex;
  align-items: center;
  gap: 10px;
  max-width: calc(100% - 32px);
  padding: 12px 20px;
  border-radius: 999px;
  background: var(--brown);
  color: var(--cream);
  font-weight: 600;
  box-shadow: 0 8px 24px rgba(62, 47, 34, 0.25);
  opacity: 0;
  visibility: hidden;
  transform: translate(-50%, 12px);
  transition: opacity 0.2s, transform 0.2s, visibility 0.2s;
}
.toast.show { opacity: 1; visibility: visible; transform: translate(-50%, 0); }
.toast svg { flex: none; color: #9fc276; }
.privacy {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 18px;
  border: 1px solid rgba(255, 252, 246, 0.2);
  border-radius: 14px;
  background: rgba(255, 252, 246, 0.07);
  color: #e6dccb;
  font-size: 0.9rem;
}
.privacy p { margin: 0; }
.privacy svg { flex: none; color: #9fc276; }
.privacy .privacy-title { margin-bottom: 2px; color: var(--cream); font-size: 0.98rem; font-weight: 700; }

.page {
  max-width: 860px;
  margin: 0 auto;
  padding: 24px 16px 56px;
}
.legend-required { margin: 0 0 16px; color: var(--muted); font-size: 0.9rem; }
.demo-note {
  margin: 0 0 16px;
  padding: 10px 14px;
  border: 1px dashed #c5b18a;
  border-radius: 10px;
  background: #f8f1e1;
  color: #6b5634;
  font-size: 0.9rem;
  font-weight: 600;
}
.req { color: var(--cta); font-weight: 600; }

/* Karty sekcji */
.card {
  margin: 0 0 16px;
  padding: 22px 24px 26px;
  min-width: 0;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.card legend {
  float: left;
  width: 100%;
  margin: 0 0 18px;
  padding: 0;
  color: var(--brown);
  font-family: var(--serif);
  font-weight: 400;
  font-size: 1.5rem;
  line-height: 1.2;
}
.card legend + * { clear: both; }
.card-note { margin: 0 0 4px; color: var(--muted); font-size: 0.9rem; }

.grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px 20px;
}
.span-2 { grid-column: 1 / -1; }
.card > .check + .grid { margin-top: 16px; }

/* Pola */
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.label { font-size: 0.92rem; font-weight: 600; color: var(--brown); }
.field:has(:required) > .label::after { content: " *"; color: var(--cta); }

input:not([type="checkbox"], [type="radio"]),
select {
  width: 100%;
  height: 46px;
  padding: 0 14px;
  border: 1px solid var(--input-line);
  border-radius: 10px;
  background: #fff;
  color: inherit;
  font: inherit;
  transition: border-color 0.15s, background-color 0.15s;
}
input::placeholder { color: #9d9384; }
input:focus-visible, select:focus-visible, .choice:has(input:focus-visible), .check input:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 1px;
}
input:focus-visible, select:focus-visible { border-color: var(--focus); }

.hint { font-size: 0.8rem; color: var(--muted); }
.error { font-size: 0.84rem; color: var(--error); font-weight: 500; }
.error:empty { display: none; }
.error:not(:empty) { animation: rise-in 0.2s ease-out; }
.invalid input:not([type="checkbox"], [type="radio"]),
.invalid select { border-color: var(--error); background: #fff8f6; }
.invalid .choice { border-color: #e2a59b; }

/* Pola wyboru */
input[type="checkbox"], input[type="radio"] {
  width: 18px;
  height: 18px;
  margin: 0;
  flex: none;
  accent-color: var(--brown);
}
input[type="checkbox"]:checked, input[type="radio"]:checked { animation: pop 0.25s ease-out; }
.check {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  line-height: 1.45;
  cursor: pointer;
  transition: color 0.2s;
}
.check input { margin-top: 2px; }
.check:has(input:checked) { color: var(--brown); }
.check strong, .question strong { color: var(--brown); }

.choices { display: flex; flex-wrap: wrap; gap: 8px; }
.choice {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 16px;
  border: 1px solid var(--input-line);
  border-radius: 999px;
  background: #fff;
  cursor: pointer;
  line-height: 1.3;
  transition: border-color 0.15s, background-color 0.15s, color 0.15s, transform 0.1s;
}
.choice:hover { border-color: var(--brown); }
.choice:active { transform: scale(0.97); }
.choice:has(input:checked) { border-color: var(--brown); background: var(--beige); color: var(--brown); font-weight: 600; }

/* Oświadczenia i pytania */
.statement { padding: 16px 0; border-top: 1px solid var(--line); }
.statement:first-of-type { border-top: 0; padding-top: 8px; }
.statement:last-child { padding-bottom: 0; }
.sub {
  display: grid;
  gap: 14px;
  margin: 14px 0 0 30px;
  padding-left: 16px;
  border-left: 2px solid #e2d6bf;
}
.sub.grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.questions { display: grid; gap: 20px; }
.question .label { font-weight: 450; color: var(--ink); }
.questions > .sub { margin-top: -8px; }

.consent {
  margin-top: 24px;
  padding: 14px 16px;
  background: var(--cream);
  border: 1px solid var(--line);
  border-radius: 12px;
}
.consent.invalid { border-color: var(--error); }

/* Akcje: ciemna karta z krokami i przyciskiem, w stylu nagłówka */
.actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 270px;
  gap: 24px 36px;
  align-items: center;
  margin-top: 28px;
  padding: 28px 32px;
  border-radius: var(--radius);
  background: var(--brown);
  color: #e6dccb;
}
.actions h2 {
  margin: 0 0 14px;
  color: var(--cream);
  font-family: var(--serif);
  font-weight: 400;
  font-size: 1.9rem;
  line-height: 1.1;
}
.steps { display: grid; gap: 10px; margin: 0; padding: 0; list-style: none; }
.steps li { display: flex; gap: 12px; align-items: flex-start; }
.steps strong { color: var(--cream); }
.step-no {
  display: grid;
  place-items: center;
  flex: none;
  width: 26px;
  height: 26px;
  border: 1px solid rgba(255, 252, 246, 0.3);
  border-radius: 50%;
  background: rgba(255, 252, 246, 0.08);
  color: var(--cream);
  font-size: 0.85rem;
  font-weight: 700;
}
.actions-cta { display: grid; justify-items: center; gap: 12px; }

.primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 18px 40px;
  border: 0;
  border-radius: 999px;
  background: var(--cta);
  color: #fff;
  font: inherit;
  font-size: 1.15rem;
  font-weight: 700;
  white-space: nowrap;
  cursor: pointer;
  box-shadow: 0 6px 18px rgba(207, 68, 26, 0.35);
  transition: background-color 0.15s, transform 0.15s, box-shadow 0.15s;
}
.primary:hover { background: var(--cta-hover); transform: translateY(-1px); box-shadow: 0 10px 24px rgba(207, 68, 26, 0.4); }
.primary:active { transform: translateY(0) scale(0.98); }
.primary:hover svg { animation: nudge 0.6s ease-in-out; }
.primary:focus-visible { outline: 3px solid var(--cream); outline-offset: 3px; }
.primary:disabled { opacity: 0.7; cursor: progress; transform: none; }

.status {
  margin: 0;
  padding: 7px 14px;
  border-radius: 10px;
  background: rgba(255, 252, 246, 0.08);
  color: var(--cream);
  font-size: 0.88rem;
  font-weight: 600;
  text-align: center;
  animation: rise-in 0.2s ease-out;
}
.status:empty { display: none; }
.status.error { background: rgba(229, 85, 41, 0.18); color: #ffc4b0; }
.status.success { background: rgba(159, 194, 118, 0.18); color: #d3eab8; }

/* Stopka: o ton ciemniejszy beż, żeby wtapiała się w tło */
.footer {
  border-top: 1px solid var(--line);
  background: #ebe5d7;
  color: #7a6b5c;
  font-size: 0.85rem;
}
.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px 32px;
  max-width: 860px;
  margin: 0 auto;
  padding: 26px 16px 30px;
}
.footer-company { display: flex; align-items: center; gap: 14px; }
.footer-company img { flex: none; opacity: 0.55; }
.footer-company p { margin: 0; line-height: 1.5; }
.footer-company strong { color: #5b4a3a; font-weight: 600; }
.footer-links { display: flex; flex-wrap: wrap; gap: 6px 22px; }
.footer-links a {
  color: #5b4a3a;
  font-weight: 500;
  text-decoration: none;
  text-underline-offset: 3px;
}
.footer-links a:hover { text-decoration: underline; }

/* Mikroanimacje */
@keyframes pop {
  0% { transform: scale(0.8); }
  60% { transform: scale(1.12); }
  100% { transform: scale(1); }
}
@keyframes nudge {
  0%, 100% { transform: none; }
  50% { transform: translateY(2px); }
}
@keyframes rise-in {
  from { opacity: 0; transform: translateY(-3px); }
  to { opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

@media (max-width: 640px) {
  .hero-inner { padding: 18px 16px 32px; }
  .logo { margin-bottom: 24px; }
  .logo img { height: 34px; }
  .page { padding-top: 20px; }
  .card { padding: 18px 16px 22px; }
  .card legend { font-size: 1.35rem; }
  .grid, .sub.grid { grid-template-columns: minmax(0, 1fr); }
  .sub { margin-left: 8px; padding-left: 12px; }
  .actions { grid-template-columns: minmax(0, 1fr); padding: 24px 20px; }
  .actions h2 { font-size: 1.6rem; }
  .actions-cta { justify-items: stretch; }
  .footer-inner { flex-direction: column; text-align: center; }
  .footer-company { flex-direction: column; gap: 10px; }
  .primary { width: 100%; }
}
