:root {
    /* Paleta base */
    --vage-dark: rgb(0 20 26);
    --vage-dark-2: rgb(0 55 71);
    --vage-light: rgb(241 250 255);
    --vage-light-2: rgb(212 241 255);
    --vage-cyan: rgb(46 206 255);      /* Acento principal (subrayados, focus) */
    --vage-cyan-2: rgb(0 195 255);     /* Hover de botones */

    /* Puntos intermedios de gradientes */
    --gradient-mid-light: rgb(232 247 255);
    --gradient-mid-dark: rgb(12 33 41);

    /* Sombras */
    --shadow-color: rgba(0 20 26 / 20%);
    --vage-danger: #dc2626;
    --vage-danger-shadow: rgba(220, 38, 38, 0.35);
    --vage-danger-shadow-hover: rgba(220, 38, 38, 0.5);

    /* Texto */
    --text-opacity: 0.85;

    /* Semántica */
    --bg-color: var(--vage-light);
    --bg-gradient: linear-gradient(135deg, var(--vage-light) 0%, var(--gradient-mid-light) 50%, var(--vage-light-2) 100%);
    --font-main: 'Poppins', sans-serif;
    --font-accent: 'Lobster', cursive;
    --text-color: var(--vage-dark);
    --btn-bg: var(--vage-dark);
    --btn-gradient: linear-gradient(135deg, var(--vage-dark) 0%, var(--gradient-mid-dark) 50%, var(--vage-dark-2) 100%);
    --btn-text: var(--vage-light);
}

@media (prefers-color-scheme: dark) {
    :root {
        --bg-color: var(--vage-dark);
        --bg-gradient: linear-gradient(135deg, var(--vage-dark) 0%, var(--gradient-mid-dark) 50%, var(--vage-dark-2) 100%);
        --text-color: var(--vage-light);
        --btn-bg: var(--vage-light);
        --btn-gradient: linear-gradient(135deg, var(--vage-light) 0%, var(--gradient-mid-light) 50%, var(--vage-light-2) 100%);
        --btn-text: var(--vage-dark);
    }
}

html {
    background-color: var(--bg-color);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

/* ── Skip link (accesibilidad) ───────────────────── */

.skip-link {
    position: absolute;
    left: -9999px;
    top: auto;
    width: 1px;
    height: 1px;
    overflow: hidden;
    text-decoration: none;
}

.skip-link:focus {
    position: fixed;
    top: 1rem;
    left: 50%;
    transform: translateX(-50%);
    width: auto;
    height: auto;
    padding: 0.75rem 1.5rem;
    background: var(--btn-bg);
    color: var(--btn-text);
    border-radius: 0.5rem;
    font-family: var(--font-main);
    font-weight: 600;
    font-size: 1rem;
    z-index: 9999;
    outline: 3px solid var(--vage-cyan);
    outline-offset: 3px;
}

body {
    background: var(--bg-gradient);
    background-color: var(--bg-color);
    font-family: var(--font-main);
    color: var(--text-color);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 4rem 2rem 2rem;
    /* Sin transición en body para evitar flash de color al cargar */
}

.container {
    max-width: 900px;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3rem;
    animation: fadeIn 1.2s ease-out backwards;
}

.logo-img {
    max-width: 180px;
    width: 100%;
    height: auto;
    filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.1));
}

h1 {
    font-size: clamp(2.5rem, 6vw, 5.5rem);
    font-weight: 700;
    line-height: 1.1;
    color: var(--text-color);
    letter-spacing: -1px;
}

p {
    font-size: clamp(1rem, 2vw, 1.125rem);
    line-height: 1.8;
    color: var(--text-color);
    max-width: 540px;
    font-weight: 400;
    opacity: var(--text-opacity);
}

.highlight {
    font-family: var(--font-accent);
    font-size: 1.3em;
    color: var(--text-color);
    text-decoration-line: underline;
    text-decoration-color: var(--vage-cyan);
    text-decoration-thickness: 3px;
    text-underline-offset: 4px;
}

/* ── Buttons (shared) ────────────────────────────── */

:is(.cta-button, .email-submit, .social-link) {
    position: relative;
    z-index: 1;
    overflow: hidden;

    border: none;
    border-radius: 1rem;

    background: var(--btn-bg);
    color: var(--btn-text);
    font-weight: 600;
    font-size: 1rem;

    box-shadow: 4px 8px 19px -3px var(--shadow-color);
    transition: color 250ms, transform 250ms, opacity 250ms;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    text-decoration: none;
    cursor: pointer;
    font-family: inherit;
}

:is(.cta-button, .email-submit, .social-link)::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background: linear-gradient(135deg, var(--vage-cyan-2) 50%, transparent 50%);
    background-size: 250%;
    background-position: 100% 0;
    transition: background-position 250ms ease-out;
}

:is(.cta-button, .email-submit, .social-link):is(:hover, :focus-visible) {
    color: var(--text-color);
    transform: scale(1.05);
}

:is(.cta-button, .email-submit, .social-link):is(:hover, :focus-visible)::before {
    background-position: 0% 100%;
}

:is(.cta-button, .email-submit, .social-link):focus-visible {
    outline: 3px solid var(--vage-cyan);
    outline-offset: 3px;
}

:is(.cta-button, .email-submit, .social-link):active {
    opacity: 0.6;
    transform: scale(0.95);
}

/* --- CTA Button specifics --- */
.cta-button {
    padding: 1rem 1.5rem;
}

/* --- Button icon --- */

.btn-icon {
    width: 1rem;
    height: 1rem;
    flex-shrink: 0;
    overflow: visible;
    fill: currentColor;
    stroke: currentColor;
    stroke-width: 1px;
    stroke-linejoin: round;
}

/* ── Email form ──────────────────────────────────── */

.email-form {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    width: 100%;
    max-width: 420px;
}

.email-form-label {
    font-size: 0.875rem;
    opacity: 0.7;
}

.email-form-row {
    display: flex;
    gap: 0.5rem;
    width: 100%;
}

.email-input {
    flex: 1;
    padding: 0.75rem 1rem;
    border-radius: 1rem;
    border: 2px solid var(--btn-bg);
    background: transparent;
    color: var(--text-color);
    font-family: var(--font-main);
    font-size: 0.95rem;
    outline: none;
    transition: border-color 0.2s ease;
}

.email-input::placeholder {
    color: var(--text-color);
    opacity: 0.45;
}

.email-input:focus {
    border-color: var(--vage-cyan);
}

.email-submit {
    padding: 0.75rem 1.25rem;
    font-size: 0.9rem;
    white-space: nowrap;
}


/* ── Animations ──────────────────────────────────── */

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ── Responsive ──────────────────────────────────── */

@media (max-width: 480px) {
    .container { gap: 2rem; }
    .cta-button { padding: 1rem 2rem; }
    .email-form-row { flex-direction: column; }
    .email-input,
    .email-submit { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
    .container,
    .cta-button {
        animation: none !important;
        opacity: 1 !important;
        transform: none !important;
        transition: none !important;
    }

    .consent-banner {
        transition: opacity 0.1s, visibility 0.1s !important;
        transform: none !important;
    }

    :is(.cta-button, .email-submit, .social-link):is(:hover, :focus-visible) {
        transform: none;
    }
}

/* ── Form status ─────────────────────────────────── */

.form-status {
    font-size: 0.875rem;
    min-height: 1.25rem;
    opacity: 1;
    transition: color 0.2s;
}

.form-status--success { color: #1a8a4a; }
.form-status--error   { color: #c0392b; }

@media (prefers-color-scheme: dark) {
    .form-status--success { color: #4ade80; }
    .form-status--error   { color: #f87171; }
}

/* ── Consent banner ──────────────────────────────── */

.consent-banner {
    position: fixed;
    bottom: 1.5rem;
    right: 1.5rem;
    background: var(--btn-gradient);
    color: var(--btn-text);
    border-radius: 1rem;
    padding: 1rem 1.25rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    max-width: min(528px, calc(100vw - 2rem));
    box-shadow: 0 8px 32px var(--shadow-color);
    z-index: 100;
    font-size: 0.875rem;

    /* Estado inicial: oculto abajo, sin interactividad */
    pointer-events: none;
    opacity: 0;
    visibility: hidden;
    transform: translateY(calc(100% + 1.5rem));
    transition:
        opacity    0.4s ease,
        transform  0.5s cubic-bezier(0.22, 1, 0.36, 1),
        visibility 0.4s;
}

.consent-banner.consent-visible {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateY(0);
}

.consent-banner p {
    color: inherit;
    opacity: 1;
    font-size: 0.875rem;
    max-width: none;
    text-align: left;
}

.consent-actions {
    display: flex;
    gap: 0.5rem;
    flex-shrink: 0;
}

.consent-btn {
    padding: 0.4rem 0.9rem;
    border-radius: 50px;
    border: 2px solid currentColor;
    background: transparent;
    color: inherit;
    font-family: inherit;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: opacity 0.2s;
}

.consent-btn:hover {
    opacity: 0.8;
}

.consent-btn.consent-accept {
    background: var(--vage-cyan);
    border-color: var(--vage-cyan);
    color: var(--vage-dark);
}

.consent-close {
    position: absolute;
    top: -0.65rem;
    right: -0.65rem;
    width: 1.5rem;
    height: 1.5rem;
    border-radius: 50%;
    background: var(--vage-danger);
    border: none;
    color: var(--vage-light);
    font-size: 0.75rem;
    font-weight: 700;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 2px 8px var(--vage-danger-shadow);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.consent-close:hover {
    transform: scale(1.15);
    box-shadow: 0 4px 16px var(--vage-danger-shadow-hover);
}

/* ── Honeypot anti-spam ──────────────────────────── */

.honeypot {
    display: none;
}

/* ── Footer / gestionar cookies ──────────────────── */

.page-footer {
    position: fixed;
    bottom: 0.75rem;
    left: 1rem;
    z-index: 50;
}


.manage-cookies-btn {
    background: none;
    border: none;
    color: var(--text-color);
    opacity: 0.35;
    cursor: pointer;
    font-size: 0.7rem;
    font-family: inherit;
    padding: 0.25rem;
    text-decoration: underline;
    transition: opacity 0.2s;
}

.manage-cookies-btn:hover {
    opacity: 0.75;
}

@media (max-width: 480px) {
    .manage-cookies-btn {
        font-size: 0.6rem;
        padding: 0;
    }
}