/* ==========================================================================
   Macald Legal — hoja de estilos de la web pública
   --------------------------------------------------------------------------
   CSS escrito a mano, sin framework ni paso de compilación: el sitio se
   despliega en hosting convencional copiando archivos. Un solo archivo,
   servido comprimido y cacheado.

   Índice
     1. Tokens
     2. Reset y base
     3. Utilidades de maquetación
     4. Tipografía de sección
     5. Botones
     6. Cabecera y navegación
     7. Hero
     8. Tarjetas (servicios, áreas, beneficios, planes, testimonios)
     9. Proceso
    10. FAQ
    11. Formularios
    12. Blog
    13. Consulta de casos
    14. CTA y pie
    15. Responsive
   ========================================================================== */

/* ---------------------------------------------------------------- 1. Tokens */
:root {
    --ink: #0f172a;
    --ink-soft: #1e293b;
    --muted: #64748b;
    --muted-light: #94a3b8;
    --line: #e2e8f0;
    --line-soft: #f1f5f9;

    --surface: #ffffff;
    --surface-alt: #f8fafc;
    --surface-deep: #0b1120;

    --brand: #4f46e5;
    --brand-dark: #4338ca;
    --brand-darker: #312e81;
    --brand-soft: #eef2ff;
    --accent: #06b6d4;
    --accent-soft: #ecfeff;

    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;

    --radius-sm: .5rem;
    --radius: .875rem;
    --radius-lg: 1.25rem;
    --radius-xl: 1.75rem;

    --shadow-xs: 0 1px 2px rgb(15 23 42 / .05);
    --shadow-sm: 0 1px 3px rgb(15 23 42 / .07), 0 1px 2px rgb(15 23 42 / .04);
    --shadow: 0 4px 16px rgb(15 23 42 / .07), 0 1px 3px rgb(15 23 42 / .05);
    --shadow-lg: 0 18px 45px rgb(15 23 42 / .11), 0 4px 12px rgb(15 23 42 / .05);

    --container: 1180px;
    --gutter: 1.5rem;

    --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto,
            'Helvetica Neue', Arial, sans-serif;

    --ease: cubic-bezier(.22, .8, .36, 1);
}

/* ------------------------------------------------------- 2. Reset y base */
*, *::before, *::after { box-sizing: border-box; }

html {
    -webkit-text-size-adjust: 100%;
    scroll-behavior: smooth;
    scroll-padding-top: 6rem;
}

body {
    margin: 0;
    font-family: var(--font);
    font-size: 1rem;
    line-height: 1.65;
    color: var(--ink-soft);
    background: var(--surface);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

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

h1, h2, h3, h4 {
    margin: 0 0 .6em;
    color: var(--ink);
    font-weight: 700;
    line-height: 1.18;
    letter-spacing: -.021em;
}

h1 { font-size: clamp(2.1rem, 5vw, 3.4rem); }
h2 { font-size: clamp(1.65rem, 3.4vw, 2.4rem); }
h3 { font-size: clamp(1.15rem, 2vw, 1.4rem); }
h4 { font-size: 1.0625rem; }

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

a { color: var(--brand); text-decoration: none; transition: color .15s var(--ease); }
a:hover { color: var(--brand-dark); }

ul, ol { margin: 0 0 1rem; padding-left: 1.15rem; }

:focus-visible {
    outline: 3px solid rgb(79 70 229 / .45);
    outline-offset: 2px;
    border-radius: 4px;
}

.skip-link {
    position: absolute;
    left: -999px;
    top: 0;
    z-index: 999;
    padding: .75rem 1.25rem;
    background: var(--brand);
    color: #fff;
    border-radius: 0 0 var(--radius-sm) 0;
}
.skip-link:focus { left: 0; color: #fff; }

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; }
}

/* ------------------------------------------- 3. Utilidades de maquetación */
.container {
    width: 100%;
    max-width: var(--container);
    margin-inline: auto;
    padding-inline: var(--gutter);
}

.container--narrow { max-width: 820px; }

.section { padding-block: clamp(3.5rem, 7vw, 6rem); }
.section--tight { padding-block: clamp(2.5rem, 5vw, 4rem); }
.section--alt { background: var(--surface-alt); }
.section--brand { background: var(--brand-soft); }

.grid { display: grid; gap: 1.5rem; }
.grid--2 { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.grid--3 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.grid--4 { grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); }

.stack > * + * { margin-top: 1rem; }
.center { text-align: center; }
.mt-2 { margin-top: .5rem; }
.mt-4 { margin-top: 1rem; }
.mt-6 { margin-top: 1.5rem; }
.mt-8 { margin-top: 2rem; }

.visually-hidden {
    position: absolute; width: 1px; height: 1px;
    padding: 0; margin: -1px; overflow: hidden;
    clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* --------------------------------------------- 4. Tipografía de sección */
.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: .45rem;
    font-size: .75rem;
    font-weight: 700;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: var(--brand);
    margin-bottom: .85rem;
}

.eyebrow::before {
    content: '';
    width: 1.6rem;
    height: 2px;
    background: var(--accent);
    border-radius: 2px;
}

.section-head { max-width: 720px; margin-bottom: 2.75rem; }
.section-head--center { margin-inline: auto; text-align: center; }
.section-head--center .eyebrow { justify-content: center; }

.lead {
    font-size: clamp(1.02rem, 1.6vw, 1.15rem);
    color: var(--muted);
    line-height: 1.7;
}

.muted { color: var(--muted); }

/* -------------------------------------------------------- 5. Botones */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .5rem;
    padding: .8rem 1.5rem;
    font-family: inherit;
    font-size: .9375rem;
    font-weight: 600;
    line-height: 1.2;
    border: 1px solid transparent;
    border-radius: 999px;
    cursor: pointer;
    text-align: center;
    transition: transform .16s var(--ease), box-shadow .16s var(--ease),
                background-color .16s var(--ease), color .16s var(--ease);
}

.btn:active { transform: translateY(1px); }

.btn--primary {
    background: var(--brand);
    color: #fff;
    box-shadow: 0 6px 18px rgb(79 70 229 / .28);
}
.btn--primary:hover { background: var(--brand-dark); color: #fff; box-shadow: 0 10px 26px rgb(79 70 229 / .34); }

.btn--ghost {
    background: transparent;
    color: var(--ink);
    border-color: var(--line);
}
.btn--ghost:hover { background: var(--surface-alt); color: var(--ink); border-color: var(--muted-light); }

.btn--light { background: #fff; color: var(--brand-darker); }
.btn--light:hover { background: #f1f5ff; color: var(--brand-darker); }

.btn--outline-light { background: transparent; color: #fff; border-color: rgb(255 255 255 / .35); }
.btn--outline-light:hover { background: rgb(255 255 255 / .12); color: #fff; }

.btn--block { width: 100%; }
.btn--sm { padding: .55rem 1.1rem; font-size: .875rem; }

.btn-row { display: flex; flex-wrap: wrap; gap: .75rem; }

.link-arrow {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    font-weight: 600;
    font-size: .9375rem;
}
.link-arrow::after { content: '→'; transition: transform .16s var(--ease); }
.link-arrow:hover::after { transform: translateX(3px); }

/* -------------------------------------------- 6. Cabecera y navegación */
.site-header {
    position: sticky;
    top: 0;
    z-index: 60;
    background: rgb(255 255 255 / .88);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--line);
}

.site-header__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    min-height: 4.5rem;
}

.brand { display: inline-flex; align-items: center; gap: .6rem; }

.brand__mark {
    display: grid;
    place-items: center;
    width: 2.35rem;
    height: 2.35rem;
    border-radius: .7rem;
    background: linear-gradient(135deg, var(--brand) 0%, var(--accent) 100%);
    color: #fff;
    font-weight: 800;
    font-size: .95rem;
    letter-spacing: -.02em;
    flex: none;
}

.brand__text { display: flex; flex-direction: column; line-height: 1.1; }
.brand__name { font-weight: 800; font-size: 1.05rem; color: var(--ink); letter-spacing: -.02em; }
.brand__tag { font-size: .6875rem; color: var(--muted); letter-spacing: .02em; }

.nav { display: flex; align-items: center; gap: .25rem; }

.nav a {
    padding: .5rem .8rem;
    font-size: .9375rem;
    font-weight: 500;
    color: var(--ink-soft);
    border-radius: var(--radius-sm);
}
.nav a:hover { background: var(--surface-alt); color: var(--brand); }
.nav a[aria-current="page"] { color: var(--brand); font-weight: 600; }

/* Seguimiento de expediente: botón sutil, secundario frente al CTA principal
   pero visualmente separado del resto de enlaces del menú. */
.nav a.nav__track {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    margin-left: .4rem;
    padding: .5rem .85rem;
    font-weight: 600;
    color: var(--brand-dark);
    background: var(--brand-soft);
    border: 1px solid rgb(79 70 229 / .18);
    border-radius: 999px;
    white-space: nowrap;
    transition: background .18s var(--ease), border-color .18s var(--ease),
                box-shadow .18s var(--ease), color .18s var(--ease);
}

.nav a.nav__track:hover {
    background: #fff;
    color: var(--brand-dark);
    border-color: var(--brand);
    box-shadow: 0 4px 14px rgb(79 70 229 / .16);
}

.nav a.nav__track[aria-current="page"] {
    background: #fff;
    border-color: var(--brand);
    color: var(--brand-dark);
}

.nav__track-icon {
    display: inline-flex;
    color: var(--brand);
}
.nav__track-icon svg { width: 1.05rem; height: 1.05rem; }

.header-actions { display: flex; align-items: center; gap: .6rem; }

.nav-toggle {
    display: none;
    width: 2.6rem;
    height: 2.6rem;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    cursor: pointer;
}

.nav-toggle span {
    display: block;
    position: relative;
    width: 1.1rem;
    height: 2px;
    background: var(--ink);
    border-radius: 2px;
}
.nav-toggle span::before,
.nav-toggle span::after {
    content: '';
    position: absolute;
    left: 0;
    width: 1.1rem;
    height: 2px;
    background: var(--ink);
    border-radius: 2px;
}
.nav-toggle span::before { top: -6px; }
.nav-toggle span::after { top: 6px; }

/* ------------------------------------------------------------ 7. Hero */
.hero {
    position: relative;
    overflow: hidden;
    background:
        radial-gradient(1100px 520px at 82% -8%, rgb(6 182 212 / .16), transparent 62%),
        radial-gradient(900px 480px at 8% 0%, rgb(79 70 229 / .13), transparent 58%),
        var(--surface);
    padding-block: clamp(3.25rem, 7vw, 6rem);
}

.hero__grid {
    display: grid;
    grid-template-columns: 1.08fr .92fr;
    gap: clamp(2rem, 5vw, 4rem);
    align-items: center;
}

.hero__title { margin-bottom: 1.1rem; }
.hero__title em { font-style: normal; color: var(--brand); }

.hero__text {
    font-size: clamp(1.02rem, 1.7vw, 1.15rem);
    color: var(--muted);
    max-width: 34rem;
    margin-bottom: 1.85rem;
}

.hero__stats {
    display: flex;
    flex-wrap: wrap;
    gap: 2.25rem;
    margin-top: 2.75rem;
    padding-top: 1.85rem;
    border-top: 1px solid var(--line);
}

.hero__stat-value {
    display: block;
    font-size: 1.65rem;
    font-weight: 800;
    color: var(--ink);
    letter-spacing: -.02em;
}
.hero__stat-label { font-size: .8125rem; color: var(--muted); }

/* Panel ilustrativo: una vista simplificada del CRM, sin iconografía jurídica. */
.hero__panel {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-lg);
    overflow: hidden;
}

.hero__panel-bar {
    display: flex;
    align-items: center;
    gap: .4rem;
    padding: .8rem 1rem;
    background: var(--surface-alt);
    border-bottom: 1px solid var(--line);
}

.hero__panel-dot { width: .6rem; height: .6rem; border-radius: 999px; background: var(--line); }
.hero__panel-title { margin-left: .5rem; font-size: .75rem; font-weight: 600; color: var(--muted); }

.hero__panel-body { padding: 1.1rem; display: grid; gap: .7rem; }

.hero__row {
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: .75rem;
    align-items: center;
    padding: .75rem .85rem;
    background: var(--surface-alt);
    border: 1px solid var(--line);
    border-radius: var(--radius);
}

.hero__row-code {
    font-size: .6875rem;
    font-weight: 700;
    color: var(--brand);
    font-variant-numeric: tabular-nums;
}
.hero__row-title { font-size: .8125rem; font-weight: 600; color: var(--ink); }
.hero__row-sub { font-size: .6875rem; color: var(--muted); }

.pill {
    display: inline-flex;
    align-items: center;
    padding: .15rem .55rem;
    font-size: .625rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .04em;
    border-radius: 999px;
    white-space: nowrap;
}
.pill--brand { background: var(--brand-soft); color: var(--brand-dark); }
.pill--success { background: #dcfce7; color: #15803d; }
.pill--warning { background: #fef3c7; color: #b45309; }
.pill--danger { background: #fee2e2; color: #b91c1c; }
.pill--accent { background: var(--accent-soft); color: #0e7490; }
.pill--muted { background: var(--line-soft); color: var(--muted); }

/* Franja de confianza bajo el hero */
.trustbar {
    border-block: 1px solid var(--line);
    background: var(--surface-alt);
    padding-block: 1.15rem;
}
.trustbar__items {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem 2.5rem;
    justify-content: center;
    font-size: .875rem;
    color: var(--muted);
}
.trustbar__item { display: inline-flex; align-items: center; gap: .5rem; }
.trustbar__item::before { content: '✓'; color: var(--success); font-weight: 800; }

/* ----------------------------------------------------------- 8. Tarjetas */
.card {
    display: flex;
    flex-direction: column;
    padding: 1.6rem;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    transition: transform .18s var(--ease), box-shadow .18s var(--ease), border-color .18s var(--ease);
}

.card:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: #cbd5e1; }

.card__icon {
    display: grid;
    place-items: center;
    width: 2.9rem;
    height: 2.9rem;
    margin-bottom: 1.1rem;
    border-radius: .8rem;
    background: var(--brand-soft);
    color: var(--brand);
    flex: none;
}
.card__icon svg { width: 1.4rem; height: 1.4rem; }

.card h3 { margin-bottom: .5rem; }
.card p { color: var(--muted); font-size: .9375rem; }

.card__meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .75rem;
    margin-top: 1.15rem;
    padding-top: 1rem;
    border-top: 1px solid var(--line-soft);
    font-size: .8125rem;
    color: var(--muted);
}

.card__price { font-weight: 700; color: var(--ink); }

/* Áreas legales */
.area-card { border-left: 3px solid var(--area-color, var(--brand)); }
.area-card .card__icon { background: color-mix(in srgb, var(--area-color, var(--brand)) 12%, transparent); color: var(--area-color, var(--brand)); }

/* Beneficios */
.benefit {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 1rem;
    align-items: start;
}
.benefit__icon {
    display: grid;
    place-items: center;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: .7rem;
    background: var(--accent-soft);
    color: #0e7490;
    flex: none;
}
.benefit__icon svg { width: 1.25rem; height: 1.25rem; }
.benefit h4 { margin-bottom: .25rem; }
.benefit p { font-size: .9375rem; color: var(--muted); margin: 0; }

/* Planes */
.plans { display: grid; gap: 1.5rem; grid-template-columns: repeat(auto-fit, minmax(285px, 1fr)); align-items: start; }

.plan {
    position: relative;
    display: flex;
    flex-direction: column;
    padding: 1.9rem 1.6rem;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    transition: transform .18s var(--ease), box-shadow .18s var(--ease);
}
.plan:hover { transform: translateY(-3px); box-shadow: var(--shadow); }

.plan--featured {
    border-color: var(--brand);
    box-shadow: 0 16px 40px rgb(79 70 229 / .16);
}

.plan__flag {
    position: absolute;
    top: -.7rem;
    left: 50%;
    transform: translateX(-50%);
    padding: .2rem .8rem;
    font-size: .6875rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .05em;
    color: #fff;
    background: var(--brand);
    border-radius: 999px;
    white-space: nowrap;
}

.plan__name { font-size: 1.2rem; margin-bottom: .3rem; }
.plan__desc { font-size: .875rem; color: var(--muted); min-height: 2.6rem; margin-bottom: 1.15rem; }

.plan__price {
    display: flex;
    align-items: baseline;
    gap: .3rem;
    margin-bottom: 1.35rem;
    padding-bottom: 1.35rem;
    border-bottom: 1px solid var(--line-soft);
}
.plan__amount { font-size: 2.35rem; font-weight: 800; color: var(--ink); letter-spacing: -.03em; }
.plan__period { font-size: .875rem; color: var(--muted); }

.plan__features { list-style: none; margin: 0 0 1.6rem; padding: 0; display: grid; gap: .6rem; flex: 1; }
.plan__features li {
    position: relative;
    padding-left: 1.6rem;
    font-size: .9rem;
    color: var(--ink-soft);
    line-height: 1.5;
}
.plan__features li::before {
    content: '✓';
    position: absolute;
    left: 0;
    top: -1px;
    color: var(--success);
    font-weight: 800;
}

/* Paquetes */
.pack {
    display: flex;
    flex-direction: column;
    padding: 1.5rem;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    transition: transform .18s var(--ease), box-shadow .18s var(--ease);
}
.pack:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.pack__qty { font-size: 1.8rem; font-weight: 800; color: var(--brand); letter-spacing: -.02em; }
.pack__name { font-size: .9375rem; font-weight: 600; color: var(--ink); margin-bottom: .5rem; }
.pack__price { font-size: 1.15rem; font-weight: 700; color: var(--ink); }

/* Testimonios */
.quote {
    display: flex;
    flex-direction: column;
    padding: 1.7rem;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
}
.quote__stars { color: var(--warning); letter-spacing: .1em; font-size: .9rem; margin-bottom: .85rem; }
.quote__text { font-size: .9375rem; color: var(--ink-soft); line-height: 1.65; flex: 1; }
.quote__author { margin-top: 1.15rem; padding-top: 1rem; border-top: 1px solid var(--line-soft); }
.quote__name { font-weight: 700; font-size: .9rem; color: var(--ink); }
.quote__role { font-size: .8125rem; color: var(--muted); }

/* ---------------------------------------------------------- 9. Proceso */
/* Los pasos van en una sola fila mientras haya ancho; al estrecharse la
   pantalla se reparten en varias filas y, en móvil, quedan uno bajo otro con
   el icono al costado. La línea que une los pasos solo se dibuja cuando la
   fila es única (ver los @media del final de este bloque). */
.process {
    --step-gap: 1.5rem;
    --step-badge: 3.5rem;

    display: grid;
    /* --step-count lo inyecta la vista: así la fila reparte el ancho entre
       los pasos que realmente estén publicados. */
    grid-template-columns: repeat(var(--step-count, 5), minmax(0, 1fr));
    gap: var(--step-gap);
    margin: 0;
    padding: calc(var(--step-badge) / 2) 0 0;
    list-style: none;
}

.step {
    /* Cada paso avanza en la gama de marca: índigo → azul → cian → verde. */
    --step-from: var(--brand);
    --step-to: var(--brand-dark);

    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: calc(var(--step-badge) / 2 + 1.4rem) 1.25rem 1.6rem;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xs);
    transition: box-shadow .2s var(--ease), border-color .2s var(--ease);
}

.step:nth-child(5n + 1) { --step-from: #4f46e5; --step-to: #6366f1; }
.step:nth-child(5n + 2) { --step-from: #4f46e5; --step-to: #3b82f6; }
.step:nth-child(5n + 3) { --step-from: #3b82f6; --step-to: #06b6d4; }
.step:nth-child(5n + 4) { --step-from: #06b6d4; --step-to: #14b8a6; }
.step:nth-child(5n)     { --step-from: #10b981; --step-to: #22c55e; }

/* Barra de color inferior: se mete hasta donde empieza la curva de la
   esquina para que no asome fuera del borde redondeado. */
.step::after {
    content: "";
    position: absolute;
    right: var(--radius-lg);
    bottom: 0;
    left: var(--radius-lg);
    height: 3px;
    border-radius: 999px 999px 0 0;
    background: linear-gradient(90deg, var(--step-from), var(--step-to));
    transition: height .2s var(--ease);
}

.step:hover {
    border-color: color-mix(in srgb, var(--step-from) 32%, var(--line));
    box-shadow: var(--shadow-lg);
}

.step:hover::after { height: 5px; }

.step__badge {
    position: absolute;
    top: calc(var(--step-badge) / -2);
    left: 50%;
    display: grid;
    place-items: center;
    width: var(--step-badge);
    height: var(--step-badge);
    border-radius: 50%;
    background: var(--surface);
    border: 1px solid var(--line);
    box-shadow: var(--shadow-sm);
    color: var(--step-from);
    transform: translateX(-50%);
    transition: box-shadow .2s var(--ease), border-color .2s var(--ease), transform .2s var(--ease);
}

.step:hover .step__badge {
    border-color: color-mix(in srgb, var(--step-from) 38%, var(--line));
    box-shadow: var(--shadow);
    transform: translateX(-50%) translateY(-3px);
}

.step__icon { display: grid; place-items: center; }
.step__icon svg { width: 1.55rem; height: 1.55rem; }

.step__num {
    position: absolute;
    top: -.3rem;
    left: -.3rem;
    display: grid;
    place-items: center;
    min-width: 1.45rem;
    height: 1.45rem;
    padding: 0 .32rem;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--step-from), var(--step-to));
    color: #fff;
    font-size: .75rem;
    font-weight: 800;
    line-height: 1;
    box-shadow: 0 2px 6px color-mix(in srgb, var(--step-from) 40%, transparent);
}

.step__title { margin: 0 0 .4rem; font-size: 1rem; }
.step__text { margin: 0; font-size: .875rem; color: var(--muted); }

/* Línea de conexión entre pasos: nace en el borde del icono y llega al
   siguiente, cruzando el hueco de la rejilla. */
.step::before {
    content: "";
    position: absolute;
    top: 0;
    left: calc(50% + var(--step-badge) / 2 + .5rem);
    width: calc(100% + var(--step-gap) - var(--step-badge) - 1rem);
    height: 2px;
    border-radius: 2px;
    transform: translateY(-1px);
    background: linear-gradient(
        90deg,
        color-mix(in srgb, var(--step-from) 55%, transparent),
        color-mix(in srgb, var(--step-to) 22%, transparent)
    );
}

.step:last-child::before { content: none; }

/* Ya no cabe una sola fila: los pasos bajan y se reparten en varias.
   La línea se oculta porque uniría pasos de filas distintas. */
@media (max-width: 1060px) {
    .process {
        grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr));
        row-gap: calc(var(--step-gap) + var(--step-badge) / 2);
    }

    .step::before { content: none; }
}

/* Móvil: un paso por fila, icono a la izquierda para no gastar alto. */
@media (max-width: 700px) {
    .process {
        --step-badge: 2.75rem;

        grid-template-columns: 1fr;
        gap: .85rem;
        padding-top: 0;
    }

    .step {
        display: grid;
        grid-template-columns: auto 1fr;
        align-items: start;
        column-gap: .9rem;
        padding: 1.1rem 1.15rem 1.35rem;
        text-align: left;
    }

    .step__badge {
        position: relative;
        top: auto;
        left: auto;
        transform: none;
    }

    .step:hover .step__badge { transform: translateY(-2px); }

    .step__icon svg { width: 1.3rem; height: 1.3rem; }
    .step__num { min-width: 1.3rem; height: 1.3rem; font-size: .6875rem; }

    .step__body { min-width: 0; }
    .step__title { margin-bottom: .3rem; }
}

/* ------------------------------------------------------------- 10. FAQ */
.faq-list { display: grid; gap: .75rem; }

.faq {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    overflow: hidden;
}

.faq summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1.1rem 1.35rem;
    font-weight: 600;
    font-size: .9688rem;
    color: var(--ink);
    cursor: pointer;
    list-style: none;
}
.faq summary::-webkit-details-marker { display: none; }

.faq summary::after {
    content: '+';
    font-size: 1.35rem;
    font-weight: 400;
    color: var(--brand);
    line-height: 1;
    flex: none;
    transition: transform .18s var(--ease);
}
.faq[open] summary::after { transform: rotate(45deg); }
.faq[open] summary { border-bottom: 1px solid var(--line-soft); }

.faq__body { padding: 1.1rem 1.35rem; font-size: .9375rem; color: var(--muted); }

.faq-group__title {
    font-size: .75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .09em;
    color: var(--muted-light);
    margin: 2rem 0 .85rem;
}
.faq-group__title:first-child { margin-top: 0; }

/* ------------------------------------------------------- 11. Formularios */
.form-card {
    padding: clamp(1.5rem, 3vw, 2.25rem);
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
}

.form-grid { display: grid; gap: 1.1rem; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); }
.form-field { display: flex; flex-direction: column; gap: .4rem; }
.form-field--full { grid-column: 1 / -1; }

.form-field label { font-size: .8125rem; font-weight: 600; color: var(--ink); }
.form-field .req { color: var(--danger); }

.form-field input,
.form-field select,
.form-field textarea {
    width: 100%;
    padding: .75rem .9rem;
    font-family: inherit;
    font-size: .9375rem;
    color: var(--ink);
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    transition: border-color .15s var(--ease), box-shadow .15s var(--ease);
}

.form-field textarea { resize: vertical; min-height: 7rem; }

.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus {
    outline: none;
    border-color: var(--brand);
    box-shadow: 0 0 0 3px rgb(79 70 229 / .14);
}

.form-field input[aria-invalid="true"],
.form-field textarea[aria-invalid="true"] { border-color: var(--danger); }

.field-error { font-size: .8125rem; color: var(--danger); }

.form-hint { font-size: .8125rem; color: var(--muted); }

.alert {
    padding: .95rem 1.15rem;
    border-radius: var(--radius);
    font-size: .9375rem;
    margin-bottom: 1.35rem;
    border: 1px solid transparent;
}
.alert--success { background: #ecfdf5; border-color: #a7f3d0; color: #065f46; }
.alert--error { background: #fef2f2; border-color: #fecaca; color: #991b1b; }
.alert--info { background: var(--brand-soft); border-color: #c7d2fe; color: var(--brand-darker); }

/* Bloque de contacto */
.contact-grid { display: grid; grid-template-columns: 1fr 1.35fr; gap: clamp(1.75rem, 4vw, 3.25rem); align-items: start; }

.contact-item { display: grid; grid-template-columns: auto 1fr; gap: .9rem; align-items: start; margin-bottom: 1.5rem; }
.contact-item__icon {
    display: grid; place-items: center;
    width: 2.4rem; height: 2.4rem;
    border-radius: .65rem;
    background: var(--brand-soft);
    color: var(--brand);
    flex: none;
}
.contact-item__icon svg { width: 1.15rem; height: 1.15rem; }
.contact-item__label { font-size: .75rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--muted-light); }
.contact-item__value { font-size: .9375rem; color: var(--ink); font-weight: 500; }

/* ------------------------------------------------------------ 12. Blog */
.post-grid { display: grid; gap: 1.75rem; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }

.post-card {
    display: flex;
    flex-direction: column;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: transform .18s var(--ease), box-shadow .18s var(--ease);
}
.post-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }

.post-card__media {
    aspect-ratio: 16 / 9;
    background: linear-gradient(135deg, var(--brand-soft) 0%, var(--accent-soft) 100%);
    display: grid;
    place-items: center;
    overflow: hidden;
}
.post-card__media img { width: 100%; height: 100%; object-fit: cover; }
.post-card__media-mark { font-size: 1.9rem; font-weight: 800; color: rgb(79 70 229 / .28); letter-spacing: -.03em; }

.post-card__body { display: flex; flex-direction: column; flex: 1; padding: 1.35rem; }
.post-card__meta { display: flex; flex-wrap: wrap; align-items: center; gap: .55rem; font-size: .75rem; color: var(--muted); margin-bottom: .7rem; }
.post-card__title { font-size: 1.075rem; line-height: 1.35; margin-bottom: .55rem; }
.post-card__title a { color: var(--ink); }
.post-card__title a:hover { color: var(--brand); }
.post-card__excerpt { font-size: .9rem; color: var(--muted); flex: 1; }
.post-card__foot { margin-top: 1.1rem; padding-top: .9rem; border-top: 1px solid var(--line-soft); font-size: .8125rem; }

.chip-row { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: 2rem; }

.chip {
    padding: .4rem .95rem;
    font-size: .8125rem;
    font-weight: 600;
    color: var(--ink-soft);
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 999px;
    transition: all .15s var(--ease);
}
.chip:hover { border-color: var(--brand); color: var(--brand); }
.chip[aria-current="true"] { background: var(--brand); border-color: var(--brand); color: #fff; }

.search-bar { display: flex; gap: .6rem; margin-bottom: 1.5rem; }
.search-bar input {
    flex: 1;
    padding: .75rem 1rem;
    font-family: inherit;
    font-size: .9375rem;
    border: 1px solid var(--line);
    border-radius: 999px;
}
.search-bar input:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px rgb(79 70 229 / .14); }

/* Artículo */
.article-hero { padding-block: clamp(2.5rem, 5vw, 4rem) 1.5rem; background: var(--surface-alt); border-bottom: 1px solid var(--line); }
.article-meta { display: flex; flex-wrap: wrap; gap: .75rem; align-items: center; font-size: .875rem; color: var(--muted); margin-bottom: 1rem; }

.article-figure { margin: 0 0 2rem; border-radius: var(--radius-lg); overflow: hidden; border: 1px solid var(--line); }

.prose { font-size: 1.0625rem; line-height: 1.78; color: var(--ink-soft); }
.prose h2 { margin-top: 2.5rem; font-size: 1.55rem; }
.prose h3 { margin-top: 2rem; font-size: 1.25rem; }
.prose p { margin-bottom: 1.35rem; }
.prose ul, .prose ol { margin-bottom: 1.35rem; padding-left: 1.35rem; }
.prose li { margin-bottom: .5rem; }
.prose blockquote {
    margin: 2rem 0;
    padding: 1rem 1.5rem;
    border-left: 3px solid var(--brand);
    background: var(--brand-soft);
    border-radius: 0 var(--radius) var(--radius) 0;
    color: var(--ink-soft);
}
.prose img { border-radius: var(--radius); margin-block: 1.75rem; }
.prose a { text-decoration: underline; text-underline-offset: 2px; }

.share-row { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem; margin-top: 2.5rem; padding-top: 1.75rem; border-top: 1px solid var(--line); }
.share-label { font-size: .8125rem; font-weight: 600; color: var(--muted); margin-right: .25rem; }

.share-btn {
    display: inline-grid;
    place-items: center;
    width: 2.3rem;
    height: 2.3rem;
    border-radius: 999px;
    border: 1px solid var(--line);
    color: var(--muted);
    background: var(--surface);
    transition: all .15s var(--ease);
    cursor: pointer;
}
.share-btn:hover { border-color: var(--brand); color: var(--brand); background: var(--brand-soft); }
.share-btn svg { width: 1.05rem; height: 1.05rem; }

.source-note {
    display: flex;
    align-items: center;
    gap: .6rem;
    margin-top: 1.75rem;
    padding: .85rem 1.1rem;
    font-size: .8438rem;
    background: var(--surface-alt);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    color: var(--muted);
}

/* Paginación */
.pagination { display: flex; flex-wrap: wrap; gap: .4rem; justify-content: center; margin-top: 3rem; list-style: none; padding: 0; }
.pagination a, .pagination span {
    display: grid;
    place-items: center;
    min-width: 2.4rem;
    height: 2.4rem;
    padding-inline: .6rem;
    font-size: .875rem;
    font-weight: 600;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    color: var(--ink-soft);
    background: var(--surface);
}
.pagination a:hover { border-color: var(--brand); color: var(--brand); }
.pagination .active span, .pagination [aria-current="page"] span { background: var(--brand); border-color: var(--brand); color: #fff; }
.pagination .disabled span { color: var(--muted-light); background: var(--surface-alt); }

/* ------------------------------------------------ 13. Consulta de casos */
.lookup { max-width: 640px; margin-inline: auto; }

.lookup-result {
    margin-top: 2rem;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    overflow: hidden;
}

.lookup-result__head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1.35rem 1.6rem;
    background: linear-gradient(135deg, var(--brand-darker) 0%, var(--brand) 100%);
    color: #fff;
}
.lookup-result__code { font-size: 1.35rem; font-weight: 800; letter-spacing: -.01em; }
.lookup-result__label { font-size: .75rem; opacity: .82; text-transform: uppercase; letter-spacing: .08em; }

.lookup-result__body { padding: 1.6rem; display: grid; gap: 1.35rem; }

.lookup-row { display: grid; grid-template-columns: 11rem 1fr; gap: 1rem; align-items: start; }
.lookup-row__label { font-size: .8125rem; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }
.lookup-row__value { font-size: .9688rem; color: var(--ink); }

.lookup-next {
    padding: 1.1rem 1.35rem;
    background: var(--brand-soft);
    border-radius: var(--radius);
    border-left: 3px solid var(--brand);
}
.lookup-next__label { font-size: .75rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--brand-dark); margin-bottom: .3rem; }

.lookup-timeline { border-top: 1px solid var(--line); padding-top: 1.35rem; }
.lookup-timeline__label { font-size: .8125rem; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; margin-bottom: 1.1rem; }

/* Cada hito cuelga de una línea vertical dibujada con el borde del <li>. */
.timeline { list-style: none; margin: 0; padding: 0; }

.timeline__item {
    position: relative;
    padding: 0 0 1.15rem 1.65rem;
    border-left: 2px solid var(--line);
}
.timeline__item:last-child { padding-bottom: 0; border-left-color: transparent; }

.timeline__dot {
    position: absolute;
    left: -.4rem;
    top: .2rem;
    width: .7rem;
    height: .7rem;
    border-radius: 50%;
    background: var(--dot, var(--brand));
    box-shadow: 0 0 0 3px var(--surface);
}
.timeline__item--current .timeline__dot { box-shadow: 0 0 0 3px var(--surface), 0 0 0 6px color-mix(in srgb, var(--dot, var(--brand)) 25%, transparent); }

.timeline__title { font-size: .9375rem; font-weight: 600; color: var(--ink); display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; }
.timeline__meta { font-size: .8125rem; color: var(--muted); margin-top: .15rem; }

.timeline__now {
    font-size: .6875rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .05em;
    padding: .15rem .5rem;
    border-radius: 999px;
    background: var(--brand-soft);
    color: var(--brand-dark);
}

.privacy-note { font-size: .8125rem; color: var(--muted); text-align: center; margin-top: 1.5rem; }

/* --------------------------------------------------------- 14. CTA y pie */
.cta {
    position: relative;
    overflow: hidden;
    padding-block: clamp(3rem, 6vw, 4.75rem);
    background:
        radial-gradient(700px 320px at 15% 15%, rgb(6 182 212 / .3), transparent 60%),
        linear-gradient(135deg, var(--brand-darker) 0%, var(--brand) 100%);
    color: #fff;
    text-align: center;
}
.cta h2 { color: #fff; }
.cta p { color: rgb(255 255 255 / .84); max-width: 38rem; margin-inline: auto; }
.cta .btn-row { justify-content: center; margin-top: 1.85rem; }

.site-footer {
    padding-block: 3.25rem 1.75rem;
    background: var(--surface-deep);
    color: #cbd5e1;
    font-size: .9rem;
}

.footer-grid {
    display: grid;
    gap: 2.25rem;
    grid-template-columns: 1.6fr repeat(3, 1fr);
    padding-bottom: 2.25rem;
    border-bottom: 1px solid rgb(255 255 255 / .1);
}

.site-footer .brand__name { color: #fff; }
.site-footer .brand__tag { color: #94a3b8; }
.site-footer p { color: #94a3b8; font-size: .875rem; }

.footer-title {
    font-size: .75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .08em;
    color: #fff;
    margin-bottom: .95rem;
}

.footer-links { list-style: none; margin: 0; padding: 0; display: grid; gap: .55rem; }
.footer-links a { color: #cbd5e1; font-size: .875rem; }
.footer-links a:hover { color: #fff; }

.footer-social { display: flex; gap: .55rem; margin-top: 1.25rem; }
.footer-social a {
    display: grid;
    place-items: center;
    width: 2.2rem;
    height: 2.2rem;
    border-radius: 999px;
    background: rgb(255 255 255 / .08);
    color: #e2e8f0;
    transition: background-color .15s var(--ease);
}
.footer-social a:hover { background: var(--brand); color: #fff; }
.footer-social svg { width: 1.05rem; height: 1.05rem; }

.footer-bottom {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: .75rem;
    padding-top: 1.5rem;
    font-size: .8125rem;
    color: #64748b;
}

/* Botón flotante de WhatsApp */
.wa-float {
    position: fixed;
    right: 1.25rem;
    bottom: 1.25rem;
    z-index: 50;
    display: grid;
    place-items: center;
    width: 3.4rem;
    height: 3.4rem;
    border-radius: 999px;
    background: #25d366;
    color: #fff;
    box-shadow: 0 8px 24px rgb(37 211 102 / .4);
    transition: transform .16s var(--ease);
}
.wa-float:hover { transform: scale(1.07); color: #fff; }
.wa-float svg { width: 1.7rem; height: 1.7rem; }

/* ------------------------------------------------------- 15. Responsive */
@media (max-width: 980px) {
    .hero__grid { grid-template-columns: 1fr; }
    /* En una sola columna manda el mensaje: primero el titular y el CTA,
       después el panel ilustrativo. */
    .hero__panel { max-width: 520px; margin-inline: auto; }
    .contact-grid { grid-template-columns: 1fr; }
    .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 820px) {
    .nav-toggle { display: inline-flex; }

    .nav {
        position: fixed;
        inset: 4.5rem 0 auto;
        flex-direction: column;
        align-items: stretch;
        gap: .1rem;
        padding: 1rem var(--gutter) 1.5rem;
        background: var(--surface);
        border-bottom: 1px solid var(--line);
        box-shadow: var(--shadow);
        transform: translateY(-130%);
        transition: transform .22s var(--ease);
        max-height: calc(100vh - 4.5rem);
        overflow-y: auto;
    }

    .nav[data-open="true"] { transform: translateY(0); }
    .nav a { padding: .8rem .5rem; border-radius: var(--radius-sm); }

    .nav a.nav__track {
        justify-content: center;
        margin: .6rem 0 0;
        padding: .8rem 1rem;
    }

    .header-actions .btn { display: none; }
    .header-actions .nav-toggle { display: inline-flex; }
}

@media (max-width: 560px) {
    .footer-grid { grid-template-columns: 1fr; }
    .lookup-row { grid-template-columns: 1fr; gap: .2rem; }
    .hero__stats { gap: 1.5rem; }
    .btn-row .btn { width: 100%; }
}

@media print {
    .site-header, .site-footer, .wa-float, .cta, .btn { display: none !important; }
    body { color: #000; }
}
