/* Ankieta PUPLE — identyfikacja: krem + karmazyn, Poppins (nagłówki) + DM Sans (treść) */

:root {
    --primary:  #BF092F;   /* karmazyn marki */
    --primary2: #D81E40;
    --accent:   #D69C7E;    /* brzoskwinia (pigułki) */
    --peach1:   #E6C7B2;
    --peach2:   #D69C7E;
    --bg:       #F4EFE3;    /* krem */
    --text:     #171616;    /* prawie-czerń */
    --muted:    #8A8378;
    --card:     #FBF7EF;
    --line:     #E7DDCC;
    --ok:       #2BB673;
    --radius:   24px;
    --shadow:   0 26px 60px -30px rgba(80, 25, 35, .45);
    --font:      'DM Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
    --font-head: 'Poppins', var(--font);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; min-height: 100%; }

body {
    font-family: var(--font);
    color: var(--text);
    background:
        radial-gradient(1100px 520px at 12% -8%, rgba(214,156,126,.28), transparent 60%),
        radial-gradient(820px 460px at 112% 6%, rgba(191,9,47,.10), transparent 55%),
        var(--bg);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px 16px;
    -webkit-font-smoothing: antialiased;
}

/* ziarno jak na slajdach */
body::before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 1;
    opacity: .05;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ── Pasek postępu ── */
.progress-wrap {
    position: fixed;
    top: 0; left: 0; right: 0;
    height: 6px;
    background: rgba(231, 221, 204, .7);
    z-index: 10;
}
.progress-bar {
    height: 100%;
    width: 0;
    background: linear-gradient(90deg, var(--primary), var(--primary2));
    border-radius: 0 6px 6px 0;
    transition: width .45s cubic-bezier(.4,0,.2,1);
}

/* ── Karta ── */
.shell { width: 100%; max-width: 600px; position: relative; z-index: 2; }

.card {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 40px 40px 32px;
    position: relative;
}

/* Animacja przejścia pytań */
.step { animation: pop .4s cubic-bezier(.2,.7,.2,1); }
.step.leaving { animation: leave .25s ease forwards; }
@keyframes pop   { from { opacity: 0; transform: translateY(18px) scale(.99);} to { opacity:1; transform:none; } }
@keyframes leave { to   { opacity: 0; transform: translateY(-14px);} }

/* ── Branding na ekranie powitalnym ── */
.brandbar { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; }
.wordmark { font-family: var(--font-head); font-weight: 800; letter-spacing: .06em; font-size: 22px; color: var(--text); }
.tagline  { font-family: var(--font-head); font-weight: 700; font-size: 11px; color: var(--primary); }
.brand-dog { width: 150px; height: 128px; display: block; margin: 6px auto 4px; }

.eyebrow {
    display: inline-block;
    font-family: var(--font-head);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: #9a4a1f;
    background: linear-gradient(135deg, var(--peach1), var(--peach2));
    padding: 6px 14px;
    border-radius: 999px;
    margin-bottom: 16px;
}

h1.q-title {
    font-family: var(--font-head);
    font-style: italic;
    font-size: 28px;
    line-height: 1.12;
    margin: 0 0 8px;
    font-weight: 800;
    letter-spacing: -.01em;
    color: var(--primary);
}
.q-help { color: var(--muted); font-size: 15px; margin: 0 0 24px; }

/* ── Opcje ── */
.options { display: flex; flex-direction: column; gap: 10px; margin-bottom: 8px; }

.opt {
    display: flex;
    align-items: center;
    gap: 14px;
    border: 2px solid var(--line);
    border-radius: 14px;
    padding: 15px 16px;
    cursor: pointer;
    background: #fff;
    transition: border-color .15s, background .15s, transform .08s;
    font-size: 16px;
    user-select: none;
}
.opt:hover { border-color: var(--peach2); background: #FFFDFA; }
.opt:active { transform: scale(.995); }
.opt.selected { border-color: var(--primary); background: #FBEAEE; }

.opt .marker {
    flex: 0 0 24px;
    width: 24px; height: 24px;
    border: 2px solid var(--line);
    border-radius: 50%;
    display: grid; place-items: center;
    transition: all .15s;
}
.opt.checkbox .marker { border-radius: 7px; }
.opt.selected .marker { border-color: var(--primary); background: var(--primary); }
.opt .marker svg { width: 14px; height: 14px; opacity: 0; transform: scale(.6); transition: all .15s; }
.opt.selected .marker svg { opacity: 1; transform: none; }
.opt .label { flex: 1; }

.opt-text { margin: -2px 0 6px 38px; width: calc(100% - 38px); }

/* ── Inputy ── */
.field { margin-bottom: 16px; }
.field > label { display: block; font-family: var(--font-head); font-weight: 500; font-size: 14px; margin-bottom: 6px; color: var(--text); }
input[type=text], input[type=number], input[type=email], textarea, select, .opt-text {
    width: 100%;
    font-family: var(--font);
    font-size: 16px;
    color: var(--text);
    border: 2px solid var(--line);
    border-radius: 12px;
    padding: 13px 14px;
    background: #fff;
    transition: border-color .15s;
}
input:focus, textarea:focus, select:focus { outline: none; border-color: var(--primary); }
textarea { min-height: 120px; resize: vertical; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }

/* ── Likert ── */
.likert-row { padding: 14px 0; border-bottom: 1px solid var(--line); }
.likert-row:last-child { border-bottom: none; }
.likert-label { font-size: 15px; font-weight: 500; margin-bottom: 10px; }
.likert-scale { display: flex; gap: 8px; }
.likert-scale button {
    flex: 1;
    border: 2px solid var(--line);
    background: #fff;
    border-radius: 10px;
    padding: 10px 0;
    font-size: 16px;
    font-weight: 700;
    font-family: var(--font-head);
    color: var(--muted);
    cursor: pointer;
    transition: all .12s;
}
.likert-scale button:hover { border-color: var(--peach2); }
.likert-scale button.active { border-color: var(--primary); background: var(--primary); color: #fff; }
.scale-ends { display: flex; justify-content: space-between; font-size: 12px; color: var(--muted); margin-top: 6px; }

/* ── Nawigacja ── */
.nav { display: flex; align-items: center; justify-content: space-between; margin-top: 28px; gap: 12px; }
.btn {
    border: none;
    border-radius: 14px;
    padding: 14px 28px;
    font-size: 16px;
    font-weight: 700;
    font-family: var(--font-head);
    cursor: pointer;
    transition: transform .08s, box-shadow .15s, opacity .15s;
}
.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--primary2));
    color: #fff;
    box-shadow: 0 12px 26px -10px rgba(191,9,47,.7);
}
.btn-primary:hover { transform: translateY(-1px); }
.btn-primary:disabled { opacity: .45; cursor: not-allowed; transform: none; box-shadow: none; }
.btn-ghost { background: transparent; color: var(--muted); padding: 14px 8px; }
.btn-ghost:hover { color: var(--text); }
.btn-block { width: 100%; }

.err { color: var(--primary); font-size: 14px; margin-top: 10px; min-height: 18px; }

/* ── Ekrany intro / outro ── */
.hero-emoji { font-size: 54px; margin-bottom: 8px; }
.lead { font-size: 17px; line-height: 1.6; color: #43403c; white-space: pre-line; margin-bottom: 24px; }
.meta { color: var(--muted); font-family: var(--font-head); font-weight: 500; font-size: 13px; margin-bottom: 24px; display: flex; align-items: center; gap: 8px; }
.center { text-align: center; }
.footnote { text-align: center; color: var(--muted); font-size: 12px; margin-top: 18px; }

@media (max-width: 560px) {
    .card { padding: 28px 22px 24px; }
    h1.q-title { font-size: 24px; }
    .grid-2 { grid-template-columns: 1fr; }
    .btn { padding: 13px 20px; }
}
