/* =====================================================================
   DemarTech · estilos
   Colores de marca (tomados del logo): azul #2563eb · cian #06b6d4 · azul profundo #0013d9
   Tema claro por defecto; modo oscuro con [data-theme="dark"]
   ===================================================================== */

:root {
  --primary: #2563eb;
  --primary-dark: #1d4ed8;
  --accent: #06b6d4;
  --deep: #0013d9;
  --grad: linear-gradient(135deg, #2563eb, #06b6d4);
  --grad-deep: linear-gradient(135deg, #0013d9, #2563eb 55%, #06b6d4);

  --bg: #f5f8ff;
  --surface: #ffffff;
  --surface-2: #eef4ff;
  --chip: #eaf1ff;
  --text: #0b1530;
  --muted: #5a6a85;
  --border: #e0e8f6;
  --header-glass: rgba(255, 255, 255, .8);
  --hero-a: #fbfdff;
  --hero-b: #e4efff;
  --navy: #071433;

  --shadow: 0 18px 50px rgba(15, 40, 100, .08);
  --shadow-hover: 0 26px 60px rgba(37, 99, 235, .2);
  --radius: 24px;
  --transition: all .3s cubic-bezier(.4, 0, .2, 1);
  color-scheme: light;
}

[data-theme="dark"] {
  --bg: #060d1f;
  --surface: #0d1a36;
  --surface-2: #12234a;
  --chip: #13264f;
  --text: #e8efff;
  --muted: #9db0cf;
  --border: #1b2e57;
  --header-glass: rgba(6, 13, 31, .78);
  --hero-a: #060d1f;
  --hero-b: #0b1a3d;
  --shadow: 0 18px 50px rgba(0, 0, 0, .35);
  --shadow-hover: 0 26px 60px rgba(6, 182, 212, .18);
  color-scheme: dark;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 84px; }

body {
  font-family: "Poppins", sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.65;
  overflow-x: hidden;
}

body.menu-open { overflow: hidden; }

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

a { color: inherit; text-decoration: none; }
button, a { -webkit-tap-highlight-color: transparent; }
ul { list-style: none; }

.container { width: min(1180px, 92%); margin-inline: auto; }

/* Transición suave al cambiar de tema */
html.theme-anim *,
html.theme-anim *::before,
html.theme-anim *::after {
  transition: background-color .45s ease, color .45s ease, border-color .45s ease !important;
}

/* ---------- Barra de progreso y luz del cursor ---------- */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  z-index: 1100;
  transform: scaleX(0);
  transform-origin: left;
  background: linear-gradient(90deg, var(--deep), var(--primary), var(--accent));
  pointer-events: none;
}

.cursor-glow {
  position: fixed;
  top: 0;
  left: 0;
  width: 460px;
  height: 460px;
  z-index: 3;
  border-radius: 50%;
  pointer-events: none;
  opacity: 0;
  background: radial-gradient(circle, rgba(37, 99, 235, .1), rgba(6, 182, 212, .05) 45%, transparent 70%);
  transition: opacity .4s ease;
  will-change: transform;
}

[data-theme="dark"] .cursor-glow {
  background: radial-gradient(circle, rgba(37, 99, 235, .2), rgba(6, 182, 212, .08) 45%, transparent 70%);
}

/* ---------- Encabezado: transparente arriba, vidrio al bajar y se oculta ---------- */
.site-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 1000;
  background: transparent;
  border-bottom: 1px solid transparent;
  transition: transform .45s cubic-bezier(.2, .7, .2, 1), background .3s ease, box-shadow .3s ease, border-color .3s ease;
}

.site-header.scrolled {
  background: var(--header-glass);
  backdrop-filter: blur(18px) saturate(1.5);
  -webkit-backdrop-filter: blur(18px) saturate(1.5);
  border-bottom-color: var(--border);
  box-shadow: 0 10px 30px rgba(8, 20, 47, .08);
}

.site-header.is-hidden { transform: translateY(-105%); }
body.menu-open .site-header { transform: none; }

.navbar {
  min-height: 80px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  transition: min-height .3s ease;
}

.site-header.scrolled .navbar { min-height: 66px; }

.logo img { width: 116px; display: block; transition: width .3s ease; }
.site-header.scrolled .logo img { width: 100px; }

[data-theme="dark"] .logo img {
  padding: 5px 9px;
  border-radius: 12px;
  background: #fff;
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 28px;
  margin-left: auto;
}

.nav-menu a {
  position: relative;
  color: var(--text);
  opacity: .8;
  font-size: .94rem;
  font-weight: 500;
  transition: var(--transition);
}

.nav-menu a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -8px;
  height: 2px;
  border-radius: 4px;
  background: var(--grad);
  transform: scaleX(0);
  transition: var(--transition);
}

.nav-menu a:hover,
.nav-menu a.active { color: var(--primary); opacity: 1; }
.nav-menu a:hover::after,
.nav-menu a.active::after { transform: scaleX(1); }

.nav-actions { display: flex; align-items: center; gap: 12px; }

.theme-toggle {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border: 1px solid var(--border);
  border-radius: 50%;
  color: var(--primary);
  background: var(--surface);
  cursor: pointer;
  transition: var(--transition);
}

.theme-toggle:hover { transform: rotate(18deg) scale(1.08); border-color: var(--primary); }
.theme-toggle svg { display: block; }
.theme-toggle .i-sun { display: none; }
[data-theme="dark"] .theme-toggle .i-sun { display: block; }
[data-theme="dark"] .theme-toggle .i-moon { display: none; }
.theme-toggle.spin svg { animation: themeSpin .6s ease; }

@keyframes themeSpin { from { transform: rotate(-120deg) scale(.4); opacity: 0; } to { transform: none; opacity: 1; } }

.nav-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 19px;
  border-radius: 999px;
  color: #fff;
  background: var(--grad);
  font-weight: 600;
  white-space: nowrap;
  box-shadow: 0 8px 22px rgba(37, 99, 235, .28);
  transition: var(--transition);
}

.nav-cta:hover { transform: translateY(-2px); box-shadow: 0 12px 28px rgba(6, 182, 212, .35); }

.menu-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 12px;
  background: var(--chip);
  cursor: pointer;
  padding: 10px;
}

.menu-toggle span {
  display: block;
  width: 100%;
  height: 3px;
  margin: 4px 0;
  border-radius: 10px;
  background: var(--primary);
  transition: var(--transition);
}

.menu-toggle.active span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.menu-toggle.active span:nth-child(2) { opacity: 0; }
.menu-toggle.active span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- Botones ---------- */
.btn {
  position: relative;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 52px;
  padding: 13px 24px;
  border-radius: 999px;
  border: 2px solid transparent;
  font-weight: 650;
  transition: var(--transition);
  cursor: pointer;
}

.btn-primary {
  color: #fff;
  background: var(--grad-deep);
  box-shadow: 0 14px 32px rgba(37, 99, 235, .3);
}

.btn-primary::after {
  content: "";
  position: absolute;
  top: 0;
  left: -70%;
  width: 40%;
  height: 100%;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, .4), transparent);
  transform: skewX(-20deg);
  transition: left .65s ease;
}

.btn-primary:hover { transform: translateY(-3px); box-shadow: 0 18px 38px rgba(6, 182, 212, .32); }
.btn-primary:hover::after { left: 135%; }

.btn-secondary {
  color: var(--primary);
  background: var(--surface);
  border-color: color-mix(in srgb, var(--primary) 35%, transparent);
}

.btn-secondary:hover { background: var(--chip); transform: translateY(-3px); }

.btn-light { color: var(--primary-dark); background: #fff; box-shadow: 0 14px 30px rgba(0, 10, 80, .25); }
.btn-light:hover { transform: translateY(-3px); background: #f3f8ff; }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: 100vh;
  display: grid;
  align-items: center;
  overflow: hidden;
  padding: 150px 0 100px;
  background:
    radial-gradient(circle at 78% 22%, rgba(37, 99, 235, .16), transparent 32%),
    radial-gradient(circle at 12% 85%, rgba(6, 182, 212, .14), transparent 30%),
    linear-gradient(180deg, var(--hero-a) 0%, var(--hero-b) 100%);
}

.hero-bg { position: absolute; border-radius: 50%; filter: blur(80px); pointer-events: none; }
.hero-bg-one { width: 380px; height: 380px; top: -150px; right: -100px; background: rgba(37, 99, 235, .16); animation: blob 14s ease-in-out infinite alternate; }
.hero-bg-two { width: 320px; height: 320px; bottom: -130px; left: -100px; background: rgba(6, 182, 212, .16); animation: blob 16s ease-in-out infinite alternate-reverse; }

.hero-fx { position: absolute; inset: 0; z-index: 1; overflow: hidden; pointer-events: none; }
.hero-fx canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }

.hero-logo-wrap {
  position: absolute;
  left: 50%;
  top: 54%;
  width: min(1050px, 118vw);
  transform: translate(-50%, calc(-50% + var(--py, 0px)));
  will-change: transform;
}

/* Logo oficial con colores originales; solo se atenúa y se desplaza lento */
.hero-logo-bg {
  display: block;
  width: 100%;
  height: auto;
  opacity: .1;
  animation: logoDrift 18s ease-in-out infinite alternate;
}

[data-theme="dark"] .hero-logo-bg { opacity: .16; }

@keyframes logoDrift {
  0%   { transform: translate(-2%, -2%) scale(1);    opacity: .07; }
  100% { transform: translate(2%, 2%) scale(1.07); opacity: .14; }
}

@keyframes blob {
  0%   { transform: translate(0, 0) scale(1); }
  100% { transform: translate(40px, 30px) scale(1.15); }
}

.hero-grid {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 1.03fr .97fr;
  align-items: center;
  gap: 55px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  color: var(--primary);
  background: var(--chip);
  border: 1px solid color-mix(in srgb, var(--primary) 22%, transparent);
  border-radius: 999px;
  font-size: .82rem;
  font-weight: 700;
}

.hero-content > * { animation: heroRise .85s cubic-bezier(.2, .7, .2, 1) both; }
.hero-content > *:nth-child(2) { animation: none; }
.hero-content > *:nth-child(3) { animation-delay: .55s; }
.hero-content > *:nth-child(4) { animation-delay: .65s; }
.hero-content > *:nth-child(5) { animation-delay: .75s; }
.hero-content > *:nth-child(6) { animation-delay: .85s; }

@keyframes heroRise {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}

.hero h1 {
  max-width: 760px;
  margin: 20px 0 14px;
  font-size: clamp(3rem, 6vw, 5.3rem);
  line-height: 1.04;
  letter-spacing: -.055em;
  font-weight: 800;
}

.hero h1 .w { display: inline-block; overflow: hidden; vertical-align: top; padding-bottom: .14em; margin-bottom: -.14em; }
.hero h1 .w > span {
  display: inline-block;
  transform: translateY(115%);
  animation: wordUp .95s cubic-bezier(.2, .7, .2, 1) forwards;
  animation-delay: calc(var(--d) * .13s + .15s);
}

.hero h1 .w.grad > span {
  background: linear-gradient(90deg, var(--primary), var(--accent), var(--primary));
  background-size: 200% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: wordUp .95s cubic-bezier(.2, .7, .2, 1) forwards, gradShift 7s ease-in-out 1.2s infinite alternate;
  animation-delay: calc(var(--d) * .13s + .15s), 0s;
}

@keyframes wordUp { to { transform: translateY(0); } }
@keyframes gradShift { from { background-position: 0% 50%; } to { background-position: 100% 50%; } }

.hero-rotator {
  margin-bottom: 14px;
  font-size: clamp(1.05rem, 2vw, 1.4rem);
  font-weight: 600;
  color: var(--text);
  opacity: .85;
}

.rotator-word {
  display: inline-block;
  color: var(--primary);
  transition: opacity .35s ease, transform .35s ease;
}

.rotator-word.is-out { opacity: 0; transform: translateY(-10px); }
.rotator-word.is-in { opacity: 0; transform: translateY(10px); transition: none; }

.hero-lead {
  max-width: 660px;
  color: var(--muted);
  font-size: clamp(1rem, 1.5vw, 1.15rem);
  line-height: 1.85;
}

.hero-lead strong { color: var(--text); }

.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 32px; }

.hero-points {
  display: flex;
  flex-wrap: wrap;
  gap: 14px 22px;
  margin-top: 26px;
  color: var(--muted);
  font-size: .85rem;
}

.hero-points span { display: inline-flex; align-items: center; gap: 7px; }
.hero-points i { color: var(--accent); }

.hero-visual { position: relative; min-height: 500px; display: grid; place-items: center; }

.visual-card-main {
  position: relative;
  z-index: 3;
  width: min(390px, 78%);
  padding: 18px;
  border: 1px solid color-mix(in srgb, var(--surface) 80%, transparent);
  border-radius: 30px;
  background: color-mix(in srgb, var(--surface) 76%, transparent);
  box-shadow: 0 30px 90px rgba(31, 78, 150, .2);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  transform: perspective(900px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg));
  transition: transform .25s ease-out;
  animation: heroRise .9s .35s cubic-bezier(.2, .7, .2, 1) both;
}

.visual-top { display: flex; align-items: center; gap: 9px; color: var(--muted); font-size: .8rem; font-weight: 650; }

.status-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 0 5px rgba(34, 197, 94, .14);
  animation: dotPulse 2s ease-in-out infinite;
}

@keyframes dotPulse { 50% { box-shadow: 0 0 0 9px rgba(34, 197, 94, 0); } }

.visual-code { margin-left: auto; color: var(--muted); opacity: .8; }

.visual-card-main img { width: 100%; height: 360px; object-fit: contain; display: block; margin: 5px auto; }

.visual-label { padding: 13px 15px; border-radius: 17px; background: var(--surface-2); border: 1px solid var(--border); }
.visual-label strong, .visual-label span { display: block; }
.visual-label strong { font-size: .9rem; }
.visual-label span { color: var(--muted); font-size: .72rem; margin-top: 3px; }

.visual-ring { position: absolute; border: 1px solid rgba(37, 99, 235, .2); border-radius: 50%; }
.visual-ring::before {
  content: "";
  position: absolute;
  top: -5px;
  left: 50%;
  width: 10px;
  height: 10px;
  margin-left: -5px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 16px 2px rgba(6, 182, 212, .6);
}

.ring-one { width: 500px; height: 500px; animation: spin 22s linear infinite; }
.ring-two { width: 620px; height: 620px; border-color: rgba(6, 182, 212, .18); animation: spin 34s linear infinite reverse; }
.ring-two::before { background: var(--deep); box-shadow: 0 0 16px 2px rgba(0, 19, 217, .5); }

[data-theme="dark"] .ring-two::before { background: var(--primary); }

@keyframes spin { to { transform: rotate(360deg); } }

.floating-badge {
  position: absolute;
  z-index: 5;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border-radius: 999px;
  color: var(--text);
  background: color-mix(in srgb, var(--surface) 92%, transparent);
  border: 1px solid var(--border);
  box-shadow: 0 12px 30px rgba(16, 40, 100, .14);
  font-size: .8rem;
  font-weight: 700;
  animation: float 4s ease-in-out infinite;
}

.badge-ai { top: 18%; left: 2%; color: var(--primary); }
.badge-security { top: 52%; right: 0; color: var(--deep); animation-delay: .7s; }
.badge-network { bottom: 8%; left: 9%; color: #0891b2; animation-delay: 1.2s; }

[data-theme="dark"] .badge-security { color: #8ea2ff; }

@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }

.scroll-cue {
  position: absolute;
  z-index: 2;
  bottom: 26px;
  left: 50%;
  width: 26px;
  height: 42px;
  margin-left: -13px;
  border: 2px solid color-mix(in srgb, var(--primary) 55%, transparent);
  border-radius: 20px;
}

.scroll-cue span {
  position: absolute;
  top: 7px;
  left: 50%;
  width: 4px;
  height: 8px;
  margin-left: -2px;
  border-radius: 4px;
  background: var(--primary);
  animation: cue 1.8s ease-in-out infinite;
}

@keyframes cue { 0% { opacity: 0; transform: translateY(0); } 30% { opacity: 1; } 100% { opacity: 0; transform: translateY(14px); } }

/* ---------- Secciones ---------- */
.section { position: relative; overflow: hidden; padding: 110px 0; }
.section > .container { position: relative; z-index: 1; }

.section::before,
.section::after {
  content: "";
  position: absolute;
  width: 440px;
  height: 440px;
  border-radius: 50%;
  pointer-events: none;
}

.section::before {
  top: -140px;
  left: -140px;
  background: radial-gradient(circle, rgba(37, 99, 235, .12), transparent 65%);
  animation: blob 15s ease-in-out infinite alternate;
}

.section::after {
  bottom: -160px;
  right: -140px;
  background: radial-gradient(circle, rgba(6, 182, 212, .13), transparent 65%);
  animation: blob 18s ease-in-out infinite alternate-reverse;
}

.section-heading { max-width: 760px; margin: 0 auto 58px; text-align: center; }

.section-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  color: var(--primary);
  background: var(--chip);
  border: 1px solid color-mix(in srgb, var(--primary) 20%, transparent);
  border-radius: 999px;
  font-size: .85rem;
  font-weight: 600;
}

.section-kicker::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  animation: dotPulse 2s ease-in-out infinite;
}

.section-heading h2,
.about-content h2,
.faq-side h2,
.contact-main h2 {
  margin-top: 14px;
  font-size: clamp(2rem, 4vw, 3rem);
  line-height: 1.15;
  letter-spacing: -.035em;
}

.section-heading h2::after,
.about-content h2::after,
.faq-side h2::after {
  content: "";
  display: block;
  width: 0;
  height: 4px;
  margin-top: 16px;
  border-radius: 4px;
  background: var(--grad);
  transition: width .9s .3s cubic-bezier(.2, .7, .2, 1);
}

.section-heading h2::after { margin-inline: auto; }
.visible .section-heading h2::after,
.section-heading.visible h2::after,
.about-content.visible h2::after,
.faq-side.visible h2::after { width: 72px; }

.section-heading p { margin-top: 16px; color: var(--muted); }

/* ---------- Servicios ---------- */
.services-section { background: var(--surface); }

.service-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }

.service-card {
  --c: #2563eb;
  --mx: 50%;
  --my: 0%;
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 30px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
  overflow: hidden;
  isolation: isolate;
}

.service-card:nth-child(3n+2) { --c: #06b6d4; }
.service-card:nth-child(3n) { --c: #0013d9; }
[data-theme="dark"] .service-card:nth-child(3n) { --c: #6b7cff; }

.service-card::before,
.audience-card::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  opacity: 0;
  pointer-events: none;
  background: radial-gradient(380px circle at var(--mx) var(--my), color-mix(in srgb, var(--c, #2563eb) 16%, transparent), transparent 55%);
  transition: opacity .35s ease;
}

.service-card:hover::before,
.audience-card:hover::before { opacity: 1; }

.service-card > *, .audience-card > * { position: relative; z-index: 1; }

.service-card::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--c), var(--accent));
  transition: width .5s cubic-bezier(.2, .7, .2, 1);
}

.service-card:hover::after { width: 100%; }

.service-card.visible:hover,
.audience-card.visible:hover,
.project-card.visible:hover {
  transform: translateY(-9px);
  border-color: color-mix(in srgb, var(--c, #2563eb) 45%, var(--border));
  box-shadow: var(--shadow-hover);
}

.service-icon {
  position: relative;
  width: 60px;
  height: 60px;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  border-radius: 18px;
  color: var(--c);
  background: color-mix(in srgb, var(--c) 13%, transparent);
  font-size: 1.4rem;
  transition: background .35s ease, color .35s ease, transform .35s ease;
}

.service-icon::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 18px;
  border: 2px solid color-mix(in srgb, var(--c) 40%, transparent);
  animation: ping 3s ease-out infinite;
}

.service-card:nth-child(2n) .service-icon::before { animation-delay: .6s; }
.service-card:nth-child(3n) .service-icon::before { animation-delay: 1.2s; }

@keyframes ping { 0% { transform: scale(1); opacity: .8; } 70%, 100% { transform: scale(1.5); opacity: 0; } }

.service-card:hover .service-icon { color: #fff; background: var(--c); transform: scale(1.07) rotate(-5deg); }
.service-card:hover .service-icon i { animation: iconPop .6s ease; }

@keyframes iconPop { 0% { transform: scale(1); } 40% { transform: scale(1.3) rotate(8deg); } 100% { transform: scale(1) rotate(0); } }

.service-card h3 { margin: 22px 0 8px; font-size: 1.18rem; }
.service-card p { color: var(--muted); font-size: .92rem; line-height: 1.7; }

.service-tags { display: flex; flex-wrap: wrap; gap: 7px; margin: 16px 0 4px; }

.service-tags li {
  padding: 5px 11px;
  border-radius: 999px;
  color: var(--muted);
  background: var(--chip);
  border: 1px solid var(--border);
  font-size: .72rem;
  font-weight: 600;
  line-height: 1.4;
  transition: var(--transition);
}

.service-card:hover .service-tags li {
  color: var(--c);
  background: color-mix(in srgb, var(--c) 10%, transparent);
  border-color: color-mix(in srgb, var(--c) 30%, transparent);
}

.service-link { margin-top: auto; padding-top: 18px; display: inline-flex; align-items: center; gap: 8px; width: fit-content; color: var(--c); font-size: .88rem; font-weight: 700; }
.service-link i { transition: transform .3s ease; }
.service-link:hover i { transform: scale(1.25) rotate(-8deg); }

/* ---------- Marquesina ---------- */
.tech-strip { padding: 22px 0; overflow: hidden; color: #fff; background: var(--grad-deep); background-size: 200% 100%; animation: gradShift 12s ease-in-out infinite alternate; }

.marquee-mask {
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}

.marquee { display: flex; width: max-content; animation: marquee 40s linear infinite; }
.marquee-group { display: flex; flex-shrink: 0; align-items: center; gap: 52px; padding-right: 52px; }
.marquee-group span { display: inline-flex; align-items: center; gap: 10px; font-size: .9rem; font-weight: 600; white-space: nowrap; }
.marquee-group i { color: #bff4ff; }
.tech-strip:hover .marquee { animation-play-state: paused; }

@keyframes marquee { to { transform: translateX(-33.3333%); } }

/* ---------- Soluciones ---------- */
.solutions-section { background: var(--bg); }

.audience-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }

.audience-card {
  --c: #2563eb;
  --mx: 50%;
  --my: 0%;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  padding: 32px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.audience-icon {
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  border-radius: 16px;
  color: var(--primary);
  background: var(--chip);
  font-size: 1.2rem;
  transition: transform .35s ease;
}

.audience-card:hover .audience-icon { transform: translateY(-4px) rotate(-6deg); }

.audience-tag { margin-top: 20px; color: var(--primary); font-size: .85rem; font-weight: 700; }
.audience-card h3 { margin: 6px 0 10px; font-size: 1.22rem; line-height: 1.35; }
.audience-card p { color: var(--muted); font-size: .9rem; }
.audience-card ul { display: grid; gap: 9px; margin-top: 18px; padding-top: 18px; border-top: 1px dashed var(--border); font-size: .85rem; }
.audience-card li { display: flex; gap: 9px; align-items: flex-start; }
.audience-card li i { margin-top: 5px; color: var(--accent); font-size: .75rem; }

.audience-card.featured {
  color: #fff;
  border-color: transparent;
  background: var(--grad-deep);
  background-size: 180% 180%;
  animation: gradMove 9s ease-in-out infinite alternate;
  --c: #ffffff;
}

.audience-card.featured .audience-icon { color: #fff; background: rgba(255, 255, 255, .18); }
.audience-card.featured .audience-tag { color: #bff4ff; }
.audience-card.featured p, .audience-card.featured li { color: rgba(255, 255, 255, .86); }
.audience-card.featured ul { border-color: rgba(255, 255, 255, .25); }
.audience-card.featured li i { color: #bff4ff; }

@keyframes gradMove { from { background-position: 0% 0%; } to { background-position: 100% 100%; } }

/* ---------- Proyectos ---------- */
.projects-section { background: var(--surface); }

.projects-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }

.project-card {
  position: relative;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.project-visual { position: relative; min-height: 250px; display: grid; place-items: center; overflow: hidden; }

.project-cosmetics {
  background:
    radial-gradient(circle at 18% 15%, rgba(255, 255, 255, .85), transparent 30%),
    linear-gradient(145deg, #dbeafe, #cffafe);
}

[data-theme="dark"] .project-cosmetics {
  background:
    radial-gradient(circle at 18% 15%, rgba(37, 99, 235, .35), transparent 35%),
    linear-gradient(145deg, #12306b, #0e4a63);
}

.project-market {
  background:
    radial-gradient(circle at 82% 15%, rgba(6, 182, 212, .45), transparent 32%),
    linear-gradient(145deg, #0013d9, #2563eb);
}

.mock-window {
  width: 74%;
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
  background: var(--surface);
  box-shadow: 0 20px 48px rgba(10, 30, 90, .22);
  transition: transform .5s cubic-bezier(.2, .7, .2, 1);
}

.project-card:hover .mock-window { transform: translateY(-5px) scale(1.04); }

.mock-bar { display: flex; align-items: center; gap: 5px; padding: 9px 12px; background: var(--surface-2); }
.mock-bar span { width: 7px; height: 7px; border-radius: 50%; background: #cbd5e1; }
.mock-bar span:nth-child(1) { background: #fb7185; }
.mock-bar span:nth-child(2) { background: #fbbf24; }
.mock-bar span:nth-child(3) { background: #34d399; }
.mock-bar em { margin-left: 8px; padding: 2px 10px; border-radius: 99px; background: var(--surface); color: var(--muted); font-size: .58rem; font-style: normal; }

.mock-body { padding: 12px; display: grid; gap: 10px; }

.mock-banner {
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 74px;
  border-radius: 12px;
  color: #fff;
  background: var(--grad);
  font-size: .78rem;
}

.mock-banner i { font-size: 1.3rem; }

.shimmer::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(100deg, transparent 30%, rgba(255, 255, 255, .5) 50%, transparent 70%);
  transform: translateX(-100%);
  animation: shimmer 2.8s ease-in-out infinite;
}

@keyframes shimmer { 60%, 100% { transform: translateX(100%); } }

.mock-tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.mock-tiles i { aspect-ratio: 1.25; border-radius: 10px; background: var(--chip); border: 1px solid var(--border); animation: bob 3s ease-in-out infinite; }
.mock-tiles i:nth-child(2) { animation-delay: .4s; background: color-mix(in srgb, var(--accent) 18%, var(--chip)); }
.mock-tiles i:nth-child(3) { animation-delay: .8s; }

@keyframes bob { 50% { transform: translateY(-6px); } }

.market-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 11px; width: 66%; }

.market-grid div {
  position: relative;
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, .22);
  border-radius: 16px;
  color: #d8f7ff;
  background: rgba(255, 255, 255, .1);
  font-size: 1.35rem;
  animation: tilePulse 3.2s ease-in-out infinite;
}

.market-grid div:nth-child(2) { animation-delay: .3s; }
.market-grid div:nth-child(3) { animation-delay: .6s; }
.market-grid div:nth-child(4) { animation-delay: .9s; }
.market-grid div:nth-child(5) { animation-delay: 1.2s; }
.market-grid div:nth-child(6) { animation-delay: 1.5s; }

@keyframes tilePulse { 50% { transform: scale(1.07); background: rgba(255, 255, 255, .2); } }

.market-cart { color: #fff !important; background: rgba(6, 182, 212, .45) !important; }
.market-cart em {
  position: absolute;
  top: -7px;
  right: -7px;
  width: 21px;
  height: 21px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: #ef4444;
  font-size: .68rem;
  font-style: normal;
  font-weight: 700;
  animation: badgeBounce 2.4s ease-in-out infinite;
}

@keyframes badgeBounce { 0%, 60%, 100% { transform: scale(1); } 75% { transform: scale(1.35); } }

.project-status {
  position: absolute;
  left: 16px;
  bottom: 16px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 12px;
  border-radius: 999px;
  color: #0b1530;
  background: rgba(255, 255, 255, .92);
  font-size: .7rem;
  font-weight: 700;
}

.project-status b { width: 8px; height: 8px; border-radius: 50%; background: #22c55e; animation: dotPulse 2s ease-in-out infinite; }
.status-development b { background: #f59e0b; box-shadow: 0 0 0 4px rgba(245, 158, 11, .18); }

.project-visit {
  position: absolute;
  right: 16px;
  bottom: 16px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 14px;
  border-radius: 999px;
  color: #fff;
  background: var(--deep);
  font-size: .74rem;
  font-weight: 700;
  opacity: 0;
  transform: translateY(12px);
  transition: opacity .35s ease, transform .35s ease;
}

.project-card:hover .project-visit { opacity: 1; transform: none; }

.project-content { padding: 26px; display: flex; flex-direction: column; flex: 1; }
.project-type { color: var(--primary); font-size: .85rem; font-weight: 700; }
.project-content h3 { margin: 6px 0 9px; font-size: 1.25rem; }
.project-content p { color: var(--muted); font-size: .88rem; }
.project-tags { display: flex; flex-wrap: wrap; gap: 7px; margin-top: auto; padding-top: 18px; }
.project-tags span { padding: 5px 10px; border-radius: 999px; color: var(--muted); background: var(--chip); border: 1px solid var(--border); font-size: .7rem; font-weight: 600; }

.project-cta {
  align-items: center;
  justify-content: center;
  gap: 24px;
  padding: 36px 28px;
  text-align: center;
  border: 2px dashed color-mix(in srgb, var(--primary) 40%, transparent);
  background: linear-gradient(165deg, var(--surface), var(--chip));
}

.cta-orbit { position: relative; width: 150px; height: 150px; display: grid; place-items: center; }
.cta-ring { position: absolute; inset: 0; border-radius: 50%; border: 2px solid var(--accent); opacity: 0; animation: ctaPing 3.6s ease-out infinite; }
.cta-ring:nth-child(2) { animation-delay: 1.2s; }
.cta-ring:nth-child(3) { animation-delay: 2.4s; }

@keyframes ctaPing { 0% { transform: scale(.45); opacity: .9; } 100% { transform: scale(1.15); opacity: 0; } }

.cta-plus {
  position: relative;
  width: 74px;
  height: 74px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: var(--grad-deep);
  font-size: 1.5rem;
  box-shadow: 0 16px 36px rgba(37, 99, 235, .35);
  transition: transform .5s cubic-bezier(.2, .7, .2, 1);
}

.project-cta:hover .cta-plus { transform: rotate(90deg) scale(1.1); }
.cta-text h3 { font-size: 1.3rem; }
.cta-text p { margin: 8px 0 14px; color: var(--muted); font-size: .9rem; }
.cta-link { display: inline-flex; align-items: center; gap: 8px; color: var(--primary); font-weight: 700; }

.projects-note { display: flex; align-items: center; justify-content: center; gap: 8px; margin-top: 30px; color: var(--muted); text-align: center; font-size: .78rem; }
.projects-note i { color: var(--accent); }

/* ---------- Nosotros ---------- */
.about-section { background: var(--bg); }

.about-grid { display: grid; grid-template-columns: .9fr 1.1fr; gap: 80px; align-items: center; }
.about-visual { display: flex; justify-content: center; }

.about-panel {
  position: relative;
  width: min(430px, 100%);
  padding: 30px;
  border-radius: 32px;
  overflow: hidden;
  background:
    radial-gradient(circle at 82% 18%, rgba(6, 182, 212, .32), transparent 32%),
    linear-gradient(145deg, #071433, #0f2f78);
  box-shadow: 0 30px 80px rgba(8, 20, 70, .3);
}

.panel-label { color: rgba(255, 255, 255, .7); font-size: .75rem; letter-spacing: .15em; font-weight: 700; }

.about-stage { position: relative; height: 300px; margin: 8px 0 14px; }

.stage-ring { position: absolute; top: 50%; left: 50%; border: 1px solid rgba(255, 255, 255, .16); border-radius: 50%; transform: translate(-50%, -50%); }
.stage-ring.r1 { width: 250px; height: 250px; }
.stage-ring.r2 { width: 190px; height: 190px; border-style: dashed; animation: spinCenter 40s linear infinite; }

@keyframes spinCenter { to { transform: translate(-50%, -50%) rotate(360deg); } }

.about-logo-wrap {
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 2;
  width: 124px;
  padding: 13px;
  border-radius: 22px;
  background: #fff;
  box-shadow: 0 20px 50px rgba(0, 0, 0, .3);
  transform: translate(-50%, -50%);
  animation: logoFloat 5s ease-in-out infinite;
}

@keyframes logoFloat { 50% { transform: translate(-50%, calc(-50% - 7px)); } }

.about-logo-wrap img { display: block; width: 100%; }

.orbit { position: absolute; inset: 0; }

.orbit-chip {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 3;
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #a5f3fc;
  background: rgba(255, 255, 255, .14);
  border: 1px solid rgba(255, 255, 255, .28);
  backdrop-filter: blur(6px);
  font-size: .9rem;
  offset-path: circle(125px at 50% 50%);
  offset-rotate: 0deg;
  animation: orbit 20s linear infinite;
  animation-delay: calc(var(--k) * -4s);
}

@keyframes orbit { from { offset-distance: 0%; } to { offset-distance: 100%; } }

@supports not (offset-path: circle(10px)) { .orbit { display: none; } }

.about-tags { display: flex; flex-wrap: wrap; gap: 8px; }
.about-tags span { padding: 6px 11px; border-radius: 999px; color: rgba(255, 255, 255, .85); background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 255, 255, .14); font-size: .72rem; }

.about-content > p { max-width: 680px; margin-top: 20px; color: var(--muted); }

.check-list { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 30px; }

.check-list div {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 13px 15px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--surface);
  font-size: .86rem;
  transition: var(--transition);
}

.check-list div:hover { transform: translateX(5px); border-color: var(--accent); }
.check-list i { color: var(--accent); }

/* ---------- Preguntas frecuentes ---------- */
.faq-section { background: var(--surface); }

.faq-grid { display: grid; grid-template-columns: .8fr 1.2fr; gap: 70px; align-items: start; }
.faq-side { position: sticky; top: 110px; }
.faq-side p { margin-top: 16px; color: var(--muted); }

.faq-help {
  position: relative;
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 30px;
  padding: 18px;
  border-radius: 20px;
  background: var(--surface-2);
  border: 1px solid var(--border);
}

.faq-help-icon {
  position: relative;
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: var(--grad);
}

.faq-help-icon::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 2px solid var(--accent);
  animation: ping 2.6s ease-out infinite;
}

.faq-help strong, .faq-help span { display: block; }
.faq-help strong { font-size: .95rem; }
.faq-help > div:nth-child(2) span { color: var(--muted); font-size: .8rem; }

.faq-help > a {
  margin-left: auto;
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: var(--primary);
  background: var(--surface);
  border: 1px solid var(--border);
  transition: var(--transition);
}

.faq-help > a:hover { color: #fff; background: var(--primary); transform: translateX(4px); }

.faq-list { display: grid; gap: 14px; }

.faq-item {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 20px;
  background: var(--surface);
  box-shadow: 0 8px 24px rgba(16, 40, 100, .05);
  transition: border-color .3s ease, box-shadow .3s ease, transform .3s ease;
}

.faq-item::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: var(--grad);
  transform: scaleY(0);
  transform-origin: top;
  transition: transform .4s ease;
}

.faq-item:hover { border-color: color-mix(in srgb, var(--primary) 40%, var(--border)); }
.faq-item.open { border-color: color-mix(in srgb, var(--primary) 45%, var(--border)); box-shadow: var(--shadow); background: linear-gradient(180deg, var(--surface), var(--surface-2)); }
.faq-item.open::before { transform: scaleY(1); }

.faq-q {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 18px 22px;
  border: 0;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
}

.faq-q:focus-visible { outline: 3px solid color-mix(in srgb, var(--accent) 60%, transparent); outline-offset: -3px; border-radius: 20px; }

.faq-ico {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  color: var(--primary);
  background: var(--chip);
  transition: var(--transition);
}

.faq-item.open .faq-ico { color: #fff; background: var(--grad); transform: rotate(-6deg) scale(1.05); }

.faq-text { flex: 1; font-size: .98rem; line-height: 1.45; }

.faq-plus {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: var(--primary);
  border: 1px solid var(--border);
  font-size: .8rem;
  transition: transform .4s ease, background .3s ease, color .3s ease;
}

.faq-item.open .faq-plus { transform: rotate(135deg); color: #fff; background: var(--primary); border-color: var(--primary); }

.faq-a { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .4s ease; }
.faq-item.open .faq-a { grid-template-rows: 1fr; }
.faq-a > div { overflow: hidden; }
.faq-a p { padding: 0 24px 22px 82px; color: var(--muted); font-size: .9rem; }

/* ---------- Contacto ---------- */
.contact-section { padding: 100px 0; background: var(--bg); }

.contact-wrap { display: grid; grid-template-columns: 1.15fr .85fr; gap: 24px; align-items: stretch; }

.contact-main {
  position: relative;
  overflow: hidden;
  padding: 52px;
  border-radius: 32px;
  color: #fff;
  background: var(--grad-deep);
  background-size: 160% 160%;
  box-shadow: 0 28px 70px rgba(37, 99, 235, .3);
  animation: gradMove 10s ease-in-out infinite alternate;
}

.contact-main > * { position: relative; z-index: 1; }

.contact-main .section-kicker { color: #fff; background: rgba(255, 255, 255, .16); border-color: rgba(255, 255, 255, .3); }
.contact-main .section-kicker::before { background: #bff4ff; }
.contact-main h2 { margin-top: 16px; }
.contact-main > p { margin: 14px 0 22px; max-width: 520px; color: rgba(255, 255, 255, .85); }

.contact-ring { position: absolute !important; z-index: 0 !important; border: 1.5px solid rgba(255, 255, 255, .22); border-radius: 50%; pointer-events: none; }
.contact-ring.c1 { width: 360px; height: 360px; right: -140px; bottom: -150px; animation: ringPulse 6s ease-out infinite; }
.contact-ring.c2 { width: 360px; height: 360px; right: -140px; bottom: -150px; animation: ringPulse 6s 2s ease-out infinite; }
.contact-ring.c3 { width: 360px; height: 360px; right: -140px; bottom: -150px; animation: ringPulse 6s 4s ease-out infinite; }

@keyframes ringPulse { 0% { transform: scale(.5); opacity: 1; } 100% { transform: scale(1.7); opacity: 0; } }

.contact-chips { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 28px; }

.contact-chips a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 16px;
  border-radius: 999px;
  color: #fff;
  background: rgba(255, 255, 255, .14);
  border: 1px solid rgba(255, 255, 255, .3);
  font-size: .82rem;
  font-weight: 600;
  transition: var(--transition);
}

.contact-chips a:hover { color: var(--primary-dark); background: #fff; transform: translateY(-3px); }

.contact-cards { display: flex; flex-direction: column; justify-content: center; gap: 16px; }

.contact-card {
  position: relative;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 20px 22px;
  border: 1px solid var(--border);
  border-radius: 22px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.contact-card.visible:hover { transform: translateX(-6px); border-color: var(--accent); box-shadow: var(--shadow-hover); }

.cc-icon { flex-shrink: 0; width: 54px; height: 54px; display: grid; place-items: center; border-radius: 16px; color: #fff; font-size: 1.4rem; transition: transform .4s ease; }
.contact-card:hover .cc-icon { transform: rotate(-8deg) scale(1.08); }
.cc-wa { background: #25d366; }
.cc-mail { background: var(--grad); }
.cc-ig { background: linear-gradient(135deg, #7c3aed, #db2777, #f59e0b); }

.cc-text { display: grid; min-width: 0; }
.cc-text small { color: var(--muted); font-size: .76rem; }
.cc-text strong { font-size: .98rem; overflow-wrap: anywhere; }
.cc-arrow { margin-left: auto; color: var(--primary); transition: transform .3s ease; }
.contact-card:hover .cc-arrow { transform: translateX(6px); }

/* ---------- Footer ---------- */
.site-footer { position: relative; padding: 78px 0 25px; color: #cbd5e1; background: #060f26; }

.site-footer::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--deep), var(--primary), var(--accent), var(--primary), var(--deep));
  background-size: 200% 100%;
  animation: gradShift 6s linear infinite alternate;
}

.footer-grid { display: grid; grid-template-columns: 1.3fr 1fr 1.15fr 1fr; gap: 45px; }

.footer-brand img { width: 92px; padding: 7px; border-radius: 12px; background: #fff; }
.footer-brand h2 { margin-top: 15px; color: #fff; }
.footer-brand p { margin-top: 4px; color: #67e8f9; font-weight: 600; }
.footer-brand > span { display: block; max-width: 280px; margin-top: 12px; color: #94a3b8; font-size: .82rem; }

.footer-column h3 { margin-bottom: 18px; color: #fff; font-size: 1rem; }
.footer-column a, .footer-column > span { display: block; width: fit-content; margin: 0 0 11px; color: #94a3b8; font-size: .82rem; transition: var(--transition); }
.footer-column a:hover { color: #fff; transform: translateX(4px); }
.footer-column i { width: 20px; color: #22d3ee; }

.social-links { display: flex; gap: 10px; flex-wrap: wrap; }
.social-links a { width: 42px; height: 42px; display: grid; place-items: center; margin: 0; border: 1px solid rgba(255, 255, 255, .14); border-radius: 50%; background: rgba(255, 255, 255, .05); }
.social-links a i { width: auto; color: inherit; }
.social-links a:hover { color: #fff; background: var(--grad); border-color: transparent; transform: translateY(-4px); }

.footer-note { margin-top: 18px; color: #64748b; font-size: .76rem; }

.footer-bottom { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-top: 55px; padding-top: 20px; border-top: 1px solid rgba(255, 255, 255, .09); color: #64748b; font-size: .75rem; }
.footer-bottom a { color: #94a3b8; }
.footer-bottom a:hover { color: #fff; }

.floating-whatsapp {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 999;
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: #25d366;
  font-size: 1.55rem;
  box-shadow: 0 12px 30px rgba(37, 211, 102, .35);
  transition: var(--transition);
}

.floating-whatsapp::after { content: ""; position: absolute; inset: 0; border-radius: 50%; border: 2px solid rgba(37, 211, 102, .6); animation: ping 2.6s ease-out infinite; }
.floating-whatsapp:hover { transform: translateY(-5px) scale(1.06); }

/* ---------- Animaciones de entrada ---------- */
.reveal { opacity: 0; transform: translateY(30px); transition: opacity .8s ease, transform .8s cubic-bezier(.2, .7, .2, 1); }
.reveal[data-anim="left"] { transform: translateX(-46px); }
.reveal[data-anim="right"] { transform: translateX(46px); }
.reveal[data-anim="zoom"] { transform: scale(.92); }
.reveal.visible { opacity: 1; transform: none; }

.service-grid > .reveal,
.audience-grid > .reveal,
.projects-grid > .reveal,
.faq-list > .reveal,
.contact-cards > .reveal { transition-delay: calc(var(--i, 0) * 90ms); }

/* Una vez reveladas, las tarjetas responden rápido al cursor */
.reveal.done { transition: var(--transition); transition-delay: 0s; }
.faq-item.reveal.done { transition: border-color .3s ease, box-shadow .3s ease, transform .3s ease; }

/* ---------- Responsive ---------- */
@media (max-width: 1050px) {
  .nav-menu { gap: 18px; }
  .nav-cta { padding-inline: 15px; }
  .hero-grid { gap: 25px; }
  .service-grid, .projects-grid { grid-template-columns: repeat(2, 1fr); }
  .audience-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .contact-wrap { grid-template-columns: 1fr; }
}

@media (max-width: 850px) {
  .menu-toggle { display: block; }
  .nav-cta { display: none; }

  .nav-menu {
    position: fixed;
    top: 70px;
    right: -100%;
    width: min(340px, 85vw);
    height: calc(100vh - 70px);
    height: calc(100dvh - 70px);
    padding: 35px 25px;
    flex-direction: column;
    justify-content: center;
    gap: 25px;
    margin: 0;
    background: var(--surface);
    border-left: 1px solid var(--border);
    box-shadow: -20px 0 50px rgba(8, 20, 60, .15);
    transition: right .35s ease;
  }

  .nav-menu.active { right: 0; }
  .nav-menu a { font-size: 1.1rem; opacity: 1; }

  .hero-grid { grid-template-columns: 1fr; text-align: center; }
  .hero-content { order: 2; }
  .hero-visual { order: 1; min-height: 430px; }
  .hero-actions, .hero-points { justify-content: center; }
  .hero-lead { margin-inline: auto; }
  .hero h1 { margin-inline: auto; }
  .scroll-cue { display: none; }

  .about-grid, .faq-grid { grid-template-columns: 1fr; gap: 45px; }
  .faq-side { position: static; }
  .about-content, .faq-side { text-align: center; }
  .about-content h2::after, .faq-side h2::after { margin-inline: auto; }
  .about-content > p { margin-inline: auto; }
  .check-list { text-align: left; }
  .faq-help { text-align: left; }
  .about-visual { order: 2; }

  .reveal[data-anim="left"], .reveal[data-anim="right"] { transform: translateY(30px); }
}

@media (max-width: 650px) {
  .container { width: min(92%, 540px); }
  .navbar { min-height: 70px; }
  .site-header.scrolled .navbar { min-height: 62px; }

  .hero { padding: 120px 0 70px; }
  .hero h1 { font-size: clamp(2.55rem, 13vw, 4rem); }
  .hero-actions { flex-direction: column; }
  .hero-actions .btn { width: 100%; }
  .hero-points { flex-direction: column; align-items: center; }
  .hero-visual { min-height: 380px; }
  .visual-card-main { width: min(330px, 82%); }
  .visual-card-main img { height: 280px; }
  .ring-one { width: 380px; height: 380px; }
  .ring-two { width: 470px; height: 470px; }
  .floating-badge { font-size: .7rem; padding: 8px 10px; }
  .badge-ai { left: 0; }
  .badge-security { right: -3px; }
  .badge-network { left: 4%; bottom: 3%; }
  .hero-logo-wrap { width: 170vw; top: 38%; }

  .section { padding: 78px 0; }
  .section-heading { margin-bottom: 38px; }

  .service-grid, .projects-grid { grid-template-columns: 1fr; }
  .service-card { padding: 26px; }
  .check-list { grid-template-columns: 1fr; }

  .about-panel { padding: 24px; }
  .marquee { animation-duration: 30s; }

  .faq-q { padding: 16px; gap: 12px; }
  .faq-ico { width: 38px; height: 38px; }
  .faq-a p { padding: 0 18px 20px 18px; }

  .contact-section { padding: 70px 0; }
  .contact-main { padding: 34px 24px; border-radius: 26px; }
  .contact-main .btn { width: 100%; }

  .footer-grid { grid-template-columns: 1fr; gap: 35px; }
  .footer-brand, .footer-column { text-align: center; }
  .footer-brand > span { margin-inline: auto; }
  .footer-column a, .footer-column > span { margin-inline: auto; }
  .social-links { justify-content: center; }
  .footer-bottom { flex-direction: column; text-align: center; }

  .floating-whatsapp { width: 54px; height: 54px; right: 16px; bottom: 16px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .marquee { animation: none; }
  .hero h1 .w > span { transform: none; }
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}

/* ---------- Ajustes de contraste en modo oscuro ---------- */
[data-theme="dark"] .section-kicker,
[data-theme="dark"] .eyebrow,
[data-theme="dark"] .audience-tag,
[data-theme="dark"] .project-type,
[data-theme="dark"] .cta-link,
[data-theme="dark"] .rotator-word,
[data-theme="dark"] .nav-menu a:hover,
[data-theme="dark"] .nav-menu a.active,
[data-theme="dark"] .faq-plus,
[data-theme="dark"] .cc-arrow,
[data-theme="dark"] .theme-toggle,
[data-theme="dark"] .btn-secondary,
[data-theme="dark"] .faq-ico,
[data-theme="dark"] .audience-icon { color: #7db3ff; }

[data-theme="dark"] .service-card { --c: #5b8dff; }
[data-theme="dark"] .service-card:nth-child(3n+2) { --c: #22d3ee; }
[data-theme="dark"] .service-card:nth-child(3n) { --c: #8ea2ff; }

[data-theme="dark"] .audience-card.featured .audience-tag { color: #bff4ff; }
[data-theme="dark"] .audience-card.featured .audience-icon { color: #fff; }
[data-theme="dark"] .contact-main .section-kicker { color: #fff; }
[data-theme="dark"] .faq-item.open .faq-ico,
[data-theme="dark"] .faq-item.open .faq-plus { color: #fff; }


/* =====================================================================
   Fondo animado en toda la página (red de nodos fija detrás del contenido)
   ===================================================================== */
.page-canvas {
  position: fixed;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

main, .site-footer { position: relative; z-index: 1; }

/* Las secciones dejan ver el fondo animado */
.services-section,
.projects-section,
.faq-section { background: color-mix(in srgb, var(--surface) 74%, transparent); }

.solutions-section,
.about-section,
.contact-section { background: color-mix(in srgb, var(--bg) 55%, transparent); }

.hero { background-color: var(--hero-a); }


/* =====================================================================
   DEX · mascota de DemarTech
   ===================================================================== */
.hero-visual { min-height: 580px; }

.dex-glow {
  position: absolute;
  width: 440px;
  height: 440px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(37, 99, 235, .30), rgba(6, 182, 212, .16) 50%, transparent 70%);
  filter: blur(6px);
  animation: dexPulse 5s ease-in-out infinite;
}

[data-theme="dark"] .dex-glow { background: radial-gradient(circle, rgba(37, 99, 235, .5), rgba(6, 182, 212, .22) 50%, transparent 70%); }

@keyframes dexPulse { 50% { transform: scale(1.12); opacity: .8; } }

.dex-stage {
  position: relative;
  z-index: 3;
  transform: perspective(900px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg));
  transition: transform .25s ease-out;
  animation: heroRise .9s .35s cubic-bezier(.2, .7, .2, 1) both;
}

.dex-hero {
  display: block;
  width: auto;
  height: min(560px, 66vh);
  filter: drop-shadow(0 30px 34px rgba(20, 60, 160, .30));
  animation: dexFloat 5.5s ease-in-out infinite;
}

@keyframes dexFloat { 50% { transform: translateY(-12px); } }

.dex-bubble {
  position: absolute;
  top: 4%;
  right: -86px;
  max-width: 220px;
  padding: 12px 18px;
  border-radius: 20px 20px 20px 6px;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: 0 16px 38px rgba(16, 40, 100, .18);
  font-size: .85rem;
  font-weight: 700;
  line-height: 1.35;
  animation: bubblePop .7s 1.1s cubic-bezier(.2, .9, .3, 1.4) both;
}

.dex-bubble span { display: block; transition: opacity .3s ease, transform .3s ease; }
.dex-bubble span.is-out { opacity: 0; transform: translateY(-6px); }

@keyframes bubblePop { from { opacity: 0; transform: scale(.5) translateY(14px); } to { opacity: 1; transform: none; } }

/* ---------- Sección Conoce a Dex ---------- */
.dex-section { background: color-mix(in srgb, var(--surface) 70%, transparent); }

.dex-grid { display: grid; grid-template-columns: .95fr 1.05fr; gap: 70px; align-items: center; }

.dex-visual { position: relative; min-height: 560px; display: grid; place-items: end center; }

.dex-disc {
  position: absolute;
  bottom: 10px;
  left: 50%;
  width: 430px;
  height: 430px;
  margin-left: -215px;
  border-radius: 50%;
  background: var(--grad-deep);
  box-shadow: 0 40px 90px rgba(37, 99, 235, .35);
  animation: dexPulse 6s ease-in-out infinite;
}

.dex-ring {
  position: absolute;
  bottom: 10px;
  left: 50%;
  border: 2px dashed color-mix(in srgb, var(--accent) 55%, transparent);
  border-radius: 50%;
  transform: translateX(-50%);
  pointer-events: none;
}

.dex-ring.d1 { width: 520px; height: 520px; bottom: -35px; animation: spinX 40s linear infinite; }
.dex-ring.d2 { width: 610px; height: 610px; bottom: -80px; border-style: solid; border-color: color-mix(in srgb, var(--primary) 18%, transparent); animation: spinX 60s linear infinite reverse; }

@keyframes spinX { to { transform: translateX(-50%) rotate(360deg); } }

.dex-img {
  position: relative;
  z-index: 2;
  display: block;
  height: 540px;
  width: auto;
  filter: drop-shadow(0 26px 30px rgba(8, 20, 70, .35));
  animation: dexFloat 6s ease-in-out infinite;
}

.dex-chip {
  position: absolute;
  z-index: 3;
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  border-radius: 18px;
  color: var(--primary);
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: 0 14px 34px rgba(16, 40, 100, .18);
  font-size: 1.3rem;
  animation: float 4s ease-in-out infinite;
}

.dex-chip.k1 { top: 12%; left: 6%; }
.dex-chip.k2 { top: 5%; right: 12%; color: #0891b2; animation-delay: .6s; }
.dex-chip.k3 { top: 46%; right: 0; color: var(--deep); animation-delay: 1.2s; }
.dex-chip.k4 { top: 52%; left: 0; color: #0891b2; animation-delay: 1.8s; }

[data-theme="dark"] .dex-chip.k3 { color: #8ea2ff; }

.dex-content h2 { margin-top: 14px; font-size: clamp(2rem, 4vw, 3rem); line-height: 1.15; letter-spacing: -.035em; }
.dex-content h2::after {
  content: "";
  display: block;
  width: 0;
  height: 4px;
  margin-top: 16px;
  border-radius: 4px;
  background: var(--grad);
  transition: width .9s .3s cubic-bezier(.2, .7, .2, 1);
}
.dex-content.visible h2::after { width: 72px; }
.dex-content > p { max-width: 560px; margin-top: 18px; color: var(--muted); }

.dex-links { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }

.dex-links a {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 12px 20px;
  border-radius: 999px;
  color: var(--primary);
  background: var(--surface);
  border: 1px solid color-mix(in srgb, var(--primary) 30%, var(--border));
  font-size: .9rem;
  font-weight: 700;
  transition: var(--transition);
}

.dex-links a:hover { color: #fff; background: var(--grad); border-color: transparent; transform: translateY(-3px); box-shadow: 0 14px 30px rgba(37, 99, 235, .3); }

[data-theme="dark"] .dex-links a { color: #7db3ff; }
[data-theme="dark"] .dex-links a:hover { color: #fff; }

/* ---------- Dex en el bloque de contacto ---------- */
.contact-dex {
  position: absolute !important;
  right: 14px;
  bottom: 0;
  z-index: 1 !important;
  height: 92%;
  max-height: 440px;
  width: auto;
  pointer-events: none;
  filter: drop-shadow(0 18px 24px rgba(0, 10, 80, .4));
  animation: dexFloat 6s ease-in-out infinite;
}

@media (min-width: 651px) and (max-width: 1050px), (min-width: 1251px) {
  .contact-main { padding-right: 250px; }
}

@media (min-width: 1051px) and (max-width: 1250px), (max-width: 650px) {
  .contact-dex { display: none; }
}

/* ---------- Responsive de Dex ---------- */
@media (max-width: 1050px) {
  .dex-bubble { right: -40px; }
}

@media (max-width: 850px) {
  .dex-grid { grid-template-columns: 1fr; gap: 30px; }
  .dex-content { text-align: center; }
  .dex-content h2::after { margin-inline: auto; }
  .dex-content > p { margin-inline: auto; }
  .dex-links { justify-content: center; }
  .hero-visual { min-height: 500px; }
}

@media (max-width: 650px) {
  .dex-hero { height: 380px; }
  .dex-glow { width: 320px; height: 320px; }
  .dex-bubble { right: -10px; top: 0; max-width: 170px; font-size: .75rem; padding: 9px 13px; }
  .hero-visual { min-height: 440px; }
  .dex-visual { min-height: 440px; }
  .dex-disc { width: 320px; height: 320px; margin-left: -160px; }
  .dex-ring.d1 { width: 390px; height: 390px; bottom: -35px; }
  .dex-ring.d2 { width: 450px; height: 450px; bottom: -65px; }
  .dex-img { height: 400px; }
  .dex-chip { width: 48px; height: 48px; font-size: 1.1rem; border-radius: 15px; }
}
