/* ==========================================================================
   TUBYCERO GDL — Sistema de diseño
   Un solo archivo, sin dependencias externas.
   ========================================================================== */

/* ---------- 1. Tokens ---------- */
:root {
  /* Marca */
  --ink:        #0a1729;
  --ink-2:      #10263f;
  --ink-3:      #1c3d5c;
  --steel:      #14344f;
  --accent:     #d92d20;
  --accent-dk:  #a4180f;
  --accent-lt:  #fef3f2;
  --amber:      #f59e0b;
  --ok:         #0f9d58;
  --wa:         #25d366;

  /* Neutros */
  --n0:  #ffffff;
  --n25: #fcfcfd;
  --n50: #f7f9fb;
  --n100:#eef2f6;
  --n200:#dfe5ec;
  --n300:#c5cfda;
  --n400:#98a5b5;
  --n500:#6b7a8d;
  --n600:#4d5a6b;
  --n700:#374252;
  --n800:#232d3b;
  --n900:#141c27;

  /* Tipografía */
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --fs-xs:   0.75rem;
  --fs-sm:   0.875rem;
  --fs-base: 1rem;
  --fs-lg:   1.0625rem;
  --fs-xl:   clamp(1.125rem, 0.4vw + 1.05rem, 1.25rem);
  --fs-h4:   clamp(1.125rem, 0.5vw + 1rem, 1.3rem);
  --fs-h3:   clamp(1.3rem,  0.9vw + 1.1rem, 1.75rem);
  --fs-h2:   clamp(1.65rem, 1.9vw + 1.15rem, 2.6rem);
  --fs-h1:   clamp(2rem,    4.2vw + 1rem,   3.9rem);

  /* Espaciado */
  --sp-1: .25rem;  --sp-2: .5rem;   --sp-3: .75rem;  --sp-4: 1rem;
  --sp-5: 1.5rem;  --sp-6: 2rem;    --sp-7: 2.5rem;  --sp-8: 3rem;
  --sp-9: 4rem;    --sp-10: 5rem;   --sp-11: 6.5rem;

  --section-y: clamp(3.25rem, 6vw, 6rem);
  --maxw: 1200px;
  --maxw-narrow: 780px;

  /* Forma */
  --r-sm: 6px;  --r-md: 10px;  --r-lg: 16px;  --r-xl: 22px;  --r-full: 999px;

  /* Sombra */
  --sh-xs: 0 1px 2px rgba(10,23,41,.06);
  --sh-sm: 0 1px 3px rgba(10,23,41,.08), 0 1px 2px rgba(10,23,41,.04);
  --sh-md: 0 4px 14px rgba(10,23,41,.09), 0 2px 4px rgba(10,23,41,.04);
  --sh-lg: 0 12px 32px rgba(10,23,41,.13), 0 4px 8px rgba(10,23,41,.05);
  --sh-xl: 0 24px 56px rgba(10,23,41,.18);

  --header-h: 78px;
}

/* ---------- 2. Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 12px);
}
body {
  font-family: var(--font);
  font-size: var(--fs-base);
  line-height: 1.65;
  color: var(--n700);
  background: var(--n0);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
img, video, svg { display: block; max-width: 100%; height: auto; }
/* <picture> es inline por defecto y rompe el centrado de su <img> interno */
picture { display: block; }
picture > img { display: block; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--steel); text-decoration: none; }
h1,h2,h3,h4,h5 { color: var(--ink); line-height: 1.2; font-weight: 800; letter-spacing: -.02em; }
h1 { font-size: var(--fs-h1); letter-spacing: -.035em; }
h2 { font-size: var(--fs-h2); letter-spacing: -.03em; }
h3 { font-size: var(--fs-h3); }
h4 { font-size: var(--fs-h4); font-weight: 700; }
p  { text-wrap: pretty; }
:where(h1,h2,h3,h4) { text-wrap: balance; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 3px; }
::selection { background: var(--ink); color: #fff; }

/* ---------- 3. Layout ---------- */
.wrap { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: clamp(1rem, 4vw, 2rem); }
.wrap-narrow { max-width: var(--maxw-narrow); }
.section { padding-block: var(--section-y); }
.section--tight { padding-block: clamp(2.25rem, 4vw, 3.5rem); }
.section--alt { background: var(--n50); }
.section--ink { background: var(--ink); color: var(--n300); }
.section--ink h2, .section--ink h3, .section--ink h4 { color: #fff; }
.section--line { border-top: 1px solid var(--n200); }

.grid { display: grid; gap: var(--sp-5); }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); }
.grid-4 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); }
.stack > * + * { margin-top: var(--sp-4); }
.flow > * + * { margin-top: var(--sp-5); }

/* ---------- 4. Encabezados de sección ---------- */
.eyebrow {
  display: inline-flex; align-items: center; gap: .5rem;
  font-size: var(--fs-xs); font-weight: 800; letter-spacing: .13em;
  text-transform: uppercase; color: var(--accent); margin-bottom: var(--sp-3);
}
.eyebrow::before { content: ""; width: 26px; height: 2px; background: var(--accent); border-radius: 2px; }
.section--ink .eyebrow { color: var(--amber); }
.section--ink .eyebrow::before { background: var(--amber); }

.sec-head { max-width: 46rem; margin-bottom: var(--sp-7); }
.sec-head.center { margin-inline: auto; text-align: center; }
.sec-head.center .eyebrow { justify-content: center; }
.sec-head p { font-size: var(--fs-xl); color: var(--n500); margin-top: var(--sp-3); }
.section--ink .sec-head p { color: var(--n300); }

.lead { font-size: var(--fs-xl); color: var(--n600); }

/* ---------- 5. Botones ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .55rem;
  padding: .8rem 1.5rem; border-radius: var(--r-full); border: 2px solid transparent;
  font-weight: 700; font-size: var(--fs-base); line-height: 1.2; cursor: pointer;
  transition: transform .15s ease, box-shadow .15s ease, background-color .15s ease, color .15s ease;
  text-align: center; min-height: 48px;
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }
.btn svg { width: 1.1em; height: 1.1em; flex: none; }
.btn--primary { background: var(--accent); color: #fff; box-shadow: var(--sh-md); }
.btn--primary:hover { background: var(--accent-dk); box-shadow: var(--sh-lg); }
.btn--dark { background: var(--ink); color: #fff; box-shadow: var(--sh-md); }
.btn--dark:hover { background: var(--ink-2); box-shadow: var(--sh-lg); }
.btn--ghost { border-color: var(--n300); color: var(--ink); background: #fff; }
.btn--ghost:hover { border-color: var(--ink); box-shadow: var(--sh-md); }
.btn--onink { border-color: rgba(255,255,255,.55); color: #fff; background: rgba(255,255,255,.06); }
.btn--onink:hover { background: #fff; color: var(--ink); border-color: #fff; }
.btn--wa { background: var(--wa); color: #06301a; box-shadow: var(--sh-md); }
.btn--wa:hover { background: #1eb857; }
.btn--lg { padding: 1rem 2rem; font-size: var(--fs-lg); min-height: 56px; }
.btn--block { width: 100%; }
.btn-row { display: flex; flex-wrap: wrap; gap: var(--sp-3); }
.sec-head.center + .btn-row, .btn-row.center { justify-content: center; }

/* ---------- 6. Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255,255,255,.94);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--n200);
  transition: box-shadow .2s ease;
}
.site-header.is-stuck { box-shadow: var(--sh-md); }
.nav { display: flex; align-items: center; gap: var(--sp-4); height: var(--header-h); }
.nav__logo { display: flex; align-items: center; flex: none; margin-right: auto; }
/* Nombre en letras: TUBYCERO en azul marino, GDL en rojo */
.nav__logo .wordmark {
  display: inline-flex; align-items: flex-start; gap: .18em;
  font-size: clamp(1.3rem, 2.4vw, 1.75rem);
  font-weight: 900; letter-spacing: .02em; line-height: 1;
  color: var(--ink); white-space: nowrap;
  transition: opacity .2s ease;
}
.nav__logo .wordmark em {
  font-style: normal; color: var(--accent);
  font-size: .5em; font-weight: 800; letter-spacing: .1em;
  margin-top: .12em;
}
.nav__logo:hover .wordmark { opacity: .78; }
@media (max-width: 420px) { .nav__logo .wordmark { font-size: 1.2rem; } }

.nav__links { display: flex; align-items: center; gap: .15rem; list-style: none; padding: 0; }
.nav__links a {
  display: block; padding: .55rem .8rem; border-radius: var(--r-sm);
  font-size: var(--fs-sm); font-weight: 600; color: var(--n600); white-space: nowrap;
  transition: background .15s, color .15s;
}
.nav__links a:hover { background: var(--n100); color: var(--ink); }
.nav__links a[aria-current="page"] { color: var(--accent); background: var(--accent-lt); }
.nav__cta { display: flex; gap: .5rem; flex: none; }
.nav__cta .btn { padding: .6rem 1.15rem; font-size: var(--fs-sm); min-height: 42px; }

.nav__burger {
  display: none; width: 46px; height: 46px; border: 1px solid var(--n200);
  background: #fff; border-radius: var(--r-md); cursor: pointer;
  align-items: center; justify-content: center; flex: none;
}
.nav__burger span { display: block; width: 20px; height: 2px; background: var(--ink); border-radius: 2px; position: relative; transition: .2s; }
.nav__burger span::before, .nav__burger span::after {
  content: ""; position: absolute; left: 0; width: 20px; height: 2px; background: var(--ink); border-radius: 2px; transition: .2s;
}
.nav__burger span::before { top: -6px; } .nav__burger span::after { top: 6px; }
body.nav-open .nav__burger span { background: transparent; }
body.nav-open .nav__burger span::before { top: 0; transform: rotate(45deg); }
body.nav-open .nav__burger span::after  { top: 0; transform: rotate(-45deg); }

/* Drawer móvil
   IMPORTANTE: este bloque debe ser HERMANO de <header>, nunca hijo.
   .site-header usa backdrop-filter, y esa propiedad convierte al elemento en
   bloque contenedor de sus descendientes position:fixed — el panel quedaría
   encajonado en los 68 px del encabezado en vez de ocupar la pantalla. */
.nav__drawer {
  position: fixed;
  top: var(--header-h); left: 0; right: 0; bottom: 0;
  height: auto;
  z-index: 99;
  background: #fff;
  padding: var(--sp-5) clamp(1rem,4vw,2rem) calc(var(--sp-8) + env(safe-area-inset-bottom));
  overflow-y: auto; -webkit-overflow-scrolling: touch; overscroll-behavior: contain;
  transform: translateX(100%); transition: transform .28s cubic-bezier(.4,0,.2,1);
  visibility: hidden;
  display: flex; flex-direction: column;
}
body.nav-open .nav__drawer { transform: none; visibility: visible; }
/* En escritorio el panel no debe existir aunque quede el marcado */
@media (min-width: 1051px) { .nav__drawer { display: none; } }
.nav__drawer .wordmark {
  display: inline-flex; align-items: flex-start; gap: .18em;
  font-size: 1.45rem; font-weight: 900; letter-spacing: .02em; line-height: 1;
  color: var(--ink); white-space: nowrap; margin-bottom: var(--sp-5);
}
.nav__drawer .wordmark em {
  font-style: normal; color: var(--accent);
  font-size: .5em; font-weight: 800; letter-spacing: .1em; margin-top: .12em;
}
.nav__drawer nav { flex: 1 0 auto; }
.nav__drawer ul { list-style: none; padding: 0; margin: 0; }
.nav__drawer li + li { border-top: 1px solid var(--n100); }
.nav__drawer a {
  display: flex; align-items: center; justify-content: space-between;
  padding: 1rem .25rem; font-size: 1.1rem; font-weight: 700; color: var(--ink);
}
.nav__drawer a[aria-current="page"] { color: var(--accent); }
.nav__drawer a::after { content: "›"; color: var(--n400); font-size: 1.4rem; }
.nav__drawer-cta { display: grid; gap: .75rem; margin-top: var(--sp-6); }
.nav__drawer-meta { margin-top: var(--sp-6); padding-top: var(--sp-5); border-top: 1px solid var(--n200); font-size: var(--fs-sm); color: var(--n500); }
.nav__drawer-meta a { display: block; padding: .3rem 0; font-size: var(--fs-base); font-weight: 600; color: var(--steel); }
.nav__drawer-meta a::after { content: none; }

/* ---------- 7. Hero ---------- */
.hero { position: relative; background: var(--ink); color: #fff; overflow: hidden; isolation: isolate; }
.hero__media { position: absolute; inset: 0; z-index: -2; }
.hero__media img, .hero__media video { width: 100%; height: 100%; object-fit: cover; }
.hero::after {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(180deg, rgba(10,23,41,.88) 0%, rgba(10,23,41,.78) 45%, rgba(10,23,41,.94) 100%);
}
.hero__inner { padding-block: clamp(3.5rem, 9vw, 7rem); max-width: 44rem; }

/* ---------- 7b. Hero con slider ---------- */
.heroslider { position: relative; background: var(--ink); color: #fff; overflow: hidden; isolation: isolate; }
.heroslider__track { position: absolute; inset: 0; z-index: 0; }
.heroslide {
  position: absolute; inset: 0; opacity: 0;
  transition: opacity 1s ease;
  will-change: opacity;
}
.heroslide.is-active { opacity: 1; }
.heroslide img, .heroslide video {
  position: absolute; inset: 0;
  width: 100%; height: 100%; object-fit: cover;
  animation: heroZoom 14s ease-out both;
}
/* El póster se mantiene debajo del video: si el video no pinta, se sigue viendo la foto */
.heroslide img { z-index: 1; transition: opacity .6s ease; }
.heroslide video { z-index: 2; }
.heroslide.is-active img, .heroslide.is-active video { animation-play-state: running; }
@keyframes heroZoom { from { transform: scale(1.12); } to { transform: scale(1); } }
.heroslider::after {
  content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background:
    linear-gradient(105deg, rgba(10,23,41,.96) 0%, rgba(10,23,41,.87) 42%, rgba(10,23,41,.5) 72%, rgba(10,23,41,.6) 100%),
    linear-gradient(180deg, rgba(10,23,41,.55) 0%, transparent 30%, rgba(10,23,41,.75) 100%);
}
/* Ojo: este div también lleva .wrap (1200px centrado). El ancho del texto se
   limita en los hijos para que quede alineado a la izquierda, no centrado. */
.heroslider__inner {
  position: relative; z-index: 2;
  padding-block: clamp(3.25rem, 8vw, 6.5rem);
  min-height: min(78svh, 640px);
  display: flex; flex-direction: column; justify-content: center;
  align-items: flex-start;
}
.heroslider__inner > * { max-width: 46rem; width: 100%; }
.heroslider h1 { color: #fff; margin-bottom: var(--sp-4); }
.heroslider h1 em { font-style: normal; color: var(--amber); }

/* Texto que cambia con cada diapositiva */
.herotext { position: relative; }
.herotext__item { display: none; }
.herotext__item.is-active { display: block; animation: heroTextIn .7s ease both; }
@keyframes heroTextIn { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

/* Controles */
.heroslider__nav {
  position: relative; z-index: 3;
  display: flex; align-items: center; gap: .75rem; margin-top: var(--sp-6);
}
.herodots { display: flex; gap: .5rem; list-style: none; padding: 0; margin: 0; }
.herodots button {
  width: 38px; height: 4px; border: 0; padding: 0; cursor: pointer; border-radius: 2px;
  background: rgba(255,255,255,.3); position: relative; overflow: hidden;
}
.herodots button[aria-selected="true"] { background: rgba(255,255,255,.35); }
.herodots button[aria-selected="true"]::after {
  content: ""; position: absolute; inset: 0; background: var(--amber);
  transform-origin: left; animation: heroBar var(--dur, 7s) linear both;
}
@keyframes heroBar { from { transform: scaleX(0); } to { transform: scaleX(1); } }
.heroslider.is-paused .herodots button[aria-selected="true"]::after { animation-play-state: paused; }
.heropause {
  width: 34px; height: 34px; border-radius: 50%; border: 1px solid rgba(255,255,255,.35);
  background: rgba(255,255,255,.08); color: #fff; cursor: pointer;
  display: grid; place-items: center; flex: none;
}
.heropause:hover { background: rgba(255,255,255,.2); }
.heropause svg { width: 13px; height: 13px; }
.heropause .ico-pausa { display: block; } .heropause .ico-play { display: none; }
.heroslider.is-paused .heropause .ico-pausa { display: none; }
.heroslider.is-paused .heropause .ico-play { display: block; }

@media (prefers-reduced-motion: reduce) {
  .heroslide img, .heroslide video { animation: none; transform: none; }
  .herodots button[aria-selected="true"]::after { animation: none; transform: none; }
  .herotext__item.is-active { animation: none; }
}
@media (max-width: 700px) {
  .heroslider::after {
    background: linear-gradient(180deg, rgba(10,23,41,.72) 0%, rgba(10,23,41,.82) 55%, rgba(10,23,41,.95) 100%);
  }
  .heroslider__inner { min-height: min(74svh, 560px); }
}

/* ---------- 7c. Banda de video a ancho completo ---------- */
.vband {
  position: relative; overflow: hidden; isolation: isolate;
  background: var(--ink); color: #fff;
}
.vband__media { position: absolute; inset: 0; z-index: -2; }
.vband__media picture, .vband__media img, .vband__media video {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
}
.vband__media img { transition: opacity .6s ease; }
.vband::after {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(100deg, rgba(10,23,41,.97) 0%, rgba(10,23,41,.92) 48%, rgba(10,23,41,.66) 100%);
}

/* ============================================================
   REGLA GLOBAL DE LEGIBILIDAD SOBRE FONDO OSCURO
   Todo lo que viva dentro de una superficie oscura va en blanco.
   OJO: aquí NO se toca --ink, porque .pagehero y .section--ink
   la usan como color de FONDO. Si se sobrescribe, el fondo se
   vuelve blanco y el texto desaparece.
   ============================================================ */
.vband :is(h1,h2,h3,h4,h5,b,strong),
.heroslider :is(h1,h2,h3,h4,h5,b,strong),
.pagehero :is(h1,h2,h3,h4,h5,b,strong),
.section--ink :is(h1,h2,h3,h4,h5) { color: #fff; }
.vband :is(p,li,span,div),
.heroslider :is(p,li),
.pagehero p { color: rgba(255,255,255,.87); }
.vband .eyebrow, .heroslider .eyebrow, .pagehero .eyebrow, .section--ink .eyebrow { color: var(--amber); }
.vband .eyebrow::before, .heroslider .eyebrow::before, .pagehero .eyebrow::before { background: var(--amber); }
/* Los botones conservan su propio color */
.vband .btn--primary, .heroslider .btn--primary, .pagehero .btn--primary { color: #fff; }
.vband .btn--wa, .heroslider .btn--wa { color: #06301a; }
.vband .btn--onink:hover, .heroslider .btn--onink:hover, .pagehero .btn--onink:hover { color: var(--ink-2); }

/* Sombra de apoyo SOLO donde hay foto o video detrás.
   En .pagehero el fondo es color plano: ahí la sombra ensucia el texto. */
.vband :is(h1,h2), .heroslider h1 {
  text-shadow: 0 2px 4px rgba(10,23,41,.65), 0 10px 32px rgba(10,23,41,.55);
}
.vband :is(p,.lead), .heroslider .hero__sub, .vband .crumbs {
  text-shadow: 0 1px 3px rgba(10,23,41,.6);
}
.pagehero :is(h1,h2,p,.crumbs) { text-shadow: none; }
.vband__inner { padding-block: clamp(3rem, 7vw, 5.5rem); max-width: 44rem; }
.vband h1, .vband h2 { color: #fff; }
.vband p { color: rgba(255,255,255,.85); }
.vband--tall .vband__inner { min-height: 60svh; display: flex; flex-direction: column; justify-content: center; }
@media (max-width: 700px) {
  .vband::after { background: linear-gradient(180deg, rgba(10,23,41,.8), rgba(10,23,41,.93)); }
}
.hero h1 { color: #fff; margin-bottom: var(--sp-4); }
.hero h1 em { font-style: normal; color: var(--amber); }
.hero__sub { font-size: clamp(1.05rem, 1vw + .85rem, 1.3rem); color: rgba(255,255,255,.86); margin-bottom: var(--sp-6); }
.hero .btn-row { margin-bottom: var(--sp-6); }
.hero__badges { display: flex; flex-wrap: wrap; gap: .5rem .5rem; list-style: none; padding: 0; }
.hero__badges li {
  display: inline-flex; align-items: center; gap: .4rem;
  padding: .4rem .85rem; border-radius: var(--r-full);
  background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.2);
  font-size: var(--fs-sm); font-weight: 600; color: #fff;
}
.hero__badges svg { width: 15px; height: 15px; color: var(--amber); flex: none; }

/* Hero interior (páginas de producto) */
.pagehero { background: var(--ink); color: #fff; padding-block: clamp(2.5rem, 5vw, 4.5rem); }
.pagehero h1 { color: #fff; max-width: 20ch; }
.pagehero p { color: rgba(255,255,255,.82); font-size: var(--fs-xl); max-width: 52ch; margin-top: var(--sp-4); }
.pagehero .btn-row { margin-top: var(--sp-6); }

/* Migas */
.crumbs { display: flex; flex-wrap: wrap; gap: .4rem; list-style: none; padding: 0; font-size: var(--fs-sm); margin-bottom: var(--sp-4); }
.crumbs li { color: rgba(255,255,255,.55); }
.crumbs li + li::before { content: "/"; margin-right: .4rem; color: rgba(255,255,255,.35); }
.crumbs a { color: rgba(255,255,255,.8); }
.crumbs a:hover { color: #fff; text-decoration: underline; }

/* ---------- 7d. Banda de marca ---------- */
.brandband {
  background: #fff;
  border-bottom: 1px solid var(--n200);
  padding-block: clamp(2.5rem, 5vw, 4rem);
  text-align: center;
}
.brandband picture { display: block; width: 100%; }
.brandband__logo {
  height: clamp(64px, 8.5vw, 100px); width: auto;
  margin-inline: auto;
  margin-bottom: clamp(1rem, 2vw, 1.5rem);
}
.brandband__claim { margin-inline: auto; }
.brandband__claim {
  font-size: clamp(1.05rem, 1.1vw + .85rem, 1.4rem);
  font-weight: 600; color: var(--n600);
  max-width: 46rem; margin: 0 auto; text-wrap: balance;
}
.brandband__claim b { color: var(--ink); font-weight: 800; }
.brandband__rule {
  width: 64px; height: 3px; background: var(--accent);
  border: 0; border-radius: 2px; margin: clamp(1.25rem,2.5vw,1.75rem) auto;
}
.brandband__marcas { margin-top: clamp(1.5rem, 3vw, 2.25rem); }
.brandband__marcas p {
  font-size: var(--fs-xs); font-weight: 800; letter-spacing: .14em;
  text-transform: uppercase; color: var(--n400); margin-bottom: var(--sp-4);
}
.brandband__marcas div {
  display: flex; flex-wrap: wrap; justify-content: center;
  align-items: center; gap: clamp(1.5rem, 5vw, 4rem);
}
.brandband__marcas picture { display: contents; }
.brandband__marcas img {
  height: clamp(30px, 4vw, 42px); width: auto;
  filter: grayscale(1); opacity: .55; transition: filter .25s, opacity .25s;
}
.brandband__marcas img:hover { filter: none; opacity: 1; }

/* ---------- 8. Tarjetas ---------- */
.card {
  background: #fff; border: 1px solid var(--n200); border-radius: var(--r-lg);
  padding: var(--sp-5); box-shadow: var(--sh-xs);
  transition: box-shadow .2s ease, transform .2s ease, border-color .2s ease;
}
.card--hover:hover { box-shadow: var(--sh-lg); transform: translateY(-3px); border-color: var(--n300); }
.card__icon {
  width: 46px; height: 46px; border-radius: var(--r-md);
  display: grid; place-items: center; background: var(--accent-lt); color: var(--accent);
  margin-bottom: var(--sp-4);
}
.card__icon svg { width: 23px; height: 23px; }
.card h3 { font-size: var(--fs-h4); margin-bottom: var(--sp-2); }
.card p  { color: var(--n500); font-size: var(--fs-base); }
.card--accent { background: var(--ink); border-color: var(--ink); color: var(--n300); }
.card--accent h3 { color: #fff; } .card--accent p { color: var(--n300); }
.card--accent .card__icon { background: rgba(245,158,11,.16); color: var(--amber); }

/* Tarjeta de producto */
.prod {
  display: flex; flex-direction: column; overflow: hidden;
  background: #fff; border: 1px solid var(--n200); border-radius: var(--r-lg);
  box-shadow: var(--sh-xs); transition: box-shadow .2s, transform .2s;
}
.prod:hover { box-shadow: var(--sh-lg); transform: translateY(-3px); }
.prod__img { aspect-ratio: 4/3; background: var(--n100); overflow: hidden; }
.prod__img img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
.prod:hover .prod__img img { transform: scale(1.05); }
.prod__body { padding: var(--sp-5); display: flex; flex-direction: column; gap: var(--sp-3); flex: 1; }
.prod__body h3 { font-size: var(--fs-h4); }
.prod__body p { color: var(--n500); font-size: var(--fs-sm); flex: 1; }
.prod__tags { display: flex; flex-wrap: wrap; gap: .35rem; list-style: none; padding: 0; }
.prod__tags li { font-size: var(--fs-xs); font-weight: 700; padding: .2rem .55rem; border-radius: var(--r-full); background: var(--n100); color: var(--n600); }
.prod__link { font-weight: 700; color: var(--accent); display: inline-flex; align-items: center; gap: .35rem; font-size: var(--fs-sm); }
.prod__link::after { content: "→"; transition: transform .2s; }
.prod:hover .prod__link::after { transform: translateX(4px); }

/* Lista de verificación */
.checks { list-style: none; padding: 0; display: grid; gap: .7rem; }
.checks li { display: grid; grid-template-columns: 22px 1fr; gap: .65rem; align-items: start; }
.checks li::before {
  content: ""; width: 20px; height: 20px; margin-top: 3px; border-radius: 50%;
  background: var(--ok) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E") center/12px no-repeat;
}
.section--ink .checks li { color: var(--n300); }

/* ---------- 9. Métricas ---------- */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 1px; background: var(--n200); border: 1px solid var(--n200); border-radius: var(--r-lg); overflow: hidden; }
.stats div { background: #fff; padding: var(--sp-5) var(--sp-4); text-align: center; }
.stats b { display: block; font-size: clamp(1.6rem, 3vw, 2.4rem); font-weight: 900; color: var(--ink); letter-spacing: -.04em; line-height: 1.1; }
.stats span { display: block; font-size: var(--fs-sm); color: var(--n500); margin-top: .3rem; font-weight: 600; }
.section--ink .stats { background: rgba(255,255,255,.14); border-color: rgba(255,255,255,.14); }
.section--ink .stats div { background: var(--ink); }
.section--ink .stats b { color: #fff; }
.section--ink .stats span { color: var(--n400); }

/* ---------- 10. Tablas técnicas ---------- */
.tablebox { border: 1px solid var(--n200); border-radius: var(--r-lg); overflow: hidden; background: #fff; box-shadow: var(--sh-xs); }
.tablebox__bar {
  display: flex; flex-wrap: wrap; gap: var(--sp-3); align-items: center; justify-content: space-between;
  padding: var(--sp-4); background: var(--n50); border-bottom: 1px solid var(--n200);
}
.tablebox__bar h3 { font-size: var(--fs-h4); }
.tablebox__tools { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; }
.tsearch { position: relative; }
.tsearch input {
  width: min(260px, 60vw); padding: .55rem .8rem .55rem 2.2rem;
  border: 1px solid var(--n300); border-radius: var(--r-full); background: #fff;
  font-size: var(--fs-sm); min-height: 42px;
}
.tsearch input:focus { border-color: var(--steel); outline: none; box-shadow: 0 0 0 3px rgba(20,52,79,.12); }
.tsearch svg { position: absolute; left: .75rem; top: 50%; transform: translateY(-50%); width: 16px; height: 16px; color: var(--n400); pointer-events: none; }
.tunit { display: inline-flex; border: 1px solid var(--n300); border-radius: var(--r-full); overflow: hidden; background: #fff; }
.tunit button { padding: .5rem .9rem; border: 0; background: none; font-size: var(--fs-sm); font-weight: 700; color: var(--n500); cursor: pointer; min-height: 42px; }
.tunit button[aria-pressed="true"] { background: var(--ink); color: #fff; }
.tunit--tramo button { padding: .5rem .75rem; font-size: var(--fs-xs); }
.tlabel { font-size: var(--fs-xs); font-weight: 700; color: var(--n500); text-transform: uppercase; letter-spacing: .05em; align-self: center; }

.tscroll { overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: thin; }
table.tech { width: 100%; border-collapse: collapse; font-size: var(--fs-sm); font-variant-numeric: tabular-nums; }
table.tech th, table.tech td { padding: .7rem .85rem; text-align: left; white-space: nowrap; }
table.tech thead th {
  position: sticky; top: 0; z-index: 2; background: var(--ink); color: #fff;
  font-size: var(--fs-xs); font-weight: 700; letter-spacing: .05em; text-transform: uppercase;
  border-bottom: 0;
}
table.tech thead th small { display: block; font-weight: 500; opacity: .65; text-transform: none; letter-spacing: 0; }
table.tech tbody tr { border-top: 1px solid var(--n100); }
table.tech tbody tr:nth-child(even) { background: var(--n25); }
table.tech tbody tr:hover { background: var(--accent-lt); }
table.tech td:first-child, table.tech th:first-child { font-weight: 700; color: var(--ink); position: sticky; left: 0; background: inherit; }
table.tech tbody tr.is-group td:first-child { background: var(--n100); }
table.tech tbody tr.grp { border-top: 2px solid var(--n300); }
table.tech .num { text-align: right; }
.tag-std { display: inline-block; padding: .1rem .45rem; border-radius: var(--r-sm); background: var(--ink); color: #fff; font-size: var(--fs-xs); font-weight: 700; }
.tag-xs  { background: var(--accent); }
.tag-sch { background: var(--n200); color: var(--n700); }
.tablebox__foot { padding: var(--sp-4); background: var(--n50); border-top: 1px solid var(--n200); font-size: var(--fs-sm); color: var(--n500); }
.tablebox__foot p + p { margin-top: .4rem; }
.tempty { padding: var(--sp-7); text-align: center; color: var(--n500); display: none; }
.tablebox.is-empty .tempty { display: block; }
.tablebox.is-empty .tscroll { display: none; }

/* Tabla → tarjetas compactas en móvil (2 columnas de datos por medida) */
@media (max-width: 700px) {
  table.tech.stackable thead { display: none; }
  table.tech.stackable, table.tech.stackable tbody { display: block; width: 100%; }
  table.tech.stackable tr {
    display: grid; grid-template-columns: 1fr 1fr; gap: 1px;
    background: var(--n200) !important;
    border: 1px solid var(--n200); border-radius: var(--r-md); overflow: hidden;
    margin: 0 var(--sp-4) var(--sp-3); padding: 0;
    box-shadow: var(--sh-xs);
  }
  table.tech.stackable tbody tr:first-child { margin-top: var(--sp-4); }
  table.tech.stackable td {
    display: flex; flex-direction: column; gap: .12rem; justify-content: center;
    background: var(--n0); padding: .6rem .75rem; white-space: normal;
    text-align: left !important; position: static !important;
    font-size: 1.02rem; font-weight: 700; color: var(--n800); line-height: 1.25;
  }
  table.tech.stackable td::before {
    content: attr(data-th); font-size: .62rem; font-weight: 700;
    color: var(--n500); text-transform: uppercase; letter-spacing: .07em;
  }
  table.tech.stackable td:first-child {
    grid-column: 1 / -1; flex-direction: row; align-items: baseline; gap: .55rem;
    background: var(--ink); color: #fff; font-size: 1.1rem; padding: .65rem .8rem;
  }
  table.tech.stackable td:first-child::before { display: none; }
  table.tech.stackable td:first-child .muted { color: rgba(255,255,255,.55); }
  /* En móvil se ocultan las columnas de consulta secundaria de la tabla por cédula */
  #t-cedula td:nth-child(6), #t-cedula td:nth-child(8) { display: none; }
  .tscroll { overflow: visible; max-height: none; }
}

/* ---------- 10b. Carrusel con arrastre ---------- */
.carousel { position: relative; }
.carousel__track {
  display: grid; grid-auto-flow: column;
  grid-auto-columns: min(84%, 340px);
  gap: var(--sp-4);
  overflow-x: auto; overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory; scroll-behavior: smooth;
  padding: 4px 4px var(--sp-4);
  scrollbar-width: none; -ms-overflow-style: none;
}
.carousel__track::-webkit-scrollbar { display: none; }
.carousel__track > * { scroll-snap-align: start; }
.carousel__track.is-dragging { scroll-behavior: auto; cursor: grabbing; scroll-snap-type: none; }
.carousel__track.is-dragging * { pointer-events: none; }
@media (min-width: 760px)  { .carousel__track { grid-auto-columns: minmax(0, calc(50% - var(--sp-4) / 2)); } }
@media (min-width: 1080px) { .carousel__track { grid-auto-columns: minmax(0, calc(25% - var(--sp-4) * 3 / 4)); } }
.carousel__bar { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-4); margin-top: var(--sp-2); }
.carousel__arrows { display: flex; gap: .5rem; }
.carousel__arrows button {
  width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--n300);
  background: #fff; color: var(--ink); cursor: pointer; display: grid; place-items: center;
  transition: background .15s, border-color .15s, opacity .15s;
}
.carousel__arrows button:hover:not(:disabled) { background: var(--ink); color: #fff; border-color: var(--ink); }
.carousel__arrows button:disabled { opacity: .35; cursor: default; }
.carousel__arrows svg { width: 17px; height: 17px; }
.carousel__rail { flex: 1; height: 4px; background: var(--n200); border-radius: 2px; overflow: hidden; max-width: 240px; }
.carousel__rail i { display: block; height: 100%; background: var(--accent); border-radius: 2px; transition: transform .2s ease; transform-origin: left; }
.carousel__hint { font-size: var(--fs-sm); color: var(--n500); }
@media (min-width: 1080px) { .carousel__hint { display: none; } }

/* ---------- 11. Galería y multimedia ---------- */
/* Mosaico con lightbox */
.mosaic {
  display: grid; gap: var(--sp-3);
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 180px), 1fr));
  grid-auto-rows: 150px;
}
.mosaic button {
  border: 0; padding: 0; margin: 0; cursor: zoom-in; overflow: hidden;
  border-radius: var(--r-md); background: var(--n100); position: relative;
  grid-column: span 1; grid-row: span 1;
}
.mosaic button img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.mosaic button:hover img { transform: scale(1.07); }
.mosaic button::after {
  content: ""; position: absolute; inset: 0; background: rgba(10,23,41,0); transition: background .25s;
}
.mosaic button:hover::after { background: rgba(10,23,41,.18); }
.mosaic .m-wide { grid-column: span 2; }
.mosaic .m-tall { grid-row: span 2; }
.mosaic .m-big  { grid-column: span 2; grid-row: span 2; }
@media (max-width: 640px) {
  .mosaic { grid-template-columns: repeat(2, 1fr); grid-auto-rows: 130px; }
  .mosaic .m-big { grid-column: span 2; grid-row: span 2; }
  .mosaic .m-wide { grid-column: span 2; grid-row: span 1; }
}

/* Lightbox */
.lbox {
  position: fixed; inset: 0; z-index: 200; display: none;
  background: rgba(6,14,25,.96); padding: env(safe-area-inset-top) 0 env(safe-area-inset-bottom);
}
.lbox[open], .lbox.is-open { display: grid; grid-template-rows: auto 1fr auto; }
.lbox__top { display: flex; justify-content: space-between; align-items: center; padding: .75rem 1rem; color: rgba(255,255,255,.7); font-size: var(--fs-sm); }
.lbox__fig { display: grid; place-items: center; padding: 0 1rem; min-height: 0; margin: 0; }
.lbox__fig img { max-width: 100%; max-height: 100%; width: auto; height: auto; object-fit: contain; border-radius: var(--r-sm); }
.lbox__cap { padding: .85rem 1.25rem 1.1rem; text-align: center; color: rgba(255,255,255,.85); font-size: var(--fs-sm); }
.lbox__btn {
  width: 46px; height: 46px; border-radius: 50%; border: 1px solid rgba(255,255,255,.25);
  background: rgba(255,255,255,.1); color: #fff; cursor: pointer; display: grid; place-items: center;
}
.lbox__btn:hover { background: rgba(255,255,255,.25); }
.lbox__btn svg { width: 18px; height: 18px; }
.lbox__prev, .lbox__next {
  position: absolute; top: 50%; transform: translateY(-50%); z-index: 2;
  width: 50px; height: 50px;
}
.lbox__prev { left: max(.75rem, 2vw); } .lbox__next { right: max(.75rem, 2vw); }
body.lbox-open { overflow: hidden; }


.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 240px), 1fr)); gap: var(--sp-4); }
.gallery figure { margin: 0; border-radius: var(--r-md); overflow: hidden; border: 1px solid var(--n200); background: #fff; }
.gallery img { aspect-ratio: 4/3; object-fit: cover; width: 100%; }
.gallery figcaption { padding: .7rem .9rem; font-size: var(--fs-sm); font-weight: 600; color: var(--n600); }

/* Video con carga diferida */
.vplayer { position: relative; border-radius: var(--r-md); overflow: hidden; background: var(--ink); cursor: pointer; border: 1px solid var(--n200); }
.vplayer--v { aspect-ratio: 9/16; }
.vplayer--h { aspect-ratio: 16/9; }
.vplayer--s { aspect-ratio: 1/1; }
.vplayer img, .vplayer video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.vplayer__btn {
  position: absolute; inset: 0; display: grid; place-items: center;
  background: linear-gradient(180deg, rgba(10,23,41,.05), rgba(10,23,41,.45));
  border: 0; cursor: pointer; transition: background .2s; width: 100%;
}
.vplayer__btn:hover { background: linear-gradient(180deg, rgba(10,23,41,.15), rgba(10,23,41,.6)); }
.vplayer__btn i {
  width: 58px; height: 58px; border-radius: 50%; background: rgba(255,255,255,.94);
  display: grid; place-items: center; box-shadow: var(--sh-lg); transition: transform .2s;
}
.vplayer__btn:hover i { transform: scale(1.09); }
.vplayer__btn svg { width: 22px; height: 22px; color: var(--accent); margin-left: 3px; }
.vplayer.is-playing .vplayer__btn { display: none; }
.vrow { display: grid; gap: var(--sp-4); grid-template-columns: repeat(auto-fill, minmax(min(100%, 200px), 1fr)); }
.vrow--h { grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); }

/* ---------- 11a. Galería flip (tarjeta que gira en dos mitades) ---------- */
.flipgal { display: grid; gap: var(--sp-5); justify-items: center; }
@media (min-width: 860px) {
  .flipgal { grid-template-columns: auto 1fr; align-items: center; gap: clamp(2rem,5vw,4rem); justify-items: start; }
}
.flipgal__marco {
  position: relative; padding: 10px; border-radius: var(--r-lg);
  background: var(--n100); border: 1px solid var(--n200); box-shadow: var(--sh-lg);
}
html[data-theme="dark"] .flipgal__marco { background: var(--n100); border-color: var(--n300); }
.flipgal__vis {
  position: relative; width: 270px; height: 380px; perspective: 900px;
  border-radius: var(--r-md); overflow: hidden; background: var(--ink);
}
@media (min-width: 620px) { .flipgal__vis { width: 330px; height: 460px; } }
.flipgal__vis > span {
  position: absolute; left: 0; width: 100%; height: 50%;
  overflow: hidden; background-size: cover; background-repeat: no-repeat;
  backface-visibility: hidden;
}
.fg-top, .fg-otop    { top: 0;    transform-origin: bottom; background-position: top center; }
.fg-bot, .fg-obot    { bottom: 0; transform-origin: top;    background-position: bottom center; }
.fg-otop, .fg-obot   { z-index: 2; }
/* línea de pliegue */
.flipgal__vis::after {
  content: ""; position: absolute; left: 0; top: 50%; width: 100%; height: 2px;
  transform: translateY(-50%); background: rgba(10,23,41,.55); z-index: 3; pointer-events: none;
}
.flipgal__pie {
  display: flex; align-items: center; justify-content: space-between;
  gap: var(--sp-4); margin-top: .8rem;
}
.flipgal__tit {
  font-size: var(--fs-sm); font-weight: 700; color: var(--n600);
  opacity: var(--fg-op, 1); transform: translateY(var(--fg-y, 0));
  transition: opacity .45s ease, transform .45s ease; min-height: 2.6em;
}
.flipgal__nums { font-size: var(--fs-xs); font-weight: 700; color: var(--n400); letter-spacing: .08em; }
.flipgal__btns { display: flex; gap: .5rem; }
.flipgal__btns button {
  width: 42px; height: 42px; border-radius: 50%; border: 1px solid var(--n300);
  background: var(--n0); color: var(--ink); cursor: pointer; display: grid; place-items: center;
  transition: background .18s, color .18s, border-color .18s, transform .18s;
}
.flipgal__btns button:hover { background: var(--ink); color: #fff; border-color: var(--ink); transform: scale(1.08); }
html[data-theme="dark"] .flipgal__btns button { background: var(--n100); color: var(--n900); border-color: var(--n300); }
html[data-theme="dark"] .flipgal__btns button:hover { background: var(--accent); border-color: var(--accent); color: #fff; }
.flipgal__btns svg { width: 19px; height: 19px; }
.flipgal__texto { max-width: 34rem; }
@media (prefers-reduced-motion: reduce) { .flipgal__vis > span { animation: none !important; } }

/* ---------- 11b. Vitrina de video (uno destacado + secundarios) ---------- */
.vshow { display: grid; gap: var(--sp-4); }
@media (min-width: 900px) {
  .vshow { grid-template-columns: 1.55fr 1fr; grid-template-rows: repeat(2, 1fr); }
  .vshow > :first-child { grid-row: 1 / -1; }
  .vshow > :first-child .vplayer { height: 100%; aspect-ratio: auto; }
}
.vshow figure { margin: 0; position: relative; border-radius: var(--r-lg); overflow: hidden; }
.vshow .vplayer { border-radius: var(--r-lg); border: 0; height: 100%; }
.vshow figcaption {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 3;
  padding: 2.6rem 1rem .9rem;
  background: linear-gradient(180deg, transparent, rgba(10,23,41,.9));
  color: #fff; font-size: var(--fs-sm); font-weight: 700; pointer-events: none;
  display: flex; align-items: center; gap: .5rem;
}
.vshow figcaption::before {
  content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); flex: none;
}
.vshow .vplayer.is-playing + figcaption { opacity: 0; transition: opacity .3s; }
.vshow figure:hover .vplayer__btn i { transform: scale(1.09); }

/* Media + texto */
.split { display: grid; gap: clamp(1.5rem, 4vw, 3.5rem); align-items: center; }
@media (min-width: 860px) { .split { grid-template-columns: 1fr 1fr; } .split--wide { grid-template-columns: 1.15fr .85fr; } .split.rev > :first-child { order: 2; } }
.split__media img, .split__media .vplayer { border-radius: var(--r-lg); box-shadow: var(--sh-md); }

/* ---------- 12. Acordeón / FAQ ---------- */
.acc { border: 1px solid var(--n200); border-radius: var(--r-lg); overflow: hidden; background: #fff; }
.acc details + details { border-top: 1px solid var(--n200); }
.acc summary {
  padding: 1.05rem var(--sp-5); font-weight: 700; color: var(--ink); cursor: pointer;
  display: flex; justify-content: space-between; align-items: center; gap: 1rem;
  list-style: none; font-size: var(--fs-lg);
}
.acc summary::-webkit-details-marker { display: none; }
.acc summary::after { content: "+"; font-size: 1.5rem; font-weight: 400; color: var(--accent); flex: none; transition: transform .2s; }
.acc details[open] summary::after { transform: rotate(45deg); }
.acc summary:hover { background: var(--n50); }
.acc__body { padding: 0 var(--sp-5) 1.15rem; color: var(--n500); }
.acc__body > * + * { margin-top: .7rem; }

/* ---------- 13. Formulario ---------- */
.form { display: grid; gap: var(--sp-4); }
.field { display: grid; gap: .35rem; }
.field label { font-size: var(--fs-sm); font-weight: 700; color: var(--ink); }
.field label span { color: var(--accent); }
.field input, .field select, .field textarea {
  width: 100%; padding: .8rem 1rem; border: 1px solid var(--n300); border-radius: var(--r-md);
  background: #fff; font-size: var(--fs-base); min-height: 50px; transition: border-color .15s, box-shadow .15s;
}
.field textarea { min-height: 130px; resize: vertical; line-height: 1.6; }
.field select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236b7a8d' stroke-width='2.5' stroke-linecap='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 1rem center; background-size: 16px; padding-right: 2.6rem; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--steel); box-shadow: 0 0 0 3px rgba(20,52,79,.13); }
.field small { font-size: var(--fs-xs); color: var(--n500); }
.field.invalid input, .field.invalid select, .field.invalid textarea { border-color: var(--accent); }
.field .err { font-size: var(--fs-xs); color: var(--accent); font-weight: 600; display: none; }
.field.invalid .err { display: block; }
.form-row { display: grid; gap: var(--sp-4); }
@media (min-width: 620px) { .form-row { grid-template-columns: 1fr 1fr; } }
/* Casilla de consentimiento */
.consent {
  display: grid; grid-template-columns: auto 1fr; gap: .7rem; align-items: start;
  font-weight: 400 !important; font-size: var(--fs-sm); color: var(--n600);
  cursor: pointer; padding: .85rem 1rem; border: 1px solid var(--n200);
  border-radius: var(--r-md); background: var(--n50); transition: border-color .15s, background .15s;
}
.consent:hover { border-color: var(--n300); }
.consent input[type="checkbox"] {
  width: 20px; height: 20px; min-height: 0; margin-top: 2px; accent-color: var(--accent);
  cursor: pointer; flex: none;
}
.consent a { color: var(--steel); text-decoration: underline; font-weight: 600; }
.consent b { color: var(--accent); }
.field.invalid .consent { border-color: var(--accent); background: var(--accent-lt); }

.chips { display: flex; flex-wrap: wrap; gap: .5rem; }
.chips input { position: absolute; opacity: 0; width: 0; height: 0; }
.chips label {
  padding: .55rem 1rem; border: 1px solid var(--n300); border-radius: var(--r-full);
  font-size: var(--fs-sm); font-weight: 600; cursor: pointer; background: #fff; transition: .15s; color: var(--n600);
}
.chips input:checked + label { background: var(--ink); color: #fff; border-color: var(--ink); }
.chips input:focus-visible + label { outline: 3px solid var(--accent); outline-offset: 2px; }

/* Panel de contacto */
.contact-panel { background: #fff; border: 1px solid var(--n200); border-radius: var(--r-lg); padding: clamp(1.25rem, 3vw, 2rem); box-shadow: var(--sh-md); }
.contact-list { list-style: none; padding: 0; display: grid; gap: var(--sp-4); }
.contact-list li { display: grid; grid-template-columns: 42px 1fr; gap: .9rem; align-items: start; }
.contact-list i { width: 42px; height: 42px; border-radius: var(--r-md); background: rgba(255,255,255,.1); display: grid; place-items: center; }
.contact-list svg { width: 19px; height: 19px; color: var(--amber); }
.contact-list b { display: block; color: #fff; font-size: var(--fs-base); }
.contact-list a, .contact-list span { color: var(--n300); font-size: var(--fs-sm); }
.contact-list a:hover { color: #fff; text-decoration: underline; }

/* ---------- 14. Aviso / notas ---------- */
.note {
  display: grid; grid-template-columns: 22px 1fr; gap: .75rem;
  padding: var(--sp-4) var(--sp-5); border-radius: var(--r-md);
  background: var(--n50); border: 1px solid var(--n200); font-size: var(--fs-sm); color: var(--n600);
}
.note svg { width: 20px; height: 20px; color: var(--steel); margin-top: 2px; }
.note--warn { background: #fffbeb; border-color: #fde68a; color: #78350f; }
.note--warn svg { color: var(--amber); }
.note b { color: var(--ink); }
.note--warn b { color: #78350f; }

/* ---------- 15. Footer ---------- */
.site-footer { background: var(--ink); color: var(--n400); padding-block: var(--sp-8) var(--sp-5); }
.footer-grid { display: grid; gap: var(--sp-6); grid-template-columns: repeat(auto-fit, minmax(min(100%, 210px), 1fr)); }
.footer-grid > div:first-child { grid-column: 1 / -1; }
@media (min-width: 900px) { .footer-grid { grid-template-columns: 1.6fr 1fr 1fr 1.2fr; } .footer-grid > div:first-child { grid-column: auto; } }
.site-footer img.flogo { height: 78px; width: auto; margin-bottom: var(--sp-5); }
.site-footer h4 { color: #fff; font-size: var(--fs-sm); text-transform: uppercase; letter-spacing: .1em; margin-bottom: var(--sp-4); }
.site-footer ul { list-style: none; padding: 0; display: grid; gap: .6rem; }
.site-footer a { color: var(--n400); font-size: var(--fs-sm); }
.site-footer a:hover { color: #fff; }
.site-footer p { font-size: var(--fs-sm); }
.social { display: flex; gap: .6rem; margin-top: var(--sp-4); }
.social a { width: 40px; height: 40px; border-radius: var(--r-md); background: rgba(255,255,255,.08); display: grid; place-items: center; transition: background .2s; }
.social a:hover { background: var(--accent); }
.social svg { width: 18px; height: 18px; color: #fff; }
.footer-bottom {
  margin-top: var(--sp-7); padding-top: var(--sp-5); border-top: 1px solid rgba(255,255,255,.1);
  display: flex; flex-wrap: wrap; gap: var(--sp-3); justify-content: space-between; font-size: var(--fs-sm);
}

/* ---------- 16. Barra de acción móvil ---------- */

/* Barra de acción móvil */
.mobilebar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 95; display: none;
  grid-template-columns: 1fr 1fr; gap: .5rem; padding: .55rem .7rem calc(.55rem + env(safe-area-inset-bottom));
  background: rgba(255,255,255,.96); backdrop-filter: blur(12px); border-top: 1px solid var(--n200);
}
.mobilebar .btn { min-height: 46px; font-size: var(--fs-sm); padding: .6rem 1rem; }
@media (max-width: 700px) {
  .mobilebar { display: grid; }
  body { padding-bottom: 68px; }
}

/* ---------- 16b. Detalles de última generación ---------- */

/* Barra de progreso de lectura (arriba del todo) */
.scrollbar-progreso {
  position: fixed; top: 0; left: 0; height: 3px; width: 100%;
  transform-origin: 0 50%; transform: scaleX(0);
  background: linear-gradient(90deg, var(--accent), var(--amber));
  z-index: 300; pointer-events: none;
}

/* Encabezado fijo dentro de las tablas largas */
.tscroll { max-height: min(72vh, 640px); overflow: auto; }
.tscroll thead th {
  position: sticky; top: 0; z-index: 5;
  background: var(--n50);
  box-shadow: 0 1px 0 var(--n200);
}

/* Destello al pasar por el botón principal */
.btn--primary { position: relative; overflow: hidden; }
.btn--primary::after {
  content: ""; position: absolute; top: 0; bottom: 0; width: 40%;
  left: -60%; transform: skewX(-20deg);
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.35), transparent);
  transition: none; pointer-events: none;
}
.btn--primary:hover::after { left: 130%; transition: left .55s ease; }

/* Borde con acento al pasar por tarjetas de producto */
.prod { position: relative; }
.prod::before {
  content: ""; position: absolute; inset: 0; border-radius: inherit;
  border: 2px solid transparent; pointer-events: none;
  transition: border-color .25s ease;
}
.prod:hover::before { border-color: var(--accent); }

/* Botón volver arriba */
.btn-arriba {
  position: fixed; right: 18px; bottom: 22px; z-index: 94;
  width: 46px; height: 46px; border-radius: 50%;
  border: 1px solid var(--n200); background: rgba(255,255,255,.92);
  backdrop-filter: blur(8px); color: var(--ink); cursor: pointer;
  display: grid; place-items: center; box-shadow: var(--sh-md);
  opacity: 0; visibility: hidden; transform: translateY(8px);
  transition: opacity .25s, transform .25s, visibility .25s;
}
.btn-arriba.visible { opacity: 1; visibility: visible; transform: none; }
.btn-arriba svg { width: 20px; height: 20px; }
@media (max-width: 700px) { .btn-arriba { bottom: 80px; right: 14px; } }
body.nav-open .btn-arriba, body.lbox-open .btn-arriba { display: none; }

@media (prefers-reduced-motion: reduce) {
  .scrollbar-progreso { display: none; }
  .btn--primary::after { display: none; }
}

/* ---------- 17. Animación ---------- */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s ease, transform .6s ease; }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
  .reveal { opacity: 1; transform: none; }
}

/* ---------- 18. Utilidades ---------- */
.center { text-align: center; }
.mt-0 { margin-top: 0; } .mt-2 { margin-top: var(--sp-2); } .mt-3 { margin-top: var(--sp-3); }
.mt-4 { margin-top: var(--sp-4); } .mt-5 { margin-top: var(--sp-5); }
.mt-6 { margin-top: var(--sp-6); } .mt-7 { margin-top: var(--sp-7); }
.muted { color: var(--n500); }
.small { font-size: var(--fs-sm); }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.skip {
  position: absolute; left: -9999px; top: 0; z-index: 200; padding: .8rem 1.2rem;
  background: var(--ink); color: #fff; font-weight: 700; border-radius: 0 0 var(--r-md) 0;
}
.skip:focus { left: 0; }

/* ---------- 19. Responsive nav ---------- */
@media (max-width: 1050px) {
  .nav__links { display: none; }
  .nav__burger { display: flex; }
  .nav__cta .btn--cot { display: none; }
}
@media (max-width: 520px) {
  .nav__cta { display: none; }
  .nav__logo .wordmark { font-size: 1.1rem; }
}
body.nav-open { overflow: hidden; }
/* Con el menú abierto, nada debe flotar encima */
body.nav-open .mobilebar { display: none; }

/* ---------- 20. Modo noche ----------
   El sitio entero está construido sobre variables; aquí se remapea la escala
   de neutros y se corrigen los fondos blancos fijos. --ink NO se toca: sigue
   siendo el azul marino de fondos oscuros (header de tablas, footer, heroes). */
:root { color-scheme: light; }
html[data-theme="dark"] { color-scheme: dark; }
html[data-theme="dark"] {
  --n0:  #0c1420;
  --n25: #101927;
  --n50: #131e2e;
  --n100:#1c2a3d;
  --n200:#2a3b52;
  --n300:#3d5271;
  --n400:#7188a3;
  --n500:#9aabc2;
  --n600:#b8c6d9;
  --n700:#cfdae9;
  --n800:#e4ecf6;
  --n900:#f4f7fb;
  --steel:#9db8d2;
  --accent-lt:#38160f;
}
html[data-theme="dark"] body { background: var(--n0); }
html[data-theme="dark"] h1, html[data-theme="dark"] h2,
html[data-theme="dark"] h3, html[data-theme="dark"] h4,
html[data-theme="dark"] h5 { color: var(--n900); }
/* Los heroes y bandas oscuras conservan su blanco explícito */
html[data-theme="dark"] .vband h1, html[data-theme="dark"] .vband h2,
html[data-theme="dark"] .heroslider h1, html[data-theme="dark"] .pagehero h1,
html[data-theme="dark"] .section--ink h2, html[data-theme="dark"] .section--ink h3 { color: #fff; }
/* Textos con color fijo en línea (negritas de tarjetas, pasos numerados) */
html[data-theme="dark"] [style*="var(--ink)"] { color: var(--n900) !important; }

/* Superficies que eran blanco fijo */
html[data-theme="dark"] .card,
html[data-theme="dark"] .prod,
html[data-theme="dark"] .tablebox,
html[data-theme="dark"] .acc,
html[data-theme="dark"] .gallery figure,
html[data-theme="dark"] .contact-panel,
html[data-theme="dark"] .stats div { background: var(--n50); }
html[data-theme="dark"] .brandband { background: var(--n25); border-color: var(--n200); }
html[data-theme="dark"] .tsearch input,
html[data-theme="dark"] .tunit,
html[data-theme="dark"] .chips label,
html[data-theme="dark"] .field input,
html[data-theme="dark"] .field select,
html[data-theme="dark"] .field textarea,
html[data-theme="dark"] .carousel__arrows button,
html[data-theme="dark"] .nav__burger,
html[data-theme="dark"] .btn--ghost { background: var(--n100); color: var(--n800); border-color: var(--n300); }
html[data-theme="dark"] .site-header { background: rgba(12,20,32,.92); }
html[data-theme="dark"] .nav__drawer { background: var(--n0); }
html[data-theme="dark"] .nav__drawer a { color: var(--n800); }
html[data-theme="dark"] .mobilebar { background: rgba(12,20,32,.95); }
html[data-theme="dark"] .wordmark { color: var(--n900); }
html[data-theme="dark"] .nav__burger span,
html[data-theme="dark"] .nav__burger span::before,
html[data-theme="dark"] .nav__burger span::after { background: var(--n800); }
body.nav-open html[data-theme="dark"] .nav__burger span { background: transparent; }
html[data-theme="dark"] .acc summary { color: var(--n900); }
html[data-theme="dark"] .field label { color: var(--n800); }
html[data-theme="dark"] .stats b { color: var(--n900); }
html[data-theme="dark"] .brandband__claim b { color: var(--n900); }
html[data-theme="dark"] table.tech td:first-child { color: var(--n900); }
html[data-theme="dark"] .btn-arriba { background: rgba(19,30,46,.92); color: var(--n800); border-color: var(--n300); }
html[data-theme="dark"] .note--warn { background: #2c2310; border-color: #57451c; color: #ecd9a0; }
html[data-theme="dark"] .note--warn b { color: #f5e4b5; }
/* Logos oscuros sobre fondo oscuro: se pasan a blanco */
html[data-theme="dark"] .brandband__logo,
html[data-theme="dark"] .brandband__marcas img { filter: brightness(0) invert(1); opacity: .85; }
html[data-theme="dark"] .brandband__marcas img:hover { filter: brightness(0) invert(1); opacity: 1; }
html[data-theme="dark"] ::selection { background: var(--amber); color: #0a1729; }

/* Faltantes detectados en el barrido */
html[data-theme="dark"] .site-footer { background: #070d16; }
html[data-theme="dark"] .section--alt { background: var(--n25); }
html[data-theme="dark"] .section--line { border-color: var(--n200); }
html[data-theme="dark"] .mosaic button { background: var(--n100); }
html[data-theme="dark"] .vplayer { border-color: var(--n200); }
html[data-theme="dark"] .note { background: var(--n50); border-color: var(--n200); color: var(--n600); }
html[data-theme="dark"] .note b { color: var(--n900); }
html[data-theme="dark"] .note svg { color: var(--n500); }
html[data-theme="dark"] .checks li { color: var(--n600); }
html[data-theme="dark"] .prod__tags li { background: var(--n100); color: var(--n600); }
html[data-theme="dark"] .prod__body p { color: var(--n500); }
html[data-theme="dark"] .card p { color: var(--n500); }
html[data-theme="dark"] .acc__body { color: var(--n600); }
html[data-theme="dark"] .acc summary:hover { background: var(--n100); }
html[data-theme="dark"] .acc details + details { border-color: var(--n200); }
html[data-theme="dark"] .tablebox__bar { background: var(--n25); border-color: var(--n200); }
html[data-theme="dark"] .tablebox__foot { background: var(--n25); border-color: var(--n200); color: var(--n500); }
html[data-theme="dark"] table.tech tbody tr:nth-child(even) { background: var(--n25); }
html[data-theme="dark"] table.tech tbody tr:hover { background: #2a1512; }
html[data-theme="dark"] table.tech tbody tr { border-color: var(--n200); }
html[data-theme="dark"] .tag-sch { background: var(--n200); color: var(--n800); }
html[data-theme="dark"] .tunit button[aria-pressed="true"] { background: var(--accent); color: #fff; }
html[data-theme="dark"] .chips input:checked + label { background: var(--accent); border-color: var(--accent); color: #fff; }
html[data-theme="dark"] .consent { background: var(--n100); border-color: var(--n300); color: var(--n600); }
html[data-theme="dark"] .field small { color: var(--n500); }
html[data-theme="dark"] .stats { background: var(--n200); border-color: var(--n200); }
html[data-theme="dark"] .stats span { color: var(--n500); }
html[data-theme="dark"] .gallery figcaption { color: var(--n600); }
html[data-theme="dark"] .crumbs a { color: rgba(255,255,255,.85); }
html[data-theme="dark"] .btn--dark { background: var(--n100); color: var(--n900); }
html[data-theme="dark"] .btn--dark:hover { background: var(--n200); }
html[data-theme="dark"] .carousel__rail { background: var(--n200); }
html[data-theme="dark"] .skip { background: var(--accent); }
/* En móvil, las tarjetas de tabla también se oscurecen */
@media (max-width: 700px) {
  html[data-theme="dark"] table.tech.stackable tr { background: var(--n200) !important; border-color: var(--n200); }
  html[data-theme="dark"] table.tech.stackable td { background: var(--n50); color: var(--n800); }
  html[data-theme="dark"] table.tech.stackable td::before { color: var(--n500); }
}

/* Botón de tema (sol/luna) */
.theme-toggle {
  width: 42px; height: 42px; border-radius: 50%; flex: none;
  border: 1px solid var(--n200); background: var(--n0); color: var(--ink);
  display: grid; place-items: center; cursor: pointer;
  transition: background .2s, border-color .2s, transform .15s;
}
.theme-toggle:hover { border-color: var(--n400); transform: translateY(-1px); }
.theme-toggle svg { width: 19px; height: 19px; }
.theme-toggle .ico-sol { display: none; }
.theme-toggle .ico-luna { display: block; }
html[data-theme="dark"] .theme-toggle { background: var(--n100); color: var(--amber); border-color: var(--n300); }
html[data-theme="dark"] .theme-toggle .ico-sol { display: block; }
html[data-theme="dark"] .theme-toggle .ico-luna { display: none; }
