/* css/style.css */
/* Aseguramos la codificación UTF-8 para que los acentos se vean bien */
@charset "UTF-8";

/* 🎨 PALETA OFICIAL (blanco + naranja + azules GRM) */
:root {
    /* Colores de marca */
    --color-naranja: #e07525;
    --color-azul-verde: #427e88;
    --color-azul-gris: #7895a3;

    /* Base UI claras */
    --color-fondo-claro: #ffffff;
    --color-superficie: #ffffff;
    --color-superficie-alt: #f6f7f8;

    /* Tipografía */
    --color-texto: #1e1e1e;
    --color-texto-suave: #4a4a4a;
    --color-texto-muted: #7a7a7a;

    /* Bordes y sombras */
    --color-borde-suave: rgba(0, 0, 0, 0.12);
    --color-borde-input: rgba(0, 0, 0, 0.22);

    --input-bg: #ffffff;
    --input-bg-focus: rgba(66, 126, 136, 0.10); /* azul-verde suave */

    --shadow-suave: 0 12px 35px rgba(0, 0, 0, 0.12);

    --radius-base: 12px;
    --radius-pill: 999px;

    --spacing-xs: 0.35rem;
    --spacing-sm: 0.7rem;
    --spacing-md: 1rem;
    --spacing-lg: 1.6rem;
    --spacing-xl: 2.2rem;

    --max-width: 880px;

    --fuente-base: system-ui, -apple-system, BlinkMacSystemFont,
        "Segoe UI", Roboto, sans-serif;
}

/* 🔧 RESETEO BÁSICO */

*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: var(--fuente-base);
    background: var(--color-fondo-claro);
    color: var(--color-texto);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* 🔲 CONTENEDOR GENERAL */

.container {
    width: 100%;
    max-width: var(--max-width);
    margin: 0 auto;
    padding: var(--spacing-lg) var(--spacing-md);
}

/* 🧭 CABECERA */

.site-header {
    border-bottom: 1px solid var(--color-borde-suave);
    background: #ffffff;
}

.site-title {
    font-size: 1.7rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    color: var(--color-texto);
}

.site-title::before {
    content: "";
    width: 11px;
    height: 11px;
    border-radius: 999px;
    background: var(--color-naranja);
}

.site-subtitle {
    font-size: 0.95rem;
    color: var(--color-texto-muted);
    margin-top: 0.3rem;
}

/* 📄 CONTENIDO PRINCIPAL */

.site-main {
    flex: 1;
    padding: var(--spacing-xl) 0 var(--spacing-xl);
    background: var(--color-superficie-alt);
}

/* 🧱 TARJETA DEL FORMULARIO */

.form-section {
    background: var(--color-superficie);
    border-radius: 20px;
    border: 1px solid var(--color-borde-suave);
    box-shadow: var(--shadow-suave);
    padding: var(--spacing-xl) var(--spacing-md);
    position: relative;
}

/* Detalle decorativo suave en naranja/azul, muy ligero */
.form-section::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(
            120deg,
            rgba(224, 117, 37, 0.06),
            rgba(120, 149, 163, 0.04) 40%,
            transparent 70%
        );
    pointer-events: none;
}

.form-section > * {
    position: relative;
    z-index: 1;
}

.form-section h2 {
    font-size: 1.5rem;
    margin-bottom: var(--spacing-xs);
    color: var(--color-texto);
}

.form-intro {
    font-size: 0.95rem;
    color: var(--color-texto-suave);
    margin-bottom: var(--spacing-lg);
    max-width: 40rem;
}

/* 📝 FORMULARIO */

.contact-form {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-md);
}

/* Filas responsivas */

.form-row {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-md);
}

@media (min-width: 768px) {
    .form-row {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: var(--spacing-md);
    }
}

/* Grupo base de campo */

.form-group {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-xs);
}

.form-group--full {
    grid-column: 1 / -1;
}

/* Honeypot (oculto) */

.form-group--hidden {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

/* Etiquetas */

label {
    font-size: 0.9rem;
    color: var(--color-texto-suave);
}

/* Inputs y textarea */

input[type="text"],
input[type="email"],
input[type="tel"],
textarea {
    appearance: none;
    width: 100%;
    padding: 0.7rem 0.85rem;
    border-radius: 10px;
    border: 1px solid var(--color-borde-input);
    background-color: var(--input-bg);
    color: var(--color-texto);
    font-size: 0.95rem;
    transition:
        border-color 0.18s ease,
        box-shadow 0.18s ease,
        background-color 0.18s ease,
        transform 0.08s ease;
}

input::placeholder,
textarea::placeholder {
    color: var(--color-texto-muted);
}

/* Focus accesible */

input:focus,
textarea:focus {
    outline: none;
    border-color: var(--color-azul-verde);
    background-color: var(--input-bg-focus);
    box-shadow: 0 0 0 4px rgba(66, 126, 136, 0.16);
}

input:active,
textarea:active {
    transform: translateY(1px);
}

/* Textarea */

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

/* 🔘 FIELDSET Y CHECKBOXES */

.form-fieldset {
    border-radius: 16px;
    border: 1px solid var(--color-borde-suave);
    background: #fafafa;
    padding: var(--spacing-md);
    margin-top: var(--spacing-sm);
    display: flex;
    flex-direction: column;
    gap: var(--spacing-sm);
}

.fieldset-title {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--color-texto-suave);
    margin-bottom: var(--spacing-xs);
}

.checkbox-group {
    display: flex;
    align-items: flex-start;
    gap: 0.55rem;
    font-size: 0.9rem;
    color: var(--color-texto-suave);
}

/* Checkbox custom */

.checkbox-group input[type="checkbox"] {
    appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 5px;
    border: 1px solid var(--color-borde-input);
    background-color: #ffffff;
    margin-top: 2px;
    position: relative;
    cursor: pointer;
    transition:
        background-color 0.18s ease,
        border-color 0.18s ease,
        box-shadow 0.18s ease,
        transform 0.08s ease;
}

.checkbox-group input[type="checkbox"]:focus-visible {
    outline: none;
    box-shadow: 0 0 0 4px rgba(66, 126, 136, 0.25);
}

.checkbox-group input[type="checkbox"]:checked {
    background: var(--color-naranja);
    border-color: var(--color-naranja);
}

.checkbox-group input[type="checkbox"]:checked::after {
    content: "✔";
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    color: #ffffff;
}

.checkbox-group label {
    cursor: pointer;
}

.checkbox-group a {
    color: var(--color-azul-verde);
    text-decoration: none;
    border-bottom: 1px dotted rgba(66, 126, 136, 0.7);
}

.checkbox-group a:hover {
    color: var(--color-azul-gris);
}

/* ⭐ Obligatorios */

.required {
    color: var(--color-naranja);
    font-size: 0.85em;
    margin-left: 0.15rem;
}

.required-note {
    font-size: 0.83rem;
    color: var(--color-texto-muted);
    margin-top: -0.25rem;
}

/* ✅ MENSAJES DEL FORMULARIO */

.form-messages {
    margin-bottom: var(--spacing-md);
    font-size: 0.9rem;
    border-radius: 14px;
    padding: 0.8rem 1rem;
    border: 1px solid transparent;
    display: none;
}

.form-messages--visible {
    display: block;
}

.form-messages--success {
    background: rgba(81, 166, 120, 0.08);
    border-color: rgba(81, 166, 120, 0.9);
    color: #256943;
}

.form-messages--error {
    background: rgba(220, 76, 100, 0.08);
    border-color: rgba(220, 76, 100, 0.9);
    color: #a5213c;
}

/* 🟠 BOTONES */

.btn {
    font: inherit;
    cursor: pointer;
    border-radius: var(--radius-pill);
    border: none;
    padding: 0.75rem 1.6rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    transition:
        transform 0.12s ease,
        box-shadow 0.16s ease,
        opacity 0.15s ease;
    white-space: nowrap;
}

.btn-primary {
    background: var(--color-naranja);
    color: #ffffff;
    font-weight: 600;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    font-size: 0.9rem;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.15);
}

.btn-primary:hover {
    background: #c4611f;
    transform: translateY(-1px);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.18);
}

.btn-primary:active {
    background: #b0581c;
    transform: translateY(1px) scale(0.99);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.12);
}

.btn-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Contenedor botón */

.form-actions {
    margin-top: var(--spacing-md);
    display: flex;
    justify-content: flex-start;
}

/* 👣 FOOTER */

.site-footer {
    border-top: 1px solid var(--color-borde-suave);
    padding: var(--spacing-md) 0;
    font-size: 0.82rem;
    color: var(--color-texto-muted);
    text-align: center;
    background: #ffffff;
}

/* 📱 RESPONSIVE EXTRA */

@media (max-width: 480px) {
    .container {
        padding-inline: 1.1rem;
    }

    .form-section {
        padding: var(--spacing-lg) var(--spacing-md);
        border-radius: 18px;
    }

    .site-title {
        font-size: 1.45rem;
    }

    .form-section h2 {
        font-size: 1.3rem;
    }
}