/* ====== Base & Design Tokens — Control de Plagas en Granada ======
   Tipografía redondeada (Nunito) + retícula limpia. Paleta original intacta. */
:root {
    /* Marca sanitaria */
    --primary-color: #009F4D;      /* Verde clínico/sanitario */
    --primary-hover: #008741;
    --primary-dark: #007038;
    --primary-light: #E8F6EE;
    --secondary-color: #1D3557;    /* Azul corporativo profundo */
    --secondary-hover: #2B4E7A;
    --accent-red: #E63946;         /* Urgencias */
    --accent-red-hover: #D62828;

    /* Superficies */
    --bg-light: #F4F7FB;
    --bg-soft: #F8FAFC;
    --bg-white: #FFFFFF;
    --text-dark: #1E293B;
    --text-body: #4A5A70;
    --text-muted: #64748B;
    --text-light: #F8FAFC;
    --border-color: #E5EAF1;

    /* Tipografía */
    --font-sans: 'Nunito', 'Segoe UI', system-ui, -apple-system, Roboto, sans-serif;
    --fs-h1: clamp(2.4rem, 1.3rem + 4.2vw, 4.2rem);
    --fs-h2: clamp(1.75rem, 1.15rem + 2.1vw, 2.5rem);
    --fs-h3: clamp(1.15rem, 1.05rem + .4vw, 1.35rem);
    --fs-lead: clamp(1.05rem, .98rem + .35vw, 1.2rem);
    --fs-body: 1rem;
    --fs-small: .9rem;

    /* Sombras suaves (diseño limpio, sin ruido) */
    --shadow-sm: 0 1px 2px rgba(16, 36, 64, .06);
    --shadow-md: 0 4px 16px -6px rgba(16, 36, 64, .14);
    --shadow-lg: 0 18px 40px -20px rgba(16, 36, 64, .28);
    --shadow-card: 0 24px 60px -30px rgba(16, 36, 64, .40);

    /* Radios: rectangulares y sobrios */
    --radius-sm: 6px;
    --radius: 10px;
    --radius-lg: 16px;
    --radius-pill: 999px;

    --transition: all .25s cubic-bezier(.22, 1, .36, 1);
    --transition-base: all .25s ease;
    --max-width: 1200px;
    --gutter: 24px;
    --section-space: clamp(64px, 5vw + 24px, 110px);
}

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

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

/* Anclas por debajo de la cabecera fija */
[id] { scroll-margin-top: 96px; }

body {
    font-family: var(--font-sans);
    font-size: var(--fs-body);
    color: var(--text-body);
    line-height: 1.7;
    background-color: var(--bg-white);
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
    overflow-x: hidden;
}

.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 var(--gutter);
}
.container-narrow { max-width: 860px; margin: 0 auto; padding: 0 var(--gutter); }

h1, h2, h3, h4, h5 {
    font-family: var(--font-sans);
    color: var(--secondary-color);
    line-height: 1.18;
    margin-bottom: .8rem;
    font-weight: 800;
    letter-spacing: -.015em;
    text-wrap: balance;
}

h1 { font-size: var(--fs-h1); font-weight: 900; letter-spacing: -.03em; }
h2 { font-size: var(--fs-h2); }
h3 { font-size: var(--fs-h3); }
h4 { font-size: 1.05rem; }

p { color: inherit; margin-bottom: 1rem; }
p:last-child { margin-bottom: 0; }

a { text-decoration: none; color: var(--primary-color); transition: var(--transition); }
a:hover { color: var(--primary-hover); }

img { max-width: 100%; height: auto; display: block; }

ul, ol { padding-left: 1.15rem; }
li { margin-bottom: .4rem; }

::selection { background: var(--primary-color); color: #fff; }

.skip-link {
    position: absolute; top: -60px; left: 0;
    background: var(--primary-color); color: #fff;
    padding: 10px 16px; z-index: 2000; border-radius: 0 0 var(--radius-sm) 0;
    font-weight: 700; transition: top .2s;
}
.skip-link:focus { top: 0; color: #fff; }

:focus-visible {
    outline: 3px solid var(--primary-color);
    outline-offset: 2px;
    border-radius: 4px;
}

/* ====== Utilities ====== */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-primary { color: var(--primary-color); }
.text-light { color: var(--text-light); }
.font-bold { font-weight: 800; }
.italic { font-style: italic; }
.mb-1 { margin-bottom: 1rem; }
.mb-2 { margin-bottom: 1.5rem; }
.mb-3 { margin-bottom: 2rem; }
.mb-4 { margin-bottom: 2.5rem; }
.mt-4 { margin-top: 2.5rem; }
.bg-light { background-color: var(--bg-light); }
.bg-dark { background-color: var(--secondary-color); }
.bg-white { background-color: var(--bg-white); }
.p-4 { padding: 1.5rem; }

.section-padding { padding: var(--section-space) 0; }
/* Ritmo entre secciones contiguas del mismo fondo: sin doble aire */
.section-padding.bg-light + .section-padding.bg-light,
.section-padding.section-mesh + .section-padding.section-mesh { padding-top: 0; }
.align-center { text-align: center; }
.section-title { font-size: var(--fs-h2); margin-bottom: 14px; }
.section-subtitle { color: var(--text-muted); font-size: var(--fs-lead); margin-bottom: 2rem; }
.align-center .section-subtitle, .text-center .section-subtitle { margin-inline: auto; max-width: 760px; }

b, strong { font-weight: 800; color: inherit; }

/* Eyebrow / kicker con barra verde (estilo de referencia) */
.eyebrow,
.section-header > span.text-primary,
.text-primary.font-bold.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    text-transform: uppercase;
    letter-spacing: 1.6px;
    font-size: .78rem;
    font-weight: 800;
    color: var(--primary-color);
    margin-bottom: 14px;
    line-height: 1.4;
}
.eyebrow::before,
.section-header > span.text-primary::before {
    content: '';
    width: 3px;
    height: 15px;
    background: var(--primary-color);
    border-radius: 2px;
    flex-shrink: 0;
}

/* Realce dentro de titulares */
h2 span.accent, h2 span.text-primary { color: var(--primary-color); }

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, ::before, ::after {
        animation-duration: .001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .001ms !important;
    }
    .fade-up { opacity: 1 !important; transform: none !important; }
}

/* ================================================================
   §FORM-STATUS v1 — Feedback de envío de los formularios de lead
   ================================================================ */
.form-status {
    margin: 14px 0 0;
    padding: 12px 14px;
    border-radius: var(--radius-sm);
    border-left: 3px solid transparent;
    font-size: 0.92rem;
    line-height: 1.5;
    display: none;
}

.form-status.is-pending,
.form-status.is-success,
.form-status.is-error { display: block; }

.form-status.is-pending {
    background: var(--bg-light);
    border-left-color: var(--text-muted);
    color: var(--text-muted);
}

.form-status.is-success {
    background: #ECFAF1;
    border-left-color: #1E9E5A;
    color: #145F38;
    font-weight: 700;
}

.form-status.is-error {
    background: #FDEDED;
    border-left-color: #C0392B;
    color: #8C231A;
}

.form-control[aria-invalid="true"],
.lead-form-field[aria-invalid="true"] {
    border-color: #C0392B;
    box-shadow: 0 0 0 3px rgba(192, 57, 43, 0.12);
}

button[type="submit"]:disabled {
    opacity: 0.65;
    cursor: progress;
}
