/* =============================================================
 * Love Manager — hoja de estilos única
 * Referencia visual: docs/diseno/01.png, 02.png y 03.png
 *
 * Reglas (las comprueba el CI, .github/scripts/check-css-colores.py):
 *  - Ningún color escrito a mano fuera de :root. Para un tono
 *    translúcido: rgba(var(--gold-main-rgb), 0.3).
 *  - Cada --X-rgb tiene que coincidir con su color --X.
 *  - Ninguna página lleva un <style> propio.
 * ============================================================= */

/* ---------- 1. Tipografías (alojadas en /fonts, licencia OFL) ---------- */
@font-face {
    font-family: "Source Serif 4";
    font-style: normal;
    font-weight: 200 900;
    font-display: swap;
    src: url("/fonts/source-serif-4-latin-wght-normal.woff2") format("woff2");
}

@font-face {
    font-family: "Source Serif 4";
    font-style: italic;
    font-weight: 200 900;
    font-display: swap;
    src: url("/fonts/source-serif-4-latin-wght-italic.woff2") format("woff2");
}

@font-face {
    font-family: "Fira Sans";
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url("/fonts/fira-sans-latin-400-normal.woff2") format("woff2");
}

@font-face {
    font-family: "Fira Sans";
    font-style: normal;
    font-weight: 600;
    font-display: swap;
    src: url("/fonts/fira-sans-latin-600-normal.woff2") format("woff2");
}

@font-face {
    font-family: "Fira Sans Condensed";
    font-style: normal;
    font-weight: 600;
    font-display: swap;
    src: url("/fonts/fira-sans-condensed-latin-600-normal.woff2") format("woff2");
}

/* ---------- 2. Variables ---------- */
:root {
    /* Fondos: negro cálido y marrón de las cajas */
    --bg-deep: #120c09;
    --bg-deep-rgb: 18, 12, 9;
    --bg-warm: #1e140c;
    --bg-warm-rgb: 30, 20, 12;

    /* Dorados: del más claro (brillo) al más oscuro (sombra del botón) */
    --gold-light: #fde6bb;
    --gold-main: #f2b866;
    --gold-main-rgb: 242, 184, 102;
    --gold-deep: #c98535;

    /* Texto */
    --text-main: #f7f1e8;
    --text-main-rgb: 247, 241, 232;
    --text-muted: #cfc3b3;
    --text-on-gold: #1a1009;

    /* Solo para marcar campos sin responder y para la etiqueta «Modo prueba» */
    --error: #f08c7c;

    --black-rgb: 0, 0, 0;

    --gold-gradient: radial-gradient(120% 160% at 50% 0%, var(--gold-light) 0%, var(--gold-main) 52%, var(--gold-deep) 100%);
    --gold-text-gradient: linear-gradient(180deg, var(--gold-light) 0%, var(--gold-main) 55%, var(--gold-deep) 100%);
    --line-soft: rgba(var(--gold-main-rgb), 0.28);
    --line-strong: rgba(var(--gold-main-rgb), 0.75);

    --font-serif: "Source Serif 4", georgia, "Times New Roman", serif;
    --font-sans: "Fira Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
    --font-cond: "Fira Sans Condensed", "Fira Sans", system-ui, sans-serif;

    --radius-md: 12px;
    --radius-lg: 22px;
    --radius-pill: 999px;

    --gutter: 16px;
    --max-width: 1100px;
}

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

html {
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background: var(--bg-deep);
    color: var(--text-main);
    font-family: var(--font-sans);
    font-size: 1.0625rem;
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

img,
svg {
    display: block;
    max-width: 100%;
}

img {
    height: auto;
}

/* Sin palabras sueltas en la última línea */
h1,
h2,
h3,
.page-subtitle {
    text-wrap: balance;
}

p,
li {
    text-wrap: pretty;
}

h1,
h2,
h3,
p,
ul,
ol {
    margin: 0;
}

ul,
ol {
    padding: 0;
    list-style: none;
}

a {
    color: var(--gold-main);
}

:focus-visible {
    outline: 2px solid var(--gold-light);
    outline-offset: 3px;
}

[hidden] {
    display: none !important;
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
    border: 0;
}

.container {
    width: min(100% - 2 * var(--gutter), var(--max-width));
    margin-inline: auto;
}

.narrow {
    max-width: 780px;
    margin-inline: auto;
}

.icon {
    width: 24px;
    height: 24px;
    flex: none;
    fill: none;
    stroke: currentcolor;
    stroke-width: 1.6;
    stroke-linecap: round;
    stroke-linejoin: round;
}

/* ---------- 4. Piezas comunes ---------- */

/* Texto dorado con degradado (titulares y precios) */
.text-gold {
    color: var(--gold-main);
    background: var(--gold-text-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Línea dorada con brillo: separa bloques, como en el diseño */
.glow-line {
    height: 2px;
    border: 0;
    margin: 0;
    background: linear-gradient(90deg, transparent, var(--gold-main) 30%, var(--gold-light) 50%, var(--gold-main) 70%, transparent);
    box-shadow: 0 0 14px rgba(var(--gold-main-rgb), 0.55);
}

.eyebrow {
    color: var(--gold-main);
    font-family: var(--font-sans);
    font-size: 0.9rem;
    font-weight: 600;
    letter-spacing: 0.28em;
    text-transform: uppercase;
}

.title-italic {
    font-family: var(--font-serif);
    font-size: clamp(1.9rem, 7vw, 2.75rem);
    font-style: italic;
    font-weight: 600;
    line-height: 1.15;
    letter-spacing: -0.01em;
}

.checklist {
    display: grid;
    gap: 0.6rem;
}

.checklist li {
    display: grid;
    grid-template-columns: 26px 1fr;
    gap: 0.75rem;
    align-items: start;
    line-height: 1.4;
}

.checklist .icon {
    width: 24px;
    height: 24px;
    color: var(--gold-main);
    stroke-width: 2.4;
}

/* Botón principal dorado */
.btn-gold {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.6em;
    min-height: 58px;
    padding: 0.55em 1.7em;
    border: 0;
    border-radius: var(--radius-pill);
    background: var(--gold-gradient);
    color: var(--text-on-gold);
    font-family: var(--font-cond);
    font-size: clamp(1.2rem, 4.6vw, 1.45rem);
    font-weight: 600;
    line-height: 1.15;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
    box-shadow:
        0 0 0 1px rgba(var(--gold-main-rgb), 0.6),
        0 10px 32px rgba(var(--gold-main-rgb), 0.22);
    transition: filter 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.btn-gold:hover {
    filter: brightness(1.06);
    box-shadow:
        0 0 0 1px rgba(var(--gold-main-rgb), 0.8),
        0 12px 40px rgba(var(--gold-main-rgb), 0.35);
}

.btn-gold:active {
    transform: translateY(1px);
}

.btn-gold:disabled {
    cursor: progress;
    filter: saturate(0.6) brightness(0.9);
}

.btn-gold .icon {
    width: 1.25em;
    height: 1.25em;
    stroke-width: 2;
}

/* Botón secundario (banner de cookies, reintentar) */
.btn-outline {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 0.5em 1.3em;
    border: 1px solid var(--line-strong);
    border-radius: var(--radius-pill);
    background: transparent;
    color: var(--text-main);
    font-family: var(--font-sans);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.btn-outline:hover {
    background: rgba(var(--gold-main-rgb), 0.12);
}

.cta-center {
    display: flex;
    justify-content: center;
    padding: 2.25rem 0 0.5rem;
}

/* Caja con borde dorado y brillo (convocatoria, asesorías, resultado) */
.box-gold {
    border: 1.5px solid var(--line-strong);
    border-radius: var(--radius-lg);
    background: linear-gradient(180deg, rgba(var(--bg-warm-rgb), 0.92), rgba(var(--bg-deep-rgb), 0.92));
    box-shadow:
        0 0 26px rgba(var(--gold-main-rgb), 0.16),
        inset 0 0 36px rgba(var(--gold-main-rgb), 0.05);
}

/* Caja discreta (frase destacada, características) */
.box-soft {
    border: 1px solid var(--line-soft);
    border-radius: var(--radius-lg);
    background: rgba(var(--bg-warm-rgb), 0.7);
}

/* ---------- 5. Cabecera ---------- */
.site-header {
    position: relative;
    z-index: 2;
    padding: 1.1rem 0 0.4rem;
}

.brand {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.9rem;
    color: var(--text-main);
    text-decoration: none;
}

.brand-symbol {
    width: 58px;
    height: auto;
}

.brand-name {
    font-family: var(--font-sans);
    font-size: clamp(1.05rem, 4.4vw, 1.5rem);
    font-weight: 400;
    letter-spacing: 0.38em;
    margin-right: -0.38em; /* compensa el espaciado de la última letra */
    text-transform: uppercase;
    white-space: nowrap;
}

.brand--stacked {
    flex-direction: column;
    gap: 0.5rem;
}

.brand--stacked .brand-symbol {
    width: 76px;
}

.logo-stop-1 {
    stop-color: var(--gold-light);
}

.logo-stop-2 {
    stop-color: var(--gold-main);
}

.logo-stop-3 {
    stop-color: var(--gold-deep);
}

/* ---------- 6. Fondo fotográfico ----------
 * .page envuelve cabecera y contenido. La foto ocupa la parte alta
 * (--bg-h) y se funde con el fondo por abajo. */
.has-bg {
    --bg-h: min(1100px, 150vh);

    position: relative;
    isolation: isolate;
    overflow: hidden;
}

.has-bg--hero {
    --bg-h: clamp(640px, 96vh, 900px);
}

.page-bg {
    position: absolute;
    inset: 0 0 auto;
    z-index: -2;
    height: var(--bg-h);
}

.page-bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: 72% 35%;
}

/* Velo oscuro sobre la foto: el texto siempre se lee */
.has-bg::after {
    content: "";
    position: absolute;
    inset: 0 0 auto;
    z-index: -1;
    height: var(--bg-h);
    background:
        linear-gradient(0deg, var(--bg-deep) 0%, rgba(var(--bg-deep-rgb), 0) 45%),
        linear-gradient(90deg, rgba(var(--bg-deep-rgb), 0.88) 0%, rgba(var(--bg-deep-rgb), 0.6) 55%, rgba(var(--bg-deep-rgb), 0.3) 100%);
}

/* ---------- 7. Landing (index.html) ---------- */
.hero {
    padding-bottom: 2.5rem;
}

.hero-content {
    padding-top: 1.75rem;
}

.hero-title {
    max-width: 13ch;
    font-family: var(--font-serif);
    font-size: clamp(2.65rem, 11vw, 4.6rem);
    font-weight: 700;
    line-height: 1.02;
    letter-spacing: -0.015em;
    text-shadow: 0 2px 18px rgba(var(--black-rgb), 0.45);
}

.hero-title .text-gold {
    text-shadow: none;
}

.hero .glow-line {
    max-width: 480px;
    margin: 1.4rem 0 1.25rem;
}

.hero-lead {
    max-width: 34rem;
    font-size: clamp(1.08rem, 4.2vw, 1.3rem);
    line-height: 1.45;
    margin-bottom: 1.75rem;
}

.section {
    padding: 2.25rem 0;
}

.identificado .title-italic {
    text-align: center;
    margin-bottom: 1.4rem;
}

.identificado .checklist {
    max-width: 640px;
    margin-inline: auto;
}

.quote-box {
    margin: 2rem 0 0;
    padding: 1.1rem 1.25rem;
    font-family: var(--font-serif);
    font-size: clamp(1.3rem, 5.2vw, 1.85rem);
    font-style: italic;
    line-height: 1.25;
    text-align: center;
}

.quote-box strong {
    font-weight: 700;
}

/* Móvil: una columna centrada. Desde 560 px, corona a la izquierda (diseño) */
.convocatoria {
    display: grid;
    gap: 1.1rem;
    justify-items: center;
    padding: 1.6rem 1rem 1.5rem;
    text-align: center;
}

.convocatoria-icon {
    width: 76px;
    height: auto;
    color: var(--gold-light);
    stroke-width: 1.3;
    filter: drop-shadow(0 0 10px rgba(var(--gold-main-rgb), 0.7));
}

.convocatoria-title {
    margin-top: 0.4rem;
    font-family: var(--font-serif);
    font-size: clamp(1.3rem, 5.2vw, 1.9rem);
    font-weight: 400;
    line-height: 1.18;
}

.convocatoria-title strong {
    display: block;
    font-weight: 700;
}

.convocatoria-title .text-gold {
    font-weight: 700;
}

.precio {
    margin-top: 0.5rem;
    color: var(--gold-main);
    font-size: 1.15rem;
}

.convocatoria .btn-gold {
    padding-inline: 1em;
    font-size: clamp(1.1rem, 4.6vw, 1.45rem);
}

.features {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    padding: 2.5rem 0 1rem;
}

.features li {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.6rem;
    padding: 0 0.5rem;
    font-size: 0.98rem;
    line-height: 1.25;
    text-align: center;
}

.features li + li {
    border-left: 1px solid var(--line-soft);
}

.features .icon {
    width: 44px;
    height: 44px;
    color: var(--gold-main);
    stroke-width: 1.4;
}

/* ---------- 8. Programa (programa.html) ---------- */
.page-head {
    padding: 1.5rem 0 2rem;
}

.page-title {
    font-family: var(--font-serif);
    font-size: clamp(2.4rem, 10vw, 4.2rem);
    font-weight: 700;
    line-height: 1.05;
    letter-spacing: -0.015em;
    text-shadow: 0 2px 18px rgba(var(--black-rgb), 0.45);
}

.page-subtitle {
    margin-top: 0.35rem;
    font-family: var(--font-serif);
    font-size: clamp(1.65rem, 7vw, 2.6rem);
    font-style: italic;
    font-weight: 600;
    line-height: 1.15;
}

.page-lead {
    max-width: 36rem;
    margin-top: 1rem;
    font-size: clamp(1.05rem, 4.2vw, 1.25rem);
    line-height: 1.45;
}

.programa-grid {
    display: grid;
    gap: 1.5rem;
}

.pilares {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    padding: 0.5rem;
}

.pilares li {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.45rem;
    padding: 1rem 0.5rem;
    line-height: 1.25;
    text-align: center;
}

.pilares strong {
    display: block;
    font-weight: 600;
}

.pilares .icon {
    width: 40px;
    height: 40px;
    color: var(--gold-main);
    stroke-width: 1.4;
}

.asesorias {
    position: relative;
    margin-top: 1.4rem;
    padding: 2.4rem 1.1rem 1.1rem;
}

.asesorias-title {
    position: absolute;
    top: 0;
    left: 50%;
    width: max-content;
    max-width: calc(100% - 1.5rem);
    padding: 0.45em 1.2em;
    border-radius: var(--radius-pill);
    background: var(--gold-gradient);
    color: var(--text-on-gold);
    font-family: var(--font-cond);
    font-size: clamp(1.1rem, 4.6vw, 1.45rem);
    font-weight: 600;
    line-height: 1.15;
    text-align: center;
    transform: translate(-50%, -50%);
    box-shadow: 0 6px 24px rgba(var(--gold-main-rgb), 0.25);
}

.pasos {
    position: relative;
}

/* Hilo vertical que une los números */
.pasos::before {
    content: "";
    position: absolute;
    top: 22px;
    bottom: 22px;
    left: 19px;
    width: 1px;
    background: var(--line-strong);
}

.pasos li {
    position: relative;
    display: grid;
    grid-template-columns: 40px 1fr;
    gap: 0.9rem;
    align-items: start;
    padding: 0.7rem 0;
}

.pasos li + li {
    border-top: 1px solid rgba(var(--gold-main-rgb), 0.14);
}

.paso-num {
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    border: 1px solid var(--gold-light);
    border-radius: 50%;
    background: var(--gold-gradient);
    color: var(--text-on-gold);
    font-family: var(--font-serif);
    font-size: 1.2rem;
    font-weight: 700;
    box-shadow: 0 0 12px rgba(var(--gold-main-rgb), 0.35);
}

.pasos h3 {
    color: var(--gold-main);
    font-family: var(--font-cond);
    font-size: 1.2rem;
    font-weight: 600;
    line-height: 1.2;
}

.pasos p {
    margin-top: 0.15rem;
    color: var(--text-muted);
    font-size: 0.98rem;
    line-height: 1.4;
}

.resultado {
    display: grid;
    gap: 1.25rem;
    align-items: center;
    margin-top: 2rem;
    padding: 1.4rem 1.25rem;
}

.resultado-foto {
    width: min(200px, 60%);
    aspect-ratio: 1;
    justify-self: center;
    border: 2px solid var(--line-strong);
    border-radius: 50%;
    object-fit: cover;
    box-shadow: 0 0 26px rgba(var(--gold-main-rgb), 0.3);
}

.resultado .title-italic {
    margin-bottom: 0.8rem;
}

/* ---------- 9. Selección (seleccion.html) ---------- */
.page-head--center {
    text-align: center;
}

.page-head--center .page-lead {
    margin-inline: auto;
}

.page-head--center .page-title {
    margin-top: 0.4rem;
}

.premio {
    display: flex;
    align-items: center;
    max-width: 560px;
    margin: 1.75rem auto 0;
    padding: 0.9rem 1.25rem;
    border-radius: var(--radius-pill);
    text-align: left;
}

.premio .icon {
    width: 64px;
    height: 64px;
    color: var(--gold-light);
    stroke-width: 1.3;
    filter: drop-shadow(0 0 8px rgba(var(--gold-main-rgb), 0.7));
}

.premio p {
    margin-left: 1rem;
    padding-left: 1rem;
    border-left: 1px solid var(--line-soft);
    font-size: clamp(1.05rem, 4.4vw, 1.35rem);
    font-weight: 600;
    line-height: 1.25;
}

.premio .text-gold {
    display: block;
    font-size: 1.12em;
}

.candidatura {
    max-width: 640px;
    margin: 0 auto;
    padding-bottom: 1rem;
}

.form-title {
    font-family: var(--font-serif);
    font-size: clamp(1.75rem, 7.4vw, 2.6rem);
    font-weight: 700;
    line-height: 1.15;
    text-align: center;
}

.form-intro {
    margin: 0.4rem 0 1.5rem;
    text-align: center;
}

.form {
    display: grid;
    gap: 0.85rem;
}

.field {
    position: relative;
}

.field > .icon {
    position: absolute;
    top: 15px;
    left: 16px;
    z-index: 2; /* por encima de .select-wrap, que va posicionado */
    color: var(--gold-main);
    pointer-events: none;
}

.field input,
.field select,
.field textarea {
    width: 100%;
    min-height: 54px;
    padding: 0.8rem 1rem 0.8rem 3.4rem;
    border: 1px solid var(--line-strong);
    border-radius: var(--radius-md);
    background: rgba(var(--bg-warm-rgb), 0.85);
    color: var(--text-main);
    font-family: var(--font-sans);
    font-size: 1rem;
    line-height: 1.35;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.field input::placeholder,
.field textarea::placeholder {
    color: var(--text-muted);
    opacity: 1;
}

/* Desplegables: un <select> no puede partir su texto en dos líneas y las
 * preguntas no caben en un móvil. El select real (invisible, pero es el
 * que se toca, recibe el foco y se envía) va encima de .select-value,
 * que muestra la pregunta o la opción elegida y sí puede ocupar dos líneas.
 * main.js copia la opción elegida en .select-value. */
.select-wrap {
    position: relative;
}

.field .select-wrap select {
    position: absolute;
    inset: 0;
    z-index: 1;
    height: 100%;
    opacity: 0;
    appearance: none;
    cursor: pointer;
}

.select-value {
    display: block;
    min-height: 54px;
    padding: 0.8rem 2.8rem 0.8rem 3.4rem;
    border: 1px solid var(--line-strong);
    border-radius: var(--radius-md);
    background: rgba(var(--bg-warm-rgb), 0.85);
    color: var(--text-muted);
    font-size: 1rem;
    line-height: 1.35;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.select-wrap select:valid + .select-value {
    color: var(--text-main);
}

.select-wrap select:focus-visible + .select-value {
    border-color: var(--gold-light);
    box-shadow: 0 0 0 3px rgba(var(--gold-main-rgb), 0.25);
}

.field select option {
    background: var(--bg-warm);
    color: var(--text-main);
}

.field .chevron {
    position: absolute;
    top: 15px;
    right: 14px;
    left: auto;
    color: var(--text-main);
    pointer-events: none;
}

.field textarea {
    min-height: 120px;
    resize: vertical;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
    border-color: var(--gold-light);
    outline: none;
    box-shadow: 0 0 0 3px rgba(var(--gold-main-rgb), 0.25);
}

.consent {
    display: grid;
    grid-template-columns: 22px 1fr;
    gap: 0.75rem;
    align-items: start;
    margin-top: 0.3rem;
    font-size: 0.95rem;
    line-height: 1.45;
    cursor: pointer;
}

.consent input {
    display: grid;
    place-content: center;
    width: 22px;
    height: 22px;
    min-height: 0; /* anula lo de .field input, pensado para los campos de texto */
    margin: 1px 0 0;
    padding: 0;
    border: 1.5px solid var(--line-strong);
    border-radius: 6px;
    background: rgba(var(--bg-warm-rgb), 0.85);
    appearance: none;
    cursor: pointer;
}

/* Marca de la casilla, dibujada con dos bordes */
.consent input::before {
    content: "";
    width: 11px;
    height: 6px;
    border-bottom: 2px solid var(--text-on-gold);
    border-left: 2px solid var(--text-on-gold);
    opacity: 0;
    transform: translate(0, -1px) rotate(-45deg);
}

.consent input:checked {
    border-color: var(--gold-light);
    background: var(--gold-gradient);
}

.consent input:checked::before {
    opacity: 1;
}

.consent input:focus-visible {
    outline: 2px solid var(--gold-light);
    outline-offset: 2px;
}

.form-legal {
    color: var(--text-muted);
    font-size: 0.82rem;
    line-height: 1.45;
}

.form .btn-gold {
    justify-self: center;
    width: min(100%, 460px);
    margin-top: 0.6rem;
}

/* Campo trampa para bots: invisible para las personas */
.hp {
    display: none;
}

/* Preguntas sin responder (las marca main.js) */
.is-missing input,
.is-missing textarea,
.is-missing .select-value {
    border-color: var(--error);
}

.is-missing .consent input {
    outline: 2px solid var(--error);
    outline-offset: 2px;
}

.field-error {
    margin: 0.35rem 0 0 0.25rem;
    color: var(--error);
    font-size: 0.9rem;
}

.form-alert {
    padding: 1rem 1.1rem;
    border: 1px solid var(--error);
    border-radius: var(--radius-md);
    background: rgba(var(--bg-warm-rgb), 0.9);
    line-height: 1.45;
}

.form-alert .btn-outline {
    margin-top: 0.75rem;
}

.gracias {
    display: grid;
    gap: 0.75rem;
    max-width: 640px;
    margin: 0 auto;
    padding: 1.5rem 0 1rem;
    text-align: center;
}

.gracias:focus {
    outline: none;
}

.gracias .icon {
    width: 76px;
    height: 76px;
    margin: 0 auto 0.25rem;
    color: var(--gold-light);
    stroke-width: 1.3;
    filter: drop-shadow(0 0 10px rgba(var(--gold-main-rgb), 0.7));
}

.gracias-title {
    font-family: var(--font-serif);
    font-size: clamp(1.9rem, 7.6vw, 2.75rem);
    font-style: italic;
    font-weight: 700;
    line-height: 1.15;
}

.gracias-lead {
    font-size: 1.25rem;
}

.gracias-firma {
    margin-top: 0.5rem;
    color: var(--gold-main);
    font-family: var(--font-serif);
    font-size: clamp(1.35rem, 5.4vw, 1.8rem);
    font-style: italic;
}

/* ---------- 10. Páginas legales y 404 ---------- */
.legal {
    max-width: 760px;
    padding: 1.5rem 0 3rem;
}

.legal h1 {
    font-family: var(--font-serif);
    font-size: clamp(2rem, 8vw, 2.8rem);
    font-weight: 700;
    line-height: 1.1;
    margin-bottom: 0.5rem;
}

.legal h2 {
    margin: 2rem 0 0.6rem;
    color: var(--gold-main);
    font-family: var(--font-serif);
    font-size: 1.35rem;
    font-weight: 600;
}

.legal p,
.legal li {
    color: var(--text-muted);
    line-height: 1.6;
}

.legal p + p {
    margin-top: 0.75rem;
}

.legal ul {
    display: grid;
    gap: 0.4rem;
    margin: 0.6rem 0;
    padding-left: 1.2rem;
    list-style: disc;
}

.legal strong {
    color: var(--text-main);
}

.legal-updated {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.table-wrap {
    overflow-x: auto;
    margin: 0.75rem 0;
}

.legal table {
    width: 100%;
    min-width: 520px;
    border-collapse: collapse;
    font-size: 0.95rem;
}

.legal th,
.legal td {
    padding: 0.6rem 0.7rem;
    border-bottom: 1px solid var(--line-soft);
    color: var(--text-muted);
    text-align: left;
    vertical-align: top;
}

.legal th {
    color: var(--text-main);
    font-weight: 600;
}

.error-page {
    padding: 3rem 0 4rem;
    text-align: center;
}

.error-page p {
    margin: 1rem auto 2rem;
    max-width: 30rem;
}

/* ---------- 11. Pie y banner de cookies ---------- */
.site-footer {
    padding: 2rem 0 2.5rem;
    color: var(--text-muted);
    font-size: 0.9rem;
    text-align: center;
}

.site-footer .glow-line {
    margin-bottom: 1.5rem;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.4rem 1.25rem;
    margin-bottom: 0.75rem;
}

.footer-links a,
.link-button {
    padding: 0;
    border: 0;
    background: none;
    color: var(--text-muted);
    font: inherit;
    text-decoration: underline;
    text-underline-offset: 3px;
    cursor: pointer;
}

.footer-links a:hover,
.link-button:hover {
    color: var(--gold-main);
}

.cookie-banner {
    position: fixed;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 50;
    padding: 1rem 0 calc(1rem + env(safe-area-inset-bottom));
    border-top: 1px solid var(--line-strong);
    background: rgba(var(--bg-warm-rgb), 0.97);
    box-shadow: 0 -10px 30px rgba(var(--black-rgb), 0.5);
}

.cookie-inner {
    display: grid;
    gap: 0.9rem;
}

.cookie-inner p {
    font-size: 0.92rem;
    line-height: 1.45;
}

.cookie-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
}

.cookie-buttons .btn-outline {
    flex: 1 1 160px;
}

/* Modo prueba (main.js): etiqueta fija mientras está activo en el navegador.
   Encima del banner de cookies (z-index 50) y sin capturar clics. */
.modo-prueba {
    position: fixed;
    bottom: calc(12px + env(safe-area-inset-bottom));
    left: 12px;
    z-index: 60;
    padding: 6px 10px;
    border: 1px solid var(--error);
    border-radius: 6px;
    background: var(--bg-deep);
    color: var(--error);
    font-family: var(--font-sans);
    font-size: 12px;
    font-weight: 600;
    pointer-events: none;
}

/* ---------- 12. Adaptación a pantallas ---------- */
@media (max-width: 420px) {
    .features {
        grid-template-columns: repeat(2, 1fr);
        row-gap: 1.5rem;
    }

    .features li:nth-child(3) {
        border-left: 0;
    }
}

@media (min-width: 560px) {
    .convocatoria {
        grid-template-columns: auto 1fr;
        justify-items: start;
        column-gap: 1.5rem;
        padding-inline: 1.75rem;
        text-align: left;
    }

    .convocatoria-icon {
        width: clamp(90px, 16vw, 120px);
    }

    .convocatoria .btn-gold {
        grid-column: 1 / -1;
        justify-self: center;
        padding-inline: 1.7em;
    }

    .resultado {
        grid-template-columns: minmax(150px, 34%) 1fr;
    }

    .resultado-foto {
        width: 100%;
        max-width: 300px;
    }
}

@media (min-width: 768px) {
    .site-header {
        padding-top: 1.75rem;
    }

    .hero {
        padding-bottom: 4rem;
    }

    .hero-content {
        padding-top: 3.5rem;
    }

    .section {
        padding: 3rem 0;
    }

    .convocatoria {
        padding: 2rem 2.5rem;
        column-gap: 2rem;
    }

    .programa-grid {
        grid-template-columns: 250px 1fr;
        align-items: start;
        gap: 2rem;
    }

    .pilares {
        grid-template-columns: 1fr;
        padding: 0.5rem 1rem;
    }

    .pilares li + li {
        border-top: 1px solid var(--line-soft);
    }

    .asesorias {
        margin-top: 1.4rem;
        padding: 2.8rem 2rem 1.4rem;
    }

    .cookie-inner {
        grid-template-columns: 1fr auto;
        align-items: center;
        gap: 2rem;
    }

    .cookie-buttons {
        flex-wrap: nowrap;
    }
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        transition: none !important;
    }
}
