/* ==========================================================================
   EjeDigital — Landing page
   Paleta: negro profundo + violeta eléctrico + cyan
   ========================================================================== */

:root {
  --bg: #0a0a0f;
  --bg-soft: #101018;
  --bg-elevated: #15151f;
  --border: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.16);

  --text: #f4f4f8;
  --text-muted: #a3a3b8;
  --text-faint: #6b6b80;

  --violet: #7c3aed;
  --violet-soft: #a78bfa;
  --cyan: #22d3ee;
  --cyan-soft: #67e8f9;

  --gradient-brand: linear-gradient(135deg, var(--violet) 0%, var(--cyan) 100%);
  --gradient-text: linear-gradient(135deg, #c4b5fd 0%, #67e8f9 100%);

  --shadow-glow-violet: 0 0 60px -15px rgba(124, 58, 237, 0.55);
  --shadow-glow-cyan: 0 0 60px -15px rgba(34, 211, 238, 0.45);

  --font-display: "Space Grotesk", "Inter", sans-serif;
  --font-body: "Inter", sans-serif;
  --font-mono: "JetBrains Mono", "Courier New", monospace;

  --container-w: 1180px;
  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 28px;

  --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
  --transition-base: 0.35s var(--ease-out-expo);
}

/* ---------- Reset & base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }

@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;
  }
}

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

img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; margin: 0; padding: 0; }
button { font-family: inherit; }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.15;
  margin: 0;
  letter-spacing: -0.02em;
}

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

.section { position: relative; padding: 120px 0; }
@media (max-width: 720px) {
  .section { padding: 80px 0; }
}

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

/* Hide native cursor on devices that have a custom one */
@media (hover: hover) and (pointer: fine) {
  body.has-custom-cursor, body.has-custom-cursor a, body.has-custom-cursor button {
    cursor: none;
  }
}

/* ---------- Custom cursor ---------- */
.cursor-dot, .cursor-halo {
  position: fixed;
  top: 0; left: 0;
  border-radius: 50%;
  pointer-events: none;
  z-index: 9999;
  transform: translate(-50%, -50%);
  will-change: transform;
}
.cursor-dot {
  width: 8px; height: 8px;
  background: var(--cyan);
  box-shadow: 0 0 12px 2px rgba(34, 211, 238, 0.7);
}
.cursor-halo {
  width: 38px; height: 38px;
  border: 1.5px solid rgba(124, 58, 237, 0.55);
  background: rgba(124, 58, 237, 0.06);
  transition: width 0.25s var(--ease-out-expo), height 0.25s var(--ease-out-expo), border-color 0.25s ease, background 0.25s ease;
}
.cursor-halo.is-active {
  width: 64px; height: 64px;
  border-color: rgba(34, 211, 238, 0.7);
  background: rgba(34, 211, 238, 0.08);
}
@media (hover: none), (pointer: coarse) {
  .cursor-dot, .cursor-halo { display: none; }
}

/* ---------- Scroll progress bar ---------- */
.scroll-progress {
  position: fixed;
  top: 0; left: 0;
  width: 100%;
  height: 3px;
  z-index: 1000;
  background: rgba(255, 255, 255, 0.04);
}
.scroll-progress span {
  display: block;
  height: 100%;
  width: 0%;
  background: var(--gradient-brand);
  box-shadow: 0 0 12px rgba(124, 58, 237, 0.6);
  transform-origin: left;
}

/* ---------- Header ---------- */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 500;
  padding: 18px 0;
  transition: background var(--transition-base), border-color var(--transition-base), padding var(--transition-base);
  border-bottom: 1px solid transparent;
}
.site-header.is-scrolled {
  background: rgba(10, 10, 15, 0.75);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  border-bottom-color: var(--border);
  padding: 12px 0;
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-size: 1.15rem;
}
.logo-mark img { display: block; height: 32px; width: auto; }
.logo-text strong { color: var(--cyan-soft); font-weight: 700; }
.main-nav {
  display: flex;
  align-items: center;
  gap: 28px;
}
.main-nav a {
  font-size: 0.92rem;
  color: var(--text-muted);
  position: relative;
  padding: 6px 0;
  transition: color 0.25s ease;
}
.main-nav a::after {
  content: "";
  position: absolute;
  left: 0; bottom: 0;
  width: 0;
  height: 1.5px;
  background: var(--gradient-brand);
  transition: width 0.3s var(--ease-out-expo);
}
.main-nav a:hover { color: var(--text); }
.main-nav a:hover::after { width: 100%; }

@media (max-width: 860px) {
  .main-nav { display: none; }
}

/* ---------- Buttons ---------- */
.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 16px 30px;
  border-radius: 999px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.98rem;
  border: 1px solid transparent;
  cursor: pointer;
  isolation: isolate;
  overflow: hidden;
  transition: transform 0.3s var(--ease-out-expo), box-shadow 0.3s var(--ease-out-expo), border-color 0.3s ease;
}
.btn span { position: relative; z-index: 2; display: inline-flex; align-items: center; gap: 8px; }
.btn-small { padding: 10px 22px; font-size: 0.88rem; }
.btn-block { width: 100%; }

.btn-primary {
  background: var(--gradient-brand);
  color: #08080c;
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-glow-violet), var(--shadow-glow-cyan);
}

.btn-ghost {
  background: rgba(255, 255, 255, 0.03);
  border-color: var(--border-strong);
  color: var(--text);
}
.btn-ghost:hover {
  border-color: var(--cyan);
  color: var(--cyan-soft);
  transform: translateY(-2px);
}

/* Liquid / morphing hover blob */
.btn-liquid::before {
  content: "";
  position: absolute;
  inset: -40%;
  background: radial-gradient(circle at 30% 30%, rgba(255,255,255,0.35), transparent 60%);
  opacity: 0;
  transform: scale(0.4) translate(-30%, -10%);
  transition: opacity 0.4s ease, transform 0.6s var(--ease-out-expo);
  z-index: 1;
  border-radius: 50%;
  filter: blur(6px);
  pointer-events: none;
}
.btn-liquid:hover::before {
  opacity: 1;
  transform: scale(1.4) translate(0, 0);
}

/* Breathing animation on primary CTA */
.btn-breathing {
  animation: breathing 3.4s ease-in-out infinite;
}
@keyframes breathing {
  0%, 100% { box-shadow: 0 0 0 0 rgba(124, 58, 237, 0.0), var(--shadow-glow-violet); }
  50% { box-shadow: 0 0 0 14px rgba(124, 58, 237, 0), var(--shadow-glow-cyan); transform: scale(1.025); }
}

/* Particle burst container for CTA hover */
.btn-burst {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 3;
  overflow: visible;
}
.btn-burst span {
  position: absolute;
  top: 50%; left: 50%;
  width: 5px; height: 5px;
  border-radius: 50%;
  background: #fff;
  opacity: 0;
}

/* ====================================================================
   HERO
   ==================================================================== */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  overflow: hidden;
  padding-top: 90px;
  background:
    radial-gradient(60% 50% at 50% 0%, rgba(124, 58, 237, 0.16), transparent 70%),
    radial-gradient(50% 40% at 85% 80%, rgba(34, 211, 238, 0.10), transparent 70%),
    var(--bg);
}
.hero-bg-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
}
.hero-3d {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  opacity: 0.55;
}
.hero-3d canvas { display: block; }
.hero-vignette {
  position: absolute;
  inset: 0;
  z-index: 2;
  background: radial-gradient(120% 90% at 50% 30%, transparent 35%, var(--bg) 100%);
  pointer-events: none;
}
.hero-inner {
  position: relative;
  z-index: 3;
  max-width: 800px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 0.85rem;
  letter-spacing: 0.04em;
  color: var(--cyan-soft);
  background: rgba(34, 211, 238, 0.08);
  border: 1px solid rgba(34, 211, 238, 0.25);
  padding: 8px 16px;
  border-radius: 999px;
  margin-bottom: 28px;
}
.eyebrow-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--cyan);
  box-shadow: 0 0 10px 2px rgba(34, 211, 238, 0.8);
  animation: pulse-dot 2.2s ease-in-out infinite;
}
@keyframes pulse-dot {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.6); opacity: 0.5; }
}

.hero-title {
  font-size: clamp(2.4rem, 6.4vw, 4.6rem);
  margin-bottom: 28px;
  color: var(--text);
}
.hero-title .typewriter-line { white-space: pre-wrap; }
.hero-title .caret {
  display: inline-block;
  margin-left: 4px;
  color: var(--cyan);
  animation: blink-caret 1s steps(1) infinite;
  font-weight: 400;
}
@keyframes blink-caret {
  0%, 49% { opacity: 1; }
  50%, 100% { opacity: 0; }
}

.glitch-word {
  position: relative;
  display: inline-block;
  background: var(--gradient-text);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.glitch-word.is-glitching::before,
.glitch-word.is-glitching::after {
  content: attr(data-text);
  position: absolute;
  inset: 0;
  background: var(--gradient-text);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  opacity: 0.85;
}
.glitch-word.is-glitching::before {
  transform: translate(-3px, 1px);
  clip-path: polygon(0 0, 100% 0, 100% 45%, 0 45%);
  filter: hue-rotate(40deg);
}
.glitch-word.is-glitching::after {
  transform: translate(3px, -1px);
  clip-path: polygon(0 55%, 100% 55%, 100% 100%, 0 100%);
  filter: hue-rotate(-40deg);
}

.hero-subtitle {
  font-size: clamp(1.02rem, 1.8vw, 1.2rem);
  color: var(--text-muted);
  max-width: 620px;
  margin-bottom: 40px;
}

.hero-ctas {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  margin-bottom: 64px;
}

.hero-scroll-hint {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--text-faint);
  font-size: 0.82rem;
  letter-spacing: 0.04em;
}
.scroll-mouse {
  width: 24px; height: 38px;
  border: 1.5px solid var(--border-strong);
  border-radius: 14px;
  display: flex;
  justify-content: center;
  padding-top: 6px;
}
.scroll-wheel {
  width: 3px; height: 8px;
  border-radius: 2px;
  background: var(--cyan);
  animation: scroll-wheel 1.8s ease-in-out infinite;
}
@keyframes scroll-wheel {
  0% { transform: translateY(0); opacity: 1; }
  70% { transform: translateY(12px); opacity: 0; }
  100% { opacity: 0; }
}

@media (max-width: 720px) {
  .hero { padding-top: 110px; }
  .hero-3d { opacity: 0.3; }
}

/* ====================================================================
   REVEAL ON SCROLL (Intersection Observer driven)
   ==================================================================== */
[data-reveal] {
  opacity: 0;
  transform: translateY(36px);
  transition: opacity 0.8s var(--ease-out-expo), transform 0.8s var(--ease-out-expo);
  transition-delay: var(--reveal-delay, 0ms);
}
[data-reveal].is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ---------- Section heads ---------- */
.section-head {
  max-width: 680px;
  margin: 0 auto 64px;
  text-align: center;
}
.section-tag {
  display: inline-block;
  font-size: 0.82rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--violet-soft);
  background: rgba(124, 58, 237, 0.1);
  border: 1px solid rgba(124, 58, 237, 0.28);
  padding: 6px 16px;
  border-radius: 999px;
  margin-bottom: 18px;
}
.section-title {
  font-size: clamp(1.7rem, 4vw, 2.6rem);
  margin-bottom: 18px;
}
.section-lead {
  color: var(--text-muted);
  font-size: 1.05rem;
}

/* ====================================================================
   PROBLEMA — terminal
   ==================================================================== */
.terminal {
  max-width: 760px;
  margin: 0 auto;
  background: #07070b;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: 0 30px 80px -30px rgba(0,0,0,0.7), var(--shadow-glow-violet);
}
.terminal-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 14px 18px;
  background: #0d0d14;
  border-bottom: 1px solid var(--border);
}
.terminal-dot { width: 11px; height: 11px; border-radius: 50%; display: inline-block; }
.dot-red { background: #ff5f57; }
.dot-yellow { background: #febc2e; }
.dot-green { background: #28c840; }
.terminal-title {
  margin-left: 10px;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--text-faint);
}
.terminal-body {
  padding: 28px 26px 36px;
  font-family: var(--font-mono);
  font-size: 0.95rem;
  line-height: 2;
  min-height: 240px;
}
.terminal-line { margin: 0; position: relative; display: block; color: #4ade80; }
.terminal-line .prompt { color: var(--cyan); margin-right: 10px; }
.terminal-line .typed-text { white-space: pre-wrap; }
.terminal-line .strike-overlay {
  position: absolute;
  left: 26px;
  top: 50%;
  height: 1.5px;
  width: 0;
  background: #f87171;
  transition: width 0.5s ease-in-out;
  transform: translateY(-50%);
}
.terminal-line .strike-overlay.is-struck { width: var(--strike-w, 100%); }
.terminal-line.is-struck .typed-text { color: #6b6b80; }
.terminal-cursor {
  color: var(--cyan);
  animation: blink-caret 1s steps(1) infinite;
}
.terminal-final .typed-text { color: var(--text); }

@media (max-width: 600px) {
  .terminal-body { font-size: 0.82rem; padding: 22px 16px; }
}

/* ====================================================================
   SOLUCIÓN — glow cards
   ==================================================================== */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 24px;
}
.glow-card {
  position: relative;
  background: linear-gradient(180deg, var(--bg-elevated), var(--bg-soft));
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 32px 28px;
  overflow: hidden;
  transition: transform 0.4s var(--ease-out-expo), border-color 0.4s ease;
}
.glow-card:hover {
  transform: translateY(-6px);
  border-color: rgba(124, 58, 237, 0.4);
}
.glow-card-glow {
  position: absolute;
  width: 260px; height: 260px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(124, 58, 237, 0.35), rgba(34, 211, 238, 0.12) 45%, transparent 70%);
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, -50%);
  transition: opacity 0.4s ease;
  filter: blur(10px);
}
.glow-card:hover .glow-card-glow { opacity: 1; }
.glow-card-icon {
  width: 56px; height: 56px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(124, 58, 237, 0.12);
  border: 1px solid rgba(124, 58, 237, 0.28);
  color: var(--cyan-soft);
  margin-bottom: 22px;
  position: relative;
  z-index: 1;
  transition: transform 0.5s var(--ease-out-expo), color 0.3s ease, background 0.3s ease;
}
.glow-card-icon svg { width: 26px; height: 26px; }
.glow-card:hover .glow-card-icon {
  transform: rotate(-8deg) scale(1.08);
  color: var(--violet-soft);
  background: rgba(34, 211, 238, 0.12);
}
.glow-card h3 {
  position: relative;
  z-index: 1;
  font-size: 1.18rem;
  margin-bottom: 10px;
}
.glow-card p {
  position: relative;
  z-index: 1;
  color: var(--text-muted);
  font-size: 0.96rem;
  margin: 0;
}

/* ====================================================================
   TRABAJOS — carrusel de imágenes (sin links externos)
   ==================================================================== */
.work-carousel {
  position: relative;
  max-width: 760px;
  margin: 0 auto;
}
.work-carousel-viewport {
  overflow: hidden;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: var(--bg-elevated);
}
.work-carousel-track {
  display: flex;
  transition: transform 0.5s var(--ease-out-expo);
}
.work-slide {
  flex: 0 0 100%;
  margin: 0;
}
.work-slide img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 1000 / 703;
  object-fit: cover;
  background: var(--bg-soft);
}
.work-slide figcaption {
  padding: 22px 26px 26px;
}
.work-slide h3 {
  font-size: 1.1rem;
  margin-bottom: 8px;
}
.work-slide p {
  color: var(--text-muted);
  font-size: 0.94rem;
  margin: 0;
}
.work-carousel-arrow {
  position: absolute;
  top: 35%;
  transform: translateY(-50%);
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(15, 15, 22, 0.78);
  border: 1px solid var(--border-strong);
  color: var(--text);
  cursor: pointer;
  transition: background 0.3s ease, border-color 0.3s ease, transform 0.3s ease;
}
.work-carousel-arrow:hover {
  background: rgba(124, 58, 237, 0.25);
  border-color: rgba(124, 58, 237, 0.5);
}
.work-carousel-prev { left: -18px; }
.work-carousel-next { right: -18px; }
.work-carousel-dots {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 18px;
}
.work-carousel-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  border: none;
  padding: 0;
  background: var(--border-strong);
  cursor: pointer;
  transition: background 0.3s ease, transform 0.3s ease;
}
.work-carousel-dot.is-active {
  background: var(--gradient-brand);
  transform: scale(1.25);
}
@media (max-width: 640px) {
  .work-carousel-arrow { width: 36px; height: 36px; }
  .work-carousel-prev { left: 4px; }
  .work-carousel-next { right: 4px; }
  .work-slide figcaption { padding: 18px 18px 22px; }
}

/* ====================================================================
   CASO DE ÉXITO
   ==================================================================== */
.case-grid {
  display: grid;
  grid-template-columns: 1fr 0.9fr 1fr;
  gap: 28px;
  align-items: stretch;
}
@media (max-width: 980px) {
  .case-grid { grid-template-columns: 1fr; }
}
.case-col {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 30px 28px;
}
.case-label {
  display: inline-block;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.8rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-faint);
  margin-bottom: 16px;
}
.case-before .case-label { color: #f87171; }
.case-after .case-label { color: #4ade80; }
.case-list li {
  position: relative;
  padding-left: 24px;
  margin-bottom: 14px;
  color: var(--text-muted);
  font-size: 0.95rem;
}
.case-list li::before {
  content: "";
  position: absolute;
  left: 0; top: 9px;
  width: 8px; height: 8px;
  border-radius: 2px;
  background: rgba(248, 113, 113, 0.6);
}
.case-arrow {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 14px;
  background: linear-gradient(180deg, rgba(124,58,237,0.12), rgba(34,211,238,0.06));
  border-color: rgba(124, 58, 237, 0.3);
}
.case-arrow svg { color: var(--cyan); }
.case-arrow span {
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-size: 0.82rem;
  color: var(--cyan-soft);
}
.case-arrow p { color: var(--text-muted); font-size: 0.92rem; margin: 0; }

.metric-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}
.metric { display: flex; flex-direction: column; gap: 6px; }
.metric-number {
  font-family: var(--font-display);
  font-size: clamp(1.7rem, 3vw, 2.2rem);
  font-weight: 700;
  background: var(--gradient-text);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.metric-label { color: var(--text-muted); font-size: 0.84rem; line-height: 1.4; }

/* ====================================================================
   PROCESO — timeline
   ==================================================================== */
.timeline {
  position: relative;
  max-width: 760px;
  margin: 0 auto;
  padding-left: 50px;
}
.timeline-track {
  position: absolute;
  left: 18px;
  top: 6px;
  bottom: 6px;
  width: 2px;
  background: var(--border);
  border-radius: 2px;
  overflow: hidden;
}
.timeline-progress {
  display: block;
  width: 100%;
  height: 0%;
  background: linear-gradient(180deg, var(--violet), var(--cyan));
  box-shadow: 0 0 16px rgba(124, 58, 237, 0.6);
  transform-origin: top;
}
.timeline-step {
  position: relative;
  padding-bottom: 52px;
}
.timeline-step:last-child { padding-bottom: 0; }
.timeline-dot {
  position: absolute;
  left: -50px;
  top: 0;
  width: 38px; height: 38px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.95rem;
  background: var(--bg-elevated);
  border: 1.5px solid var(--border-strong);
  color: var(--text-muted);
  transition: border-color 0.4s ease, color 0.4s ease, box-shadow 0.4s ease, background 0.4s ease;
}
.timeline-step.is-active .timeline-dot {
  border-color: var(--cyan);
  color: var(--cyan-soft);
  background: rgba(34, 211, 238, 0.12);
  box-shadow: 0 0 22px rgba(34, 211, 238, 0.4);
}
.timeline-content h3 { font-size: 1.15rem; margin-bottom: 8px; }
.timeline-content p { color: var(--text-muted); font-size: 0.95rem; margin: 0; max-width: 540px; }

@media (max-width: 600px) {
  .timeline { padding-left: 42px; }
  .timeline-track { left: 14px; }
  .timeline-dot { left: -42px; width: 32px; height: 32px; font-size: 0.85rem; }
}

/* ====================================================================
   FAQ
   ==================================================================== */
.faq-list {
  max-width: 760px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.faq-item {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 6px 26px;
  transition: border-color 0.3s ease;
}
.faq-item[open] { border-color: rgba(124, 58, 237, 0.35); }
.faq-item summary {
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 0;
  cursor: pointer;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 1rem;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-icon {
  position: relative;
  flex-shrink: 0;
  width: 22px; height: 22px;
}
.faq-icon::before, .faq-icon::after {
  content: "";
  position: absolute;
  background: var(--cyan-soft);
  border-radius: 2px;
  transition: transform 0.35s var(--ease-out-expo);
}
.faq-icon::before { width: 100%; height: 2px; top: 50%; left: 0; transform: translateY(-50%); }
.faq-icon::after { width: 2px; height: 100%; left: 50%; top: 0; transform: translateX(-50%); }
.faq-item[open] .faq-icon::after { transform: translateX(-50%) rotate(90deg) scale(0); }
.faq-answer { padding: 0 0 22px; color: var(--text-muted); font-size: 0.95rem; }
.faq-answer p { margin: 0; }

/* ====================================================================
   CONTACTO / FORM
   ==================================================================== */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
  align-items: start;
}
@media (max-width: 940px) {
  .contact-grid { grid-template-columns: 1fr; }
}
.contact-info .section-title { text-align: left; }
.contact-info .section-lead { text-align: left; margin-bottom: 28px; }
.contact-points { display: flex; flex-direction: column; gap: 16px; margin-top: 32px; }
.contact-points li {
  display: flex;
  align-items: center;
  gap: 14px;
  color: var(--text-muted);
  font-size: 0.95rem;
}
.contact-points svg { color: var(--cyan); flex-shrink: 0; }

.contact-form {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 36px;
  display: flex;
  flex-direction: column;
  gap: 22px;
  position: relative;
}
.contact-form.is-shaking { animation: shake 0.5s ease; }
@keyframes shake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-10px); }
  40% { transform: translateX(8px); }
  60% { transform: translateX(-6px); }
  80% { transform: translateX(4px); }
}

.form-field { position: relative; }
.form-field input,
.form-field select,
.form-field textarea {
  width: 100%;
  padding: 18px 16px 8px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 0.98rem;
  outline: none;
  transition: border-color 0.3s ease, background 0.3s ease;
  resize: vertical;
}
.form-field textarea { padding-top: 22px; min-height: 110px; }
.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus {
  border-color: var(--cyan);
  background: rgba(34, 211, 238, 0.04);
}
.form-field label {
  position: absolute;
  left: 16px;
  top: 17px;
  color: var(--text-faint);
  font-size: 0.98rem;
  pointer-events: none;
  transform-origin: left top;
  transition: transform 0.22s var(--ease-out-expo), color 0.22s ease, top 0.22s ease;
}
.form-field input:focus + label,
.form-field input:not(:placeholder-shown) + label,
.form-field textarea:focus + label,
.form-field textarea:not(:placeholder-shown) + label,
.form-field select:focus + label,
.form-field select.has-value + label {
  top: 9px;
  transform: scale(0.76);
  color: var(--cyan-soft);
}
.form-field-select select {
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%2367e8f9' stroke-width='2'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
}
.form-field-select select:invalid { color: var(--text-faint); }
.form-field-select select option { background: var(--bg-elevated); color: var(--text); }

.field-error {
  display: block;
  font-size: 0.8rem;
  color: #f87171;
  margin-top: 6px;
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transition: max-height 0.25s ease, opacity 0.25s ease;
}
.form-field.is-invalid input,
.form-field.is-invalid select,
.form-field.is-invalid textarea {
  border-color: #f87171;
}
.form-field.is-invalid .field-error {
  max-height: 40px;
  opacity: 1;
  margin-top: 6px;
}

.btn-spinner {
  display: none;
  width: 18px; height: 18px;
  border: 2px solid rgba(8,8,12,0.3);
  border-top-color: #08080c;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.contact-form.is-submitting .btn-label { opacity: 0; }
.contact-form.is-submitting .btn-spinner { display: inline-block; position: absolute; }

.form-status {
  margin: 0;
  min-height: 1.4em;
  font-size: 0.92rem;
  text-align: center;
}
.form-status.is-success { color: #4ade80; }
.form-status.is-error { color: #f87171; }

/* Confetti */
.confetti-piece {
  position: fixed;
  top: -10px;
  width: 8px; height: 14px;
  pointer-events: none;
  z-index: 9998;
  opacity: 0.9;
  border-radius: 2px;
}

/* ====================================================================
   WHATSAPP FLOATING BUTTON
   ==================================================================== */
.whatsapp-float {
  position: fixed;
  bottom: 26px;
  right: 26px;
  width: 60px; height: 60px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #25D366;
  color: #08080c;
  box-shadow: 0 14px 40px -10px rgba(37, 211, 102, 0.6);
  z-index: 600;
  transition: transform 0.3s var(--ease-out-expo), box-shadow 0.3s ease;
}
.whatsapp-float:hover {
  transform: translateY(-4px) scale(1.06);
  box-shadow: 0 18px 50px -8px rgba(37, 211, 102, 0.75);
}
.whatsapp-ping {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: #25D366;
  opacity: 0.6;
  animation: whatsapp-ping 2.4s cubic-bezier(0.2, 0.6, 0.4, 1) infinite;
}
@keyframes whatsapp-ping {
  0% { transform: scale(1); opacity: 0.55; }
  80%, 100% { transform: scale(1.9); opacity: 0; }
}

@media (max-width: 600px) {
  .whatsapp-float { width: 52px; height: 52px; bottom: 18px; right: 18px; }
}

/* ====================================================================
   ASISTENTE VIRTUAL (chat IA local)
   ==================================================================== */
.ai-chat-toggle {
  position: fixed;
  bottom: 100px;
  right: 26px;
  width: 60px; height: 60px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--gradient-brand);
  color: #06060a;
  border: none;
  cursor: pointer;
  box-shadow: var(--shadow-glow-violet);
  z-index: 601;
  transition: transform 0.3s var(--ease-out-expo), box-shadow 0.3s ease;
}
.ai-chat-toggle:hover { transform: translateY(-4px) scale(1.06); }
.ai-chat-toggle .icon-close { display: none; }
.ai-chat-toggle.is-open .icon-chat { display: none; }
.ai-chat-toggle.is-open .icon-close { display: block; }

.ai-chat-ping {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: var(--gradient-brand);
  opacity: 0.55;
  animation: whatsapp-ping 2.4s cubic-bezier(0.2, 0.6, 0.4, 1) infinite;
  pointer-events: none;
}
.ai-chat-ping.is-hidden { display: none; }

.ai-chat-window {
  position: fixed;
  bottom: 172px;
  right: 26px;
  width: 360px;
  max-height: min(70vh, 520px);
  display: flex;
  flex-direction: column;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: 0 24px 60px -20px rgba(0, 0, 0, 0.6);
  overflow: hidden;
  transform-origin: bottom right;
  transform: scale(0.92) translateY(16px);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: transform 0.3s var(--ease-out-expo), opacity 0.25s ease, visibility 0.3s;
  z-index: 601;
}
.ai-chat-window.is-open {
  transform: scale(1) translateY(0);
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.ai-chat-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  background: var(--bg-elevated);
}
.ai-chat-header-info { display: flex; align-items: center; gap: 10px; }
.ai-chat-avatar {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px; height: 34px;
  border-radius: 50%;
  background: var(--bg);
  border: 1px solid var(--border-strong);
  flex-shrink: 0;
}
.ai-chat-header-text { display: flex; flex-direction: column; line-height: 1.3; }
.ai-chat-header-text strong { font-family: var(--font-display); font-size: 0.95rem; }
.ai-chat-status { display: flex; align-items: center; gap: 6px; font-size: 0.75rem; color: var(--text-muted); }
.ai-chat-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: #4ade80;
  box-shadow: 0 0 0 0 rgba(74, 222, 128, 0.6);
  animation: ai-dot-pulse 2s ease-in-out infinite;
}
@keyframes ai-dot-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(74, 222, 128, 0.5); }
  50% { box-shadow: 0 0 0 4px rgba(74, 222, 128, 0); }
}
.ai-chat-close {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px; height: 32px;
  border-radius: 50%;
  border: none;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
}
.ai-chat-close:hover { background: var(--border); color: var(--text); }

.ai-chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  scroll-behavior: smooth;
}
.ai-msg {
  max-width: 85%;
  padding: 10px 14px;
  border-radius: var(--radius-md);
  font-size: 0.88rem;
  line-height: 1.55;
  white-space: pre-line;
}
.ai-msg.bot {
  align-self: flex-start;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-bottom-left-radius: 4px;
}
.ai-msg.user {
  align-self: flex-end;
  background: var(--gradient-brand);
  color: #06060a;
  font-weight: 500;
  border-bottom-right-radius: 4px;
}
.ai-msg.bot a { color: var(--cyan-soft); }

.ai-msg-typing { display: inline-flex; gap: 4px; align-items: center; padding: 4px 0; }
.ai-msg-typing span {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--text-faint);
  animation: ai-typing-bounce 1.2s ease-in-out infinite;
}
.ai-msg-typing span:nth-child(2) { animation-delay: 0.15s; }
.ai-msg-typing span:nth-child(3) { animation-delay: 0.3s; }
@keyframes ai-typing-bounce {
  0%, 60%, 100% { transform: translateY(0); opacity: 0.5; }
  30% { transform: translateY(-4px); opacity: 1; }
}

.ai-chat-suggestions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 0 16px 12px;
}
.ai-chat-suggestions:empty { display: none; }
.ai-chat-suggestion {
  font-family: var(--font-body);
  font-size: 0.8rem;
  color: var(--text-muted);
  background: var(--bg-elevated);
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  padding: 6px 13px;
  cursor: pointer;
  transition: border-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
}
.ai-chat-suggestion:hover {
  color: var(--text);
  border-color: var(--cyan);
  transform: translateY(-1px);
}

.ai-chat-form {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border-top: 1px solid var(--border);
}
.ai-chat-form input {
  flex: 1;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  color: var(--text);
  font-family: var(--font-body);
  font-size: 0.88rem;
  outline: none;
  transition: border-color 0.2s ease;
}
.ai-chat-form input:focus { border-color: var(--violet-soft); }
.ai-chat-form button {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px; height: 38px;
  border-radius: 50%;
  border: none;
  background: var(--gradient-brand);
  color: #06060a;
  cursor: pointer;
  flex-shrink: 0;
  transition: transform 0.2s ease;
}
.ai-chat-form button:hover { transform: scale(1.08); }

@media (max-width: 600px) {
  .ai-chat-toggle { width: 52px; height: 52px; bottom: 82px; right: 18px; }
  .ai-chat-window {
    left: 12px;
    right: 12px;
    bottom: 146px;
    width: auto;
    max-height: min(64vh, 480px);
  }
}

/* ====================================================================
   FOOTER
   ==================================================================== */
.site-footer {
  border-top: 1px solid var(--border);
  background: var(--bg-soft);
  padding: 64px 0 28px;
}
.footer-inner {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 40px;
}
@media (max-width: 820px) {
  .footer-inner { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 540px) {
  .footer-inner { grid-template-columns: 1fr; }
}
.footer-brand .logo-mark img { height: 28px; }
.footer-brand p { color: var(--text-muted); font-size: 0.9rem; margin-top: 14px; max-width: 280px; }
.footer-col { display: flex; flex-direction: column; gap: 12px; }
.footer-col h4 {
  font-size: 0.85rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-faint);
  margin-bottom: 4px;
}
.footer-col a, .footer-col span { color: var(--text-muted); font-size: 0.92rem; transition: color 0.25s ease; }
.footer-col a:hover { color: var(--cyan-soft); }
.social-links { display: flex; gap: 14px; }
.social-links a {
  width: 38px; height: 38px;
  display: flex; align-items: center; justify-content: center;
  border: 1px solid var(--border-strong);
  border-radius: 50%;
  color: var(--text-muted);
  transition: color 0.25s ease, border-color 0.25s ease, transform 0.25s ease;
}
.social-links a:hover { color: var(--cyan-soft); border-color: var(--cyan); transform: translateY(-3px); }
.footer-bottom {
  margin-top: 48px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
  text-align: center;
}
.footer-bottom p { color: var(--text-faint); font-size: 0.84rem; margin: 0; }
