/* =============================================================
   Solución Base Software — hoja principal
   Lenguaje visual: corporativo, sobrio, líneas finas, esquinas
   rectas, secciones a pantalla completa alternando blanco /
   gris claro / oscuro / imagen con capa de color plana encima.
   ============================================================= */


/* -------------------------------------------------------------
   1. TOKENS
   ------------------------------------------------------------- */
:root {
    /* Marca (extraída del logotipo) */
    --sb-mint:      #a3d3bc;
    --sb-teal:      #1fa3ad;
    --sb-teal-deep: #217a86;
    --sb-slate:     #596988;
    --sb-gray:      #afbfc4;
    --sb-shard:     #50605e;
    --sb-grad:      linear-gradient(90deg, #a3d3bc 0%, #1bacb1 55%, #596988 100%);

    /* Apoyo */
    --accent:       #e8762c;   /* naranja: CTA y detalles puntuales */
    --accent-dark:  #cc6220;

    /* Neutros */
    --ink:          #0e1417;   /* fondos oscuros */
    --ink-2:        #141c20;
    --black:        #090c0e;
    --text:         #1b2326;
    --muted:        #5b686d;
    --soft:         #f2f4f5;
    --white:        #ffffff;
    --line:         #dde3e5;
    --line-strong:  #c3ccd0;
    --line-dark:    rgba(255, 255, 255, .14);
    --on-dark:      rgba(255, 255, 255, .92);
    --on-dark-muted:rgba(255, 255, 255, .64);

    /* Tipografía */
    --font:  'Manrope', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
    --mono:  'IBM Plex Mono', ui-monospace, 'SFMono-Regular', Consolas, monospace;

    --fs-xs:   .75rem;
    --fs-sm:   .875rem;
    --fs-base: 1rem;
    --fs-md:   1.0625rem;
    --fs-lg:   1.1875rem;
    --fs-h3:   1.1875rem;
    --fs-h2:   clamp(2rem, 1.35rem + 2.4vw, 3.25rem);
    --fs-h1:   clamp(2.6rem, 1.5rem + 4vw, 4.75rem);

    /* Espaciado */
    --space-1: .25rem;  --space-2: .5rem;  --space-3: .75rem;
    --space-4: 1rem;    --space-5: 1.5rem; --space-6: 2rem;
    --space-7: 3rem;    --space-8: 4rem;   --space-9: 6rem;
    --section-py: clamp(4.5rem, 9vw, 8rem);

    --container-max: 1240px;
    --container-px:  clamp(1.25rem, 4vw, 2.5rem);

    /* Cabecera */
    --header-h:   88px;
    --header-h-s: 62px;

    --ease: cubic-bezier(.2, .7, .2, 1);
    --t-fast: 150ms ease;
    --t-base: 250ms ease;
}

@media (max-width: 991.98px) {
    :root { --header-h: 72px; --header-h-s: 60px; }
}


/* -------------------------------------------------------------
   2. RESET Y BASE
   ------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }

html {
    -webkit-text-size-adjust: 100%;
    scroll-behavior: smooth;
    scroll-padding-top: var(--header-h-s);
}

body {
    margin: 0;
    padding-top: var(--header-h);
    font-family: var(--font);
    font-size: var(--fs-base);
    line-height: 1.65;
    color: var(--text);
    background: var(--white);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}
body.has-hero { padding-top: 0; }

img, svg, video { display: block; max-width: 100%; height: auto; }
button, input, select, textarea { font: inherit; color: inherit; }
button { background: none; border: 0; cursor: pointer; }
ul, ol { margin: 0; padding: 0; list-style: none; }
p { margin: 0 0 var(--space-4); }
p:last-child { margin-bottom: 0; }
[hidden] { display: none !important; }

a { color: var(--sb-teal-deep); text-decoration: none; transition: color var(--t-base); }
a:hover { color: var(--text); }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

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

.skip-link {
    position: absolute; left: var(--space-4); top: -60px; z-index: 200;
    padding: var(--space-2) var(--space-4);
    background: var(--accent); color: #fff; font-size: var(--fs-sm); font-weight: 600;
}
.skip-link:focus { top: var(--space-3); color: #fff; }

.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;
}

.container {
    width: 100%;
    max-width: var(--container-max);
    margin-inline: auto;
    padding-inline: var(--container-px);
}
.container-narrow { max-width: 860px; }

.text-muted { color: var(--muted); }
.text-center { text-align: center; }


/* -------------------------------------------------------------
   3. TIPOGRAFÍA
   Titulares en peso ligero con remate en <strong> semibold,
   igual que el logotipo (SOLUCIÓN + BASE).
   ------------------------------------------------------------- */
h1, h2, h3, h4, h5, h6 {
    margin: 0 0 var(--space-5);
    font-family: var(--font);
    font-weight: 300;
    line-height: 1.12;
    letter-spacing: -.025em;
    color: var(--text);
}
h1 strong, h2 strong { font-weight: 600; }
h1 { font-size: var(--fs-h1); }
h2 { font-size: var(--fs-h2); max-width: 18em; }
h3 { font-size: var(--fs-h3); font-weight: 600; letter-spacing: -.01em; line-height: 1.3; margin-bottom: var(--space-3); }
h4 { font-size: var(--fs-lg); font-weight: 600; letter-spacing: -.01em; }

h2 strong {
    /* En claro, el remate toma el tono profundo de la marca */
    color: var(--sb-teal-deep);
}
.on-dark, h1.on-dark, h2.on-dark { color: var(--white); }
h2.on-dark strong, .hero__title strong, .page-hero__title strong { color: var(--white); }

.lead {
    font-size: var(--fs-lg);
    line-height: 1.6;
    color: var(--muted);
    max-width: 34em;
}
.lead.on-dark { color: var(--on-dark-muted); }

/* Antetítulo con índice en mono y filete */
.eyebrow {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    margin-bottom: var(--space-5);
    font-family: var(--mono);
    font-size: var(--fs-xs);
    font-weight: 500;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: var(--muted);
}
.eyebrow::after {
    content: '';
    width: 40px;
    height: 1px;
    background: currentColor;
    opacity: .5;
}
.eyebrow--light { color: var(--on-dark-muted); }

.idx {
    font-family: var(--mono);
    font-size: var(--fs-xs);
    font-weight: 500;
    letter-spacing: .08em;
    color: var(--sb-teal);
}
.eyebrow .idx { color: var(--sb-teal); }
.eyebrow--light .idx { color: var(--sb-mint); }

.prose p { font-size: var(--fs-md); color: var(--muted); }
.prose p:first-child { color: var(--text); }

.link-arrow {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    margin-top: var(--space-6);
    padding-bottom: 4px;
    font-size: var(--fs-sm);
    font-weight: 600;
    letter-spacing: .02em;
    color: var(--text);
    border-bottom: 1px solid var(--accent);
}
.link-arrow i { transition: transform var(--t-base); }
.link-arrow:hover { color: var(--accent-dark); }
.link-arrow:hover i { transform: translateX(4px); }


/* -------------------------------------------------------------
   4. BOTONES — rectos, sobrios
   ------------------------------------------------------------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-3);
    padding: 1rem 1.75rem;
    font-family: var(--font);
    font-size: var(--fs-sm);
    font-weight: 600;
    letter-spacing: .03em;
    line-height: 1;
    border: 1px solid transparent;
    border-radius: 0;
    cursor: pointer;
    white-space: nowrap;
    transition: background-color var(--t-base), color var(--t-base), border-color var(--t-base);
}
.btn i { transition: transform var(--t-base); }
.btn:hover i { transform: translateX(4px); }

.btn--accent { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn--accent:hover { background: var(--accent-dark); border-color: var(--accent-dark); color: #fff; }

.btn--ghost-light { border-color: rgba(255, 255, 255, .35); color: #fff; }
.btn--ghost-light:hover { background: #fff; border-color: #fff; color: var(--ink); }

.btn--outline { border-color: var(--text); color: var(--text); }
.btn--outline:hover { background: var(--text); color: #fff; }

/* Compatibilidad con vistas heredadas */
.btn--primary { background: var(--ink); border-color: var(--ink); color: #fff; }
.btn--primary:hover { background: var(--sb-teal-deep); border-color: var(--sb-teal-deep); color: #fff; }


/* -------------------------------------------------------------
   5. LOGOTIPO INLINE (partials/logo.php)
   ------------------------------------------------------------- */
.sb-logo { width: auto; height: 46px; }
.sb-logo .lg-gray  { fill: var(--sb-gray); }
.sb-logo .lg-b     { fill: var(--lg-grad); }
.sb-logo .lg-shard { fill: var(--sb-shard); }
.sb-logo .lg-word  { fill: #3c3c3b; }
.sb-logo .lg-sub   { fill: #1d1d1b; }
.sb-logo path, .sb-logo polygon { transition: fill var(--t-base); }

/* Variante blanca (footer, cabecera sobre hero) */
.sb-logo.is-white .lg-gray,
.sb-logo.is-white .lg-b,
.sb-logo.is-white .lg-word,
.sb-logo.is-white .lg-sub,
body.has-hero .site-header:not(.is-scrolled) .sb-logo .lg-gray,
body.has-hero .site-header:not(.is-scrolled) .sb-logo .lg-b,
body.has-hero .site-header:not(.is-scrolled) .sb-logo .lg-word,
body.has-hero .site-header:not(.is-scrolled) .sb-logo .lg-sub { fill: #fff; }

.sb-logo.is-white .lg-shard,
body.has-hero .site-header:not(.is-scrolled) .sb-logo .lg-shard { fill: rgba(255, 255, 255, .38); }


/* -------------------------------------------------------------
   6. CABECERA
   ------------------------------------------------------------- */
.site-header {
    position: fixed;
    inset: 0 0 auto 0;
    z-index: 100;
    background: rgba(255, 255, 255, .97);
    border-bottom: 1px solid var(--line);
    transition: background-color var(--t-base), border-color var(--t-base);
}
.site-header::after {
    /* filete con el degradado de marca, visible al hacer scroll */
    content: '';
    position: absolute;
    left: 0; right: 0; bottom: -1px;
    height: 1px;
    background: var(--sb-grad);
    opacity: 0;
    transition: opacity var(--t-base);
}
.site-header.is-scrolled::after { opacity: 1; }

.site-header__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-6);
    height: var(--header-h);
    transition: height var(--t-base);
}
.site-header.is-scrolled .site-header__inner { height: var(--header-h-s); }

.site-header__logo { display: inline-flex; flex-shrink: 0; line-height: 0; }
.site-header__logo .sb-logo { transition: height var(--t-base); }
.site-header.is-scrolled .sb-logo { height: 36px; }

/* Transparente sobre el hero */
body.has-hero .site-header:not(.is-scrolled) {
    background: transparent;
    border-bottom-color: var(--line-dark);
}

/* Navegación */
.site-nav__list {
    display: flex;
    align-items: center;
    gap: clamp(1.25rem, 2.6vw, 2.5rem);
}
.site-nav__list a {
    position: relative;
    display: inline-flex;
    align-items: center;
    padding-block: var(--space-2);
    font-size: var(--fs-sm);
    font-weight: 500;
    letter-spacing: .02em;
    color: var(--text);
}
.site-nav__list a::after {
    content: '';
    position: absolute;
    left: 0; bottom: 0;
    width: 100%;
    height: 1px;
    background: var(--accent);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform var(--t-base) var(--ease);
}
.site-nav__list a:hover::after,
.site-nav__list a.is-active::after { transform: scaleX(1); }
.site-nav__list a:hover { color: var(--text); }

.site-nav__home i { font-size: 1.05rem; line-height: 1; }
.site-nav__home-label { display: none; }

body.has-hero .site-header:not(.is-scrolled) .site-nav__list a { color: #fff; }

/* Hamburguesa (2 líneas finas) */
.site-header__toggle {
    display: none;
    position: relative;
    width: 44px;
    height: 44px;
    margin-right: -10px;
}
.site-header__toggle span {
    position: absolute;
    left: 11px; right: 11px;
    height: 1.5px;
    background: var(--text);
    transition: transform var(--t-base), top var(--t-base), background-color var(--t-base);
}
.site-header__toggle span:nth-child(1) { top: 17px; }
.site-header__toggle span:nth-child(2) { top: 26px; }
.site-header__toggle[aria-expanded="true"] span:nth-child(1) { top: 21.5px; transform: rotate(45deg); }
.site-header__toggle[aria-expanded="true"] span:nth-child(2) { top: 21.5px; transform: rotate(-45deg); }
body.has-hero .site-header:not(.is-scrolled) .site-header__toggle span { background: #fff; }

@media (max-width: 991.98px) {
    .site-header__toggle { display: inline-block; }
    .sb-logo { height: 38px; }
    .site-header.is-scrolled .sb-logo { height: 32px; }

    .site-nav {
        position: fixed;
        top: var(--header-h);
        left: 0; right: 0; bottom: 0;
        background: var(--ink);
        padding: var(--space-6) var(--container-px);
        opacity: 0;
        visibility: hidden;
        transform: translateY(-8px);
        transition: opacity var(--t-base), transform var(--t-base), visibility var(--t-base);
        overflow-y: auto;
    }
    .site-header.is-scrolled .site-nav { top: var(--header-h-s); }
    .site-nav.is-open { opacity: 1; visibility: visible; transform: none; }

    .site-nav__list { flex-direction: column; align-items: stretch; gap: 0; }
    .site-nav__list li { border-bottom: 1px solid var(--line-dark); }
    .site-nav__list a,
    body.has-hero .site-header:not(.is-scrolled) .site-nav__list a {
        display: flex;
        padding-block: var(--space-5);
        font-size: 1.5rem;
        font-weight: 300;
        color: #fff;
    }
    .site-nav__list a::after { display: none; }
    .site-nav__list a.is-active { font-weight: 600; }
    .site-nav__home i { display: none; }
    .site-nav__home-label { display: inline; }

    /* con el menú abierto la cabecera pasa a oscuro */
    .site-header.menu-open,
    body.has-hero .site-header.menu-open:not(.is-scrolled) { background: var(--ink); border-bottom-color: var(--line-dark); }
    .site-header.menu-open .sb-logo .lg-gray,
    .site-header.menu-open .sb-logo .lg-b,
    .site-header.menu-open .sb-logo .lg-word,
    .site-header.menu-open .sb-logo .lg-sub { fill: #fff; }
    .site-header.menu-open .site-header__toggle span { background: #fff; }
}


/* -------------------------------------------------------------
   7. SECCIONES
   ------------------------------------------------------------- */
.section {
    position: relative;
    padding-block: var(--section-py);
}
.section--full {
    min-height: calc(100vh - var(--header-h-s));
    min-height: calc(100svh - var(--header-h-s));
    display: flex;
    align-items: center;
}
.section--full > .container { width: 100%; }

.section--white { background: var(--white); }
.section--soft  { background: var(--soft); }
.section--black { background: var(--black); color: var(--on-dark); }

.section__intro { padding-bottom: var(--space-7); }
@media (min-width: 992px) { .section__intro { padding-bottom: 0; } }

/* Fondo fotográfico
   - ::before  la imagen tal cual, sin filtros (llega por --bg-img,
               ver App\Helpers\Media::bg()).
   - ::after   una capa de color plano con opacidad encima.
   Todo se controla con dos variables, por variante o por sección:
     --overlay-color    color de la capa
     --overlay-opacity  0 = imagen pura · 1 = color sólido
   Ej. por sección desde la vista:
     Media::bg('foto.jpg', '--overlay-opacity:.6')
   Sin imagen, se ve el color de fondo + la retícula. */
.bg-photo {
    --overlay-color: var(--ink);
    --overlay-opacity: .75;
    position: relative;
    isolation: isolate;
    overflow: hidden;
    color: var(--on-dark);
}
.bg-photo::before,
.bg-photo::after {
    content: '';
    position: absolute;
    inset: 0;
    z-index: -1;
    pointer-events: none;
}
.bg-photo::before {
    background-image: var(--bg-img, none);
    background-size: cover;
    background-position: var(--bg-pos, center);
}
.bg-photo::after {
    background: var(--overlay-color);
    opacity: var(--overlay-opacity);
}

/* Oscuro (hero y cabeceras de página) */
.bg-photo--dark {
    --overlay-color: #0e1417;
    --overlay-opacity: .75;
    background-color: var(--ink);
}

/* Teal de marca (Privacidad) */
.bg-photo--teal {
    --overlay-color: #17646d;
    --overlay-opacity: .85;
    background-color: #17646d;
}

/* Claro (Plataformas): texto oscuro, imagen como textura */
.bg-photo--soft {
    --overlay-color: #f2f4f5;
    --overlay-opacity: .82;
    background-color: var(--soft);
    color: var(--text);
}

/* Hero de la home: la foto ya es oscura, capa más ligera
   y encuadre desplazado para que el sujeto quede a la derecha. */
.hero.bg-photo {
    --overlay-opacity: .7;
    --bg-pos: 72% center;
}
@media (max-width: 991.98px) {
    /* En vertical el texto cae sobre el sujeto: más capa */
    .hero.bg-photo { --overlay-opacity: .7; --bg-pos: 78% center; }
}

/* Contenido por encima de imagen, capa y retícula */
.bg-photo > .container { position: relative; z-index: 1; }
.bg-photo > .hero__strip,
.bg-photo > .scroll-cue { z-index: 1; }

/* Retícula técnica muy tenue */
.bg-grid {
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    background-image:
        linear-gradient(rgba(255, 255, 255, .045) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, .045) 1px, transparent 1px);
    background-size: 88px 88px;
    -webkit-mask-image: radial-gradient(ellipse 80% 80% at 70% 40%, #000 30%, transparent 80%);
            mask-image: radial-gradient(ellipse 80% 80% at 70% 40%, #000 30%, transparent 80%);
}


/* -------------------------------------------------------------
   8. HERO
   ------------------------------------------------------------- */
.hero {
    min-height: 100vh;
    min-height: 100svh;
    display: flex;
    align-items: center;
    padding-top: calc(var(--header-h) + var(--space-7));
    padding-bottom: calc(56px + var(--space-8));
}
.hero__inner { width: 100%; }

.hero__title {
    color: #fff;
    margin-bottom: var(--space-6);
    max-width: 11.5em;
}
.hero__title strong { display: block; }

.hero__lead {
    font-size: var(--fs-lg);
    line-height: 1.6;
    color: var(--on-dark-muted);
    max-width: 32em;
    margin-bottom: var(--space-7);
}

.hero__actions { display: flex; flex-wrap: wrap; gap: var(--space-4); }

.hero__aside { margin-top: var(--space-8); }
@media (min-width: 992px) { .hero__aside { margin-top: 0; } }

/* Panel índice (columna derecha del hero) */
.index-panel {
    position: relative;
    overflow: hidden;
    padding: var(--space-6) var(--space-6) var(--space-5);
    
    background: rgba(255, 255, 255, .025);
    -webkit-backdrop-filter: blur(3px);
            backdrop-filter: blur(3px);
}
.index-panel::before {
    display: none;
    content: '';
    position: absolute;
    left: 0; top: 0;
    width: 64px; height: 2px;
    background: var(--sb-grad);
}
.index-panel__mark {
    position: absolute;
    right: -70px;
    bottom: -60px;
    width: 300px;
    opacity: .14;
    pointer-events: none;
}
.index-panel__label {
    font-family: var(--mono);
    font-size: var(--fs-xs);
    letter-spacing: .14em;
    text-transform: uppercase;
    color: var(--on-dark-muted);
    margin-bottom: var(--space-4);
}
.index-panel__list li { border-top: 1px solid var(--line-dark); }
.index-panel__list a {
    position: relative;
    display: flex;
    align-items: center;
    gap: var(--space-5);
    padding: 1.15rem 0;
    font-size: var(--fs-md);
    font-weight: 500;
    color: #fff;
}
.index-panel__list .idx { color: var(--sb-mint); min-width: 1.5em; }
.index-panel__list i {
    margin-left: auto;
    opacity: .35;
    transition: transform var(--t-base), opacity var(--t-base), color var(--t-base);
}
.index-panel__list a:hover { color: #fff; }
.index-panel__list a:hover i { opacity: 1; color: var(--accent); transform: translateX(4px); }

/* Franja inferior de sectores */
.hero__strip {
    position: absolute;
    left: 0; right: 0; bottom: 0;
    border-top: 1px solid var(--line-dark);
}
.hero__strip-inner {
    display: flex;
    align-items: center;
    height: 56px;
    font-family: var(--mono);
    font-size: 11px;
    letter-spacing: .16em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, .5);
    overflow: hidden;
    white-space: nowrap;
}
.hero__strip-inner span { padding: 0 var(--space-6); line-height: 1; }
.hero__strip-inner span:first-child { padding-left: 0; }
.hero__strip-inner span + span { border-left: 1px solid var(--line-dark); }
@media (max-width: 767.98px) {
    .hero__strip-inner { font-size: 10px; letter-spacing: .1em; }
    .hero__strip-inner span { padding: 0 var(--space-4); }
    .hero__strip-inner span:nth-child(n+3) { display: none; }
}

/* Indicador de scroll */
.scroll-cue {
    position: absolute;
    right: var(--container-px);
    bottom: 76px;
    width: 1px;
    height: 56px;
    background: var(--line-dark);
    overflow: hidden;
}
.scroll-cue span {
    position: absolute;
    left: 0; top: -30%;
    width: 1px; height: 30%;
    background: #fff;
    animation: cue 2.2s var(--ease) infinite;
}
@keyframes cue { to { top: 100%; } }
@media (max-width: 991.98px), (max-height: 700px) { .scroll-cue { display: none; } }


/* -------------------------------------------------------------
   9. PÁGINAS INTERNAS — cabecera
   ------------------------------------------------------------- */
.page-hero {
    min-height: 58vh;
    min-height: 58svh;
    display: flex;
    align-items: flex-end;
    padding-top: calc(var(--header-h) + var(--space-8));
    padding-bottom: var(--space-8);
}
.page-hero__inner { width: 100%; }
.page-hero__title {
    font-size: clamp(2.2rem, 1.4rem + 3vw, 3.9rem);
    color: #fff;
    max-width: 16em;
    margin-bottom: var(--space-5);
}
.page-hero__lead {
    font-size: var(--fs-lg);
    color: var(--on-dark-muted);
    max-width: 38em;
}


/* -------------------------------------------------------------
   10. COMPONENTES DE CONTENIDO
   ------------------------------------------------------------- */

/* Rejilla de capacidades con filetes */
.cap-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    border-top: 1px solid var(--line);
}
.cap-grid__item {
    padding: var(--space-6) var(--space-6) var(--space-6) 0;
    border-bottom: 1px solid var(--line);
}
.cap-grid__item:nth-child(2n) {
    padding: var(--space-6) 0 var(--space-6) var(--space-6);
    border-left: 1px solid var(--line);
}
.cap-grid__item .idx { display: block; margin-bottom: var(--space-5); }
.cap-grid__item p { font-size: var(--fs-sm); color: var(--muted); }

.cap-grid--4 { margin-top: var(--space-8); }
@media (min-width: 992px) {
    .cap-grid--4 { grid-template-columns: repeat(4, 1fr); }
    .cap-grid--4 .cap-grid__item,
    .cap-grid--4 .cap-grid__item:nth-child(2n) {
        padding: var(--space-6) var(--space-5);
        border-left: 1px solid var(--line);
    }
    .cap-grid--4 .cap-grid__item:first-child { border-left: 0; padding-left: 0; }
}
@media (max-width: 575.98px) {
    .cap-grid { grid-template-columns: 1fr; }
    .cap-grid__item,
    .cap-grid__item:nth-child(2n) { padding: var(--space-5) 0; border-left: 0; }
}

/* Lista con filetes (privacidad) */
.line-list { margin-top: var(--space-7); }
@media (min-width: 992px) { .line-list { margin-top: 0; } }
.line-list li {
    display: flex;
    align-items: baseline;
    gap: var(--space-5);
    padding: 1.15rem 0;
    border-top: 1px solid var(--line);
    font-size: var(--fs-md);
    font-weight: 500;
}
.line-list li:last-child { border-bottom: 1px solid var(--line); }
.line-list--light li { border-color: rgba(255, 255, 255, .22) !important; color: #fff; }
.line-list--light .idx { color: var(--sb-mint); }

/* Columnas con filete superior y segmento de marca */
.col-rule { margin-top: var(--space-8); }
.col-rule__item {
    position: relative;
    padding-top: var(--space-6);
    margin-bottom: var(--space-7);
    border-top: 1px solid var(--line-strong);
}
.col-rule__item::before {
    content: '';
    position: absolute;
    left: 0; top: -1px;
    width: 48px; height: 2px;
    background: var(--sb-grad);
}
.col-rule__item .idx { display: block; margin-bottom: var(--space-4); }
.col-rule__item p { font-size: var(--fs-sm); color: var(--muted); max-width: 30em; }
@media (min-width: 768px) {
    .col-rule__item { margin-bottom: 0; }
    .col-rule__item + .col-rule__item { padding-left: calc(var(--bs-gutter-x, 1.5rem) * .5 + var(--space-4)); }
}

/* Nota secundaria sobre fondo oscuro (p. ej. NPS en Canales) */
.note-dark {
    max-width: 34em;
    margin-top: var(--space-5);
    padding-top: var(--space-5);
    border-top: 1px solid var(--line-dark);
    font-size: var(--fs-md);
    color: var(--on-dark-muted);
}

/* Socio tecnológico */
.partner {
    margin-top: var(--space-7);
    padding-left: var(--space-5);
    border-left: 2px solid var(--accent);
}
.partner__label {
    font-family: var(--mono);
    font-size: var(--fs-xs);
    letter-spacing: .14em;
    text-transform: uppercase;
    color: var(--on-dark-muted);
    margin-bottom: var(--space-2);
}
.partner__name { font-size: 1.375rem; font-weight: 600; color: #fff; margin-bottom: var(--space-2); }
.partner__text { font-size: var(--fs-sm); color: var(--on-dark-muted); max-width: 30em; }

/* Diagrama de flujo de canal */
.flow { margin-top: var(--space-8); }
@media (min-width: 992px) { .flow { margin-top: 0; } }
.flow__node {
    position: relative;
    display: flex;
    align-items: center;
    gap: var(--space-4);
    padding: 1.25rem 1.5rem;
    border: 1px solid var(--line-dark);
    background: rgba(255, 255, 255, .02);
    font-weight: 500;
    color: #fff;
}
.flow__node + .flow__node { margin-top: 28px; }
.flow__node + .flow__node::before {
    content: '';
    position: absolute;
    left: calc(1.5rem + 10px);
    top: -29px;
    width: 1px;
    height: 28px;
    background: linear-gradient(var(--sb-mint), var(--sb-teal));
}
.flow__node i { font-size: 1.25rem; color: var(--sb-mint); width: 1.25rem; }
.flow__node .idx { margin-left: auto; color: var(--on-dark-muted); }
.flow__node:last-child { border-color: rgba(232, 118, 44, .55); }
.flow__node:last-child i { color: var(--accent); }

/* Sectores */
.clients-head h2 { margin-bottom: var(--space-6); }
.sector-row { display: grid; grid-template-columns: 1fr 1fr; column-gap: var(--space-6); }
.sector-row li {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    padding: var(--space-4) 0;
    border-top: 1px solid var(--line);
    font-size: var(--fs-sm);
    font-weight: 600;
}
.sector-row li:nth-last-child(-n+2) { border-bottom: 1px solid var(--line); }
.sector-row i { color: var(--sb-teal); font-size: 1.05rem; }

/* Declaración entre sectores y logos */
.clients-statement {
    max-width: 46em;
    margin-top: var(--space-8);
    margin-bottom: 0;
    padding-left: var(--space-5);
    border-left: 2px solid var(--sb-teal);
    color: var(--text);
}

/* Clientes de referencia */
.clients {
    margin-top: var(--space-9);
}
.clients__title {
    font-family: var(--mono);
    font-size: var(--fs-xs);
    font-weight: 500;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: var(--muted);
    margin-bottom: var(--space-5);
}
.clients__list {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    border-top: 1px solid var(--line);
    border-left: 1px solid var(--line);
}
@media (min-width: 768px) { .clients__list { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1200px) { .clients__list { grid-template-columns: repeat(6, 1fr); } }
.clients__item {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 112px;
    padding: var(--space-5);
    border-right: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
    text-align: center;
}
.clients__item img {
    max-height: 40px;
    max-width: 150px;
    width: auto;
    opacity: .5;
    transition: opacity var(--t-base);
}
/* Monocromo uniforme sin editar los originales */
.clients__item img.is-silhouette { filter: brightness(0); }
.clients__item img.is-multiply   { filter: grayscale(1) contrast(1.25); mix-blend-mode: multiply; opacity: .62; }
.clients__item img.is-tall       { max-height: 80px; max-width: 150px; }
.clients__item:hover img { opacity: .9; }
.clients__name {
    font-size: var(--fs-sm);
    font-weight: 600;
    letter-spacing: .01em;
    color: var(--muted);
}

/* Banda final de contacto */
.cta-band {
    position: relative;
    overflow: hidden;
    background: var(--ink-2);
    color: var(--on-dark);
}
.cta-band::before {
    content: '';
    position: absolute;
    left: 0; right: 0; top: 0;
    height: 1px;
    background: var(--sb-grad);
}
.cta-band__mark {
    position: absolute;
    right: -4%;
    top: 50%;
    width: min(46vw, 520px);
    transform: translateY(-50%);
    opacity: .07;
    pointer-events: none;
}
.cta-band h2 { margin-bottom: 0; }
.cta-band__actions {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: var(--space-5);
    margin-top: var(--space-7);
}
@media (min-width: 992px) { .cta-band__actions { margin-top: 0; } }
.cta-band__mail {
    font-size: var(--fs-md);
    color: #fff;
    border-bottom: 1px solid var(--line-dark);
    padding-bottom: 2px;
}
.cta-band__mail:hover { color: #fff; border-color: #fff; }

/* Datos de contacto */
.contact-list { margin: var(--space-7) 0 0; }
@media (min-width: 992px) { .contact-list { margin-top: 0; } }
.contact-list > div { padding: var(--space-5) 0; border-top: 1px solid var(--line); }
.contact-list > div:last-child { border-bottom: 1px solid var(--line); }
.contact-list dt {
    font-family: var(--mono);
    font-size: var(--fs-xs);
    letter-spacing: .14em;
    text-transform: uppercase;
    color: var(--muted);
    margin-bottom: var(--space-2);
}
.contact-list dd { margin: 0; font-size: var(--fs-lg); font-weight: 500; }
.contact-list a { color: var(--text); border-bottom: 1px solid var(--accent); }
.contact-list a:hover { color: var(--accent-dark); }


/* -------------------------------------------------------------
   11. FOOTER
   ------------------------------------------------------------- */
.site-footer {
    background: var(--black);
    color: var(--on-dark-muted);
    padding: var(--space-9) 0 var(--space-6);
}
.site-footer__top { padding-bottom: var(--space-8); }
.site-footer__logo { display: inline-block; line-height: 0; margin-bottom: var(--space-5); }
.site-footer__logo .sb-logo { height: 44px; }
.site-footer__tagline { font-size: var(--fs-sm); max-width: 26em; color: rgba(255, 255, 255, .5); }

.site-footer__heading {
    font-family: var(--mono);
    font-size: 11px;
    font-weight: 500;
    letter-spacing: .16em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, .4);
    margin: var(--space-7) 0 var(--space-5);
}
@media (min-width: 992px) { .site-footer__heading { margin-top: 0; } }
.site-footer__links li { margin-bottom: var(--space-3); font-size: var(--fs-sm); }
.site-footer__links a { color: rgba(255, 255, 255, .75); }
.site-footer__links a:hover { color: #fff; }

.site-footer__bottom {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: var(--space-4);
    padding-top: var(--space-5);
    border-top: 1px solid rgba(255, 255, 255, .1);
    font-size: var(--fs-xs);
    color: rgba(255, 255, 255, .42);
}
.site-footer__bottom p { margin: 0; }
.site-footer__legal { display: flex; gap: var(--space-5); }
.site-footer__legal a { color: rgba(255, 255, 255, .6); }
.site-footer__legal a:hover { color: #fff; }


/* -------------------------------------------------------------
   12. APARICIÓN AL HACER SCROLL
   Sólo se oculta si hay JS (clase .js en <html>).
   ------------------------------------------------------------- */
.js .reveal {
    opacity: 0;
    transform: translateY(18px);
    transition: opacity .8s var(--ease), transform .8s var(--ease);
}
.js .reveal.is-visible { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    .js .reveal { opacity: 1; transform: none; transition: none; }
    .scroll-cue span { animation: none; }
}


/* =============================================================
   13. COMPONENTES HEREDADOS DE QUBI (Actualidad, legales, stub)
   Restilizados al lenguaje de Solución Base.
   ============================================================= */
.section-head { max-width: 760px; margin: 0 0 var(--space-8); }
.section-head h1 { font-size: var(--fs-h2); }
.section-head .lead { margin: 0; }

/* Textos legales */
.container-narrow h4 { margin-top: var(--space-7); margin-bottom: var(--space-4); }
.container-narrow ul { list-style: disc; padding-left: 1.25rem; margin-bottom: var(--space-4); }
.container-narrow li { margin-bottom: var(--space-2); }

.callout {
    display: flex;
    align-items: flex-start;
    gap: var(--space-3);
    padding: var(--space-5);
    border: 1px solid var(--line);
    border-left: 2px solid var(--sb-teal);
    background: var(--soft);
}
.callout > i { color: var(--sb-teal); font-size: 1.15rem; }
.callout p { margin: 0; color: var(--text); }

/* Noticias */
.news__col { margin-bottom: var(--space-6); }
.news-card {
    display: flex;
    flex-direction: column;
    height: 100%;
    border-top: 1px solid var(--line-strong);
    transition: border-color var(--t-base);
}
.news-card:hover { border-top-color: var(--accent); }
.news-card__media { display: block; aspect-ratio: 16 / 10; overflow: hidden; background: var(--ink); margin-top: var(--space-5); }
.news-card__media img { width: 100%; height: 100%; object-fit: cover; filter: grayscale(.3); transition: transform .6s var(--ease), filter var(--t-base); }
.news-card:hover .news-card__media img { transform: scale(1.03); filter: none; }
.news-card__body { display: flex; flex-direction: column; flex: 1; padding-top: var(--space-5); }
.news-card__date {
    font-family: var(--mono);
    font-size: var(--fs-xs);
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--muted);
    margin-bottom: var(--space-3);
}
.news-card__title { font-size: var(--fs-lg); font-weight: 600; margin-bottom: var(--space-3); }
.news-card__title a { color: var(--text); }
.news-card__title a:hover { color: var(--sb-teal-deep); }
.news-card__excerpt { font-size: var(--fs-sm); color: var(--muted); margin-bottom: var(--space-5); }
.news-card__cta { margin-top: auto; display: inline-flex; align-items: center; gap: var(--space-2); font-size: var(--fs-sm); font-weight: 600; color: var(--text); }
.news-card__cta i { transition: transform var(--t-base); }
.news-card:hover .news-card__cta i { transform: translateX(4px); }

/* Ficha de noticia */
.single__hero {
    background-color: var(--ink);
    background-size: cover;
    background-position: center;
    padding-top: calc(var(--header-h) + var(--space-8));
    padding-bottom: var(--space-8);
    color: #fff;
}
.single__hero-inner { display: flex; flex-direction: column; gap: var(--space-3); }
.single__breadcrumb { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2); font-family: var(--mono); font-size: var(--fs-xs); color: var(--on-dark-muted); }
.single__breadcrumb a { color: var(--on-dark-muted); }
.single__breadcrumb a:hover { color: #fff; }
.single__breadcrumb i { font-size: 9px; opacity: .5; }
.single__titulo { font-size: clamp(1.9rem, 1.2rem + 2.4vw, 3.2rem); color: #fff; margin: 0; }
.single__subtitulo { font-size: var(--fs-lg); color: var(--on-dark-muted); margin: 0; }
.single__meta { display: flex; flex-wrap: wrap; gap: var(--space-5); font-size: var(--fs-sm); color: var(--on-dark-muted); }
.single__layout { display: grid; grid-template-columns: 1fr 300px; gap: var(--space-9); align-items: start; }
@media (max-width: 991.98px) { .single__layout { grid-template-columns: 1fr; } }
.single__extracto { font-size: var(--fs-lg); color: var(--muted); border-left: 2px solid var(--sb-teal); padding-left: var(--space-5); margin-bottom: var(--space-6); }
.single__body { font-size: var(--fs-md); }
.single__body h2 { font-size: 1.75rem; margin-top: var(--space-7); }
.single__body h3 { margin-top: var(--space-6); }
.single__body ul, .single__body ol { list-style: revert; padding-left: var(--space-6); margin-bottom: var(--space-4); }
.single__body img { margin-block: var(--space-5); }
.single__body blockquote { margin: var(--space-6) 0; padding: var(--space-4) var(--space-5); border-left: 2px solid var(--sb-teal); background: var(--soft); color: var(--muted); }
.single__galeria { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: var(--space-4); margin: var(--space-7) 0; }
.single__galeria-item { margin: 0; }
.single__galeria-item img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.single__galeria-item figcaption { font-size: var(--fs-xs); color: var(--muted); margin-top: var(--space-2); }
.single__tags { display: flex; flex-wrap: wrap; gap: var(--space-2); margin: var(--space-6) 0; padding-top: var(--space-5); border-top: 1px solid var(--line); }
.single__tag { padding: 4px 10px; border: 1px solid var(--line-strong); font-family: var(--mono); font-size: 11px; color: var(--muted); }
.single__autor { display: flex; gap: var(--space-4); padding: var(--space-5) 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); margin-top: var(--space-6); }
.single__autor-avatar { flex-shrink: 0; width: 52px; height: 52px; overflow: hidden; background: var(--soft); display: flex; align-items: center; justify-content: center; font-size: 1.75rem; color: var(--sb-teal); }
.single__autor-avatar img { width: 100%; height: 100%; object-fit: cover; }
.single__autor-info strong { display: block; margin-bottom: var(--space-1); }
.single__autor-info p { font-size: var(--fs-sm); color: var(--muted); }
.single__sidebar-card { position: sticky; top: calc(var(--header-h-s) + var(--space-5)); border-top: 1px solid var(--line-strong); padding-top: var(--space-5); }
.single__sidebar-title { font-family: var(--mono); font-size: var(--fs-xs); font-weight: 500; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); margin-bottom: var(--space-5); }
.single__sidebar-list { display: flex; flex-direction: column; gap: var(--space-4); }
.single__sidebar-list li { display: flex; gap: var(--space-3); }
.single__sidebar-list img { width: 70px; height: 50px; object-fit: cover; flex-shrink: 0; }
.single__sidebar-list a { display: block; font-size: var(--fs-sm); font-weight: 600; color: var(--text); line-height: 1.35; margin-bottom: var(--space-1); }
.single__sidebar-list a:hover { color: var(--sb-teal-deep); }
.single__sidebar-list time { font-size: var(--fs-xs); color: var(--muted); }

/* Página en preparación */
.page-stub__inner { max-width: 560px; padding-block: var(--space-7); }
.page-stub__icon { font-size: 2rem; color: var(--sb-teal); margin-bottom: var(--space-5); }
.page-stub h1 { font-size: var(--fs-h2); }
.page-stub .lead { margin-bottom: var(--space-7); }
