/* ============================================================
   TRIONI — shared.css
   ============================================================ */

/* ── PAGE LOADER ──────────────────────────────────────────── */
#page-loader {
  position: fixed;
  inset: 0;
  background: #070b12;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1100;
  transition: opacity 0.5s ease;
}
#page-loader.hidden {
  opacity: 0;
  pointer-events: none;
}
.loader-logo {
  color: var(--cyan);
  width: clamp(160px, 30vw, 280px);
  animation: loaderPulse 1.4s ease-in-out infinite;
  filter: drop-shadow(0 0 18px rgba(0,212,255,0.4));
}
@keyframes loaderPulse {
  0%, 100% { opacity: 1; filter: drop-shadow(0 0 18px rgba(0,212,255,0.4)); }
  50%       { opacity: 0.5; filter: drop-shadow(0 0 6px rgba(0,212,255,0.15)); }
}

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

:root {
  --cyan:      #00d4ff;
  --cyan-dim:  rgba(0, 212, 255, 0.15);
  --cyan-glow: rgba(0, 212, 255, 0.40);
  --bg:        #070b12;
  --bg2:       #0d1320;
  --bg3:       #111827;
  --text:      #f0f4ff;
  --muted:     #8892a4;
  --border:    rgba(255, 255, 255, 0.07);
  --card:      rgba(255, 255, 255, 0.04);

  /* Escala de radios. La cápsula significa "esto flota, no está en la
     grilla": navbar, botón de WhatsApp, controles de la galería. Todo
     lo que vive en el flujo de la página usa la escala corta. */
  --r-pill: 999px;
  --r-lg:    14px;   /* cards y cajas grandes */
  --r-md:    10px;   /* botones, inputs, miniaturas */
  --r-sm:     6px;   /* chips, badges, etiquetas */

  /* Escala z-index semántica: nada de 999 / 9999 sueltos */
  --z-base:          1;
  --z-sticky:      100;
  --z-progress:    200;
  --z-overlay:     499;
  --z-drawer:      500;
  --z-float:       600;
  --z-trail:       700;
  --z-skip:       1000;
  --z-loader:     1100;
}

html { scroll-behavior: smooth; }

/* ── TIPOGRAFÍA ──────────────────────────────────────────────
   Space Grotesk sigue siendo la voz de cuerpo e interfaz.
   Archivo entra sólo en los titulares grandes, en su eje ancho:
   el contraste es de ANCHO, no de estilo, así que no arrastra
   al sitio hacia el carril editorial.                         */
.hero-title,
.page-header h1,
.section-title,
.cta-box h2 {
  font-family: 'Archivo', 'Space Grotesk', sans-serif;
  font-stretch: 118%;
  font-weight: 700;
  text-wrap: balance;
}
.hero-title { letter-spacing: -.035em; }
.section-title, .page-header h1 { letter-spacing: -.02em; }

/* Prosa larga: menos huérfanas y medida de lectura acotada */
.section-sub, .quienes-text p, .case-body > p,
.valor-card p, .service-card p, .signal p { text-wrap: pretty; }
.quienes-text p, .case-body > p { max-width: 68ch; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Space Grotesk', sans-serif;
  overflow-x: hidden;
}

/* ── FOCO VISIBLE ────────────────────────────────────────────
   Un único anillo para todo el sitio. Antes sólo sobrevivía el
   outline por defecto del navegador, poco visible sobre #070b12. */
:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 3px;
  border-radius: var(--r-sm);
}
.btn-primary:focus-visible,
.nav-cta:focus-visible,
.btn-submit:focus-visible,
.mobile-cta:focus-visible { outline-offset: 4px; }

/* ── SALTAR AL CONTENIDO ─────────────────────────────────── */
.skip-link {
  position: fixed; top: .75rem; left: .75rem; z-index: var(--z-skip);
  padding: .7rem 1.2rem; border-radius: var(--r-md);
  background: var(--cyan); color: #000;
  font-size: .85rem; font-weight: 700; letter-spacing: .05em;
  text-decoration: none;
  transform: translateY(calc(-100% - 1.5rem));
  transition: transform .2s cubic-bezier(.25,1,.5,1);
}
.skip-link:focus-visible { transform: translateY(0); }

/* ── STARS ───────────────────────────────────────────────── */
#stars { position: fixed; inset: 0; z-index: 0; pointer-events: none; }

/* Estela del puntero: va por encima de todo el contenido, así no la tapan
   las secciones de fondo opaco. Con screen sólo aclara, nunca ensucia. */
#trail {
  position: fixed; inset: 0; z-index: var(--z-trail);
  pointer-events: none; mix-blend-mode: screen;
}

/* ── SCROLL PROGRESS ─────────────────────────────────────── */
/* Se anima con scaleX, no con width: width dispara layout en cada frame */
.scroll-progress {
  position: fixed; top: 0; left: 0; right: 0; height: 2px;
  background: var(--cyan); z-index: var(--z-progress);
  transform: scaleX(0); transform-origin: 0 50%;
  will-change: transform;
}

/* ── NAV FLOTANTE (píldora) ──────────────────────────────────
   Barra despegada de los bordes, en cápsula, con la marca en un
   disco de acento a la izquierda y la página actual marcada como
   píldora contorneada. Scopeado por id: un <nav> secundario
   (ej. el mapa de la 404) no debe volverse fijo.               */
nav#nav {
  position: fixed; top: .9rem; left: 50%; z-index: var(--z-sticky);
  width: fit-content; max-width: calc(100% - 1.8rem);
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: .4rem .45rem;
  border-radius: var(--r-pill);
  background: rgba(11,16,27,0.72);
  backdrop-filter: blur(20px) saturate(140%);
  border: 1px solid var(--border);
  box-shadow: 0 10px 40px rgba(0,0,0,0.45);
  /* Se mueve con transform, no con top: así no dispara layout por frame */
  transform: translateX(-50%);
  transition: transform .3s cubic-bezier(.25,1,.5,1), background .3s, box-shadow .3s, border-color .3s;
}
nav#nav.scrolled {
  transform: translateX(-50%) translateY(-.25rem);
  background: rgba(11,16,27,0.9);
  border-color: rgba(255,255,255,0.1);
  box-shadow: 0 14px 50px rgba(0,0,0,0.6);
}

/* Marca: arriba de todo se lee TRIONI completo; al scrollear la cápsula
   se encoge y el logotipo cede el lugar al monograma TR (logo-tr, la
   marca sola: nada de disco de fondo, que sería reproducir el favicon).
   Los dos SVG comparten la misma celda de grid y se cruzan por opacidad. */
.nav-logo {
  position: relative; overflow: hidden;
  width: 96px; height: 44px; min-height: 44px; flex-shrink: 0;
  display: grid; place-items: center; text-decoration: none;
  transition: width .38s cubic-bezier(.25,1,.5,1);
}
.nav-logo .logo-full,
.nav-logo .logo-mark {
  grid-area: 1 / 1; width: auto; display: block;
  transition: opacity .26s ease, transform .38s cubic-bezier(.25,1,.5,1), color .2s;
}
.nav-logo .logo-full { height: 20px; color: var(--text); }
.nav-logo .logo-mark { height: 21px; color: var(--text); opacity: 0; transform: scale(.6); }
.nav-logo:hover .logo-full,
.nav-logo:hover .logo-mark { color: var(--cyan); }

/* Estado con scroll: sólo el monograma */
nav#nav.scrolled .nav-logo { width: 44px; }
nav#nav.scrolled .nav-logo .logo-full { opacity: 0; transform: scale(.6); }
nav#nav.scrolled .nav-logo .logo-mark { opacity: 1; transform: scale(1); }

.footer-logo { margin-bottom: .8rem; }
.footer-logo .logo-mark { height: 32px; width: auto; display: block; color: var(--cyan); }

/* En el panel mobile la marca vuelve a ser el logotipo completo */
.mobile-menu-header .nav-logo {
  width: auto; height: auto; background: none; border-radius: 0;
  display: flex; align-items: center; overflow: visible;
}
.mobile-menu-header .nav-logo:hover { transform: none; box-shadow: none; }
.mobile-menu-header .nav-logo .logo-full { height: 20px; color: var(--text); }

.nav-links { display: flex; align-items: center; gap: .15rem; list-style: none; }
.nav-links a {
  display: block; padding: .58rem 1.05rem;
  border: 1px solid transparent; border-radius: var(--r-pill);
  color: var(--muted); text-decoration: none;
  font-size: .84rem; font-weight: 500; letter-spacing: .01em;
  white-space: nowrap;
  transition: color .2s, background .2s, border-color .2s;
}
.nav-links a:hover { color: var(--text); background: rgba(255,255,255,0.055); }
.nav-links a.active {
  color: var(--cyan);
  border-color: var(--cyan);
  background: rgba(0,212,255,0.07);
}

.nav-cta {
  flex-shrink: 0;
  padding: .62rem 1.3rem; background: var(--cyan); color: #000;
  border: none; border-radius: var(--r-pill); font-weight: 700;
  font-family: 'Space Grotesk', sans-serif; font-size: .78rem;
  letter-spacing: .04em; white-space: nowrap;
  text-decoration: none; transition: background .2s, transform .15s, box-shadow .2s;
}
.nav-cta:hover { background: #33ddff; box-shadow: 0 0 20px var(--cyan-glow); transform: translateY(-1px); }

/* ── BUTTONS ─────────────────────────────────────────────── */
.btn-primary {
  display: inline-block; padding: .85rem 2rem;
  background: var(--cyan); color: #000; border: none; border-radius: var(--r-md);
  font-weight: 700; font-family: 'Space Grotesk', sans-serif;
  font-size: .9rem; letter-spacing: .06em; text-transform: uppercase; text-decoration: none;
  transition: background .2s, transform .15s, box-shadow .2s;
}
.btn-primary:hover { background: #33ddff; box-shadow: 0 0 30px var(--cyan-glow); transform: translateY(-2px); }

.btn-ghost {
  display: inline-block; padding: .85rem 2rem;
  background: transparent; color: var(--text);
  border: 1px solid var(--border); border-radius: var(--r-md);
  font-weight: 600; font-family: 'Space Grotesk', sans-serif;
  font-size: .9rem; letter-spacing: .04em; text-decoration: none;
  transition: border-color .2s, color .2s;
}
.btn-ghost:hover { border-color: var(--cyan); color: var(--cyan); }

/* ── SECTION COMMONS ─────────────────────────────────────── */
section { position: relative; z-index: var(--z-base); padding: 7rem 2rem; }
.container { max-width: 1100px; margin: 0 auto; }
.section-alt { background: var(--bg2); }
.accent { color: var(--cyan); }

.section-tag {
  font-size: .7rem; font-weight: 600; letter-spacing: .2em; text-transform: uppercase;
  color: var(--cyan); margin-bottom: 1rem;
  display: flex; align-items: center; gap: .7rem;
}
.section-tag::before, .section-tag::after { content: ''; flex: 0 0 30px; height: 1px; background: var(--cyan); }

.section-title { font-size: clamp(1.8rem, 4vw, 3rem); font-weight: 700; letter-spacing: -.02em; margin-bottom: 1rem; }
.section-title .accent { color: var(--cyan); }
.section-sub { color: var(--muted); font-size: 1.05rem; line-height: 1.7; max-width: 540px; }

/* ── PAGE HEADER ─────────────────────────────────────────── */
.page-header {
  position: relative; z-index: 1;
  padding: 10rem 2rem 5rem; text-align: center;
  background: radial-gradient(ellipse 70% 50% at 50% 0%, rgba(0,212,255,0.07), transparent);
}
.page-tag {
  font-size: .7rem; font-weight: 600; letter-spacing: .2em; text-transform: uppercase;
  color: var(--cyan); margin-bottom: 1rem;
  display: flex; align-items: center; justify-content: center; gap: .7rem;
}
.page-tag::before, .page-tag::after { content: ''; flex: 0 0 30px; height: 1px; background: var(--cyan); }
.page-header h1 { font-size: clamp(2rem, 5vw, 3.5rem); font-weight: 700; letter-spacing: -.02em; margin-bottom: 1rem; }
.page-header h1 span { color: var(--cyan); }
.page-header p { color: var(--muted); font-size: 1.05rem; line-height: 1.7; max-width: 520px; margin: 0 auto; }

/* ── FOOTER ──────────────────────────────────────────────── */
footer { background: var(--bg2); border-top: 1px solid var(--border); padding: 4rem 2rem 2rem; z-index: 1; position: relative; }
.footer-grid {
  max-width: 1100px; margin: 0 auto;
  display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 3rem;
  padding-bottom: 3rem; border-bottom: 1px solid var(--border);
}
.footer-brand p { color: var(--muted); font-size: .85rem; line-height: 1.7; margin: .8rem 0 1.2rem; }
.footer-logo { font-size: 1.4rem; font-weight: 700; margin-bottom: .2rem; }
.footer-location { color: var(--muted); font-size: .85rem; display: block; margin-top: .2rem; }
.footer-col h2 { font-size: .72rem; font-weight: 700; letter-spacing: .15em; text-transform: uppercase; color: var(--muted); margin-bottom: 1rem; }
.footer-col a { display: flex; align-items: center; min-height: 44px; color: var(--muted); text-decoration: none; font-size: .88rem; transition: color .2s; }
.footer-col a:hover { color: var(--cyan); }
.footer-social-btn {
  color: var(--muted); font-size: .8rem; text-decoration: none;
  border: 1px solid var(--border); padding: 0 1rem; border-radius: var(--r-sm);
  min-height: 44px; display: inline-flex; align-items: center;
  transition: border-color .2s, color .2s; margin-right: .5rem;
}
.footer-social-btn:hover { border-color: var(--cyan); color: var(--cyan); }
.footer-bottom {
  max-width: 1100px; margin: 0 auto;
  display: flex; justify-content: space-between; align-items: center;
  padding-top: 1.5rem; font-size: .8rem; color: var(--muted);
}

/* ── WHATSAPP FLOAT ──────────────────────────────────────── */
#wa {
  position: fixed; bottom: 2rem; right: 2rem; z-index: var(--z-float);
  width: 56px; height: 56px; background: #25d366; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 20px rgba(37,211,102,.4);
  text-decoration: none;
  transition: transform .25s, box-shadow .25s;
  animation: waPulse 2.5s ease-in-out infinite;
}
#wa:hover { transform: scale(1.12); box-shadow: 0 6px 30px rgba(37,211,102,.6); }
#wa svg { width: 30px; height: 30px; fill: white; }
@keyframes waPulse {
  0%,100% { box-shadow: 0 4px 20px rgba(37,211,102,.4); }
  50%      { box-shadow: 0 4px 35px rgba(37,211,102,.7); }
}

/* ── REVEAL ON SCROLL ────────────────────────────────────── */
.reveal { opacity: 0; transform: translateY(30px); transition: opacity .7s, transform .7s; }
.reveal.visible { opacity: 1; transform: translateY(0); }
.reveal-delay-1 { transition-delay: .1s; }
.reveal-delay-2 { transition-delay: .2s; }
.reveal-delay-3 { transition-delay: .3s; }

/* ── LEGAL ───────────────────────────────────────────────── */
.legal-body { max-width: 760px; margin: 0 auto; padding: 10rem 2rem 5rem; }
.legal-section { margin-bottom: 2.5rem; }
.legal-section h2 { font-size: 1.2rem; font-weight: 700; color: var(--cyan); margin-bottom: 1rem; padding-left: .8rem; border-left: 2px solid var(--cyan); }
.legal-section p { color: var(--muted); font-size: .95rem; line-height: 1.8; margin-bottom: .8rem; }
.legal-section ul { color: var(--muted); font-size: .95rem; line-height: 1.8; padding-left: 1.5rem; margin-bottom: .8rem; }
.legal-section ul li { margin-bottom: .4rem; }
.legal-section a { color: var(--cyan); text-decoration: none; }
.legal-section a:hover { text-decoration: underline; }
.legal-section strong { color: var(--text); }

/* ── FAQ ─────────────────────────────────────────────────── */
.faq-wrap { margin-top: 3rem; }
.faq-list { max-width: 760px; }
.faq-item { border-bottom: 1px solid var(--border); overflow: hidden; }
.faq-q {
  width: 100%; background: none; border: none; color: var(--text);
  font-family: 'Space Grotesk', sans-serif; font-size: 1rem; font-weight: 600;
  text-align: left; padding: 1.4rem 0;
  display: flex; justify-content: space-between; align-items: center; gap: 1rem;
}
.faq-num { color: var(--cyan); font-size: .75rem; min-width: 24px; }
.faq-icon { width: 28px; height: 28px; border-radius: 50%; border: 1px solid var(--border); flex-shrink: 0; display: flex; align-items: center; justify-content: center; font-size: 1.1rem; color: var(--cyan); transition: transform .3s, background .2s; }
.faq-item.open .faq-icon { transform: rotate(45deg); background: var(--cyan-dim); }
/* Acordeón con grid-template-rows: crece exactamente lo que mide el
   contenido, sin un max-height mágico que recorte si el texto crece.
   El padding va en el div interno y no se transiciona. */
.faq-a { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .45s cubic-bezier(.25,1,.5,1); color: var(--muted); font-size: .9rem; line-height: 1.75; }
.faq-a > div { overflow: hidden; }
.faq-item.open .faq-a { grid-template-rows: 1fr; }
.faq-item.open .faq-a > div { padding-bottom: 1.5rem; }
.faq-cta { margin-top: 2.5rem; max-width: 760px; padding: 2rem; border: 1px solid var(--border); border-radius: var(--r-md); background: var(--card); display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; }
.faq-cta p { color: var(--muted); font-size: .9rem; }
.faq-cta strong { color: var(--text); }

/* ════════════════════════════════════════════════════════════
   INDEX
   ════════════════════════════════════════════════════════════ */
#hero {
  position: relative; min-height: 100vh;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; padding: 7rem 2rem 4rem; z-index: 1;
  background: radial-gradient(ellipse 80% 60% at 50% 10%, rgba(0,212,255,0.06), transparent 70%);
}
.hero-tag { display: inline-block; font-size: .72rem; font-weight: 600; letter-spacing: .2em; text-transform: uppercase; color: var(--cyan); border: 1px solid var(--cyan-dim); padding: .35rem 1rem; border-radius: var(--r-sm); margin-bottom: 2rem; }
.hero-title { font-size: clamp(2.5rem, 7.4vw, 6rem); font-weight: 700; line-height: 1.02; margin-bottom: 1.5rem; }

.word-anim {
  display: inline-block;
  opacity: 0;
  filter: blur(10px);
  animation: wordReveal 0.6s ease forwards;
  /* 0.3s por palabra: con 5 palabras la entrada dura lo mismo que antes con 4 */
  animation-delay: calc(0.2s + var(--i) * 0.3s);
  transition: transform 0.2s ease;
  cursor: default;
}
.word-anim:hover { transform: scale(1.1); }

@keyframes wordReveal {
  to { opacity: 1; filter: blur(0); }
}
.hero-sub { font-size: clamp(.95rem, 2vw, 1.15rem); color: var(--muted); max-width: 460px; line-height: 1.7; margin-bottom: 2.5rem; }
.hero-btns { display: flex; gap: 1rem; flex-wrap: wrap; justify-content: center; }

.stats-row { display: flex; border: 1px solid var(--border); border-radius: var(--r-md); overflow: hidden; margin-top: 4rem; background: var(--card); }
.stat { flex: 1; padding: 1.2rem 2.5rem; text-align: center; border-right: 1px solid var(--border); }
.stat:last-child { border-right: none; }
.stat-n { font-size: 2rem; font-weight: 700; color: var(--cyan); }
.stat-l { font-size: .7rem; letter-spacing: .15em; text-transform: uppercase; color: var(--muted); margin-top: .3rem; }

.services-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 1.5px; margin-top: 4rem; border: 1.5px solid var(--border); border-radius: var(--r-lg); overflow: hidden; }
.service-card { background: var(--card); padding: 2.5rem 2rem; position: relative; overflow: hidden; transition: background .3s; }
.service-card::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 2px; background: var(--cyan); transform: scaleX(0); transition: transform .4s; transform-origin: left; }
.service-card:hover { background: rgba(0,212,255,0.06); }
.service-card:hover::before { transform: scaleX(1); }
/* ── ICONOS ──────────────────────────────────────────────────
   Set propio de trazo, en lugar de emoji. Los emoji se renderizan
   distinto en cada sistema operativo, no heredan el color de la
   marca y son la firma visual más delatora de una plantilla.   */
.ico {
  width: 28px; height: 28px; display: block;
  color: var(--cyan); stroke: currentColor;
  stroke-width: 1.5; fill: none;
  stroke-linecap: round; stroke-linejoin: round;
  margin-bottom: 1.1rem;
  transition: color .3s, transform .3s;
}
.ico-sm { width: 22px; height: 22px; margin-bottom: 0; }
.ico-inline { width: 15px; height: 15px; margin: 0 .1rem 0 0; display: inline-block; vertical-align: -2px; color: var(--muted); }
.response-badge .ico-inline { color: var(--cyan); vertical-align: -3px; width: 17px; height: 17px; }
.service-card:hover .ico,
.valor-card:hover .ico,
.pq-card:hover .ico,
.bento-cell:hover .ico { transform: translateY(-2px); }

.service-icon { display: flex; margin-bottom: 1.2rem; }
.service-card h3 { font-size: 1.2rem; font-weight: 700; margin-bottom: .8rem; }
.service-card p { color: var(--muted); font-size: .9rem; line-height: 1.7; }
.service-badge { display: inline-block; margin-top: 1.2rem; font-size: .68rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--cyan); border: 1px solid var(--cyan-dim); padding: .3rem .8rem; border-radius: var(--r-sm); }

.bento { display: grid; grid-template-columns: 2fr 1fr; gap: 1.5px; margin-top: 4rem; border: 1.5px solid var(--border); border-radius: var(--r-lg); overflow: hidden; }
.bento-cell { background: var(--card); padding: 2.5rem; transition: background .3s; }
.bento-cell:hover { background: rgba(0,212,255,0.05); }
.bento-cell.tall { grid-row: span 2; }
.bento-icon { display: flex; margin-bottom: 1rem; }
.bento-cell h3 { font-size: 1.1rem; font-weight: 700; margin-bottom: .7rem; }
.bento-cell p { color: var(--muted); font-size: .88rem; line-height: 1.65; }
.bento-sub { margin-top: 1rem !important; }

.portfolio-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 1.5rem; margin-top: 4rem; }
.portfolio-card { border-radius: var(--r-md); overflow: hidden; border: 1px solid var(--border); background: var(--bg3); transition: transform .3s, box-shadow .3s; }
.portfolio-card:hover { transform: translateY(-6px); box-shadow: 0 20px 60px rgba(0,212,255,0.1); }
.portfolio-thumb { width: 100%; height: 180px; background: linear-gradient(135deg, var(--bg3), var(--bg2)); display: flex; align-items: center; justify-content: center; font-size: 2.5rem; border-bottom: 1px solid var(--border); position: relative; }
.portfolio-tag { position: absolute; top: 12px; left: 12px; font-size: .65rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; background: var(--cyan); color: #000; padding: .25rem .7rem; border-radius: var(--r-sm); }
.portfolio-info { padding: 1.2rem 1.5rem; }
.portfolio-info h3 { font-size: 1.05rem; font-weight: 700; margin-bottom: .4rem; }
.portfolio-info p { color: var(--muted); font-size: .85rem; line-height: 1.55; }
.portfolio-more { margin-top: 2.5rem; text-align: center; }

.faci-mock { background: var(--bg); border-radius: 6px; overflow: hidden; border: 1px solid rgba(255,255,255,0.1); width: 75%; box-shadow: 0 8px 24px rgba(0,0,0,0.5); }
.faci-mock-bar { background: #0d2b1a; padding: .35rem .5rem; display: flex; gap: .3rem; align-items: center; border-bottom: 1px solid rgba(255,255,255,0.08); }
.faci-mock-bar span { width: 6px; height: 6px; border-radius: 50%; background: rgba(255,255,255,0.15); }
.faci-mock-body { padding: .8rem; background: linear-gradient(135deg, #0d2b1a, #1a4a2e); }
.faci-mock-title { font-size: .8rem; font-weight: 700; color: #fff; margin-bottom: .2rem; }
.faci-mock-sub { font-size: .6rem; color: rgba(255,255,255,0.6); }

.proceso-layout { display: grid; grid-template-columns: 1fr 1fr; gap: 5rem; align-items: start; }
.steps { display: flex; flex-direction: column; }
.step { display: flex; gap: 2rem; align-items: flex-start; padding: 2rem 0; border-bottom: 1px solid var(--border); }
.step:last-child { border-bottom: none; }
.step-num { font-size: 3.5rem; font-weight: 700; line-height: 1; min-width: 70px; text-align: right; color: transparent; -webkit-text-stroke: 1px rgba(0,212,255,0.25); transition: -webkit-text-stroke .3s; }
.step:hover .step-num { -webkit-text-stroke: 1px var(--cyan); }
.step-body h3 { font-size: 1.1rem; font-weight: 700; margin-bottom: .5rem; }
.step-body p { color: var(--muted); font-size: .9rem; line-height: 1.7; }

#cta { background: radial-gradient(ellipse 80% 60% at 50% 0%, rgba(0,212,255,0.08), transparent); }
.cta-box { border: 1px solid var(--border); border-radius: var(--r-lg); padding: 5rem 3rem; background: var(--card); position: relative; overflow: hidden; text-align: center; }
.cta-box::before { content: ''; position: absolute; top: 0; left: 50%; transform: translateX(-50%); width: 60%; height: 1px; background: linear-gradient(90deg, transparent, var(--cyan), transparent); }
.cta-box h2 { font-size: clamp(1.6rem, 3.5vw, 2.8rem); font-weight: 700; letter-spacing: -.02em; margin-bottom: 1rem; }
.cta-box p { color: var(--muted); max-width: 400px; margin: 0 auto 2.5rem; line-height: 1.7; }
.cta-btns { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }

/* ════════════════════════════════════════════════════════════
   NOSOTROS
   ════════════════════════════════════════════════════════════ */
.quienes-layout { display: grid; grid-template-columns: 1fr 1fr; gap: 5rem; align-items: start; }
.quienes-text p { color: var(--muted); font-size: .95rem; line-height: 1.8; margin-bottom: 1.2rem; }

.visual-card { background: var(--card); border: 1px solid var(--border); border-radius: var(--r-lg); padding: 2rem; margin-bottom: 1rem; position: relative; overflow: hidden; transition: border-color .3s; }
.visual-card:hover { border-color: var(--cyan-dim); }
.visual-card::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 2px; background: linear-gradient(90deg, var(--cyan), transparent); }
.vc-tag { font-size: .65rem; font-weight: 700; letter-spacing: .15em; text-transform: uppercase; color: var(--cyan); margin-bottom: .8rem; }
.visual-card h3 { font-size: 1.15rem; font-weight: 700; margin-bottom: .6rem; }
.visual-card p { color: var(--muted); font-size: .85rem; line-height: 1.65; }

.mini-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.mini-card { background: var(--card); border: 1px solid var(--border); border-radius: var(--r-md); padding: 1.2rem; text-align: center; transition: border-color .3s, background .3s; }
.mini-card:hover { border-color: var(--cyan-dim); background: rgba(0,212,255,0.04); }
.mini-n { display: block; font-size: 1.8rem; font-weight: 700; color: var(--cyan); }
.mini-l { display: block; font-size: .65rem; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin-top: .25rem; }

.valores-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; margin-top: 4rem; }
.valor-card { background: var(--card); border: 1px solid var(--border); border-radius: var(--r-lg); padding: 2rem; transition: transform .3s, border-color .3s, box-shadow .3s; }
.valor-card:hover { transform: translateY(-4px); border-color: var(--cyan-dim); box-shadow: 0 12px 40px rgba(0,212,255,0.08); }
.valor-icon { display: flex; margin-bottom: 1rem; }
.valor-card h3 { font-size: 1rem; font-weight: 700; margin-bottom: .6rem; }
.valor-card p { color: var(--muted); font-size: .875rem; line-height: 1.7; }

.equipo-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 1.5rem; margin-top: 4rem; }
.team-card { background: var(--card); border: 1px solid var(--border); border-radius: var(--r-lg); padding: 2rem; transition: border-color .3s, transform .3s; }
.team-card:hover { border-color: var(--cyan-dim); transform: translateY(-4px); }
.team-avatar { width: 56px; height: 56px; border-radius: var(--r-lg); background: var(--cyan-dim); border: 1px solid var(--cyan-glow); display: flex; align-items: center; justify-content: center; font-size: .85rem; font-weight: 700; color: var(--cyan); letter-spacing: .05em; margin-bottom: 1.2rem; }
.team-card h3 { font-size: 1.1rem; font-weight: 700; margin-bottom: .3rem; }
.team-role { display: block; font-size: .72rem; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--cyan); margin-bottom: 1rem; }
.team-card p { color: var(--muted); font-size: .875rem; line-height: 1.7; margin-bottom: 1.2rem; }
.team-tags { display: flex; flex-wrap: wrap; gap: .4rem; }
.team-tags span { font-size: .68rem; font-weight: 600; letter-spacing: .07em; color: var(--muted); border: 1px solid var(--border); padding: .2rem .6rem; border-radius: var(--r-sm); transition: border-color .2s, color .2s; }
.team-card:hover .team-tags span { border-color: var(--cyan-dim); color: var(--text); }

.manifiesto-box { max-width: 820px; margin: 0 auto; border: 1px solid var(--border); border-radius: var(--r-lg); padding: 4rem; background: var(--card); position: relative; overflow: hidden; text-align: center; }
.manifiesto-box::before { content: ''; position: absolute; top: 0; left: 50%; transform: translateX(-50%); width: 50%; height: 1px; background: linear-gradient(90deg, transparent, var(--cyan), transparent); }
.manifiesto-label { font-size: .7rem; font-weight: 700; letter-spacing: .2em; text-transform: uppercase; color: var(--cyan); margin-bottom: 2rem; }
blockquote { font-size: clamp(1rem, 2.2vw, 1.3rem); font-weight: 500; line-height: 1.75; color: var(--text); font-style: italic; margin-bottom: 1.5rem; }
.manifiesto-firma { color: var(--muted); font-size: .85rem; }

/* ════════════════════════════════════════════════════════════
   TRABAJO
   ════════════════════════════════════════════════════════════ */
.filters { display: flex; gap: .6rem; flex-wrap: wrap; margin-bottom: 3rem; }
.filter-btn { min-height: 44px; padding: .5rem 1.2rem; background: transparent; border: 1px solid var(--border); color: var(--muted); border-radius: var(--r-sm); font-family: 'Space Grotesk', sans-serif; font-size: .78rem; font-weight: 600; letter-spacing: .07em; text-transform: uppercase; transition: all .2s; }
.filter-btn:hover { border-color: var(--cyan-dim); color: var(--text); }
.filter-btn.active { background: var(--cyan); border-color: var(--cyan); color: #000; }

.projects-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 1.5rem; }
.project-card { border-radius: var(--r-lg); overflow: hidden; border: 1px solid var(--border); background: var(--bg2); transition: transform .35s, box-shadow .35s, border-color .35s; display: flex; flex-direction: column; }
.project-card:hover { transform: translateY(-6px); box-shadow: 0 20px 60px rgba(0,212,255,0.1); border-color: var(--cyan-dim); }
.project-card.hidden { display: none; }

.project-thumb { height: 200px; position: relative; overflow: hidden; background: var(--thumb-color, var(--bg3)); display: flex; align-items: center; justify-content: center; border-bottom: 1px solid var(--border); }
.thumb-content { width: 85%; }
.thumb-mock { background: var(--bg); border-radius: var(--r-md); overflow: hidden; border: 1px solid var(--border); box-shadow: 0 8px 32px rgba(0,0,0,0.4); }
.mock-bar { background: var(--bg2); padding: .4rem .6rem; display: flex; gap: .3rem; align-items: center; border-bottom: 1px solid var(--border); }
.mock-bar span { width: 7px; height: 7px; border-radius: 50%; background: var(--border); }
.mock-hero { padding: 1rem; min-height: 80px; display: flex; flex-direction: column; justify-content: flex-end; }
.mock-badge { display: inline-block; font-size: .55rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; background: var(--cyan); color: #000; padding: .15rem .4rem; border-radius: 3px; margin-bottom: .3rem; width: fit-content; }
.mock-title { font-size: .85rem; font-weight: 700; margin-bottom: .15rem; }
.mock-sub { font-size: .65rem; color: var(--muted); }
.project-cat-badge { position: absolute; top: 12px; right: 12px; font-size: .62rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--cyan); border: 1px solid var(--cyan-dim); padding: .25rem .6rem; border-radius: var(--r-sm); background: rgba(7,11,18,0.7); backdrop-filter: blur(8px); }
.cta-thumb { background: var(--cyan-dim) !important; flex-direction: column; gap: .6rem; border-bottom: 1px dashed var(--cyan-glow) !important; }
.cta-plus { font-size: 3rem; font-weight: 300; color: var(--cyan); line-height: 1; }
.cta-thumb > p { font-size: .78rem; color: var(--muted); letter-spacing: .05em; text-align: center; }

.project-info { padding: 1.5rem; flex: 1; display: flex; flex-direction: column; }
.project-header { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: .6rem; }
.project-header h3 { font-size: 1.15rem; font-weight: 700; }
.project-year { font-size: .72rem; font-weight: 600; color: var(--cyan); letter-spacing: .1em; }
.project-info > p { color: var(--muted); font-size: .875rem; line-height: 1.65; margin-bottom: 1.2rem; flex: 1; }
.project-tags { display: flex; flex-wrap: wrap; gap: .4rem; margin-bottom: 1.2rem; }
.project-tags span { font-size: .65rem; font-weight: 600; letter-spacing: .07em; text-transform: uppercase; color: var(--muted); border: 1px solid var(--border); padding: .2rem .6rem; border-radius: var(--r-sm); transition: border-color .2s; }
.project-card:hover .project-tags span { border-color: var(--cyan-dim); }
.project-results { display: flex; gap: 1.5rem; padding-top: 1rem; border-top: 1px solid var(--border); }
.result { display: flex; flex-direction: column; }
.result-n { font-size: 1.2rem; font-weight: 700; color: var(--cyan); }
.result-l { font-size: .65rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin-top: .1rem; }

/* Clickable thumb */
.project-thumb-link { display: block; text-decoration: none; color: inherit; }
.screenshot-thumb { padding: 0; overflow: hidden; }
.screenshot-thumb img { width: 100%; height: 100%; object-fit: cover; object-position: top; display: block; transition: transform .4s; }
/* Mockups cuadrados (maquetas de producto): encuadre centrado, no desde arriba */
.mockup-thumb img { object-position: center; }
.mockup-thumb { background: #0a0d14; }
.project-card:hover .screenshot-thumb img { transform: scale(1.04); }
.project-visit-badge {
  position: absolute; bottom: 12px; right: 12px;
  font-size: .65rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
  color: #000; background: var(--cyan); padding: .25rem .7rem; border-radius: var(--r-sm);
  opacity: 0; transition: opacity .25s;
}
.project-card:hover .project-visit-badge { opacity: 1; }

/* Faci House mock */
.faci-hero {
  background: #0d3320 !important; padding: .7rem !important;
  min-height: 90px !important; display: flex; flex-direction: column;
  gap: .28rem; justify-content: flex-start !important;
}
.faci-ticker { font-size: .42rem; color: rgba(255,255,255,0.5); background: rgba(255,255,255,0.06); padding: .15rem .4rem; border-radius: 2px; width: fit-content; }
.faci-headline { font-size: .72rem; font-weight: 800; color: #fff; line-height: 1.2; }
.faci-headline span { color: #f0a500; text-decoration: underline; }
.faci-btns { display: flex; gap: .3rem; }
.faci-btn-solid { font-size: .38rem; font-weight: 700; background: #f0a500; color: #000; padding: .2rem .45rem; border-radius: 100px; }
.faci-btn-outline { font-size: .38rem; font-weight: 600; color: #fff; border: .5px solid rgba(255,255,255,0.4); padding: .2rem .45rem; border-radius: 100px; }
.faci-stats { display: flex; gap: .5rem; }
.faci-stats span { font-size: .38rem; color: #f0a500; }
.faci-stats b { font-weight: 700; }

/* Palettly mock */
.palettly-hero {
  background: #f5f3ee !important; padding: .7rem !important;
  min-height: 90px !important; display: flex; flex-direction: column;
  gap: .22rem; justify-content: flex-start !important;
}
.palettly-badge { font-size: .38rem; color: #2d6a2d; background: rgba(45,106,45,0.1); border: .5px solid rgba(45,106,45,0.3); padding: .15rem .45rem; border-radius: 100px; width: fit-content; }
.palettly-headline { font-size: .72rem; font-weight: 800; color: #1a1a1a; line-height: 1.2; }
.palettly-headline em { color: #2d6a2d; font-style: italic; }
.palettly-sub { font-size: .38rem; color: #666; line-height: 1.4; }
.palettly-tools { display: flex; flex-direction: column; gap: .15rem; margin-top: .05rem; }
.palettly-tool { font-size: .38rem; color: #333; background: #fff; padding: .18rem .4rem; border-radius: 4px; border: .5px solid rgba(0,0,0,0.08); }

.proceso-quick-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.5rem; margin-top: 4rem; }
.pq-card { background: var(--card); border: 1px solid var(--border); border-radius: var(--r-lg); padding: 2rem; transition: border-color .3s, transform .3s; }
.pq-card:hover { border-color: var(--cyan-dim); transform: translateY(-4px); }
.pq-icon { display: flex; margin-bottom: 1rem; }
.pq-card h3 { font-size: 1rem; font-weight: 700; margin-bottom: .6rem; }
.pq-card p { color: var(--muted); font-size: .875rem; line-height: 1.65; }

/* ════════════════════════════════════════════════════════════
   CONTACTO
   ════════════════════════════════════════════════════════════ */
main { position: relative; z-index: var(--z-base); }
.main-pad { padding: 3rem 2rem 6rem; }
.contact-layout { display: grid; grid-template-columns: 1fr 1.3fr; gap: 4rem; align-items: start; }
.contact-info { display: flex; flex-direction: column; gap: 1rem; }

.info-card { background: var(--card); border: 1px solid var(--border); border-radius: var(--r-md); padding: 1.4rem; display: flex; gap: 1rem; align-items: flex-start; transition: border-color .3s, background .3s; }
.info-card:hover { border-color: var(--cyan-dim); background: rgba(0,212,255,0.04); }
.info-icon { display: flex; align-items: center; justify-content: center; flex-shrink: 0; padding-top: .15rem; }
.info-label { font-size: .68rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--cyan); margin-bottom: .25rem; }
.info-val { font-size: .95rem; font-weight: 500; }
.info-val a { color: var(--text); text-decoration: none; transition: color .2s; }
.info-val a:hover { color: var(--cyan); }
.info-sub { font-size: .8rem; color: var(--muted); margin-top: .15rem; }
.response-badge { padding: 1.3rem; border: 1px solid var(--cyan-dim); border-radius: var(--r-md); background: rgba(0,212,255,0.04); }
.response-badge strong { display: block; font-size: .9rem; margin-bottom: .4rem; }
.response-badge p { color: var(--muted); font-size: .82rem; line-height: 1.65; }

.form-card { background: var(--card); border: 1px solid var(--border); border-radius: var(--r-lg); padding: 2.5rem; }
.form-card h2 { font-size: 1.3rem; font-weight: 700; margin-bottom: .3rem; }
.form-card > p { color: var(--muted); font-size: .85rem; margin-bottom: 2rem; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.form-group { display: flex; flex-direction: column; gap: .45rem; margin-bottom: 1rem; }
label { font-size: .72rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
input, select, textarea { background: rgba(255,255,255,0.03); border: 1px solid var(--border); color: var(--text); font-family: 'Space Grotesk', sans-serif; font-size: .92rem; padding: .75rem 1rem; border-radius: var(--r-md); width: 100%; transition: border-color .2s, background .2s; outline: none; }
input:focus, select:focus, textarea:focus { border-color: var(--cyan); background: rgba(0,212,255,0.04); }
input::placeholder, textarea::placeholder { color: var(--muted); }
select option { background: var(--bg2); color: var(--text); }
select optgroup { background: var(--bg2); color: var(--cyan); font-weight: 700; font-style: normal; }
textarea { resize: vertical; min-height: 120px; }
.btn-submit { width: 100%; padding: .95rem; background: var(--cyan); color: #000; border: none; border-radius: var(--r-md); font-weight: 700; font-family: 'Space Grotesk', sans-serif; font-size: .9rem; letter-spacing: .06em; text-transform: uppercase; margin-top: .4rem; transition: background .2s, transform .15s, box-shadow .2s; }
.btn-submit:hover { background: #33ddff; box-shadow: 0 0 30px var(--cyan-glow); transform: translateY(-1px); }
/* ── ESTADOS DE ERROR ────────────────────────────────────────
   El error vive junto al campo que falla, no en un alert() que
   no dice cuál es ni queda asociado a nada.                    */
.req { color: var(--cyan); font-weight: 700; }
.opt { color: var(--muted); font-weight: 400; text-transform: none; letter-spacing: 0; }

.field-error {
  font-size: .78rem; line-height: 1.5; color: #ff9d9d;
  display: flex; align-items: flex-start; gap: .4rem;
}
.field-error[hidden] { display: none; }
.field-error::before { content: '!'; flex-shrink: 0; font-weight: 700; }

input[aria-invalid="true"],
textarea[aria-invalid="true"] { border-color: #ff6b6b; background: rgba(255,107,107,0.05); }
input[aria-invalid="true"]:focus,
textarea[aria-invalid="true"]:focus { border-color: #ff6b6b; }

.form-req-note { font-size: .75rem; color: var(--muted); margin-bottom: .9rem; }

.form-note { font-size: .75rem; color: var(--muted); text-align: center; margin-top: .9rem; }
.form-note a { color: var(--cyan); text-decoration: none; }
#success-msg { display: none; text-align: center; padding: 3rem 2rem; }
.success-icon { width: 64px; height: 64px; border-radius: 50%; background: var(--cyan-dim); border: 1px solid var(--cyan-glow); display: flex; align-items: center; justify-content: center; font-size: 1.5rem; color: var(--cyan); margin: 0 auto 1.2rem; }
#success-msg h3 { font-size: 1.3rem; font-weight: 700; color: var(--cyan); margin-bottom: .5rem; }
#success-msg p { color: var(--muted); font-size: .9rem; line-height: 1.7; }
#success-msg a { color: var(--cyan); text-decoration: none; }

/* ════════════════════════════════════════════════════════════
   SERVICIOS — GRUPOS (web / software)
   ════════════════════════════════════════════════════════════ */
.service-group { margin-top: 4rem; }
.service-group + .service-group { margin-top: 4.5rem; }
.service-group-head {
  display: flex; align-items: baseline; gap: 1rem;
  flex-wrap: wrap; margin-bottom: 1.5rem;
  padding-bottom: 1rem; border-bottom: 1px solid var(--border);
}
.service-group-title {
  font-size: .78rem; font-weight: 700; letter-spacing: .18em;
  text-transform: uppercase; color: var(--cyan);
  display: flex; align-items: center; gap: .7rem; flex-shrink: 0;
}
.service-group-title::before {
  content: ''; width: 8px; height: 8px; border-radius: var(--r-sm);
  background: var(--cyan); box-shadow: 0 0 12px var(--cyan-glow);
}
.service-group-sub { color: var(--muted); font-size: .88rem; line-height: 1.6; }
.service-group .services-grid { margin-top: 0; }
.service-group-cta { margin-top: 1.5rem; }

/* ── Nota de plazos bajo los pasos del proceso ───────────── */
.proceso-note {
  margin-top: 2rem; padding: 1.1rem 1.3rem;
  border: 1px solid var(--cyan-dim); border-radius: var(--r-md);
  background: rgba(0,212,255,0.04);
  color: var(--muted); font-size: .84rem; line-height: 1.7;
}
.proceso-note strong { color: var(--text); }

/* ════════════════════════════════════════════════════════════
   PORTFOLIO — PROYECTOS PRIVADOS
   ════════════════════════════════════════════════════════════ */
.project-info > p.project-note {
  flex: 0 0 auto; font-size: .78rem; line-height: 1.6; color: var(--muted);
  margin-top: .9rem; margin-bottom: 0;
  display: flex; align-items: center; gap: .4rem;
}
.project-info > p.project-note::before {
  content: ""; width: 6px; height: 6px; border-radius: 50%;
  background: #f0a500; flex-shrink: 0;
}
.project-info > p.project-private {
  flex: 0 0 auto;
  font-size: .78rem; line-height: 1.6; color: var(--muted);
  margin-top: auto; margin-bottom: 0;
  padding-top: .9rem; border-top: 1px solid var(--border);
}

/* ════════════════════════════════════════════════════════════
   SOFTWARE — SEÑALES
   ════════════════════════════════════════════════════════════ */
.signals-grid {
  display: grid; grid-template-columns: repeat(2, 1fr);
  gap: 1rem; margin-top: 3.5rem;
}
.signal {
  display: flex; gap: 1rem; align-items: flex-start;
  padding: 1.4rem; border: 1px solid var(--border);
  border-radius: var(--r-md); background: var(--card);
  transition: border-color .3s, background .3s;
}
.signal:hover { border-color: var(--cyan-dim); background: rgba(0,212,255,0.04); }
.signal-x {
  flex-shrink: 0; width: 24px; height: 24px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: .72rem; color: #ff6b6b;
  border: 1px solid rgba(255,107,107,0.3); background: rgba(255,107,107,0.08);
}
.signal p { color: var(--muted); font-size: .88rem; line-height: 1.65; }

.signals-note {
  margin-top: 2rem; padding: 2rem;
  border: 1px solid var(--cyan-dim); border-radius: var(--r-lg);
  background: rgba(0,212,255,0.04);
  display: flex; align-items: center; justify-content: space-between;
  gap: 1.5rem; flex-wrap: wrap;
}
.signals-note p { color: var(--muted); font-size: .92rem; line-height: 1.7; max-width: 540px; }
.signals-note strong { color: var(--text); }

/* ════════════════════════════════════════════════════════════
   SOFTWARE — STACK TECNOLÓGICO
   ════════════════════════════════════════════════════════════ */
.stack-grid {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 1.5px; margin-top: 4rem;
  border: 1.5px solid var(--border); border-radius: var(--r-lg); overflow: hidden;
}
.stack-group { background: var(--card); padding: 2rem; transition: background .3s; }
.stack-group:hover { background: rgba(0,212,255,0.05); }
.stack-group h3 {
  font-size: .72rem; font-weight: 700; letter-spacing: .16em;
  text-transform: uppercase; color: var(--cyan); margin-bottom: 1.2rem;
}
.stack-chips { display: flex; flex-wrap: wrap; gap: .5rem; }
.stack-chips span {
  font-size: .8rem; font-weight: 500; color: var(--text);
  border: 1px solid var(--border); background: rgba(255,255,255,0.03);
  padding: .38rem .85rem; border-radius: var(--r-sm);
  transition: border-color .2s, color .2s;
}
.stack-group:hover .stack-chips span { border-color: var(--cyan-dim); }

/* ════════════════════════════════════════════════════════════
   SOFTWARE — CASO DESTACADO
   ════════════════════════════════════════════════════════════ */
.case-highlight {
  margin-top: 3.5rem; border: 1px solid var(--border);
  border-radius: var(--r-lg); overflow: hidden; background: var(--card);
}

/* Galería de mockups del caso */
.case-shots {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 1px; background: var(--border);
  border-bottom: 1px solid var(--border);
}
.case-shot { position: relative; overflow: hidden; background: #0a0d14; }
.case-shot img { width: 100%; height: 100%; object-fit: cover; display: block; }
.case-shot-label {
  position: absolute; bottom: 12px; left: 12px;
  font-size: .62rem; font-weight: 700; letter-spacing: .12em;
  text-transform: uppercase; color: var(--text);
  background: rgba(7,11,18,0.72); backdrop-filter: blur(8px);
  border: 1px solid var(--border); padding: .3rem .7rem; border-radius: var(--r-sm);
}

.case-body { padding: 2.75rem 2.5rem; display: flex; flex-direction: column; }
.case-badge {
  align-self: flex-start; font-size: .65rem; font-weight: 700;
  letter-spacing: .12em; text-transform: uppercase;
  color: var(--cyan); border: 1px solid var(--cyan-dim);
  padding: .3rem .8rem; border-radius: var(--r-sm); margin-bottom: 1.2rem;
}
.case-body h3 { font-size: 1.5rem; font-weight: 700; margin-bottom: .9rem; letter-spacing: -.01em; }
.case-body > p { color: var(--muted); font-size: .93rem; line-height: 1.75; max-width: 720px; }
.case-features { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: 1.5rem; }
.case-features span {
  font-size: .74rem; font-weight: 600; letter-spacing: .04em; color: var(--muted);
  border: 1px solid var(--border); background: rgba(255,255,255,0.03);
  padding: .32rem .8rem; border-radius: var(--r-sm);
  transition: border-color .2s, color .2s;
}
.case-highlight:hover .case-features span { border-color: var(--cyan-dim); color: var(--text); }

.case-body > p + p { margin-top: 1rem; }
.case-body > p.case-note {
  font-size: .82rem; margin-top: 1.2rem;
  padding-top: 1.2rem; border-top: 1px solid var(--border);
}
.case-body .btn-ghost { align-self: flex-start; margin-top: 1.8rem; }

/* ════════════════════════════════════════════════════════════
   PÁGINA 404
   ════════════════════════════════════════════════════════════ */
.error-page { padding-top: 11rem; padding-bottom: 7rem; }
.error-page .container { max-width: 820px; }

.error-code {
  font-family: 'Archivo', 'Space Grotesk', sans-serif;
  font-stretch: 125%; font-weight: 700;
  font-size: clamp(5rem, 18vw, 11rem);
  line-height: .85; letter-spacing: -.04em;
  color: transparent; -webkit-text-stroke: 1.5px rgba(0,212,255,0.28);
  margin-bottom: 1.5rem; user-select: none;
}

.error-page h1 {
  font-family: 'Archivo', 'Space Grotesk', sans-serif;
  font-stretch: 118%; font-weight: 700;
  font-size: clamp(2rem, 5vw, 3.2rem);
  letter-spacing: -.02em; line-height: 1.05;
  margin-bottom: 1.2rem; text-wrap: balance;
}
.error-lead {
  color: var(--muted); font-size: 1.02rem; line-height: 1.75;
  max-width: 56ch; text-wrap: pretty; margin-bottom: 2.5rem;
}
.error-actions { display: flex; gap: 1rem; flex-wrap: wrap; margin-bottom: 4.5rem; }

.error-map h2 {
  font-size: .74rem; font-weight: 700; letter-spacing: .16em;
  text-transform: uppercase; color: var(--cyan);
  padding-bottom: 1rem; margin-bottom: 0;
  border-bottom: 1px solid var(--border);
}
.error-map ul { list-style: none; }
.error-map li { border-bottom: 1px solid var(--border); }
.error-map a {
  display: grid; grid-template-columns: 28px 1fr; gap: .3rem 1.2rem;
  align-items: center; padding: 1.4rem .75rem;
  text-decoration: none; color: inherit;
  transition: background .25s, transform .25s;
}
.error-map a:hover { background: rgba(0,212,255,0.04); transform: translateX(.65rem); }
.error-map .ico { margin-bottom: 0; grid-row: span 2; }
.em-title { font-size: 1.05rem; font-weight: 700; }
.em-desc { color: var(--muted); font-size: .86rem; line-height: 1.5; }

.error-help { margin-top: 2.5rem; color: var(--muted); font-size: .88rem; line-height: 1.7; }
.error-help a { color: var(--cyan); text-decoration: none; border-bottom: 1px solid var(--cyan-dim); }
.error-help a:hover { border-bottom-color: var(--cyan); }

@media (max-width: 560px) {
  .error-page { padding-top: 9rem; }
  .error-map a { grid-template-columns: 24px 1fr; gap: .25rem .9rem; }
  .error-map .ico { width: 24px; height: 24px; }
}

/* ════════════════════════════════════════════════════════════
   GALERÍA MODAL (carrusel de mockups)
   ════════════════════════════════════════════════════════════ */
/* Ocupa todo el viewport y centra el contenido adentro: así el diálogo
   queda centrado de verdad (margin:auto no centra en vertical con alto auto) */
.gallery-modal {
  width: 100vw; max-width: 100vw;
  height: 100dvh; max-height: 100dvh;
  padding: 2.5rem 1.5rem; border: none; background: transparent;
  overflow: hidden; color: var(--text);
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  grid-template-rows: minmax(0, 1fr) auto;
  place-content: center; align-items: center;
  justify-content: center; gap: .75rem 1.25rem;
}
/* El display:grid de arriba le gana al display:none que el navegador
   aplica a un dialog cerrado, así que hay que reponerlo a mano: si no,
   al cerrar la galería el diálogo queda visible al final del body. */
.gallery-modal:not([open]) { display: none; }

.gallery-modal::backdrop {
  background: rgba(4,7,12,0.88);
  backdrop-filter: blur(10px);
  animation: galleryFade .25s ease;
}
@keyframes galleryFade { from { opacity: 0; } to { opacity: 1; } }

body.gallery-open { overflow: hidden; }
.gallery-modal button { cursor: pointer; font-family: 'Space Grotesk', sans-serif; }

.gallery-stage {
  grid-column: 2; grid-row: 1;
  display: flex; flex-direction: column; align-items: center; gap: 1rem;
  min-width: 0; min-height: 0; max-height: 100%;
}
/* Se descuenta el alto del padding, el epígrafe y el pie de la galería */
.gallery-img {
  max-width: 100%; max-height: calc(100dvh - 12rem); min-height: 0;
  width: auto; height: auto; object-fit: contain; display: block;
  border-radius: var(--r-lg); border: 1px solid var(--border);
  box-shadow: 0 30px 90px rgba(0,0,0,0.65);
  background: #0a0d14;
}
.gallery-img.is-in { animation: galleryIn .32s cubic-bezier(.25,1,.5,1); }
@keyframes galleryIn { from { opacity: 0; transform: scale(.985); } to { opacity: 1; transform: none; } }

.gallery-caption {
  font-size: .85rem; color: var(--muted); text-align: center;
  letter-spacing: .04em;
}
.gallery-caption[hidden] { display: none; }

.gallery-nav {
  width: 46px; height: 46px; flex-shrink: 0;
  border-radius: 50%; border: 1px solid var(--border);
  background: rgba(255,255,255,0.05); backdrop-filter: blur(8px);
  color: var(--text);
  display: flex; align-items: center; justify-content: center;
  padding: 0; grid-row: 1;
  transition: border-color .2s, background .2s, color .2s, transform .2s;
}
.gallery-nav svg { width: 22px; height: 22px; display: block; }
.gallery-close svg { width: 16px; height: 16px; display: block; }
.gallery-nav:hover { border-color: var(--cyan); color: var(--cyan); background: rgba(0,212,255,0.08); transform: scale(1.06); }
.gallery-prev { grid-column: 1; }
.gallery-next { grid-column: 3; }
.gallery-modal.single .gallery-nav,
.gallery-modal.single .gallery-dots,
.gallery-modal.single .gallery-counter { display: none; }

.gallery-close {
  position: absolute; top: 1.25rem; right: 1.25rem; z-index: 2;
  width: 42px; height: 42px; border-radius: 50%;
  border: 1px solid var(--border); background: rgba(255,255,255,0.05);
  backdrop-filter: blur(8px); color: var(--text);
  display: flex; align-items: center; justify-content: center;
  transition: border-color .2s, color .2s;
}
.gallery-close:hover { border-color: var(--cyan); color: var(--cyan); }

.gallery-footer {
  grid-column: 2; grid-row: 2;
  display: flex; align-items: center; justify-content: center; gap: 1.2rem;
  padding-top: .3rem;
}
.gallery-dots { display: flex; gap: .45rem; }
.gallery-dot {
  width: 24px; height: 24px; padding: 0; border: none;
  background: none; display: grid; place-items: center;
}
.gallery-dot::before {
  content: ''; width: 7px; height: 7px; border-radius: 50%;
  background: rgba(255,255,255,0.22);
  transition: background .2s, transform .2s;
}
.gallery-dot:hover::before { background: rgba(255,255,255,0.45); }
.gallery-dot.active::before { background: var(--cyan); transform: scale(1.35); }
.gallery-counter {
  font-size: .72rem; font-weight: 600; letter-spacing: .12em;
  text-transform: uppercase; color: var(--muted);
}

/* Disparador sobre las miniaturas */
.gallery-trigger {
  position: absolute; inset: 0; width: 100%; height: 100%;
  border: none; background: transparent; padding: 0;
  display: flex; align-items: center; justify-content: center;
  z-index: 2;
}
.gallery-trigger::after {
  content: attr(data-label);
  font-size: .68rem; font-weight: 700; letter-spacing: .12em;
  text-transform: uppercase; color: var(--text);
  background: rgba(7,11,18,0.78); backdrop-filter: blur(8px);
  border: 1px solid var(--cyan-dim); padding: .45rem 1rem; border-radius: var(--r-sm);
  opacity: 0; transform: translateY(6px);
  transition: opacity .3s, transform .3s;
}
.portfolio-card:hover .gallery-trigger::after,
.project-card:hover .gallery-trigger::after,
.case-shot:hover .gallery-trigger::after,
.gallery-trigger:focus-visible::after { opacity: 1; transform: none; }
.gallery-trigger:focus-visible { outline: 2px solid var(--cyan); outline-offset: -2px; }

/* ════════════════════════════════════════════════════════════
   MOVIMIENTO REDUCIDO
   Cobertura completa, no sólo la galería. Lo importante no es
   apagar animaciones sino que nada quede invisible al apagarlas:
   .reveal y .word-anim arrancan en opacity 0 y necesitan volver
   a su estado final, no quedarse a mitad de camino.
   ════════════════════════════════════════════════════════════ */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }

  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }

  /* Contenido que se revela: estado final, visible */
  .reveal { opacity: 1 !important; transform: none !important; }
  .word-anim { opacity: 1 !important; filter: none !important; animation: none !important; }
  .loader-logo { animation: none; opacity: 1; }

  /* Nada de desplazamientos ni escalados al pasar el mouse */
  .btn-primary:hover, .nav-cta:hover, .btn-submit:hover,
  .portfolio-card:hover, .project-card:hover, .valor-card:hover,
  .pq-card:hover, .team-card:hover, .mini-card:hover,
  .word-anim:hover, .gallery-nav:hover, .gallery-dot.active,
  .project-card:hover .screenshot-thumb img { transform: none !important; }

  .gallery-modal::backdrop { animation: none; }
  .gallery-img.is-in { animation: none; }
}

/* Si el JS no corre, el contenido no puede quedarse invisible */
.no-js .reveal { opacity: 1; transform: none; }
.no-js .word-anim { opacity: 1; filter: none; animation: none; }
.no-js #page-loader { display: none; }

/* ════════════════════════════════════════════════════════════
   RESPONSIVE
   ════════════════════════════════════════════════════════════ */
@media (max-width: 1000px) {
  .valores-grid { grid-template-columns: repeat(2, 1fr); }
  .proceso-quick-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 900px) {
  .case-body { padding: 2.25rem 1.75rem; }
}
@media (max-width: 560px) {
  .case-shots { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  /* Las flechas pasan a superponerse para que la imagen use todo el ancho */
  .gallery-modal { padding: 4rem .75rem 1.5rem; gap: .6rem; grid-template-columns: minmax(0, 1fr); }
  .gallery-stage, .gallery-footer { grid-column: 1; }
  .gallery-nav {
    position: absolute; top: 50%; z-index: 2;
    width: 38px; height: 38px; transform: translateY(-50%);
    background: rgba(7,11,18,0.65);
  }
  .gallery-nav:hover { transform: translateY(-50%) scale(1.06); }
  .gallery-prev { left: .5rem; }
  .gallery-next { right: .5rem; }
  .gallery-nav svg { width: 18px; height: 18px; }
  .gallery-close { top: 1rem; right: 1rem; width: 38px; height: 38px; }
  .gallery-caption { font-size: .78rem; }
  .gallery-img { max-height: calc(100dvh - 14rem); }
}
@media (max-width: 900px) {
  .stack-grid { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  .signals-grid { grid-template-columns: 1fr; }
  .service-group-head { flex-direction: column; gap: .5rem; }
}
@media (max-width: 900px) {
  .proceso-layout { grid-template-columns: 1fr; gap: 3rem; }
  .bento { grid-template-columns: 1fr; }
  .bento-cell.tall { grid-row: span 1; }
  .quienes-layout { grid-template-columns: 1fr; gap: 3rem; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 2rem; }
}
/* ── HAMBURGER BUTTON ────────────────────────────────────── */
.nav-hamburger {
  display: none;
  flex-direction: column; justify-content: center; align-items: center;
  gap: 5px; width: 44px; height: 44px; flex-shrink: 0;
  background: rgba(255,255,255,0.05); border: 1px solid var(--border); border-radius: 50%; padding: 0;
  transition: border-color .2s, background .2s;
}
.nav-hamburger:hover { border-color: var(--cyan); background: rgba(0,212,255,0.08); }
.nav-hamburger span {
  display: block; width: 18px; height: 1.5px;
  background: var(--text); border-radius: 2px;
  transition: transform .3s, opacity .3s;
  transform-origin: center;
}
.nav-hamburger.open span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.nav-hamburger.open span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.nav-hamburger.open span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

/* ── MOBILE MENU ─────────────────────────────────────────── */
.mobile-menu {
  position: fixed; top: 0; right: 0; bottom: 0;
  width: min(320px, 85vw);
  background: var(--bg2); border-left: 1px solid var(--border);
  z-index: var(--z-drawer); display: flex; flex-direction: column;
  padding: 1.5rem;
  transform: translateX(100%);
  transition: transform .35s cubic-bezier(.25,1,.5,1);
}
.mobile-menu.open { transform: translateX(0); }

.mobile-menu-header {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 2.5rem; padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--border);
}
.mobile-menu-close {
  background: none; border: 1px solid var(--border); border-radius: var(--r-md);
  color: var(--muted); font-size: 1rem; width: 44px; height: 44px;
  display: flex; align-items: center; justify-content: center; transition: border-color .2s, color .2s;
}
.mobile-menu-close:hover { border-color: var(--cyan); color: var(--cyan); }

.mobile-nav-links { list-style: none; display: flex; flex-direction: column; gap: .25rem; flex: 1; }
.mobile-nav-links a {
  display: block; padding: .9rem 1rem;
  color: var(--muted); text-decoration: none;
  font-size: 1rem; font-weight: 500; letter-spacing: .03em;
  border-radius: var(--r-md); transition: background .2s, color .2s;
}
.mobile-nav-links a:hover,
.mobile-nav-links a.active { background: var(--cyan-dim); color: var(--text); }

.mobile-cta {
  display: block; text-align: center;
  padding: .9rem; background: var(--cyan); color: #000;
  border-radius: var(--r-md); text-decoration: none;
  font-weight: 700; font-size: .9rem; letter-spacing: .05em;
  text-transform: uppercase; margin-top: 1.5rem;
  transition: background .2s;
}
.mobile-cta:hover { background: #33ddff; }

.mobile-overlay {
  position: fixed; inset: 0; z-index: var(--z-overlay);
  background: rgba(0,0,0,0.6); backdrop-filter: blur(4px);
  opacity: 0; pointer-events: none;
  transition: opacity .35s;
}
.mobile-overlay.open { opacity: 1; pointer-events: all; }

@media (max-width: 768px) {
  /* En pantalla chica la píldora sí ocupa el ancho: el logo va a la
     izquierda y la hamburguesa al borde derecho, donde se la busca */
  nav#nav { width: calc(100% - 1.4rem); max-width: none; gap: .5rem; }
  .nav-links { display: none; }
  .nav-cta { display: none; }
  .nav-hamburger { display: flex; }
  .contact-layout { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .valores-grid { grid-template-columns: 1fr; }
}
@media (max-width: 700px) {
  .projects-grid { grid-template-columns: 1fr; }
  .proceso-quick-grid { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  .stats-row { flex-direction: column; }
  .stat { border-right: none; border-bottom: 1px solid var(--border); }
  .stat:last-child { border-bottom: none; }
  .footer-grid { grid-template-columns: 1fr; }
}
