/* Hubso v2 — ankieta: start, pytanie, kontakt, wynik, pasek postępu.
   Tokeny i komponenty (.btn, .chip, .checks, .header, .footer) z base.css. */
:root { --error: #c2253a; }

.header-label { color: var(--ink); font-size: 15px; font-weight: 600; letter-spacing: -.01em; }
#main, h1[tabindex] { outline: none; }
/* krótkie widoki: stopka zawsze na dole okna */
body { display: flex; flex-direction: column; min-height: 100svh; }
#main { flex: 1; }

/* wejście widoku: translateY(40px) → 0, jak [data-reveal] */
.stage-enter .enter { animation: stage-in .9s var(--ease) both; }
@keyframes stage-in { from { opacity: 0; transform: translateY(40px); } }

/* ===== start (gradient pod biały tekst na całej wysokości) ===== */
.welcome { display: flex; align-items: center; min-height: 100svh; padding: 200px 0 100px; overflow: hidden; background: var(--deep-grad); color: #fff; }
.welcome-inner { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, .8fr); align-items: center; gap: 40px; }
.welcome-title { color: #fff; font-size: clamp(40px, 4.6vw, 72px); line-height: 1.04; letter-spacing: -.045em; }
.welcome-lead { max-width: 540px; margin-top: 28px; color: #fff; }
.start-row { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 26px; margin-top: 40px; }
.time-note { display: inline-flex; align-items: center; gap: 8px; color: #fff; font-size: 15px; font-weight: 600; }
.welcome-disclaimer { display: flex; gap: 12px; max-width: 560px; margin-top: 44px; padding: 18px 22px; border: 1px solid rgba(255, 255, 255, .3); border-radius: var(--r20); background: rgba(255, 255, 255, .16); -webkit-backdrop-filter: blur(15px); backdrop-filter: blur(15px); color: #fff; font-size: 14px; line-height: 1.6; }
.welcome-disclaimer .i { margin-top: 1px; }
.welcome-visual { position: relative; justify-self: end; width: 100%; max-width: 540px; }
/* asset jest już odbity: telefon przechyla się w prawo jak w hero index_02 */
.welcome-img { width: 100%; }
/* dymek czatu nad telefonem, ogonek w lewym dolnym rogu */
.welcome-bubble { position: absolute; top: 3%; right: 0; display: inline-flex; align-items: center; gap: 12px; padding: 12px 22px 12px 12px; border-radius: 22px 22px 22px 6px; background: #fff; box-shadow: var(--shadow-sticker); color: var(--ink); font-size: 17px; font-weight: 700; letter-spacing: -.01em; white-space: nowrap; }
.welcome-bubble-icon { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); }
.noscript-note { padding: 200px 0 80px; color: var(--ink); }

/* ===== pytanie i kontakt ===== */
.question { width: min(100% - 2 * var(--gutter), 860px); padding: 200px 0 120px; }
.question-meta { display: flex; align-items: center; gap: 14px; margin-bottom: 20px; }
.question-meta .chip { margin: 0; }
.question-number { display: grid; place-items: center; width: 46px; height: 46px; border-radius: var(--r10); background: var(--accent-soft); color: var(--accent); font-size: 15px; font-weight: 700; }
.question-title { font-size: clamp(30px, 3.4vw, 46px); line-height: 1.15; }
.question-help { margin-top: 14px; }
.answer-fieldset { min-width: 0; margin: 36px 0 0; padding: 0; border: 0; }

.choices { display: grid; gap: 12px; }
.choices[data-layout="grid"] { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.choice { position: relative; display: flex; align-items: center; gap: 16px; min-height: 64px; padding: 14px 18px; border: 1px solid var(--line); border-radius: 15px; background: #fff; color: var(--ink); cursor: pointer; transition: border-color .3s, background .3s; }
.choice:hover { border-color: var(--accent); }
.choice:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }
/* input przykrywa całą kartę: klik i focus działają na całej powierzchni */
.choice input, .consent input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; border-radius: inherit; -webkit-appearance: none; appearance: none; cursor: pointer; }
.choice-key { display: grid; place-items: center; flex: none; width: 32px; height: 32px; border: 1px solid var(--line); border-radius: var(--r10); background: #fff; color: var(--muted); font-size: 13px; font-weight: 700; transition: background .3s, color .3s, border-color .3s; }
.choice-label { font-size: 16px; font-weight: 500; line-height: 1.45; }
.choice-check { display: grid; place-items: center; flex: none; width: 26px; height: 26px; margin-left: auto; border-radius: 50%; background: var(--accent); color: #fff; opacity: 0; transform: scale(.6); transition: opacity .3s, transform .4s var(--ease); }
.choice-check .i, .consent-box .i { width: 14px; height: 14px; stroke-width: 2.6; }
.choice input:checked ~ .choice-key { border-color: var(--accent); background: var(--accent); color: #fff; }
.choice input:checked ~ .choice-check { opacity: 1; transform: none; }

.answer-status { display: flex; justify-content: space-between; gap: 16px; min-height: 30px; margin-top: 14px; font-size: 14px; line-height: 1.6; }
.selection-count { color: var(--muted); font-weight: 600; }
.error { color: var(--error); font-size: 14px; font-weight: 600; line-height: 1.6; }
.question-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; margin-top: 26px; }
.keyboard-note { font-size: 14px; }
kbd { padding: 3px 8px; border: 1px solid var(--line); border-radius: 6px; color: var(--ink); font: 600 12px/1 "Manrope", system-ui, sans-serif; }

.contact-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px 20px; margin-top: 36px; }
.field-wide { grid-column: 1 / -1; }
.field label { display: block; margin-bottom: 8px; color: var(--ink); font-size: 15px; font-weight: 600; line-height: 1.4; }
.field label span { color: var(--muted); font-weight: 500; }
.field input { width: 100%; height: 56px; padding: 0 18px; border: 1px solid var(--line); border-radius: var(--r10); background: #fff; color: var(--ink); font: inherit; font-weight: 500; transition: border-color .3s; }
.field input::placeholder { color: #8b96a3; }
.field input:hover, .field input:focus { border-color: var(--accent); }
.field input[aria-invalid="true"] { border-color: var(--error); }
.field-error { min-height: 24px; padding-top: 4px; color: var(--error); font-size: 13px; font-weight: 600; line-height: 1.5; }
.hp-field { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }

.consent-fields { margin-top: 14px; }
.consent-intro { margin-bottom: 12px; color: var(--ink); font-weight: 600; }
.consent { position: relative; display: flex; align-items: flex-start; gap: 14px; padding: 16px 18px; border: 1px solid var(--line); border-radius: 15px; color: var(--ink); font-size: 15px; line-height: 1.55; cursor: pointer; transition: border-color .3s, background .3s; }
.consent:hover { border-color: var(--accent); }
.consent:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }
.consent:has(input[aria-invalid="true"]) { border-color: var(--error); }
.consent:has(input[aria-invalid="true"]) .consent-box { border-color: var(--error); }
.consent-box { display: grid; place-items: center; flex: none; width: 24px; height: 24px; border: 1px solid #b9c6d4; border-radius: 6px; background: #fff; color: transparent; transition: background .3s, border-color .3s; }
.consent input:checked ~ .consent-box { border-color: var(--accent); background: var(--accent); color: #fff; }
.consent-help { margin-top: 4px; font-size: 13px; line-height: 1.65; }
.privacy-note { margin-top: 20px; padding: 20px 24px; border-radius: 15px; background: var(--surface); font-size: 13px; line-height: 1.65; }
.privacy-note p + p { margin-top: 8px; }
.consent-help a, .privacy-note a { color: var(--accent); text-decoration: underline; text-underline-offset: 2px; }
#contact-error { margin-top: 18px; }

/* ===== wynik ===== */
.result { padding: 200px 0 120px; }
.result-band { padding: 80px; border-radius: var(--r20); background: var(--deep-grad); color: rgba(255, 255, 255, .88); }
.result-title { max-width: 760px; color: #fff; font-size: clamp(36px, 4.5vw, 64px); line-height: 1.1; }
.result-band p { max-width: 620px; margin-top: 18px; }
.result-band .checks { margin-top: 16px; color: #fff; font-weight: 600; }
.result-band .checks .i { color: #fff; }
.result-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 28px; margin-top: 40px; }
.text-button { color: #fff; font-weight: 600; text-decoration: underline; text-underline-offset: 4px; }
.text-button:hover { text-decoration-thickness: 2px; }

/* ===== pasek postępu ===== */
.progress-wrap { position: fixed; left: 50%; bottom: 20px; z-index: 40; display: flex; align-items: center; gap: 16px; width: min(100% - 32px, 560px); padding: 12px 22px; border-radius: var(--pill); background: #fff; box-shadow: var(--shadow-header); transform: translateX(-50%); }
.progress-wrap[hidden] { display: none; }
.progress-text { flex: none; min-width: 56px; color: var(--ink); font-size: 14px; font-weight: 700; }
.progress { flex: 1; height: 8px; overflow: hidden; border-radius: var(--pill); background: var(--line); }
#progress-fill { display: block; height: 100%; border-radius: inherit; background: var(--accent); transform: scaleX(0); transform-origin: left; transition: transform .6s var(--ease); }

/* ===== odstęp pod pasek postępu ===== */
body:not([data-view="welcome"]) main { padding-bottom: 100px; }

/* ===== responsywność ===== */
@media (max-width: 900px) {
  .welcome-inner { grid-template-columns: 1fr; }
  .welcome-visual { justify-self: center; max-width: 380px; }
  .welcome-bubble { font-size: 15px; padding: 9px 18px 9px 9px; }
  .welcome-bubble-icon { width: 34px; height: 34px; }
}
@media (max-width: 767px) {
  .header-label { font-size: 14px; }
  .welcome { min-height: 0; padding: 130px 0 70px; }
  .question, .result { padding: 120px 0 90px; }
  .choices[data-layout="grid"], .contact-fields { grid-template-columns: 1fr; }
  .question-actions .btn { padding: 15px 24px; }
  .keyboard-note { display: none; }
  .result-band { padding: 50px 24px; }
}
