/* Colors */
:root {
    /* Palette */
    --color-canvas: #F7F5F2;
    /* warm off-white page bg   */
    --color-card: #FFFFFF;
    --color-ink: #1A1A2E;
    /* near-black headings       */
    --color-ink-mid: #3D3D5C;
    /* body text                 */
    --color-ink-soft: #7B7B9A;
    /* hints, legends            */
    --color-border: #D8D6F0;
    /* resting input border      */
    --color-border-hover: #2142b1;
    --color-accent: #343644;
    /* primary blue-violet       */
    --color-accent-2: #FF004B;
    /* gradient end (magenta)    */

    --color-success-bg: #EDFAF3;
    --color-success-ink: #1A6B43;
    --color-success-bdr: #6FCF97;
    --color-error-bg: #ffe8e8;
    --color-error-ink: #ffe400;
    --color-error-bdr: #FF004B;
    --color-disabled: #E8E7F4;




    --color-white: #ffffff;
    --color-black: #000000;

    /* Header */
    --globalnav-backdrop-filter: saturate(120%) blur(20px);
    --globalnav-background: rgba(52, 54, 68, .75);

    /* Typography */
    --font-display: "Raleway", sans-serif;
    --font-body: "Raleway", sans-serif;

    /* Spacing scale (4 px base) */
    --sp-0: 0.12rem;
    /* 2px */
    --sp-1: 0.25rem;
    /*  4px */
    --sp-2: 0.5rem;
    /*  8px */
    --sp-3: 0.75rem;
    /* 12px */
    --sp-4: 1rem;
    /* 16px */
    --sp-5: 1.25rem;
    /* 20px */
    --sp-6: 1.5rem;
    /* 24px */
    --sp-8: 2rem;
    /* 32px */
    --sp-10: 2.5rem;
    /* 40px */
    --sp-12: 3rem;
    /* 48px */

    /* Radius */
    --radius-sm: 6px;
    --radius-md: 12px;
    --radius-lg: 20px;

    /* Transitions */
    --trans-fast: 150ms ease;
    --trans-normal: 250ms ease;
    --trans-slow: 400ms cubic-bezier(0.4, 0, 0.2, 1);

    /* Shadows */
    --shadow-card: 0 4px 32px rgba(26, 26, 46, 0.08), 0 1px 4px rgba(26, 26, 46, 0.04);
    --shadow-focus: 0 0 0 3px rgba(74, 58, 255, 0.22);
}


.color-white {
    color: var(--color-white);
}

.color-black {
    color: var(--black);
}

/* Custom Styles */
.button-box {
    color: var(--blanco);
    background-color: var(--rojo);
    padding: 8px 12px;
    border-radius: 5px;
    font-weight: 600;
    transition: background-color 0.3s ease;
}

.button-box:hover {
    transition: 0.5s;
    color: var(--color-white);
    background-color: var(--rojo-hov);
}

.skip-link {
    position: absolute;
    top: -40px;
    left: 0;
    background: var(--rojo);
    color: var(--blanco);
    padding: 8px 12px;
    z-index: 100;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}

/* Header Styles */



#main-navigation {
    backdrop-filter: var(--globalnav-backdrop-filter);
    background: var(--globalnav-background);


}

/* Main Content Styles */

.container {
    /*padding: 40px 20px;*/
}

.container__heading {
    font-size: 2.5rem;
    color: var(--color-white);
    margin-bottom: 1.5rem;
}

.container_dark {
    flex: 1;
    padding-top: 40px;
    background-color: var(--azul-oscuro);
    text-align: center;
    padding: 6% 20% 6% 20%;
    display: flow;
}



/* Contact Form Styles */

.contact-form-2 {
    width: 100%;
    text-align: center;
    padding-left: 20%;
    padding-right: 20%;
}


/* ── 7. STATUS MESSAGE ────────────────────────────────────── */
.status {
    display: flex;
    align-items: flex-start;
    gap: var(--sp-3);
    border-radius: var(--radius-md);
    padding: var(--sp-4) var(--sp-5);
    margin-bottom: var(--sp-6);
    font-size: 0.9375rem;
    font-weight: 500;
    line-height: 1.5;

    /* Animated entrance */
    animation: slideDown var(--trans-slow) both;

    position: absolute;
    inset: 0;
    /* JS shows it */
    align-items: center;
    justify-content: center;
    z-index: 9999;


    width: 70%;
    margin: auto auto;
    height: 5rem;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}


.status[hidden] {
    display: none;
}

.status--success {
    /*background-color: var(--color-success-bg);
    border: 1px solid var(--color-success-bdr);
    color: var(--color-success-ink);*/

    background-color: #1a6b43cb;
    /* border: 1px solid var(--color-success-bdr); */
    color: #ffffff;
}

.status--error {
    background-color: var(--color-error-bg);
    /*border: 1px solid var(--color-error-bdr);*/
    color: var(--color-error-ink);

    background-color: #b10b0bcb;
    color: #ffffff;


}

.status__icon {
    font-size: 1.2rem;
    flex-shrink: 0;
    line-height: 1.4;
}

.status__text {
    color: #ffffff;
    text-shadow: 1px 1px 14px #000000;
}

/* ── 8. FORM SHELL (blur container) ──────────────────────── */
.form-shell {
    position: relative;
}

/* Blur state applied by JS during loading/feedback */
.form-shell--blurred .form {
    filter: blur(3px);
    pointer-events: none;
    user-select: none;
    transition: filter var(--trans-slow);
}

/* ── 9. LOADING OVERLAY ───────────────────────────────────── */
.form-overlay {
    position: absolute;
    inset: 0;
    display: none;
    /* JS shows it */
    align-items: center;
    justify-content: center;
    z-index: 10;
    border-radius: var(--radius-md);
}

.form-overlay--visible {
    display: flex;
}

/* ── 10. SPINNER ──────────────────────────────────────────── */
.spinner {
    width: 44px;
    height: 44px;
    border-radius: 50%;

    /* Gradient conic trick — more elegant than a dashed border */
    background: conic-gradient(from 0deg,
            var(--color-accent) 0%,
            var(--color-accent-2) 50%,
            transparent 100%);
    animation: spin 0.75s linear infinite;
    position: relative;
    /* Máscara: círculo externo visible, centro recortado */
    -webkit-mask: radial-gradient(farthest-side,
            transparent 68%,
            /* ← tamaño del hueco, ajusta este % */
            #000 70%
            /* ← grosor del anillo */
        );
    mask: radial-gradient(farthest-side,
            transparent 68%,
            #000 70%);
}

/* Ya NO necesitas el ::after */
.spinner::after {
    display: none;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}


/* ── 11. FORM & FIELDS ────────────────────────────────────── */

.form {
    display: flex;
    flex-direction: column;
    gap: var(--sp-5);
    transition: filter var(--trans-slow);
}

/* Individual field wrapper */
form .field {
    display: flex;
    flex-direction: column;
    gap: var(--sp-0);
}

/* Label */
.field__label {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--color-ink);
    letter-spacing: 0.01em;
}

.field__required {
    color: var(--color-accent);
    margin-left: var(--sp-1);
}

/* ── SIGNATURE ELEMENT: gradient stroke focus ─────────────
   On focus we swap the solid border for a 2 px gradient
   outline using a pseudo-element technique.
   The parent gets `position: relative` so the pseudo-
   element can be placed flush against the input edges.
─────────────────────────────────────────────────────────── */
.field__input-wrapper {
    position: relative;
}

/* Base input / textarea styles */
.field__input {
    width: 100%;
    font-family: var(--font-body);
    font-size: 1rem;
    line-height: 1.5;
    color: var(--azul-negro);
    background: var(--color-canvas);
    border: 1px solid var(--azul-negro);
    border-radius: var(--radius-sm);
    padding: var(--sp-4) var(--sp-5);
    outline: none;
    transition:
        border-color var(--trans-normal),
        box-shadow var(--trans-normal),
        background var(--trans-normal);
    -webkit-appearance: none;
    appearance: none;

    font-weight: 600;


}

.field__input::placeholder {
    color: #7c7c88;
}

/* Hover */
.field__input:hover:not(:disabled) {
    border-color: var(--color-border-hover);
    background: #fffadd;
}

/* ── THE SIGNATURE FOCUS STATE ──
   Instead of a plain outline, we draw a glowing gradient
   ring that evokes an ink-stroke — the page's one bold
   design risk.
─────────────────────────────────────────────────────────── */
.field__input:focus {
    border-color: transparent;
    background: #f4ffc8;
    box-shadow:
        0 0 0 2px var(--azul-oscuro),
        /* inner solid ring  */
        0 0 0 3px var(--color-white),
        /* soft outer glow   */
        var(--shadow-focus);
}

/* Textarea specifics */
.field__input--textarea {
    resize: vertical;
    min-height: 130px;
}

/* Hint text */
.field__hint {
    font-size: 0.8125rem;
    color: var(--color-ink-soft);
    margin-top: calc(-1 * var(--sp-1));
}

/* Inline error message */
.field__error {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--color-error-ink);
    /* prevents layout shift */
    display: block;
    margin-top: var(--sp-2);
}

/* Invalid state styling */
.field--invalid .field__input {
    border-color: var(--color-error-bdr);
    background: var(--color-error-bg);
}



/* Disabled state */
.field__input:disabled {
    background: var(--color-disabled);
    color: var(--color-ink-soft);
    cursor: not-allowed;
    border-color: var(--color-border);
}

/* ── 12. REQUIRED LEGEND ──────────────────────────────────── */
.form__legend {
    font-size: 0.8125rem;
    color: var(--color-ink-soft);
    margin-top: calc(-1 * var(--sp-2));
}


/* Footer Styles */

.footer__widgets {
    display: flex;
    flex-wrap: wrap;
    gap: 2rem;
    padding: 6% 3%;
}

.footer__brand {
    flex: 1;
    text-align: center;
    padding: 5%;
}

.footer__contact {
    flex: 1;
}

.footer__nav {
    flex: 1;
}

.footer__legal {
    text-align: center;
    padding: 2% 1% 2% 1%;
    background-color: var(--azul-negro);
}

.footer__heading {
    color: var(--blanco);
}

.footer__text {
    color: var(--azul-gris-claro);
}

footer li,
footer li a {
    line-height: 1.6;
    font-weight: 400;
    color: var(--azul-gris-claro);
    font-size: 1.125rem;
    letter-spacing: 0.04rem;
}

.footer__social {
    display: flex;
    align-items: center;
    gap: 2.5rem;
    list-style: none;
    margin: 5% 0 0 0;
    padding: 0;
}

.footer__legal {
    color: var(--azul-gris-claro);
    font-size: 0.8rem;
}

.footer__legal a {
    color: var(--azul-gris-claro);
}





/* Honeypot — invisible pero accesible (display:none bloquea en algunos browsers) */
.hp-field {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

.field-group {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    margin-bottom: 1rem;
}

.field-error {
    font-size: 0.85rem;
    color: #c0392b;
    min-height: 1em;
}

.char-count {
    font-size: 0.75rem;
    color: #888;
    text-align: right;
}

/* Estado inválido — solo después de interacción */
input:user-invalid,
textarea:user-invalid {
    border-color: #c0392b;
}