/* ============================================================
   GAG · Tema de marca (Manual de marcas)
   Tokens · CSS Custom Properties — mismos tokens, distinto modo
   ============================================================ */

:root {
    /* Marca · Crimson */
    --brand-100: #FBEAED;
    --brand-200: #F2B8C0;
    --brand-400: #E8506A;
    --brand-500: #C42A3D; /* primary */
    --brand-700: #7E1D2A; /* deep */
    --brand-900: #561420;

    /* Texto (neutrales cálidos) */
    --ink: #1B1820;
    --muted: #5C544D;
    --subtle: #8A8079;

    /* Superficies · claro */
    --app: #F7F4F2;
    --card: #FFFFFF;
    --border: #E7E1DE;

    /* Semántico · estados */
    --ok: #2E9E6B;
    --info: #3B6FE0;
    --warn: #E0A23B;
    --danger: #C42A3D;

    /* Tipografía */
    --font-display: 'Space Grotesk', 'Helvetica Neue', Helvetica, Arial, sans-serif;
    --font-body: 'IBM Plex Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif;
    --font-mono: 'IBM Plex Mono', Consolas, monospace;

    color-scheme: light;
}

[data-theme="dark"] {
    --brand-400: #E8506A;
    --brand-500: #C42A3D;
    --brand-700: #E8506A;

    --ink: #F2ECE7;
    --muted: #CFC6BD;
    --subtle: #9A9088;

    /* Superficies · oscuro */
    --app: #141016;
    --card: #211C24;
    --border: #2A2530;

    --ok: #5FC994;
    --info: #7CA8F5;
    --warn: #E0A23B;
    --danger: #E8506A;

    color-scheme: dark;
}

/* ============ Base ============ */

html, body {
    background-color: var(--app);
    color: var(--ink);
    font-family: var(--font-body);
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-display);
    color: var(--ink);
}

a, .btn-link {
    color: var(--brand-500);
}

    a:hover, .btn-link:hover {
        color: var(--brand-700);
    }

body, .page, .card, input, select, textarea, button {
    transition: background-color .2s ease, color .2s ease, border-color .2s ease;
}

/* ============ Alternador de tema ============ */

.theme-toggle {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    padding: 3px;
    border: 1px solid var(--border);
    border-radius: 999px;
    background-color: var(--card);
}

    .theme-toggle button {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 30px;
        height: 30px;
        border: none;
        border-radius: 999px;
        background: transparent;
        color: var(--subtle);
        cursor: pointer;
        line-height: 1;
        padding: 0;
    }

        .theme-toggle button:hover {
            color: var(--ink);
            background-color: var(--app);
        }

        .theme-toggle button.active {
            background-color: var(--brand-500);
            color: #fff;
        }

    .theme-toggle svg {
        width: 16px;
        height: 16px;
        stroke: currentColor;
        fill: none;
        stroke-width: 2;
        stroke-linecap: round;
        stroke-linejoin: round;
    }

/* ============ Barra superior ============ */

.gag-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: .65rem 1.25rem;
    background-color: var(--card);
    border-bottom: 1px solid var(--border);
}

.gag-brand {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1.05rem;
    color: var(--ink);
    letter-spacing: .01em;
}

    .gag-brand .brand-dot {
        color: var(--brand-500);
    }

/* ============ Encuesta ============ */

.survey-panel {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
    border-radius: 10px;
    background-color: var(--app);
}

.survey-card {
    background-color: var(--card);
    border: 1px solid var(--border);
    border-radius: 10px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08);
    padding: 20px;
    margin-bottom: 20px;
}

.survey-complete {
    text-align: center;
    font-size: 18px;
    color: var(--ok);
}

.question-label {
    font-weight: 600;
    display: block;
    margin-bottom: 10px;
    color: var(--ink);
    font-family: var(--font-body);
}

.survey-input {
    width: 100%;
    padding: 10px;
    margin-bottom: 20px;
    border: 1px solid var(--border);
    border-radius: 5px;
    background-color: var(--card);
    color: var(--ink);
}

    .survey-input::placeholder {
        color: var(--subtle);
    }

    .survey-input:focus {
        outline: none;
        border-color: var(--brand-400);
        box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand-500) 20%, transparent);
    }

.option-item {
    display: block;
    margin-bottom: 10px;
    color: var(--ink);
}

input[type="radio"], input[type="checkbox"] {
    accent-color: var(--brand-500);
}

input[type="date"] {
    background-color: var(--card);
    color: var(--ink);
    border: 1px solid var(--border);
    border-radius: 5px;
    padding: 6px 10px;
}

.star {
    cursor: pointer;
    font-size: 30px;
    color: var(--subtle);
    opacity: .6;
}

    .star.selected {
        color: var(--warn);
        opacity: 1;
    }

/* ============ Progreso ============ */

.survey-progress {
    margin-bottom: 14px;
}

    .survey-progress .progress-label {
        font-family: var(--font-mono);
        font-size: 12px;
        letter-spacing: .08em;
        text-transform: uppercase;
        color: var(--subtle);
    }

.progress-track {
    height: 4px;
    margin-top: 6px;
    background-color: var(--border);
    border-radius: 999px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background-color: var(--brand-500);
    border-radius: 999px;
    transition: width .25s ease;
}

/* ============ Pantalla final ============ */

.survey-complete-card {
    text-align: center;
    padding: 40px 24px;
}

    .survey-complete-card .complete-icon {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 56px;
        height: 56px;
        margin-bottom: 16px;
        border-radius: 50%;
        background-color: color-mix(in srgb, var(--ok) 15%, transparent);
        color: var(--ok);
    }

    .survey-complete-card svg {
        width: 28px;
        height: 28px;
        stroke: currentColor;
        fill: none;
        stroke-width: 2.5;
        stroke-linecap: round;
        stroke-linejoin: round;
    }

    .survey-complete-card h4 {
        margin-bottom: 6px;
    }

    .survey-complete-card p {
        color: var(--muted);
        margin: 0;
    }
