/* Sitio público · sigue sistec-design.json (Brand Book SISTEC 2026 v1.0) */
:root {
  /* color.primario / color.apoyo — un solo rojo */
  --rojo: #AD2925;
  --rojo-osc: #7A1C1A;
  --rojo-cla: #D54B45;
  --negro: #1A1A1A;
  --gris-osc: #404040;
  --gris-med: #808080;
  --gris-cla: #D9D9D9;
  --gris-fondo: #F5F5F5;
  --blanco: #FFFFFF;

  --titular: "Montserrat", sans-serif;
  --cuerpo: "Inter", sans-serif;
  --wrap: 1240px;
  --seccion: clamp(80px, 10vw, 140px);
  --ease: cubic-bezier(.65, 0, .35, 1);
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; background: var(--blanco); color: var(--negro);
  font-family: var(--cuerpo); font-size: 17px; line-height: 1.6;
  -webkit-font-smoothing: antialiased; overflow-x: hidden;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; }
h1, h2, h3 { margin: 0; font-family: var(--titular); line-height: 1.08; letter-spacing: -.015em; }
p { margin: 0; }
.defs { position: absolute; }
.wrap { width: min(var(--wrap), 100% - 32px); margin-inline: auto; }
.rojo { color: var(--rojo); }

.skip { position: absolute; left: 16px; top: -60px; z-index: 100; background: var(--rojo); color: var(--blanco); padding: 10px 16px; font-weight: 600; }
.skip:focus { top: 16px; }
:focus-visible { outline: 2px solid var(--rojo); outline-offset: 3px; }

/* Tipografía de marca */
.eyebrow {
  font-family: var(--titular); font-weight: 700; font-size: 12.5px; letter-spacing: .22em;
  text-transform: uppercase; color: var(--rojo);
}
.subtitulo { margin-top: 14px; font-style: italic; color: var(--gris-osc); font-size: clamp(17px, 1.6vw, 20px); }

/* CTA: Montserrat 700, mayúsculas, blanco sobre rojo; hover rojo oscuro. Esquinas rectas, sin sombra. */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 52px; padding: 0 28px; border: 1.5px solid var(--rojo);
  background: var(--rojo); color: var(--blanco); text-decoration: none;
  font-family: var(--titular); font-weight: 700; font-size: 14.5px; letter-spacing: .08em; text-transform: uppercase;
  transition: background .2s, border-color .2s, color .2s; white-space: nowrap;
}
.btn:hover { background: var(--rojo-osc); border-color: var(--rojo-osc); }
.btn-linea { background: transparent; color: var(--negro); border-color: var(--negro); }
.btn-linea:hover { background: var(--negro); border-color: var(--negro); color: var(--blanco); }
.btn-sm { min-height: 42px; padding: 0 18px; font-size: 12.5px; }

/* NAV */
.nav { position: fixed; inset: 0 0 auto; z-index: 50; background: var(--blanco); border-bottom: 1px solid transparent; transition: border-color .3s; }
.nav.solid { border-color: var(--gris-cla); }
.nav-in { display: flex; align-items: center; gap: 24px; height: 76px; }
.brand { display: block; padding: 6px; } /* espacio de protección */
.logo { width: 52px; height: 52px; }
.nav nav { margin-left: auto; }
.nav-links { display: flex; gap: 4px; list-style: none; margin: 0; padding: 0; }
.nav-links a { display: block; padding: 10px 14px; text-decoration: none; font-family: var(--titular); font-weight: 500; font-size: 15px; color: var(--gris-osc); border-bottom: 2px solid transparent; }
.nav-links a:hover { color: var(--negro); border-color: var(--rojo); }

/* HERO */
.hero { padding: 140px 0 0; }
.hero-in { display: grid; grid-template-columns: 1.15fr 1fr; gap: clamp(32px, 6vw, 96px); align-items: center; }
.hero h1 { margin-top: 20px; font-size: clamp(36px, 4.4vw, 64px); font-weight: 700; letter-spacing: -.03em; line-height: 1.02; }
.lead { margin-top: 22px; max-width: 54ch; color: var(--gris-osc); font-size: clamp(17px, 1.4vw, 19px); }
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 34px; }

/* Transición de identidad */
.evolucion { margin: 0; display: grid; justify-items: center; gap: 18px; }
.escenario { position: relative; width: min(100%, 460px); aspect-ratio: 1; }
.logo-viejo, .logo-nuevo { position: absolute; }
.logo-viejo { inset: 0; width: 100%; height: 100%; overflow: visible; }
.logo-nuevo { inset: 10%; width: 80%; height: 80%; } /* aire alrededor del logo */
.onda { position: absolute; inset: 10%; border-radius: 50%; border: 2px solid var(--rojo); opacity: 0; pointer-events: none; }

/* Estado final por defecto (y con movimiento reducido): solo el logo nuevo, nunca ambos */
.rayo { transform-box: view-box; transform-origin: 50% 50%; transform: scale(0); }
.marca-vieja { opacity: 0; }
.caps { display: grid; justify-items: center; }
.caps > * { grid-area: 1 / 1; }
.cap-viejo { visibility: hidden; }

.play .rayo { animation: rayo 5s var(--ease) both; }
.play .r2 { animation-delay: .06s; }
.play .r3 { animation-delay: .12s; }
.play .r4 { animation-delay: .18s; }
.play .r5 { animation-delay: .24s; }
.play .marca-vieja { animation: marca-vieja 5s var(--ease) both; }
.play .onda { animation: onda 5s ease-out both; }
.play .logo-nuevo { animation: revela 5s var(--ease) both; }
.evolucion:has(.play) .cap-viejo { animation: cap-sale 5s steps(1) both; }
.evolucion:has(.play) .cap-nuevo { animation: cap-entra 5s steps(1) both; }

@keyframes rayo {
  0%, 30% { transform: none; }
  52%, 100% { transform: rotate(-30deg) scale(0); }
}
@keyframes marca-vieja {
  0%, 26% { opacity: 1; transform: none; }
  40%, 100% { opacity: 0; transform: translateY(120px); }
}
@keyframes onda {
  0%, 52% { opacity: 0; transform: scale(.05); }
  54% { opacity: 1; }
  74%, 100% { opacity: 0; transform: scale(1.35); }
}
/* El logo nuevo se descubre con máscara: sin escalar, rotar ni transparencia */
@keyframes revela {
  0%, 56% { clip-path: circle(0% at 50% 50%); }
  76%, 100% { clip-path: circle(52% at 50% 50%); }
}
@keyframes cap-sale { 0% { visibility: visible; } 50%, 100% { visibility: hidden; } }
@keyframes cap-entra { 0% { visibility: hidden; } 60%, 100% { visibility: visible; } }

.evolucion figcaption { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 8px 18px; }
.cap { font-family: var(--titular); font-weight: 600; font-size: 14px; color: var(--gris-osc); }
.cap-nuevo { color: var(--rojo); }
.repetir {
  font: inherit; font-size: 14px; color: var(--gris-osc); background: none; border: 0; padding: 6px 0;
  border-bottom: 1px solid var(--gris-cla); cursor: pointer;
}
.repetir:hover { color: var(--rojo); border-color: var(--rojo); }

/* Datos */
.datos { display: grid; grid-template-columns: repeat(2, minmax(0, 320px)); list-style: none; margin: clamp(56px, 7vw, 96px) 0 0; padding: 0; border-top: 1px solid var(--gris-cla); }
.datos li { padding: 28px 24px 36px 0; }
.datos li + li { padding-left: 24px; border-left: 1px solid var(--gris-cla); }
.datos b { display: block; font-family: var(--titular); font-weight: 800; font-size: clamp(36px, 4vw, 56px); line-height: 1; color: var(--rojo); letter-spacing: -.03em; }
.datos span { display: block; margin-top: 10px; color: var(--gris-osc); font-size: 15px; }

/* SECCIONES */
.section { padding: var(--seccion) 0; }
.gris { background: var(--gris-fondo); }
.section-head { margin-bottom: clamp(36px, 5vw, 64px); max-width: 860px; }
.section-head h2, .contact h2 { margin-top: 16px; font-size: clamp(32px, 4.4vw, 58px); font-weight: 600; letter-spacing: -.025em; }
.section-head h2::before, .contact h2::before { /* barra de acento */
  content: ""; display: block; width: 56px; height: 6px; background: var(--rojo); margin-bottom: 22px;
}

/* BENTO */
.bento {
  display: grid; gap: 0; grid-template-columns: repeat(6, 1fr);
  grid-template-areas:
    "seg seg seg red red red"
    "seg seg seg ene ene ene"
    "com com col col srv srv";
  border-top: 1px solid var(--gris-cla); border-left: 1px solid var(--gris-cla);
}
.t-seg { grid-area: seg; min-height: 580px; }
.t-red { grid-area: red; }
.t-ene { grid-area: ene; }
.t-com { grid-area: com; }
.t-col { grid-area: col; }
.t-srv { grid-area: srv; }
.tile {
  position: relative; display: flex; flex-direction: column; justify-content: flex-end;
  min-height: 320px; padding: 190px 30px 30px; background: var(--blanco);
  border-right: 1px solid var(--gris-cla); border-bottom: 1px solid var(--gris-cla);
}
.tile::before { content: ""; position: absolute; inset: -1px -1px auto; height: 4px; background: var(--rojo); transform: scaleX(0); transform-origin: left; transition: transform .5s var(--ease); }
.tile:hover::before { transform: scaleX(1); }
.tile-body { position: relative; }
.num { font-family: var(--titular); font-weight: 700; font-size: 13px; color: var(--gris-osc); font-variant-numeric: tabular-nums; }
.tile h3 { margin-top: 10px; font-size: clamp(22px, 2.1vw, 28px); font-weight: 500; color: var(--rojo); }
.t-seg h3 { font-size: clamp(28px, 3vw, 40px); }
.tile p { margin-top: 10px; color: var(--gris-osc); max-width: 40ch; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; list-style: none; margin: 18px 0 0; padding: 0; }
.chips li { font-size: 13px; padding: 5px 10px; border: 1px solid var(--gris-cla); color: var(--gris-osc); background: var(--blanco); }
.more { display: inline-flex; gap: 8px; margin-top: 22px; color: var(--rojo); text-decoration: none; font-family: var(--titular); font-weight: 600; font-size: 15px; }
.more span { transition: transform .2s; }
.more:hover span { transform: translateX(4px); }
/* Objetos 3D (objetos3d.js). Mismo recuadro en todas las tarjetas chicas para que se lean como familia. */
.obj3d { position: absolute; top: 20px; right: 20px; width: 200px; height: 160px; pointer-events: none; }
.obj3d-grande { width: min(64%, 400px); height: 360px; }
/* Respaldo sin WebGL o sin JS: imagen del mismo objeto (herramientas/respaldos-3d.html); se quita al dibujar en 3D */
.obj3d { background: center / contain no-repeat; }
.obj3d[data-obj="camara"] { background-image: url(img/obj-camara.png); }
.obj3d[data-obj="red"] { background-image: url(img/obj-red.png); }
.obj3d[data-obj="bateria"] { background-image: url(img/obj-bateria.png); }
.obj3d[data-obj="rack"] { background-image: url(img/obj-rack.png); }
.obj3d[data-obj="audio"] { background-image: url(img/obj-audio.png); }
.obj3d[data-obj="escudo"] { background-image: url(img/obj-escudo.png); }
.obj3d[data-obj="ecommerce"] { background-image: url(img/obj-ecommerce.png); }
.obj3d[data-obj="capas"] { background-image: url(img/obj-capas.png); }
.obj3d-path { position: static; width: 170px; height: 130px; margin: -16px 0 0 -22px; }
.obj3d[data-obj="ecommerce"][data-tema="rojo"] { background-image: url(img/obj-ecommerce-rojo.png); }
/* Con el 3D ya dibujado se quita el respaldo; [data-obj] le gana a las reglas de arriba, incluida la del tema rojo */
.obj3d-listo > .obj3d[data-obj] { background-image: none; }
/* Sin WebGL la imagen de respaldo también se mueve, suave */
.obj3d { animation: flotar 4.5s ease-in-out infinite; }
.obj3d-listo > .obj3d { animation: none; }
@keyframes flotar { 50% { transform: translateY(-8px); } }

/* DOS CAMINOS */
/* Las dos tarjetas comparten filas (subgrid): ícono, etiqueta, título, texto, pasos y botón quedan alineados */
.paths { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.path {
  position: relative; display: grid; grid-row: span 6; grid-template-rows: subgrid; row-gap: 16px;
  align-items: start; justify-items: start; padding: clamp(28px, 4vw, 48px);
  background: var(--blanco); border: 1px solid var(--gris-cla); border-top: 6px solid var(--negro);
}
.path .btn { align-self: end; }
/* Compra directa: el camino principal, en rojo de marca */
.path-shop { background: var(--rojo); border-color: var(--rojo); border-top-color: var(--rojo-osc); color: var(--blanco); }
.path-shop .tag, .path.path-shop h3, .path-shop .steps b, .path-shop .steps li::before { color: var(--blanco); }
.path.path-shop > p, .path-shop .steps li { color: var(--gris-fondo); }
.path-shop .steps, .path-shop .steps li { border-color: rgba(255, 255, 255, .35); }
.path-shop :focus-visible { outline-color: var(--blanco); }
.btn-blanco { background: var(--blanco); border-color: var(--blanco); color: var(--rojo); }
.btn-blanco:hover { background: var(--rojo-osc); border-color: var(--blanco); color: var(--blanco); }
.tag { font-family: var(--titular); font-weight: 600; font-size: 15px; color: var(--rojo); }
.path-proj .tag { color: var(--negro); }
.path h3 { font-size: clamp(26px, 2.8vw, 38px); font-weight: 600; color: var(--negro); }
.path > p { color: var(--gris-osc); max-width: 44ch; }
.steps { list-style: none; counter-reset: s; padding: 0; margin: 0; display: grid; width: 100%; border-top: 1px solid var(--gris-cla); }
.steps li { counter-increment: s; display: flex; align-items: center; gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--gris-cla); color: var(--gris-osc); }
.steps li::before { content: "0" counter(s); font-family: var(--titular); font-weight: 700; font-size: 13px; color: var(--rojo); }
.steps b { color: var(--negro); font-weight: 600; }

/* DECLARACIÓN · fondo rojo */
.statement { background: var(--rojo); color: var(--blanco); padding: clamp(72px, 9vw, 120px) 0; }
.eyebrow-blanco { color: var(--blanco); }
.statement-text { margin-top: 18px; font-family: var(--titular); font-weight: 700; font-size: clamp(30px, 4.8vw, 64px); line-height: 1.1; letter-spacing: -.025em; max-width: 22ch; }

/* CONTACTO · fondo negro */
.negro { background: var(--negro); color: var(--blanco); }
.negro .eyebrow { color: var(--blanco); }
.negro :focus-visible { outline-color: var(--blanco); } /* el rojo no contrasta con el negro */
.negro .subtitulo { color: var(--gris-cla); }
.contact { display: grid; grid-template-columns: 1.1fr 1fr; gap: clamp(32px, 5vw, 72px); align-items: center; }
.contact .btn { margin-top: 30px; }
.contact-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--gris-osc); }
.contact-list a { display: grid; grid-template-columns: 34px 1fr; align-items: baseline; padding: 22px 0; border-bottom: 1px solid var(--gris-osc); text-decoration: none; transition: padding .25s var(--ease); }
.contact-list a:hover { padding-left: 10px; }
.contact-list span { font-family: var(--titular); font-weight: 700; color: var(--gris-cla); }
.contact-list b { font-weight: 500; font-size: 18px; overflow-wrap: anywhere; }

/* WHATSAPP (opción B): círculo verde de WhatsApp, fijo abajo a la derecha.
   El verde y el glifo se reemplazan por el logo oficial de Meta; no recolorearlo. */
:root { --wa: #25D366; } /* verde según fuentes de terceros; confirmar con el paquete oficial */
.wa {
  position: fixed; z-index: 60; right: 24px; bottom: max(24px, env(safe-area-inset-bottom));
  display: grid; place-items: center; width: 60px; height: 60px; border-radius: 50%;
  background: var(--wa); color: var(--blanco);
  box-shadow: 0 6px 18px rgba(26, 26, 26, .28); /* separa el verde claro del fondo blanco */
  transition: transform .2s var(--ease);
}
.wa:hover { transform: translateY(-3px); }
.wa:focus-visible { outline: 3px solid var(--negro); outline-offset: 3px; }
.wa .wa-ico { width: 32px; height: 32px; }
.wa-chapa { display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: var(--wa); color: var(--blanco); flex: none; }
.wa-chapa .wa-ico { width: 15px; height: 15px; }

/* FOOTER */
.foot { padding: 36px 0; border-top: 1px solid var(--gris-cla); color: var(--gris-osc); font-size: 14px; }
.foot-in { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 28px; }
.foot .logo { width: 44px; height: 44px; }
.social { display: flex; gap: 18px; list-style: none; margin: 0 0 0 auto; padding: 0; }
.social a { text-decoration: none; }
.social a:hover { color: var(--rojo); }

/* Aparición al hacer scroll (efectos.js) */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .8s ease, transform .8s cubic-bezier(.2, .7, .2, 1); }
.reveal.in { opacity: 1; transform: none; }

/* RESPONSIVO */
@media (max-width: 980px) {
  .hero-in { grid-template-columns: 1fr; }
  .evolucion { order: -1; }
  .escenario { width: min(100%, 320px); }
  .bento { grid-template-columns: 1fr 1fr; grid-template-areas: "seg seg" "red red" "ene com" "col srv"; }
  .t-seg { min-height: 500px; }
  .paths, .contact { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  .nav nav { display: none; }
  .nav .btn-sm { margin-left: auto; }
  .hero { padding-top: 104px; }
  .escenario { width: min(100%, 250px); }
  .hero-cta .btn { flex: 1 1 100%; }
  .bento { grid-template-columns: 1fr; grid-template-areas: "seg" "red" "ene" "com" "col" "srv"; }
  .tile { min-height: 0; padding: 180px 22px 24px; }
  .t-seg { padding-top: 220px; }
  .obj3d-grande { width: 220px; height: 190px; }
  .social { margin-left: 0; }
  .wa { right: 16px; width: 56px; height: 56px; }
  .foot { padding-bottom: 88px; } /* que el botón fijo no tape el pie */
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
  html { scroll-behavior: auto; }
  .repetir { display: none; }
}
