/* ---------- Reset & Tokens ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }
body { margin: 0; padding: 0; }

:root {
  --bg: #FAFAFA;
  --bg-elev: #FFFFFF;
  --fg: #0A0A0A;
  --fg-muted: #737373;
  --fg-subtle: #A3A3A3;
  --border: #E5E5E5;
  --border-strong: #D4D4D4;
  --accent: #8B5CF6;
  --accent-hover: #7C3AED;
  --accent-soft: rgba(139, 92, 246, 0.08);
  --grid-dot: rgba(10, 10, 10, 0.07);
  --header-bg: rgba(250, 250, 250, 0.72);
  --shadow-sm: 0 1px 2px rgba(10,10,10,0.04);
  --shadow-md: 0 4px 16px rgba(10,10,10,0.06);
  --shadow-lg: 0 12px 40px rgba(10,10,10,0.08);
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --radius-xl: 20px;
  --mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
  --sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --max-w: 1200px;
  --gutter: clamp(20px, 4vw, 48px);
}

html[data-theme="dark"] {
  --bg: #0A0A0A;
  --bg-elev: #141414;
  --fg: #FAFAFA;
  --fg-muted: #A3A3A3;
  --fg-subtle: #737373;
  --border: #262626;
  --border-strong: #363636;
  --accent: #3B82F6;
  --accent-hover: #60A5FA;
  --accent-soft: rgba(59, 130, 246, 0.14);
  --grid-dot: rgba(250, 250, 250, 0.06);
  --header-bg: rgba(10, 10, 10, 0.72);
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.3);
  --shadow-md: 0 4px 16px rgba(0,0,0,0.4);
  --shadow-lg: 0 12px 40px rgba(0,0,0,0.5);
}

/* ---------- Tema "El bucle" (light): rascacielos + oficinistas ---------- */
html[data-theme="light"] body {
  background-color: var(--bg);
  background-image:
    linear-gradient(180deg, rgba(248, 250, 252, 0.55) 0%, rgba(203, 213, 225, 0.85) 60%, rgba(148, 163, 184, 0.75) 100%),
    url('../img/bucle.webp');
  background-size: cover;
  background-position: center top;
  background-attachment: fixed;
  background-repeat: no-repeat;
}
/* Las secciones internas en light bajan su fondo para que se vea el wallpaper */
html[data-theme="light"] section,
html[data-theme="light"] .container { background-color: transparent; }
/* Header del bucle: cristal con tinte azul corporativo */
html[data-theme="light"] .site-header {
  backdrop-filter: blur(14px) saturate(1.2);
  -webkit-backdrop-filter: blur(14px) saturate(1.2);
}
/* Service / work cards en bucle: superficie blanca cristal sobre el fondo de rascacielos */
html[data-theme="light"] .service-card,
html[data-theme="light"] .work-card,
html[data-theme="light"] .contact-alt,
html[data-theme="light"] .why-grid {
  background-color: rgba(255, 255, 255, 0.82);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
/* En el bucle la lluvia matrix verde casi desaparece (estás dentro, no la ves) */
html[data-theme="light"] #aew-matrix-bg { opacity: 0.05 !important; mix-blend-mode: multiply; }
/* La silueta verde se atenúa y vira a azul corporativo */
html[data-theme="light"] #aew-silhouette {
  filter: drop-shadow(0 0 14px rgba(30, 64, 175, 0.4)) drop-shadow(0 10px 24px rgba(0, 0, 0, 0.25)) saturate(0.4) brightness(0.7);
  opacity: 0.55;
}
/* Pastilla flotante de "salir del bucle" (la roja) brilla más en el bucle: invitación a escapar */
html[data-theme="light"] #matrix-pills .pill-red {
  filter: drop-shadow(0 16px 28px rgba(239, 68, 68, 0.65)) drop-shadow(0 0 20px rgba(239, 68, 68, 0.35));
}
html[data-theme="light"] #matrix-pills .pill-blue { opacity: 0.78; }
/* Scroll-progress en bucle: azul corporativo monótono */
html[data-theme="light"] .scroll-progress {
  background: linear-gradient(90deg, #1e40af, #60a5fa);
  box-shadow: 0 0 8px rgba(30, 64, 175, 0.35);
}
/* Cursor aura en bucle: tinte azul frío */
html[data-theme="light"] .cursor-aura {
  background: radial-gradient(circle, rgba(30, 64, 175, 0.16) 0%, rgba(30, 64, 175, 0.06) 40%, transparent 70%);
}

body {
  background: var(--bg);
  color: var(--fg);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  font-feature-settings: 'cv02', 'cv03', 'cv04', 'cv11';
  transition: background-color 0.6s cubic-bezier(0.4, 0, 0.2, 1), color 0.6s cubic-bezier(0.4, 0, 0.2, 1);
  overflow-x: hidden;
}

/* Smooth theme transition on all surfaces */
@supports (view-transition-name: root) {
  ::view-transition-old(root),
  ::view-transition-new(root) {
    animation-duration: 0.6s;
    animation-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
    mix-blend-mode: normal;
  }
  ::view-transition-old(root) {
    animation: vt-old 0.6s cubic-bezier(0.4, 0, 0.2, 1) forwards;
  }
  ::view-transition-new(root) {
    animation: vt-new 0.6s cubic-bezier(0.4, 0, 0.2, 1) forwards;
  }
}
@keyframes vt-old {
  0%   { opacity: 1; filter: blur(0) brightness(1); transform: scale(1); }
  100% { opacity: 0; filter: blur(6px) brightness(0.9); transform: scale(1.03); }
}
@keyframes vt-new {
  0%   { opacity: 0; filter: blur(6px) brightness(1.1); transform: scale(0.98); }
  100% { opacity: 1; filter: blur(0) brightness(1); transform: scale(1); }
}
html.theme-transition,
html.theme-transition *,
html.theme-transition *::before,
html.theme-transition *::after {
  transition: background-color 0.55s cubic-bezier(0.4, 0, 0.2, 1),
              color 0.55s cubic-bezier(0.4, 0, 0.2, 1),
              border-color 0.55s cubic-bezier(0.4, 0, 0.2, 1),
              box-shadow 0.55s cubic-bezier(0.4, 0, 0.2, 1),
              fill 0.55s cubic-bezier(0.4, 0, 0.2, 1),
              stroke 0.55s cubic-bezier(0.4, 0, 0.2, 1),
              opacity 0.55s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

/* subtle vignette over canvas to give depth */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background:
    radial-gradient(ellipse at center, transparent 30%, var(--bg) 95%);
}

/* Cursor aura (glow follower) */
.cursor-aura {
  position: fixed;
  top: 0; left: 0;
  width: 520px;
  height: 520px;
  pointer-events: none;
  z-index: 1;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(34, 197, 94, 0.12) 0%, rgba(59, 130, 246, 0.06) 40%, transparent 70%);
  transform: translate(-50%, -50%);
  mix-blend-mode: screen;
  transition: opacity 0.3s;
  opacity: 0;
}
@media (hover: hover) {
  .cursor-aura.active { opacity: 1; }
}

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

.container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

/* ---------- Typography ---------- */
h1, h2, h3, h4 {
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.1;
  margin: 0;
  text-wrap: balance;
}
h1 { font-size: clamp(3.5rem, 11vw, 9rem); letter-spacing: -0.045em; font-weight: 700; }
h2 { font-size: clamp(1.875rem, 3.5vw, 2.75rem); letter-spacing: -0.028em; }
h3 { font-size: clamp(1.125rem, 1.6vw, 1.375rem); }
p { margin: 0; text-wrap: pretty; }

.mono { font-family: var(--mono); font-feature-settings: 'zero', 'ss01'; }
.eyebrow {
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--fg-muted);
}

/* ---------- Header ---------- */
/* ============================================================
   HEADER · sublime · fixed + progress bar + glass morphism
   ============================================================ */
.site-header {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  width: 100% !important;
  z-index: 9000 !important; /* sobre todo lo permanente (pastillas flotantes 800, monitor CRT, silueta) — debajo del modal preview 9990 y el toast 10000 que SÍ deben taparlo cuando aparecen */
  padding: 12px 0;
  background: transparent;
  border-bottom: 1px solid transparent;
  transform: none !important; /* asegurar que no haya transform que rompa fixed */
  transition: padding 0.3s ease,
              background 0.3s ease,
              border-color 0.3s ease,
              box-shadow 0.3s ease,
              backdrop-filter 0.3s ease;
}
/* Estado scrolled · glass + verde matrix */
.site-header.scrolled {
  padding: 8px 0;
  background:
    linear-gradient(180deg,
      rgba(5, 7, 6, 0.85) 0%,
      rgba(5, 7, 6, 0.78) 100%);
  backdrop-filter: saturate(170%) blur(16px);
  -webkit-backdrop-filter: saturate(170%) blur(16px);
  border-bottom: 1px solid rgba(34, 197, 94, 0.18);
  box-shadow:
    0 8px 30px rgba(0, 0, 0, 0.4),
    0 0 0 1px rgba(34, 197, 94, 0.05);
}
/* Glow line bajo el header en scrolled */
.site-header.scrolled::after {
  content: "";
  position: absolute;
  bottom: -1px;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg,
    transparent 0%,
    rgba(34, 197, 94, 0.6) 30%,
    rgba(34, 197, 94, 0.6) 70%,
    transparent 100%);
  filter: blur(0.5px);
  pointer-events: none;
}
/* Light theme adaptado */
html[data-theme="light"] .site-header.scrolled {
  background:
    linear-gradient(180deg,
      rgba(255, 255, 255, 0.92) 0%,
      rgba(248, 250, 252, 0.86) 100%);
  border-bottom-color: rgba(30, 64, 175, 0.18);
  box-shadow:
    0 8px 28px rgba(0, 0, 0, 0.08),
    0 0 0 1px rgba(30, 64, 175, 0.04);
}
html[data-theme="light"] .site-header.scrolled::after {
  background: linear-gradient(90deg,
    transparent, rgba(30, 64, 175, 0.55), transparent);
}

/* Compensación: padding-top del primer elemento para que el header fixed no tape el hero
   (la altura del header en estado normal es ~128px con logo grande;
    el hero ya tiene padding propio así que normalmente no requiere extra) */

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  position: relative;
}

/* ---- Logo · con LED status ---- */
.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--mono);
  font-size: 15px;
  font-weight: 600;
  color: var(--fg);
  text-decoration: none;
  letter-spacing: -0.02em;
  position: relative;
  transition: filter 0.25s ease;
}
.logo:hover { filter: brightness(1.1); }
.logo-status {
  position: absolute;
  top: 50%;
  left: -14px;
  transform: translateY(-50%);
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 6px #22c55e, 0 0 2px #22c55e;
  animation: logoStatusPulse 1.6s ease-in-out infinite;
  flex-shrink: 0;
  opacity: 0;
  transition: opacity 0.3s ease;
}
.site-header.scrolled .logo-status { opacity: 1; }
@keyframes logoStatusPulse {
  0%, 100% { opacity: 1; transform: translateY(-50%) scale(1); }
  50%      { opacity: 0.5; transform: translateY(-50%) scale(0.7); }
}
.logo-img {
  height: var(--logo-h, 120px);
  width: auto;
  display: block;
  transition: height 0.3s ease;
  /* isolate the glyphs from any background around them */
  mix-blend-mode: multiply;
}
.site-header.scrolled .logo-img { height: var(--logo-h-scrolled, 78px); }
html[data-theme="dark"] .logo-img {
  /* on dark bg, invert the light parts so the silver "AE" stays readable while matrix green shifts to complementary */
  mix-blend-mode: screen;
  filter: brightness(1.1) contrast(1.05);
}
.logo-footer .logo-img { height: 88px; }
.logo-wordmark {
  font-family: var(--mono);
  font-weight: 600;
  font-size: 14px;
  letter-spacing: -0.02em;
  color: var(--fg);
  /* hide wordmark on smaller screens — the image already says "AE_Works" */
  display: none;
}
.logo-dot { color: #22C55E; }

.nav {
  display: flex;
  align-items: center;
  gap: 2px;
}
.nav a {
  color: var(--fg-muted);
  text-decoration: none;
  font-family: var(--mono);
  font-size: 12.5px;
  font-weight: 500;
  letter-spacing: 0.5px;
  padding: 8px 12px;
  border-radius: 4px;
  transition: color 0.2s ease, background 0.2s ease, text-shadow 0.2s ease;
  position: relative;
}
.nav a::after {
  /* Underline animado verde matrix */
  content: "";
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 4px;
  height: 1px;
  background: linear-gradient(90deg,
    transparent,
    rgba(34, 197, 94, 0.85),
    transparent);
  transform: scaleX(0);
  transform-origin: center;
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}
.nav a:hover {
  color: #4ade80;
  background: transparent;
  text-shadow: 0 0 6px rgba(34, 197, 94, 0.4);
}
.nav a:hover::after { transform: scaleX(1); }

/* Light theme */
html[data-theme="light"] .nav a:hover {
  color: #1e40af;
  text-shadow: none;
}
html[data-theme="light"] .nav a::after {
  background: linear-gradient(90deg,
    transparent, rgba(30, 64, 175, 0.55), transparent);
}

.header-actions { display: flex; align-items: center; gap: 10px; }

/* Theme toggle · estilo terminal */
.theme-toggle, .menu-toggle {
  width: 38px;
  height: 38px;
  border-radius: 5px;
  border: 1px solid rgba(34, 197, 94, 0.22);
  background: rgba(5, 7, 6, 0.5);
  color: var(--fg);
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: all 0.2s ease;
}
.theme-toggle:hover, .menu-toggle:hover {
  border-color: rgba(34, 197, 94, 0.6);
  background: rgba(34, 197, 94, 0.08);
  color: #4ade80;
  box-shadow: 0 0 8px rgba(34, 197, 94, 0.2);
}
.theme-toggle svg, .menu-toggle svg { width: 16px; height: 16px; }
.theme-toggle .icon-moon { display: none; }
html[data-theme="dark"] .theme-toggle .icon-sun { display: none; }
html[data-theme="dark"] .theme-toggle .icon-moon { display: block; }

html[data-theme="light"] .theme-toggle,
html[data-theme="light"] .menu-toggle {
  border-color: rgba(30, 64, 175, 0.22);
  background: rgba(255, 255, 255, 0.6);
}
html[data-theme="light"] .theme-toggle:hover,
html[data-theme="light"] .menu-toggle:hover {
  border-color: rgba(30, 64, 175, 0.55);
  background: rgba(30, 64, 175, 0.08);
  color: #1e40af;
  box-shadow: 0 0 8px rgba(30, 64, 175, 0.15);
}

.menu-toggle { display: none; }

/* CTA del header · pill terminal */
.header-cta {
  display: inline-flex !important;
  align-items: center;
  gap: 8px;
  padding: 9px 16px !important;
  font-family: var(--mono) !important;
  font-size: 12px !important;
  font-weight: 600 !important;
  letter-spacing: 1.5px !important;
  text-transform: uppercase !important;
  background: linear-gradient(180deg, rgba(34, 197, 94, 0.1), rgba(34, 197, 94, 0.04)) !important;
  border: 1px solid rgba(34, 197, 94, 0.5) !important;
  color: #4ade80 !important;
  border-radius: 5px !important;
  transition: all 0.22s ease !important;
  text-shadow: 0 0 4px rgba(34, 197, 94, 0.4);
}
.header-cta:hover {
  background: linear-gradient(180deg, #22c55e, #16a34a) !important;
  color: #050706 !important;
  border-color: #22c55e !important;
  text-shadow: none;
  box-shadow: 0 0 14px rgba(34, 197, 94, 0.4),
              inset 0 1px 0 rgba(255, 255, 255, 0.15);
  transform: translateY(-1px);
}
.header-cta-prompt {
  font-size: 14px;
  opacity: 0.9;
  font-weight: 700;
}

html[data-theme="light"] .header-cta {
  background: linear-gradient(180deg, rgba(30, 64, 175, 0.08), rgba(30, 64, 175, 0.03)) !important;
  border-color: rgba(30, 64, 175, 0.5) !important;
  color: #1e40af !important;
  text-shadow: none;
}
html[data-theme="light"] .header-cta:hover {
  background: linear-gradient(180deg, #1e40af, #1e3a8a) !important;
  color: #fff !important;
  border-color: #1e40af !important;
  box-shadow: 0 0 14px rgba(30, 64, 175, 0.3),
              inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

/* ---- Progress bar de scroll ---- */
.site-header-progress {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 2px;
  pointer-events: none;
  background: rgba(34, 197, 94, 0.04);
  opacity: 0;
  transition: opacity 0.3s ease;
}
.site-header.scrolled .site-header-progress { opacity: 1; }
.site-header-progress-bar {
  display: block;
  height: 100%;
  width: var(--scroll-progress, 0%);
  background: linear-gradient(90deg, #22c55e 0%, #4ade80 60%, #a7f3d0 100%);
  box-shadow: 0 0 8px #22c55e, 0 0 2px #22c55e;
  transition: width 0.08s linear;
  position: relative;
}
.site-header-progress-bar::after {
  /* Punto de luz al final del progress */
  content: "";
  position: absolute;
  right: 0;
  top: 50%;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #a7f3d0;
  box-shadow: 0 0 8px #4ade80, 0 0 14px rgba(34, 197, 94, 0.5);
  transform: translate(50%, -50%);
}
html[data-theme="light"] .site-header-progress {
  background: rgba(30, 64, 175, 0.04);
}
html[data-theme="light"] .site-header-progress-bar {
  background: linear-gradient(90deg, #1e40af 0%, #3b82f6 60%, #93c5fd 100%);
  box-shadow: 0 0 6px #3b82f6;
}
html[data-theme="light"] .site-header-progress-bar::after {
  background: #93c5fd;
  box-shadow: 0 0 8px #3b82f6;
}

@media (prefers-reduced-motion: reduce) {
  .site-header,
  .nav a,
  .nav a::after,
  .logo-img,
  .logo-status,
  .site-header-progress-bar {
    transition: none !important;
    animation: none !important;
  }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 20px;
  border-radius: var(--radius-sm);
  font-family: var(--sans);
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all 0.2s;
  white-space: nowrap;
  line-height: 1;
}
.btn-primary {
  background: var(--fg);
  color: var(--bg);
  border-color: var(--fg);
}
.btn-primary:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
  transform: translateY(-1px);
}
.btn-secondary {
  background: transparent;
  color: var(--fg);
  border-color: var(--border-strong);
}
.btn-secondary:hover { background: var(--bg-elev); border-color: var(--fg); }

.btn-ghost {
  background: transparent;
  color: var(--fg);
  padding: 12px 16px;
}
.btn-ghost:hover { color: var(--accent); }

.btn-lg { padding: 16px 24px; font-size: 15px; }
.arrow { transition: transform 0.2s; }
.btn:hover .arrow { transform: translateX(3px); }

/* ---------- Hero ---------- */
.hero {
  min-height: calc(100vh - 72px);
  display: flex;
  align-items: center;
  padding: var(--hero-pt, 200px) 0 120px;
  position: relative;
  text-align: center;
}
.hero-inner { max-width: 100%; margin: 0 auto; display: flex; flex-direction: column; align-items: center; }

.badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px 6px 10px;
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 12px;
  font-family: var(--mono);
  font-weight: 500;
  color: var(--fg-muted);
  background: var(--bg-elev);
  margin-bottom: 28px;
}
.badge-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #22C55E;
  box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.6);
  animation: pulse 2s infinite;
}
@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.4); }
  50% { box-shadow: 0 0 0 6px rgba(34, 197, 94, 0); }
}

.hero h1 { margin-bottom: 24px; line-height: 1.08; width: 100%; padding-bottom: 0.18em; }
.hero h1 .accent { color: var(--accent); }
.hero-sub {
  font-size: clamp(1.0625rem, 1.5vw, 1.25rem);
  color: var(--fg-muted);
  max-width: 620px;
  margin: 0 auto 40px;
  line-height: 1.55;
}
.hero-ctas { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; justify-content: center; }

.hero-meta {
  margin-top: 72px;
  display: flex;
  flex-wrap: wrap;
  gap: 40px 56px;
  padding-top: 32px;
  border-top: 1px solid var(--border);
  max-width: 880px;
  justify-content: center;
  width: 100%;
}
.hero-meta .stat .num {
  font-family: var(--mono);
  font-size: 22px;
  font-weight: 600;
  color: var(--fg);
  letter-spacing: -0.02em;
  display: block;
  margin-bottom: 4px;
}
.hero-meta .stat .label {
  font-size: 13px;
  color: var(--fg-muted);
}

/* ---------- Sections ---------- */
section { padding: clamp(80px, 10vw, 140px) 0; position: relative; }
.section-head {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 32px;
  align-items: end;
  margin-bottom: 64px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--border);
}
.section-head .kicker {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}
.section-head .kicker::before {
  content: '';
  width: 24px;
  height: 1px;
  background: var(--fg-muted);
}
.section-head h2 { max-width: 560px; }
.section-head .num {
  font-family: var(--mono);
  font-size: 13px;
  color: var(--fg-subtle);
}

/* ---------- Servicios ---------- */
.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.service-card {
  padding: 32px;
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  display: flex;
  flex-direction: column;
  transition: all 0.3s;
  position: relative;
  overflow: hidden;
}
.service-card::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(135deg, var(--accent-soft), transparent 60%);
  opacity: 0;
  transition: opacity 0.3s;
  pointer-events: none;
}
.service-card:hover {
  border-color: var(--border-strong);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}
.service-card:hover::after { opacity: 1; }

.service-icon {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--bg);
  display: grid;
  place-items: center;
  margin-bottom: 24px;
  color: var(--fg);
}
.service-icon svg { width: 20px; height: 20px; }

.service-card h3 { margin-bottom: 10px; }
.service-card > p { color: var(--fg-muted); font-size: 14px; margin-bottom: 24px; }

.service-card ul {
  list-style: none;
  padding: 0;
  margin: 0 0 28px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.service-card li {
  font-size: 14px;
  color: var(--fg);
  display: flex;
  gap: 10px;
  align-items: flex-start;
}
.service-card li::before {
  content: '';
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--accent);
  margin-top: 9px;
  flex-shrink: 0;
}

.service-meta {
  margin-top: auto;
  padding-top: 20px;
  border-top: 1px solid var(--border);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 16px;
}
.service-meta .label {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--fg-subtle);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  display: block;
  margin-bottom: 4px;
}
.service-meta .value {
  font-family: var(--mono);
  font-size: 15px;
  font-weight: 600;
  color: var(--fg);
}
.service-meta .price .value { color: var(--accent); }

.service-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--fg);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  padding: 4px 0;
  border-bottom: 1px solid transparent;
  transition: color 0.2s, border-color 0.2s;
  align-self: flex-start;
  position: relative;
  z-index: 1;
}
.service-link:hover { color: var(--accent); border-color: var(--accent); }
.service-link:hover .arrow { transform: translateX(3px); }

/* ---------- Por qué ---------- */
.why-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.why-item {
  background: var(--bg);
  padding: 44px 40px;
  display: flex;
  gap: 20px;
  align-items: flex-start;
}
.why-icon {
  width: 40px;
  height: 40px;
  border-radius: 9px;
  background: var(--bg-elev);
  border: 1px solid var(--border);
  display: grid;
  place-items: center;
  flex-shrink: 0;
  color: var(--accent);
}
.why-icon svg { width: 18px; height: 18px; }
.why-item h3 { margin-bottom: 8px; font-size: 18px; }
.why-item p { color: var(--fg-muted); font-size: 14.5px; line-height: 1.6; }

/* ---------- Proceso ---------- */
.process {
  background: var(--bg-elev);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.process-timeline {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  position: relative;
  gap: 0;
}
.process-timeline::before {
  content: '';
  position: absolute;
  top: 27px;
  left: 6%;
  right: 6%;
  height: 1px;
  background: linear-gradient(to right, var(--border) 0%, var(--accent) 50%, var(--border) 100%);
  background-size: 200% 100%;
  animation: flow 6s linear infinite;
}
@keyframes flow {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}
.process-step {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: 0 24px;
  position: relative;
}
.process-step:first-child { padding-left: 0; }
.process-step:last-child { padding-right: 0; }

.process-step .step-node {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: var(--bg);
  border: 1px solid var(--border);
  display: grid;
  place-items: center;
  font-family: var(--mono);
  font-size: 14px;
  font-weight: 600;
  color: var(--fg);
  margin-bottom: 24px;
  position: relative;
  z-index: 1;
  transition: all 0.3s;
}
.process-step:hover .step-node {
  border-color: var(--accent);
  color: var(--accent);
  transform: scale(1.05);
}
.process-step h3 { font-size: 17px; margin-bottom: 8px; }
.process-step .duration {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--accent);
  margin-bottom: 12px;
  display: block;
}
.process-step p { color: var(--fg-muted); font-size: 13.5px; line-height: 1.55; }

/* ============================================================
   TRABAJOS · sublime · galería terminal
   ============================================================ */
#trabajos {
  position: relative;
  padding: 96px 0 80px;
  overflow: hidden;
}
#trabajos .trabajos-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse at 50% 0%, rgba(34, 197, 94, 0.06) 0%, transparent 55%),
    radial-gradient(ellipse at 10% 80%, rgba(34, 197, 94, 0.03) 0%, transparent 50%);
}

/* Header centrado */
.trabajos-head {
  text-align: center;
  max-width: 720px;
  margin: 0 auto 36px;
  position: relative;
  z-index: 2;
}
.trabajos-eyebrow {
  display: inline-block;
  font-family: var(--mono);
  font-size: 11.5px;
  letter-spacing: 2.5px;
  color: rgba(34, 197, 94, 0.95);
  text-transform: uppercase;
  margin-bottom: 18px;
  padding: 5px 14px;
  border: 1px solid rgba(34, 197, 94, 0.3);
  background: rgba(34, 197, 94, 0.05);
  border-radius: 4px;
  text-shadow: 0 0 6px rgba(34, 197, 94, 0.4);
}
.trabajos-title {
  font-size: clamp(28px, 4.4vw, 44px);
  margin: 0 0 14px;
  letter-spacing: -0.01em;
  line-height: 1.15;
}
.trabajos-sub {
  color: var(--fg-muted);
  font-size: 16px;
  line-height: 1.6;
  margin: 0;
}

/* Banda de stats */
.trabajos-stats {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 24px;
  flex-wrap: wrap;
  margin: 0 auto 40px;
  padding: 14px 22px;
  background: linear-gradient(180deg, #0d0c0a 0%, #050706 100%);
  border: 1px solid rgba(34, 197, 94, 0.2);
  border-radius: 8px;
  width: fit-content;
  font-family: var(--mono);
  position: relative;
  z-index: 2;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
}
.t-stat {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 11.5px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
}
.t-stat-led {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.25);
}
.t-stat--live    .t-stat-led {
  background: #22c55e;
  box-shadow: 0 0 6px #22c55e, inset 0 1px 0 rgba(255,255,255,0.3);
  animation: tStatLedFast 1.4s ease-in-out infinite;
}
.t-stat--progress .t-stat-led {
  background: #fbbf24;
  box-shadow: 0 0 6px rgba(251,191,36,0.5), inset 0 1px 0 rgba(255,255,255,0.3);
  animation: tStatLedSlow 2s ease-in-out infinite;
}
.t-stat--slots   .t-stat-led {
  background: rgba(167, 243, 208, 0.5);
  box-shadow: 0 0 4px rgba(167,243,208,0.3), inset 0 1px 0 rgba(255,255,255,0.2);
}
@keyframes tStatLedFast {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%      { opacity: 0.55; transform: scale(0.85); }
}
@keyframes tStatLedSlow {
  0%, 100% { opacity: 0.6; }
  50%      { opacity: 1; }
}
.t-stat-num {
  font-size: 18px;
  font-weight: 700;
  color: #fff;
  font-variant-numeric: tabular-nums;
  text-shadow: 0 0 6px rgba(34, 197, 94, 0.3);
}
.t-stat--progress .t-stat-num { text-shadow: 0 0 6px rgba(251, 191, 36, 0.3); }
.t-stat--slots .t-stat-num { color: rgba(167, 243, 208, 0.85); text-shadow: none; }
.t-stat-label {
  color: rgba(167, 243, 208, 0.7);
  font-weight: 500;
  font-size: 10.5px;
}
.t-stat-sep {
  width: 1px;
  height: 22px;
  background: linear-gradient(180deg,
    transparent, rgba(34, 197, 94, 0.3), transparent);
}

/* Grid principal */
.work-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
  position: relative;
  z-index: 2;
}

/* Cards · ficha técnica con header */
.work-card {
  background: linear-gradient(180deg, var(--bg-elev) 0%, var(--bg) 100%);
  border: 1px solid rgba(34, 197, 94, 0.18);
  border-radius: 10px;
  overflow: hidden;
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1),
              border-color 0.3s ease,
              box-shadow 0.3s ease;
  display: flex;
  flex-direction: column;
  position: relative;
}
.work-card:hover {
  border-color: rgba(34, 197, 94, 0.55);
  transform: translateY(-4px);
  box-shadow:
    0 24px 60px rgba(0, 0, 0, 0.35),
    0 0 24px rgba(34, 197, 94, 0.12);
}

/* Cabecera de la card · ficha técnica */
.work-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 11px 16px;
  background: linear-gradient(180deg, #0d0c0a 0%, #050706 100%);
  border-bottom: 1px solid rgba(34, 197, 94, 0.18);
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
}
.work-card-tag {
  color: rgba(167, 243, 208, 0.85);
  font-weight: 600;
}
.work-card-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 9.5px;
  letter-spacing: 1.4px;
}
.wcs-led {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  flex-shrink: 0;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.25);
}
.work-card-status--live {
  color: #4ade80;
  text-shadow: 0 0 4px rgba(34, 197, 94, 0.4);
}
.work-card-status--live .wcs-led {
  background: #22c55e;
  box-shadow: 0 0 6px #22c55e, inset 0 1px 0 rgba(255,255,255,0.3);
  animation: tStatLedFast 1.4s ease-in-out infinite;
}
.work-card-status--progress {
  color: #fcd34d;
  text-shadow: 0 0 4px rgba(251, 191, 36, 0.35);
}
.work-card-status--progress .wcs-led {
  background: #fbbf24;
  box-shadow: 0 0 5px rgba(251, 191, 36, 0.5), inset 0 1px 0 rgba(255,255,255,0.3);
  animation: tStatLedSlow 2s ease-in-out infinite;
}
.work-card-status--slot {
  color: rgba(167, 243, 208, 0.55);
}
.work-card-status--slot .wcs-led {
  background: rgba(167, 243, 208, 0.4);
  border: 1px dashed rgba(167, 243, 208, 0.5);
}

/* Slot card · diferenciada visualmente */
.work-card--slot {
  border-style: dashed;
  border-color: rgba(34, 197, 94, 0.25);
  background: linear-gradient(180deg,
    rgba(34, 197, 94, 0.02) 0%,
    rgba(5, 7, 6, 0.5) 100%);
}
.work-card--slot:hover {
  border-style: solid;
  border-color: rgba(34, 197, 94, 0.5);
  transform: translateY(-2px);
}

.work-visual {
  aspect-ratio: 16 / 10;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  position: relative;
  overflow: hidden;
  display: grid;
  place-items: center;
  isolation: isolate;
}
/* Vignette sutil + glow superior (visible en hover) */
.work-visual::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 2;
  box-shadow:
    inset 0 0 30px rgba(0, 0, 0, 0.18),
    inset 0 1px 0 rgba(255, 255, 255, 0.04);
}
.work-visual::after {
  content: "";
  position: absolute;
  top: -50%;
  left: 0;
  right: 0;
  height: 55%;
  pointer-events: none;
  z-index: 3;
  background: linear-gradient(
    180deg,
    transparent 0%,
    rgba(34, 197, 94, 0.04) 42%,
    rgba(34, 197, 94, 0.10) 50%,
    rgba(34, 197, 94, 0.04) 58%,
    transparent 100%
  );
  opacity: 0;
  transition: opacity 0.2s ease;
}
.work-card:hover .work-visual::after {
  opacity: 1;
  animation: workScanSweep 1.6s cubic-bezier(0.4, 0, 0.6, 1) forwards;
}
@keyframes workScanSweep {
  from { top: -55%; }
  to   { top: 110%; }
}

.work-visual.placeholder {
  padding: 40px;
  background:
    radial-gradient(ellipse at center, rgba(34, 197, 94, 0.04) 0%, transparent 60%),
    repeating-linear-gradient(
      45deg,
      transparent 0,
      transparent 14px,
      rgba(34, 197, 94, 0.04) 14px,
      rgba(34, 197, 94, 0.04) 15px),
    #050706;
}
.work-visual.placeholder::before,
.work-visual.placeholder::after { display: none; }
.work-visual.placeholder .ph-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--mono);
  font-size: 11px;
  color: rgba(34, 197, 94, 0.7);
  background: rgba(5, 7, 6, 0.85);
  padding: 8px 14px;
  border: 1px dashed rgba(34, 197, 94, 0.35);
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 1.8px;
  font-weight: 500;
  text-shadow: 0 0 4px rgba(34, 197, 94, 0.25);
  position: relative;
}
.work-visual.placeholder .ph-label::before {
  content: "○";
  color: rgba(34, 197, 94, 0.6);
  font-size: 13px;
  margin-right: 2px;
}

/* Screenshot a pantalla completa dentro del recuadro */
.work-screenshot {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  background: var(--bg);
  z-index: 1;
}
/* Stack de capas: JPG inmediato + mshots live encima cuando carga */
.work-screenshot-stack {
  position: relative;
  display: block;
  width: 100%;
  height: 100%;
  transition: transform 0.7s cubic-bezier(0.16, 1, 0.3, 1), filter 0.4s ease;
  filter: saturate(0.96) contrast(1.01);
}
.work-card:hover .work-screenshot-stack,
.work-card:hover .work-visual > .work-screenshot {
  transform: scale(1.035);
  filter: saturate(1.05) contrast(1.04);
}
.work-screenshot-stack .work-screenshot {
  position: absolute;
  inset: 0;
}
.work-screenshot-stack .work-screenshot-live {
  opacity: 0;
  transition: opacity 0.6s ease;
  pointer-events: none;
}
.work-screenshot-stack .work-screenshot-live.is-loaded {
  opacity: 1;
}

/* Placeholder cuando no hay JPG fallback (proyectos en curso, sin captura local) */
.work-screenshot-stack.no-fallback {
  background:
    radial-gradient(ellipse at center, rgba(34, 197, 94, 0.06) 0%, transparent 70%),
    #0a0d0a;
}
.work-screenshot-loading {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  color: rgba(34, 197, 94, 0.7);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  text-align: center;
  padding: 16px;
}
.work-screenshot-loading svg {
  animation: workScreenshotSpin 1.6s linear infinite;
  filter: drop-shadow(0 0 4px rgba(34, 197, 94, 0.4));
}
@keyframes workScreenshotSpin {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

/* Badge "En curso" para proyectos privados */
.work-private-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 9px;
  background: rgba(5, 7, 6, 0.78);
  border: 1px solid rgba(251, 191, 36, 0.5);
  border-radius: 4px;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: #fbbf24;
  text-shadow: 0 0 4px rgba(251, 191, 36, 0.4);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  z-index: 5;
  pointer-events: none;
}
.work-private-badge svg { stroke: currentColor; flex-shrink: 0; }

/* Link tipo "En desarrollo · solo vista previa" sin enlace externo */
.work-link.work-link--private {
  color: rgba(251, 191, 36, 0.78);
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 1px;
  cursor: default;
  text-transform: uppercase;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.work-link.work-link--private::before {
  content: "●";
  color: #fbbf24;
  animation: privatePulse 1.8s ease-in-out infinite;
}
@keyframes privatePulse {
  0%, 100% { opacity: 1; }
  50%      { opacity: 0.4; }
}
/* Solo aplica transición a la imagen suelta cuando NO está dentro de stack */
.work-visual > .work-screenshot {
  transition: transform 0.7s cubic-bezier(0.16, 1, 0.3, 1), filter 0.4s ease;
  filter: saturate(0.96) contrast(1.01);
}

/* Línea superior de "encendido" sobre la cabecera del screenshot */
.work-card {
  position: relative;
}
.work-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg,
    transparent 0%,
    rgba(34, 197, 94, 0) 30%,
    rgba(34, 197, 94, 0.5) 50%,
    rgba(34, 197, 94, 0) 70%,
    transparent 100%);
  opacity: 0;
  transform: translateY(0) scaleX(0.4);
  transform-origin: center;
  transition: opacity 0.35s ease, transform 0.45s cubic-bezier(0.16, 1, 0.3, 1);
  pointer-events: none;
  z-index: 4;
}
.work-card:hover::before {
  opacity: 1;
  transform: translateY(0) scaleX(1);
}

@media (prefers-reduced-motion: reduce) {
  .work-screenshot { transition: none; }
  .work-card:hover .work-screenshot { transform: none; }
  .work-visual::after,
  .work-card::before { animation: none !important; transition: none !important; }
}

/* ---------- Trigger de vista previa interactiva ---------- */
.work-preview-trigger {
  appearance: none;
  -webkit-appearance: none;
  display: block;
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
  position: relative;
  font: inherit;
  color: inherit;
  overflow: hidden;
}
.work-preview-trigger:focus-visible {
  outline: 2px solid #22c55e;
  outline-offset: -3px;
}
.work-preview-hint {
  position: absolute;
  bottom: 12px;
  right: 12px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 11px;
  background: rgba(5, 7, 6, 0.78);
  border: 1px solid rgba(34, 197, 94, 0.45);
  border-radius: 4px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: #4ade80;
  text-shadow: 0 0 4px rgba(34, 197, 94, 0.4);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 0.25s ease, transform 0.25s ease;
  z-index: 5;
  pointer-events: none;
}
.work-preview-hint svg { stroke: currentColor; flex-shrink: 0; }
.work-card:hover .work-preview-hint,
.work-preview-trigger:focus-visible .work-preview-hint {
  opacity: 1;
  transform: translateY(0);
}

/* ---------- Modal Live Preview ---------- */
html.work-preview-locked,
html.work-preview-locked body { overflow: hidden; }

.work-preview-modal {
  position: fixed;
  inset: 0;
  z-index: 9990;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  opacity: 0;
  transition: opacity 0.22s ease;
}
.work-preview-modal[hidden] { display: none !important; }
.work-preview-modal.is-open { opacity: 1; }

.work-preview-backdrop {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at center, rgba(5, 14, 8, 0.75) 0%, rgba(2, 4, 3, 0.95) 100%),
    rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(8px) saturate(1.1);
  -webkit-backdrop-filter: blur(8px) saturate(1.1);
}

.work-preview-dialog {
  position: relative;
  width: 100%;
  max-width: 1280px;
  height: calc(100vh - 48px);
  max-height: 880px;
  background: #0a0d0a;
  border: 1px solid rgba(34, 197, 94, 0.35);
  border-radius: 10px;
  box-shadow:
    0 30px 80px rgba(0, 0, 0, 0.7),
    0 0 0 1px rgba(0, 0, 0, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.04);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transform: scale(0.96) translateY(8px);
  transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1);
}
.work-preview-modal.is-open .work-preview-dialog { transform: scale(1) translateY(0); }

/* Cabecera estilo barra de navegador retro */
.work-preview-head {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px 14px;
  background: linear-gradient(180deg, #14110e 0%, #0d0c0a 100%);
  border-bottom: 1px solid rgba(34, 197, 94, 0.25);
  font-family: var(--mono);
}
.work-preview-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}
.work-preview-led {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 6px rgba(34, 197, 94, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.2);
}
.work-preview-led--amber {
  background: #fbbf24;
  box-shadow: 0 0 6px rgba(251, 191, 36, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.2);
}
.work-preview-led--red {
  background: #ef4444;
  box-shadow: 0 0 6px rgba(239, 68, 68, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.2);
}
.work-preview-url-bar {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  background: rgba(5, 7, 6, 0.75);
  border: 1px solid rgba(34, 197, 94, 0.18);
  border-radius: 4px;
  font-size: 12px;
  letter-spacing: 0.5px;
  color: #a7f3d0;
  min-width: 0;
}
.work-preview-url-icon { display: inline-flex; color: #22c55e; opacity: 0.8; }
.work-preview-url-text {
  font-family: var(--mono);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-weight: 500;
}
.work-preview-title-text {
  margin-left: auto;
  padding-left: 14px;
  border-left: 1px dashed rgba(34, 197, 94, 0.2);
  font-size: 11px;
  color: rgba(167, 243, 208, 0.6);
  text-transform: uppercase;
  letter-spacing: 1.5px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex-shrink: 1;
}
.work-preview-title-text:empty { display: none; }
.work-preview-visit {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  font-family: var(--mono);
  font-size: 11.5px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: #22c55e;
  text-decoration: none;
  border: 1px solid rgba(34, 197, 94, 0.5);
  border-radius: 4px;
  background: transparent;
  transition: all 0.15s ease;
}
.work-preview-visit:hover {
  background: #22c55e;
  color: #050706;
  text-decoration: none;
  box-shadow: 0 0 12px rgba(34, 197, 94, 0.4);
}
.work-preview-visit svg { flex-shrink: 0; }
.work-preview-close {
  flex-shrink: 0;
  appearance: none;
  width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 4px;
  color: rgba(255, 255, 255, 0.6);
  cursor: pointer;
  transition: all 0.15s ease;
}
.work-preview-close:hover {
  background: rgba(239, 68, 68, 0.15);
  border-color: rgba(239, 68, 68, 0.5);
  color: #fca5a5;
}

/* Body del modal: iframe + spinner + bloqueo */
.work-preview-body {
  position: relative;
  flex: 1;
  min-height: 0;
  background: #fff;
  display: flex;
}
.work-preview-iframe {
  width: 100%;
  height: 100%;
  border: 0;
  background: #fff;
  display: block;
}

/* Spinner de carga */
.work-preview-spinner {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 18px;
  background: #0a0d0a;
  color: #4ade80;
  font-family: var(--mono);
  font-size: 12.5px;
  letter-spacing: 2px;
  text-transform: uppercase;
  z-index: 2;
}
.work-preview-spinner[hidden] { display: none; }
.work-preview-spinner-pulse {
  width: 56px;
  height: 56px;
  position: relative;
}
.work-preview-spinner-pulse::before,
.work-preview-spinner-pulse::after {
  content: "";
  position: absolute;
  inset: 0;
  border: 2px solid #22c55e;
  border-radius: 50%;
  animation: workPreviewPulse 1.4s ease-out infinite;
}
.work-preview-spinner-pulse::after { animation-delay: 0.7s; }
@keyframes workPreviewPulse {
  0%   { transform: scale(0.4); opacity: 0.9; }
  100% { transform: scale(1); opacity: 0; }
}

/* Mensaje de iframe bloqueado */
.work-preview-blocked {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 32px 24px;
  background: #0a0d0a;
  color: #e7e9ee;
  z-index: 3;
  gap: 16px;
}
.work-preview-blocked[hidden] { display: none; }
.work-preview-blocked svg {
  color: #fbbf24;
  margin-bottom: 4px;
}
.work-preview-blocked h3 {
  margin: 0;
  font-family: var(--mono);
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 0.5px;
  color: #fcd34d;
}
.work-preview-blocked p {
  margin: 0;
  font-size: 14px;
  color: rgba(231, 233, 238, 0.75);
  max-width: 400px;
  line-height: 1.55;
}
.work-preview-blocked .btn {
  margin-top: 8px;
}

/* Reduce motion */
@media (prefers-reduced-motion: reduce) {
  .work-preview-modal,
  .work-preview-dialog,
  .work-preview-spinner-pulse::before,
  .work-preview-spinner-pulse::after {
    transition: none !important;
    animation: none !important;
  }
}

/* Modo privado: oculta botones de "Abrir sitio" y URL bar */
.work-preview-modal.is-private .work-preview-visit,
.work-preview-modal.is-private .work-preview-blocked-visit,
.work-preview-modal.is-private #work-preview-blocked-visit {
  display: none !important;
}
.work-preview-modal.is-private .work-preview-url-bar {
  /* Ocultar URL: solo mostrar título y status */
  background: transparent;
  border-color: transparent;
}
.work-preview-modal.is-private .work-preview-url-icon,
.work-preview-modal.is-private .work-preview-url-text {
  display: none;
}
.work-preview-modal.is-private .work-preview-title-text {
  margin-left: 0;
  padding-left: 0;
  border-left: 0;
  font-size: 12.5px;
  color: #4ade80;
  letter-spacing: 1.8px;
  font-weight: 500;
}
/* Mensaje específico cuando iframe bloqueado en modo private */
.work-preview-modal.is-private #work-preview-blocked p {
  color: rgba(231, 233, 238, 0.55);
}
.work-preview-modal.is-private #work-preview-blocked h3::after {
  content: " · sin acceso externo";
  color: rgba(252, 211, 77, 0.6);
  font-weight: 400;
}

/* Responsive del modal */
@media (max-width: 720px) {
  .work-preview-modal { padding: 0; }
  .work-preview-dialog {
    height: 100vh;
    max-height: 100vh;
    border-radius: 0;
    border: 0;
  }
  .work-preview-head {
    flex-wrap: wrap;
    gap: 8px;
    padding: 8px 12px;
  }
  .work-preview-status { order: 1; }
  .work-preview-close { order: 2; margin-left: auto; }
  .work-preview-url-bar {
    order: 4;
    flex-basis: 100%;
    font-size: 11px;
    padding: 5px 10px;
  }
  .work-preview-title-text { display: none; }
  .work-preview-visit {
    order: 3;
    padding: 6px 10px;
    font-size: 10.5px;
    letter-spacing: 1px;
  }
}
@media (max-width: 480px) {
  .work-preview-hint span { display: none; }
  .work-preview-hint { padding: 6px; }
}

.work-info {
  padding: 22px 24px 24px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
}
.work-meta {
  display: flex;
  gap: 6px;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 10px;
}
.work-meta .tag {
  display: inline-block;
  font-family: var(--mono);
  font-size: 9.5px;
  color: rgba(34, 197, 94, 0.85);
  text-transform: uppercase;
  letter-spacing: 1.6px;
  padding: 3px 8px;
  border: 1px solid rgba(34, 197, 94, 0.3);
  border-radius: 3px;
  background: rgba(34, 197, 94, 0.04);
  font-weight: 600;
}
.work-meta .dot-sep { display: none; }

.work-info h3 {
  font-size: 20px;
  margin: 0 0 6px;
  letter-spacing: -0.005em;
}
.work-info p {
  font-size: 14px;
  color: var(--fg-muted);
  line-height: 1.55;
  margin: 0 0 18px;
  flex: 1;
}
.work-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #4ade80;
  text-decoration: none;
  font-size: 11.5px;
  font-weight: 600;
  font-family: var(--mono);
  letter-spacing: 1.5px;
  text-transform: uppercase;
  padding: 9px 14px;
  border: 1px solid rgba(34, 197, 94, 0.4);
  border-radius: 5px;
  background: rgba(34, 197, 94, 0.05);
  width: fit-content;
  margin-top: auto;
  transition: all 0.22s ease;
  text-shadow: 0 0 4px rgba(34, 197, 94, 0.3);
}
.work-link svg.arrow,
.work-link:not(.disabled) svg {
  transition: transform 0.22s ease;
}
.work-link:hover {
  background: #22c55e;
  color: #050706;
  border-color: #22c55e;
  text-shadow: none;
  text-decoration: none;
  box-shadow: 0 0 14px rgba(34, 197, 94, 0.4);
}
.work-link:hover svg.arrow,
.work-link:hover svg { transform: translateX(3px); }
.work-link.disabled {
  color: rgba(167, 243, 208, 0.45);
  cursor: default;
  pointer-events: none;
  border-color: rgba(167, 243, 208, 0.2);
  background: rgba(167, 243, 208, 0.03);
  text-shadow: none;
}

/* Footer de la sección · CTA al formulario */
.trabajos-foot {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
  margin: 48px auto 0;
  padding: 18px 28px;
  border: 1px dashed rgba(34, 197, 94, 0.28);
  border-radius: 8px;
  background:
    linear-gradient(90deg,
      rgba(34, 197, 94, 0.03),
      rgba(34, 197, 94, 0.06),
      rgba(34, 197, 94, 0.03));
  font-family: var(--mono);
  position: relative;
  z-index: 2;
  max-width: 640px;
  text-align: center;
}
.trabajos-foot-prompt {
  color: #22c55e;
  font-size: 14px;
  text-shadow: 0 0 4px rgba(34, 197, 94, 0.4);
  flex-shrink: 0;
}
.trabajos-foot-text {
  color: var(--fg);
  font-size: 13.5px;
  letter-spacing: 0.3px;
}
.trabajos-foot-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  background: rgba(34, 197, 94, 0.08);
  border: 1px solid rgba(34, 197, 94, 0.45);
  border-radius: 5px;
  color: #4ade80;
  text-decoration: none;
  font-family: var(--mono);
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 1.6px;
  text-transform: uppercase;
  text-shadow: 0 0 4px rgba(34, 197, 94, 0.3);
  transition: all 0.22s ease;
}
.trabajos-foot-cta:hover {
  background: #22c55e;
  color: #050706;
  border-color: #22c55e;
  text-shadow: none;
  text-decoration: none;
  box-shadow: 0 0 14px rgba(34, 197, 94, 0.4);
}
.trabajos-foot-cta:hover .trabajos-foot-arrow { transform: translateX(3px); }
.trabajos-foot-arrow {
  font-size: 14px;
  transition: transform 0.22s ease;
}

/* Light theme */
html[data-theme="light"] .trabajos-eyebrow {
  color: #1e40af;
  border-color: rgba(30, 64, 175, 0.3);
  background: rgba(30, 64, 175, 0.05);
  text-shadow: none;
}
html[data-theme="light"] .work-meta .tag {
  color: #1e40af;
  border-color: rgba(30, 64, 175, 0.3);
  background: rgba(30, 64, 175, 0.04);
}
html[data-theme="light"] .work-link {
  color: #1e40af;
  border-color: rgba(30, 64, 175, 0.4);
  background: rgba(30, 64, 175, 0.04);
  text-shadow: none;
}
html[data-theme="light"] .work-link:hover {
  background: #1e40af;
  color: #fff;
  border-color: #1e40af;
  box-shadow: 0 0 14px rgba(30, 64, 175, 0.3);
}
html[data-theme="light"] .trabajos-foot {
  border-color: rgba(30, 64, 175, 0.28);
  background:
    linear-gradient(90deg,
      rgba(30, 64, 175, 0.03),
      rgba(30, 64, 175, 0.06),
      rgba(30, 64, 175, 0.03));
}
html[data-theme="light"] .trabajos-foot-prompt { color: #1e40af; text-shadow: none; }
html[data-theme="light"] .trabajos-foot-cta {
  color: #1e40af;
  border-color: rgba(30, 64, 175, 0.4);
  background: rgba(30, 64, 175, 0.06);
  text-shadow: none;
}
html[data-theme="light"] .trabajos-foot-cta:hover {
  background: #1e40af;
  color: #fff;
  border-color: #1e40af;
  box-shadow: 0 0 14px rgba(30, 64, 175, 0.3);
}
/* Banda de stats y card-head se mantienen oscuras siempre — son terminales */

/* ---------- FAQ ---------- */
.faq-list {
  max-width: 860px;
  margin: 0 auto;
  border-top: 1px solid var(--border);
}
.faq-item { border-bottom: 1px solid var(--border); }
.faq-q {
  width: 100%;
  background: transparent;
  border: none;
  text-align: left;
  padding: 24px 0;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  color: var(--fg);
  font-family: var(--sans);
  font-size: 17px;
  font-weight: 500;
  letter-spacing: -0.01em;
  transition: color 0.2s;
}
.faq-q:hover { color: var(--accent); }
.faq-q .plus {
  width: 22px;
  height: 22px;
  position: relative;
  flex-shrink: 0;
}
.faq-q .plus::before, .faq-q .plus::after {
  content: '';
  position: absolute;
  background: var(--fg-muted);
  transition: transform 0.3s, background 0.2s;
}
.faq-q .plus::before {
  left: 0; right: 0;
  top: 50%;
  height: 1.5px;
  transform: translateY(-50%);
}
.faq-q .plus::after {
  top: 0; bottom: 0;
  left: 50%;
  width: 1.5px;
  transform: translateX(-50%);
}
.faq-item.open .faq-q .plus::after { transform: translateX(-50%) rotate(90deg); }
.faq-item.open .faq-q { color: var(--fg); }
.faq-item.open .faq-q .plus::before, .faq-item.open .faq-q .plus::after { background: var(--accent); }

.faq-a {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease;
}
.faq-a-inner {
  padding: 0 0 28px;
  color: var(--fg-muted);
  font-size: 15px;
  line-height: 1.65;
  max-width: 720px;
}
.faq-item.open .faq-a { max-height: 400px; }

/* ---------- Contacto ---------- */
/* ============================================================
   CONTACTO · sublime · panel terminal de transmisión
   ============================================================ */

.contact {
  position: relative;
  padding: 96px 0 80px;
  background: linear-gradient(180deg, var(--bg-elev) 0%, var(--bg) 100%);
  border-top: 1px solid rgba(34, 197, 94, 0.12);
  overflow: hidden;
}
.contact::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg,
    transparent 0%, rgba(34, 197, 94, 0.6) 50%, transparent 100%);
  filter: blur(0.4px);
}
.contact-bg-glow {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse at 20% 30%, rgba(34, 197, 94, 0.08) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 70%, rgba(34, 197, 94, 0.05) 0%, transparent 50%);
}

/* ---- Cabecera de la sección ---- */
.contact-head {
  text-align: center;
  max-width: 720px;
  margin: 0 auto 56px;
}
.contact-eyebrow {
  display: inline-block;
  font-family: var(--mono);
  font-size: 11.5px;
  letter-spacing: 2.5px;
  color: rgba(34, 197, 94, 0.95);
  text-transform: uppercase;
  margin-bottom: 18px;
  padding: 5px 14px;
  border: 1px solid rgba(34, 197, 94, 0.3);
  border-radius: 4px;
  background: rgba(34, 197, 94, 0.05);
  text-shadow: 0 0 6px rgba(34, 197, 94, 0.4);
}
.contact-title {
  font-size: clamp(28px, 4.4vw, 44px);
  margin: 0 0 18px;
  letter-spacing: -0.01em;
  line-height: 1.15;
}
.contact-sub {
  color: var(--fg-muted);
  font-size: 16px;
  line-height: 1.6;
  margin: 0;
  max-width: 640px;
  margin-left: auto;
  margin-right: auto;
}

/* ---- Grid principal ---- */
.contact-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 36px;
  align-items: start;
  position: relative;
}

/* ============ Panel terminal de transmisión ============ */
.contact-terminal {
  position: relative;
  background: linear-gradient(180deg, #0a0d0a 0%, #050706 100%);
  border: 1px solid rgba(34, 197, 94, 0.28);
  border-radius: 12px;
  overflow: hidden;
  box-shadow:
    0 24px 64px rgba(0, 0, 0, 0.45),
    0 0 0 1px rgba(0, 0, 0, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.03);
}
.contact-terminal::before {
  /* Glow superior */
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg,
    transparent, rgba(34, 197, 94, 0.7), transparent);
}

/* Cabecera del terminal */
.contact-terminal-head {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 18px;
  background: linear-gradient(180deg, #14110e 0%, #0d0c0a 100%);
  border-bottom: 1px solid rgba(34, 197, 94, 0.18);
  font-family: var(--mono);
  font-size: 11.5px;
}
.contact-terminal-leds {
  display: inline-flex;
  gap: 6px;
  flex-shrink: 0;
}
.ct-led {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25);
}
.ct-led--green { background: #22c55e; box-shadow: 0 0 6px #22c55e, inset 0 1px 0 rgba(255,255,255,0.25); }
.ct-led--amber { background: #fbbf24; box-shadow: 0 0 6px rgba(251,191,36,0.5), inset 0 1px 0 rgba(255,255,255,0.25); }
.ct-led--red   { background: #ef4444; box-shadow: 0 0 6px rgba(239,68,68,0.5), inset 0 1px 0 rgba(255,255,255,0.25); }
.contact-terminal-title {
  flex: 1;
  color: #4ade80;
  letter-spacing: 1.5px;
  font-weight: 600;
  text-shadow: 0 0 4px rgba(34, 197, 94, 0.3);
}
.contact-terminal-meta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: rgba(34, 197, 94, 0.7);
  letter-spacing: 1.4px;
  text-transform: uppercase;
  font-size: 10.5px;
}
.contact-terminal-meta .ct-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 4px #22c55e;
  animation: ctDotPulse 1.6s ease-in-out infinite;
}
@keyframes ctDotPulse {
  0%, 100% { opacity: 1; }
  50%      { opacity: 0.4; }
}
.contact-terminal-meta .ct-sep { opacity: 0.4; }

/* ---- Form ---- */
.contact-form {
  padding: 28px 26px 22px;
  position: relative;
}
.contact-form .form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  margin-bottom: 4px;
}
.form-field { margin-bottom: 18px; }

.form-field label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 1.8px;
  text-transform: uppercase;
  color: rgba(167, 243, 208, 0.85);
  margin-bottom: 8px;
}
.form-field label .ct-prompt {
  color: #22c55e;
  font-weight: 700;
  text-shadow: 0 0 4px rgba(34, 197, 94, 0.4);
}
.form-field label .req {
  color: #ef4444;
  margin-left: auto;
  font-size: 12px;
  opacity: 0.8;
}

/* Input wrapper para tick + char counter */
.ct-input-wrap {
  position: relative;
}
.form-field input,
.form-field select,
.form-field textarea {
  width: 100%;
  background: rgba(5, 7, 6, 0.55);
  border: 1px solid rgba(34, 197, 94, 0.18);
  border-radius: 6px;
  padding: 11px 38px 11px 14px;
  font-family: var(--mono);
  font-size: 14px;
  color: #d1fae5;
  caret-color: #4ade80;
  letter-spacing: 0.3px;
  transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
}
.form-field input::placeholder,
.form-field textarea::placeholder {
  color: rgba(34, 197, 94, 0.32);
  font-style: italic;
}
.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus {
  outline: none;
  border-color: rgba(34, 197, 94, 0.7);
  background: rgba(34, 197, 94, 0.04);
  box-shadow:
    0 0 0 3px rgba(34, 197, 94, 0.12),
    inset 0 0 12px rgba(34, 197, 94, 0.06);
}
.form-field select {
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6' fill='none'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%2322c55e' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 34px;
}
.form-field textarea {
  resize: vertical;
  min-height: 130px;
  padding: 14px 38px 28px 14px;
  line-height: 1.55;
}
.form-field select option {
  background: #0a0d0a;
  color: #d1fae5;
  font-family: var(--mono);
}

/* Tick verde animado al validar */
.ct-input-tick {
  position: absolute;
  top: 50%;
  right: 12px;
  transform: translateY(-50%) scale(0.4);
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(34, 197, 94, 0.15);
  color: #22c55e;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.3s cubic-bezier(0.34, 1.56, 0.46, 1);
}
.ct-input-wrap--textarea .ct-input-tick {
  top: 14px;
  transform: translateY(0) scale(0.4);
}
.form-field.is-valid .ct-input-tick {
  opacity: 1;
  transform: translateY(-50%) scale(1);
}
.ct-input-wrap--textarea .form-field.is-valid .ct-input-tick,
.form-field.is-valid .ct-input-wrap--textarea .ct-input-tick {
  transform: translateY(0) scale(1);
}

/* Char counter */
.ct-charcount {
  position: absolute;
  bottom: 8px;
  right: 12px;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.5px;
  color: rgba(34, 197, 94, 0.45);
  pointer-events: none;
  font-variant-numeric: tabular-nums;
}
.ct-charcount.is-warning { color: rgba(251, 191, 36, 0.8); }
.ct-charcount.is-danger { color: rgba(239, 68, 68, 0.85); }

/* Estado error */
.form-field.error input,
.form-field.error select,
.form-field.error textarea {
  border-color: rgba(239, 68, 68, 0.7);
  box-shadow: 0 0 0 2px rgba(239, 68, 68, 0.15);
}
.form-field .err-msg {
  display: none;
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.5px;
  color: #fca5a5;
  margin-top: 7px;
  text-shadow: 0 0 4px rgba(239, 68, 68, 0.2);
}
.form-field.error .err-msg { display: block; }

/* Consent checkbox custom */
.form-consent { margin-top: 8px; margin-bottom: 18px; }
.consent-label {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  cursor: pointer;
  user-select: none;
}
.consent-label input[type="checkbox"] {
  position: absolute;
  opacity: 0;
  width: 0; height: 0;
  pointer-events: none;
}
.consent-box {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border: 1px solid rgba(34, 197, 94, 0.35);
  border-radius: 4px;
  background: rgba(5, 7, 6, 0.55);
  flex-shrink: 0;
  margin-top: 1px;
  transition: all 0.18s ease;
  color: transparent;
}
.consent-label input[type="checkbox"]:checked + .consent-box {
  background: #22c55e;
  border-color: #22c55e;
  color: #050706;
  box-shadow: 0 0 8px rgba(34, 197, 94, 0.45);
}
.consent-label input[type="checkbox"]:focus-visible + .consent-box {
  outline: 2px solid rgba(34, 197, 94, 0.6);
  outline-offset: 2px;
}
.consent-text {
  font-size: 12.5px;
  color: rgba(167, 243, 208, 0.75);
  line-height: 1.55;
  font-family: var(--mono);
}
.consent-text a {
  color: #4ade80;
  text-decoration: underline;
  text-decoration-color: rgba(34, 197, 94, 0.4);
}
.consent-text a:hover {
  text-decoration-color: #22c55e;
  text-shadow: 0 0 4px rgba(34, 197, 94, 0.4);
}

/* ============ Submit terminal-style ============ */
.ct-submit {
  position: relative;
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 16px 22px;
  background: linear-gradient(180deg,
    rgba(34, 197, 94, 0.08) 0%,
    rgba(34, 197, 94, 0.03) 100%);
  border: 1px solid rgba(34, 197, 94, 0.55);
  border-radius: 6px;
  color: #4ade80;
  font-family: var(--mono);
  font-size: 13.5px;
  font-weight: 600;
  letter-spacing: 2.2px;
  text-transform: uppercase;
  cursor: pointer;
  transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
  text-shadow: 0 0 6px rgba(34, 197, 94, 0.4);
  margin-top: 6px;
  overflow: hidden;
}
.ct-submit::before {
  /* Brillo barrido en hover */
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(110deg,
    transparent 30%,
    rgba(34, 197, 94, 0.18) 50%,
    transparent 70%);
  transform: translateX(-100%);
  transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}
.ct-submit:hover {
  background: linear-gradient(180deg, #22c55e 0%, #16a34a 100%);
  color: #050706;
  border-color: #22c55e;
  text-shadow: none;
  box-shadow:
    0 0 24px rgba(34, 197, 94, 0.4),
    0 8px 24px rgba(34, 197, 94, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.18);
  transform: translateY(-1px);
}
.ct-submit:hover::before { transform: translateX(100%); }
.ct-submit:active { transform: translateY(0); }
.ct-submit-prompt {
  font-size: 16px;
  opacity: 0.85;
}
.ct-submit-cursor {
  font-size: 16px;
  animation: ctCursorBlink 1s steps(2) infinite;
}
@keyframes ctCursorBlink {
  0%, 49%   { opacity: 1; }
  50%, 100% { opacity: 0; }
}
.ct-submit:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}
.ct-submit.is-busy {
  pointer-events: none;
  background: rgba(34, 197, 94, 0.12);
  color: #4ade80;
  letter-spacing: 1.5px;
}
.ct-submit.is-busy .ct-submit-prompt { animation: ctSpin 0.8s linear infinite; }
@keyframes ctSpin {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

.ct-submit-microcopy {
  text-align: center;
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 1.2px;
  color: rgba(34, 197, 94, 0.45);
  margin-top: 12px;
  text-transform: uppercase;
}

.form-success {
  display: none;
  align-items: center;
  gap: 12px;
  padding: 16px 18px;
  background: rgba(34, 197, 94, 0.08);
  border: 1px solid rgba(34, 197, 94, 0.4);
  border-left-width: 3px;
  border-radius: 6px;
  color: #6ee7b7;
  font-family: var(--mono);
  font-size: 13px;
  line-height: 1.5;
  margin-top: 18px;
  letter-spacing: 0.3px;
  text-shadow: 0 0 4px rgba(34, 197, 94, 0.25);
}
.form-success.show { display: flex; }
.form-success svg {
  flex-shrink: 0;
  color: #22c55e;
  filter: drop-shadow(0 0 4px rgba(34, 197, 94, 0.5));
}

/* ---- Footer del terminal ---- */
.contact-terminal-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 18px;
  background: linear-gradient(180deg, #0d0c0a 0%, #050706 100%);
  border-top: 1px dashed rgba(34, 197, 94, 0.2);
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: rgba(34, 197, 94, 0.6);
}
.ct-foot-status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.ct-foot-arrow {
  color: #22c55e;
  font-size: 11px;
  text-shadow: 0 0 4px rgba(34, 197, 94, 0.5);
}
.ct-foot-text { color: #4ade80; font-weight: 600; }
.ct-foot-progress {
  padding: 2px 8px;
  background: rgba(34, 197, 94, 0.08);
  border: 1px solid rgba(34, 197, 94, 0.18);
  border-radius: 3px;
  font-variant-numeric: tabular-nums;
  font-size: 10px;
  color: rgba(34, 197, 94, 0.85);
}
.ct-foot-info {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 10px;
  letter-spacing: 1.5px;
}
.ct-foot-lock { color: rgba(34, 197, 94, 0.7); display: inline-flex; }

/* ============ Sidebar · canales alternativos ============ */
.contact-channels {
  position: sticky;
  top: 96px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.channels-title {
  margin: 0 0 4px;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 2.2px;
  text-transform: uppercase;
  color: rgba(34, 197, 94, 0.95);
  font-weight: 600;
  text-shadow: 0 0 4px rgba(34, 197, 94, 0.3);
}
.channels-desc {
  margin: 0 0 12px;
  font-size: 13px;
  line-height: 1.55;
  color: var(--fg-muted);
}

/* Card de canal */
.channel-card {
  position: relative;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 18px;
  background: rgba(5, 7, 6, 0.5);
  border: 1px dashed rgba(34, 197, 94, 0.28);
  border-radius: 6px;
  text-decoration: none;
  color: var(--fg);
  transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
  overflow: hidden;
}
.channel-card::before {
  /* Sweep verde en hover */
  content: "";
  position: absolute;
  top: 0; left: -100%;
  width: 30%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(34, 197, 94, 0.08), transparent);
  transition: left 0.6s ease;
  pointer-events: none;
}
.channel-card:hover {
  border-style: solid;
  border-color: rgba(34, 197, 94, 0.6);
  background: rgba(34, 197, 94, 0.04);
  transform: translateX(2px);
  text-decoration: none;
}
.channel-card:hover::before { left: 100%; }

.channel-led {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 8px #22c55e, inset 0 1px 0 rgba(255,255,255,0.3);
  flex-shrink: 0;
  animation: channelLedPulse 1.8s ease-in-out infinite;
}
@keyframes channelLedPulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%      { opacity: 0.5; transform: scale(0.85); }
}

.channel-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}
.channel-tag {
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 2px;
  color: rgba(34, 197, 94, 0.75);
  text-transform: uppercase;
  font-weight: 600;
}
.channel-name {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 500;
  color: var(--fg);
  line-height: 1.3;
}
.channel-name svg {
  flex-shrink: 0;
  color: #4ade80;
  transition: color 0.2s ease;
}
.channel-card:hover .channel-name svg { color: #22c55e; }
.channel-meta {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.4px;
  color: rgba(167, 243, 208, 0.55);
}
.channel-arrow {
  font-size: 18px;
  color: rgba(34, 197, 94, 0.5);
  transition: all 0.22s ease;
  flex-shrink: 0;
}
.channel-card:hover .channel-arrow {
  color: #22c55e;
  transform: translateX(4px);
}

/* Meta grid (horario, respuesta, ubicación) */
.channels-meta-grid {
  margin-top: 8px;
  padding: 14px 16px;
  background: rgba(34, 197, 94, 0.025);
  border: 1px dashed rgba(34, 197, 94, 0.15);
  border-radius: 6px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.cmg-item {
  display: grid;
  grid-template-columns: 16px auto 1fr;
  gap: 10px;
  align-items: center;
  font-family: var(--mono);
  font-size: 11.5px;
  color: var(--fg-muted);
}
.cmg-item svg { color: rgba(34, 197, 94, 0.65); flex-shrink: 0; }
.cmg-label {
  letter-spacing: 1.2px;
  text-transform: uppercase;
  font-size: 10px;
  color: rgba(34, 197, 94, 0.7);
  font-weight: 600;
}
.cmg-val {
  text-align: right;
  color: var(--fg);
  letter-spacing: 0.3px;
}

/* ---- Light theme (azul corporativo, mantiene estructura) ---- */
html[data-theme="light"] .contact {
  background: linear-gradient(180deg, var(--bg-elev) 0%, var(--bg) 100%);
  border-top-color: rgba(30, 64, 175, 0.18);
}
html[data-theme="light"] .contact::before {
  background: linear-gradient(90deg, transparent, rgba(30, 64, 175, 0.5), transparent);
}
html[data-theme="light"] .contact-bg-glow {
  background:
    radial-gradient(ellipse at 20% 30%, rgba(30, 64, 175, 0.08) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 70%, rgba(30, 64, 175, 0.05) 0%, transparent 50%);
}
html[data-theme="light"] .contact-eyebrow {
  color: #1e40af;
  border-color: rgba(30, 64, 175, 0.3);
  background: rgba(30, 64, 175, 0.05);
  text-shadow: none;
}
/* El terminal se mantiene oscuro siempre — ES un terminal */

/* ---- Responsive ---- */
@media (max-width: 1024px) {
  .contact-grid { grid-template-columns: 1fr; gap: 32px; }
  .contact-channels { position: static; }
}
@media (max-width: 640px) {
  .contact { padding: 64px 0 56px; }
  .contact-head { margin-bottom: 36px; }
  .contact-form { padding: 22px 18px 18px; }
  .contact-form .form-row { grid-template-columns: 1fr; gap: 0; }
  .contact-terminal-head { flex-wrap: wrap; gap: 8px; padding: 10px 14px; }
  .contact-terminal-meta .ct-sep,
  .contact-terminal-meta span:nth-child(4) { display: none; }
  .contact-terminal-foot { flex-wrap: wrap; gap: 8px; padding: 10px 14px; }
  .ct-foot-info { font-size: 9.5px; }
  .channel-card { padding: 14px 14px; gap: 12px; }
  .channel-tag { font-size: 9px; }
  .channel-arrow { font-size: 16px; }
  .cmg-val { font-size: 11px; }
}

@media (prefers-reduced-motion: reduce) {
  .ct-led--green,
  .ct-submit-cursor,
  .channel-led,
  .ct-input-tick,
  .contact-terminal-meta .ct-dot {
    animation: none !important;
    transition: none !important;
  }
}

/* ---------- Footer ---------- */
/* ============================================================
   FOOTER · SUBLIME · narrativa Matrix integrada
   Estructura:
     1) Banda terminal (status del sistema · reloj UTC)
     2) Grid 4 columnas (brand · navegar · contacto · legal)
     3) ASCII signature
     4) Bottom bar (copy · build · theme toggle)
   ============================================================ */

.site-footer {
  position: relative;
  margin-top: 80px;
  background: linear-gradient(180deg, var(--bg) 0%, #050706 100%);
  color: var(--fg-muted);
  border-top: 1px solid rgba(34, 197, 94, 0.18);
  overflow: hidden;
}
/* Glow verde sutil en el borde superior */
.site-footer::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg,
    transparent 0%,
    rgba(34, 197, 94, 0) 18%,
    rgba(34, 197, 94, 0.85) 50%,
    rgba(34, 197, 94, 0) 82%,
    transparent 100%);
  filter: blur(0.4px);
}
/* Tema light: footer adapta colores */
html[data-theme="light"] .site-footer {
  background: linear-gradient(180deg, var(--bg) 0%, #f1f5f9 100%);
  border-top-color: rgba(30, 64, 175, 0.18);
}
html[data-theme="light"] .site-footer::before {
  background: linear-gradient(90deg,
    transparent 0%,
    rgba(30, 64, 175, 0) 18%,
    rgba(30, 64, 175, 0.5) 50%,
    rgba(30, 64, 175, 0) 82%,
    transparent 100%);
}

/* ---------- Banda terminal ---------- */
.footer-terminal {
  background: linear-gradient(180deg, #0d0c0a 0%, #050706 100%);
  border-bottom: 1px dashed rgba(34, 197, 94, 0.18);
  padding: 12px 0;
  font-family: var(--mono);
  font-size: 11.5px;
  letter-spacing: 0.3px;
}
.footer-terminal-row {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.footer-terminal-led {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 10px #22c55e, 0 0 3px #22c55e, inset 0 1px 0 rgba(255,255,255,0.3);
  flex-shrink: 0;
  animation: footerLedPulse 1.6s ease-in-out infinite;
}
@keyframes footerLedPulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%      { opacity: 0.5; transform: scale(0.8); }
}
.footer-terminal-prompt {
  color: #4ade80;
  font-weight: 600;
  text-shadow: 0 0 4px rgba(34, 197, 94, 0.3);
}
.footer-terminal-cmd {
  color: #93c5fd;
  font-style: italic;
  opacity: 0.85;
}
.footer-terminal-status {
  color: #4ade80;
  text-shadow: 0 0 4px rgba(34, 197, 94, 0.4);
  letter-spacing: 1.4px;
  text-transform: uppercase;
  font-weight: 500;
}
.footer-terminal-clock {
  margin-left: auto;
  color: #4ade80;
  font-variant-numeric: tabular-nums;
  letter-spacing: 1.2px;
  flex-shrink: 0;
  text-shadow: 0 0 4px rgba(34, 197, 94, 0.3);
}

/* ---------- Grid principal ---------- */
.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1.4fr 1fr;
  gap: 48px;
  padding: 56px 0 40px;
  position: relative;
}
.footer-col { min-width: 0; }
.footer-col-brand .logo-footer {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 18px;
  text-decoration: none;
}
.footer-col-brand .logo-footer .logo-img { width: 28px; height: 28px; }
.footer-col-brand .logo-footer .logo-wordmark {
  font-family: var(--mono);
  font-size: 14px;
  font-weight: 600;
  color: var(--fg);
  letter-spacing: 0.5px;
}
.footer-col-brand .logo-footer .logo-dot {
  color: #22c55e;
  text-shadow: 0 0 6px rgba(34, 197, 94, 0.5);
}

.footer-manifesto {
  font-family: var(--mono);
  font-size: 12.5px;
  line-height: 1.65;
  color: var(--fg-muted);
  margin: 0 0 20px;
  padding: 14px 16px;
  border-left: 2px solid rgba(34, 197, 94, 0.55);
  background: rgba(34, 197, 94, 0.04);
  font-style: italic;
  border-radius: 0 4px 4px 0;
}

.footer-meta {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 9px;
  font-size: 12.5px;
  color: var(--fg-subtle);
  font-family: var(--mono);
  letter-spacing: 0.3px;
}
.footer-meta li {
  display: flex;
  align-items: center;
  gap: 9px;
}
.footer-meta svg {
  color: rgba(34, 197, 94, 0.7);
  flex-shrink: 0;
  filter: drop-shadow(0 0 3px rgba(34, 197, 94, 0.3));
}

/* Headings de columna */
.footer-h {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 2.2px;
  text-transform: uppercase;
  color: rgba(34, 197, 94, 0.9);
  margin: 0 0 18px;
  padding-bottom: 10px;
  border-bottom: 1px dashed rgba(34, 197, 94, 0.2);
  text-shadow: 0 0 4px rgba(34, 197, 94, 0.25);
}

/* Listas de links */
.footer-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.footer-list a {
  color: var(--fg-muted);
  text-decoration: none;
  font-size: 13.5px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: color 0.2s ease, transform 0.2s ease, text-shadow 0.2s ease;
  padding: 2px 0;
}
.footer-list a .link-arrow {
  color: rgba(34, 197, 94, 0.45);
  font-family: var(--mono);
  font-size: 14px;
  transition: color 0.2s ease, transform 0.2s ease;
}
.footer-list a:hover {
  color: #4ade80;
  text-decoration: none;
  text-shadow: 0 0 5px rgba(34, 197, 94, 0.4);
  transform: translateX(3px);
}
.footer-list a:hover .link-arrow {
  color: #22c55e;
  transform: translateX(2px);
}

/* Contact list con iconos */
.footer-contact-list a { gap: 10px; }
.footer-contact-list a svg {
  color: rgba(34, 197, 94, 0.65);
  flex-shrink: 0;
  transition: color 0.2s ease, filter 0.2s ease;
}
.footer-contact-list a:hover svg {
  color: #22c55e;
  filter: drop-shadow(0 0 4px rgba(34, 197, 94, 0.5));
}

/* ---------- ASCII signature ---------- */
.footer-ascii-wrap {
  padding: 14px 0;
  border-top: 1px dashed rgba(34, 197, 94, 0.12);
  border-bottom: 1px dashed rgba(34, 197, 94, 0.12);
  background: rgba(34, 197, 94, 0.02);
}
.footer-ascii {
  font-family: var(--mono);
  font-size: 10.5px;
  line-height: 1.4;
  color: rgba(34, 197, 94, 0.55);
  text-align: center;
  margin: 0;
  white-space: pre;
  overflow-x: auto;
  letter-spacing: 0.3px;
  text-shadow: 0 0 6px rgba(34, 197, 94, 0.22);
}

/* ---------- Bottom bar ---------- */
.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 22px 0 28px;
  font-family: var(--mono);
  font-size: 11.5px;
  color: var(--fg-subtle);
  letter-spacing: 0.5px;
  flex-wrap: wrap;
}
.footer-bottom .footer-copy { letter-spacing: 0.3px; }
.footer-bottom .footer-build {
  color: rgba(34, 197, 94, 0.5);
  letter-spacing: 1.2px;
  text-transform: uppercase;
  font-size: 10px;
}
.footer-bottom .inline-theme {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  color: var(--fg-muted);
  background: transparent;
  border: 1px solid rgba(34, 197, 94, 0.22);
  border-radius: 4px;
  padding: 7px 14px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 1.4px;
  text-transform: uppercase;
  transition: all 0.2s ease;
}
.footer-bottom .inline-theme:hover {
  color: #4ade80;
  border-color: #22c55e;
  background: rgba(34, 197, 94, 0.06);
  text-shadow: 0 0 4px rgba(34, 197, 94, 0.4);
}
.footer-bottom .inline-theme svg { color: currentColor; }

/* ---------- Light theme overrides (sin perder identidad Matrix) ---------- */
html[data-theme="light"] .footer-terminal {
  background: linear-gradient(180deg, #0d0c0a 0%, #050706 100%);
  /* la barra terminal mantiene fondo oscuro siempre — es un terminal */
}
html[data-theme="light"] .footer-h {
  color: #1e40af;
  border-bottom-color: rgba(30, 64, 175, 0.25);
  text-shadow: none;
}
html[data-theme="light"] .footer-manifesto {
  border-left-color: rgba(30, 64, 175, 0.45);
  background: rgba(30, 64, 175, 0.05);
}
html[data-theme="light"] .footer-meta svg,
html[data-theme="light"] .footer-list a .link-arrow,
html[data-theme="light"] .footer-contact-list a svg {
  color: rgba(30, 64, 175, 0.65);
  filter: none;
}
html[data-theme="light"] .footer-list a:hover {
  color: #1e40af;
  text-shadow: none;
}
html[data-theme="light"] .footer-list a:hover .link-arrow,
html[data-theme="light"] .footer-contact-list a:hover svg {
  color: #1e40af;
  filter: none;
}
html[data-theme="light"] .footer-ascii-wrap {
  border-color: rgba(30, 64, 175, 0.15);
  background: rgba(30, 64, 175, 0.03);
}
html[data-theme="light"] .footer-ascii {
  color: rgba(30, 64, 175, 0.5);
  text-shadow: none;
}
html[data-theme="light"] .footer-bottom .footer-build {
  color: rgba(30, 64, 175, 0.5);
}
html[data-theme="light"] .footer-bottom .inline-theme {
  border-color: rgba(30, 64, 175, 0.25);
}
html[data-theme="light"] .footer-bottom .inline-theme:hover {
  color: #1e40af;
  border-color: #1e40af;
  background: rgba(30, 64, 175, 0.06);
  text-shadow: none;
}

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 36px;
    padding: 44px 0 28px;
  }
  .footer-col-brand { grid-column: 1 / -1; }
  .footer-terminal-row { font-size: 10.5px; gap: 8px; }
  .footer-terminal-cmd { display: none; }
  .footer-ascii { font-size: 9px; }
}
@media (max-width: 560px) {
  .site-footer { margin-top: 56px; }
  .footer-grid { grid-template-columns: 1fr; gap: 28px; }
  .footer-bottom {
    flex-direction: column;
    align-items: flex-start;
    gap: 14px;
  }
  .footer-build { font-size: 9.5px; }
  .footer-ascii {
    font-size: 7.5px;
    letter-spacing: 0;
  }
  .footer-terminal-row { gap: 6px; }
  .footer-terminal-prompt { display: none; }
  .footer-terminal-clock { font-size: 10px; }
}

@media (prefers-reduced-motion: reduce) {
  .footer-terminal-led { animation: none; }
  .footer-list a:hover { transform: none; }
  .footer-list a:hover .link-arrow { transform: none; }
}

/* ---------- Scroll reveal ---------- */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1), transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}
.reveal.visible { opacity: 1; transform: translateY(0); }
.reveal:nth-child(2) { transition-delay: 0.08s; }
.reveal:nth-child(3) { transition-delay: 0.16s; }
.reveal:nth-child(4) { transition-delay: 0.24s; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .services-grid { grid-template-columns: 1fr; }
  .why-grid { grid-template-columns: 1fr; }
  .process-timeline { grid-template-columns: 1fr; gap: 32px; }
  .process-timeline::before { display: none; }
  .process-step { padding: 0 !important; }
  .work-grid { grid-template-columns: 1fr; }
  .contact-grid { grid-template-columns: 1fr; gap: 32px; }
  .contact-alt { position: static; }
  .section-head { grid-template-columns: 1fr; gap: 16px; align-items: start; }
  .nav { display: none; }
  .nav.open {
    display: flex;
    position: absolute;
    top: 100%;
    right: var(--gutter);
    flex-direction: column;
    background: var(--bg-elev);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 8px;
    min-width: 180px;
    box-shadow: var(--shadow-md);
  }
  .menu-toggle { display: grid; }
  .hero-meta { gap: 24px 32px; }
  .form-row { grid-template-columns: 1fr; }
}

@media (max-width: 560px) {
  .service-card, .why-item, .contact-alt { padding: 24px; }
  .work-info { padding: 20px; }
  .hero-ctas .btn { flex: 1; }
  .footer-top { flex-direction: column; align-items: flex-start; }
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
  .reveal { opacity: 1; transform: none; }
}

/* ============================================================
   RESPONSIVE MOBILE · sublime · ajustes finales
   Compensa header fixed, compacta secciones nuevas, usa mejor el espacio
   ============================================================ */

/* Scroll a anchors no queda tapado por header fixed */
section[id], main[id] { scroll-margin-top: 90px; }
@media (max-width: 768px) {
  section[id], main[id] { scroll-margin-top: 70px; }
}

/* === HEADER MOBILE === */
@media (max-width: 900px) {
  .site-header { padding: 8px 0 !important; }
  .site-header.scrolled { padding: 6px 0 !important; }
  .logo-img { height: var(--logo-h-mob, 72px); }
  .site-header.scrolled .logo-img { height: var(--logo-h-mob-scrolled, 52px); }
  .header-cta {
    padding: 8px 12px !important;
    font-size: 10.5px !important;
    letter-spacing: 1px !important;
  }
  .header-cta-prompt { display: none; }
  .nav.open {
    background: rgba(5, 7, 6, 0.95) !important;
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border: 1px solid rgba(34, 197, 94, 0.3) !important;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5),
                0 0 0 1px rgba(34, 197, 94, 0.1) !important;
    border-radius: 6px !important;
    padding: 10px !important;
  }
  .nav.open a {
    padding: 9px 14px;
    border-radius: 4px;
  }
  html[data-theme="light"] .nav.open {
    background: rgba(255, 255, 255, 0.95) !important;
    border-color: rgba(30, 64, 175, 0.3) !important;
  }
}
@media (max-width: 560px) {
  /* En mobile estrecho usamos las mismas variables CMS · ajusta automáticamente */
  .logo-img { height: calc(var(--logo-h-mob, 72px) * 0.85); }
  .site-header.scrolled .logo-img { height: calc(var(--logo-h-mob-scrolled, 52px) * 0.85); }
  .header-actions { gap: 6px; }
  .header-cta {
    padding: 7px 10px !important;
    font-size: 10px !important;
    letter-spacing: 0.8px !important;
  }
  .theme-toggle, .menu-toggle {
    width: 34px;
    height: 34px;
  }
}
@media (max-width: 380px) {
  .header-cta { display: none !important; }
}
/* Progress bar más visible en mobile */
@media (max-width: 768px) {
  .site-header-progress { height: 3px; }
}

/* === HERO mobile · usa --hero-pt-mob del CMS === */
@media (max-width: 768px) {
  .hero { padding-top: var(--hero-pt-mob, 140px) !important; }
}
@media (max-width: 560px) {
  .hero {
    padding-top: var(--hero-pt-mob, 140px) !important;
    padding-bottom: 50px !important;
  }
}

/* === TRABAJOS · stats compactos === */
@media (max-width: 640px) {
  #trabajos { padding: 72px 0 56px; }
  .trabajos-stats {
    flex-wrap: wrap;
    gap: 12px 16px;
    padding: 12px 14px;
    width: auto;
    max-width: 100%;
  }
  .t-stat-sep { display: none; }
  .t-stat {
    flex: 1 1 calc(33% - 12px);
    justify-content: center;
    font-size: 10px;
    min-width: 90px;
  }
  .t-stat-num { font-size: 16px; }
  .t-stat-label { font-size: 9px; letter-spacing: 1px; }
  .work-card-head {
    padding: 9px 12px;
    flex-wrap: wrap;
    gap: 6px;
  }
  .work-card-tag,
  .work-card-status { font-size: 9.5px; letter-spacing: 1.2px; }
  .work-info { padding: 18px 16px 18px; }
  .work-info h3 { font-size: 17px; }
  .trabajos-foot {
    flex-direction: column;
    text-align: center;
    padding: 16px 18px;
    gap: 12px;
  }
  .trabajos-foot-cta { width: 100%; justify-content: center; }
}

/* === DECISIÓN · paneles bien apilados === */
@media (max-width: 560px) {
  #decision .route-head { flex-wrap: wrap; gap: 8px; }
  #decision .route-tag { font-size: 9.5px; letter-spacing: 1.5px; }
  #decision .route-status { font-size: 9px; letter-spacing: 1.2px; }
  #decision .route-points li { font-size: 13px; }
  #decision .decision-head { margin-bottom: 24px; }
  #decision-toast {
    top: auto;
    bottom: 90px;
    right: 14px;
    left: 14px;
    max-width: none;
    font-size: 12px;
    padding: 12px 16px;
  }
}

/* === CONTACTO · panel terminal mobile === */
@media (max-width: 560px) {
  .contact { padding: 60px 0 50px; }
  .contact-head { margin-bottom: 30px; }
  .contact-eyebrow { font-size: 10.5px; letter-spacing: 1.8px; padding: 4px 10px; }
  .contact-title { font-size: clamp(22px, 6vw, 28px); }
  .contact-sub { font-size: 14.5px; }
  .contact-terminal-head { gap: 10px; padding: 10px 14px; flex-wrap: wrap; }
  .contact-terminal-title { font-size: 10.5px; }
  .contact-terminal-meta { font-size: 9.5px; gap: 4px; }
  .contact-form { padding: 20px 14px 16px; }
  .form-field label { font-size: 10px; letter-spacing: 1.5px; }
  .form-field input,
  .form-field select,
  .form-field textarea { font-size: 13px; padding: 10px 36px 10px 12px; }
  .form-field textarea { padding: 12px 36px 28px 12px; min-height: 110px; }
  .ct-submit { padding: 13px 18px; font-size: 12px; letter-spacing: 1.6px; }
  .ct-submit-microcopy { font-size: 9.5px; letter-spacing: 0.8px; }
  .contact-terminal-foot {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
    padding: 9px 14px;
  }
  .ct-foot-info { font-size: 9px; }
  /* Sidebar canales */
  .channels-title { font-size: 11px; letter-spacing: 1.8px; }
  .channels-desc { font-size: 12.5px; }
  .channel-card { padding: 13px 14px; gap: 11px; }
  .channel-tag { font-size: 8.5px; letter-spacing: 1.5px; }
  .channel-name { font-size: 13px; }
  .channel-meta { font-size: 10px; }
  .channels-meta-grid { padding: 12px 14px; gap: 7px; }
  .cmg-item { font-size: 11px; gap: 8px; grid-template-columns: 14px auto 1fr; }
  .cmg-label { font-size: 9.5px; letter-spacing: 1px; }
  .cmg-val { font-size: 10.5px; }
}

/* === FOOTER mobile fino === */
@media (max-width: 480px) {
  .footer-terminal-row { flex-wrap: wrap; }
  .footer-terminal-status {
    font-size: 9.5px;
    letter-spacing: 1px;
    flex: 1 1 100%;
  }
  .footer-terminal-clock {
    margin-left: 0;
    font-size: 9.5px;
  }
  .footer-h { font-size: 10.5px; letter-spacing: 1.8px; }
  .footer-list a { font-size: 12.5px; }
  .footer-meta { font-size: 11.5px; }
  .footer-bottom .inline-theme {
    font-size: 10px;
    padding: 6px 11px;
    letter-spacing: 1.2px;
  }
}

/* === Modal preview · usable en móvil === */
@media (max-width: 560px) {
  .work-preview-head { padding: 8px 10px; }
  .work-preview-url-bar { font-size: 10.5px; padding: 5px 8px; }
  .work-preview-visit { font-size: 9.5px; padding: 6px 10px; letter-spacing: 0.8px; }
  .work-preview-close { width: 30px; height: 30px; }
  .work-preview-blocked { padding: 24px 18px; }
  .work-preview-blocked h3 { font-size: 14px; }
  .work-preview-blocked p { font-size: 13px; }
}

/* === Ajustes generales container y tipografías móvil === */
@media (max-width: 480px) {
  .container { padding: 0 16px; }
  .ph-label { font-size: 10px !important; padding: 7px 12px !important; letter-spacing: 1.4px !important; }
  .work-private-badge { font-size: 9.5px; padding: 5px 8px; }
}

/* ============================================================
   AENEWS · listado, artículo individual y modal preview
   ============================================================ */

/* Embed mode: ocultar header/footer cuando carga dentro de iframe */
html.aenews-embed body { padding-top: 0 !important; }
html.aenews-embed .site-header,
html.aenews-embed .site-footer,
body.is-embed .site-header,
body.is-embed .site-footer { display: none !important; }
body.is-embed main#top { padding-top: 0; }
body.is-embed { background: var(--bg); }

/* === Hero del listado AEnews === */
.aenews-hero {
  position: relative;
  padding: 140px 0 32px;
  text-align: center;
}
body.is-embed .aenews-hero { padding: 32px 0 24px; }
.aenews-eyebrow {
  display: inline-block;
  font-family: var(--mono);
  font-size: 11.5px;
  letter-spacing: 2.5px;
  color: rgba(34, 197, 94, 0.95);
  text-transform: uppercase;
  margin-bottom: 16px;
  padding: 5px 14px;
  border: 1px solid rgba(34, 197, 94, 0.3);
  background: rgba(34, 197, 94, 0.05);
  border-radius: 4px;
  text-shadow: 0 0 6px rgba(34, 197, 94, 0.4);
}
.aenews-title {
  font-size: clamp(28px, 4.4vw, 44px);
  margin: 0 0 12px;
  letter-spacing: -0.01em;
  line-height: 1.15;
}
.aenews-sub {
  color: var(--fg-muted);
  font-size: 16px;
  line-height: 1.6;
  margin: 0 auto 20px;
  max-width: 560px;
}
.aenews-stats {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  margin-top: 8px;
  padding: 8px 16px;
  background: rgba(5, 7, 6, 0.5);
  border: 1px solid rgba(34, 197, 94, 0.18);
  border-radius: 6px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 1.4px;
  text-transform: uppercase;
  color: rgba(167, 243, 208, 0.75);
}
.aenews-stat {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.aenews-stat strong {
  color: #fff;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.aenews-stat-led {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 5px #22c55e;
  animation: tStatLedFast 1.4s ease-in-out infinite;
}
.aenews-stat-led--amber {
  background: #fbbf24;
  box-shadow: 0 0 5px rgba(251, 191, 36, 0.5);
  animation: tStatLedSlow 2s ease-in-out infinite;
}
.aenews-stat-sep {
  width: 1px; height: 18px;
  background: linear-gradient(180deg, transparent, rgba(34, 197, 94, 0.3), transparent);
}

/* === Lista de cards (listado completo) === */
.aenews-list { padding: 24px 0 80px; }
.news-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 22px;
}
.news-card {
  background: linear-gradient(180deg, var(--bg-elev) 0%, var(--bg) 100%);
  border: 1px solid rgba(34, 197, 94, 0.18);
  border-radius: 10px;
  overflow: hidden;
  text-decoration: none;
  color: var(--fg);
  display: flex;
  flex-direction: column;
  cursor: pointer;
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1),
              border-color 0.3s ease,
              box-shadow 0.3s ease;
}
.news-card:hover {
  transform: translateY(-4px);
  border-color: rgba(34, 197, 94, 0.55);
  box-shadow:
    0 24px 60px rgba(0, 0, 0, 0.35),
    0 0 24px rgba(34, 197, 94, 0.1);
  text-decoration: none;
}
.news-cover {
  aspect-ratio: 16/9;
  background-color: #050706;
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
  position: relative;
  overflow: hidden;
}
.news-cover::after {
  /* Glow superior verde sutil al hover */
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(34, 197, 94, 0.5), transparent);
  opacity: 0;
  transition: opacity 0.3s ease;
}
.news-card:hover .news-cover::after { opacity: 1; }
.news-body {
  padding: 18px 20px 20px;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.news-cat {
  font-family: var(--mono);
  font-size: 10px;
  color: rgba(34, 197, 94, 0.9);
  text-transform: uppercase;
  letter-spacing: 1.8px;
  font-weight: 600;
  text-shadow: 0 0 4px rgba(34, 197, 94, 0.3);
}
.news-title {
  font-size: 1.15rem;
  line-height: 1.35;
  margin: 0;
  font-weight: 600;
  color: var(--fg);
}
.news-excerpt {
  color: var(--fg-muted);
  font-size: 0.92rem;
  line-height: 1.55;
  flex: 1;
  margin: 0;
}
.news-meta {
  font-size: 11px;
  color: var(--fg-subtle);
  font-family: var(--mono);
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: auto;
  padding-top: 10px;
  border-top: 1px dashed rgba(34, 197, 94, 0.18);
  letter-spacing: 0.3px;
}
.news-meta-cta {
  color: #4ade80;
  font-weight: 600;
  letter-spacing: 1.4px;
  text-transform: uppercase;
  text-shadow: 0 0 4px rgba(34, 197, 94, 0.3);
  transition: transform 0.22s ease;
}
.news-card:hover .news-meta-cta { transform: translateX(3px); }

/* Paginación */
.news-pag {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin: 32px 0 60px;
  font-family: var(--mono);
  font-size: 12.5px;
}
.news-pag a, .news-pag span {
  padding: 8px 14px;
  border: 1px solid rgba(34, 197, 94, 0.22);
  border-radius: 5px;
  text-decoration: none;
  color: var(--fg);
  background: rgba(5, 7, 6, 0.5);
  letter-spacing: 1.2px;
  transition: all 0.2s ease;
}
.news-pag a:hover {
  border-color: #22c55e;
  background: rgba(34, 197, 94, 0.08);
  color: #4ade80;
  text-shadow: 0 0 4px rgba(34, 197, 94, 0.4);
  text-decoration: none;
}
.news-pag .cur {
  background: #22c55e;
  color: #050706;
  border-color: #22c55e;
}

.aenews-empty {
  text-align: center;
  padding: 80px 24px;
  color: var(--fg-muted);
  font-family: var(--mono);
  font-size: 14px;
  border: 1px dashed rgba(34, 197, 94, 0.25);
  border-radius: 8px;
  background: rgba(34, 197, 94, 0.02);
}
.aenews-empty-icon {
  display: block;
  font-size: 36px;
  color: rgba(34, 197, 94, 0.5);
  margin-bottom: 12px;
}

/* === ARTÍCULO INDIVIDUAL · sublime === */
.aenews-article {
  padding: 120px 0 60px;
  position: relative;
}
body.is-embed .aenews-article { padding: 24px 0 24px; }

.article-wrap {
  max-width: 1080px;
  margin: 0 auto;
}

/* Reading progress bar específica del artículo (sticky bajo el header) */
.article-reading-progress {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  z-index: 50;
  background: rgba(34, 197, 94, 0.04);
  pointer-events: none;
}
body.is-embed .article-reading-progress { display: none; }
.article-reading-bar {
  display: block;
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #22c55e 0%, #4ade80 50%, #a7f3d0 100%);
  box-shadow: 0 0 10px #22c55e, 0 0 3px #22c55e;
  transition: width 0.08s linear;
  position: relative;
}
.article-reading-bar::after {
  content: "";
  position: absolute;
  right: 0;
  top: 50%;
  transform: translate(50%, -50%);
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #a7f3d0;
  box-shadow: 0 0 10px #4ade80, 0 0 18px rgba(34, 197, 94, 0.5);
}

/* Banda terminal status del artículo */
.article-terminal-bar {
  display: flex;
  align-items: center;
  gap: 14px;
  max-width: 760px;
  margin: 0 auto 24px;
  padding: 9px 16px;
  background: linear-gradient(180deg, #14110e 0%, #0d0c0a 100%);
  border: 1px solid rgba(34, 197, 94, 0.22);
  border-radius: 6px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 1.2px;
}
.atb-leds {
  display: inline-flex;
  gap: 5px;
  flex-shrink: 0;
}
.atb-led {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.2);
}
.atb-led--green { background: #22c55e; box-shadow: 0 0 5px rgba(34,197,94,0.5), inset 0 1px 0 rgba(255,255,255,0.2); }
.atb-led--amber { background: #fbbf24; box-shadow: 0 0 5px rgba(251,191,36,0.4), inset 0 1px 0 rgba(255,255,255,0.2); }
.atb-led--red   { background: #ef4444; box-shadow: 0 0 5px rgba(239,68,68,0.4), inset 0 1px 0 rgba(255,255,255,0.2); }
.atb-prompt {
  flex: 1;
  color: rgba(167, 243, 208, 0.85);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.atb-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #4ade80;
  font-weight: 600;
  text-transform: uppercase;
  text-shadow: 0 0 4px rgba(34, 197, 94, 0.4);
  flex-shrink: 0;
}
.atb-status-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 4px #22c55e;
  animation: tStatLedFast 1.4s ease-in-out infinite;
}

/* Article hero */
.article-hero {
  padding: 0 0 28px;
  max-width: 760px;
  margin: 0 auto;
}

/* Eyebrow grande del artículo */
.article-eyebrow {
  display: inline-block;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 2.2px;
  color: #4ade80;
  text-transform: uppercase;
  margin-bottom: 18px;
  padding: 4px 12px;
  border: 1px solid rgba(34, 197, 94, 0.35);
  background: rgba(34, 197, 94, 0.06);
  border-radius: 3px;
  text-shadow: 0 0 4px rgba(34, 197, 94, 0.4);
}

/* Lead destacado (excerpt) */
.article-lead {
  font-size: 1.18rem;
  line-height: 1.6;
  color: var(--fg-muted);
  margin: 0 0 24px;
  padding-left: 16px;
  border-left: 2px solid rgba(34, 197, 94, 0.4);
  font-style: italic;
}
.article-crumb {
  font-family: var(--mono);
  font-size: 11.5px;
  letter-spacing: 1.5px;
  color: var(--fg-muted);
  margin-bottom: 18px;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  text-transform: uppercase;
}
.article-crumb a {
  color: rgba(34, 197, 94, 0.85);
  text-decoration: none;
  transition: color 0.2s ease, text-shadow 0.2s ease;
}
.article-crumb a:hover {
  color: #22c55e;
  text-shadow: 0 0 4px rgba(34, 197, 94, 0.4);
  text-decoration: none;
}
.article-crumb .crumb-sep { color: rgba(34, 197, 94, 0.4); }
.article-crumb .crumb-cat {
  color: rgba(167, 243, 208, 0.75);
  background: rgba(34, 197, 94, 0.06);
  padding: 2px 8px;
  border-radius: 3px;
  border: 1px solid rgba(34, 197, 94, 0.2);
  font-size: 10.5px;
}

.article-title {
  font-size: clamp(1.85rem, 4.3vw, 2.7rem);
  line-height: 1.18;
  letter-spacing: -0.02em;
  margin: 0 0 18px;
}

.article-meta {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
  font-family: var(--mono);
  font-size: 11.5px;
  text-transform: uppercase;
  letter-spacing: 1.2px;
}
.amitem {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--fg-subtle);
}
.amitem svg { color: rgba(34, 197, 94, 0.65); }
.amitem--date { color: rgba(34, 197, 94, 0.85); }

/* Cover de la imagen */
.article-cover {
  margin: 28px 0 14px;
  border-radius: 10px;
  overflow: hidden;
  aspect-ratio: 16/9;
  background: #050706;
  position: relative;
  border: 1px solid rgba(34, 197, 94, 0.22);
}
.article-cover img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.article-cover-frame {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 2;
  background:
    radial-gradient(ellipse at center, transparent 60%, rgba(0, 0, 0, 0.4) 100%);
}
.article-credit {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--fg-subtle);
  text-align: right;
  margin: 0 0 32px;
  letter-spacing: 0.3px;
}
.article-credit a {
  color: rgba(34, 197, 94, 0.7);
  text-decoration: underline;
  text-decoration-color: rgba(34, 197, 94, 0.3);
}
.article-credit a:hover {
  color: #22c55e;
  text-decoration-color: #22c55e;
}

/* Audio TTS */
.article-audio {
  margin: 24px 0 32px;
  padding: 14px 18px;
  background: linear-gradient(180deg, #0d0c0a 0%, #050706 100%);
  border: 1px solid rgba(34, 197, 94, 0.25);
  border-radius: 8px;
  display: flex;
  align-items: center;
  gap: 14px;
}
.audio-icon {
  flex: 0 0 36px;
  height: 36px;
  background: rgba(34, 197, 94, 0.12);
  color: #22c55e;
  border: 1px solid rgba(34, 197, 94, 0.4);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
}
.audio-body { flex: 1; }
.audio-label {
  font-family: var(--mono);
  font-size: 10.5px;
  color: rgba(34, 197, 94, 0.85);
  text-transform: uppercase;
  letter-spacing: 1.5px;
  margin-bottom: 6px;
}
.article-audio audio { width: 100%; }

/* Cuerpo del artículo */
.article-body {
  font-size: 17px;
  line-height: 1.78;
  color: var(--fg);
}
.article-body p { margin: 0 0 18px; }
.article-body h2 {
  margin: 44px 0 16px;
  font-size: 1.55rem;
  letter-spacing: -0.01em;
  position: relative;
  padding-left: 14px;
  border-left: 3px solid rgba(34, 197, 94, 0.55);
}
.article-body h3 {
  margin: 30px 0 10px;
  font-size: 1.18rem;
  color: rgba(167, 243, 208, 0.95);
}
.article-body ul, .article-body ol {
  padding-left: 22px;
  margin: 0 0 18px;
}
.article-body li { margin-bottom: 8px; }
.article-body ul li::marker { color: rgba(34, 197, 94, 0.75); }
.article-body ol li::marker { color: rgba(34, 197, 94, 0.75); font-family: var(--mono); }
.article-body a {
  color: #4ade80;
  text-decoration: underline;
  text-decoration-color: rgba(34, 197, 94, 0.4);
  text-underline-offset: 3px;
}
.article-body a:hover {
  color: #22c55e;
  text-decoration-color: #22c55e;
  text-shadow: 0 0 4px rgba(34, 197, 94, 0.4);
}
.article-body strong {
  color: var(--fg);
  font-weight: 600;
}
.article-body blockquote {
  border-left: 3px solid #22c55e;
  padding: 10px 0 10px 18px;
  margin: 24px 0;
  color: rgba(167, 243, 208, 0.85);
  font-style: italic;
  background: rgba(34, 197, 94, 0.04);
  border-radius: 0 6px 6px 0;
  font-size: 1.05em;
}
.article-body code {
  background: rgba(34, 197, 94, 0.08);
  border: 1px solid rgba(34, 197, 94, 0.2);
  padding: 1px 6px;
  border-radius: 3px;
  font-family: var(--mono);
  font-size: 0.9em;
  color: #4ade80;
}

/* Tags */
.article-tags {
  margin: 36px 0 0;
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.article-tag {
  font-family: var(--mono);
  font-size: 10.5px;
  background: rgba(34, 197, 94, 0.06);
  color: rgba(34, 197, 94, 0.9);
  padding: 4px 10px;
  border-radius: 4px;
  border: 1px solid rgba(34, 197, 94, 0.25);
  letter-spacing: 1.2px;
  text-transform: uppercase;
}

/* CTA al final del artículo */
.article-cta {
  margin: 50px 0 30px;
  padding: 32px 30px;
  background:
    linear-gradient(180deg, rgba(34, 197, 94, 0.08) 0%, rgba(34, 197, 94, 0.02) 100%),
    linear-gradient(180deg, #0a0d0a 0%, #050706 100%);
  border: 1px solid rgba(34, 197, 94, 0.4);
  border-radius: 10px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.article-cta::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(34, 197, 94, 0.7), transparent);
}
.article-cta-prompt {
  display: block;
  font-family: var(--mono);
  color: #22c55e;
  font-size: 14px;
  margin-bottom: 6px;
  text-shadow: 0 0 4px rgba(34, 197, 94, 0.4);
}
.article-cta h3 {
  margin: 0 0 8px;
  font-size: 1.35rem;
  letter-spacing: -0.01em;
}
.article-cta p {
  color: var(--fg-muted);
  margin: 0 0 20px;
  font-size: 15px;
}
.article-cta-btn {
  display: inline-flex !important;
  align-items: center;
  gap: 8px;
  font-family: var(--mono) !important;
  font-size: 12.5px !important;
  letter-spacing: 1.8px !important;
  text-transform: uppercase !important;
  padding: 12px 22px !important;
  background: linear-gradient(180deg, rgba(34, 197, 94, 0.12), rgba(34, 197, 94, 0.04)) !important;
  border: 1px solid rgba(34, 197, 94, 0.5) !important;
  color: #4ade80 !important;
  border-radius: 6px !important;
  text-decoration: none;
  transition: all 0.22s ease !important;
  text-shadow: 0 0 4px rgba(34, 197, 94, 0.4);
}
.article-cta-btn:hover {
  background: linear-gradient(180deg, #22c55e, #16a34a) !important;
  color: #050706 !important;
  border-color: #22c55e !important;
  text-shadow: none;
  box-shadow: 0 0 14px rgba(34, 197, 94, 0.4);
}
.article-cta-btn-prompt { font-weight: 700; opacity: 0.9; }

.article-not-found {
  padding: 140px 0 100px;
  text-align: center;
}
.article-not-found h1 {
  font-size: clamp(1.4rem, 3vw, 1.9rem);
  margin: 14px 0 24px;
  color: var(--fg-muted);
}

/* === Layout body + TOC sticky === */
.article-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 240px;
  gap: 48px;
  align-items: start;
  max-width: 1080px;
  margin: 0 auto;
}
body.is-embed .article-layout {
  grid-template-columns: 1fr;
  max-width: 760px;
}

/* TOC sticky */
.article-toc {
  position: sticky;
  top: 110px;
  font-family: var(--mono);
  font-size: 12px;
  padding: 18px 16px;
  background: rgba(5, 7, 6, 0.5);
  border: 1px solid rgba(34, 197, 94, 0.22);
  border-radius: 8px;
  max-height: calc(100vh - 140px);
  overflow-y: auto;
}
body.is-embed .article-toc { display: none; }
.article-toc-head {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 10.5px;
  letter-spacing: 1.8px;
  text-transform: uppercase;
  color: rgba(34, 197, 94, 0.95);
  font-weight: 600;
  text-shadow: 0 0 4px rgba(34, 197, 94, 0.3);
  margin-bottom: 12px;
  padding-bottom: 10px;
  border-bottom: 1px dashed rgba(34, 197, 94, 0.2);
}
.article-toc-prompt { color: #22c55e; font-size: 12px; }
.article-toc-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
  counter-reset: toc-counter;
}
.article-toc-list li { counter-increment: toc-counter; }
.article-toc-list a {
  display: flex;
  gap: 8px;
  padding: 6px 8px;
  font-size: 11.5px;
  line-height: 1.4;
  color: var(--fg-muted);
  text-decoration: none;
  border-left: 2px solid transparent;
  border-radius: 0 4px 4px 0;
  transition: all 0.18s ease;
}
.article-toc-list a::before {
  content: counter(toc-counter, decimal-leading-zero);
  flex-shrink: 0;
  font-size: 9.5px;
  color: rgba(34, 197, 94, 0.5);
  font-weight: 700;
  letter-spacing: 0.5px;
  padding-top: 1px;
}
.article-toc-list a:hover {
  background: rgba(34, 197, 94, 0.05);
  border-left-color: rgba(34, 197, 94, 0.4);
  color: #4ade80;
  text-decoration: none;
}
.article-toc-list a.is-active {
  background: rgba(34, 197, 94, 0.08);
  border-left-color: #22c55e;
  color: #4ade80;
  text-shadow: 0 0 4px rgba(34, 197, 94, 0.4);
  font-weight: 500;
}
.article-toc-list a.is-active::before { color: #22c55e; }

/* === Drop cap en primer párrafo === */
.article-body p.has-dropcap::first-letter {
  initial-letter: 2.5;
  -webkit-initial-letter: 2.5;
  float: left;
  font-family: var(--mono);
  font-size: 3.4rem;
  line-height: 0.85;
  margin: 6px 12px 0 0;
  color: #22c55e;
  text-shadow: 0 0 8px rgba(34, 197, 94, 0.4);
  font-weight: 700;
}
@supports not (initial-letter: 2.5) {
  .article-body p.has-dropcap::first-letter {
    float: left;
    font-size: 3.6rem;
    line-height: 0.9;
    padding: 4px 10px 0 0;
  }
}

/* Cover con scanlines + glow superior */
.article-cover::before {
  content: "";
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    0deg,
    transparent 0,
    transparent 2px,
    rgba(0, 0, 0, 0.08) 3px,
    transparent 4px
  );
  pointer-events: none;
  z-index: 1;
  opacity: 0.4;
  mix-blend-mode: multiply;
}
.article-cover::after {
  /* Glow line superior verde */
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(34, 197, 94, 0.6), transparent);
  z-index: 3;
}

/* === Compartir social === */
.article-share {
  margin: 40px 0 24px;
  padding: 18px 20px;
  background: rgba(5, 7, 6, 0.45);
  border: 1px dashed rgba(34, 197, 94, 0.25);
  border-radius: 8px;
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}
.article-share-label {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: rgba(34, 197, 94, 0.9);
  text-shadow: 0 0 4px rgba(34, 197, 94, 0.3);
  flex-shrink: 0;
}
.article-share-buttons {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  flex: 1;
  justify-content: flex-end;
}
.share-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 12px;
  background: rgba(34, 197, 94, 0.04);
  border: 1px solid rgba(34, 197, 94, 0.25);
  border-radius: 5px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: rgba(167, 243, 208, 0.85);
  text-decoration: none;
  cursor: pointer;
  transition: all 0.2s ease;
}
.share-btn svg { color: #22c55e; flex-shrink: 0; }
.share-btn:hover {
  background: rgba(34, 197, 94, 0.12);
  border-color: rgba(34, 197, 94, 0.55);
  color: #4ade80;
  text-shadow: 0 0 4px rgba(34, 197, 94, 0.4);
  text-decoration: none;
  transform: translateY(-1px);
}
.share-btn--copy.is-copied {
  background: #22c55e;
  border-color: #22c55e;
  color: #050706;
}
.share-btn--copy.is-copied svg { color: #050706; }

/* === End of transmission · firma terminal final === */
.article-eot {
  margin: 30px 0 60px;
  display: flex;
  align-items: center;
  gap: 14px;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 2px;
  color: rgba(34, 197, 94, 0.55);
  text-transform: uppercase;
  text-shadow: 0 0 4px rgba(34, 197, 94, 0.2);
}
.eot-line {
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg,
    transparent 0%,
    rgba(34, 197, 94, 0.4) 50%,
    transparent 100%);
}
.eot-text {
  flex-shrink: 0;
  white-space: nowrap;
}

/* Stats meta extras (palabras, secciones) */
.amitem--words,
.amitem--sections {
  color: rgba(167, 243, 208, 0.6);
}

/* === Footer mini de aenews === */
.aenews-footer-mini {
  margin-top: 40px;
}
.aenews-footer-mini .footer-bottom .inline-theme {
  text-decoration: none;
}

/* Light theme overrides */
html[data-theme="light"] .aenews-eyebrow,
html[data-theme="light"] .news-cat,
html[data-theme="light"] .article-tag {
  color: #1e40af;
  border-color: rgba(30, 64, 175, 0.3);
  background: rgba(30, 64, 175, 0.05);
  text-shadow: none;
}
html[data-theme="light"] .news-meta-cta,
html[data-theme="light"] .article-body a,
html[data-theme="light"] .article-crumb a {
  color: #1e40af;
  text-shadow: none;
}
html[data-theme="light"] .article-body h2 { border-left-color: rgba(30, 64, 175, 0.5); }
html[data-theme="light"] .article-body blockquote {
  border-left-color: #1e40af;
  color: rgba(30, 41, 59, 0.85);
  background: rgba(30, 64, 175, 0.04);
}
html[data-theme="light"] .article-cta {
  background: linear-gradient(180deg, rgba(30, 64, 175, 0.06) 0%, rgba(30, 64, 175, 0.02) 100%);
  border-color: rgba(30, 64, 175, 0.4);
}
html[data-theme="light"] .article-cta::before {
  background: linear-gradient(90deg, transparent, rgba(30, 64, 175, 0.55), transparent);
}
html[data-theme="light"] .article-cta-btn {
  background: linear-gradient(180deg, rgba(30, 64, 175, 0.08), rgba(30, 64, 175, 0.03)) !important;
  border-color: rgba(30, 64, 175, 0.5) !important;
  color: #1e40af !important;
  text-shadow: none;
}

/* === Modal preview AEnews === */
html.aenews-preview-locked,
html.aenews-preview-locked body { overflow: hidden; }

.aenews-preview-modal {
  position: fixed;
  inset: 0;
  z-index: 9990;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  opacity: 0;
  transition: opacity 0.22s ease;
}
.aenews-preview-modal[hidden] { display: none !important; }
.aenews-preview-modal.is-open { opacity: 1; }

.aenews-preview-backdrop {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at center, rgba(5, 14, 8, 0.78) 0%, rgba(2, 4, 3, 0.96) 100%),
    rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(8px) saturate(1.1);
  -webkit-backdrop-filter: blur(8px) saturate(1.1);
}

.aenews-preview-dialog {
  position: relative;
  width: 100%;
  max-width: 960px;
  height: calc(100vh - 48px);
  max-height: 880px;
  background: #0a0d0a;
  border: 1px solid rgba(34, 197, 94, 0.4);
  border-radius: 10px;
  box-shadow:
    0 30px 80px rgba(0, 0, 0, 0.7),
    0 0 0 1px rgba(0, 0, 0, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.04);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transform: scale(0.96) translateY(8px);
  transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1);
}
.aenews-preview-modal.is-open .aenews-preview-dialog { transform: scale(1) translateY(0); }

.aenews-preview-head {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px 14px;
  background: linear-gradient(180deg, #14110e 0%, #0d0c0a 100%);
  border-bottom: 1px solid rgba(34, 197, 94, 0.25);
  font-family: var(--mono);
}
.aenews-preview-leds {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}
.apl-led {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2);
}
.apl-led--green { background: #22c55e; box-shadow: 0 0 6px rgba(34, 197, 94, 0.6), inset 0 1px 0 rgba(255,255,255,0.2); }
.apl-led--amber { background: #fbbf24; box-shadow: 0 0 6px rgba(251, 191, 36, 0.5), inset 0 1px 0 rgba(255,255,255,0.2); }
.apl-led--red   { background: #ef4444; box-shadow: 0 0 6px rgba(239, 68, 68, 0.5), inset 0 1px 0 rgba(255,255,255,0.2); }

.aenews-preview-url-bar {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  background: rgba(5, 7, 6, 0.75);
  border: 1px solid rgba(34, 197, 94, 0.18);
  border-radius: 4px;
  font-size: 12px;
  letter-spacing: 0.5px;
  color: #a7f3d0;
  min-width: 0;
}
.apl-url-icon { display: inline-flex; color: #22c55e; opacity: 0.85; }
.apl-url-text {
  font-family: var(--mono);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-weight: 500;
  color: #4ade80;
}
.apl-title-text {
  margin-left: auto;
  padding-left: 14px;
  border-left: 1px dashed rgba(34, 197, 94, 0.2);
  font-size: 11px;
  color: rgba(167, 243, 208, 0.6);
  text-transform: uppercase;
  letter-spacing: 1.5px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex-shrink: 1;
  max-width: 50%;
}
.apl-title-text:empty { display: none; }

.aenews-preview-visit {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  font-family: var(--mono);
  font-size: 11.5px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: #22c55e;
  text-decoration: none;
  border: 1px solid rgba(34, 197, 94, 0.5);
  border-radius: 4px;
  background: transparent;
  transition: all 0.15s ease;
}
.aenews-preview-visit:hover {
  background: #22c55e;
  color: #050706;
  text-decoration: none;
  box-shadow: 0 0 12px rgba(34, 197, 94, 0.4);
}

.aenews-preview-close {
  flex-shrink: 0;
  appearance: none;
  width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 4px;
  color: rgba(255, 255, 255, 0.6);
  cursor: pointer;
  transition: all 0.15s ease;
}
.aenews-preview-close:hover {
  background: rgba(239, 68, 68, 0.15);
  border-color: rgba(239, 68, 68, 0.5);
  color: #fca5a5;
}

.aenews-preview-body {
  position: relative;
  flex: 1;
  min-height: 0;
  background: var(--bg);
  display: flex;
}
.aenews-preview-iframe {
  width: 100%;
  height: 100%;
  border: 0;
  background: var(--bg);
  display: block;
}

.aenews-preview-spinner {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 18px;
  background: #0a0d0a;
  color: #4ade80;
  font-family: var(--mono);
  font-size: 12.5px;
  letter-spacing: 2px;
  text-transform: uppercase;
  z-index: 2;
}
.aenews-preview-spinner[hidden] { display: none; }
.apl-spinner-pulse {
  width: 56px;
  height: 56px;
  position: relative;
}
.apl-spinner-pulse::before,
.apl-spinner-pulse::after {
  content: "";
  position: absolute;
  inset: 0;
  border: 2px solid #22c55e;
  border-radius: 50%;
  animation: aplPulse 1.4s ease-out infinite;
}
.apl-spinner-pulse::after { animation-delay: 0.7s; }
@keyframes aplPulse {
  0%   { transform: scale(0.4); opacity: 0.9; }
  100% { transform: scale(1); opacity: 0; }
}

@media (max-width: 720px) {
  .aenews-preview-modal { padding: 0; }
  .aenews-preview-dialog {
    height: 100vh;
    max-height: 100vh;
    border-radius: 0;
    border: 0;
  }
  .aenews-preview-head {
    flex-wrap: wrap;
    gap: 8px;
    padding: 8px 12px;
  }
  .aenews-preview-leds { order: 1; }
  .aenews-preview-close { order: 2; margin-left: auto; }
  .aenews-preview-url-bar {
    order: 4;
    flex-basis: 100%;
    font-size: 11px;
    padding: 5px 10px;
  }
  .apl-title-text { display: none; }
  .aenews-preview-visit {
    order: 3;
    padding: 6px 10px;
    font-size: 10.5px;
    letter-spacing: 1px;
  }
}

@media (max-width: 1100px) {
  .article-layout { grid-template-columns: 1fr; max-width: 760px; }
  .article-toc { display: none; }
}

@media (max-width: 560px) {
  .aenews-hero { padding: 110px 0 28px; }
  .aenews-article { padding: 100px 0 50px; }
  .article-title { font-size: clamp(1.55rem, 5.5vw, 2rem); }
  .article-lead { font-size: 1.05rem; padding-left: 12px; }
  .article-meta { gap: 12px; }
  .amitem { font-size: 11px; }
  .article-body { font-size: 16px; }
  .article-body h2 { font-size: 1.35rem; padding-left: 12px; }
  .article-body p.has-dropcap::first-letter {
    font-size: 2.6rem;
    margin: 4px 9px 0 0;
  }
  .article-cta { padding: 24px 20px; }
  .news-grid { grid-template-columns: 1fr; }
  .article-terminal-bar { padding: 8px 12px; gap: 10px; font-size: 10px; }
  .atb-prompt { font-size: 9.5px; }
  .article-share { padding: 14px 14px; gap: 10px; }
  .article-share-label { font-size: 9.5px; flex-basis: 100%; }
  .article-share-buttons { justify-content: flex-start; gap: 6px; }
  .share-btn { padding: 6px 10px; font-size: 10px; }
  .share-btn span:not(.share-btn-label) { display: none; }
  .article-eot { font-size: 8.5px; gap: 10px; }
}

@media (prefers-reduced-motion: reduce) {
  .aenews-preview-modal,
  .aenews-preview-dialog,
  .apl-spinner-pulse::before,
  .apl-spinner-pulse::after,
  .aenews-stat-led,
  .news-card { transition: none !important; animation: none !important; }
  .news-card:hover { transform: none; }
}

/* ============================================================
   #aew-rostro · retrato Matrix decorativo · top-right
   Saliendo del lado, fundido por mask gradient, debajo de todo
   lo importante (z-index 2). CMS variables: --rostro-w, -op,
   -top, -right, -w-mob, -op-mob.
   ============================================================ */
#aew-rostro {
  position: fixed;
  top: var(--rostro-top, -40px);
  right: var(--rostro-right, -80px);
  width: var(--rostro-w, 420px);
  height: auto;
  z-index: 2;
  pointer-events: none;
  user-select: none;
  -webkit-user-drag: none;
  opacity: var(--rostro-op, 0.55);
  /* Fade hacia la izquierda + abajo para que se "salga" del lado */
  -webkit-mask-image: linear-gradient(225deg, black 25%, rgba(0,0,0,0.6) 55%, transparent 80%);
          mask-image: linear-gradient(225deg, black 25%, rgba(0,0,0,0.6) 55%, transparent 80%);
  filter: saturate(1.05) brightness(0.95);
  transition: opacity 0.6s ease, filter 0.6s ease;
  will-change: opacity;
}
/* Si ya hay scroll, dejarlo más sutil para no distraer del contenido */
.site-header.scrolled ~ #aew-rostro,
body:has(.site-header.scrolled) #aew-rostro {
  opacity: calc(var(--rostro-op, 0.55) * 0.7);
  filter: saturate(0.95) brightness(0.85);
}
/* Light theme: la imagen verde matrix queda fuerte sobre fondo claro → más sutil */
html[data-theme="light"] #aew-rostro {
  opacity: calc(var(--rostro-op, 0.55) * 0.55);
  filter: saturate(0.85) brightness(1.0) contrast(0.95);
  mix-blend-mode: multiply;
}
@media (max-width: 900px) {
  #aew-rostro {
    width: var(--rostro-w-mob, 240px);
    opacity: var(--rostro-op-mob, 0.32);
    top: -30px;
    right: -50px;
  }
}
@media (max-width: 480px) {
  #aew-rostro {
    width: calc(var(--rostro-w-mob, 240px) * 0.8);
    opacity: calc(var(--rostro-op-mob, 0.32) * 0.85);
    top: -24px;
    right: -40px;
  }
}
@media (prefers-reduced-motion: reduce) {
  #aew-rostro { transition: none; }
}

/* === iOS safe area (notch) === */
@supports (padding: max(0px)) {
  .site-header {
    padding-left: max(0px, env(safe-area-inset-left)) !important;
    padding-right: max(0px, env(safe-area-inset-right)) !important;
  }
  body {
    padding-bottom: env(safe-area-inset-bottom);
  }
}

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

/* ========== Enhanced effects ========== */

/* Glitch headline — bursts intermitentes, alta visibilidad */
.glitch {
  position: relative;
  display: inline-block;
}
.glitch::before, .glitch::after {
  content: attr(data-text);
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  pointer-events: none;
  opacity: 0;
  /* Hereda padding del .accent para mantener alineación de descendentes */
  padding: inherit;
}
.glitch.run::before {
  color: #22C55E;
  text-shadow: 2px 0 #22C55E, -1px 0 rgba(34, 197, 94, 0.6);
  clip-path: polygon(0 0, 100% 0, 100% 45%, 0 45%);
  animation: glitch-a 3.6s steps(1) 0.3s infinite;
  mix-blend-mode: screen;
}
.glitch.run::after {
  color: #ef4444;
  text-shadow: -2px 0 #ef4444, 1px 0 rgba(239, 68, 68, 0.6);
  clip-path: polygon(0 55%, 100% 55%, 100% 100%, 0 100%);
  animation: glitch-b 3.6s steps(1) 0.3s infinite;
  mix-blend-mode: screen;
}
@keyframes glitch-a {
  0%, 100% { opacity: 0; transform: translate(0, 0); }
  /* Burst 1 — desplazamiento fuerte */
  3%  { opacity: 1; transform: translate(-7px, 0); clip-path: polygon(0 5%, 100% 5%, 100% 38%, 0 38%); }
  5%  { opacity: 0; }
  6%  { opacity: 0.9; transform: translate(-4px, 1px); clip-path: polygon(0 60%, 100% 60%, 100% 85%, 0 85%); }
  8%  { opacity: 0; }
  9%  { opacity: 1; transform: translate(-9px, 0); clip-path: polygon(0 25%, 100% 25%, 100% 50%, 0 50%); }
  11% { opacity: 0; }
  /* Burst 2 — más sutil */
  28% { opacity: 0.85; transform: translate(-5px, 0); clip-path: polygon(0 0, 100% 0, 100% 30%, 0 30%); }
  30% { opacity: 0; }
  /* Burst 3 — fuerte y errático */
  55% { opacity: 1; transform: translate(-8px, -1px); clip-path: polygon(0 40%, 100% 40%, 100% 70%, 0 70%); }
  57% { opacity: 0; }
  58% { opacity: 1; transform: translate(-3px, 1px); clip-path: polygon(0 70%, 100% 70%, 100% 95%, 0 95%); }
  60% { opacity: 0; }
  /* Burst 4 — cierre */
  82% { opacity: 0.9; transform: translate(-6px, 0); clip-path: polygon(0 15%, 100% 15%, 100% 55%, 0 55%); }
  84% { opacity: 0; }
}
@keyframes glitch-b {
  0%, 100% { opacity: 0; transform: translate(0, 0); }
  /* Sincronizado con glitch-a pero opuesto */
  4%  { opacity: 1; transform: translate(7px, 0); clip-path: polygon(0 30%, 100% 30%, 100% 60%, 0 60%); }
  6%  { opacity: 0; }
  7%  { opacity: 0.9; transform: translate(4px, -1px); clip-path: polygon(0 0, 100% 0, 100% 25%, 0 25%); }
  9%  { opacity: 0; }
  10% { opacity: 1; transform: translate(9px, 1px); clip-path: polygon(0 50%, 100% 50%, 100% 80%, 0 80%); }
  12% { opacity: 0; }
  29% { opacity: 0.85; transform: translate(5px, 0); clip-path: polygon(0 35%, 100% 35%, 100% 65%, 0 65%); }
  31% { opacity: 0; }
  56% { opacity: 1; transform: translate(8px, 1px); clip-path: polygon(0 5%, 100% 5%, 100% 40%, 0 40%); }
  58% { opacity: 0; }
  59% { opacity: 1; transform: translate(3px, -1px); clip-path: polygon(0 45%, 100% 45%, 100% 75%, 0 75%); }
  61% { opacity: 0; }
  83% { opacity: 0.9; transform: translate(6px, 0); clip-path: polygon(0 25%, 100% 25%, 100% 65%, 0 65%); }
  85% { opacity: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .glitch.run::before, .glitch.run::after { animation: none; opacity: 0; }
}

/* Magnetic button */
.magnetic { position: relative; transition: transform 0.15s cubic-bezier(0.2, 0.8, 0.2, 1); will-change: transform; }
.magnetic > span { display: inline-block; transition: transform 0.2s cubic-bezier(0.2, 0.8, 0.2, 1); }

/* Code ticker card in hero */
.code-ticker {
  margin: 48px auto 0;
  max-width: 620px;
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  font-family: var(--mono);
  font-size: 12.5px;
  position: relative;
  text-align: left;
}
.code-ticker::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(34,197,94,0.04), transparent 40%);
}
.code-ticker-header {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
  background: var(--bg);
}
.code-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--border-strong); }
.code-dot:nth-child(1) { background: #EF4444; }
.code-dot:nth-child(2) { background: #F59E0B; }
.code-dot:nth-child(3) { background: #22C55E; }
.code-ticker-title { margin-left: 8px; color: var(--fg-muted); font-size: 11.5px; flex: 1; }
.code-ticker-status {
  display: inline-flex; align-items: center; gap: 6px;
  color: #22C55E; font-size: 10.5px; text-transform: uppercase; letter-spacing: 0.08em;
}
.pulse-dot {
  width: 7px; height: 7px; border-radius: 50%; background: #22C55E;
  box-shadow: 0 0 10px rgba(34,197,94,0.8);
  animation: pulse 1.8s infinite;
}
.code-ticker-body { padding: 14px 18px; display: flex; flex-direction: column; gap: 6px; }
.code-line { display: flex; gap: 10px; align-items: baseline; color: var(--fg); opacity: 0; animation: line-in 0.5s forwards; }
.code-line:nth-child(1) { animation-delay: 0.2s; }
.code-line:nth-child(2) { animation-delay: 0.6s; }
.code-line:nth-child(3) { animation-delay: 1.0s; }
.code-line:nth-child(4) { animation-delay: 1.4s; }
@keyframes line-in { to { opacity: 1; } }
.code-time { color: var(--fg-subtle); font-size: 11px; }
.code-ok { color: #22C55E; font-weight: 600; }
.code-txt { color: var(--fg-muted); }
.code-str { color: var(--accent); }
.code-num { color: #22C55E; }
.code-arrow { color: var(--fg-subtle); }
.code-prompt { color: #22C55E; font-weight: 600; }
.blink { color: #22C55E; animation: blink 1s step-end infinite; }
@keyframes blink { 50% { opacity: 0; } }

/* Service card hover beam */
.service-card { transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1); }
.service-icon svg { transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1); }
.service-card:hover .service-icon svg { transform: scale(1.15) rotate(-6deg); }
.service-card:hover .service-icon { border-color: var(--accent); color: var(--accent); }

/* 3D tilt for work cards */
.work-card { transform-style: preserve-3d; transition: transform 0.4s cubic-bezier(0.16,1,0.3,1), box-shadow 0.3s, border-color 0.3s; will-change: transform; }
.work-card .work-visual { transition: transform 0.4s cubic-bezier(0.16,1,0.3,1); }
.work-card:hover .work-visual { transform: translateZ(20px); }

/* Scroll progress bar */
.scroll-progress {
  position: fixed;
  top: 0; left: 0;
  height: 2px;
  width: 0%;
  background: linear-gradient(90deg, #22C55E, var(--accent));
  z-index: 100;
  transition: width 0.1s linear;
  box-shadow: 0 0 12px rgba(34,197,94,0.5);
}

/* Section number animated */
.section-head .num {
  transition: color 0.3s, transform 0.5s cubic-bezier(0.16,1,0.3,1);
}
.section-head.visible .num { color: var(--accent); }

/* Why item icon pulse on hover */
.why-item { transition: background 0.3s; position: relative; overflow: hidden; }
.why-item::before {
  content: '';
  position: absolute;
  left: -50%; top: -50%;
  width: 200%; height: 200%;
  background: radial-gradient(circle at center, rgba(34,197,94,0.08), transparent 40%);
  opacity: 0;
  transition: opacity 0.4s;
  pointer-events: none;
}
.why-item:hover::before { opacity: 1; }
.why-item:hover .why-icon {
  border-color: #22C55E;
  color: #22C55E;
  transform: scale(1.08) rotate(-4deg);
  transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.why-icon { transition: all 0.3s; }

/* Process node glow when in view */
.process-step.visible .step-node {
  animation: node-pop 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}
@keyframes node-pop {
  0% { transform: scale(0.5); opacity: 0; }
  60% { transform: scale(1.15); opacity: 1; }
  100% { transform: scale(1); opacity: 1; }
}

/* Badge dot pulse already exists, add cool green glow */
.badge {
  transition: border-color 0.3s, background 0.3s;
}
.badge:hover {
  border-color: #22C55E;
}

/* Hero heading entrance */
.hero h1 { overflow: visible; }
.hero h1 .accent {
  display: inline-block;
  position: relative;
  padding: 0 0.05em 0.18em;  /* espacio para descendentes (g, p, y) y para que la sombra del glitch no se corte */
}
.hero h1 .accent.accent { color: var(--accent); }

/* Floating particles orbit on service icons */
.service-icon { position: relative; }

/* Animated underline on nav */
/* Legacy underline nav (sustituido por reglas más arriba — se mantiene por si algún tema legacy lo usa) */
.nav a.legacy-underline { position: relative; }
.nav a.legacy-underline::after {
  content: '';
  position: absolute;
  left: 14px; right: 14px;
  bottom: 4px;
  height: 1px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s cubic-bezier(0.16,1,0.3,1);
}
.nav a:hover::after { transform: scaleX(1); }

/* FAQ ripple hint */
.faq-q { position: relative; }
.faq-q::before {
  content: '';
  position: absolute;
  left: -8px; top: 50%;
  transform: translateY(-50%) scaleY(0);
  width: 2px;
  height: 60%;
  background: var(--accent);
  transition: transform 0.3s cubic-bezier(0.16,1,0.3,1);
}
.faq-item.open .faq-q::before { transform: translateY(-50%) scaleY(1); }

/* Form field focus aura */
.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus {
  box-shadow: 0 0 0 3px var(--accent-soft), 0 0 24px rgba(34,197,94,0.08);
}

/* ================= MATRIX PILLS (widget flotante con imagen real) ================= */
#matrix-pills {
  position: fixed;
  bottom: 22px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 800;
  display: flex;
  gap: 18px;
  pointer-events: none;
  animation: pills-float-in 0.6s cubic-bezier(0.2, 0.9, 0.3, 1.15) 1s both;
}
@keyframes pills-float-in {
  from { transform: translateX(-50%) translateY(120px); opacity: 0; }
  to   { transform: translateX(-50%) translateY(0); opacity: 1; }
}
#matrix-pills .pill {
  pointer-events: auto;
  position: relative;
  width: 130px;
  height: 78px;
  background-image: url('../img/pastillas.png');
  background-size: 200% auto;
  background-repeat: no-repeat;
  background-color: transparent;
  background-position-y: center;
  border: 0;
  cursor: pointer;
  padding: 0;
  transition: transform 0.35s cubic-bezier(0.2, 0.9, 0.3, 1.15), filter 0.35s ease;
  /* Float idle independiente para cada pastilla, asíncrono */
  animation: pill-float-idle 5s ease-in-out infinite;
  will-change: transform, filter;
}
@keyframes pill-float-idle {
  0%, 100% { transform: translateY(0) rotate(-1.5deg); }
  50%      { transform: translateY(-6px) rotate(1.5deg); }
}
/* Las labels SÍ/NO ya están dentro de la imagen — el span del HTML se oculta visualmente */
#matrix-pills .pill .label {
  position: absolute;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

#matrix-pills .pill-red {
  background-position-x: left;
  filter: drop-shadow(0 12px 22px rgba(239, 68, 68, 0.45));
  animation-delay: 0s;
}
#matrix-pills .pill-blue {
  background-position-x: right;
  filter: drop-shadow(0 12px 22px rgba(59, 130, 246, 0.45));
  animation-delay: -2.5s;
}

/* Halo radial pulsante detrás de cada pastilla */
#matrix-pills .pill::after {
  content: '';
  position: absolute;
  inset: 6px 12px;
  border-radius: 50%;
  z-index: -1;
  opacity: 0.55;
  filter: blur(20px);
  animation: pill-halo 2.8s ease-in-out infinite;
  pointer-events: none;
}
#matrix-pills .pill-red::after  { background: radial-gradient(circle, rgba(239, 68, 68, 0.75) 0%, transparent 70%); }
#matrix-pills .pill-blue::after { background: radial-gradient(circle, rgba(59, 130, 246, 0.75) 0%, transparent 70%); }
@keyframes pill-halo {
  0%, 100% { opacity: 0.4; transform: scale(0.95); }
  50%      { opacity: 0.85; transform: scale(1.1); }
}

/* Hover: la pastilla se eleva, escala y gira ligeramente en 3D */
#matrix-pills .pill:hover, #matrix-pills .pill:focus-visible {
  animation: none;
}
#matrix-pills .pill-red:hover, #matrix-pills .pill-red:focus-visible {
  transform: translateY(-10px) scale(1.12) rotate(-3deg);
  filter: drop-shadow(0 22px 36px rgba(239, 68, 68, 0.85)) drop-shadow(0 0 24px rgba(239, 68, 68, 0.5)) brightness(1.08);
}
#matrix-pills .pill-blue:hover, #matrix-pills .pill-blue:focus-visible {
  transform: translateY(-10px) scale(1.12) rotate(3deg);
  filter: drop-shadow(0 22px 36px rgba(59, 130, 246, 0.85)) drop-shadow(0 0 24px rgba(59, 130, 246, 0.5)) brightness(1.08);
}
#matrix-pills .pill:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 8px;
  border-radius: 50px;
}

/* ============================================================
   ANIMACIONES AL PULSAR · personalidad propia para cada color
   Roja  → "tomar la pastilla": despertar, despegue, código matrix
   Azul  → "dejarla ir": flotar, desvanecer, hundirse en el bucle
   ============================================================ */

#matrix-pills .pill.taking {
  pointer-events: none;
  z-index: 10;
}

/* ---- ROJA: despertar / explosión vital ---- */
#matrix-pills .pill-red.taking {
  animation: pillTakenRed 1.15s cubic-bezier(0.34, 1.56, 0.46, 1) forwards;
}
@keyframes pillTakenRed {
  0% {
    transform: scale(1) rotate(0deg);
    filter: brightness(1) saturate(1) hue-rotate(0deg);
  }
  12% {
    transform: scale(1.45) rotate(-12deg) translateY(-8px);
    filter: brightness(1.7) saturate(1.6)
            drop-shadow(0 0 28px #ef4444)
            drop-shadow(0 0 14px #fff);
  }
  28% {
    transform: scale(1.85) rotate(8deg) translateY(-18px);
    filter: brightness(2.4) saturate(2)
            drop-shadow(0 0 60px #ffffff)
            drop-shadow(0 0 30px #ef4444);
  }
  46% {
    transform: scale(0.6) rotate(-18deg) translateY(0px);
    filter: brightness(2.2) saturate(1.5) hue-rotate(45deg)
            drop-shadow(0 0 50px #22c55e)
            blur(1px);
    opacity: 0.7;
  }
  68% {
    transform: scale(2.4) rotate(0deg) translateY(0);
    filter: brightness(0.8) saturate(0.5) hue-rotate(95deg) blur(8px);
    opacity: 0.15;
  }
  85% {
    transform: scale(0.7) rotate(0deg);
    filter: brightness(1.2) saturate(1) hue-rotate(0deg) blur(0);
    opacity: 0.95;
  }
  100% {
    transform: scale(1.05) rotate(0deg);
    filter: brightness(1) saturate(1);
    opacity: 1;
  }
}

/* ---- AZUL: caída calmada / disolución en el bucle ---- */
#matrix-pills .pill-blue.taking {
  animation: pillTakenBlue 1.4s cubic-bezier(0.55, 0.05, 0.5, 0.92) forwards;
}
@keyframes pillTakenBlue {
  0% {
    transform: scale(1) rotate(0deg) translateY(0);
    filter: brightness(1) blur(0) saturate(1);
    opacity: 1;
  }
  18% {
    transform: scale(1.18) rotate(-5deg) translateY(-14px);
    filter: brightness(1.35) saturate(1.4)
            drop-shadow(0 0 30px #3b82f6)
            drop-shadow(0 0 12px #93c5fd);
  }
  38% {
    transform: scale(0.95) rotate(15deg) translateY(8px);
    filter: brightness(1.1) saturate(1.2) blur(1px)
            drop-shadow(0 18px 30px rgba(59, 130, 246, 0.6));
  }
  62% {
    transform: scale(0.55) rotate(45deg) translateY(70px);
    filter: brightness(0.7) saturate(0.7) blur(4px);
    opacity: 0.5;
  }
  85% {
    transform: scale(0.2) rotate(80deg) translateY(160px);
    filter: brightness(0.4) blur(10px);
    opacity: 0;
  }
  100% {
    transform: scale(1) rotate(0deg) translateY(0);
    filter: brightness(1) blur(0) saturate(1);
    opacity: 1;
  }
}

/* ============================================================
   OVERLAY full-screen al pulsar pastilla
   Roja  → onda de despertar verde Matrix + flash + scanlines
   Azul  → gradiente azul + blur tipo "ojos cerrándose"
   ============================================================ */
.pill-fx {
  position: fixed;
  inset: 0;
  z-index: 850;
  pointer-events: none;
  overflow: hidden;
}

/* ---- Overlay ROJA ---- */
.pill-fx-red::before,
.pill-fx-red::after {
  content: "";
  position: absolute;
  inset: 0;
}
.pill-fx-red::before {
  /* Flash radial blanco que estalla y se expande */
  background:
    radial-gradient(circle at var(--fx-x, 50%) var(--fx-y, 88%),
      rgba(255, 255, 255, 0.85) 0%,
      rgba(239, 68, 68, 0.55) 12%,
      rgba(34, 197, 94, 0.35) 28%,
      transparent 55%);
  animation: pillFxRedFlash 1.0s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
}
.pill-fx-red::after {
  /* Scanlines verdes que recorren la pantalla */
  background: repeating-linear-gradient(
    0deg,
    transparent 0,
    transparent 3px,
    rgba(34, 197, 94, 0.18) 3px,
    rgba(34, 197, 94, 0.18) 4px
  );
  mix-blend-mode: screen;
  opacity: 0;
  animation: pillFxRedScan 1.0s linear forwards;
}
@keyframes pillFxRedFlash {
  0%   { opacity: 0; transform: scale(0.2); }
  18%  { opacity: 1; transform: scale(0.9); }
  60%  { opacity: 0.7; transform: scale(1.4); }
  100% { opacity: 0; transform: scale(2.2); }
}
@keyframes pillFxRedScan {
  0%   { opacity: 0; background-position: 0 -300px; }
  20%  { opacity: 0.9; }
  100% { opacity: 0; background-position: 0 600px; }
}

/* ---- Overlay AZUL ---- */
.pill-fx-blue::before,
.pill-fx-blue::after {
  content: "";
  position: absolute;
  inset: 0;
}
.pill-fx-blue::before {
  /* Ondas azules concéntricas que se expanden suavemente */
  background:
    radial-gradient(circle at var(--fx-x, 50%) var(--fx-y, 88%),
      rgba(59, 130, 246, 0.0) 0%,
      rgba(59, 130, 246, 0.4) 25%,
      rgba(30, 64, 175, 0.55) 55%,
      rgba(2, 6, 23, 0.65) 100%);
  animation: pillFxBlueWave 1.4s cubic-bezier(0.4, 0, 0.6, 1) forwards;
}
.pill-fx-blue::after {
  /* Vignette azul que cae como párpados cerrándose */
  background: linear-gradient(
    180deg,
    rgba(2, 6, 23, 0.85) 0%,
    rgba(30, 64, 175, 0.35) 30%,
    transparent 50%,
    rgba(30, 64, 175, 0.35) 70%,
    rgba(2, 6, 23, 0.85) 100%);
  opacity: 0;
  transform: scaleY(0);
  transform-origin: center;
  animation: pillFxBlueClose 1.4s cubic-bezier(0.7, 0, 0.85, 0.3) forwards;
}
@keyframes pillFxBlueWave {
  0%   { opacity: 0; transform: scale(0.3); filter: blur(0); }
  35%  { opacity: 0.85; transform: scale(1.1); filter: blur(2px); }
  70%  { opacity: 1; transform: scale(1.5); filter: blur(6px); }
  100% { opacity: 0; transform: scale(1.8); filter: blur(0); }
}
@keyframes pillFxBlueClose {
  0%   { opacity: 0; transform: scaleY(0); }
  40%  { opacity: 1; transform: scaleY(1); }
  75%  { opacity: 1; transform: scaleY(1.05); }
  100% { opacity: 0; transform: scaleY(1.05); }
}

/* Reduce motion */
@media (prefers-reduced-motion: reduce) {
  #matrix-pills .pill-red.taking,
  #matrix-pills .pill-blue.taking {
    animation: pillTakenReduced 0.4s ease-out forwards !important;
  }
  @keyframes pillTakenReduced {
    0%   { transform: scale(1); }
    50%  { transform: scale(1.1); opacity: 0.7; }
    100% { transform: scale(1); opacity: 1; }
  }
  .pill-fx { display: none !important; }
}

/* Tooltip que aparece al hover */
#matrix-pills .pill .tip {
  position: absolute;
  bottom: calc(100% + 6px);
  left: 50%;
  transform: translateX(-50%);
  background: #0a0a0a;
  color: #fff;
  font-family: 'Inter', sans-serif;
  font-size: 11.5px;
  font-weight: 500;
  letter-spacing: 0.2px;
  text-transform: none;
  padding: 7px 12px;
  border-radius: 8px;
  white-space: nowrap;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease, visibility 0.2s ease, transform 0.2s ease;
  pointer-events: none;
  text-shadow: none;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}
#matrix-pills .pill .tip::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border: 5px solid transparent;
  border-top-color: #0a0a0a;
}
#matrix-pills .pill:hover .tip,
#matrix-pills .pill:focus-visible .tip {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(-2px);
}

@media (max-width: 480px) {
  #matrix-pills { bottom: 14px; gap: 10px; }
  #matrix-pills .pill { width: 100px; height: 60px; }
}
@media (prefers-reduced-motion: reduce) {
  #matrix-pills, #matrix-pills .pill, #matrix-pills .pill::after { animation: none !important; }
  #matrix-pills .pill:hover { transform: scale(1.05) !important; }
}

/* ================= LEAD MAGNET BANNER ================= */
#guia {
  padding: 70px 0 50px;
  position: relative;
}
.guia-card {
  background: linear-gradient(135deg, #0a0a0a 0%, #1a2e1a 100%);
  border-radius: 24px;
  padding: 44px 44px;
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 40px;
  align-items: center;
  color: #fff;
  position: relative;
  overflow: hidden;
  box-shadow: 0 24px 60px rgba(0,0,0,0.15);
}
.guia-card::before {
  content: '';
  position: absolute;
  top: -40%;
  right: -10%;
  width: 340px;
  height: 340px;
  background: radial-gradient(circle, rgba(34,197,94,0.18) 0%, transparent 70%);
  pointer-events: none;
}
.guia-eyebrow {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  color: #86efac;
  letter-spacing: 3px;
  text-transform: uppercase;
  margin-bottom: 14px;
}
.guia-card h2 {
  font-size: 32px;
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin: 0 0 14px;
  color: #fff;
  font-family: inherit;
}
.guia-card h2 em { color: #86efac; font-style: normal; }
.guia-card .guia-desc {
  font-size: 15px;
  line-height: 1.55;
  color: rgba(255,255,255,0.78);
  margin-bottom: 18px;
}
.guia-features {
  list-style: none;
  padding: 0;
  margin: 0 0 6px;
  font-size: 13.5px;
  color: rgba(255,255,255,0.85);
}
.guia-features li {
  padding: 5px 0;
  display: flex;
  align-items: center;
  gap: 10px;
}
.guia-features li::before {
  content: '✓';
  color: #22c55e;
  font-weight: 700;
  font-size: 14px;
}
.guia-form {
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 16px;
  padding: 26px;
  backdrop-filter: blur(8px);
  position: relative;
}
.guia-form h3 {
  font-size: 16px;
  font-weight: 700;
  margin: 0 0 4px;
  color: #fff;
}
.guia-form .guia-form-sub {
  font-size: 13px;
  color: rgba(255,255,255,0.65);
  margin-bottom: 18px;
}
.guia-form .guia-field { margin-bottom: 12px; }
.guia-form label {
  display: block;
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  color: rgba(255,255,255,0.6);
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-bottom: 6px;
}
.guia-form input[type="text"],
.guia-form input[type="email"] {
  width: 100%;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.14);
  border-radius: 10px;
  color: #fff;
  padding: 12px 14px;
  font-size: 14.5px;
  font-family: inherit;
  outline: none;
  transition: border-color 0.2s;
}
.guia-form input[type="text"]::placeholder,
.guia-form input[type="email"]::placeholder { color: rgba(255,255,255,0.35); }
.guia-form input:focus { border-color: #22c55e; }
.guia-form .guia-consent {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  font-size: 12px;
  color: rgba(255,255,255,0.7);
  margin: 10px 0 16px;
  cursor: pointer;
  line-height: 1.45;
}
.guia-form .guia-consent input { margin-top: 2px; accent-color: #22c55e; flex-shrink: 0; }
.guia-form .guia-consent a { color: #86efac; }
.guia-form button {
  width: 100%;
  background: #22c55e;
  color: #0a0a0a;
  border: none;
  padding: 14px;
  border-radius: 10px;
  font-weight: 700;
  font-size: 15px;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.guia-form button:hover { background: #16a34a; transform: translateY(-1px); }
.guia-form button:disabled { opacity: 0.6; cursor: wait; transform: none; }
.guia-feedback {
  margin-top: 14px;
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  display: none;
}
.guia-feedback.show { display: block; }
.guia-feedback.ok { background: rgba(34,197,94,0.15); color: #86efac; border: 1px solid rgba(34,197,94,0.35); }
.guia-feedback.err { background: rgba(239,68,68,0.12); color: #fca5a5; border: 1px solid rgba(239,68,68,0.35); }
@media (max-width: 820px) {
  .guia-card { grid-template-columns: 1fr; padding: 32px 24px; gap: 28px; }
  .guia-card h2 { font-size: 26px; }
}

/* ================= CONSENT CHECKBOX ================= */
.form-consent { display: flex; flex-direction: column; gap: 4px; margin-top: 6px; }
.consent-label { display: flex; align-items: flex-start; gap: 10px; cursor: pointer; font-size: 13px; color: var(--fg-muted); line-height: 1.5; }
.consent-label input[type="checkbox"] { margin-top: 2px; width: 16px; height: 16px; accent-color: var(--accent); cursor: pointer; flex-shrink: 0; }
.consent-label span { flex: 1; }
.consent-label a { color: var(--accent); text-decoration: underline; text-underline-offset: 2px; }
.form-consent.error .consent-label { color: #e11d48; }

/* ================= COOKIE NOTICE ================= */
#cookie-notice {
  position: fixed;
  bottom: 18px;
  left: 18px;
  right: 18px;
  max-width: 520px;
  margin: 0 auto;
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 16px 18px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.18);
  z-index: 900;
  display: none;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  font-size: 13.5px;
  color: var(--fg);
  line-height: 1.5;
}
#cookie-notice.show { display: flex; }
#cookie-notice p { margin: 0; flex: 1; min-width: 220px; }
#cookie-notice a { color: var(--accent); text-decoration: underline; text-underline-offset: 2px; }
#cookie-notice .btn-accept {
  background: var(--accent);
  border: none;
  color: #fff;
  padding: 9px 18px;
  border-radius: 8px;
  font-weight: 700;
  font-size: 13px;
  cursor: pointer;
  flex-shrink: 0;
}
#cookie-notice .btn-accept:hover { filter: brightness(1.08); }
@media (max-width: 500px) {
  #cookie-notice { bottom: 10px; left: 10px; right: 10px; padding: 14px; }
}

/* ================= TESTIMONIOS / OPINIONES ================= */
#opiniones { padding-top: 40px; padding-bottom: 80px; overflow: hidden; }
.testi-marquee {
  position: relative;
  width: 100%;
  overflow: hidden;
  padding: 10px 0;
  -webkit-mask-image: linear-gradient(to right, transparent, #000 8%, #000 92%, transparent);
          mask-image: linear-gradient(to right, transparent, #000 8%, #000 92%, transparent);
}
.testi-marquee + .testi-marquee { margin-top: 20px; }
.testi-track {
  display: flex;
  gap: 18px;
  width: max-content;
  animation: testi-scroll-left 58s linear infinite;
}
.testi-track.reverse {
  animation: testi-scroll-right 58s linear infinite;
}
.testi-marquee:hover .testi-track { animation-play-state: paused; }
@keyframes testi-scroll-left {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}
@keyframes testi-scroll-right {
  from { transform: translateX(-50%); }
  to   { transform: translateX(0); }
}
@media (prefers-reduced-motion: reduce) {
  .testi-track { animation: none !important; }
}
.testi-card {
  flex: 0 0 auto;
  width: 340px;
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 20px 22px 22px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  box-shadow: 0 2px 6px rgba(10,10,10,0.04);
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}
.testi-card:hover {
  transform: translateY(-3px);
  border-color: var(--accent);
  box-shadow: 0 10px 28px rgba(10,10,10,0.08);
}
.testi-stars {
  color: #f5b301;
  font-size: 13px;
  letter-spacing: 2px;
  line-height: 1;
}
.testi-quote {
  font-size: 14.5px;
  line-height: 1.55;
  color: var(--fg);
  font-family: 'EB Garamond', Georgia, serif;
  font-style: italic;
}
.testi-quote::before { content: '"'; margin-right: 2px; }
.testi-quote::after  { content: '"'; margin-left: 2px; }
.testi-author-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: auto;
  padding-top: 10px;
  border-top: 1px solid var(--border);
}
.testi-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: #fff;
  font-weight: 700;
  font-size: 15px;
  letter-spacing: 0.5px;
  flex-shrink: 0;
}
.testi-name { font-size: 13.5px; font-weight: 600; color: var(--fg); line-height: 1.2; }
.testi-role { font-size: 11.5px; color: var(--fg-muted); font-family: var(--mono); margin-top: 3px; }
.testi-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 4px;
}
.testi-verified {
  font-size: 10px;
  color: #16a34a;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  letter-spacing: 0.3px;
}

