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

/* 
   🎨 PALETA BASE (oscura, elegante y premium)
   Puedes ajustar estos colores a tus pantones oficiales más adelante.
*/
:root {
    --color-fondo: #05070b;
    --color-superficie: #101219;
    --color-superficie-alt: #171a23;

    --color-primario: #c9a052;           /* dorado premium */
    --color-primario-oscuro: #9d7e3f;
    --color-primario-suave: rgba(201, 160, 82, 0.2);

    --color-acento: #4cb8ff;             /* azul acento */
    --color-acento-suave: rgba(76, 184, 255, 0.18);

    --color-texto: #f5f5f7;
    --color-texto-suave: #c4c7d0;
    --color-texto-muted: #8c90a0;

    --color-borde-suave: rgba(255, 255, 255, 0.08);
    --color-borde-input: rgba(255, 255, 255, 0.18);

    --input-bg: rgba(255, 255, 255, 0.02);
    --input-bg-focus: rgba(76, 184, 255, 0.08);

    --shadow-suave: 0 18px 45px rgba(0, 0, 0, 0.75);

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

    --spacing-xs: 0.4rem;
    --spacing-sm: 0.7rem;
    --spacing-md: 1.1rem;
    --spacing-lg: 1.6rem;
    --spacing-xl: 2.2rem;

    --max-width: 880px;

    --fuente-base: system-ui, -apple-system, BlinkMacSystemFont, "SF Pro Text",
        "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: radial-gradient(circle at top, #161a25 0, #05070b 60%, #020309 100%);
    color: var(--color-texto);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    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);
    backdrop-filter: blur(12px);
    background: linear-gradient(
        to bottom,
        rgba(10, 10, 18, 0.9),
        rgba(5, 7, 11, 0.75)
    );
}

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

.site-title::before {
    content: "";
    width: 11px;
    height: 11px;
    border-radius: 999px;
    background: radial-gradient(circle, #ffffff, var(--color-primario));
    box-shadow:
        0 0 12px rgba(255, 255, 255, 0.75),
        0 0 32px rgba(201, 160, 82, 0.65);
}

.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);
}

/* 🧱 TARJETA DEL FORMULARIO */

.form-section {
    background: radial-gradient(circle at top left, #24273a 0, #101219 50%, #060710 100%);
    border-radius: 24px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    box-shadow: var(--shadow-suave);
    padding: var(--spacing-xl) var(--spacing-md);
    position: relative;
    overflow: hidden;
}

/* Detalle decorativo suave */
.form-section::before {
    content: "";
    position: absolute;
    inset: -30%;
    background:
        radial-gradient(circle at 0% 0%, rgba(201, 160, 82, 0.18) 0, transparent 55%),
        radial-gradient(circle at 100% 0%, rgba(76, 184, 255, 0.26) 0, transparent 55%);
    opacity: 0.7;
    pointer-events: none;
}

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

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

.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);
}

/* En escritorio, se vuelven columnas */
@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 para humanos, presente en el DOM para bots */
.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;
}

/* Placeholder legible */
input::placeholder,
textarea::placeholder {
    color: var(--color-texto-muted);
}

/* Enfoque (focus) accesible y visible */
input:focus,
textarea:focus {
    outline: none;
    border-color: var(--color-acento);
    background-color: var(--input-bg-focus);
    box-shadow:
        0 0 0 1px rgba(76, 184, 255, 0.5),
        0 0 0 8px rgba(76, 184, 255, 0.05);
}

/* Pequeño "tap" visual al hacer click */
input:active,
textarea:active {
    transform: translateY(1px);
}

/* Textarea */

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

/* 🔘 CHECKBOXES Y FIELDSET */

.form-fieldset {
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: linear-gradient(
        135deg,
        rgba(0, 0, 0, 0.35),
        rgba(10, 12, 20, 0.9)
    );
    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);
}

/* We style the checkbox for nicer look */

.checkbox-group input[type="checkbox"] {
    appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 6px;
    border: 1px solid var(--color-borde-input);
    background-color: rgba(8, 10, 18, 0.9);
    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 1px rgba(76, 184, 255, 0.7),
        0 0 0 7px rgba(76, 184, 255, 0.12);
}

.checkbox-group input[type="checkbox"]:checked {
    background: linear-gradient(135deg, var(--color-primario), var(--color-primario-oscuro));
    border-color: var(--color-primario);
    box-shadow: 0 0 0 1px rgba(201, 160, 82, 0.7);
}

.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: #080808;
}

.checkbox-group label {
    cursor: pointer;
}

.checkbox-group a {
    color: var(--color-acento);
    text-decoration: none;
    border-bottom: 1px dotted rgba(76, 184, 255, 0.6);
}

.checkbox-group a:hover {
    text-decoration: none;
    color: #89d5ff;
}

/* ⭐ Detalles de obligatorio */

.required {
    color: var(--color-primario);
    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 (JS los llenará después) */

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

/* Estados que usaremos después con JS */

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

.form-messages--success {
    background: rgba(54, 179, 126, 0.12);
    border-color: rgba(54, 179, 126, 0.9);
    color: #d3fbe7;
}

.form-messages--error {
    background: rgba(220, 76, 100, 0.14);
    border-color: rgba(255, 120, 140, 0.95);
    color: #ffdbe2;
}

/* 🟡 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,
        background-position 0.2s ease,
        opacity 0.15s ease;
    white-space: nowrap;
}

.btn-primary {
    background-image: linear-gradient(135deg, var(--color-primario), var(--color-primario-oscuro));
    color: #080808;
    box-shadow:
        0 12px 32px rgba(0, 0, 0, 0.75),
        0 0 0 1px rgba(255, 255, 255, 0.05);
    font-weight: 600;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    font-size: 0.88rem;
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow:
        0 16px 40px rgba(0, 0, 0, 0.85),
        0 0 0 1px rgba(255, 255, 255, 0.07);
}

.btn-primary:active {
    transform: translateY(1px) scale(0.99);
    box-shadow:
        0 6px 18px rgba(0, 0, 0, 0.7),
        0 0 0 1px rgba(255, 255, 255, 0.06);
}

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

/* Contenedor de acciones del formulario */

.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: linear-gradient(to top, rgba(1, 1, 3, 0.9), rgba(7, 7, 12, 0.95));
}

/* 📱 AJUSTES RESPONSIVOS 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;
    }
}