/* ============================================================
   COZOPY — styles.css
   Fuente de verdad visual: DESIGN.md (raíz del repo)
   Tipografía: Plus Jakarta Sans (Google Fonts — variable, 300–800)
   ============================================================ */

/* ============================================================
   IMPORTS
   ============================================================ */

/* Plus Jakarta Sans: cargada en includes/head.php via <link rel="preconnect"> + <link rel="stylesheet">
   para evitar el bloqueo de render que provoca @import. No usar @import aquí. */


/* ============================================================
   CUSTOM PROPERTIES (:root)
   Fuente: DESIGN.md — no editar valores aquí directamente,
   editar en DESIGN.md y sincronizar.
   ============================================================ */

:root {
    /* --- Colores --- */
    --color-primary:           #0a76e5; /* azul — links, h1 en landings, focus */
    --color-secondary:         #011e41; /* azul marino — headings, botón, fondos oscuros */
    --color-background:        #ffffff;
    --color-surface:           #ececec; /* gris claro — nav, separadores, hover cards */
    --color-surface-alt:       #f4f4f4; /* gris muy claro — cards en landings */
    --color-foreground:        #515151; /* texto de cuerpo */
    --color-muted:             #6f6f6e;
    --color-muted-foreground:  #3c3c3b; /* texto ligero — FAQs, respuestas */
    --color-border:            #6d6d6d;
    --color-primary-foreground:#ffffff; /* texto sobre primary/secondary */
    --color-success:           #25d366; /* verde WhatsApp */

    /* --- Tipografía --- */
    --font-body: 'Plus Jakarta Sans', sans-serif;

    /* --- Escala tipográfica — alineada con DESIGN.md --- */
    --text-xs:   0.75rem;  /*  12px */
    --text-sm:   0.875rem; /*  14px */
    --text-base: 1rem;     /*  16px */
    --text-md:   1.125rem; /*  18px */
    --text-lg:   1.25rem;  /*  20px */
    --text-xl:   1.5rem;   /*  24px */
    --text-2xl:  2rem;     /*  32px */
    --text-3xl:  2.25rem;  /*  36px — h2 home */
    --text-4xl:  3rem;     /*  48px — h1 home */

    /* --- Espaciado --- */
    --space-xs:  0.5rem;   /*   8px */
    --space-sm:  1rem;     /*  16px */
    --space-md:  1.5rem;   /*  24px */
    --space-lg:  2rem;     /*  32px */
    --space-xl:  3rem;     /*  48px */
    --space-2xl: 5rem;     /*  80px */

    /* --- Layout --- */
    --max-width:         1312px;
    --container-width:   95%;   /* 92.04% en mobile — ver media queries */
    --section-padding-v: 5vw;   /* padding vertical de secciones */

    /* --- Border radius --- */
    --radius-sm:   5px;   /* botones */
    --radius-md:   10px;  /* cards, formulario */
    --radius-full: 999px; /* pills, WhatsApp bubble */

    /* --- Sombras --- */
    --shadow-sm: 0 0 1rem 0.05rem rgba(0, 0, 0, 0.25);  /* cards en reposo */
    --shadow-lg: 0.25rem 0.25rem 1rem 0 rgba(0, 0, 0, 0.5); /* flotantes */

    /* --- Transiciones --- */
    --transition: 300ms ease;
}


/* ============================================================
   RESET
   ============================================================ */

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

html {
    color-scheme: light;
    -webkit-text-size-adjust: 100%;
}

body {
    min-height: 100vh;
    min-height: 100dvh;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

img, video, svg {
    display: block;
    max-width: 100%;
}

input, button, textarea, select {
    font: inherit;
}

ul, ol {
    list-style: none;
}

a {
    color: inherit;
    text-decoration: none;
}


/* ============================================================
   BASE TYPOGRAPHY
   ============================================================ */

html {
    font-size: clamp(14px, 0.4rem + 0.6vw, 16px);
    font-family: var(--font-body);
    color: var(--color-foreground);
}

/* --- Headings --- */

h1 {
    font-size: var(--text-4xl);
    font-weight: 800;
    line-height: 1.08;
    letter-spacing: -0.03em;
    color: var(--color-secondary);
}

h2 {
    font-size: var(--text-3xl);
    font-weight: 700;
    line-height: 1.15;
    letter-spacing: -0.02em;
    color: var(--color-secondary);
}

h3 {
    font-size: var(--text-2xl);
    font-weight: 700;
    line-height: 1.3;
    color: var(--color-secondary);
}

h4 {
    font-size: var(--text-xl);
    font-weight: 600;
    line-height: 1.4;
    color: var(--color-secondary);
}

h5 {
    font-size: var(--text-lg);
    font-weight: 600;
    line-height: 1.4;
    color: var(--color-secondary);
}

/* --- Body text --- */

p, li, dt, dd, figcaption, label {
    font-size: var(--text-base);
    line-height: 1.6;
    color: var(--color-foreground);
}

small, .text-muted {
    font-size: var(--text-sm);
    line-height: 1.5;
    color: var(--color-muted);
}

/* --- UI elements --- */

button, .btn {
    font-size: var(--text-md);
    font-weight: 600;
    line-height: 1;
    letter-spacing: 0.01em;
}

input, textarea, select {
    font-size: var(--text-base);
    line-height: 1.4;
    color: var(--color-foreground);
}


/* ============================================================
   ACCESIBILIDAD
   ============================================================ */

*:focus {
    outline: none;
}

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


/* ============================================================
   BOTONES
   ============================================================ */

/* --- Base --- */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-xs);
    padding: 1rem 1.5rem;
    border: 2px solid transparent;
    border-radius: var(--radius-sm);
    font-family: var(--font-body);
    font-size: var(--text-md);
    font-weight: 600;
    line-height: 1;
    text-transform: none;
    cursor: pointer;
    transition: background-color var(--transition), color var(--transition), border-color var(--transition);
}

/* --- Primary --- */

.btn--primary {
    background-color: var(--color-secondary);
    color: var(--color-primary-foreground);
    border-color: var(--color-secondary);
}

.btn--primary:hover,
.btn--primary:focus-visible {
    background-color: var(--color-background);
    color: var(--color-secondary);
    border-color: var(--color-secondary);
}

/* --- Primary inverted (sobre fondos oscuros) --- */

.btn--primary-inverted {
    background-color: var(--color-background);
    color: var(--color-secondary);
    border-color: var(--color-background);
}

.btn--primary-inverted:hover,
.btn--primary-inverted:focus-visible {
    background-color: transparent;
    color: var(--color-background);
    border-color: var(--color-background);
}

/* --- Outline inverted (sobre fondos oscuros) --- */

.btn--outline-inverted {
    background-color: transparent;
    color: var(--color-primary-foreground);
    border-color: rgba(255, 255, 255, 0.5);
}

.btn--outline-inverted:hover,
.btn--outline-inverted:focus-visible {
    background-color: rgba(255, 255, 255, 0.1);
    border-color: var(--color-primary-foreground);
}

/* --- WhatsApp --- */

.btn--whatsapp {
    background-color: var(--color-success);
    color: var(--color-primary-foreground);
    border-color: var(--color-success);
    border-radius: var(--radius-full);
}

.btn--whatsapp:hover,
.btn--whatsapp:focus-visible {
    opacity: 0.9;
}


/* ============================================================
   CONTENEDOR
   ============================================================ */

.container {
    display: block;
    width: var(--container-width);
    max-width: var(--max-width);
    margin-right: auto;
    margin-left: auto;
}


/* ============================================================
   NAVEGACIÓN
   ============================================================ */

.site-header {
    position: sticky;
    top: 0;
    z-index: 100; /* sobre secciones de contenido */
    width: 100%;
    background-color: var(--color-surface);
}

/* --- Nav container --- */

.site-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: var(--container-width);
    max-width: var(--max-width);
    height: 70px;
    margin-right: auto;
    margin-left: auto;
}

/* --- Logo --- */

.site-nav__logo {
    display: flex;
    align-items: center;
    height: 50px;
    font-size: var(--text-lg);
    font-weight: 700;
    color: var(--color-secondary);
    /* Cuando llegue el logo SVG: sustituir el texto por <img> */
}

/* --- Links del menú --- */

.site-nav__menu {
    display: flex;
    align-items: center;
    gap: var(--space-lg);
}

.site-nav__menu a {
    font-size: var(--text-base);
    font-weight: 500;
    color: var(--color-muted-foreground);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    transition: color var(--transition);
}

.site-nav__menu a:hover,
.site-nav__menu a:focus-visible,
.site-nav__menu a[aria-current="page"] {
    color: var(--color-secondary);
}

/* --- CTA del nav --- */

.site-nav__cta {
    padding: var(--space-sm) var(--space-md);
    font-size: var(--text-sm);
}

/* --- Hamburger (oculto en desktop) --- */

.site-nav__toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px; /* hardcoded: tamaño fijo del ícono de hamburguesa */
    width: 40px;
    height: 40px;
    padding: var(--space-xs);
    border: none;
    background: none;
    cursor: pointer;
}

.site-nav__toggle span {
    display: block;
    width: 100%;
    height: 2px; /* hardcoded: grosor fijo de líneas del hamburger */
    background-color: var(--color-secondary);
    border-radius: var(--radius-full);
    transition: transform var(--transition), opacity var(--transition);
}

/* Estado abierto del menú — clase añadida por JS */
.site-nav__toggle[aria-expanded="true"] span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.site-nav__toggle[aria-expanded="true"] span:nth-child(2) {
    opacity: 0;
}

.site-nav__toggle[aria-expanded="true"] span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}


/* ============================================================
   FOOTER
   ============================================================ */

.site-footer {
    background-color: var(--color-secondary);
    color: var(--color-primary-foreground);
    padding: var(--space-xl) 0;
}

.site-footer__inner {
    width: var(--container-width);
    max-width: var(--max-width);
    margin-right: auto;
    margin-left: auto;
    text-align: center;
}

.site-footer p,
.site-footer small {
    color: var(--color-primary-foreground);
    opacity: 0.7;
}


/* ============================================================
   HOME — SECCIONES
   ============================================================ */

/* --- Hero (#intro) --- */

.hero {
    display: flex;
    flex-direction: column;
    width: 100%;
    background-color: var(--color-secondary);
}

.hero__inner {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    width: var(--container-width);
    max-width: var(--max-width);
    min-height: 75vh;
    min-height: 75dvh;
    margin-right: auto;
    margin-left: auto;
    padding: var(--space-2xl) 0 var(--space-xl);
    gap: var(--space-lg);
}

.hero__label {
    font-size: var(--text-sm);
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--color-primary-foreground);
    opacity: 0.5;
}

.hero__inner h1 {
    max-width: 14ch;
    font-size: clamp(2rem, 3.5vw, 3.25rem); /* headline de impacto — override del global */
    font-weight: 800;
    line-height: 1.03;
    letter-spacing: -0.04em;
    color: var(--color-primary-foreground);
}

.hero__sub {
    max-width: 55ch;
    font-size: var(--text-md);
    font-weight: 400;
    line-height: 1.7;
    color: var(--color-primary-foreground);
    opacity: 0.8;
}

.hero__ctas {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: var(--space-sm);
    margin-top: var(--space-xs);
}

/* --- Animaciones de carga del hero --- */

@media (prefers-reduced-motion: no-preference) {

    @keyframes heroIn {
        from { opacity: 0; transform: translateY(20px); }
        to   { opacity: 1; transform: translateY(0); }
    }

    @keyframes heroLabel {
        from { opacity: 0; transform: translateY(20px); }
        to   { opacity: 0.5; transform: translateY(0); } /* coincide con el valor estático */
    }

    @keyframes heroTrust {
        from { opacity: 0; }
        to   { opacity: 1; }
    }

    .hero__label    { animation: heroLabel 0.55s cubic-bezier(0.25, 0.46, 0.45, 0.94) 0.1s  both; }
    .hero__inner h1 { animation: heroIn   0.65s cubic-bezier(0.25, 0.46, 0.45, 0.94) 0.22s both; }
    .hero__sub      { animation: heroIn   0.65s cubic-bezier(0.25, 0.46, 0.45, 0.94) 0.38s both; }
    .hero__ctas     { animation: heroIn   0.65s cubic-bezier(0.25, 0.46, 0.45, 0.94) 0.52s both; }
    .hero__trust    { animation: heroTrust 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94) 0.65s both; }
}

/* --- Trust strip --- */

.hero__trust {
    width: 100%;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    background-color: rgba(255, 255, 255, 0.04);
}

.hero__trust-inner {
    display: flex;
    justify-content: space-between;
    width: var(--container-width);
    max-width: var(--max-width);
    margin-right: auto;
    margin-left: auto;
    padding: var(--space-lg) 0;
}

.hero__trust-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.2rem;
    text-align: center;
}

.hero__trust-item span {
    font-size: var(--text-2xl);
    font-weight: 700;
    line-height: 1;
    color: var(--color-primary-foreground);
}

.hero__trust-item p {
    font-size: var(--text-sm);
    color: var(--color-primary-foreground);
    opacity: 0.55;
}

/* --- Servicios (#servicios) --- */

.services {
    padding: var(--section-padding-v) 0;
    background-color: var(--color-background);
}

.services__inner {
    width: var(--container-width);
    max-width: var(--max-width);
    margin-right: auto;
    margin-left: auto;
}

.services__header {
    text-align: center;
    margin-bottom: var(--space-xl);
}

.services__header p {
    font-size: var(--text-md);
    color: var(--color-muted);
    margin-top: var(--space-xs);
}

.services__grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--space-md);
}

/* --- Card de servicio (icon + texto siempre visible) --- */

.service-card {
    display: flex;
    flex-direction: column;
    border-radius: var(--radius-md);
    background-color: var(--color-surface-alt);
    overflow: hidden;
    transition: box-shadow var(--transition), transform var(--transition);
}

.service-card:hover {
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.12), 0 4px 12px rgba(0, 0, 0, 0.06); /* elevación más dramática */
    transform: translateY(-6px);
}

.service-card__icon {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 120px; /* slot reservado para ícono SVG pendiente */
    background-color: var(--color-secondary);
}

.service-card__body {
    display: flex;
    flex-direction: column;
    flex: 1;
    padding: var(--space-md);
}

.service-card__body h3 {
    font-size: var(--text-md);
    font-weight: 700;
    color: var(--color-secondary);
    margin-bottom: var(--space-xs);
}

.service-card__body p {
    flex: 1;
    font-size: var(--text-base);
    color: var(--color-foreground);
    margin-bottom: var(--space-md);
}

.service-card__body a {
    font-size: var(--text-sm);
    font-weight: 600;
    color: var(--color-secondary);
    transition: opacity var(--transition);
}

.service-card__body a:hover {
    opacity: 0.65;
}

/* --- Beneficios (#nosotros) --- */

.benefits {
    padding: var(--section-padding-v) 0;
    background-color: var(--color-secondary);
}

.benefits__inner {
    width: var(--container-width);
    max-width: var(--max-width);
    margin-right: auto;
    margin-left: auto;
}

.benefits__header {
    text-align: center;
    margin-bottom: var(--space-xl);
}

.benefits__header h2 {
    max-width: 22ch;
    margin-right: auto;
    margin-left: auto;
    color: var(--color-primary-foreground);
}

.benefits__grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-md);
}

.benefit-item {
    padding: var(--space-xl);
    border-left: 3px solid rgba(10, 118, 229, 0.3);
    border-radius: var(--radius-md);
    background-color: rgba(255, 255, 255, 0.05);
    transition: background-color var(--transition), border-color var(--transition);
}

.benefit-item:hover {
    border-left-color: var(--color-primary);
    background-color: rgba(255, 255, 255, 0.09);
}

.benefit-item h3 {
    font-size: var(--text-lg);
    font-weight: 700;
    color: var(--color-primary-foreground);
    margin-bottom: var(--space-xs);
}

.benefit-item p {
    font-size: var(--text-base);
    line-height: 1.7;
    color: var(--color-primary-foreground);
    opacity: 0.7;
}

/* --- Cómo trabajamos --- */

.how {
    padding: var(--section-padding-v) 0;
    background-color: var(--color-background);
}

.how__inner {
    width: var(--container-width);
    max-width: var(--max-width);
    margin-right: auto;
    margin-left: auto;
}

.how__header {
    text-align: center;
    margin-bottom: var(--space-xl);
}

.how__header p {
    font-size: var(--text-md);
    color: var(--color-muted);
    margin-top: var(--space-xs);
}

.how__steps {
    display: flex;
    justify-content: space-between;
    gap: var(--space-lg);
}

.how-step {
    display: flex;
    flex: 1;
    align-items: flex-start;
    gap: var(--space-md);
}

.how-step__number {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 52px;
    height: 52px;
    border-radius: var(--radius-full);
    background-color: var(--color-secondary);
    font-size: var(--text-xl);
    font-weight: 700;
    color: var(--color-primary-foreground);
}

.how-step__body h3 {
    font-size: var(--text-md);
    font-weight: 700;
    color: var(--color-secondary);
    margin-bottom: var(--space-xs);
}

.how-step__body p {
    font-size: var(--text-base);
    color: var(--color-muted);
}

/* --- FAQ --- */

.faq {
    padding: var(--section-padding-v) 0;
    background-color: var(--color-background);
}

.faq__inner {
    width: var(--container-width);
    max-width: 760px;
    margin-right: auto;
    margin-left: auto;
}

.faq__header {
    text-align: center;
    margin-bottom: var(--space-xl);
}

.faq__header p {
    font-size: var(--text-md);
    color: var(--color-muted);
    margin-top: var(--space-xs);
}

.faq__list {
    display: flex;
    flex-direction: column;
}

.faq__item {
    border-bottom: 1px solid var(--color-surface);
}

.faq__item:first-child {
    border-top: 1px solid var(--color-surface);
}

.faq__question {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: var(--space-md) 0;
    background: none;
    border: none;
    cursor: pointer;
    text-align: left;
    gap: var(--space-md);
}

.faq__question-text {
    font-size: var(--text-md);
    font-weight: 600;
    color: var(--color-secondary);
    line-height: 1.4;
}

.faq__icon {
    flex-shrink: 0;
    width: 22px;
    height: 22px;
    color: var(--color-primary);
    transition: transform var(--transition);
}

.faq__item.is-open .faq__icon {
    transform: rotate(45deg);
}

.faq__answer-wrap {
    display: grid;
    grid-template-rows: 0fr;
    transition: grid-template-rows 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.faq__item.is-open .faq__answer-wrap {
    grid-template-rows: 1fr;
}

.faq__answer {
    overflow: hidden;
}

.faq__answer p {
    padding-bottom: var(--space-md);
    font-size: var(--text-base);
    line-height: 1.75;
    color: var(--color-muted);
}

/* --- Testimoniales --- */

.testimonials {
    padding: var(--section-padding-v) 0;
    background-color: var(--color-surface-alt);
}

.testimonials__inner {
    width: var(--container-width);
    max-width: var(--max-width);
    margin-right: auto;
    margin-left: auto;
}

.testimonials__header {
    text-align: center;
    margin-bottom: var(--space-xl);
}

.testimonials__header p {
    font-size: var(--text-md);
    color: var(--color-muted);
    margin-top: var(--space-xs);
}

.testimonials__grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-md);
}

.testimonial-card {
    display: flex;
    flex-direction: column;
    padding: var(--space-xl);
    border-radius: var(--radius-md);
    background-color: var(--color-background);
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.05);
}

.testimonial-card__quote {
    flex: 1;
    font-size: var(--text-base);
    font-style: italic;
    line-height: 1.75;
    color: var(--color-foreground);
    margin-bottom: var(--space-md);
}

.testimonial-card__quote::before {
    content: '\201C'; /* " */
    display: block;
    font-size: var(--text-2xl);
    font-weight: 800;
    font-style: normal;
    line-height: 1;
    color: var(--color-primary);
    margin-bottom: var(--space-xs);
}

.testimonial-card__author {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    padding-top: var(--space-md);
    border-top: 1px solid var(--color-surface);
}

.testimonial-card__name {
    font-size: var(--text-sm);
    font-weight: 700;
    color: var(--color-secondary);
}

.testimonial-card__role {
    font-size: var(--text-xs);
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--color-muted);
}

/* --- Blog / casos preview --- */

.blog-preview {
    padding: var(--section-padding-v) 0;
    background-color: var(--color-background);
}

.blog-preview__inner {
    width: var(--container-width);
    max-width: var(--max-width);
    margin-right: auto;
    margin-left: auto;
}

.blog-preview__header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    margin-bottom: var(--space-xl);
}

.blog-preview__header p {
    font-size: var(--text-md);
    color: var(--color-muted);
    margin-top: var(--space-xs);
}

.blog-preview__header-text {
    display: flex;
    flex-direction: column;
    gap: var(--space-xs);
}

.blog-preview__grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-md);
}

.blog-card {
    display: flex;
    flex-direction: column;
    border-radius: var(--radius-md);
    background-color: var(--color-surface-alt);
    overflow: hidden;
    transition: box-shadow var(--transition), transform var(--transition);
}

.blog-card:hover {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
    transform: translateY(-4px);
}

.blog-card__header {
    padding: var(--space-md) var(--space-md) 0;
}

.blog-card__tag {
    display: inline-block;
    padding: 0.2em 0.65em;
    border-radius: var(--radius-full);
    background-color: rgba(10, 118, 229, 0.1);
    font-size: var(--text-xs);
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--color-primary);
}

.blog-card__body {
    display: flex;
    flex-direction: column;
    flex: 1;
    padding: var(--space-md);
}

.blog-card__title {
    font-size: var(--text-md);
    font-weight: 700;
    line-height: 1.35;
    letter-spacing: -0.01em;
    color: var(--color-secondary);
    margin-bottom: var(--space-sm);
}

.blog-card__excerpt {
    flex: 1;
    font-size: var(--text-sm);
    line-height: 1.65;
    color: var(--color-muted);
    margin-bottom: var(--space-md);
}

.blog-card__coming {
    font-size: var(--text-xs);
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--color-muted);
    opacity: 0.6;
}

/* --- CTA banner --- */

.cta-banner {
    padding: var(--section-padding-v) 0;
    background-color: var(--color-primary);
}

.cta-banner__inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: var(--container-width);
    max-width: var(--max-width);
    margin-right: auto;
    margin-left: auto;
    text-align: center;
    gap: var(--space-md);
}

.cta-banner__inner h2 {
    max-width: 22ch;
    color: var(--color-primary-foreground);
}

.cta-banner__inner p {
    max-width: 44ch;
    font-size: var(--text-md);
    color: var(--color-primary-foreground);
    opacity: 0.85;
}

/* --- Contacto (#contacto) --- */

.contact {
    padding: var(--section-padding-v) 0;
    background-color: var(--color-surface-alt);
}

.contact__inner {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: var(--space-2xl);
    width: var(--container-width);
    max-width: var(--max-width);
    margin-right: auto;
    margin-left: auto;
}

.contact__info {
    width: 38%;
}

.contact__info h2 {
    margin-bottom: var(--space-md);
}

.contact__info > p {
    font-size: var(--text-base);
    line-height: 1.7;
    color: var(--color-muted);
    margin-bottom: var(--space-xl);
}

.contact__detail {
    margin-bottom: var(--space-md);
}

.contact__detail strong {
    display: block;
    font-size: var(--text-xs);
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--color-muted);
    margin-bottom: 0.25em;
}

.contact__detail p,
.contact__detail a {
    font-size: var(--text-md);
    font-weight: 500;
    color: var(--color-secondary);
}

.contact__detail a:hover {
    opacity: 0.7;
}

.contact__form-wrap {
    width: 57%;
    padding: var(--space-xl);
    border-radius: var(--radius-md);
    background-color: var(--color-background);
    box-shadow: var(--shadow-sm);
}

.contact__form-wrap > h3 {
    font-size: var(--text-xl);
    color: var(--color-secondary);
    margin-bottom: var(--space-md);
}


/* ============================================================
   WHATSAPP FLOTANTE
   ============================================================ */

.whatsapp-float {
    display: flex;
    align-items: center;
    justify-content: center;
    position: fixed;
    right: 1.25vw;
    bottom: 1.25vw;
    z-index: 1030; /* sobre todo el contenido */
    width: 60px;
    height: 60px;
    background-color: var(--color-success);
    border-radius: var(--radius-full);
    box-shadow: var(--shadow-lg);
    cursor: pointer;
    transition: transform var(--transition), opacity var(--transition);
}

.whatsapp-float:hover {
    transform: scale(1.1);
}

.whatsapp-float svg {
    width: 32px;
    height: 32px;
}

/* [IMAGEN: ícono SVG de WhatsApp — public/svg/whatsapp.svg] */


/* ============================================================
   REVEAL ON SCROLL
   ============================================================ */

@media (prefers-reduced-motion: no-preference) {

    [data-reveal] {
        opacity: 0;
        transform: translateY(28px);
        transition: opacity 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94),
                    transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    }

    [data-reveal].is-visible {
        opacity: 1;
        transform: translateY(0);
    }

    [data-reveal][data-delay="1"] { transition-delay: 0.08s; }
    [data-reveal][data-delay="2"] { transition-delay: 0.18s; }
    [data-reveal][data-delay="3"] { transition-delay: 0.28s; }
    [data-reveal][data-delay="4"] { transition-delay: 0.38s; }
}


/* ============================================================
   ANIMACIONES ACCESIBLES
   ============================================================ */

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }
}


/* ============================================================
   MOBILE — max-width: 768px
   (mismo orden que desktop)
   ============================================================ */

@media (max-width: 768px) {

    /* --- :root overrides --- */
    :root {
        --container-width: 92%;
        --section-padding-v: 8vw;
    }

    /* --- Base typography --- */
    html {
        font-size: clamp(14px, 0.35rem + 2.87vw, 18px);
    }

    h1 {
        font-size: var(--text-3xl);
    }

    h2 {
        font-size: var(--text-2xl);
    }

    /* --- Nav --- */
    .site-nav__toggle {
        display: flex;
    }

    .site-nav__menu {
        display: none;
        flex-direction: column;
        align-items: flex-start;
        gap: var(--space-sm);
        position: absolute;
        top: 70px;
        left: 0;
        width: 100%;
        padding: var(--space-md);
        background-color: var(--color-surface);
    }

    .site-nav__menu.is-open {
        display: flex;
    }

    .site-header {
        position: relative; /* evita que el menú abierto desplace el contenido */
    }

    /* --- Hero --- */
    .hero__inner {
        min-height: 60vh;
        min-height: 60dvh;
        padding-top: var(--space-xl);
        padding-bottom: var(--space-xl);
    }

    .hero__inner h1 {
        max-width: none;
    }

    .hero__trust-inner {
        flex-wrap: wrap;
        gap: var(--space-md);
        padding-top: var(--space-md);
        padding-bottom: var(--space-md);
    }

    .hero__trust-item {
        width: calc(50% - var(--space-sm));
    }

    /* --- Servicios --- */
    .services__grid {
        grid-template-columns: repeat(2, 1fr);
    }

    /* --- Beneficios --- */
    .benefits__grid {
        grid-template-columns: 1fr;
    }

    /* --- Cómo trabajamos --- */
    .how__steps {
        flex-direction: column;
    }

    /* --- FAQ --- */
    .faq__question-text {
        font-size: var(--text-base);
    }

    /* --- Testimoniales --- */
    .testimonials__grid {
        grid-template-columns: 1fr;
    }

    /* --- Blog preview --- */
    .blog-preview__header {
        flex-direction: column;
        gap: var(--space-sm);
    }

    .blog-preview__grid {
        grid-template-columns: 1fr;
    }

    /* --- Contacto --- */
    .contact__inner {
        flex-direction: column;
        gap: var(--space-xl);
    }

    .contact__info,
    .contact__form-wrap {
        width: 100%;
    }

    /* --- WhatsApp flotante --- */
    .whatsapp-float {
        right: 2.5vw;
        bottom: 2.5vw;
        width: 48px;
        height: 48px;
    }
}
