:root {
  --bg: #f7f8f5;
  --surface: #ffffff;
  --surface-soft: #fafbf9;
  --text: #172019;
  --muted: #6e786f;
  --line: #e5e9e3;
  --accent: #2d6a43;
  --accent-dark: #215333;
  --accent-soft: #edf5ef;
  --error: #b65b16;
  --error-bg: #8f430d;
  --error-soft: #fff4ea;
  --shadow: 0 24px 70px rgba(28, 45, 33, .08);
  --radius-xl: 28px;
  --radius-lg: 18px;
  --radius-md: 12px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-width: 320px;
  color: var(--text);
  background: radial-gradient(circle at 15% 5%, rgba(218,233,220,.65), transparent 28rem), linear-gradient(180deg,#fbfcfa 0%,var(--bg) 100%);
  font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.5;
}
button,input,textarea { font: inherit; }
button,input,textarea { outline-color: var(--accent); }
button:focus, input:focus, textarea:focus { outline-color: var(--accent); }
.page-shell { width: min(1180px, calc(100% - 40px)); margin: 0 auto; padding: 28px 0 40px; }

.hero {
  position: relative; overflow: hidden; min-height: 410px; padding: 28px 44px 42px;
  border: 1px solid rgba(229,233,227,.9); border-radius: var(--radius-xl) var(--radius-xl) 0 0;
  background: linear-gradient(135deg,rgba(255,255,255,.97),rgba(246,250,246,.92)),#fff;
  box-shadow: 0 10px 35px rgba(35,51,39,.04);
}

.brand { position: relative; z-index: 4; width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 30px; }
.brand-logo { display: block; width: 156px; height: auto; max-height: 82px; object-fit: contain; object-position: left center; }
.brand-copy { display: grid; width: 300px; gap: 3px; text-align: right; }
.eyebrow, .brand strong { display: block; width: 100%; }
.eyebrow { color: var(--accent); font-size: 19px; line-height: 1.05; font-weight: 700; letter-spacing: .025em; text-transform: uppercase; }
.brand strong { color: #667068; font-size: 12px; line-height: 1.15; font-weight: 700; letter-spacing: .075em; text-transform: uppercase; }
.required-star { color: #c33420; font-weight: 800; font-size: 13px; }

.hero-copy { position: relative; z-index: 3; max-width: 700px; margin-top: 68px; }
.hero-copy h1 { max-width: 720px; margin: 0; font-size: clamp(38px,6vw,70px); line-height: .98; letter-spacing: -.055em; font-weight: 700; }
.hero-copy h1 em { color: var(--accent); font-style: normal; }
.hero-copy p { max-width: 570px; margin: 24px 0 0; color: var(--muted); font-size: 16px; }
.hero-meta { position: absolute; z-index: 4; right: 44px; bottom: 42px; color: var(--muted); font-size: 11px; }
.hero-meta b { color: #c33420; font-size: 14px; }

/* Subtelne, rozpoznawalne sylwetki drzew w tle headera. */
.tree-decor { position:absolute; z-index:1; width:180px; height:260px; color:var(--accent); pointer-events:none; }
.tree-decor svg { display:block; width:100%; height:100%; }
.tree-a { right:58px; top:18px; opacity:.055; transform:scale(.92); }
.tree-b { right:245px; bottom:-72px; opacity:.032; transform:scale(.62) rotate(-4deg); }
.tree-c { right:-22px; bottom:-8px; opacity:.075; transform:scale(1.02) rotate(4deg); }
.tree-d { right:385px; top:66px; opacity:.022; transform:scale(.46); }

.form-card { position:relative; z-index:3; margin:-1px 0 0; border:1px solid var(--line); border-radius:0 0 var(--radius-xl) var(--radius-xl); background:var(--surface); box-shadow:var(--shadow); }
.progress { height:3px; overflow:hidden; background:#eef1ed; }
.progress-line { display:block; width:24%; height:100%; background:var(--accent); }
.form-section { padding:52px clamp(24px,5vw,68px); border-bottom:1px solid var(--line); }
.form-section:last-child { border-bottom:0; }
.section-heading { display:flex; gap:18px; align-items:flex-start; margin-bottom:30px; }
.section-number { flex:0 0 auto; display:grid; width:40px; height:40px; place-items:center; border:1px solid #dfe9e1; border-radius:50%; color:var(--accent); background:var(--accent-soft); font-size:11px; font-weight:700; }
.section-heading h2 { margin:1px 0 5px; font-size:21px; line-height:1.2; letter-spacing:-.025em; }
.section-heading p { margin:0; color:var(--muted); font-size:13px; }
.choice-grid { display:grid; grid-template-columns:repeat(3,1fr); gap:10px; margin:0; padding:0; border:0; }
.choice { position:relative; cursor:pointer; }
.choice input { position:absolute; opacity:0; pointer-events:none; }
.choice-content { display:flex; min-height:66px; align-items:center; gap:11px; padding:14px 15px; border:1px solid var(--line); border-radius:var(--radius-md); color:#3d473f; background:#fff; font-size:12px; font-weight:600; transition:.2s ease; }
.choice-icon { display:grid; flex:0 0 auto; width:34px; height:34px; place-items:center; border-radius:9px; color:var(--accent); background:var(--accent-soft); font-size:15px; }
.person-icon { position:relative; }
.person-icon::before { content:""; width:9px; height:9px; margin-top:-9px; border:2px solid currentColor; border-radius:50%; }
.person-icon::after { content:""; position:absolute; left:8px; bottom:7px; width:18px; height:10px; border:2px solid currentColor; border-bottom:0; border-radius:12px 12px 4px 4px; }
.choice:hover .choice-content { border-color:#c8d8cc; transform:translateY(-1px); }
.choice input:checked + .choice-content { border-color:var(--accent); background:#f5faf6; box-shadow:0 0 0 3px rgba(45,106,67,.08); color:var(--accent-dark); }
.choice input:focus-visible + .choice-content { border-color:var(--accent) !important; outline:2px solid var(--accent) !important; outline-offset:0; }
.choice-grid.is-invalid .choice-content { border-color:var(--error); }

.field-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:23px 18px; }
.field { min-width:0; }
.field-full { grid-column:1 / -1; }
.field label { display:block; margin:0 0 8px; color:#344037; font-size:12px; font-weight:600; }
.field label span { color:#c33420; }
.field input,.field textarea { display:block; width:100%; border:1px solid var(--line); border-radius:var(--radius-md); color:var(--text); background:var(--surface-soft); transition:.2s ease; }
.field input { height:50px; padding:0 15px; }
.field textarea { min-height:112px; padding:13px 15px; resize:vertical; }
.field input::placeholder,.field textarea::placeholder { color:#9ca49e; }
.field input:hover,.field textarea:hover { border-color:#cbd4cc; }
.field input:focus,.field textarea:focus,
.field input:focus-visible,.field textarea:focus-visible,
.captcha-input:focus,.captcha-input:focus-visible,
.calendar-trigger:focus,.calendar-trigger:focus-visible { border-color:var(--accent) !important; background:#fff; box-shadow:0 0 0 4px rgba(45,106,67,.12) !important; outline:2px solid var(--accent) !important; outline-offset:0; }
.field input.is-invalid,.field textarea.is-invalid,.captcha-input.is-invalid { border:2px solid var(--error) !important; background:var(--error-soft) !important; box-shadow:0 0 0 3px rgba(182,91,22,.08) !important; }
.field-error { display:inline-block; margin-top:7px; padding:4px 9px; border-radius:6px; color:#fff; background:var(--error-bg); font-size:10px; font-weight:600; line-height:1.35; }

.radio-error:empty { display:none; }

.date-input-wrap { position:relative; }
.date-input-wrap > input[type="text"] { padding-right:52px; }
#dataPicker { position:absolute; width:1px; height:1px; opacity:0; pointer-events:none; }
.calendar-trigger { position:absolute; top:7px; right:7px; display:grid; place-items:center; width:36px; height:36px; padding:0; border:0; border-radius:9px; color:var(--accent); background:var(--accent-soft); cursor:pointer; }
.calendar-trigger img { display:block; width:24px; height:24px; object-fit:contain; }
.calendar-trigger:hover { background:#dfeee2; }

.captcha { display:flex; align-items:center; justify-content:space-between; gap:20px; margin-bottom:26px; padding:20px; border:1px solid #e1e9e2; border-radius:var(--radius-lg); background:#f7faf7; }
.captcha-label { display:block; margin-bottom:5px; color:var(--accent); font-size:9px; font-weight:700; letter-spacing:.12em; text-transform:uppercase; }
.captcha strong { font-size:13px; }
.captcha-input { width:120px; height:50px; border:1px solid #d8e2d9; border-radius:11px; text-align:center; font-weight:700; background:#fff; }
.captcha-input:focus { border-color:var(--accent); box-shadow:0 0 0 4px rgba(45,106,67,.07); outline:none; }
.captcha .field-error { margin-top:0; }

.consent { position:relative; display:grid; grid-template-columns:22px 1fr; gap:12px; align-items:start; cursor:pointer; color:#68726a; font-size:11px; line-height:1.65; }
.consent input { position:absolute; opacity:0; }
.consent .check { position:relative; display:block; width:22px; height:22px; border:1px solid #d6ddd7; border-radius:7px; background:#fff; }
.consent input:checked + .check { border-color:var(--accent); background:var(--accent); }
.consent input:checked + .check::after { content:""; position:absolute; left:7px; top:3px; width:6px; height:11px; border:solid white; border-width:0 2px 2px 0; transform:rotate(45deg); }
.consent input:focus-visible + .check { border-color:var(--accent) !important; outline:2px solid var(--accent) !important; outline-offset:0; }
.consent.is-invalid .check { border:2px solid var(--error); background:var(--error-soft); }
.consent-error { grid-column:2; }

.submit-row { display:flex; align-items:center; justify-content:space-between; gap:20px; margin-top:34px; padding-top:25px; border-top:1px solid var(--line); }
.submit-row p { margin:0; color:#8a928b; font-size:10px; }
.submit-row p span { color:#c33420; }
.submit-row button { min-width:190px; height:52px; padding:0 22px; border:0; border-radius:12px; color:#fff; background:var(--accent); font-size:12px; font-weight:700; cursor:pointer; box-shadow:0 10px 25px rgba(45,106,67,.18); transition:.2s ease; }
.submit-row button > span { display:inline-block; margin-left:12px; color:#fff; font-size:16px; transition:transform .2s ease; }
.submit-row button:hover { background:var(--accent-dark); transform:translateY(-1px); box-shadow:0 13px 28px rgba(45,106,67,.23); }
.submit-row button:hover > span { transform:translateX(3px); }

.footer { display:flex; justify-content:space-between; gap:20px; padding:24px 8px 0; color:#8a928b; font-size:10px; }
.footer a { color:#6c756e; text-decoration:none; border-bottom:1px solid #cfd6d0; transition:.2s ease; }
.footer a:hover { color:var(--accent); border-color:var(--accent); }
.sr-only { position:absolute; width:1px; height:1px; padding:0; margin:-1px; overflow:hidden; clip:rect(0,0,0,0); white-space:nowrap; border:0; }

@media (max-width:820px) {
  .page-shell { width:min(100% - 24px,680px); padding-top:12px; }
  .hero { min-height:390px; padding:25px 25px 35px; }
  .hero-copy { margin-top:60px; }
  .hero-meta { right:25px; bottom:28px; }
  .choice-grid { grid-template-columns:repeat(2,1fr); }
  .form-section { padding:40px 25px; }
  .tree-a { right:12px; }
  .tree-d { right:185px; }
}

@media (max-width:560px) {
  .page-shell { width:100%; padding:0; }
  .hero { min-height:400px; border-radius:0; border-left:0; border-right:0; }
  .brand { gap: 14px; }
  .brand-logo { width: 96px; max-height: 56px; }
  .brand-copy { width: 190px; }
  .eyebrow { font-size: 14px; }
  .brand strong { font-size: 9px; }
  .hero-copy { margin-top:55px; }
  .hero-copy h1 { font-size:42px; }
  .hero-copy p { font-size:14px; }
  .hero-meta { left:25px; right:auto; align-items:flex-start; bottom:28px; }
  .tree-a { right:-62px; top:32px; transform:scale(.62); }
  .tree-b { right:120px; bottom:-88px; transform:scale(.48) rotate(-4deg); }
  .tree-c { right:-70px; bottom:4px; transform:scale(.70) rotate(4deg); }
  .tree-d { right:175px; top:95px; transform:scale(.34); }
  .form-card { border-radius:0; border-left:0; border-right:0; box-shadow:none; }
  .form-section { padding:36px 20px; }
  .section-heading { gap:12px; }
  .section-number { width:34px; height:34px; font-size:10px; }
  .choice-grid,.field-grid { grid-template-columns:1fr; }
  .field-full { grid-column:auto; }
  .captcha { align-items:stretch; flex-direction:column; }
  .captcha-input { width:100%; }
  .submit-row { align-items:stretch; flex-direction:column-reverse; }
  .submit-row button { width:100%; }
  .footer { padding:20px; background:#fff; flex-direction:column; gap:7px; }
}

/* --- Dodane: komunikat o statusie wysyłki formularza (dodaj.php przez fetch) --- */
.form-status {
  margin: 24px clamp(24px,5vw,68px) 0;
  padding: 16px 20px;
  border-radius: var(--radius-md);
  font-size: 13px;
  font-weight: 600;
}
.form-status-success { background: var(--accent-soft); color: var(--accent-dark); border: 1px solid #cfe6d6; }
.form-status-error { background: var(--error-soft); color: var(--error); border: 1px solid #f0d2b8; }
.form-status[hidden] { display: none; }

/* --- Dodane: honeypot - pole niewidoczne dla ludzi, wypełniane tylko przez boty --- */
.hp-field {
  position: absolute;
  left: -9999px;
  top: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}
