/* ============================================================
   NOBAMIND — ESTILOS DEL SITIO
   Tema oscuro profesional + animaciones dinámicas
   ============================================================ */

:root {
  --bg: #070b14;
  --bg-2: #0a1120;
  --surface: #0d1526;
  --surface-2: #111c33;
  --border: rgba(148, 163, 184, 0.14);
  --border-strong: rgba(148, 163, 184, 0.28);
  --text: #e8edf6;
  --muted: #93a1b8;
  --accent: #22d3ee;
  --accent-2: #6366f1;
  --grad: linear-gradient(135deg, #22d3ee 0%, #6366f1 100%);
  --grad-soft: linear-gradient(135deg, rgba(34, 211, 238, 0.16), rgba(99, 102, 241, 0.16));
  --radius: 16px;
  --shadow: 0 20px 50px -20px rgba(2, 6, 18, 0.9);
  --font-head: "Sora", sans-serif;
  --font-body: "Inter", sans-serif;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 90px;
  /* Crítico en móviles: evita que Chrome expanda el viewport de layout
     (sin esto, el navbar se corre fuera de pantalla y hay scroll lateral) */
  overflow-x: hidden;
  overflow-x: clip;
}

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }
button { font: inherit; cursor: pointer; border: none; background: none; color: inherit; }

h1, h2, h3, h4 {
  font-family: var(--font-head);
  line-height: 1.15;
  letter-spacing: -0.02em;
}

::selection { background: rgba(34, 211, 238, 0.35); color: #fff; }

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

/* ---------- Botones ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.85rem 1.7rem;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.98rem;
  transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease, border-color 0.25s ease;
  position: relative;
  overflow: hidden;
  white-space: nowrap;
}

.btn-sm { padding: 0.55rem 1.2rem; font-size: 0.88rem; }
.btn-block { width: 100%; }

.btn-primary {
  background: var(--grad);
  color: #04121a;
  box-shadow: 0 10px 30px -10px rgba(34, 211, 238, 0.55);
}

.btn-primary::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(110deg, transparent 30%, rgba(255, 255, 255, 0.5) 50%, transparent 70%);
  transform: translateX(-120%);
  transition: transform 0.6s ease;
}

.btn-primary:hover::after { transform: translateX(120%); }
.btn-primary:hover { transform: translateY(-3px); box-shadow: 0 16px 38px -12px rgba(34, 211, 238, 0.7); }

.btn-ghost {
  border: 1px solid var(--border-strong);
  color: var(--text);
  background: rgba(255, 255, 255, 0.03);
  backdrop-filter: blur(6px);
}

.btn-ghost:hover { transform: translateY(-3px); border-color: var(--accent); color: var(--accent); }

/* Barra de progreso de scroll */
  .scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    height: 3px;
    width: 100%;
    z-index: 210;
    background: var(--grad);
    transform-origin: left;
    transform: scaleX(0);
    box-shadow: 0 0 12px rgba(34, 211, 238, 0.6);
  }

  /* ---------- Navbar ---------- */
  .navbar {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100;
  padding: 1.1rem 0;
  transition: background 0.35s ease, padding 0.35s ease, border-color 0.35s ease, box-shadow 0.35s ease, transform 0.45s cubic-bezier(0.22, 1, 0.36, 1);
  border-bottom: 1px solid transparent;
}

/* Se oculta al bajar con el scroll y reaparece al subir */
.navbar.nav-hidden { transform: translateY(-110%); }

.navbar.scrolled {
  padding: 0.65rem 0;
  background: rgba(7, 11, 20, 0.82);
  backdrop-filter: blur(14px);
  border-bottom-color: var(--border);
  box-shadow: 0 10px 30px -18px rgba(0, 0, 0, 0.8);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand {
  display: inline-flex;
  align-items: center;
}

.brand-logo {
  height: 38px;
  width: auto;
  display: block;
  filter: drop-shadow(0 4px 14px rgba(34, 211, 238, 0.25));
  transition: transform 0.3s ease;
}

.footer .brand-logo { height: 46px; }

.brand:hover .brand-logo { transform: scale(1.04); }

/* ---------- Intro: trazado del logotipo ---------- */
.intro {
  position: fixed;
  inset: 0;
  z-index: 300;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2rem;
  background:
    radial-gradient(60% 50% at 50% 40%, rgba(37, 99, 235, 0.12), transparent),
    var(--bg);
  transition: opacity 0.7s ease, visibility 0.7s ease;
}

.intro.done { opacity: 0; visibility: hidden; }

/* Envoltorio para la salida cinematográfica (blur + escala) */
.intro-stage {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2rem;
  transition:
    transform 0.85s cubic-bezier(0.55, 0, 0.7, 0.2),
    opacity 0.7s ease 0.05s,
    filter 0.85s ease;
}

.intro.done .intro-stage {
  opacity: 0;
  transform: scale(1.09) translateY(-10px);
  filter: blur(10px);
}

.intro-lockup {
  width: min(580px, 86vw);
  height: auto;
  transform-style: preserve-3d;
  animation:
    introSettle 2.6s cubic-bezier(0.16, 1, 0.3, 1) both,
    introSway 8s ease-in-out 2.8s infinite,
    introGlow 3s ease-in-out 2.9s infinite alternate;
}

/* El logo llega girando desde el fondo y se asienta */
@keyframes introSettle {
  from { opacity: 0; transform: perspective(900px) rotateY(-18deg) rotate(-7deg) scale(0.9); }
  35%  { opacity: 1; }
  to   { opacity: 1; transform: perspective(900px) rotateY(0deg) rotate(0deg) scale(1); }
}

@keyframes introSway {
  0%, 100% { transform: perspective(900px) rotateY(-4deg); }
  50%      { transform: perspective(900px) rotateY(4deg); }
}

@keyframes introGlow {
  from { filter: drop-shadow(0 0 16px rgba(34, 211, 238, 0.22)); }
  to   { filter: drop-shadow(0 0 38px rgba(34, 211, 238, 0.5)); }
}

/* Hexágono: trazado pausado y elegante */
.intro-draw {
  stroke-dasharray: 340;
  stroke-dashoffset: 340;
  animation: introDraw 1.6s cubic-bezier(0.6, 0, 0.2, 1) forwards;
}

/* La N se dibuja después y destella al completarse */
.intro-d2 {
  animation:
    introDraw 1.2s cubic-bezier(0.6, 0, 0.2, 1) 0.95s forwards,
    introFlash 0.7s ease-out 2.1s;
}

@keyframes introDraw { to { stroke-dashoffset: 0; } }

@keyframes introFlash {
  0%   { filter: drop-shadow(0 0 2px rgba(103, 232, 249, 0)); }
  35%  { filter: drop-shadow(0 0 16px rgba(103, 232, 249, 0.95)); }
  100% { filter: drop-shadow(0 0 2px rgba(103, 232, 249, 0)); }
}

/* Nodos: "pop" elástico en los extremos de la N + ondas expansivas */
.intro-dot {
  transform: scale(0);
  transform-box: fill-box;
  transform-origin: center;
  animation: introPop 0.8s cubic-bezier(0.34, 1.56, 0.64, 1) 2s backwards;
}

.intro-dot-2 { animation-delay: 2.25s; }

@keyframes introPop { to { transform: scale(1); } }

.intro-ripple {
  fill: none;
  stroke: rgba(103, 232, 249, 0.85);
  stroke-width: 2;
  opacity: 0;
  transform-box: fill-box;
  transform-origin: center;
  animation: introRipple 1.5s ease-out forwards;
}

.ir-a { animation-delay: 2.02s; }
.ir-b { animation-delay: 2.22s; stroke: rgba(129, 140, 248, 0.85); }
.ir-c { animation-delay: 2.27s; }
.ir-d { animation-delay: 2.47s; stroke: rgba(129, 140, 248, 0.85); }

@keyframes introRipple {
  0%   { opacity: 0.9; transform: scale(1); }
  100% { opacity: 0; transform: scale(4.4); }
}

/* Wordmark: letra por letra con volteo 3D */
.intro-letter {
  opacity: 0;
  transform: translateY(30px) rotateX(85deg);
  transform-box: fill-box;
  transform-origin: bottom center;
  animation: introLetter 0.8s cubic-bezier(0.34, 1.4, 0.64, 1) forwards;
}

.intro-letter:nth-child(1) { animation-delay: 2.15s; }
.intro-letter:nth-child(2) { animation-delay: 2.25s; }
.intro-letter:nth-child(3) { animation-delay: 2.35s; }
.intro-letter:nth-child(4) { animation-delay: 2.45s; }
.intro-letter:nth-child(5) { animation-delay: 2.55s; }
.intro-letter:nth-child(6) { animation-delay: 2.65s; }
.intro-letter:nth-child(7) { animation-delay: 2.75s; }
.intro-letter:nth-child(8) { animation-delay: 2.85s; }

@keyframes introLetter {
  55% { opacity: 1; }
  to  { opacity: 1; transform: translateY(0) rotateX(0deg); }
}

/* Slogan: aparece con espaciado que se contrae (efecto cine) */
.intro-slogan {
  margin: 0;
  font-size: 0.82rem;
  font-weight: 500;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--muted);
  text-align: center;
  padding: 0 1.5rem;
  opacity: 0;
  transform: translateY(14px);
  animation: introSlogan 1s ease-out 3.35s forwards;
}

@keyframes introSlogan {
  from { opacity: 0; letter-spacing: 0.55em; transform: translateY(14px); }
  to   { opacity: 1; letter-spacing: 0.3em;  transform: translateY(0); }
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 1.7rem;
}

.nav-links > a:not(.btn) {
  position: relative;
  font-size: 0.95rem;
  color: var(--muted);
  transition: color 0.25s ease;
  padding: 0.25rem 0;
}

.nav-links > a:not(.btn)::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -2px;
  width: 100%;
  height: 2px;
  border-radius: 2px;
  background: var(--grad);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s ease;
}

.nav-links > a:not(.btn):hover { color: var(--text); }
.nav-links > a:not(.btn):hover::after,
.nav-links > a:not(.btn).active::after { transform: scaleX(1); }
.nav-links > a:not(.btn).active { color: var(--text); }

.nav-cta { margin-left: 0.6rem; }

.menu-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 8px;
  z-index: 110;
}

.menu-toggle span {
  width: 24px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

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

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  align-items: center;
  padding: 8.5rem 0 5rem;
  overflow: hidden;
}

#hero-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0.65;
}

.hero-glow {
  position: absolute;
  top: -30%;
  right: -15%;
  width: 60vw;
  height: 60vw;
  background: radial-gradient(circle, rgba(99, 102, 241, 0.22) 0%, transparent 60%);
  filter: blur(20px);
  animation: glowDrift 12s ease-in-out infinite alternate;
  pointer-events: none;
}

.hero-glow::after {
  content: "";
  position: absolute;
  bottom: -60%;
  left: -70%;
  width: 45vw;
  height: 45vw;
  background: radial-gradient(circle, rgba(34, 211, 238, 0.16) 0%, transparent 60%);
}

@keyframes glowDrift {
  from { transform: translate(0, 0) scale(1); }
  to { transform: translate(-6%, 8%) scale(1.12); }
}

.hero-grid {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 3.5rem;
  align-items: center;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.45rem 1rem;
  border-radius: 999px;
  border: 1px solid var(--border-strong);
  background: rgba(255, 255, 255, 0.04);
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--muted);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.badge-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 0 rgba(34, 211, 238, 0.7);
  animation: dotPing 2s ease-out infinite;
}

@keyframes dotPing {
  0% { box-shadow: 0 0 0 0 rgba(34, 211, 238, 0.6); }
  70% { box-shadow: 0 0 0 9px rgba(34, 211, 238, 0); }
  100% { box-shadow: 0 0 0 0 rgba(34, 211, 238, 0); }
}

.hero h1 {
  font-size: clamp(2rem, 5vw, 3.7rem);
  font-weight: 800;
  margin: 1.3rem 0 1.1rem;
  overflow-wrap: break-word;
}

.typed-wrap {
  background: var(--grad);
  background-size: 200% auto;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: gradShift 6s ease-in-out infinite alternate;
}

@keyframes gradShift {
  to { background-position: 100% center; }
}

.typed-cursor {
  display: inline-block;
  width: 3px;
  height: 0.95em;
  margin-left: 4px;
  vertical-align: -0.08em;
  background: var(--accent);
  animation: cursorBlink 0.9s steps(1) infinite;
}

@keyframes cursorBlink { 50% { opacity: 0; } }

.hero-sub {
  color: var(--muted);
  font-size: 1.08rem;
  max-width: 34rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
  margin: 2rem 0 2.6rem;
}

.hero-stats {
  display: flex;
  gap: 2.4rem;
  flex-wrap: wrap;
}

.stat strong {
  display: block;
  font-family: var(--font-head);
  font-size: 1.8rem;
  font-weight: 800;
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.stat span:last-child {
  font-size: 0.83rem;
  color: var(--muted);
}

/* ---------- Mockup de navegador (genérico) ---------- */
.hero-visual { position: relative; }

.mock-window {
  --a: #22d3ee;
  --b: #6366f1;
  background: #0b1220;
  border: 1px solid var(--border-strong);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform 0.2s ease-out, box-shadow 0.3s ease;
  transform-style: preserve-3d;
}

@keyframes floatY {
  0%, 100% { translate: 0 0; }
  50% { translate: 0 -18px; }
}

.hero-mock {
  animation:
    heroUnfold 1.9s cubic-bezier(0.22, 1, 0.36, 1) 4.7s backwards,
    floatY 9s ease-in-out 6.8s infinite;
}

@keyframes heroUnfold {
  from { opacity: 0; transform: perspective(1000px) translateY(90px) rotateX(26deg); }
  to   { opacity: 1; transform: perspective(1000px) translateY(0) rotateX(0); }
}

.mock-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0.6rem 0.8rem;
  background: rgba(255, 255, 255, 0.03);
  border-bottom: 1px solid var(--border);
}

.mock-bar i {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #334155;
}

.mock-bar i:nth-child(1) { background: #f87171; }
.mock-bar i:nth-child(2) { background: #fbbf24; }
.mock-bar i:nth-child(3) { background: #34d399; }

.mock-url {
  margin-left: 0.5rem;
  flex: 1;
  font-size: 0.68rem;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 0.2rem 0.6rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mock-body {
  padding: 0.9rem;
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
  min-height: 300px;
}

/* Elementos simulados */
.mk-line {
  display: block;
  height: 8px;
  border-radius: 4px;
  background: rgba(148, 163, 184, 0.28);
  margin: 4px 0;
  position: relative;
  overflow: hidden;
}

.mk-line::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(100deg, transparent 20%, rgba(255, 255, 255, 0.16) 50%, transparent 80%);
  transform: translateX(-120%);
}

.site-card:hover .mk-line::after,
.hero-mock .mk-line::after { animation: shimmer 3.2s ease infinite; }

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

.mk-line.lg { height: 13px; background: rgba(226, 232, 240, 0.5); }
.mk-line.xl { height: 17px; background: rgba(226, 232, 240, 0.55); }
.mk-line.accent { background: linear-gradient(90deg, var(--a), var(--b)); }
.w-40 { width: 40%; } .w-50 { width: 50%; } .w-60 { width: 60%; }
.w-70 { width: 70%; } .w-80 { width: 80%; } .w-90 { width: 90%; }

.mk-btn {
  display: inline-block;
  width: 62px;
  height: 20px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--a), var(--b));
}

.mk-btn.ghost {
  background: transparent;
  border: 2px solid rgba(148, 163, 184, 0.4);
}

.mk-chip {
  display: inline-block;
  width: 74px;
  height: 14px;
  border-radius: 999px;
  background: linear-gradient(135deg, color-mix(in srgb, var(--a) 30%, transparent), color-mix(in srgb, var(--b) 30%, transparent));
  border: 1px solid color-mix(in srgb, var(--a) 45%, transparent);
}

.mk-nav {
  display: flex;
  align-items: center;
  gap: 0.7rem;
}

.mk-logo {
  width: 34px;
  height: 12px;
  border-radius: 6px;
  background: linear-gradient(135deg, var(--a), var(--b));
}

.mk-links {
  display: flex;
  gap: 6px;
  margin-left: auto;
}

.mk-links i {
  width: 22px;
  height: 6px;
  border-radius: 3px;
  background: rgba(148, 163, 184, 0.3);
}

.mk-search {
  flex: 1;
  height: 18px;
  border-radius: 999px;
  border: 1px solid var(--border-strong);
  background: rgba(255, 255, 255, 0.04);
}

.mk-hero {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.35rem;
  padding: 0.9rem;
  border-radius: 10px;
  background: linear-gradient(160deg, color-mix(in srgb, var(--a) 12%, transparent), color-mix(in srgb, var(--b) 10%, transparent));
}

.mk-hero.center { align-items: center; text-align: center; }
.mk-hero.center .mk-line { margin-inline: auto; }
.mk-hero.dark { background: linear-gradient(160deg, #101a2e, #0a101f); border: 1px solid var(--border); }
.mk-hero.left { align-items: flex-start; }

.mk-actions {
  display: flex;
  gap: 8px;
  margin-top: 8px;
}

.mk-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.6rem;
}

.mk-cards.cols-2 { grid-template-columns: repeat(2, 1fr); }
.mk-cards.cols-4 { grid-template-columns: repeat(4, 1fr); }

.mk-card {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0.6rem;
  background: rgba(255, 255, 255, 0.02);
  transition: transform 0.3s ease, border-color 0.3s ease;
}

.site-card:hover .mk-card { border-color: color-mix(in srgb, var(--a) 40%, transparent); }

.mk-ico {
  display: block;
  width: 20px;
  height: 20px;
  border-radius: 6px;
  margin-bottom: 6px;
  background: linear-gradient(135deg, var(--a), var(--b));
  opacity: 0.9;
}

.mk-img {
  display: block;
  width: 100%;
  height: 42px;
  border-radius: 8px;
  background: linear-gradient(135deg, color-mix(in srgb, var(--a) 45%, #1e293b), color-mix(in srgb, var(--b) 45%, #1e293b));
}

.mk-img.round { width: 34px; height: 34px; border-radius: 50%; flex-shrink: 0; }
.mk-img.tall { height: 100%; min-height: 86px; }

.mk-price {
  display: block;
  width: 34px;
  height: 9px;
  border-radius: 4px;
  background: linear-gradient(90deg, var(--a), var(--b));
  margin-top: 5px;
}

.mk-price.big { width: 48px; height: 14px; margin: 4px 0; }

.mk-menu { display: flex; flex-direction: column; gap: 0.5rem; }

.mk-dish {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0.45rem 0.6rem;
}

.mk-dish .mk-lines { flex: 1; }
.mk-dish .mk-lines .mk-line { margin: 2px 0; }

.mk-products {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.6rem;
}

.mk-prod {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0.5rem;
  background: rgba(255, 255, 255, 0.02);
}

.mk-split {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 0.7rem;
  align-items: stretch;
}

.mk-col { display: flex; flex-direction: column; justify-content: center; }

.mk-searchbar {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

.mk-searchbar span:first-child,
.mk-searchbar span:nth-child(2) {
  flex: 1;
  height: 20px;
  border-radius: 8px;
  border: 1px solid var(--border-strong);
  background: rgba(255, 255, 255, 0.04);
}

.mk-card.img-top { padding: 0.4rem; }
.mk-card.img-top .mk-img { height: 34px; margin-bottom: 5px; }

.mk-card.plan { text-align: left; }
.mk-card.plan.featured {
  border-color: color-mix(in srgb, var(--a) 60%, transparent);
  background: linear-gradient(160deg, color-mix(in srgb, var(--a) 12%, transparent), transparent);
}

.mk-chart {
  display: flex;
  align-items: flex-end;
  gap: 6px;
  height: 64px;
  padding: 0.6rem;
  border: 1px solid var(--border);
  border-radius: 10px;
}

.mk-chart i {
  flex: 1;
  height: 12%;
  border-radius: 4px 4px 2px 2px;
  background: linear-gradient(180deg, var(--accent), var(--accent-2));
  transition: height 1.1s cubic-bezier(0.22, 1, 0.36, 1);
}

.visible .mk-chart i,
.hero-mock .mk-chart i { height: var(--h); }

/* Capturas reales de sitios (slideshow) */
.site-shots {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: #0b1220;
}

.site-shots img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  opacity: 0;
  transition: opacity 1.2s ease;
}

.site-shots img.active {
  opacity: 1;
  animation: kenBurns 12s ease-in-out infinite alternate;
}

@keyframes kenBurns {
  from { transform: scale(1.02) translateY(0); }
  to   { transform: scale(1.18) translateY(-8px); }
}

.shots-dots {
  position: absolute;
  bottom: 10px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 6px;
  padding: 5px 8px;
  border-radius: 999px;
  background: rgba(4, 10, 22, 0.55);
  backdrop-filter: blur(4px);
  z-index: 2;
}

.shots-dots i {
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.45);
  transition: all 0.3s ease;
}

.shots-dots i.active {
  width: 18px;
  background: var(--accent);
}

/* Temas de color por mockup */
.mock-lab    { --a: #38bdf8; --b: #2563eb; }
.mock-rest   { --a: #fbbf24; --b: #ea580c; }
.mock-shop   { --a: #a78bfa; --b: #7c3aed; }
.mock-dental { --a: #2dd4bf; --b: #0d9488; }
.mock-house  { --a: #fb7185; --b: #e11d48; }
.mock-gym    { --a: #facc15; --b: #f97316; }

/* Tarjetas flotantes del hero */
.float-card {
  position: absolute;
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.75rem 1rem;
  border-radius: 14px;
  background: rgba(13, 21, 38, 0.9);
  border: 1px solid var(--border-strong);
  box-shadow: var(--shadow);
  backdrop-filter: blur(8px);
  z-index: 3;
}

.float-card strong { display: block; font-size: 0.9rem; font-family: var(--font-head); }
.float-card small { color: var(--muted); font-size: 0.72rem; }

.float-sales { top: 8%; right: -4%; animation: floatY 7.5s ease-in-out infinite; }
.float-order { bottom: 10%; left: -6%; animation: floatY 7.5s ease-in-out 1.8s infinite; }

.float-ico {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  font-size: 0.85rem;
}

.float-ico.up { background: rgba(52, 211, 153, 0.15); color: #34d399; }

.float-ico.bell {
  background: rgba(99, 102, 241, 0.18);
  position: relative;
}

.float-ico.bell::before { content: "🔔"; font-size: 0.95rem; }

.float-ico.bell::after {
  content: "";
  position: absolute;
  top: 5px;
  right: 6px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #f87171;
  border: 2px solid #0d1526;
  animation: dotPing 2s ease-out infinite;
}

/* Indicador de scroll */
.scroll-hint {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  width: 26px;
  height: 42px;
  border: 2px solid var(--border-strong);
  border-radius: 999px;
  z-index: 3;
}

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

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

/* ---------- Marquee ---------- */
.marquee {
  display: flex;
  overflow: hidden;
  border-block: 1px solid var(--border);
  background: var(--bg-2);
  padding: 1rem 0;
  user-select: none;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
}

.marquee-track {
  display: flex;
  align-items: center;
  gap: 2.2rem;
  padding-right: 2.2rem;
  flex-shrink: 0;
  min-width: max-content;
  animation: marqueeMove 40s linear infinite;
}

.marquee:hover .marquee-track { animation-play-state: paused; }

@keyframes marqueeMove {
  to { transform: translateX(-100%); }
}

.marquee-track span {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  white-space: nowrap;
}

.marquee-track i {
  color: var(--accent);
  font-size: 0.6rem;
  font-style: normal;
}

/* ---------- Secciones ---------- */
.section { padding: 6.5rem 0; position: relative; }

.section-alt {
  background:
    radial-gradient(60% 40% at 80% 0%, rgba(99, 102, 241, 0.08), transparent),
    radial-gradient(50% 40% at 10% 100%, rgba(34, 211, 238, 0.06), transparent),
    var(--bg-2);
  border-block: 1px solid var(--border);
}

.section-head {
  max-width: 44rem;
  margin: 0 auto 3.4rem;
  text-align: center;
}

.kicker {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.8rem;
}

.section-head h2 {
  font-size: clamp(1.8rem, 3.4vw, 2.6rem);
  font-weight: 800;
}

.section-head p {
  color: var(--muted);
  margin-top: 0.9rem;
  font-size: 1.03rem;
}

/* ---------- Grid y tarjetas ---------- */
.grid { display: grid; gap: 1.4rem; }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: transform 0.25s ease, border-color 0.3s ease, box-shadow 0.3s ease;
  transform-style: preserve-3d;
}

.service-card,
.app-card { padding: 1.8rem 1.6rem; }

.service-card:hover,
.app-card:hover,
.contact-card:hover {
  border-color: var(--border-strong);
  box-shadow: 0 24px 50px -24px rgba(2, 6, 18, 0.9), 0 0 0 1px rgba(34, 211, 238, 0.06);
}

.card-ico {
  display: inline-grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border-radius: 14px;
  background: var(--grad-soft);
  border: 1px solid rgba(34, 211, 238, 0.25);
  color: var(--accent);
  margin-bottom: 1.1rem;
  transition: transform 0.3s ease;
}

.card-ico svg { width: 26px; height: 26px; }

.service-card:hover .card-ico,
.app-card:hover .card-ico,
.contact-card:hover .card-ico { transform: translateY(-4px) rotate(-4deg); }

.card h3 { font-size: 1.12rem; font-weight: 700; margin-bottom: 0.55rem; }
.card p { color: var(--muted); font-size: 0.93rem; }

.card-tag {
  display: block;
  margin-top: 1.1rem;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  color: var(--accent);
  text-transform: uppercase;
}

/* ---------- Portafolio ---------- */
.filters {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-bottom: 2.6rem;
}

.filter-btn {
  padding: 0.5rem 1.3rem;
  border-radius: 999px;
  border: 1px solid var(--border-strong);
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 500;
  transition: all 0.25s ease;
}

.filter-btn:hover { color: var(--text); border-color: var(--accent); }

.filter-btn.active {
  background: var(--grad);
  border-color: transparent;
  color: #04121a;
  font-weight: 700;
}

.site-card {
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

/* Elevación 3D + halo al pasar el mouse sobre el portafolio */
.site-card {
  transition: transform 0.45s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.45s ease;
}

.site-card:hover {
  transform: translateY(-7px);
  box-shadow:
    0 32px 64px -22px rgba(2, 6, 18, 0.95),
    0 0 0 1px rgba(34, 211, 238, 0.16),
    0 0 44px -14px rgba(34, 211, 238, 0.35);
}

.site-card:hover .pill-live { box-shadow: 0 0 16px rgba(52, 211, 153, 0.45); }
.site-card:hover .mock-url { color: var(--accent); border-color: rgba(34, 211, 238, 0.4); }

.site-card .mock-window {
  border: none;
  border-radius: 0;
  border-bottom: 1px solid var(--border);
  box-shadow: none;
}

.site-card .mock-body { min-height: 240px; }

.site-card.pop { animation: cardPop 0.45s cubic-bezier(0.22, 1, 0.36, 1); }

@keyframes cardPop {
  from { opacity: 0; transform: scale(0.92) translateY(14px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

.site-info { padding: 1.4rem 1.5rem 1.6rem; }

.site-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
  margin-bottom: 0.55rem;
}

.pill {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 0.28rem 0.7rem;
  border-radius: 999px;
  border: 1px solid var(--border-strong);
  color: var(--muted);
  white-space: nowrap;
}

.pill-live {
  border-color: rgba(52, 211, 153, 0.45);
  color: #34d399;
  background: rgba(52, 211, 153, 0.08);
  position: relative;
}

.pill-soon {
  border-color: rgba(251, 191, 36, 0.5);
  color: #fbbf24;
  background: rgba(251, 191, 36, 0.08);
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-top: 0.95rem;
}

.tags span {
  font-size: 0.72rem;
  padding: 0.25rem 0.65rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border);
  color: var(--muted);
}

.site-link {
  display: inline-block;
  margin-top: 1rem;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--accent);
  transition: transform 0.25s ease;
}

.site-link:hover { transform: translateX(4px); }

.portfolio-note {
  text-align: center;
  margin-top: 2.8rem;
  color: var(--muted);
}

.portfolio-note a { color: var(--accent); font-weight: 600; }
.portfolio-note a:hover { text-decoration: underline; }

/* ---------- Programas ---------- */
.app-card {
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
}

/* Borde de energía que gira alrededor de las tarjetas al hover */
@property --ang {
  syntax: "<angle>";
  initial-value: 0deg;
  inherits: false;
}

.app-card::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1.5px;
  background: conic-gradient(from var(--ang, 0deg),
    transparent 0deg,
    rgba(34, 211, 238, 0.9) 42deg,
    rgba(99, 102, 241, 0.9) 84deg,
    transparent 132deg,
    transparent 360deg);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
          mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
          mask-composite: exclude;
  opacity: 0;
  transition: opacity 0.45s ease;
  animation: borderSpin 4.5s linear infinite;
  pointer-events: none;
}

.app-card:hover::before { opacity: 1; }

@keyframes borderSpin { to { --ang: 360deg; } }

.app-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.8rem;
}

.app-head .card-ico { margin-bottom: 0; }

.app-card h3 { margin-top: 1.1rem; }

.feature-list {
  margin-top: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.feature-list li {
  position: relative;
  padding-left: 1.5rem;
  font-size: 0.9rem;
  color: var(--muted);
}

.feature-list li::before {
  content: "✓";
  position: absolute;
  left: 0;
  top: 0;
  font-weight: 700;
  color: var(--accent);
}

.custom-cta {
  margin-top: 3rem;
  padding: 2.4rem;
  border-radius: var(--radius);
  border: 1px solid var(--border-strong);
  background:
    radial-gradient(80% 120% at 10% 0%, rgba(34, 211, 238, 0.12), transparent),
    radial-gradient(80% 120% at 90% 100%, rgba(99, 102, 241, 0.14), transparent),
    var(--surface);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  flex-wrap: wrap;
}

.custom-cta h3 { font-size: 1.4rem; margin-bottom: 0.4rem; }
.custom-cta p { color: var(--muted); max-width: 34rem; }

/* ---------- Proceso ---------- */
.steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.6rem;
  position: relative;
}

.steps::before {
  content: "";
  position: absolute;
  top: 34px;
  left: 12%;
  right: 12%;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--border-strong) 15%, var(--border-strong) 85%, transparent);
}

.step {
  text-align: center;
  padding: 0 0.5rem;
}

.step-num {
  display: inline-grid;
  place-items: center;
  width: 68px;
  height: 68px;
  border-radius: 50%;
  font-family: var(--font-head);
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--accent);
  background: var(--surface);
  border: 2px solid var(--border-strong);
  margin-bottom: 1.2rem;
  position: relative;
  z-index: 1;
  transition: all 0.35s ease;
}

.step:hover .step-num {
  background: var(--grad);
  color: #04121a;
  border-color: transparent;
  transform: translateY(-6px);
  box-shadow: 0 14px 30px -12px rgba(34, 211, 238, 0.6);
}

.step h3 { font-size: 1.08rem; margin-bottom: 0.5rem; }
.step p { color: var(--muted); font-size: 0.9rem; }

/* ---------- Presupuesto ---------- */
.presupuesto-card {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2.4rem;
  padding: 2.6rem;
  position: relative;
}

.budget-step h3 {
  font-size: 1.15rem;
  margin: 0.4rem 0 1.3rem;
}

.budget-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: var(--grad);
  color: #04121a;
  font-family: var(--font-head);
  font-weight: 800;
  font-size: 0.85rem;
}

.budget-marks {
  display: flex;
  justify-content: space-between;
  margin-top: 0.6rem;
}

.budget-marks span {
  font-size: 0.7rem;
  color: var(--muted);
  text-align: center;
}

.budget-value {
  margin-top: 1rem;
  font-family: var(--font-head);
  font-size: 1.35rem;
  font-weight: 700;
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Slider */
input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 8px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(34, 211, 238, 0.5), rgba(99, 102, 241, 0.5));
  outline: none;
  cursor: pointer;
}

input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: #fff;
  border: 5px solid var(--accent);
  box-shadow: 0 6px 18px -4px rgba(34, 211, 238, 0.8);
  transition: transform 0.2s ease;
}

input[type="range"]::-webkit-slider-thumb:hover { transform: scale(1.15); }
input[type="range"]::-moz-range-thumb {
  width: 26px; height: 26px; border-radius: 50%;
  background: #fff; border: 5px solid var(--accent); cursor: pointer;
}

.level-options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.9rem;
  margin-bottom: 1.4rem;
}

.level-btn {
  text-align: left;
  padding: 1.2rem 1.2rem;
  border-radius: 14px;
  border: 1px solid var(--border-strong);
  background: rgba(255, 255, 255, 0.02);
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  transition: all 0.3s ease;
}

.level-name {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 1.02rem;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.level-btn small {
  color: var(--muted);
  font-size: 0.8rem;
  line-height: 1.45;
}

.level-time {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--accent);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.level-btn:hover { border-color: var(--accent); transform: translateY(-2px); }

.level-btn.active {
  border-color: transparent;
  background:
    radial-gradient(120% 140% at 20% 0%, rgba(34, 211, 238, 0.14), transparent),
    rgba(255, 255, 255, 0.04);
  box-shadow: 0 0 0 2px var(--accent), 0 18px 40px -18px rgba(34, 211, 238, 0.5);
}

.level-btn.active .level-name::before {
  content: "✓";
  display: inline-grid;
  place-items: center;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--grad);
  color: #04121a;
  font-size: 0.72rem;
  font-weight: 800;
}

.level-btn.active .level-time { opacity: 1; }

.budget-note {
  margin-top: 0.8rem;
  font-size: 0.78rem;
  color: var(--muted);
  text-align: center;
}

.budget-summary {
  margin: 0.9rem 0;
  font-size: 0.85rem;
  color: var(--accent);
  font-weight: 600;
  text-align: center;
  min-height: 1.3em;
}

/* Rebote del valor al mover el slider */
.budget-value.pop { animation: valPop 0.45s cubic-bezier(0.34, 1.56, 0.64, 1); }

@keyframes valPop {
  from { transform: scale(0.9); opacity: 0.5; }
  to   { transform: scale(1); opacity: 1; }
}

/* ---------- Botón volver arriba ---------- */
.back-top {
  position: fixed;
  left: 1.4rem;
  bottom: 1.4rem;
  z-index: 90;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: var(--text);
  background: rgba(13, 21, 38, 0.85);
  border: 1px solid var(--border-strong);
  backdrop-filter: blur(8px);
  box-shadow: var(--shadow);
  opacity: 0;
  visibility: hidden;
  transform: translateY(16px) rotateX(70deg);
  transition:
    opacity 0.4s ease,
    visibility 0.4s,
    transform 0.55s cubic-bezier(0.34, 1.56, 0.64, 1),
    border-color 0.25s ease,
    color 0.25s ease;
}

.back-top svg { width: 20px; height: 20px; }

.back-top.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) rotateX(0deg);
}

.back-top:hover {
  border-color: var(--accent);
  color: var(--accent);
  transform: translateY(-4px);
}

/* ---------- Contacto ---------- */
.contact-grid {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 1.6rem;
  align-items: start;
}

.contact-cards {
  display: grid;
  gap: 1rem;
}

.contact-card {
  display: flex;
  align-items: center;
  gap: 1.1rem;
  padding: 1.3rem 1.4rem;
}

.contact-card .card-ico { margin-bottom: 0; flex-shrink: 0; }
.contact-card h3 { font-size: 1rem; margin-bottom: 0.15rem; }
.contact-card p { color: var(--muted); font-size: 0.92rem; word-break: break-word; }

a.contact-card:hover p { color: var(--accent); }

.contact-form {
  padding: 2.2rem;
  position: relative;
  overflow: hidden;
}

/* Línea de energía superior que se completa al escribir */
.contact-form::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--grad);
  box-shadow: 0 0 12px rgba(34, 211, 238, 0.5);
  transform-origin: left;
  transform: scaleX(0.18);
  opacity: 0.55;
  transition: transform 0.6s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.4s ease;
}

.contact-form:focus-within::before { transform: scaleX(1); opacity: 1; }

.contact-form h3 { font-size: 1.3rem; margin-bottom: 1.5rem; }

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.form-field { margin-bottom: 1.1rem; }

.form-field label {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--muted);
  margin-bottom: 0.4rem;
}

.form-field input,
.form-field select,
.form-field textarea {
  width: 100%;
  padding: 0.8rem 1rem;
  border-radius: 10px;
  border: 1px solid var(--border-strong);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text);
  font: inherit;
  font-size: 0.95rem;
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

.form-field select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 19px) 50%, calc(100% - 14px) 50%; background-size: 5px 5px; background-repeat: no-repeat; }
.form-field select option { background: var(--surface); color: var(--text); }

.form-field textarea { resize: vertical; min-height: 110px; }

.form-field input::placeholder,
.form-field textarea::placeholder { color: rgba(147, 161, 184, 0.55); }

.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(34, 211, 238, 0.15);
}

.form-field input.invalid,
.form-field textarea.invalid {
  border-color: #f87171;
  box-shadow: 0 0 0 3px rgba(248, 113, 113, 0.12);
}

.form-status {
  margin-top: 0.9rem;
  font-size: 0.88rem;
  min-height: 1.3em;
  text-align: center;
}

.form-status.ok { color: #34d399; }
.form-status.error { color: #f87171; }

#form-submit.loading { opacity: 0.7; pointer-events: none; }
#form-submit.loading span::after { content: "…"; animation: dots 1s steps(3) infinite; }

@keyframes dots {
  0% { content: ""; }
  33% { content: "."; }
  66% { content: ".."; }
  100% { content: "..."; }
}

/* ---------- Footer ---------- */
.footer {
  border-top: 1px solid var(--border);
  background: var(--bg-2);
  padding-top: 3.6rem;
  position: relative;
}

/* Costura luminosa en el borde superior */
.footer::before {
  content: "";
  position: absolute;
  top: -1px;
  left: 50%;
  transform: translateX(-50%);
  width: min(640px, 86%);
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(34, 211, 238, 0.7), rgba(99, 102, 241, 0.7), transparent);
  filter: blur(1px);
  pointer-events: none;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 2.5rem;
  padding-bottom: 2.8rem;
}

.footer-brand p {
  color: var(--muted);
  font-size: 0.92rem;
  margin-top: 0.9rem;
  max-width: 22rem;
}

.footer-col h4 {
  font-size: 0.85rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text);
  margin-bottom: 1rem;
}

.footer-col a,
.footer-col span {
  display: block;
  color: var(--muted);
  font-size: 0.92rem;
  margin-bottom: 0.55rem;
  transition: color 0.25s ease, transform 0.25s ease;
  word-break: break-word;
}

.footer-col a:hover { color: var(--accent); transform: translateX(4px); }

.footer-bottom {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  padding-block: 1.4rem;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 0.82rem;
}

/* ---------- Botón flotante WhatsApp ---------- */
.whats-float {
  position: fixed;
  right: 1.4rem;
  bottom: 1.4rem;
  z-index: 90;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: #22c55e;
  color: #fff;
  box-shadow: 0 14px 34px -10px rgba(34, 197, 94, 0.65);
  transition: transform 0.25s ease;
  animation: whatsPulse 2.6s ease-out infinite;
}

.whats-float svg { width: 30px; height: 30px; }
.whats-float:hover { transform: scale(1.1) rotate(6deg); }

@keyframes whatsPulse {
  0% { box-shadow: 0 14px 34px -10px rgba(34, 197, 94, 0.65), 0 0 0 0 rgba(34, 197, 94, 0.45); }
  70% { box-shadow: 0 14px 34px -10px rgba(34, 197, 94, 0.65), 0 0 0 16px rgba(34, 197, 94, 0); }
  100% { box-shadow: 0 14px 34px -10px rgba(34, 197, 94, 0.65), 0 0 0 0 rgba(34, 197, 94, 0); }
}

/* ---------- Animación de aparición (reveal) ---------- */
/* Efecto premium al aparecer: desenfoque + desplazamiento (estilo huawei) */
[data-reveal] {
  opacity: 0;
  transform: translateY(46px);
  filter: blur(12px);
  transition:
    opacity 1.1s ease,
    transform 1.25s cubic-bezier(0.16, 1, 0.3, 1),
    filter 1.1s ease;
  will-change: opacity, transform, filter;
}

[data-reveal].visible {
  opacity: 1;
  transform: translateY(0);
  filter: blur(0);
}

/* Las tarjetas entran DESPLEGÁNDOSE en 3D (como una puerta) */
.card[data-reveal] {
  transform: translateY(56px) perspective(1000px) rotateX(14deg);
  transform-origin: 50% 0;
}

.card[data-reveal].visible {
  transform: translateY(0) perspective(1000px) rotateX(0deg);
}

/* Títulos que se revelan palabra por palabra */
.section-head .wd {
  display: inline-block;
  opacity: 0;
  transform: translateY(28px);
  filter: blur(9px);
  transition:
    opacity 0.9s ease,
    transform 1s cubic-bezier(0.16, 1, 0.3, 1),
    filter 0.9s ease;
  transition-delay: var(--d, 0ms);
}

.section-head.visible .wd {
  opacity: 1;
  transform: translateY(0);
  filter: blur(0);
}

.section-head .wd-sep { white-space: pre; }

/* ---------- Reflejo "glare" que sigue al cursor ---------- */
.service-card, .app-card, .contact-card { position: relative; }

.service-card::after,
.app-card::after,
.contact-card::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  background:
    radial-gradient(560px circle at var(--mx, 50%) var(--my, 50%), rgba(255, 255, 255, 0.13), transparent 55%),
    radial-gradient(300px circle at var(--mx, 50%) var(--my, 50%), rgba(34, 211, 238, 0.12), transparent 70%);
  opacity: 0;
  transition: opacity 0.35s ease;
}

.service-card:hover::after,
.app-card:hover::after,
.contact-card:hover::after { opacity: 1; }

/* ---------- Hero: parallax 3D con el mouse ---------- */
.hero-visual {
  transition: transform 1.2s cubic-bezier(0.16, 1, 0.3, 1);
  transform-style: preserve-3d;
  will-change: transform;
}

.hero-visual .mock-window,
.hero-visual .float-card {
  transition: transform 1.4s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: transform;
}

.hero-glow { will-change: transform; transition: transform 0.9s ease-out; }

/* ============================================================
   NOBAMIND 3D — Sección Tecnología: cubo interactivo + órbitas
   ============================================================ */
#hero-canvas { cursor: grab; touch-action: pan-y; }
#hero-canvas.grabbing { cursor: grabbing; }

.tech-grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 3.5rem;
  align-items: center;
}

.tech-copy .feature-list { margin: 1.4rem 0 2rem; }

.stage {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.4rem;
}

.scene {
  position: relative;
  width: min(100%, 420px);
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  perspective: 1100px;
  cursor: grab;
}

.stage.dragging .scene { cursor: grabbing; }

/* Resplandor central detrás del cubo */
.scene::before {
  content: "";
  position: absolute;
  inset: -12%;
  background:
    radial-gradient(circle at 50% 48%, rgba(34, 211, 238, 0.15), transparent 55%),
    radial-gradient(circle at 62% 66%, rgba(99, 102, 241, 0.18), transparent 60%);
  filter: blur(10px);
  animation: corePulse 5s ease-in-out infinite alternate;
  pointer-events: none;
}

@keyframes corePulse {
  to { opacity: 0.55; transform: scale(1.08); }
}

.cube {
  --cs: 190px;               /* lado del cubo */
  --cz: calc(var(--cs) / 2); /* semilado: profundidad de cada cara */
  width: var(--cs);
  height: var(--cs);
  position: relative;
  transform-style: preserve-3d;
  transform: rotateX(-18deg) rotateY(28deg); /* fallback sin JS */
  will-change: transform;
}

.face {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  padding: 1rem;
  text-align: center;
  color: var(--fa, #22d3ee);
  border-radius: 14px;
  border: 1px solid color-mix(in srgb, var(--fa, #22d3ee) 35%, transparent);
  background:
    linear-gradient(160deg,
      color-mix(in srgb, var(--fa, #22d3ee) 14%, rgba(13, 21, 38, 0.82)),
      rgba(10, 17, 32, 0.88));
  box-shadow:
    inset 0 0 34px color-mix(in srgb, var(--fa, #22d3ee) 12%, transparent),
    0 0 24px -8px color-mix(in srgb, var(--fa, #22d3ee) 45%, transparent);
  backdrop-filter: blur(3px);
}

.face svg {
  width: 40px;
  height: 40px;
  filter: drop-shadow(0 0 10px color-mix(in srgb, var(--fa, #22d3ee) 60%, transparent));
}

.face figcaption {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 0.96rem;
  letter-spacing: 0.02em;
  color: var(--text);
}

.face small {
  font-size: 0.68rem;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--muted);
}

.f-front  { transform: rotateY(0deg)   translateZ(var(--cz)); }
.f-back   { transform: rotateY(180deg) translateZ(var(--cz)); }
.f-right  { transform: rotateY(90deg)  translateZ(var(--cz)); }
.f-left   { transform: rotateY(-90deg) translateZ(var(--cz)); }
.f-top    { transform: rotateX(90deg)  translateZ(var(--cz)); }
.f-bottom { transform: rotateX(-90deg) translateZ(var(--cz)); }

/* Anillos orbitales con satélite */
.orbit {
  position: absolute;
  top: 50%;
  left: 50%;
  border: 1px dashed rgba(103, 232, 249, 0.28);
  border-radius: 50%;
  pointer-events: none;
}

.orbit i {
  position: absolute;
  top: -5px;
  left: calc(50% - 5px);
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: radial-gradient(circle, #ecfeff 0%, #67e8f9 45%, transparent 75%);
  box-shadow: 0 0 14px rgba(103, 232, 249, 0.9);
}

.orbit.o1 {
  --tiltX: 74deg;
  width: 78%;
  height: 78%;
  margin: -39% 0 0 -39%;
  animation: orbitSpin 26s linear infinite;
}

.orbit.o2 {
  --tiltX: 64deg;
  width: 106%;
  height: 106%;
  margin: -53% 0 0 -53%;
  border-color: rgba(129, 140, 248, 0.22);
  animation: orbitSpin 40s linear infinite reverse;
}

.orbit.o2 i {
  top: auto;
  bottom: -5px;
  background: radial-gradient(circle, #eef2ff 0%, #818cf8 45%, transparent 75%);
  box-shadow: 0 0 14px rgba(129, 140, 248, 0.9);
}

@keyframes orbitSpin {
  from { transform: rotateX(var(--tiltX, 74deg)) rotateZ(0deg); }
  to   { transform: rotateX(var(--tiltX, 74deg)) rotateZ(360deg); }
}

.drag-hint {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
  animation: hintFade 3s ease-in-out infinite;
}

@keyframes hintFade {
  0%, 100% { opacity: 0.55; }
  50% { opacity: 1; }
}

/* ---------- Tooltip del botón flotante de WhatsApp ---------- */
.whats-tip {
  position: absolute;
  right: calc(100% + 12px);
  top: 50%;
  translate: 0 -50%;
  white-space: nowrap;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text);
  background: rgba(13, 21, 38, 0.92);
  border: 1px solid var(--border-strong);
  padding: 0.45rem 0.85rem;
  border-radius: 999px;
  backdrop-filter: blur(6px);
  opacity: 0;
  transform: translateX(8px);
  transition: opacity 0.3s ease, transform 0.3s ease;
  pointer-events: none;
}

.whats-float:hover .whats-tip {
  opacity: 1;
  transform: translateX(0);
}

/* ---------- Luz ambiente que sigue al cursor ---------- */
#cursor-glow {
  position: fixed;
  top: 0;
  left: 0;
  width: 520px;
  height: 520px;
  border-radius: 50%;
  pointer-events: none;
  z-index: 80;
  background: radial-gradient(circle, rgba(34, 211, 238, 0.07), rgba(99, 102, 241, 0.05) 40%, transparent 70%);
  mix-blend-mode: screen;
  opacity: 0;
  transition: opacity 0.6s ease;
  will-change: transform;
}

#cursor-glow.on { opacity: 1; }

/* ---------- Scrollbar y foco accesible ---------- */
html { scrollbar-color: #274069 var(--bg); }

::-webkit-scrollbar { width: 11px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb {
  background: #1b2946;
  border-radius: 8px;
  border: 3px solid var(--bg);
}
::-webkit-scrollbar-thumb:hover { background: #2c477a; }

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

/* ============================================================
   SHOWCASE 3D — laptop que se levanta al hacer scroll
   ============================================================ */
.showcase {
  position: relative;
  min-height: 330vh;
  background:
    radial-gradient(50% 30% at 80% 20%, rgba(99, 102, 241, 0.08), transparent),
    var(--bg);
}

.sc-pin {
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 5rem 0 2rem;
  will-change: transform;
}

.sc-head {
  text-align: center;
  max-width: 40rem;
  margin: 0 auto 1.5rem;
}

.sc-head h2 { font-size: clamp(1.7rem, 3.2vw, 2.4rem); font-weight: 800; }
.sc-head p { color: var(--muted); margin-top: 0.7rem; }

.device-wrap {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.device {
  transform-style: preserve-3d;
  will-change: transform;
  /* Fase 1 (0→0.35): se levanta hasta quedar frente a ti
     Fase 2 (0.52→1): ZOOM hacia la pantalla — entras en ella */
  transform:
    perspective(1400px)
    translateY(calc((1 - min(var(--p, 0) * 2.9, 1)) * 14vh))
    rotateX(calc(max(0, 0.35 - var(--p, 0)) * 160deg))
    scale(calc(1 + max(0, var(--p, 0) - 0.52) * 4.6));
}

.dev-screen {
  position: relative;
  width: min(660px, 88vw);
  aspect-ratio: 16 / 9.4;
  background: #0b1220;
  border: 1px solid var(--border-strong);
  border-radius: 16px 16px 10px 10px;
  overflow: hidden;
  box-shadow:
    0 40px 90px -30px rgba(2, 6, 18, 1),
    0 0 60px -18px rgba(34, 211, 238, 0.25);
}

.dev-glare {
  position: absolute;
  inset: 0;
  background: linear-gradient(115deg, transparent 42%, rgba(255, 255, 255, 0.06) 50%, transparent 58%);
  pointer-events: none;
  opacity: calc(1 - clamp(0, (var(--p, 0) - 0.5) * 3, 1));
}

/* Durante el zoom la pantalla se vuelve el mundo entero */
.dev-screen {
  border-radius: calc(16px + max(0, var(--p, 0) - 0.5) * 40px);
}

.dev-base {
  opacity: calc(1 - clamp(0, (var(--p, 0) - 0.45) * 3.2, 1));
}

/* El encabezado se aparta al empezar el zoom (especificidad alta
   para vencer a [data-reveal].visible) */
.showcase .sc-head[data-reveal].visible {
  opacity: calc(1 - clamp(0, (var(--p, 0) - 0.48) * 3.2, 1));
  transform: translateY(calc(clamp(0, (var(--p, 0) - 0.48) * 3.2, 1) * -16px));
  transition: opacity 0.3s ease, transform 0.3s ease, filter 0.3s ease;
}

/* Mensaje final: ya entraste */
.sc-enter {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  text-align: center;
  z-index: 4;
  pointer-events: none;
  padding: 1.5rem;
  opacity: clamp(0, calc((var(--p, 0) - 0.9) * 12), 1);
}

.sc-enter > div {
  background: radial-gradient(65% 75% at 50% 50%, rgba(7, 11, 20, 0.78), transparent);
  padding: 2.2rem 3rem;
  border-radius: 24px;
}

.sc-enter h3 {
  font-family: var(--font-head);
  font-size: clamp(1.5rem, 3.4vw, 2.4rem);
  font-weight: 800;
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 0.5rem;
}

.sc-enter p { color: var(--text); max-width: 30rem; margin-inline: auto; }

.sc-enter .sc-down {
  display: inline-block;
  margin-top: 1.1rem;
  color: var(--accent);
  animation: floatY 2.2s ease-in-out infinite;
}

.sc-enter .sc-down svg { width: 26px; height: 26px; }

.dev-base {
  width: min(780px, 100vw);
  height: 17px;
  margin: 0 auto;
  background: linear-gradient(#1a2742, #0c1424);
  border: 1px solid var(--border-strong);
  border-top: none;
  border-radius: 0 0 20px 20px;
  position: relative;
}

.dev-base::before {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 120px;
  height: 7px;
  border-radius: 0 0 10px 10px;
  background: rgba(7, 11, 20, 0.9);
}

/* UI simulada dentro de la pantalla */
.du { display: flex; height: 100%; }

.du-side {
  width: 54px;
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 14px 0;
  align-items: center;
}

.du-side i {
  width: 12px;
  height: 12px;
  border-radius: 4px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  opacity: 0.85;
}
.du-side i:nth-child(even) { background: rgba(148, 163, 184, 0.35); }

.du-main {
  flex: 1;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.du-stats { display: flex; gap: 10px; }

.du-stat {
  flex: 1;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.02);
  padding: 9px;
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.du-k {
  display: block;
  height: 6px;
  width: 55%;
  border-radius: 3px;
  background: rgba(148, 163, 184, 0.35);
}

.du-v {
  display: block;
  height: 12px;
  width: 70%;
  border-radius: 4px;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  opacity: 0.9;
}

.du-stat i {
  display: block;
  margin-top: auto;
  height: 26px;
  border-radius: 5px;
  background: linear-gradient(180deg, rgba(34, 211, 238, 0.5), rgba(99, 102, 241, 0.5));
  transition: height 1s cubic-bezier(0.22, 1, 0.36, 1) 0.15s;
}

.du-chart {
  flex: 1;
  min-height: 110px;
  display: flex;
  align-items: flex-end;
  gap: 8px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.02);
  padding: 12px;
}

.du-chart i {
  flex: 1;
  height: 8%;
  border-radius: 4px 4px 0 0;
  background: linear-gradient(180deg, var(--accent), var(--accent-2));
  transition: height 1.1s cubic-bezier(0.22, 1, 0.36, 1);
}

.du-foot { display: flex; flex-direction: column; gap: 6px; }
.du-foot .mk-line { margin: 0; }

/* La pantalla "enciende" al llegar a cierto punto del scroll */
.showcase .du-chart i,
.showcase .du-stat i { height: 8%; }

.showcase.lit .du-chart i,
.showcase.lit .du-stat i { height: var(--h); }

.dev-screen {
  opacity: calc(0.45 + var(--p, 0) * 0.55);
}

/* Chips flotantes que aparecen con el scroll */
.chip {
  position: absolute;
  z-index: 3;
  padding: 0.65rem 1.05rem;
  border-radius: 999px;
  font-size: 0.86rem;
  font-weight: 600;
  color: var(--text);
  background: rgba(13, 21, 38, 0.88);
  border: 1px solid var(--border-strong);
  backdrop-filter: blur(8px);
  box-shadow: var(--shadow);
  white-space: nowrap;
}

.chip-a {
  top: 6%;
  left: max(2%, calc(50% - 420px));
  opacity: calc(clamp(0, (var(--p, 0) - 0.14) * 7, 1) * (1 - clamp(0, (var(--p, 0) - 0.55) * 4, 1)));
  transform: translateY(calc((1 - min(var(--p, 0) * 4, 1)) * 26px));
}

.chip-b {
  bottom: 16%;
  right: max(2%, calc(50% - 430px));
  opacity: calc(clamp(0, (var(--p, 0) - 0.24) * 7, 1) * (1 - clamp(0, (var(--p, 0) - 0.55) * 4, 1)));
  transform: translateY(calc((1 - clamp(0, (var(--p, 0) - 0.24) * 3, 1)) * 26px));
}

.chip-c {
  top: 38%;
  right: max(1%, calc(50% - 470px));
  opacity: calc(clamp(0, (var(--p, 0) - 0.34) * 7, 1) * (1 - clamp(0, (var(--p, 0) - 0.55) * 4, 1)));
  transform: translateX(calc((1 - clamp(0, (var(--p, 0) - 0.34) * 3, 1)) * -26px));
}

/* ============================================================
   AURORAS del hero + título letra por letra en 3D
   ============================================================ */
.aurora {
  position: absolute;
  inset: -18%;
  pointer-events: none;
  filter: blur(64px);
  opacity: 0.6;
}

.aurora i { position: absolute; border-radius: 50%; }

.aurora i:nth-child(1) {
  width: 46vw;
  height: 46vw;
  left: -12%;
  top: -14%;
  background: radial-gradient(circle at 32% 32%, rgba(34, 211, 238, 0.20), transparent 65%);
  animation: blobA 17s ease-in-out infinite alternate;
}

.aurora i:nth-child(2) {
  width: 52vw;
  height: 52vw;
  right: -16%;
  bottom: -26%;
  background: radial-gradient(circle at 68% 68%, rgba(99, 102, 241, 0.22), transparent 65%);
  animation: blobB 21s ease-in-out infinite alternate;
}

@keyframes blobA { to { transform: translate(9%, 8%) scale(1.18); } }
@keyframes blobB { to { transform: translate(-8%, -7%) scale(1.13); } }

/* Título del hero: letras que entran girando (gateado por .intro-done) */
.hero h1 .lw { display: inline-block; white-space: nowrap; }

.hero h1 .ltr {
  display: inline-block;
  opacity: 0;
  transform: translateY(0.55em) rotateX(75deg);
  transform-origin: bottom center;
  transition:
    opacity 0.65s ease,
    transform 0.85s cubic-bezier(0.16, 1, 0.3, 1);
  transition-delay: var(--ld, 0ms);
  will-change: transform, opacity;
}

body.intro-done .hero h1 .ltr,
body.no-intro .hero h1 .ltr {
  opacity: 1;
  transform: translateY(0) rotateX(0);
}

/* Subrayado animado en los títulos de sección */
.section-head h2::after {
  content: "";
  display: block;
  height: 3px;
  width: 74px;
  margin: 16px auto 0;
  border-radius: 3px;
  background: var(--grad);
  box-shadow: 0 0 14px rgba(34, 211, 238, 0.5);
  transform: scaleX(0);
  transition: transform 0.9s cubic-bezier(0.16, 1, 0.3, 1) 0.25s;
}

.section-head.visible h2::after { transform: scaleX(1); }

/* ============================================================
   CARRUSSEL CILÍNDRICO 3D de servicios
   ============================================================ */
.car-stage {
  position: relative;
  height: 430px;
  perspective: 1500px;
  touch-action: pan-y;
  cursor: grab;
}

.car-stage.dragging { cursor: grabbing; }

.car-ring {
  position: absolute;
  inset: 0;
  margin: auto;
  width: 272px;
  height: 360px;
  transform-style: preserve-3d;
  /* rotateY lo maneja JS vía --a (grados) */
  transform: rotateX(-5deg) rotateY(var(--a, 0deg));
  will-change: transform;
}

.car-item {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.7rem;
  text-align: center;
  padding: 1.7rem 1.5rem;
  border-radius: 20px;
  background:
    linear-gradient(165deg, rgba(17, 28, 51, 0.92), rgba(10, 16, 30, 0.94));
  border: 1px solid color-mix(in srgb, var(--accent) 22%, var(--border-strong));
  box-shadow:
    0 24px 60px -24px rgba(2, 6, 18, 0.95),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  /* translateZ lo escribe JS por ítem */
}

.car-item .card-ico { margin-bottom: 0.2rem; }
.car-item h3 { font-size: 1.15rem; }
.car-item p { color: var(--muted); font-size: 0.9rem; max-width: 210px; }

.car-btn {
  position: absolute;
  top: 50%;
  translate: 0 -50%;
  z-index: 5;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: var(--text);
  background: rgba(13, 21, 38, 0.85);
  border: 1px solid var(--border-strong);
  backdrop-filter: blur(8px);
  box-shadow: var(--shadow);
  transition: transform 0.25s ease, border-color 0.25s ease, color 0.25s ease;
}

.car-btn svg { width: 22px; height: 22px; }
.car-btn:hover { transform: scale(1.1); border-color: var(--accent); color: var(--accent); }

.car-prev { left: clamp(4px, 6vw, 90px); }
.car-next { right: clamp(4px, 6vw, 90px); }

.car-hint {
  text-align: center;
  margin-top: 1.6rem;
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}

/* ============================================================
   TIMELINE del proceso que se ilumina con el scroll
   ============================================================ */
.steps.timeline::before {
  background: linear-gradient(90deg, transparent, var(--border-strong) 15%, var(--border-strong) 85%, transparent);
}

.steps.timeline::after {
  content: "";
  position: absolute;
  top: 34px;
  left: 12%;
  right: 12%;
  height: 2px;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  box-shadow: 0 0 12px rgba(34, 211, 238, 0.55);
  transform-origin: left;
  transform: scaleX(var(--prog, 0));
  pointer-events: none;
}

.steps.timeline .step {
  opacity: 0.35;
  transform: translateY(14px);
  transition: opacity 0.7s ease, transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}

.steps.timeline .step.active {
  opacity: 1;
  transform: translateY(0);
}

.steps.timeline .step-num {
  transition: all 0.45s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.steps.timeline .step.active .step-num {
  background: var(--grad);
  color: #04121a;
  border-color: transparent;
  box-shadow: 0 14px 34px -10px rgba(34, 211, 238, 0.65);
  animation: coinIn 0.7s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes coinIn {
  from { transform: rotateY(180deg) translateY(-10px); }
  to   { transform: rotateY(0deg) translateY(0); }
}

/* Modo captura (?nointro): estados finales al instante */
html.shot *,
html.shot *::before,
html.shot *::after {
  transition-duration: 0.01ms !important;
  transition-delay: 0ms !important;
  animation-delay: 0ms !important;
}

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
  .hero-grid { grid-template-columns: 1fr; gap: 3rem; }
  .hero-visual { max-width: 560px; margin-inline: auto; width: 100%; }
  .float-sales { right: 0; }
  .float-order { left: 0; }
  .tech-grid { grid-template-columns: 1fr; gap: 3rem; }
  .stage { order: -1; }
  .scene { width: min(100%, 360px); }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .steps { grid-template-columns: repeat(2, 1fr); gap: 2.4rem; }
  .steps::before { display: none; }
  .contact-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 900px) {
  .presupuesto-card { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
  .menu-toggle { display: flex; }

  .nav-links {
    position: fixed;
    inset: 0;
    flex-direction: column;
    justify-content: center;
    gap: 1.6rem;
    background: rgba(7, 11, 20, 0.97);
    backdrop-filter: blur(16px);
    transform: translateX(100%);
    transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1);
  }

  .nav-links.open { transform: translateX(0); }
  .nav-links > a:not(.btn) { font-size: 1.3rem; }
  .nav-cta { margin-left: 0; }

  .section { padding: 4.5rem 0; }
  .hero { padding-top: 7rem; }
  .hero-stats { gap: 1.6rem; }
  .scroll-hint { display: none; }
}

@media (max-width: 560px) {
  .grid-4, .grid-3 { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .custom-cta { padding: 1.8rem; text-align: center; justify-content: center; }
  .float-card { display: none; }
  .footer-grid { grid-template-columns: 1fr; }
  .hero-actions .btn { flex: 1 1 190px; }
  .hero h1 { font-size: 1.95rem; }
  .presupuesto-card { padding: 1.5rem; gap: 1.8rem; }
  .level-options { grid-template-columns: 1fr; }
  .budget-marks span { font-size: 0.62rem; }
  .cube { --cs: 138px; }
  .face svg { width: 30px; height: 30px; }
  .face figcaption { font-size: 0.8rem; }
  .scene { perspective: 900px; }
  #cursor-glow { display: none; }
}

/* ---------- Responsive de las secciones nuevas ---------- */
@media (max-width: 1024px) {
  .showcase { min-height: 280vh; }
  .sc-head { margin-bottom: 1rem; }
  .steps.timeline::after { display: none; }
}

@media (max-width: 768px) {
  .chip { display: none; }
  .dev-base { height: 12px; border-radius: 0 0 14px 14px; width: min(780px, 94vw); }

  /* Evita que iOS haga zoom al tocar los campos del formulario */
  .form-field input,
  .form-field select,
  .form-field textarea { font-size: 16px; }

  /* Menos blur = más fluido en móviles */
  .aurora { filter: blur(44px); opacity: 0.5; }
  #hero-canvas { opacity: 0.45; }
  .sc-pin { min-height: 100vh; min-height: 100svh; }

  /* El cubo también responde al dedo (gesto horizontal) */
  .scene { touch-action: pan-y; }
}

@media (max-width: 560px) {
  .showcase { min-height: 240vh; }
  .du-side { display: none; }

  /* Carrusel: radio más compacto para que la tarjeta frontal quepa */
  .car-stage { height: 380px; perspective: 1500px; }
  .car-ring { width: 212px; height: 312px; }
  .car-item { padding: 1.25rem 0.9rem; }
  .car-item h3 { font-size: 1rem; }
  .car-item p { font-size: 0.84rem; max-width: 180px; }
  .car-btn { width: 44px; height: 44px; }
  .car-prev { left: 2px; }
  .car-next { right: 2px; }

  /* Stats del hero en rejilla ordenada (nada queda huérfano) */
  .hero-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.9rem;
  }
  .stat strong { font-size: 1.45rem; }
  .stat span:last-child { font-size: 0.72rem; line-height: 1.35; }

  /* Volver arriba: sobre el botón de WhatsApp para pulgar cómodo */
  .back-top {
    left: auto;
    right: 1.15rem;
    bottom: 5.6rem;
    width: 46px;
    height: 46px;
  }

  /* La intro usa mejor el ancho del teléfono */
  .intro-lockup { width: min(480px, 92vw); }
}

/* ---------- Accesibilidad: menos movimiento ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  html { scroll-behavior: auto; }
  [data-reveal], .card[data-reveal] { opacity: 1; transform: none; }
  #hero-canvas { display: none; }
}

/* ============================================================
   3D PROFUNDO por sección — capas a distintas profundidades
   ============================================================ */

/* --- PORTAFOLIO: la pantalla "flota" sobre la tarjeta --- */
.site-card { overflow: visible; }

.site-card .mock-window:first-child {
  border-radius: var(--radius) var(--radius) 0 0;
  transform: translateZ(28px);
  transition: transform 0.55s cubic-bezier(0.16, 1, 0.3, 1);
}

.site-card:hover .mock-window:first-child { transform: translateZ(48px); }

.site-card .site-info {
  position: relative;
  transform: translateZ(14px);
}

.site-card:hover .site-info h3 { color: var(--accent); transition: color 0.35s ease; }

/* Glare también en el portafolio */
.site-card::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  background:
    radial-gradient(560px circle at var(--mx, 50%) var(--my, 50%), rgba(255, 255, 255, 0.12), transparent 55%),
    radial-gradient(300px circle at var(--mx, 50%) var(--my, 50%), rgba(34, 211, 238, 0.12), transparent 70%);
  opacity: 0;
  transition: opacity 0.35s ease;
}

.site-card:hover::after { opacity: 1; }

/* --- PROGRAMAS: icono que salta + lista que entra girando --- */
.app-card { overflow: visible; }

.app-card .card-ico {
  transform: translateZ(32px);
  transition: transform 0.45s cubic-bezier(0.34, 1.56, 0.64, 1), filter 0.35s ease;
}

.app-card:hover .card-ico {
  transform: translateZ(50px) scale(1.08) rotate(-4deg);
  filter: drop-shadow(0 8px 18px rgba(34, 211, 238, 0.45));
}

.app-card h3 { transform: translateZ(20px); }
.app-card > p { transform: translateZ(10px); }

.app-card .feature-list li {
  opacity: 0;
  transform: perspective(600px) translateX(-14px) rotateY(18deg);
  transition:
    opacity 0.5s ease,
    transform 0.65s cubic-bezier(0.16, 1, 0.3, 1);
}

.app-card.visible .feature-list li { opacity: 1; transform: perspective(600px) rotateY(0deg) translateX(0); }
.app-card.visible .feature-list li:nth-child(1) { transition-delay: 0.15s; }
.app-card.visible .feature-list li:nth-child(2) { transition-delay: 0.27s; }
.app-card.visible .feature-list li:nth-child(3) { transition-delay: 0.39s; }

/* --- PRESUPUESTO: piezas flotando en capas --- */
.presupuesto-card .budget-num { transform: translateZ(30px); box-shadow: -6px 8px 18px rgba(2, 6, 18, 0.45); }
.presupuesto-card .budget-step h3 { transform: translateZ(16px); }

.level-btn:not(.active):hover {
  transform: translateY(-3px) perspective(700px) rotateX(7deg);
}

input[type="range"]::-webkit-slider-thumb {
  animation: thumbHalo 2.6s ease-out infinite;
}

@keyframes thumbHalo {
  0%   { box-shadow: 0 6px 18px -4px rgba(34, 211, 238, 0.8), 0 0 0 0 rgba(34, 211, 238, 0.45); }
  70%  { box-shadow: 0 6px 18px -4px rgba(34, 211, 238, 0.8), 0 0 0 12px rgba(34, 211, 238, 0); }
  100% { box-shadow: 0 6px 18px -4px rgba(34, 211, 238, 0.8), 0 0 0 0 rgba(34, 211, 238, 0); }
}

/* --- CONTACTO: iconos que se acercan al vuelo + campos que se elevan --- */
.contact-card .card-ico {
  transform: translateZ(26px);
  transition: transform 0.45s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.contact-card:hover .card-ico {
  transform: translateZ(42px) rotate(-6deg) scale(1.06);
}

.form-field input,
.form-field select,
.form-field textarea {
  transition:
    border-color 0.25s ease,
    box-shadow 0.25s ease,
    transform 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}

.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus { transform: translateY(-2px); }

/* --- FOOTER: el logo da un giro completo al hover --- */
.footer .brand-logo { transition: transform 0.9s cubic-bezier(0.34, 1.56, 0.64, 1); }

.footer .brand:hover .brand-logo { transform: rotateY(360deg) scale(1.05); }

/* ============================================================
   3D ESCANDALOSO — portafolio, presupuesto y contacto
   ============================================================ */

/* Barrido de brillo sobre la pantalla del mockup */
.site-card .mock-window { position: relative; }

.site-card .mock-window::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(105deg, transparent 42%, rgba(255, 255, 255, 0.10) 50%, transparent 58%);
  transform: translateX(-130%);
  transition: transform 0.85s ease;
  pointer-events: none;
  z-index: 2;
}

.site-card:hover .mock-window::after { transform: translateX(130%); }

/* Mini-cubos 3D decorativos (6 caras reales, girando solos) */
.mini-cube {
  position: absolute;
  width: 46px;
  height: 46px;
  transform-style: preserve-3d;
  animation: mcSpin 14s linear infinite;
  pointer-events: none;
  z-index: 2;
}

.mini-cube i {
  position: absolute;
  inset: 0;
  border: 1px solid rgba(34, 211, 238, 0.45);
  border-radius: 6px;
  background: linear-gradient(135deg, rgba(34, 211, 238, 0.10), rgba(99, 102, 241, 0.16));
  box-shadow: inset 0 0 14px rgba(34, 211, 238, 0.18);
}

.mini-cube i:nth-child(1) { transform: rotateY(0deg)   translateZ(23px); }
.mini-cube i:nth-child(2) { transform: rotateY(90deg)  translateZ(23px); }
.mini-cube i:nth-child(3) { transform: rotateY(180deg) translateZ(23px); }
.mini-cube i:nth-child(4) { transform: rotateY(-90deg) translateZ(23px); }
.mini-cube i:nth-child(5) { transform: rotateX(90deg)  translateZ(23px); }
.mini-cube i:nth-child(6) { transform: rotateX(-90deg) translateZ(23px); }

@keyframes mcSpin {
  from { transform: perspective(700px) rotateX(0deg)   rotateY(0deg); }
  to   { transform: perspective(700px) rotateX(360deg) rotateY(720deg); }
}

.presupuesto-card { position: relative; }

.mc-a { top: -24px; right: 4%; }
.mc-b { bottom: -28px; left: 3%; animation-duration: 19s; animation-direction: reverse; }
.mc-b i { border-color: rgba(129, 140, 248, 0.5); background: linear-gradient(135deg, rgba(99, 102, 241, 0.12), rgba(34, 211, 238, 0.14)); }

.contact-grid { position: relative; }

.mc-c { top: -30px; right: 2%; width: 38px; height: 38px; animation-duration: 16s; }
.mc-c i { border-radius: 5px; }
.mc-c i:nth-child(1) { transform: rotateY(0deg)   translateZ(19px); }
.mc-c i:nth-child(2) { transform: rotateY(90deg)  translateZ(19px); }
.mc-c i:nth-child(3) { transform: rotateY(180deg) translateZ(19px); }
.mc-c i:nth-child(4) { transform: rotateY(-90deg) translateZ(19px); }
.mc-c i:nth-child(5) { transform: rotateX(90deg)  translateZ(19px); }
.mc-c i:nth-child(6) { transform: rotateX(-90deg) translateZ(19px); }

/* Nivel activo: botón "hundido" en 3D */
.level-btn { transform-style: preserve-3d; }

.level-btn.active {
  transform: perspective(800px) rotateX(-6deg) translateZ(6px);
}

/* Botón de enviar: presión física */
#form-submit:active { transform: scale(0.97) translateY(2px); }

@media (max-width: 1024px) {
  .mc-c { display: none; }
}

@media (max-width: 560px) {
  .mini-cube { width: 34px; height: 34px; }
  .mini-cube i:nth-child(-n+6) { border-radius: 5px; }
  .mc-a { top: -18px; right: 2%; }
  .mc-b { bottom: -20px; left: 1%; }
}
