/* ==========================================================
   Quiztion Offer Form
   ----------------------------------------------------------
   BRAND VARIABLES — swap these with your quiztion.bg theme
   values (colors + fonts) and the whole form re-skins itself.
   ========================================================== */
:root {
    /* Colors */
    --c-bg:          #f5f6fa;   /* page background */
    --c-surface:     #ffffff;   /* card / form background */
    --c-text:        #131521;   /* main text */
    --c-muted:       #61667a;   /* secondary text */
    --c-border:      #dfe2ec;   /* inputs, dividers */
    --c-primary:     #3730e0;   /* brand primary (buttons, accents) */
    --c-primary-dark:#2a24b8;   /* hover state */
    --c-primary-soft:#eceafd;   /* selected choice background */
    --c-error:       #d63649;

    /* Typography */
    --font-display: 'Sora', system-ui, sans-serif;
    --font-body:    'Inter', system-ui, sans-serif;

    /* Shape */
    --radius:    12px;
    --radius-lg: 20px;
    --shadow:    0 10px 40px -12px rgba(19, 21, 33, .12);
}

/* ── Base ─────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }

body {
    margin: 0;
    background: var(--c-bg);
    color: var(--c-text);
    font-family: var(--font-body);
    font-size: 1rem;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

h1, h2, legend {
    font-family: var(--font-display);
    line-height: 1.2;
    margin: 0 0 .5em;
}

a { color: var(--c-primary); }

/* ── Header / footer ──────────────────────────────────── */
.site-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 760px;
    margin: 0 auto;
    padding: 24px 20px;
}

.logo img { display: block; height: 38px; width: auto; }

.lang-switch {
    display: flex;
    gap: 8px;
    font-weight: 600;
    font-size: .875rem;
    color: var(--c-muted);
}
.lang-switch a { text-decoration: none; color: var(--c-muted); }
.lang-switch a.is-active { color: var(--c-primary); }
.lang-switch a:hover { color: var(--c-primary-dark); }

.site-footer {
    max-width: 760px;
    margin: 0 auto;
    padding: 32px 20px;
    text-align: center;
    color: var(--c-muted);
    font-size: .875rem;
}

/* ── Layout ───────────────────────────────────────────── */
.wrap {
    max-width: 760px;
    margin: 0 auto;
    padding: 8px 20px 40px;
}

.form-intro { margin-bottom: 28px; }

.eyebrow {
    margin: 0 0 4px;
    font-weight: 600;
    color: var(--c-primary);
    font-size: .9375rem;
    text-transform: uppercase;
}

.form-intro h1 { font-size: clamp(1.6rem, 4vw, 2.2rem); }
.lead { color: var(--c-muted); margin: 0; max-width: 56ch; }

/* ── Progress ─────────────────────────────────────────── */
.progress {
    height: 6px;
    border-radius: 999px;
    background: var(--c-border);
    overflow: hidden;
}

.progress__bar {
    height: 100%;
    width: 0;
    border-radius: inherit;
    background: linear-gradient(90deg, var(--c-primary), var(--c-primary-dark));
    transition: width .35s ease;
}

.progress__label {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    margin: 10px 0 20px;
    font-size: .875rem;
    color: var(--c-muted);
}
.progress__label #stepTitle { font-weight: 600; color: var(--c-text); }

/* ── Steps ────────────────────────────────────────────── */
.step {
    display: none;
    margin: 0;
    padding: 28px;
    border: none;
    background: var(--c-surface);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
}

.step.is-active { display: block; animation: step-in .3s ease; }

@keyframes step-in {
    from { opacity: 0; transform: translateY(10px); }
    to   { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
    .step.is-active { animation: none; }
    .progress__bar  { transition: none; }
}

.step__title { font-size: 1.25rem; padding: 0; margin-bottom: 18px; }

/* ── Fields ───────────────────────────────────────────── */
.field { margin-bottom: 22px; }
.field:last-child { margin-bottom: 0; }

.field__label {
    display: block;
    margin: 0 0 8px;
    font-weight: 600;
    font-size: .9375rem;
}

.req { color: var(--c-error); }

.input {
    width: 100%;
    padding: 12px 14px;
    font: inherit;
    color: var(--c-text);
    background: var(--c-surface);
    border: 1px solid var(--c-border);
    border-radius: var(--radius);
    transition: border-color .15s ease, box-shadow .15s ease;
}

.input:focus {
    outline: none;
    border-color: var(--c-primary);
    box-shadow: 0 0 0 3px var(--c-primary-soft);
}

textarea.input { resize: vertical; min-height: 96px; }

/* Choice pills (radio / checkbox) */
.choices { display: flex; flex-wrap: wrap; gap: 10px; }

.choice {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    border: 1px solid var(--c-border);
    border-radius: 999px;
    background: var(--c-surface);
    cursor: pointer;
    font-size: .9375rem;
    transition: border-color .15s ease, background .15s ease;
    user-select: none;
}

.choice:hover { border-color: var(--c-primary); }

.choice input {
    accent-color: var(--c-primary);
    margin: 0;
}

.choice:has(input:checked) {
    border-color: var(--c-primary);
    background: var(--c-primary-soft);
}

.choice:has(input:focus-visible) {
    box-shadow: 0 0 0 3px var(--c-primary-soft);
}

.input--other { margin-top: 4px; }

/* Errors */
.field.has-error .input,
.field.has-error .choice { border-color: var(--c-error); }

.field__error,
.form-error {
    margin: 6px 0 0;
    color: var(--c-error);
    font-size: .875rem;
    font-weight: 500;
}

.form-error { margin: 14px 0 0; }

.required-hint {
    margin: 16px 4px 0;
    font-size: .8125rem;
    color: var(--c-muted);
}

/* Honeypot — visually removed, still in the DOM for bots */
.hp {
    position: absolute !important;
    left: -9999px !important;
    width: 1px; height: 1px;
    overflow: hidden;
}

/* ── Buttons ──────────────────────────────────────────── */
.form-nav {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    margin-top: 20px;
}
.form-nav .btn:only-child { margin-left: auto; }

.btn {
    font: inherit;
    font-weight: 600;
    padding: 12px 28px;
    border-radius: 999px;
    border: 1px solid transparent;
    cursor: pointer;
    transition: background .15s ease, border-color .15s ease, transform .1s ease;
}

.btn:active { transform: scale(.98); }

.btn--primary {
    background: var(--c-primary);
    color: #fff;
}
.btn--primary:hover { background: var(--c-primary-dark); }
.btn--primary:disabled { opacity: .6; cursor: default; }

.btn--ghost {
    background: transparent;
    border-color: var(--c-border);
    color: var(--c-text);
}
.btn--ghost:hover { border-color: var(--c-primary); color: var(--c-primary); }

.btn:focus-visible {
    outline: 3px solid var(--c-primary-soft);
    outline-offset: 2px;
}

/* ── Notices (thanks / invalid / already submitted) ───── */
.notice {
    background: var(--c-surface);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    padding: 48px 32px;
    text-align: center;
}
.notice h1 { font-size: 1.6rem; }
.notice p { color: var(--c-muted); max-width: 48ch; margin: 0 auto; }

/* ── Mobile ───────────────────────────────────────────── */
@media (max-width: 560px) {
    .step { padding: 20px 16px; }
    .form-nav { flex-direction: column-reverse; }
    .btn { width: 100%; }
    .form-nav .btn:only-child { margin-left: 0; }
}
