/* =========================================================================
   Santiago Vargas — Contador Público — Sistema de diseño
   Azul de marca #15487A (muestreado del logotipo oficial) + grises fríos.
   Tipografía: Playfair Display (títulos) + Inter (UI).
   ========================================================================= */

/* ---------- 1. Tokens ---------- */
:root {
    /* Escala derivada del azul exacto del logotipo */
    --sg-950: #05172C;
    --sg-900: #0A2440;
    --sg-800: #0F3355;
    --sg-700: #15487A;   /* verde de marca */
    --sg-600: #1C5C99;
    --sg-500: #2472B8;
    --sg-400: #4E97D1;
    --sg-300: #8ABEE4;
    --sg-200: #BFDCF2;
    --sg-100: #DFEDF9;
    --sg-50:  #F1F7FC;

    /* Grises fríos, en sintonía con el azul de la marca */
    --ink:     #101C28;
    --ink-2:   #37454F;
    --ink-3:   #5F6E7A;
    --line:    #E3E8EC;
    --line-2:  #F0F3F6;
    --surface: #FFFFFF;
    --surface-2: #F7F9FB;

    --gold: #B98328;      /* solo estrellas y distintivos */
    --danger: #B3261E;

    /* Tokens semánticos */
    --brand: var(--sg-700);
    --brand-hover: var(--sg-600);
    --on-brand: #FFFFFF;

    /* Tipografía */
    --font-title: 'Playfair Display', Georgia, 'Times New Roman', serif;
    --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;

    --t-xs: .75rem;    /* 12 */
    --t-sm: .875rem;   /* 14 */
    --t-base: 1rem;    /* 16 */
    --t-md: 1.125rem;  /* 18 */
    --t-lg: 1.25rem;   /* 20 */
    --t-xl: 1.5rem;    /* 24 */
    --t-2xl: 1.875rem; /* 30 */
    --t-3xl: 2.375rem; /* 38 */
    --t-4xl: 3rem;     /* 48 */

    /* Espaciado 4/8 */
    --s-1: 4px;  --s-2: 8px;  --s-3: 12px; --s-4: 16px; --s-5: 20px;
    --s-6: 24px; --s-8: 32px; --s-10: 40px; --s-12: 48px; --s-16: 64px;
    --s-20: 80px; --s-24: 96px;

    --r-sm: 6px; --r: 10px; --r-lg: 16px; --r-xl: 24px; --r-full: 999px;

    --sh-sm: 0 1px 2px rgba(5, 23, 44, .06), 0 1px 3px rgba(5, 23, 44, .05);
    --sh:    0 4px 10px rgba(5, 23, 44, .05), 0 2px 4px rgba(5, 23, 44, .04);
    --sh-md: 0 12px 28px rgba(5, 23, 44, .08), 0 4px 10px rgba(5, 23, 44, .04);
    --sh-lg: 0 24px 56px rgba(5, 23, 44, .12), 0 8px 18px rgba(5, 23, 44, .05);

    /* Curvas fuertes: las de serie son demasiado suaves y restan intención.
       Regla: lo que entra o sale usa ease-out; lo que se desplaza, ease-in-out. */
    --ease: cubic-bezier(.23, 1, .32, 1);          /* ease-out fuerte */
    --ease-in-out: cubic-bezier(.77, 0, .175, 1);  /* movimiento en pantalla */
    --ease-drawer: cubic-bezier(.32, .72, 0, 1);   /* cajones, curva tipo iOS */

    --dur-press: 140ms;   /* pulsación */
    --dur: 220ms;         /* menús y desplegables */
    --dur-panel: 300ms;   /* cajón y acordeón */
    --dur-exit: 220ms;    /* salidas: siempre más rápidas que la entrada */

    --z-nav: 100; --z-drawer: 200; --z-float: 90;
    --container: 1180px;
}

/* ---------- 2. Base ---------- */
*, *::before, *::after { box-sizing: border-box; }

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

/* Permite transicionar hacia height:auto (acordeón). Donde no exista,
   el acordeón simplemente abre sin animación: nada se rompe. */
:root { interpolate-size: allow-keywords; }

/* El cajón móvil vive dentro de .nav, que por su backdrop-filter es su bloque
   contenedor: cerrado se sale a la derecha y ensancharía el documento.
   `clip` lo recorta sin crear contenedor de scroll, así el nav sticky sigue vivo. */
html { overflow-x: clip; }

body {
    margin: 0;
    font-family: var(--font-body);
    font-size: var(--t-base);
    line-height: 1.65;
    color: var(--ink-2);
    background: var(--surface);
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
    overflow-x: clip;
}

h1, h2, h3, h4 {
    font-family: var(--font-title);
    color: var(--ink);
    line-height: 1.15;
    letter-spacing: -.015em;
    margin: 0 0 var(--s-4);
    font-weight: 600;
}
h1 { font-size: clamp(2.125rem, 1.4rem + 3vw, var(--t-4xl)); }
h2 { font-size: clamp(1.75rem, 1.2rem + 2.2vw, var(--t-3xl)); }
h3 { font-size: var(--t-xl); }
h4 { font-size: var(--t-md); }
p  { margin: 0 0 var(--s-4); }
p:last-child { margin-bottom: 0; }

a { color: var(--brand); text-decoration: none; transition: color var(--dur) var(--ease); }
a:hover { color: var(--brand-hover); }

img, svg, video { max-width: 100%; height: auto; display: block; }
ul, ol { margin: 0 0 var(--s-4); padding-left: 1.25em; }
strong { color: var(--ink); font-weight: 600; }
hr { border: 0; border-top: 1px solid var(--line); margin: var(--s-12) 0; }

/* Foco visible siempre — nunca se elimina el anillo */
:focus-visible {
    outline: 3px solid var(--sg-500);
    outline-offset: 2px;
    border-radius: var(--r-sm);
}

::selection { background: var(--sg-200); color: var(--sg-900); }

.skip-link {
    position: absolute; left: var(--s-4); top: -100px;
    background: var(--brand); color: #fff; padding: var(--s-3) var(--s-5);
    border-radius: var(--r); z-index: 999; font-weight: 600;
    transition: top var(--dur) var(--ease);
}
.skip-link:focus { top: var(--s-4); color: #fff; }

/* ---------- 3. Layout ---------- */
.container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: var(--s-6); }
.section { padding-block: clamp(var(--s-16), 8vw, var(--s-24)); }
.section--tight { padding-block: clamp(var(--s-12), 6vw, var(--s-20)); }
.section--soft { background: var(--surface-2); }
.section--mint { background: var(--sg-50); }
.section--dark { background: var(--sg-950); color: rgba(255, 255, 255, .72); }
.section--dark h2, .section--dark h3, .section--dark h4 { color: #fff; }

.grid { display: grid; gap: var(--s-6); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(var(--s-10), 5vw, var(--s-20)); align-items: center; }
.split--wide-left { grid-template-columns: 1.15fr .85fr; }
.split--wide-right { grid-template-columns: .85fr 1.15fr; }

@media (max-width: 1000px) {
    .grid-4 { grid-template-columns: repeat(2, 1fr); }
    .grid-3 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 760px) {
    .grid-2, .grid-3, .grid-4,
    .split, .split--wide-left, .split--wide-right { grid-template-columns: 1fr; }
}

/* ---------- 4. Tipografía de apoyo ---------- */
.eyebrow {
    display: inline-flex; align-items: center; gap: var(--s-2);
    font-size: var(--t-xs); font-weight: 700; letter-spacing: .14em;
    text-transform: uppercase; color: var(--brand); margin-bottom: var(--s-3);
}
.eyebrow::before { content: ""; width: 22px; height: 2px; background: var(--sg-400); border-radius: 2px; }
.section--dark .eyebrow { color: var(--sg-300); }

.section-head { max-width: 46rem; margin-bottom: clamp(var(--s-10), 5vw, var(--s-16)); }
.section-head--center { margin-inline: auto; text-align: center; }
.section-head--center .eyebrow { justify-content: center; }
.lead { font-size: var(--t-md); color: var(--ink-3); line-height: 1.7; }
.section--dark .lead { color: rgba(255, 255, 255, .66); }
.measure { max-width: 68ch; }
.text-brand { color: var(--brand); }
.title-accent { font-style: italic; color: var(--brand); }
.section--dark .title-accent { color: var(--sg-300); }

/* ---------- 5. Botones ---------- */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: var(--s-2);
    min-height: 48px; padding: var(--s-3) var(--s-6);
    font-family: var(--font-body); font-size: var(--t-sm); font-weight: 600; letter-spacing: .01em;
    border: 1.5px solid transparent; border-radius: var(--r); cursor: pointer;
    transition: background var(--dur) var(--ease), border-color var(--dur) var(--ease),
                color var(--dur) var(--ease), box-shadow var(--dur) var(--ease),
                transform var(--dur-press) var(--ease);
    text-align: center;
}
.btn svg { width: 18px; height: 18px; flex: none; }

/* La pulsación se confirma al instante: sin esto la interfaz no parece escuchar */
.btn:active { transform: scale(.97); }

.btn--primary { background: var(--brand); color: var(--on-brand); border-color: var(--brand); box-shadow: var(--sh-sm); }
.btn--primary:hover { background: var(--brand-hover); border-color: var(--brand-hover); color: #fff; box-shadow: var(--sh-md); }

.btn--outline { background: transparent; color: var(--brand); border-color: var(--sg-200); }
.btn--outline:hover { background: var(--sg-50); border-color: var(--sg-400); color: var(--sg-800); }

.btn--light { background: #fff; color: var(--sg-800); border-color: #fff; }
.btn--light:hover { background: var(--sg-50); color: var(--sg-900); }

.btn--onDark { background: transparent; color: #fff; border-color: rgba(255, 255, 255, .28); }
.btn--onDark:hover { background: rgba(255, 255, 255, .1); border-color: rgba(255, 255, 255, .5); color: #fff; }

/* Verde oscurecido a proposito: el verde de marca de WhatsApp (#1EA855) da
   3.09:1 con blanco encima, por debajo del minimo AA (4.5:1) para texto normal.
   #177E40 da 5.13:1 y sigue leyendose como el mismo verde. */
.btn--wa { background: #177E40; border-color: #177E40; color: #fff; }
.btn--wa:hover { background: #146B37; border-color: #146B37; color: #fff; }

.btn--block { width: 100%; }
.btn[disabled], .btn[aria-disabled="true"] { opacity: .5; pointer-events: none; }

.btn-row { display: flex; flex-wrap: wrap; gap: var(--s-3); }
.btn-row--center { justify-content: center; }

/* padding-block: el enlace media 23px de alto, por debajo del minimo WCAG 2.5.8
   (24x24px) para objetivos de puntero */
.link-arrow { display: inline-flex; align-items: center; gap: var(--s-2); font-weight: 600; font-size: var(--t-sm); padding-block: 8px; margin-block: -8px; }
.link-arrow svg { width: 16px; height: 16px; transition: transform var(--dur) var(--ease); }

/* ---------- 6. Navegación ---------- */
.nav {
    position: sticky; top: 0; z-index: var(--z-nav);
    background: rgba(255, 255, 255, .92);
    backdrop-filter: saturate(180%) blur(14px);
    border-bottom: 1px solid transparent;
    transition: border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}
.nav.is-stuck { border-bottom-color: var(--line); box-shadow: var(--sh-sm); }
.nav__bar { display: flex; align-items: center; justify-content: space-between; gap: var(--s-6); min-height: 76px; }
.nav__logo { display: flex; align-items: center; flex: none; }
.nav__logo img { height: 46px; width: auto; }

.nav__menu { display: flex; align-items: center; gap: var(--s-1); list-style: none; margin: 0; padding: 0; }
.nav__link {
    display: inline-flex; align-items: center; gap: var(--s-1);
    padding: var(--s-3) var(--s-4); border-radius: var(--r-sm);
    font-size: var(--t-sm); font-weight: 500; color: var(--ink-2);
    transition: background var(--dur) var(--ease), color var(--dur) var(--ease);
}
.nav__link:hover { background: var(--sg-50); color: var(--sg-800); }
.nav__link[aria-current="page"] { color: var(--brand); font-weight: 600; }
.nav__actions { display: flex; align-items: center; gap: var(--s-3); flex: none; }

/* Submenú de servicios */
.nav__item { position: relative; }
.nav__toggle { background: none; border: 0; font: inherit; cursor: pointer; }
.nav__caret { width: 14px; height: 14px; transition: transform var(--dur) var(--ease); }
.nav__item.is-open .nav__caret { transform: rotate(180deg); }
.nav__panel {
    /* top:100% sin hueco: un espacio vacio ahi no pertenece al <li> y rompe
       el mouseleave que cierra el panel, dejando los enlaces inalcanzables */
    position: absolute; top: 100%; left: 0; min-width: 300px;
    background: #fff; border: 1px solid var(--line); border-radius: var(--r-lg);
    box-shadow: var(--sh-lg); padding: var(--s-3); list-style: none; margin: 0;
    opacity: 0; visibility: hidden;
    /* Crece desde su disparador, no desde el centro: se lee como que sale de él */
    transform-origin: top left;
    transform: translateY(-6px) scale(.97);
    transition: opacity var(--dur) var(--ease), transform var(--dur) var(--ease), visibility var(--dur);
}
.nav__item.is-open .nav__panel { opacity: 1; visibility: visible; transform: none; }
.nav__panel a { display: block; padding: var(--s-3) var(--s-4); border-radius: var(--r); color: var(--ink-2); font-size: var(--t-sm); }
.nav__panel a:hover { background: var(--sg-50); color: var(--sg-800); }
.nav__panel strong { display: block; font-size: var(--t-sm); color: var(--ink); }
.nav__panel span { display: block; font-size: var(--t-xs); color: var(--ink-3); margin-top: 2px; }

/* Botón hamburguesa */
.nav__burger {
    display: none; width: 48px; height: 48px; align-items: center; justify-content: center;
    background: none; border: 1px solid var(--line); border-radius: var(--r-sm); cursor: pointer;
}
.nav__burger span { display: block; position: relative; width: 20px; height: 2px; background: var(--ink); border-radius: 2px; transition: background var(--dur) var(--ease); }
.nav__burger span::before, .nav__burger span::after {
    content: ""; position: absolute; left: 0; width: 20px; height: 2px; background: var(--ink); border-radius: 2px;
    transition: transform var(--dur) var(--ease), top var(--dur) var(--ease);
}
.nav__burger span::before { top: -6px; }
.nav__burger span::after { top: 6px; }
.nav__burger[aria-expanded="true"] span { background: transparent; }
.nav__burger[aria-expanded="true"] span::before { top: 0; transform: rotate(45deg); }
.nav__burger[aria-expanded="true"] span::after { top: 0; transform: rotate(-45deg); }

.nav__scrim {
    position: fixed; inset: 0; background: rgba(5, 23, 44, .5); z-index: var(--z-drawer);
    opacity: 0; visibility: hidden; transition: opacity var(--dur) var(--ease), visibility var(--dur);
}
.nav__scrim.is-open { opacity: 1; visibility: visible; }

@media (max-width: 1000px) {
    .nav__burger { display: inline-flex; }
    .nav__actions .btn { display: none; }
    .nav__menu {
        position: fixed; top: 0; right: 0; bottom: 0; width: min(340px, 88vw);
        background: #fff; z-index: calc(var(--z-drawer) + 1);
        flex-direction: column; align-items: stretch; gap: var(--s-1);
        padding: var(--s-20) var(--s-5) var(--s-8); overflow-y: auto;
        box-shadow: var(--sh-lg);
        /* Cerrado no debe ocupar ancho ni recibir foco del tabulador */
        visibility: hidden; pointer-events: none;
        transform: translateX(100%);
        /* Salida más corta que la entrada: cerrar debe sentirse inmediato */
        transition: transform var(--dur-exit) var(--ease), visibility var(--dur-exit);
    }
    .nav__menu.is-open {
        transform: translateX(0); visibility: visible; pointer-events: auto;
        transition: transform var(--dur-panel) var(--ease-drawer), visibility var(--dur-panel);
    }
    .nav__link { padding: var(--s-4); font-size: var(--t-base); justify-content: space-between; }
    .nav__panel {
        position: static; opacity: 1; visibility: visible; transform: none;
        box-shadow: none; border: 0; border-left: 2px solid var(--line);
        border-radius: 0; margin: 0 0 var(--s-2) var(--s-4); padding: 0 0 0 var(--s-2);
        min-width: 0; display: none;
    }
    .nav__item.is-open .nav__panel { display: block; }
    .nav__cta-mobile { display: block; margin-top: var(--s-4); }
}
@media (min-width: 1001px) { .nav__cta-mobile { display: none; } }

/* ---------- 7. Hero ---------- */
.hero { position: relative; background: var(--sg-950); color: rgba(255, 255, 255, .75); overflow: hidden; }
.hero::before {
    content: ""; position: absolute; inset: 0;
    background:
        radial-gradient(60rem 32rem at 78% 12%, rgba(36, 114, 184, .22), transparent 62%),
        radial-gradient(44rem 30rem at 6% 92%, rgba(21, 72, 122, .38), transparent 60%);
}
.hero__inner { position: relative; padding-block: clamp(var(--s-16), 9vw, 120px); }
.hero__layout { display: grid; grid-template-columns: 1.08fr .92fr; gap: clamp(var(--s-10), 5vw, var(--s-16)); align-items: center; }
.hero h1 { color: #fff; }
.hero__lead { font-size: var(--t-md); color: rgba(255, 255, 255, .68); max-width: 34rem; margin-bottom: var(--s-8); }
.hero .eyebrow { color: var(--sg-300); }
.hero .eyebrow::before { background: var(--sg-400); }

.hero__note { margin-top: var(--s-6); display: flex; flex-wrap: wrap; gap: var(--s-4); }
.hero__note span { display: inline-flex; align-items: center; gap: var(--s-2); font-size: var(--t-sm); color: rgba(255, 255, 255, .58); }
.hero__note svg { width: 16px; height: 16px; color: var(--sg-300); flex: none; }

.hero__panel {
    background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .12);
    border-radius: var(--r-xl); padding: clamp(var(--s-6), 3vw, var(--s-10));
    backdrop-filter: blur(10px);
}
.hero__panel-title { font-family: var(--font-body); font-size: var(--t-xs); font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--sg-300); margin-bottom: var(--s-6); }
.hero__stats { display: grid; gap: var(--s-5); margin: 0; padding: 0; list-style: none; }
.hero__stat { display: flex; align-items: baseline; gap: var(--s-4); padding-bottom: var(--s-5); border-bottom: 1px solid rgba(255, 255, 255, .1); }
.hero__stat:last-child { padding-bottom: 0; border-bottom: 0; }
.hero__stat b { font-family: var(--font-title); font-size: clamp(2rem, 4vw, 2.75rem); font-weight: 600; color: #fff; line-height: 1; font-variant-numeric: tabular-nums; flex: none; min-width: 4.5ch; }
.hero__stat span { font-size: var(--t-sm); color: rgba(255, 255, 255, .55); line-height: 1.5; }

@media (max-width: 900px) { .hero__layout { grid-template-columns: 1fr; } }

/* Hero de páginas interiores */
.page-hero { position: relative; background: var(--sg-950); color: rgba(255, 255, 255, .72); overflow: hidden; }
.page-hero::before {
    content: ""; position: absolute; inset: 0;
    background: radial-gradient(52rem 28rem at 82% 0%, rgba(36, 114, 184, .2), transparent 60%);
}
.page-hero__inner { position: relative; padding-block: clamp(var(--s-12), 6vw, var(--s-20)); max-width: 52rem; }
.page-hero h1 { color: #fff; }
.page-hero .lead { color: rgba(255, 255, 255, .68); }
.page-hero .eyebrow { color: var(--sg-300); }
.page-hero .eyebrow::before { background: var(--sg-400); }

.breadcrumb { list-style: none; display: flex; flex-wrap: wrap; gap: var(--s-2); padding: 0; margin: 0 0 var(--s-5); font-size: var(--t-sm); }
.breadcrumb li { display: flex; align-items: center; gap: var(--s-2); color: rgba(255, 255, 255, .45); }
.breadcrumb li + li::before { content: "/"; color: rgba(255, 255, 255, .28); }
.breadcrumb a { color: rgba(255, 255, 255, .68); }
.breadcrumb a:hover { color: #fff; }

/* ---------- 8. Barra de confianza ---------- */
.trust { border-bottom: 1px solid var(--line); background: #fff; }
.trust__row { display: flex; flex-wrap: wrap; justify-content: center; gap: clamp(var(--s-6), 4vw, var(--s-16)); padding-block: var(--s-8); }
.trust__item { display: flex; align-items: center; gap: var(--s-3); }
.trust__icon { width: 42px; height: 42px; flex: none; border-radius: var(--r); background: var(--sg-50); color: var(--brand); display: grid; place-items: center; }
.trust__icon svg { width: 21px; height: 21px; }
.trust__item b { display: block; font-size: var(--t-sm); color: var(--ink); font-weight: 600; }
.trust__item span { display: block; font-size: var(--t-xs); color: var(--ink-3); }

/* ---------- 9. Tarjetas ---------- */
.card {
    position: relative; background: #fff; border: 1px solid var(--line);
    border-radius: var(--r-lg); padding: clamp(var(--s-6), 3vw, var(--s-8));
    transition: border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease), transform var(--dur) var(--ease);
}
.card--hover:hover { border-color: var(--sg-200); box-shadow: var(--sh-md); }
.card h3 { font-family: var(--font-body); font-size: var(--t-md); font-weight: 700; margin-bottom: var(--s-3); }
.card p { font-size: var(--t-sm); color: var(--ink-3); }
.card__icon { width: 52px; height: 52px; border-radius: var(--r); background: var(--sg-50); color: var(--brand); display: grid; place-items: center; margin-bottom: var(--s-5); }
.card__icon svg { width: 26px; height: 26px; }
.card--hover:hover .card__icon { background: var(--brand); color: #fff; }
.card__foot { margin-top: var(--s-5); }

/* Tarjeta de servicio con numeración */
.card__num { font-family: var(--font-title); font-size: var(--t-sm); font-weight: 600; color: var(--sg-400); letter-spacing: .1em; margin-bottom: var(--s-4); display: block; }
.card__list { list-style: none; padding: 0; margin: var(--s-4) 0 0; display: grid; gap: var(--s-2); }
.card__list li { position: relative; padding-left: 22px; font-size: var(--t-sm); color: var(--ink-3); }
.card__list li::before {
    content: ""; position: absolute; left: 0; top: .55em; width: 9px; height: 9px;
    border-radius: 2px; background: var(--sg-200); border: 2px solid var(--sg-400);
}

/* Tarjeta de sector */
.sector { display: flex; gap: var(--s-4); align-items: flex-start; }
.sector__icon { width: 44px; height: 44px; flex: none; border-radius: var(--r); background: var(--sg-50); color: var(--brand); display: grid; place-items: center; }
.sector__icon svg { width: 22px; height: 22px; }
.sector b { display: block; color: var(--ink); font-size: var(--t-base); margin-bottom: 2px; }
.sector span { font-size: var(--t-sm); color: var(--ink-3); }

/* ---------- 10. Cifras ---------- */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--s-6); }
.stat { text-align: center; padding: var(--s-6) var(--s-4); border-radius: var(--r-lg); background: var(--sg-50); border: 1px solid var(--sg-100); }
.stat b { display: block; font-family: var(--font-title); font-size: clamp(2rem, 4vw, 2.5rem); font-weight: 600; color: var(--brand); line-height: 1; font-variant-numeric: tabular-nums; }
.stat span { display: block; margin-top: var(--s-2); font-size: var(--t-xs); font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); }
.section--dark .stat { background: rgba(255, 255, 255, .05); border-color: rgba(255, 255, 255, .1); }
.section--dark .stat b { color: #fff; }
.section--dark .stat span { color: rgba(255, 255, 255, .5); }
@media (max-width: 760px) { .stats { grid-template-columns: repeat(2, 1fr); } }

/* ---------- 11. Proceso ---------- */
.steps { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--s-6); counter-reset: paso; }
.step { position: relative; counter-increment: paso; padding-top: var(--s-10); }
.step::before {
    content: counter(paso, decimal-leading-zero);
    position: absolute; top: 0; left: 0;
    font-family: var(--font-title); font-size: var(--t-lg); font-weight: 600;
    color: var(--brand); background: var(--sg-50); border: 1px solid var(--sg-100);
    width: 46px; height: 46px; border-radius: var(--r-full); display: grid; place-items: center;
}
.step b { display: block; color: var(--ink); font-size: var(--t-base); font-weight: 700; margin-bottom: var(--s-2); }
.step p { font-size: var(--t-sm); color: var(--ink-3); }
@media (max-width: 900px) { .steps { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .steps { grid-template-columns: 1fr; } }

/* ---------- 12. Testimonios ---------- */
.quote { display: flex; flex-direction: column; gap: var(--s-5); height: 100%; }
.quote__stars { display: flex; gap: 2px; color: var(--gold); }
.quote__stars svg { width: 16px; height: 16px; }
.quote blockquote { margin: 0; font-size: var(--t-base); color: var(--ink-2); line-height: 1.7; }
.quote figcaption { display: flex; align-items: center; gap: var(--s-3); margin-top: auto; padding-top: var(--s-5); border-top: 1px solid var(--line); }
.quote__avatar { width: 42px; height: 42px; flex: none; border-radius: var(--r-full); background: var(--brand); color: #fff; display: grid; place-items: center; font-weight: 700; font-size: var(--t-sm); }
.quote figcaption b { display: block; font-size: var(--t-sm); color: var(--ink); }
/* :not(.quote__avatar): el avatar tambien es un span dentro de figcaption y
   su especificidad (0,1,0) pierde frente a esta regla (0,1,2) sin la exclusion,
   lo que le borraba el color blanco, el tamano y el centrado (display:grid) */
.quote figcaption span:not(.quote__avatar) { display: block; font-size: var(--t-xs); color: var(--ink-3); }

/* ---------- 13. FAQ ---------- */
.faq { display: grid; gap: var(--s-3); }
.faq__item { border: 1px solid var(--line); border-radius: var(--r-lg); background: #fff; overflow: hidden; transition: border-color var(--dur) var(--ease); }
.faq__item[open] { border-color: var(--sg-200); box-shadow: var(--sh-sm); }
/* El contenido se despliega en lugar de aparecer de golpe. Donde el navegador
   no soporte ::details-content, el acordeón sigue funcionando sin animación. */
.faq__item::details-content {
    block-size: 0;
    overflow: hidden;
    transition: block-size var(--dur-panel) var(--ease),
                content-visibility var(--dur-panel) allow-discrete;
}
.faq__item[open]::details-content { block-size: auto; }
.faq__q {
    display: flex; align-items: center; justify-content: space-between; gap: var(--s-4);
    padding: var(--s-5) var(--s-6); cursor: pointer; list-style: none;
    font-weight: 600; color: var(--ink); font-size: var(--t-base);
}
.faq__q::-webkit-details-marker { display: none; }
.faq__q:hover { background: var(--sg-50); }
.faq__q svg { width: 20px; height: 20px; flex: none; color: var(--brand); transition: transform var(--dur) var(--ease); }
.faq__item[open] .faq__q svg { transform: rotate(45deg); }
.faq__a { padding: 0 var(--s-6) var(--s-5); color: var(--ink-3); font-size: var(--t-sm); }

/* ---------- 14. Tabla de tarifas ---------- */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--r-lg); }
table.tarifas { width: 100%; border-collapse: collapse; min-width: 640px; background: #fff; }
table.tarifas th, table.tarifas td { padding: var(--s-4) var(--s-5); text-align: left; border-bottom: 1px solid var(--line); font-size: var(--t-sm); }
table.tarifas thead th { background: var(--sg-50); color: var(--sg-900); font-weight: 700; font-size: var(--t-xs); letter-spacing: .08em; text-transform: uppercase; }
table.tarifas tbody tr:last-child td { border-bottom: 0; }
table.tarifas tbody tr:hover { background: var(--surface-2); }
table.tarifas .precio { font-variant-numeric: tabular-nums; font-weight: 600; color: var(--brand); white-space: nowrap; }
table.tarifas td b { color: var(--ink); }

.plan { display: flex; flex-direction: column; height: 100%; }
.plan--destacado { border-color: var(--brand); box-shadow: var(--sh-md); }
.plan__badge { position: absolute; top: -12px; left: var(--s-8); background: var(--brand); color: #fff; font-size: var(--t-xs); font-weight: 700; letter-spacing: .06em; text-transform: uppercase; padding: var(--s-1) var(--s-3); border-radius: var(--r-full); }
.plan__price { font-family: var(--font-title); font-size: var(--t-2xl); color: var(--ink); font-variant-numeric: tabular-nums; margin: var(--s-3) 0 var(--s-1); }
.plan__price small { font-family: var(--font-body); font-size: var(--t-sm); color: var(--ink-3); font-weight: 500; }
.plan .card__list { flex: 1; margin-block: var(--s-6); }

/* ---------- 15. Formulario ---------- */
.form { display: grid; gap: var(--s-5); }
.form__row { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s-5); }
@media (max-width: 620px) { .form__row { grid-template-columns: 1fr; } }
.field { display: grid; gap: var(--s-2); }
.field label { font-size: var(--t-sm); font-weight: 600; color: var(--ink); }
.field label .req { color: var(--danger); }
.field input, .field select, .field textarea {
    width: 100%; min-height: 48px; padding: var(--s-3) var(--s-4);
    font: inherit; font-size: var(--t-base); color: var(--ink);
    background: #fff; border: 1.5px solid var(--line); border-radius: var(--r);
    transition: border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}
.field textarea { min-height: 130px; resize: vertical; }
.field select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%235C6F65' stroke-width='2'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; background-size: 18px; padding-right: var(--s-10); }
.field input:hover, .field select:hover, .field textarea:hover { border-color: var(--sg-200); }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px var(--sg-100); }
.field__hint { font-size: var(--t-xs); color: var(--ink-3); }
.field__error { font-size: var(--t-xs); color: var(--danger); font-weight: 600; display: none; }
.field.has-error input, .field.has-error select, .field.has-error textarea { border-color: var(--danger); }
.field.has-error .field__error { display: block; }

.check { display: flex; align-items: flex-start; gap: var(--s-3); font-size: var(--t-sm); color: var(--ink-3); }
.check input { width: 20px; height: 20px; min-height: 0; flex: none; margin-top: 2px; accent-color: var(--brand); }
.check .field__error { display: none; margin-top: var(--s-1); font-size: var(--t-xs); color: var(--danger); font-weight: 600; }
.check.has-error { color: var(--danger); }
.check.has-error input { outline: 2px solid var(--danger); outline-offset: 2px; }
.check.has-error .field__error { display: block; }

/* ---------- 16. Bloque de contacto ---------- */
.contact-item { display: flex; gap: var(--s-4); padding-block: var(--s-4); border-bottom: 1px solid var(--line); }
.contact-item:last-of-type { border-bottom: 0; }
.contact-item__icon { width: 42px; height: 42px; flex: none; border-radius: var(--r); background: var(--sg-50); color: var(--brand); display: grid; place-items: center; }
.contact-item__icon svg { width: 20px; height: 20px; }
.contact-item b { display: block; font-size: var(--t-sm); color: var(--ink); }
.contact-item span, .contact-item a { display: block; font-size: var(--t-sm); color: var(--ink-3); }
.contact-item a:hover { color: var(--brand); }
.map { border-radius: var(--r-lg); overflow: hidden; border: 1px solid var(--line); }
.map iframe { display: block; width: 100%; height: 280px; border: 0; }

/* ---------- 17. Banda CTA ---------- */
.cta-band { background: var(--sg-900); color: rgba(255, 255, 255, .72); position: relative; overflow: hidden; }
.cta-band::before { content: ""; position: absolute; inset: 0; background: radial-gradient(46rem 26rem at 50% 0%, rgba(36, 114, 184, .26), transparent 65%); }
.cta-band__inner { position: relative; text-align: center; max-width: 44rem; margin-inline: auto; }
.cta-band h2 { color: #fff; }
.cta-band p { color: rgba(255, 255, 255, .68); font-size: var(--t-md); margin-bottom: var(--s-8); }

/* ---------- 18. Blog ---------- */
.post-card { display: flex; flex-direction: column; height: 100%; overflow: hidden; padding: 0; }
.post-card__media { aspect-ratio: 16 / 9; background: var(--sg-50); overflow: hidden; }
.post-card__media img { width: 100%; height: 100%; object-fit: cover; transition: transform 400ms var(--ease); }
.post-card__body { padding: var(--s-6); display: flex; flex-direction: column; flex: 1; gap: var(--s-3); }
.post-card__meta { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-2); font-size: var(--t-xs); color: var(--ink-3); }
.tag { display: inline-block; padding: 3px var(--s-3); border-radius: var(--r-full); background: var(--sg-50); color: var(--sg-800); font-size: var(--t-xs); font-weight: 600; }
.post-card h3 { font-family: var(--font-title); font-size: var(--t-lg); font-weight: 600; margin: 0; }
.post-card h3 a { color: var(--ink); }
.post-card:hover h3 a { color: var(--brand); }
.post-card__body p { flex: 1; }

.prose { max-width: 44rem; }
.prose h2 { font-size: var(--t-2xl); margin-top: var(--s-12); }
.prose h3 { font-size: var(--t-lg); margin-top: var(--s-8); font-family: var(--font-body); font-weight: 700; }
.prose p, .prose li { font-size: var(--t-md); line-height: 1.8; color: var(--ink-2); }
.prose ul, .prose ol { display: grid; gap: var(--s-2); padding-left: 1.4em; }
.prose > :first-child { margin-top: 0; }
.prose blockquote {
    margin: var(--s-8) 0; padding: var(--s-5) var(--s-6);
    border-left: 3px solid var(--brand); background: var(--sg-50);
    border-radius: 0 var(--r) var(--r) 0; color: var(--ink-2); font-size: var(--t-base);
}
.prose .table-wrap { margin-block: var(--s-8); }
.callout { margin: var(--s-8) 0; padding: var(--s-6); border: 1px solid var(--sg-100); background: var(--sg-50); border-radius: var(--r-lg); }
.callout b { display: block; margin-bottom: var(--s-2); color: var(--sg-800); }
.callout p { font-size: var(--t-sm); color: var(--ink-2); }

/* ---------- 19. Pie de página ---------- */
.footer { background: var(--sg-950); color: rgba(255, 255, 255, .58); padding-block: var(--s-16) var(--s-8); }
.footer__grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1.2fr; gap: clamp(var(--s-8), 4vw, var(--s-12)); }
.footer__logo img { height: 52px; width: auto; margin-bottom: var(--s-5); }
.footer p { font-size: var(--t-sm); line-height: 1.7; }
/* Los títulos de columna del pie son h2 dentro del landmark <footer>: así la
   jerarquía de la página no salta de h2 a h4. Se acepta h4 por retrocompatibilidad. */
.footer h2, .footer h4 { color: #fff; font-family: var(--font-body); font-size: var(--t-sm); font-weight: 700; letter-spacing: .08em; text-transform: uppercase; line-height: 1.4; margin: 0 0 var(--s-5); }
.footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: var(--s-3); }
/* display+padding: los enlaces del pie median 17px de alto, por debajo del
   minimo WCAG 2.5.8 (24x24px); margin negativo compensa para no mover el pie */
.footer a { display: inline-block; color: rgba(255, 255, 255, .58); font-size: var(--t-sm); padding-block: 6px; margin-block: -6px; }
.footer a:hover { color: #fff; }
.footer__contact li { display: flex; gap: var(--s-3); font-size: var(--t-sm); }
.footer__contact svg { width: 16px; height: 16px; flex: none; margin-top: 4px; color: var(--sg-300); }
.footer__bottom {
    margin-top: var(--s-12); padding-top: var(--s-6); border-top: 1px solid rgba(255, 255, 255, .1);
    display: flex; flex-wrap: wrap; justify-content: space-between; gap: var(--s-4);
    font-size: var(--t-xs); color: rgba(255, 255, 255, .42);
}
/* .34 de opacidad daba 3.1:1 con el fondo, por debajo del minimo AA (4.5:1)
   para texto normal -- el aviso de datos personales quedaba casi ilegible */
.footer__legal { background: var(--sg-950); color: rgba(255, 255, 255, .60); font-size: var(--t-xs); line-height: 1.7; padding-bottom: var(--s-10); }
@media (max-width: 1000px) { .footer__grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 620px) { .footer__grid { grid-template-columns: 1fr; } }

/* ---------- 20. WhatsApp flotante ---------- */
.wa {
    position: fixed; right: var(--s-5); bottom: var(--s-5); z-index: var(--z-float);
    display: inline-flex; align-items: center; gap: var(--s-3);
    min-height: 56px; padding: var(--s-3) var(--s-5) var(--s-3) var(--s-3);
    background: #177E40; color: #fff; border-radius: var(--r-full);
    box-shadow: var(--sh-lg); font-size: var(--t-sm); font-weight: 600;
    transition: transform var(--dur-press) var(--ease), background var(--dur) var(--ease);
}
.wa:hover { background: #146B37; color: #fff; }
.wa:active { transform: scale(.97); }
.wa svg { width: 32px; height: 32px; flex: none; }
@media (max-width: 560px) { .wa { padding: var(--s-3); } .wa span { display: none; } }

/* ---------- 21. Animación de entrada ---------- */
[data-reveal] { opacity: 0; transform: translateY(20px); transition: opacity 500ms var(--ease), transform 500ms var(--ease); }
[data-reveal].is-visible { opacity: 1; transform: none; }
[data-reveal-group] > * { opacity: 0; transform: translateY(20px); transition: opacity 440ms var(--ease), transform 440ms var(--ease); }
[data-reveal-group].is-visible > * { opacity: 1; transform: none; }
[data-reveal-group].is-visible > *:nth-child(2) { transition-delay: 60ms; }
[data-reveal-group].is-visible > *:nth-child(3) { transition-delay: 120ms; }
[data-reveal-group].is-visible > *:nth-child(4) { transition-delay: 180ms; }
[data-reveal-group].is-visible > *:nth-child(5) { transition-delay: 240ms; }
[data-reveal-group].is-visible > *:nth-child(6) { transition-delay: 300ms; }

/* ---------- 21b. Estados táctiles de puntero fino ----------
   El desplazamiento en :hover se reserva a ratón. En una pantalla táctil el
   toque dispara :hover y la tarjeta se quedaría levantada hasta tocar otra cosa. */
@media (hover: hover) and (pointer: fine) {
    .btn--primary:hover,
    .btn--light:hover,
    .btn--wa:hover { transform: translateY(-2px); }
    .card--hover:hover { transform: translateY(-3px); }
    .post-card:hover .post-card__media img { transform: scale(1.04); }
    .link-arrow:hover svg { transform: translateX(4px); }
    .wa:hover { transform: translateY(-3px); }
}

/* ---------- 21c. Menos movimiento ----------
   Menos movimiento no es "sin animación": se conservan los fundidos y los
   cambios de color, que ayudan a entender el cambio, y se elimina el
   desplazamiento, que es lo que provoca mareo. */
@media (prefers-reduced-motion: reduce) {
    html:focus-within { scroll-behavior: auto; }
    html { scroll-behavior: auto; }

    *, *::before, *::after {
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
        transition-property: opacity, background-color, border-color, color, box-shadow !important;
        transition-duration: 160ms !important;
    }
    /* Las entradas se resuelven solo con opacidad, sin desplazarse */
    [data-reveal], [data-reveal-group] > * { transform: none !important; }
    [data-reveal-group].is-visible > * { transition-delay: 0ms !important; }
    /* El cajón y el acordeón no pueden depender de una transición desactivada */
    .nav__menu { transition: none !important; }
    .faq__item::details-content { transition: none !important; block-size: auto; }
}

/* ---------- 22. Utilidades ---------- */
.sr-only {
    position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
    overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
.mt-0 { margin-top: 0; }
.mt-6 { margin-top: var(--s-6); }
.mt-8 { margin-top: var(--s-8); }
.mb-0 { margin-bottom: 0; }
.text-center { text-align: center; }

@media print {
    .nav, .wa, .cta-band, .footer__legal { display: none; }
    body { color: #000; }
}
