:root {
  --azul-comunidad: #203da5;
  --axis-color: var(--azul-comunidad);
  --azul-segura: #07164f;
  --azul-solidaria: #00405e;
  --amarillo-sin-barreras: #fbbe4b;
  --verde-sustentabilidad: #97b321;
  --azul-tu-red: #2d4193;
  --verde-saludable: #74c1b3;
  --naranja-inclusion: #eb6630;
  --morado-integracion: #7626ff;
  --morado-labsapp: #A133C0;
  --lab-primary: #A133C0;
  --lab-secondary: #55B8E9;
  --lab-dark: #0D083B;
  --lab-violet: #8C69D8;
  --lab-purple-deep: #6F2395;
  --lab-gradient: linear-gradient(135deg, #55B8E9 0%, #8C69D8 35%, #A133C0 65%, #6F2395 100%);
  --footer-angle: 12deg; /* fallback, se recalcula por JS */
}

html { scroll-behavior: smooth; }
[id] { scroll-margin-top: 1.5rem; }

/* ── Hero: fondo placeholder + fade-in suave ─────────────────── */
.hero-section {
  background-color: #0a1a3a;
}
.hero-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  opacity: 0;
  scale: 1.03;
  transition: opacity .8s ease-out, scale 1.2s ease-out;
}
.hero-bg.loaded {
  opacity: 1;
  scale: 1;
}

/* ── Dot animations ──────────────────────────────────────────── */
.dot-float {
  animation: dotFloat 4s ease-in-out infinite;
}
.dot-drift {
  animation: dotDrift 6s ease-in-out infinite;
}
.dot-glow {
  animation: dotGlow 3s ease-in-out infinite;
}
.dot-twinkle {
  animation: dotTwinkle 2.5s ease-in-out infinite;
}
.dot-orbit {
  animation: dotOrbit 5s linear infinite;
}

@keyframes dotFloat {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-18px); }
}
@keyframes dotDrift {
  0%, 100% { transform: translate(0, 0); }
  25%      { transform: translate(10px, -8px); }
  50%      { transform: translate(-6px, -16px); }
  75%      { transform: translate(-12px, -4px); }
}
@keyframes dotGlow {
  0%, 100% { opacity: .3; transform: scale(1); box-shadow: 0 0 0 rgba(255,191,0,0); }
  50%      { opacity: .9; transform: scale(1.6); box-shadow: 0 0 12px rgba(255,191,0,.5); }
}
@keyframes dotTwinkle {
  0%, 100% { opacity: .2; transform: scale(.7); }
  30%      { opacity: 1;  transform: scale(1.2); }
  60%      { opacity: .4; transform: scale(.9); }
}
@keyframes dotOrbit {
  0%   { transform: rotate(0deg)   translateX(30px) rotate(0deg); }
  100% { transform: rotate(360deg) translateX(30px) rotate(-360deg); }
}

/* ── Command Palette (Spotlight) ─────────────────────────────── */
.cmd-backdrop {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(0, 0, 0, 0);
  backdrop-filter: blur(0);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding-top: 12vh;
  pointer-events: none;
  transition: background .25s ease, backdrop-filter .25s ease;
}
.cmd-backdrop.active {
  background: rgba(0, 0, 0, .5);
  backdrop-filter: blur(10px);
  pointer-events: auto;
}
.cmd-modal {
  background: rgba(255,255,255,.92);
  backdrop-filter: blur(20px) saturate(1.6);
  border: 1px solid rgba(255,255,255,.6);
  border-radius: 14px;
  width: 92%;
  max-width: 560px;
  box-shadow: 0 25px 70px rgba(0,0,0,.3), 0 0 0 1px rgba(0,0,0,.06);
  overflow: hidden;
  transform: translateY(-16px) scale(.97);
  opacity: 0;
  transition: transform .25s cubic-bezier(.2,.9,.3,1), opacity .2s ease;
}
.cmd-backdrop.active .cmd-modal {
  transform: translateY(0) scale(1);
  opacity: 1;
}

/* Input row */
.cmd-input-row {
  display: flex;
  align-items: center;
  gap: .75rem;
  padding: .85rem 1.1rem;
  border-bottom: 1px solid rgba(0,0,0,.08);
}
.cmd-icon {
  width: 20px;
  height: 20px;
  color: #9ca3af;
  flex-shrink: 0;
}
.cmd-input-row input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  font-size: 1.05rem;
  color: #1f2937;
}
.cmd-input-row input::placeholder { color: #9ca3af; }
.cmd-kbd {
  font-size: .7rem;
  padding: 3px 8px;
  border-radius: 6px;
  background: rgba(0,0,0,.06);
  color: #6b7280;
  font-family: system-ui, sans-serif;
  white-space: nowrap;
  line-height: 1;
  border: 1px solid rgba(0,0,0,.08);
}

/* Results list */
.cmd-results {
  list-style: none;
  margin: 0;
  padding: 6px;
  max-height: 420px;
  overflow-y: auto;
}
.cmd-result {
  display: flex;
  align-items: center;
  gap: .75rem;
  padding: .6rem .85rem;
  border-radius: 10px;
  cursor: pointer;
  transition: background .12s ease;
}
.cmd-result.active {
  background: var(--axis-color);
}
.cmd-result-icon {
  width: 18px;
  height: 18px;
  color: #6b7280;
  flex-shrink: 0;
}
.cmd-result.active .cmd-result-icon { color: #fff; }
.cmd-result-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.cmd-result-title {
  font-size: .92rem;
  font-weight: 500;
  color: #1f2937;
  line-height: 1.3;
  display: flex;
  align-items: center;
  gap: .5rem;
  flex-wrap: wrap;
}
.cmd-result-title-text {
  display: inline;
}
.cmd-result.active .cmd-result-title { color: #fff; }
.cmd-result-desc {
  font-size: .75rem;
  color: #9ca3af;
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.cmd-result.active .cmd-result-desc { color: rgba(255,255,255,.7); }
.cmd-tag {
  display: inline-block;
  padding: 1px 8px;
  border-radius: 9999px;
  font-size: .6rem;
  font-weight: 600;
  letter-spacing: .03em;
  background: rgba(0,0,0,.06);
  color: #6b7280;
  white-space: nowrap;
  line-height: 1.6;
}
.cmd-result.active .cmd-tag {
  background: rgba(255,255,255,.2);
  color: rgba(255,255,255,.85);
}
.cmd-more {
  padding: .5rem .85rem;
  text-align: center;
  font-size: .72rem;
  color: #9ca3af;
  font-style: italic;
}
.cmd-match {
  color: var(--axis-color);
  font-weight: 600;
}
.cmd-result.active .cmd-match { color: #fbbf24; }
.cmd-ext {
  width: 14px;
  height: 14px;
  color: #9ca3af;
  margin-left: auto;
  flex-shrink: 0;
}
.cmd-result.active .cmd-ext { color: rgba(255,255,255,.6); }

/* Empty state */
.cmd-empty {
  padding: 2rem 1rem;
  text-align: center;
  color: #9ca3af;
  font-size: .9rem;
}

/* Footer hints */
.cmd-footer {
  display: flex;
  gap: 1.2rem;
  justify-content: center;
  padding: .55rem 1rem;
  border-top: 1px solid rgba(0,0,0,.06);
  font-size: .7rem;
  color: #9ca3af;
}
.cmd-footer kbd {
  font-size: .65rem;
  padding: 1px 5px;
  border-radius: 4px;
  background: rgba(0,0,0,.06);
  border: 1px solid rgba(0,0,0,.08);
  font-family: system-ui, sans-serif;
  margin-right: 2px;
}
.cmd-footer-tip {
  margin-left: auto;
  opacity: 0.7;
}
.cmd-footer-tip kbd {
  background: linear-gradient(135deg, var(--axis-color) 0%, color-mix(in srgb, var(--axis-color) 80%, #000) 100%);
  color: white;
  border-color: transparent;
}

/* ══ GoIA — Resultados IA dentro de cmd-results ══════════════ */
.cmd-goia-divider {
  list-style: none;
  padding: 8px 10px 2px;
}
.cmd-goia-divider__inner {
  display: flex;
  align-items: center;
  gap: 6px;
  padding-bottom: 4px;
  border-bottom: 1px solid rgba(32,61,165,.08);
}
.cmd-goia-divider__avatar {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  object-fit: cover;
}
.cmd-goia-divider__text {
  font-size: .68rem;
  font-weight: 700;
  background: linear-gradient(135deg, var(--axis-color), color-mix(in srgb, var(--axis-color) 60%, #4f46e5));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: .03em;
}

/* Loader dots */
.cmd-goia-loader {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-left: 4px;
}
.cmd-goia-loader__label {
  font-size: .65rem;
  font-weight: 500;
  color: #9ca3af;
  margin-right: 2px;
  animation: goiaFadeText 1.5s ease-in-out infinite;
}
@keyframes goiaFadeText {
  0%, 100% { opacity: .5; }
  50% { opacity: 1; }
}
.cmd-goia-loader__dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--axis-color);
  opacity: .3;
  animation: goiaDotPulse .8s ease-in-out infinite;
}
.cmd-goia-loader__dot:nth-child(2) { animation-delay: .16s; }
.cmd-goia-loader__dot:nth-child(3) { animation-delay: .32s; }
@keyframes goiaDotPulse {
  0%, 100% { opacity: .3; transform: scale(.8); }
  50% { opacity: 1; transform: scale(1.2); }
}

/* GoIA tag on results */
.cmd-tag--goia {
  background: linear-gradient(135deg, var(--axis-color), color-mix(in srgb, var(--axis-color) 60%, #4f46e5));
  color: #fff;
  font-size: .55rem;
  padding: 1px 7px;
}
.cmd-result.active .cmd-tag--goia {
  background: rgba(255,255,255,.25);
  color: #fff;
}

/* Skeleton shimmer for GoIA items */
.cmd-goia-skel {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: .6rem .85rem;
  list-style: none;
}
.cmd-goia-skel__line {
  height: 11px;
  border-radius: 6px;
  background: linear-gradient(90deg, #e5e7eb 25%, #f3f4f6 37%, #e5e7eb 63%);
  background-size: 400% 100%;
  animation: goiaSkelShimmer 1.4s ease infinite;
}
@keyframes goiaSkelShimmer {
  0%   { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

/* ── Pong: rebotan en diagonal por la pantalla ───────────────── */
.dot-pong-a { animation: pongA 8s  linear infinite; }
.dot-pong-b { animation: pongB 10s linear infinite; }
.dot-pong-c { animation: pongC 12s linear infinite; }
.dot-pong-d { animation: pongD 9s  linear infinite; }

@keyframes pongA {
  0%   { top: 5%;  left: 5%;  }
  25%  { top: 80%; left: 60%; }
  50%  { top: 15%; left: 90%; }
  75%  { top: 70%; left: 20%; }
  100% { top: 5%;  left: 5%;  }
}
@keyframes pongB {
  0%   { top: 90%; left: 85%; }
  25%  { top: 10%; left: 40%; }
  50%  { top: 75%; left: 5%;  }
  75%  { top: 20%; left: 70%; }
  100% { top: 90%; left: 85%; }
}
@keyframes pongC {
  0%   { top: 50%; left: 2%;  }
  20%  { top: 8%;  left: 35%; }
  40%  { top: 60%; left: 75%; }
  60%  { top: 85%; left: 45%; }
  80%  { top: 30%; left: 90%; }
  100% { top: 50%; left: 2%;  }
}
@keyframes pongD {
  0%   { top: 15%; left: 92%; }
  25%  { top: 70%; left: 50%; }
  50%  { top: 5%;  left: 15%; }
  75%  { top: 85%; left: 75%; }
  100% { top: 15%; left: 92%; }
}


/* ══════════════════════════════════════════════════════════════
   LAB SAPP — Premium tech portfolio styles
   ══════════════════════════════════════════════════════════════ */

/* ── Hero ──────────────────────────────────────────────────── */
.lab-hero {
  background: linear-gradient(160deg, #07051e 0%, #0a0826 40%, #050318 100%);
  position: relative;
}
.lab-hero__bg {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 80% 60% at 50% 40%, rgba(140,105,216,.18) 0%, transparent 70%),
              radial-gradient(ellipse 60% 50% at 20% 80%, rgba(85,184,233,.12) 0%, transparent 60%),
              radial-gradient(ellipse 50% 40% at 80% 20%, rgba(161,51,192,.14) 0%, transparent 50%);
  animation: labHeroPulse 8s ease-in-out infinite alternate;
}
@keyframes labHeroPulse {
  0%   { opacity: .5; transform: scale(1); }
  100% { opacity: .7; transform: scale(1.05); }
}
@media (min-width: 1024px) {
  .lab-hero__bg {
    background: radial-gradient(ellipse 80% 60% at 50% 40%, rgba(140,105,216,.14) 0%, transparent 70%),
                radial-gradient(ellipse 60% 50% at 20% 80%, rgba(85,184,233,.09) 0%, transparent 60%),
                radial-gradient(ellipse 50% 40% at 80% 20%, rgba(161,51,192,.10) 0%, transparent 50%);
  }
}
@media (min-width: 1440px) {
  .lab-hero__bg {
    background: radial-gradient(ellipse 80% 60% at 50% 40%, rgba(140,105,216,.10) 0%, transparent 70%),
                radial-gradient(ellipse 60% 50% at 20% 80%, rgba(85,184,233,.07) 0%, transparent 60%),
                radial-gradient(ellipse 50% 40% at 80% 20%, rgba(161,51,192,.08) 0%, transparent 50%);
  }
}

.lab-hero__grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(140,105,216,.09) 1px, transparent 1px),
    linear-gradient(90deg, rgba(140,105,216,.09) 1px, transparent 1px);
  background-size: 60px 60px;
  mask-image: radial-gradient(ellipse 70% 60% at 50% 50%, black 30%, transparent 80%);
  -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 50%, black 30%, transparent 80%);
}

/* Circuit SVG overlay */
.lab-hero__circuits {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  pointer-events: none;
}
.lab-circuit {
  stroke-dasharray: 8 4;
  opacity: .8;
}
.lab-circuit--1  { animation: labCircuitDash 12s linear infinite; }
.lab-circuit--2  { animation: labCircuitDash 15s linear infinite reverse; }
.lab-circuit--3  { animation: labCircuitDash 10s linear infinite; }
.lab-circuit--4  { animation: labCircuitDash 14s linear infinite reverse; }
.lab-circuit--5  { animation: labCircuitDash 18s linear infinite; }
.lab-circuit--6  { animation: labCircuitDash 16s linear infinite reverse; }
.lab-circuit--7  { animation: labCircuitDash 11s linear infinite; }
.lab-circuit--8  { animation: labCircuitDash 13s linear infinite reverse; }
.lab-circuit--9  { animation: labCircuitDash 9s  linear infinite; }
.lab-circuit--10 { animation: labCircuitDash 17s linear infinite reverse; }
.lab-circuit--11 { animation: labCircuitDash 14s linear infinite; }
.lab-circuit--12 { animation: labCircuitDash 12s linear infinite reverse; }
.lab-circuit--13 { animation: labCircuitDash 10s linear infinite; }
.lab-circuit--14 { animation: labCircuitDash 11s linear infinite reverse; }
.lab-circuit--15 { animation: labCircuitDash 13s linear infinite; }
.lab-circuit--16 { animation: labCircuitDash 15s linear infinite reverse; }
.lab-circuit--17 { animation: labCircuitDash 9s  linear infinite; }
.lab-circuit--18 { animation: labCircuitDash 11s linear infinite reverse; }
.lab-circuit--19 { animation: labCircuitDash 14s linear infinite; }
.lab-circuit--20 { animation: labCircuitDash 12s linear infinite reverse; }
.lab-circuit--21 { animation: labCircuitDash 10s linear infinite; }
.lab-circuit--22 { animation: labCircuitDash 16s linear infinite reverse; }
.lab-circuit--23 { animation: labCircuitDash 13s linear infinite; }
.lab-circuit--24 { animation: labCircuitDash 11s linear infinite reverse; }
.lab-circuit--25 { animation: labCircuitDash 15s linear infinite; }
.lab-circuit--26 { animation: labCircuitDash 9s  linear infinite reverse; }
.lab-circuit--27 { animation: labCircuitDash 17s linear infinite; }
.lab-circuit--28 { animation: labCircuitDash 12s linear infinite reverse; }
.lab-circuit--29 { animation: labCircuitDash 14s linear infinite; }
.lab-circuit--30 { animation: labCircuitDash 10s linear infinite reverse; }
.lab-circuit--31 { animation: labCircuitDash 8s  linear infinite; }
.lab-circuit--32 { animation: labCircuitDash 11s linear infinite reverse; }
.lab-circuit--33 { animation: labCircuitDash 13s linear infinite; }
.lab-circuit--34 { animation: labCircuitDash 9s  linear infinite reverse; }
.lab-circuit--35 { animation: labCircuitDash 7s  linear infinite; }
.lab-circuit--36 { animation: labCircuitDash 8s  linear infinite reverse; }
.lab-circuit--37 { animation: labCircuitDash 6s  linear infinite; }
.lab-circuit--38 { animation: labCircuitDash 7s  linear infinite reverse; }
.lab-circuit--39 { animation: labCircuitDash 8s  linear infinite; }
.lab-circuit--40 { animation: labCircuitDash 6s  linear infinite reverse; }

@keyframes labCircuitDash {
  0%   { stroke-dashoffset: 0; }
  100% { stroke-dashoffset: 120; }
}

/* Hero content */
/* ── Logo wrapper ── */
.lab-logo-wrap {
  position: relative;
  display: inline-block;
}
.lab-hero__logo {
  display: block;
}
/* ── Draw-on animation: paths trace then fill ── */
.lab-draw {
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
  fill-opacity: 0;
  stroke-linecap: round;
  stroke-linejoin: round;
  animation: labDraw 2.1s ease-out forwards, labFill .9s ease-out .7s forwards;
}
@keyframes labDraw {
  0%   { stroke-dashoffset: 1; }
  100% { stroke-dashoffset: 0; }
}
@keyframes labFill {
  0%   { fill-opacity: 0; }
  100% { fill-opacity: 1; }
}
/* ── After-draw fade-in for hero text ── */
.lab-afterDraw {
  opacity: 0;
  animation: labFadeUp .6s ease-out forwards;
  animation-delay: 0.7s;
}
@keyframes labFadeUp {
  0%   { opacity: 0; transform: translateY(12px); }
  100% { opacity: 1; transform: translateY(0); }
}
@media (prefers-reduced-motion: reduce) {
  .lab-draw { animation: none !important; fill-opacity: 1; stroke-dashoffset: 0; stroke: none !important; }
  .lab-afterDraw { animation: none !important; opacity: 1; transform: none; }
}

.lab-hero__title {
  display: flex;
  flex-direction: column;
  gap: .25rem;
  animation: labFadeUp .8s cubic-bezier(.16,1,.3,1) both;
  animation-delay: .5s;
}
.lab-hero__title-sub {
  font-size: .75rem;
  font-weight: 500;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: rgba(255,255,255,.5);
}
.lab-hero__title-main {
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 800;
  letter-spacing: -.02em;
  background: var(--lab-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.lab-hero__unam {
  -webkit-text-fill-color: rgba(255,255,255,.85);
  font-weight: 300;
}
.lab-hero__tagline {
  font-size: 1.05rem;
  color: rgba(255,255,255,.45);
  font-weight: 300;
  letter-spacing: .01em;
  line-height: 1.7;
  animation: labFadeUp .8s cubic-bezier(.16,1,.3,1) both;
  animation-delay: .7s;
}
.lab-hero__cta {
  display: inline-flex;
  align-items: center;
  padding: .65rem 2rem;
  border-radius: 999px;
  font-size: .8rem;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: #fff;
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.1);
  backdrop-filter: blur(10px);
  transition: all .3s ease;
  animation: labFadeUp .8s cubic-bezier(.16,1,.3,1) both;
  animation-delay: .9s;
}
.lab-hero__cta:hover {
  background: rgba(161,51,192,.2);
  border-color: rgba(161,51,192,.4);
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(161,51,192,.2);
}

@keyframes labFadeUp {
  0%   { opacity: 0; transform: translateY(20px); }
  100% { opacity: 1; transform: translateY(0); }
}

/* ── Sections ─────────────────────────────────────────────── */
.lab-section { position: relative; }
.lab-section--dark   { background: #07051e; color: #fff; }
.lab-section--darker { background: #050318; color: #fff; }
.lab-section--gradient {
  background: linear-gradient(135deg, #0a0628 0%, #120830 50%, #0a0628 100%);
  color: #fff;
}

/* Ambient glow blobs */
.lab-section__glow {
  position: absolute;
  width: 500px;
  height: 500px;
  border-radius: 50%;
  filter: blur(120px);
  opacity: .06;
  pointer-events: none;
}
@media (min-width: 1440px) {
  .lab-section__glow {
    opacity: .04;
  }
}
.lab-section__glow--left   { background: #55B8E9; top: -100px; left: -200px; }
.lab-section__glow--right  { background: #A133C0; top: 50%;   right: -200px; transform: translateY(-50%); }
.lab-section__glow--center { background: #8C69D8; top: 50%;   left: 50%; transform: translate(-50%, -50%); }

/* ── Badge ────────────────────────────────────────────────── */
.lab-badge {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  padding: .4rem 1rem;
  border-radius: 999px;
  font-size: .7rem;
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--lab-violet);
  background: rgba(140,105,216,.08);
  border: 1px solid rgba(140,105,216,.15);
}
.lab-badge--center { margin-left: auto; margin-right: auto; }

/* ── Headings ─────────────────────────────────────────────── */
.lab-heading {
  font-size: clamp(1.5rem, 3vw, 2.5rem);
  font-weight: 700;
  letter-spacing: -.02em;
  line-height: 1.2;
  color: #fff;
}
.lab-heading--center { text-align: center; }
.lab-heading__accent {
  background: var(--lab-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ── Glass card ───────────────────────────────────────────── */
.lab-card--glass {
  padding: 2rem;
  border-radius: 1rem;
  background: rgba(255,255,255,.03);
  border: 1px solid rgba(255,255,255,.06);
  backdrop-filter: blur(10px);
  transition: border-color .3s, transform .3s, box-shadow .3s;
}
.lab-card--glass:hover {
  border-color: rgba(140,105,216,.2);
  transform: translateY(-4px);
  box-shadow: 0 20px 50px rgba(0,0,0,.3);
}

/* ── Project cards ────────────────────────────────────────── */
.lab-project {
  margin-bottom: 2rem;
  border-radius: 1.25rem;
  background: rgba(255,255,255,.02);
  border: 1px solid rgba(255,255,255,.06);
  overflow: hidden;
  transition: border-color .3s, transform .3s, box-shadow .3s;
}
.lab-project:hover {
  border-color: rgba(140,105,216,.2);
  transform: translateY(-3px);
  box-shadow: 0 20px 60px rgba(0,0,0,.3), 0 0 0 1px rgba(140,105,216,.1);
}

.lab-project__header {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  padding: 1.5rem 2rem;
  border-bottom: 1px solid rgba(255,255,255,.04);
  flex-wrap: wrap;
}
.lab-project__icon {
  width: 56px;
  height: 56px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  flex-shrink: 0;
}
.lab-project__icon--goia     { background: linear-gradient(135deg, #55B8E9, #8C69D8); }
.lab-project__icon--ema      { background: linear-gradient(135deg, #8C69D8, #A133C0); }
.lab-project__icon--sismo    { background: linear-gradient(135deg, #A44ED3, #6F2395); }
.lab-project__icon--migrante { background: linear-gradient(135deg, #6E99E7, #55B8E9); }
.lab-project__icon--blue     { background: linear-gradient(135deg, #55B8E9, #8C69D8); }
.lab-project__icon--violet   { background: linear-gradient(135deg, #8C69D8, #A133C0); }
.lab-project__icon--purple   { background: linear-gradient(135deg, #A133C0, #6F2395); }
.lab-project__icon--pink     { background: linear-gradient(135deg, #c06ff0, #A133C0); }
.lab-project__icon--teal     { background: linear-gradient(135deg, #55B8E9, #6E99E7); }

.lab-project__name {
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -.01em;
  color: #fff;
}
.lab-project__subtitle {
  font-size: .8rem;
  color: rgba(255,255,255,.4);
  font-weight: 400;
}

.lab-project__stat {
  margin-left: auto;
  text-align: right;
  display: flex;
  flex-direction: column;
}
.lab-project__stat-number {
  font-size: 1.75rem;
  font-weight: 800;
  letter-spacing: -.02em;
  background: var(--lab-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1;
}
.lab-project__stat-number--text {
  font-size: 1.1rem;
  font-weight: 700;
}
.lab-project__stat-label {
  font-size: .65rem;
  color: rgba(255,255,255,.35);
  text-transform: uppercase;
  letter-spacing: .08em;
  font-weight: 500;
  margin-top: .2rem;
}

.lab-project__body {
  padding: 1.5rem 2rem 2rem;
}
.lab-project__body p {
  color: rgba(255,255,255,.55);
  font-size: .95rem;
  line-height: 1.7;
}
.lab-project__body p strong {
  color: rgba(255,255,255,.85);
}
.lab-project__tags {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  margin-top: 1.25rem;
}
.lab-tag {
  padding: .25rem .75rem;
  border-radius: 999px;
  font-size: .65rem;
  font-weight: 600;
  letter-spacing: .04em;
  color: rgba(255,255,255,.5);
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(255,255,255,.06);
}

/* ── Project group dividers ───────────────────────────────── */
.lab-project-group {
  margin-top: 3.5rem;
  margin-bottom: 1.5rem;
}
.lab-project-group:first-child { margin-top: 0; }
.lab-project-group__label {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  padding: .4rem 1rem .4rem .75rem;
  border-radius: 999px;
  font-size: .7rem;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: rgba(255,255,255,.5);
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(255,255,255,.08);
}
.lab-project-group__label svg {
  opacity: .5;
}

/* ── Breakdown bars (Mi Salud) ────────────────────────────── */
.lab-project__breakdown {
  margin-top: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: .6rem;
}
.lab-breakdown__item {
  display: grid;
  grid-template-columns: 110px 1fr auto;
  align-items: center;
  gap: .75rem;
}
.lab-breakdown__label {
  font-size: .75rem;
  color: rgba(255,255,255,.45);
  font-weight: 500;
}
.lab-breakdown__track {
  height: 6px;
  border-radius: 999px;
  background: rgba(255,255,255,.05);
  overflow: hidden;
}
.lab-breakdown__bar {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: var(--lab-gradient);
  min-width: 4px;
}
.lab-breakdown__value {
  font-size: .75rem;
  color: rgba(255,255,255,.6);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.lab-breakdown__value small {
  color: rgba(255,255,255,.3);
  font-weight: 400;
}

/* ── Sub-platform list (Autogestivas) ─────────────────────── */
.lab-project__subplatforms {
  margin-top: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: .6rem;
}
.lab-subplatform {
  display: flex;
  align-items: center;
  gap: .75rem;
  padding: .6rem 1rem;
  border-radius: .75rem;
  background: rgba(255,255,255,.03);
  border: 1px solid rgba(255,255,255,.05);
}
.lab-subplatform__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}
.lab-subplatform__name {
  font-size: .85rem;
  color: rgba(255,255,255,.7);
  font-weight: 500;
  flex: 1;
}
.lab-subplatform__count {
  font-size: .75rem;
  color: rgba(255,255,255,.4);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

/* ── Stats banner ─────────────────────────────────────────── */
.lab-stat-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  text-align: center;
  gap: .25rem;
  min-width: 100px;
}
.lab-stat-card__number {
  font-size: clamp(1.75rem, 4vw, 2.75rem);
  font-weight: 800;
  letter-spacing: -.03em;
  background: var(--lab-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1;
}
.lab-stat-card__number--text {
  font-size: clamp(1.5rem, 3vw, 2.25rem);
}
.lab-stat-card__label {
  font-size: .7rem;
  color: rgba(255,255,255,.4);
  text-transform: uppercase;
  letter-spacing: .1em;
  font-weight: 500;
}

/* ── Stack cards ──────────────────────────────────────────── */
.lab-stack-card {
  padding: 1.5rem;
  border-radius: 1rem;
  background: rgba(255,255,255,.02);
  border: 1px solid rgba(255,255,255,.05);
  transition: border-color .3s, transform .3s, box-shadow .3s;
  text-align: center;
}
.lab-stack-card:hover {
  border-color: rgba(140,105,216,.2);
  transform: translateY(-4px);
  box-shadow: 0 15px 40px rgba(0,0,0,.3);
}

/* ── Mobile responsive ────────────────────────────────────── */
@media (max-width: 768px) {
  .lab-project__header {
    flex-direction: column;
    align-items: flex-start;
    gap: .75rem;
  }
  .lab-project__stat {
    margin-left: 0;
    text-align: left;
    flex-direction: row;
    align-items: baseline;
    gap: .5rem;
  }
  .lab-project__body { padding: 1.25rem 1.5rem 1.5rem; }
  .lab-hero__title-sub { font-size: .65rem; }
  .lab-breakdown__item {
    grid-template-columns: 90px 1fr auto;
    gap: .5rem;
  }
  .lab-breakdown__label { font-size: .65rem; }
  .lab-breakdown__value { font-size: .65rem; }
}

@media (prefers-reduced-motion: reduce) {
  .lab-p,
  .lab-hero__bg,
  .lab-hero__logo { animation: none !important; }
  .lab-draw { animation: none !important; fill-opacity: 1; stroke-dashoffset: 0; stroke: none !important; }
}

