/* =====================================================================
   site.css — Sistema de diseño HappyPath · "Enterprise Minimalist"
   Basado en ui-ux-pro-max (patrón Trust & Authority + Conversion, estilo
   Bento Box Grid, pareja tipográfica Tech Startup) y adaptado a la marca.
   Bootstrap 3 se conserva solo para la rejilla, el menú colapsable y los tabs.
   Contraste verificado: texto ≥ 7:1 (AAA), acentos y botones ≥ 4.5:1 (AA).
   ===================================================================== */

/* ---------- 1. Tokens ---------- */
:root {
    /* Color */
    --hp-bg: #f8fafc;
    --hp-surface: #ffffff;
    --hp-ink: #0f172a;            /* 17:1 sobre --hp-bg */
    --hp-ink-2: #334155;          /* texto de lectura, 10:1 */
    --hp-muted: #475569;          /* 7.2:1 sobre --hp-bg (AAA) */
    --hp-border: #e2e8f0;
    --hp-border-strong: #cbd5e1;
    --hp-accent: #0072c6;         /* azul de marca accesible, 5:1 con blanco */
    --hp-accent-strong: #005a9e;  /* hover y texto pequeño en acento, 7.1:1 */
    --hp-accent-soft: #e0f2fe;
    --hp-accent-tint: #f0f9ff;
    --hp-sky: #7dd3fc;            /* acento sobre navy, 10.7:1 */
    --hp-lime: #a5c058;           /* verde de marca: decorativo o sobre navy (8.7:1) */
    --hp-lime-soft: #ecfccb;
    --hp-lime-ink: #3f6212;       /* 6.5:1 sobre --hp-lime-soft */
    --hp-navy: #0f172a;
    --hp-navy-2: #020617;
    --hp-on-navy-muted: #cbd5e1;  /* 12:1 sobre navy */
    --hp-whatsapp: #0b7a4b;       /* 5.4:1 con blanco */
    --hp-whatsapp-strong: #075e54;
    --hp-danger: #b91c1c;
    --hp-success: #15803d;

    /* Tipografía */
    --hp-font-display: 'Space Grotesk', 'Segoe UI', system-ui, sans-serif;
    --hp-font-body: 'DM Sans', 'Segoe UI', system-ui, sans-serif;
    --hp-font-mono: 'JetBrains Mono', ui-monospace, 'SFMono-Regular', Consolas, monospace;

    /* Espaciado (escala de 4/8) y forma */
    --hp-space-4: 16px;
    --hp-space-5: 24px;
    --hp-space-6: 32px;
    --hp-space-7: 48px;
    --hp-space-8: 64px;
    --hp-space-9: 96px;
    --hp-radius: 16px;
    --hp-radius-lg: 24px;
    --hp-shadow-sm: 0 1px 2px rgba(15, 23, 42, .06), 0 1px 3px rgba(15, 23, 42, .04);
    --hp-shadow: 0 4px 6px -1px rgba(15, 23, 42, .06), 0 2px 4px -2px rgba(15, 23, 42, .05);
    --hp-shadow-lg: 0 20px 40px -12px rgba(15, 23, 42, .18);

    /* Movimiento: entrada con desaceleración, duraciones por distancia */
    --hp-ease: cubic-bezier(.2, .8, .2, 1);
    --hp-fast: 150ms;
    --hp-base: 220ms;
    --hp-slow: 450ms;

    --hp-header-h: 72px;
}

/* ---------- 2. Base ---------- */
html { font-size: 16px; -webkit-text-size-adjust: 100%; } /* Bootstrap 3 lo fija en 10px y encogería todos los rem */ /* sin scroll-behavior: smooth, chocaría con las animaciones de jQuery */
body {
    margin: 0;
    background: var(--hp-bg);
    color: var(--hp-ink-2);
    font-family: var(--hp-font-body);
    font-size: 16px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4, h5, h6, .h1, .h2, .h3, .h4 {
    margin-top: 0;
    font-family: var(--hp-font-display);
    font-weight: 700;
    line-height: 1.15;
    letter-spacing: -.02em;
    color: var(--hp-ink);
}
p { margin: 0 0 var(--hp-space-4); }
a { color: var(--hp-accent); text-decoration: none; transition: color var(--hp-fast) var(--hp-ease); }
a:hover, a:focus { color: var(--hp-accent-strong); text-decoration: underline; text-underline-offset: 3px; }
img { max-width: 100%; height: auto; }
::selection { background: var(--hp-accent-soft); color: var(--hp-ink); }

.container { padding-left: 20px; padding-right: 20px; }
/* El clearfix de Bootstrap (.container::before/::after) se vuelve una celda más dentro de grid/flex */
.hero__grid::before, .hero__grid::after,
.about__grid::before, .about__grid::after,
.contact__grid::before, .contact__grid::after,
.service-layout::before, .service-layout::after,
.site-header__bar::before, .site-header__bar::after { content: none; display: none; }
@media (min-width: 1200px) { .container { width: 1200px; } }

section[id] { scroll-margin-top: calc(var(--hp-header-h) + 8px); }

/* Foco visible (WCAG 2.2) */
:focus-visible { outline: 3px solid var(--hp-accent); outline-offset: 2px; border-radius: 4px; }
.contact :focus-visible, .site-footer :focus-visible, .bento-card--feature :focus-visible { outline-color: var(--hp-sky); }

.skip-link {
    position: absolute;
    left: 16px;
    top: -60px;
    z-index: 3000;
    padding: 10px 16px;
    border-radius: 10px;
    background: var(--hp-ink);
    color: #fff;
    font-weight: 600;
    transition: top var(--hp-fast) var(--hp-ease);
}
.skip-link:focus { top: 12px; color: #fff; }

.text-accent { color: var(--hp-accent); }

/* ---------- 3. Botones (microinteracciones: elevación, flecha que avanza, presión) ---------- */
.btn-hp {
    --btn-bg: var(--hp-accent);
    --btn-bg-hover: var(--hp-accent-strong);
    --btn-fg: #fff;
    --btn-border: transparent;
    --btn-glow: rgba(0, 114, 198, .45);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 48px;
    padding: 12px 22px;
    border: 1px solid var(--btn-border);
    border-radius: 999px;
    background: var(--btn-bg);
    color: var(--btn-fg);
    font-family: var(--hp-font-body);
    font-size: 16px;
    font-weight: 600;
    line-height: 1.2;
    text-align: center;
    cursor: pointer;
    box-shadow: var(--hp-shadow-sm);
    transition: background-color var(--hp-base) var(--hp-ease), color var(--hp-base) var(--hp-ease),
                border-color var(--hp-base) var(--hp-ease), box-shadow var(--hp-base) var(--hp-ease),
                transform var(--hp-fast) var(--hp-ease);
    touch-action: manipulation;
}
.btn-hp:hover, .btn-hp:focus {
    background: var(--btn-bg-hover);
    color: var(--btn-fg);
    text-decoration: none;
    box-shadow: 0 8px 20px -6px var(--btn-glow);
    transform: translateY(-1px);
}
.btn-hp:active { transform: translateY(0) scale(.98); box-shadow: var(--hp-shadow-sm); }
.btn-hp .icon { width: 20px; height: 20px; flex: none; transition: transform var(--hp-base) var(--hp-ease); }
.btn-hp:hover .icon-arrow, .btn-hp:focus .icon-arrow { transform: translateX(4px); }
.btn-hp[disabled] { opacity: .5; cursor: wait; transform: none; box-shadow: none; }
.btn-hp .fa { font-size: 20px; }

.btn-hp--secondary {
    --btn-bg: var(--hp-surface);
    --btn-bg-hover: var(--hp-accent-tint);
    --btn-fg: var(--hp-ink);
    --btn-border: var(--hp-border-strong);
    --btn-glow: rgba(15, 23, 42, .15);
}
.btn-hp--secondary:hover, .btn-hp--secondary:focus { border-color: var(--hp-accent); }
.btn-hp--light { --btn-bg: #fff; --btn-bg-hover: var(--hp-accent-soft); --btn-fg: var(--hp-ink); --btn-glow: rgba(125, 211, 252, .35); }
.btn-hp--whatsapp { --btn-bg: var(--hp-whatsapp); --btn-bg-hover: var(--hp-whatsapp-strong); --btn-glow: rgba(11, 122, 75, .5); }
.btn-hp--sm { min-height: 44px; padding: 10px 18px; font-size: 15px; }
.btn-hp--block { display: flex; width: 100%; }

.link-arrow { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; color: var(--hp-accent); }
.link-arrow .icon { width: 18px; height: 18px; transition: transform var(--hp-base) var(--hp-ease); }

/* ---------- 4. Cabecera ---------- */
.site-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid var(--hp-border);
    background: rgba(255, 255, 255, .97);
    transition: box-shadow var(--hp-base) var(--hp-ease);
}
.site-header.is-scrolled { box-shadow: 0 6px 20px -12px rgba(15, 23, 42, .25); }
.site-header__bar { display: flex; align-items: center; justify-content: space-between; gap: 24px; min-height: var(--hp-header-h); }
.site-header__brand { display: inline-flex; align-items: center; padding: 6px 0; }
.site-header__brand img { display: block; width: 116px; height: auto; }
.site-header__toggle {
    display: none;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    padding: 0;
    border: 1px solid var(--hp-border-strong);
    border-radius: 12px;
    background: #fff;
    color: var(--hp-ink);
}
.site-header__toggle .bars { position: relative; display: block; width: 18px; height: 2px; border-radius: 2px; background: currentColor; transition: background-color var(--hp-fast); }
.site-header__toggle .bars::before, .site-header__toggle .bars::after {
    content: "";
    position: absolute;
    left: 0;
    width: 18px;
    height: 2px;
    border-radius: 2px;
    background: currentColor;
    transition: transform var(--hp-base) var(--hp-ease);
}
.site-header__toggle .bars::before { top: -6px; }
.site-header__toggle .bars::after { top: 6px; }
.site-header__toggle[aria-expanded="true"] .bars { background: transparent; }
.site-header__toggle[aria-expanded="true"] .bars::before { transform: translateY(6px) rotate(45deg); }
.site-header__toggle[aria-expanded="true"] .bars::after { transform: translateY(-6px) rotate(-45deg); }

.site-nav { display: flex; align-items: center; gap: 8px; }
.site-nav ul { display: flex; align-items: center; gap: 2px; margin: 0; padding: 0; list-style: none; }
.site-nav a:not(.btn-hp) {
    position: relative;
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    padding: 0 12px;
    border-radius: 10px;
    color: var(--hp-ink-2);
    font-size: 15px;
    font-weight: 500;
    text-decoration: none;
    transition: color var(--hp-fast) var(--hp-ease), background-color var(--hp-fast) var(--hp-ease);
}
.site-nav a:not(.btn-hp)::after { /* indicador de sección activa: no depende solo del color */
    content: "";
    position: absolute;
    left: 12px;
    right: 12px;
    bottom: 6px;
    height: 2px;
    border-radius: 2px;
    background: var(--hp-accent);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform var(--hp-base) var(--hp-ease);
}
.site-nav a:not(.btn-hp):hover { background: var(--hp-accent-tint); color: var(--hp-ink); }
.site-nav a.active, .site-nav li.active > a { color: var(--hp-ink); font-weight: 600; }
.site-nav a.active::after, .site-nav li.active > a::after { transform: scaleX(1); }
.site-nav .btn-hp { margin-left: 8px; }

@media (max-width: 991px) {
    .site-header__toggle { display: inline-flex; }
    .site-nav.collapse:not(.in) { display: none; }
    .site-nav.in, .site-nav.collapsing {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        display: flex;
        flex-direction: column;
        align-items: stretch;
        padding: 8px 20px 20px;
        border-bottom: 1px solid var(--hp-border);
        background: #fff;
        box-shadow: 0 16px 24px -16px rgba(15, 23, 42, .25);
    }
    .site-nav ul { flex-direction: column; align-items: stretch; gap: 0; }
    .site-nav a:not(.btn-hp) { min-height: 48px; padding: 0 4px; border-bottom: 1px solid var(--hp-border); border-radius: 0; font-size: 16px; }
    .site-nav a:not(.btn-hp)::after { left: auto; right: 4px; bottom: calc(50% - 4px); width: 8px; height: 8px; border-radius: 50%; }
    .site-nav .btn-hp { margin: 16px 0 0; }
}

/* ---------- 5. Estructura de secciones ---------- */
.section { padding: var(--hp-space-9) 0; }
.section--white { border-top: 1px solid var(--hp-border); border-bottom: 1px solid var(--hp-border); background: var(--hp-surface); }
.section-head { max-width: 720px; margin: 0 0 var(--hp-space-7); }
.section-head--split { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 24px; max-width: none; }
.section-head--split > div { max-width: 640px; }
.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 var(--hp-space-4);
    font-family: var(--hp-font-mono);
    font-size: 13px;
    font-weight: 500;
    letter-spacing: .02em;
    color: var(--hp-accent-strong);
}
.eyebrow::before { content: ""; width: 8px; height: 8px; border-radius: 2px; background: var(--hp-lime); }
.section-title { margin: 0 0 var(--hp-space-4); font-size: clamp(2rem, 1.35rem + 2.4vw, 3rem); letter-spacing: -.03em; text-wrap: balance; }
.lead { max-width: 62ch; color: var(--hp-muted); font-size: clamp(1.05rem, 1rem + .3vw, 1.2rem); line-height: 1.65; }
.lead:last-child { margin-bottom: 0; }

@media (max-width: 767px) {
    .section { padding: var(--hp-space-8) 0; }
    .section-head { margin-bottom: var(--hp-space-6); }
}

/* Aparición escalonada al hacer scroll (site.js agrega .is-visible; sin JS todo es visible) */
.js .reveal {
    opacity: 0;
    transform: translateY(16px);
    transition: opacity var(--hp-slow) var(--hp-ease), transform var(--hp-slow) var(--hp-ease);
    transition-delay: calc(var(--i, 0) * 60ms);
}
.js .reveal.is-visible { opacity: 1; transform: none; }

/* ---------- 6. Hero ---------- */
.hero { position: relative; overflow: hidden; padding: clamp(56px, 8vw, 112px) 0 clamp(56px, 7vw, 96px); }
.hero::before { /* retícula técnica que se desvanece hacia los bordes */
    content: "";
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(to right, rgba(15, 23, 42, .055) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(15, 23, 42, .055) 1px, transparent 1px);
    background-size: 48px 48px;
    -webkit-mask-image: radial-gradient(ellipse 80% 70% at 65% 35%, #000 30%, transparent 75%);
    mask-image: radial-gradient(ellipse 80% 70% at 65% 35%, #000 30%, transparent 75%);
    pointer-events: none;
}
.hero__grid { position: relative; display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); gap: clamp(32px, 5vw, 72px); align-items: center; }
.hero__title { margin: 0 0 var(--hp-space-5); font-size: clamp(2.5rem, 1.5rem + 4.2vw, 4.5rem); line-height: 1.02; letter-spacing: -.035em; text-wrap: balance; }
.hero__title .text-accent { display: block; }
.hero__lead { margin-bottom: var(--hp-space-6); }
.hero__actions { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: var(--hp-space-6); }
.hero__trust { display: flex; flex-wrap: wrap; gap: 8px 24px; margin: 0; padding: 0; list-style: none; color: var(--hp-ink-2); font-size: 15px; font-weight: 500; }
.hero__trust li { display: inline-flex; align-items: center; gap: 8px; }
.hero__trust .icon { width: 18px; height: 18px; color: var(--hp-success); }

/* Ilustración: un flujo automatizado que se "ejecuta" paso a paso */
.flow-card { position: relative; padding: 20px; border: 1px solid var(--hp-border); border-radius: var(--hp-radius-lg); background: var(--hp-surface); box-shadow: var(--hp-shadow-lg); }
.flow-card__bar { display: flex; align-items: center; gap: 6px; margin-bottom: 16px; padding-bottom: 14px; border-bottom: 1px solid var(--hp-border); }
.flow-card__bar > span:not(.flow-card__file) { width: 10px; height: 10px; border-radius: 50%; background: var(--hp-border-strong); }
.flow-card__file { margin-left: auto; color: var(--hp-muted); font-family: var(--hp-font-mono); font-size: 12px; }
.flow { position: relative; margin: 0; padding: 0; list-style: none; }
.flow::before { /* conector punteado: el "camino" */
    content: "";
    position: absolute;
    left: 21px;
    top: 22px;
    bottom: 22px;
    width: 2px;
    background: repeating-linear-gradient(to bottom, var(--hp-border-strong) 0 6px, transparent 6px 12px);
}
.flow__step { position: relative; display: grid; grid-template-columns: 44px 1fr auto; align-items: center; gap: 14px; padding: 10px 12px 10px 0; border-radius: 14px; }
.flow__step + .flow__step { margin-top: 10px; }
.flow__icon { position: relative; z-index: 1; display: grid; place-items: center; width: 44px; height: 44px; border: 1px solid var(--hp-border); border-radius: 12px; background: var(--hp-surface); color: var(--hp-accent); }
.flow__icon .icon { width: 22px; height: 22px; }
.flow__text strong { display: block; color: var(--hp-ink); font-size: 15px; font-weight: 600; line-height: 1.3; }
.flow__text span { color: var(--hp-muted); font-size: 13px; }
.flow__status { color: var(--hp-success); font-family: var(--hp-font-mono); font-size: 12px; }
.flow-card__foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: 16px;
    padding: 12px 14px;
    border-radius: 12px;
    background: var(--hp-navy);
    color: var(--hp-on-navy-muted);
    font-family: var(--hp-font-mono);
    font-size: 12px;
}
.flow-card__foot strong { color: var(--hp-lime); font-weight: 500; }
@media (prefers-reduced-motion: no-preference) {
    .flow__step { animation: flow-run 6s var(--hp-ease) infinite; animation-delay: calc(var(--i) * 900ms); }
    .flow__icon { animation: flow-icon 6s var(--hp-ease) infinite; animation-delay: calc(var(--i) * 900ms); }
}
@keyframes flow-run { 0%, 100% { background: transparent; } 6%, 18% { background: var(--hp-accent-tint); } 30% { background: transparent; } }
@keyframes flow-icon { 0%, 30%, 100% { transform: none; } 8% { transform: scale(1.08); border-color: var(--hp-accent); } }

@media (max-width: 991px) {
    .hero__grid { grid-template-columns: 1fr; }
    .flow-card { max-width: 520px; }
}
@media (max-width: 479px) { .hero__actions .btn-hp { width: 100%; } }

/* ---------- 7. Logos de clientes (sin carrusel: nada se mueve solo) ---------- */
.logos { padding: var(--hp-space-7) 0; border-top: 1px solid var(--hp-border); border-bottom: 1px solid var(--hp-border); background: var(--hp-surface); }
.logos__title { margin: 0 0 var(--hp-space-5); color: var(--hp-muted); font-family: var(--hp-font-mono); font-size: 13px; font-weight: 500; text-align: center; }
.logos__list { display: grid; grid-template-columns: repeat(9, minmax(0, 1fr)); gap: 24px 32px; align-items: center; margin: 0; padding: 0; list-style: none; }
.logos__list li { display: flex; justify-content: center; }
.logos__list img { width: auto; max-width: 120px; max-height: 52px; object-fit: contain; opacity: .8; transition: opacity var(--hp-base) var(--hp-ease), transform var(--hp-base) var(--hp-ease); }
.logos__list li:hover img { opacity: 1; transform: scale(1.04); }
@media (max-width: 1199px) { .logos__list { grid-template-columns: repeat(5, minmax(0, 1fr)); } }
@media (max-width: 767px) { .logos__list { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; } .logos__list img { max-height: 44px; } }

/* ---------- 8. Bento de servicios ---------- */
.bento { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); grid-auto-rows: minmax(240px, auto); gap: 16px; }
.bento-card {
    position: relative;
    display: flex;
    flex-direction: column;
    padding: 28px;
    border: 1px solid var(--hp-border);
    border-radius: var(--hp-radius-lg);
    background: var(--hp-surface);
    box-shadow: var(--hp-shadow-sm);
    transition: transform var(--hp-base) var(--hp-ease), box-shadow var(--hp-base) var(--hp-ease), border-color var(--hp-base) var(--hp-ease);
}
.bento-card:hover, .bento-card:focus-within { transform: translateY(-4px); border-color: #bae6fd; box-shadow: var(--hp-shadow-lg); }
.bento-card:hover .link-arrow .icon, .bento-card:focus-within .link-arrow .icon { transform: translateX(4px); }
.bento-card--feature { grid-column: span 2; grid-row: span 2; }
.bento-card--wide, .bento-card--cta { grid-column: span 2; }
.bento-card__icon { display: grid; place-items: center; width: 52px; height: 52px; margin-bottom: 20px; border-radius: 14px; background: var(--hp-accent-tint); color: var(--hp-accent); }
.bento-card__icon .icon { width: 26px; height: 26px; }
.bento-card__title { margin: 0 0 10px; font-size: 1.375rem; line-height: 1.2; }
.bento-card__title a { color: inherit; text-decoration: none; }
/* Toda la tarjeta es clicable; el enlace real es el título (sin enlaces anidados) */
.bento-card__title a::after { content: ""; position: absolute; inset: 0; z-index: 1; border-radius: inherit; }
.bento-card__title a:focus-visible { outline: none; }
.bento-card:has(.bento-card__title a:focus-visible) { outline: 3px solid var(--hp-accent); outline-offset: 3px; }
.bento-card__text { flex-grow: 1; margin-bottom: 20px; color: var(--hp-muted); }
.bento-card__tags { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 24px; padding: 0; list-style: none; }
.bento-card__tags li { padding: 4px 10px; border: 1px solid var(--hp-border); border-radius: 999px; background: var(--hp-bg); color: var(--hp-ink-2); font-family: var(--hp-font-mono); font-size: 12px; }
.bento-card__badge { position: absolute; top: 24px; right: 24px; padding: 4px 10px; border-radius: 999px; background: var(--hp-lime-soft); color: var(--hp-lime-ink); font-family: var(--hp-font-mono); font-size: 12px; font-weight: 500; }

/* Tarjeta destacada (navy) */
.bento-card--feature { overflow: hidden; padding: 36px; border-color: var(--hp-navy); background: var(--hp-navy); color: var(--hp-on-navy-muted); }
.bento-card--feature::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(to right, rgba(255, 255, 255, .05) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(255, 255, 255, .05) 1px, transparent 1px);
    background-size: 32px 32px;
    -webkit-mask-image: linear-gradient(160deg, transparent 35%, #000 100%);
    mask-image: linear-gradient(160deg, transparent 35%, #000 100%);
    pointer-events: none;
}
.bento-card--feature:hover, .bento-card--feature:focus-within { border-color: var(--hp-navy); box-shadow: 0 24px 48px -16px rgba(2, 6, 23, .55); }
.bento-card--feature .bento-card__title { color: #fff; font-size: clamp(1.75rem, 1.3rem + 1.4vw, 2.5rem); }
.bento-card--feature .bento-card__text { max-width: 46ch; color: var(--hp-on-navy-muted); font-size: 1.075rem; }
.bento-card--feature .bento-card__icon { background: rgba(125, 211, 252, .12); color: var(--hp-sky); }
.bento-card--feature .bento-card__tags li { border-color: rgba(255, 255, 255, .16); background: rgba(255, 255, 255, .06); color: #e2e8f0; }
.bento-card--feature .link-arrow { color: var(--hp-sky); }
.bento-card__code {
    position: relative;
    margin: 0 0 24px;
    padding: 16px 18px;
    border: 1px solid rgba(255, 255, 255, .1);
    border-radius: 14px;
    background: rgba(2, 6, 23, .6);
    color: var(--hp-on-navy-muted);
    font-family: var(--hp-font-mono);
    font-size: 13px;
    line-height: 1.7;
    white-space: pre;
    overflow-x: auto;
}
.bento-card__code .k { color: var(--hp-sky); }
.bento-card__code .s { color: var(--hp-lime); }
.bento-card__code .c { color: #94a3b8; }

/* Tarjeta de llamada a la acción */
.bento-card--cta { justify-content: center; border-style: dashed; border-color: #93c5fd; background: var(--hp-accent-tint); box-shadow: none; }
.bento-card--cta:hover, .bento-card--cta:focus-within { transform: none; border-color: var(--hp-accent); box-shadow: none; }
.bento-card--cta .bento-card__title { font-size: 1.5rem; }
.bento-card__actions { display: flex; flex-wrap: wrap; gap: 10px; }

@media (max-width: 991px) {
    .bento { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-auto-rows: auto; }
    .bento-card--feature { grid-row: auto; }
}
@media (max-width: 599px) {
    .bento { grid-template-columns: 1fr; }
    .bento-card--feature, .bento-card--wide, .bento-card--cta { grid-column: auto; }
    .bento-card, .bento-card--feature { padding: 24px; }
    .bento-card__badge { top: 20px; right: 20px; }
}

/* ---------- 9. Nosotros: proceso + áreas ---------- */
.about__grid { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: clamp(32px, 5vw, 80px); align-items: start; }
.about__intro { position: sticky; top: calc(var(--hp-header-h) + 32px); }
.process { margin: var(--hp-space-6) 0 0; padding: 0; list-style: none; counter-reset: paso; }
.process li { display: grid; grid-template-columns: 48px 1fr; gap: 16px; padding: 16px 0; border-top: 1px solid var(--hp-border); counter-increment: paso; }
.process li::before { content: counter(paso, decimal-leading-zero); padding-top: 2px; color: var(--hp-accent-strong); font-family: var(--hp-font-mono); font-size: 14px; font-weight: 500; }
.process strong { display: block; color: var(--hp-ink); font-family: var(--hp-font-display); font-size: 1.125rem; }
.process span { color: var(--hp-muted); font-size: 15px; }

.areas { overflow: hidden; border: 1px solid var(--hp-border); border-radius: var(--hp-radius-lg); background: var(--hp-surface); box-shadow: var(--hp-shadow); }
.areas__tabs { display: flex; gap: 6px; margin: 0; padding: 10px; border-bottom: 1px solid var(--hp-border); background: var(--hp-bg); list-style: none; overflow-x: auto; scrollbar-width: thin; }
.areas__tabs li { flex: none; }
.areas__tabs a {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 44px;
    padding: 0 14px;
    border: 1px solid transparent;
    border-radius: 12px;
    color: var(--hp-ink-2);
    font-size: 14px;
    font-weight: 600;
    white-space: nowrap;
    text-decoration: none;
    transition: background-color var(--hp-fast) var(--hp-ease), color var(--hp-fast) var(--hp-ease), border-color var(--hp-fast) var(--hp-ease);
}
.areas__tabs a .icon { width: 18px; height: 18px; }
.areas__tabs a:hover, .areas__tabs a:focus { background: #fff; color: var(--hp-ink); text-decoration: none; }
.areas__tabs li.active a { border-color: var(--hp-border); background: #fff; color: var(--hp-accent-strong); box-shadow: var(--hp-shadow-sm); }
.areas .tab-content { padding: 28px; }
.areas .tab-pane { display: none; }
.areas .tab-pane.active { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 28px; align-items: center; animation: fade-in var(--hp-base) var(--hp-ease); }
.areas .tab-pane img { display: block; width: 100%; border-radius: var(--hp-radius); background: var(--hp-bg); }
.areas .tab-pane h3 { margin-bottom: 12px; font-size: 1.5rem; }
.areas .tab-pane p { margin: 0; color: var(--hp-muted); }
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }
@media (max-width: 991px) {
    .about__grid { grid-template-columns: 1fr; }
    .about__intro { position: static; }
}
@media (max-width: 599px) {
    .areas .tab-pane.active { grid-template-columns: 1fr; }
    .areas .tab-content { padding: 20px; }
}

/* ---------- 10. Equipo ---------- */
.team { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 16px; margin: 0; padding: 0; list-style: none; }
.team-card { display: flex; flex-direction: column; overflow: hidden; border: 1px solid var(--hp-border); border-radius: var(--hp-radius-lg); background: var(--hp-surface); transition: transform var(--hp-base) var(--hp-ease), box-shadow var(--hp-base) var(--hp-ease); }
.team-card:hover { transform: translateY(-4px); box-shadow: var(--hp-shadow-lg); }
.team-card img { display: block; width: 100%; aspect-ratio: 1 / 1; object-fit: cover; }
.team-card__body { padding: 18px 20px 22px; }
.team-card h3 { margin: 0 0 8px; font-size: 1.125rem; }
.team-card p { margin: 0; color: var(--hp-muted); font-size: 15px; line-height: 1.55; }
@media (max-width: 1199px) { .team { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 767px) { .team { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 459px) {
    .team { grid-template-columns: 1fr; }
    .team-card { flex-direction: row; }
    .team-card img { width: 112px; flex: none; }
}

/* ---------- 11. Contacto (bloque navy + formulario) ---------- */
.contact { background: var(--hp-navy); color: var(--hp-on-navy-muted); }
.contact__grid { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: clamp(32px, 5vw, 80px); align-items: start; }
.contact .eyebrow { color: var(--hp-sky); }
.contact .section-title { color: #fff; }
.contact .lead { color: var(--hp-on-navy-muted); }
.contact__methods { margin: var(--hp-space-6) 0; padding: 0; list-style: none; }
.contact__methods li { display: flex; align-items: center; gap: 14px; padding: 14px 0; border-top: 1px solid rgba(255, 255, 255, .1); }
.contact__methods .icon { flex: none; width: 22px; height: 22px; color: var(--hp-sky); }
.contact__methods a { color: #fff; font-weight: 600; }
.contact__methods a:hover, .contact__methods a:focus { color: var(--hp-sky); }
.contact__methods small { display: block; color: #94a3b8; font-size: 13px; }

.form-card { padding: clamp(24px, 3vw, 40px); border-radius: var(--hp-radius-lg); background: var(--hp-surface); color: var(--hp-ink-2); box-shadow: 0 30px 60px -20px rgba(2, 6, 23, .6); }
.form-card h3 { margin-bottom: 4px; font-size: 1.375rem; }
.form-card__intro { color: var(--hp-muted); font-size: 15px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-grid .field--full { grid-column: 1 / -1; }
.field label { display: block; margin: 0 0 6px; color: var(--hp-ink); font-size: 14px; font-weight: 600; }
.field label .optional { color: var(--hp-muted); font-weight: 400; }
.field input, .field select, .field textarea {
    display: block;
    width: 100%;
    min-height: 48px;
    padding: 12px 14px;
    border: 1px solid var(--hp-border-strong);
    border-radius: 12px;
    background: #fff;
    color: var(--hp-ink);
    font-family: var(--hp-font-body);
    font-size: 16px; /* evita el zoom automático de iOS */
    line-height: 1.4;
    transition: border-color var(--hp-fast) var(--hp-ease), box-shadow var(--hp-fast) var(--hp-ease);
}
.field textarea { min-height: 128px; resize: vertical; }
.field select {
    padding-right: 40px;
    -webkit-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%23475569' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
}
.field input:hover, .field select:hover, .field textarea:hover { border-color: #94a3b8; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--hp-accent); box-shadow: 0 0 0 4px rgba(0, 114, 198, .18); }
.field .input-validation-error { border-color: var(--hp-danger); }
.field-error { display: block; margin-top: 6px; color: var(--hp-danger); font-size: 14px; }
.field-error:empty { display: none; }
.field--consent label { display: flex; align-items: flex-start; gap: 10px; color: var(--hp-ink-2); font-weight: 400; cursor: pointer; }
.field--consent input[type="checkbox"] { flex: none; width: 20px; height: 20px; min-height: 0; margin: 2px 0 0; padding: 0; accent-color: var(--hp-accent); }
.form-card .btn-hp { margin-top: 8px; }
@media (max-width: 991px) { .contact__grid { grid-template-columns: 1fr; } }
@media (max-width: 599px) { .form-grid { grid-template-columns: 1fr; } }

/* Honeypot: fuera de pantalla, no display:none (algunos bots lo detectan) */
.hp-field { position: absolute !important; left: -10000px !important; width: 1px; height: 1px; overflow: hidden; }

.contact-alert { margin-bottom: 16px; padding: 12px 16px; border-radius: 12px; font-size: 15px; }
.contact-alert-ok { border: 1px solid #bbf7d0; background: #f0fdf4; color: #166534; }
.contact-alert-error { border: 1px solid #fecaca; background: #fef2f2; color: #991b1b; }
.contact-alert a { color: inherit; font-weight: 700; text-decoration: underline; }

/* ---------- 12. Pie ---------- */
.site-footer { background: var(--hp-navy-2); color: var(--hp-on-navy-muted); font-size: 15px; }
.site-footer__top { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.2fr; gap: 40px; padding: var(--hp-space-8) 0 var(--hp-space-7); }
.site-footer__brand img { width: 137px; height: auto; margin-bottom: 16px; }
.site-footer__brand p { max-width: 34ch; color: #94a3b8; }
.site-footer h2 { margin: 0 0 16px; color: #fff; font-family: var(--hp-font-mono); font-size: 13px; font-weight: 500; letter-spacing: .02em; }
.site-footer ul { margin: 0; padding: 0; list-style: none; }
.site-footer li { margin: 0 0 10px; }
.site-footer a { color: var(--hp-on-navy-muted); }
.site-footer a:hover, .site-footer a:focus { color: #fff; }
.site-footer__contact li { display: flex; align-items: flex-start; gap: 10px; }
.site-footer__contact .icon { flex: none; width: 18px; height: 18px; margin-top: 3px; color: var(--hp-sky); }
.site-footer__bottom { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 20px 0; border-top: 1px solid rgba(255, 255, 255, .1); color: #94a3b8; font-size: 14px; }
.site-footer__bottom p { margin: 0; }
.social { display: flex; gap: 8px; margin: 0; padding: 0; list-style: none; }
.social li { margin: 0; }
.social a {
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    border: 1px solid rgba(255, 255, 255, .14);
    border-radius: 12px;
    color: var(--hp-on-navy-muted);
    font-size: 18px;
    transition: background-color var(--hp-fast) var(--hp-ease), color var(--hp-fast) var(--hp-ease), border-color var(--hp-fast) var(--hp-ease);
}
.social a:hover, .social a:focus { border-color: rgba(255, 255, 255, .3); background: rgba(255, 255, 255, .08); color: #fff; text-decoration: none; }
@media (max-width: 991px) { .site-footer__top { grid-template-columns: 1fr 1fr; } }
@media (max-width: 599px) {
    .site-footer__top { grid-template-columns: 1fr; gap: 32px; }
    .site-footer__bottom { flex-direction: column-reverse; align-items: flex-start; padding-bottom: 96px; /* espacio para Nodo */ }
}

/* "Volver arriba" (encima de Nodo) */
#back-top { position: fixed; right: 30px; bottom: 118px; z-index: 1800; display: none; }
#back-top a {
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    border-radius: 14px;
    background: var(--hp-ink);
    color: #fff;
    box-shadow: var(--hp-shadow);
    transition: background-color var(--hp-fast) var(--hp-ease), transform var(--hp-fast) var(--hp-ease);
}
#back-top a:hover, #back-top a:focus { background: var(--hp-accent); transform: translateY(-2px); }
#back-top .icon { width: 20px; height: 20px; }

/* ---------- 13. Banner de cookies ---------- */
.cookie-banner {
    position: fixed;
    left: 16px;
    bottom: 16px;
    z-index: 2000;
    max-width: 440px;
    padding: 20px;
    border: 1px solid var(--hp-border);
    border-radius: var(--hp-radius);
    background: #fff;
    color: var(--hp-ink-2);
    box-shadow: var(--hp-shadow-lg);
    font-size: 15px;
}
.cookie-banner[hidden] { display: none; }
.cookie-banner p { margin: 0 0 14px; }
.cookie-banner a { text-decoration: underline; }
.cookie-actions { display: flex; justify-content: flex-end; gap: 8px; }
@media (max-width: 599px) { .cookie-banner { right: 16px; max-width: none; } }

/* ---------- 14. Páginas de servicio ---------- */
.page-hero { position: relative; overflow: hidden; padding: clamp(40px, 6vw, 80px) 0 clamp(40px, 5vw, 64px); border-bottom: 1px solid var(--hp-border); background: var(--hp-surface); }
.page-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(to right, rgba(15, 23, 42, .05) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(15, 23, 42, .05) 1px, transparent 1px);
    background-size: 40px 40px;
    -webkit-mask-image: linear-gradient(to left, #000, transparent 70%);
    mask-image: linear-gradient(to left, #000, transparent 70%);
    pointer-events: none;
}
.page-hero .container { position: relative; }
.breadcrumb-hp { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 24px; padding: 0; list-style: none; color: var(--hp-muted); font-family: var(--hp-font-mono); font-size: 13px; }
.breadcrumb-hp li + li::before { content: "/"; margin-right: 6px; color: #94a3b8; }
.breadcrumb-hp a { color: var(--hp-accent-strong); }
.page-hero__icon { display: grid; place-items: center; width: 56px; height: 56px; margin-bottom: 20px; border-radius: 16px; background: var(--hp-accent-tint); color: var(--hp-accent); }
.page-hero__icon .icon { width: 28px; height: 28px; }
.page-hero h1 { max-width: 20ch; margin: 0 0 16px; font-size: clamp(2.25rem, 1.5rem + 3vw, 3.75rem); line-height: 1.05; letter-spacing: -.03em; text-wrap: balance; }
.page-hero .lead { margin-bottom: 28px; }
.page-hero__actions { display: flex; flex-wrap: wrap; gap: 12px; }

.service-layout { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: clamp(32px, 5vw, 64px); align-items: start; padding-top: var(--hp-space-8); padding-bottom: var(--hp-space-9); }
.prose { max-width: 72ch; color: var(--hp-ink-2); font-size: 17px; line-height: 1.75; }
.prose > :first-child { margin-top: 0; }
.prose h2 { margin: 48px 0 16px; font-size: clamp(1.5rem, 1.2rem + 1vw, 2rem); }
.prose h3 { margin: 32px 0 12px; font-size: 1.25rem; }
.prose p, .prose ul, .prose ol { margin: 0 0 20px; }
.prose ul { padding-left: 22px; }
.prose li { margin-bottom: 8px; }
.prose li::marker { color: var(--hp-accent); }
.prose strong { color: var(--hp-ink); }
.prose a { text-decoration: underline; text-decoration-color: rgba(0, 114, 198, .35); text-underline-offset: 3px; }
.prose a:hover { text-decoration-color: currentColor; }
.prose table { width: 100%; margin: 24px 0; overflow: hidden; border: 1px solid var(--hp-border); border-collapse: separate; border-spacing: 0; border-radius: var(--hp-radius); background: #fff; font-size: 15px; }
.prose th, .prose td { padding: 12px 16px; border-bottom: 1px solid var(--hp-border); text-align: left; vertical-align: top; }
.prose th { background: var(--hp-bg); color: var(--hp-ink); font-family: var(--hp-font-display); }
.prose tr:last-child td { border-bottom: 0; }
.prose td + td, .prose th + th { border-left: 1px solid var(--hp-border); }
.prose ol { padding-left: 0; list-style: none; counter-reset: paso; }
.prose ol > li { position: relative; padding-left: 44px; counter-increment: paso; }
.prose ol > li::before { content: counter(paso, decimal-leading-zero); position: absolute; left: 0; top: 2px; color: var(--hp-accent-strong); font-family: var(--hp-font-mono); font-size: 14px; }

.faq { display: grid; gap: 12px; margin-top: 16px; }
.faq details { border: 1px solid var(--hp-border); border-radius: var(--hp-radius); background: #fff; transition: border-color var(--hp-fast) var(--hp-ease), box-shadow var(--hp-fast) var(--hp-ease); }
.faq details[open] { border-color: #bae6fd; box-shadow: var(--hp-shadow); }
.faq summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    min-height: 56px;
    padding: 14px 20px;
    color: var(--hp-ink);
    font-family: var(--hp-font-display);
    font-size: 1.0625rem;
    font-weight: 600;
    list-style: none;
    cursor: pointer;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; flex: none; color: var(--hp-accent); font-family: var(--hp-font-mono); font-size: 20px; transition: transform var(--hp-base) var(--hp-ease); }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { margin: 0; padding: 0 20px 18px; color: var(--hp-muted); font-size: 16px; }

.service-aside { position: sticky; top: calc(var(--hp-header-h) + 24px); display: grid; gap: 16px; }
.aside-card { padding: 24px; border: 1px solid var(--hp-border); border-radius: var(--hp-radius-lg); background: #fff; box-shadow: var(--hp-shadow-sm); }
.aside-card h2 { margin: 0 0 8px; font-size: 1.25rem; }
.aside-card p { font-size: 15px; }
.aside-card .btn-hp + .btn-hp { margin-top: 10px; }
.aside-card--cta { border-color: var(--hp-navy); background: var(--hp-navy); color: var(--hp-on-navy-muted); }
.aside-card--cta h2 { color: #fff; }
.aside-card--cta :focus-visible { outline-color: var(--hp-sky); }
.aside-card__phone { margin: 14px 0 0; font-size: 14px; text-align: center; }
.aside-card--cta .aside-card__phone a { color: var(--hp-sky); }
.link-list { margin: 0; padding: 0; list-style: none; }
.link-list li + li { border-top: 1px solid var(--hp-border); }
.link-list a { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 48px; color: var(--hp-ink); font-weight: 600; text-decoration: none; }
.link-list a .icon { width: 18px; height: 18px; color: var(--hp-accent); transition: transform var(--hp-base) var(--hp-ease); }
.link-list a:hover, .link-list a:focus { color: var(--hp-accent-strong); text-decoration: none; }
.link-list a:hover .icon, .link-list a:focus .icon { transform: translateX(4px); }
@media (max-width: 991px) {
    .service-layout { grid-template-columns: 1fr; }
    .service-aside { position: static; }
}

/* Listado /servicios */
.catalog { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; padding: var(--hp-space-8) 0 var(--hp-space-9); }
.catalog__children { margin: 0 0 20px; padding: 16px 0 0; border-top: 1px solid var(--hp-border); list-style: none; }
.catalog__children li { margin-bottom: 8px; }
.catalog__children a { position: relative; z-index: 2; /* por encima del enlace que cubre la tarjeta */ font-size: 15px; font-weight: 600; }
@media (max-width: 991px) { .catalog { grid-template-columns: 1fr 1fr; } }
@media (max-width: 599px) { .catalog { grid-template-columns: 1fr; } }

/* ---------- 15. Aviso de privacidad ---------- */
.legal { padding: var(--hp-space-8) 0 var(--hp-space-9); }
.legal__card { max-width: 860px; margin: 0 auto; padding: clamp(24px, 5vw, 56px); border: 1px solid var(--hp-border); border-radius: var(--hp-radius-lg); background: #fff; }
.aviso-md { color: var(--hp-ink-2); font-size: 16px; line-height: 1.75; }
.aviso-md h1 { margin: 0 0 32px; font-size: clamp(1.75rem, 1.4rem + 1.2vw, 2.25rem); }
.aviso-md h2 { margin: 40px 0 12px; font-size: 1.25rem; }
.aviso-md h3 { margin: 24px 0 8px; font-size: 1.0625rem; }
.aviso-md ul, .aviso-md ol { margin: 0 0 16px; padding-left: 24px; }
.aviso-md li { margin-bottom: 6px; }
.aviso-md hr { margin: 32px 0; border: 0; border-top: 1px solid var(--hp-border); }
.aviso-md blockquote { margin: 16px 0; padding: 12px 18px; border-left: 4px solid var(--hp-accent); border-radius: 0 12px 12px 0; background: var(--hp-accent-tint); font-size: 15px; }
.aviso-md blockquote p { margin: 0; }
.aviso-md a { text-decoration: underline; word-break: break-word; }
.aviso-firma { margin: 32px 0 0; text-align: right; }

/* ---------- 16. Movimiento reducido ---------- */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
    .js .reveal { opacity: 1; transform: none; }
}
