/* ─── Formularz bezpłatnego audytu (strona główna i audyt.html), DESIGN.md ─── */
.af { --af-line: rgba(243,239,231,0.22); --af-line-strong: rgba(243,239,231,0.5); width: 100%; max-width: 920px; }
.af-row { display: grid; grid-template-columns: 1.15fr 1fr auto; border: 1px solid var(--af-line); background: rgba(14,15,17,0.35); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); transition: border-color 0.3s var(--ease); }
.af-row:focus-within { border-color: var(--af-line-strong); }
.af-field { position: relative; display: flex; flex-direction: column; justify-content: center; gap: 6px; padding: 16px 22px 14px; min-width: 0; transition: background 0.3s var(--ease); }
.af-field + .af-field { border-left: 1px solid var(--af-line); }
.af-field:focus-within { background: rgba(243,239,231,0.04); }
.af-field span { font-size: 11px; font-weight: 500; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); transition: color 0.3s var(--ease); }
.af-field:focus-within span { color: var(--accent); }
.af-field input { width: 100%; font: 400 18px/1.35 var(--sans); color: var(--bone); background: none; border: 0; padding: 0; outline: none; -webkit-appearance: none; appearance: none; }
.af-field input::placeholder { color: rgba(243,239,231,0.32); }
.af-field.is-invalid span { color: #E2A08F; }
.af-submit { display: inline-flex; align-items: center; justify-content: center; gap: 14px; padding: 0 30px; border: 0; cursor: pointer; font: 600 13px/1 var(--sans); letter-spacing: 0.14em; text-transform: uppercase; color: var(--bg); background: var(--bone); white-space: nowrap; transition: background 0.3s var(--ease), transform 0.16s ease-out; -webkit-tap-highlight-color: transparent; }
.af-submit::after { content: '→'; font-weight: 400; letter-spacing: 0; transition: transform 0.35s var(--ease); }
.af-submit:active { transform: scale(0.98); transition-duration: 0.1s; }
.af-submit[disabled] { cursor: progress; }
.af-submit[disabled]::after { content: ''; width: 14px; height: 14px; border: 1.5px solid rgba(14,15,17,0.25); border-top-color: var(--bg); border-radius: 50%; animation: af-spin 0.8s linear infinite; }
@keyframes af-spin { to { transform: rotate(360deg); } }
@media (hover: hover) { .af-submit:hover { background: #fff; } .af-submit:hover::after { transform: translateX(4px); } }
.af-extra { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 14px 40px; margin-top: 18px; }
.af-check { display: flex; gap: 12px; align-items: flex-start; max-width: 520px; font-size: 14px; line-height: 1.55; color: var(--muted); cursor: pointer; }
.af-check input { appearance: none; -webkit-appearance: none; flex-shrink: 0; width: 18px; height: 18px; margin: 2px 0 0; border: 1px solid var(--af-line-strong); background: none; cursor: pointer; position: relative; transition: background 0.2s, border-color 0.2s; }
.af-check input:checked { background: var(--bone); border-color: var(--bone); }
.af-check input:checked::after { content: ''; position: absolute; left: 5px; top: 1.5px; width: 5px; height: 10px; border: solid var(--bg); border-width: 0 1.5px 1.5px 0; transform: rotate(45deg); }
.af-check input:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.af-legal { flex: 1 1 280px; max-width: 360px; font-size: 12px; line-height: 1.6; color: var(--dim, #5E5B55); }
.af-legal a { color: var(--muted); }
.af-status { min-height: 1.4em; margin-top: 14px; font-size: 14px; line-height: 1.55; color: var(--muted); }
.af-status.err { color: #E2A08F; }
.af-hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
/* Sukces: formularz zamienia się w potwierdzenie, w tym samym miejscu */
.af-done { display: none; align-items: flex-start; gap: 20px; padding: 26px 28px; border: 1px solid var(--af-line); }
.af-done-mark { flex-shrink: 0; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--accent); color: var(--accent); font-size: 18px; }
.af-done strong { display: block; font-family: var(--serif); font-weight: 400; font-size: 26px; line-height: 1.2; color: var(--bone); margin-bottom: 8px; }
.af-done p { font-size: 15px; line-height: 1.6; color: var(--muted); margin: 0; }
.af.is-done .af-row, .af.is-done .af-extra, .af.is-done .af-status { display: none; }
.af.is-done .af-done { display: flex; animation: af-in 0.5s var(--ease) both; }
@keyframes af-in { from { opacity: 0; transform: translateY(6px); } }
/* Wariant z trzecim polem (audyt.html): nazwa kancelarii pod spodem */
.af-row.af-row-3 { grid-template-columns: 1.15fr 1fr; }
.af-row.af-row-3 .af-field:nth-child(3) { grid-column: 1 / -1; border-left: 0; border-top: 1px solid var(--af-line); }
.af-row.af-row-3 .af-submit { grid-column: 1 / -1; padding: 22px 30px; }
@media (max-width: 760px) {
  .af-row, .af-row.af-row-3 { grid-template-columns: 1fr; }
  .af-field + .af-field { border-left: 0; border-top: 1px solid var(--af-line); }
  .af-submit { padding: 20px 24px; }
  .af-field input { font-size: 17px; }
}
@media (prefers-reduced-motion: reduce) { .af.is-done .af-done { animation: none; } .af-submit:active { transform: none; } }
@media (prefers-reduced-transparency: reduce) { .af-row { background: var(--bg); -webkit-backdrop-filter: none; backdrop-filter: none; } }
/* W nagłówkach podstron .page-hero p ma duży krój: przywracamy rozmiary komponentu */
.af p.af-legal { font-size: 12px; line-height: 1.6; max-width: 360px; margin: 0; color: var(--dim, #5E5B55); }
.af p.af-status { font-size: 14px; max-width: none; margin: 14px 0 0; }
.af .af-done p { font-size: 15px; max-width: none; margin: 0; }
