* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

:root {
  --c: #5EEAD4;
  --c2: #2DD4BF;
  --bg: #000000;
  --bg2: #0A0A0F;
  --txt: #FFFFFF;
  --muted: #6B7280;
  --border: rgba(255,255,255,0.08);
  --pad-x: clamp(20px, 5vw, 40px);
  --pad-section: clamp(72px, 11vw, 120px);
}

body {
  font-family: 'Geist', 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg);
  color: var(--txt);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

#spotlight {
  pointer-events: none;
  position: fixed;
  z-index: 0;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: radial-gradient(600px circle at var(--mx, 50%) var(--my, 50%), rgba(94,234,212,0.07), transparent 40%);
}

.text-gradient {
  background: linear-gradient(135deg, #5EEAD4, #2DD4BF);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* ============ NAVBAR ============ */
nav#navbar {
  position: fixed;
  top: 0;
  width: 100%;
  z-index: 500;
  height: 60px;
  padding: 0 var(--pad-x);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(0,0,0,0.4);
  backdrop-filter: blur(22px) saturate(180%);
  -webkit-backdrop-filter: blur(22px) saturate(180%);
  border-bottom: 1px solid rgba(255,255,255,0.08);
  transition: background 0.3s;
}

nav#navbar.scrolled { background: rgba(0,0,0,0.6); }

.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  font-size: 1rem;
  font-weight: 700;
  color: #fff;
  letter-spacing: -0.02em;
}

.nav-logo-img { height: 26px; width: auto; display: block; }

.nav-logo-icon {
  width: 28px;
  height: 28px;
  background: linear-gradient(135deg, #5EEAD4, #2DD4BF);
  border-radius: 7px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
}

.nav-links { display: flex; gap: 4px; align-items: center; }

.nav-links a {
  color: rgba(255,255,255,0.82);
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 500;
  padding: 6px 14px;
  border-radius: 6px;
  transition: 0.2s;
}

.nav-links a:hover { color: #fff; background: rgba(255,255,255,0.06); }

.nav-right { display: flex; align-items: center; gap: 12px; }

.nav-tel {
  color: #6B7280;
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 500;
  transition: 0.2s;
}

.nav-tel:hover { color: #fff; }

.btn-primary {
  background: linear-gradient(135deg, #5EEAD4, #2DD4BF);
  color: #052B26;
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 700;
  padding: 8px 18px;
  border-radius: 7px;
  transition: 0.2s;
  white-space: nowrap;
}

.btn-primary:hover {
  opacity: 0.85;
  transform: translateY(-1px);
  box-shadow: 0 0 20px rgba(94,234,212,0.4);
}

/* ============ HERO ============ */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: clamp(100px, 14vh, 140px) var(--pad-x) clamp(60px, 9vh, 80px);
  overflow: hidden;
}

.hero-grid {
  position: absolute;
  inset: 0;
  z-index: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.04) 1px, transparent 1px);
  background-size: 60px 60px;
  transform: perspective(500px) rotateX(55deg) scale(2);
  transform-origin: center top;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, #000 30%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, #000 30%, transparent 75%);
}

.hero-inner { position: relative; z-index: 1; max-width: 820px; }

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 16px;
  border-radius: 100px;
  background: rgba(94,234,212,0.08);
  border: 1px solid rgba(94,234,212,0.2);
  color: #5EEAD4;
  font-size: 0.78rem;
  font-weight: 600;
  margin-bottom: 28px;
}

.hero-badge-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: #5EEAD4;
  box-shadow: 0 0 10px #5EEAD4;
  animation: pulseDot 1.8s infinite;
}

@keyframes pulseDot {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.35; }
}

.hero-title {
  font-size: clamp(2.4rem, 6vw, 4.4rem);
  font-weight: 900;
  letter-spacing: -0.05em;
  line-height: 1.05;
  margin-bottom: 24px;
}

#typewriter::after {
  content: '|';
  -webkit-text-fill-color: #5EEAD4;
  animation: caret 0.8s steps(1) infinite;
}

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

.hero-sub {
  color: #6B7280;
  font-size: clamp(0.95rem, 2vw, 1.1rem);
  line-height: 1.75;
  max-width: 600px;
  margin: 0 auto 40px;
}

.hero-actions {
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 64px;
}

.hero-btn-main {
  background: linear-gradient(135deg, #5EEAD4, #2DD4BF);
  color: #052B26;
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 700;
  padding: 14px 28px;
  border-radius: 9px;
  transition: 0.2s;
}

.hero-btn-main:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(94,234,212,0.4);
}

.hero-btn-ghost {
  color: #fff;
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 600;
  padding: 14px 28px;
  border-radius: 9px;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(255,255,255,0.02);
  transition: 0.2s;
}

.hero-btn-ghost:hover { background: rgba(255,255,255,0.06); border-color: rgba(255,255,255,0.25); }

.hero-mini-stats {
  display: flex;
  gap: clamp(28px, 6vw, 48px);
  justify-content: center;
  flex-wrap: wrap;
}

.hero-mini-stats div { display: flex; flex-direction: column; gap: 2px; }
.hero-mini-stats strong { font-size: 1.5rem; font-weight: 800; letter-spacing: -0.03em; }
.hero-mini-stats span { color: #6B7280; font-size: 0.8rem; }

/* ============ MARQUEE ============ */
.marquee-wrap {
  border-top: 1px solid rgba(255,255,255,0.05);
  border-bottom: 1px solid rgba(255,255,255,0.05);
  padding: 24px 0;
  overflow: hidden;
  background: rgba(255,255,255,0.01);
  position: relative;
  z-index: 1;
}

.marquee-label {
  text-align: center;
  color: #6B7280;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 20px;
}

.marquee-track {
  display: flex;
  gap: 60px;
  align-items: center;
  width: max-content;
  animation: marqueeScroll 25s linear infinite;
}

.client-logo {
  height: 104px;
  width: auto;
  opacity: 0.4;
  transition: opacity 0.2s;
  flex-shrink: 0;
}

.client-logo:hover { opacity: 0.8; }

@keyframes marqueeScroll {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* ============ ESTADÍSTICAS ============ */
.stats-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  max-width: 1100px;
  margin: 0 auto;
  padding: clamp(56px, 9vw, 80px) var(--pad-x);
  gap: clamp(24px, 4vw, 40px);
  position: relative;
  z-index: 1;
}

.stat { text-align: center; }

.stat-num {
  display: block;
  font-size: clamp(2.2rem, 4vw, 3.2rem);
  font-weight: 900;
  letter-spacing: -0.04em;
  background: linear-gradient(135deg, #fff, #5EEAD4);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.stat-label {
  display: block;
  color: #6B7280;
  font-size: 0.85rem;
  margin-top: 8px;
  line-height: 1.5;
}

/* ============ SECTIONS GENÉRICAS ============ */
.section { padding: var(--pad-section) var(--pad-x); position: relative; z-index: 1; }
.section-inner { max-width: 1100px; margin: 0 auto; }

.section-eyebrow {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #5EEAD4;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.section-eyebrow::before {
  content: '';
  width: 20px;
  height: 1px;
  background: #5EEAD4;
  display: block;
}

.section-sub { color: #6B7280; font-size: 0.95rem; line-height: 1.75; max-width: 380px; }

/* ============ SERVICIOS ============ */
.services-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: clamp(40px, 6vw, 64px);
  gap: clamp(24px, 4vw, 40px);
}

.services-header h2 {
  font-size: clamp(1.9rem, 4vw, 3rem);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1.1;
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 16px;
  overflow: hidden;
}

.svc-card {
  background: #0A0A0F;
  padding: 40px 32px;
  transition: background 0.25s;
  position: relative;
  cursor: default;
}

.svc-card:hover { background: #0D0D14; }

.svc-arrow {
  position: absolute;
  top: 32px;
  right: 32px;
  color: #6B7280;
  font-size: 0.9rem;
  opacity: 0;
  transition: 0.25s;
}

.svc-card:hover .svc-arrow { opacity: 1; transform: translate(2px, -2px); }

.svc-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: rgba(94,234,212,0.12);
  border: 1px solid rgba(94,234,212,0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--c);
  margin-bottom: 24px;
}

.svc-icon svg { width: 20px; height: 20px; }

.svc-card h3 { font-size: 1.05rem; font-weight: 700; margin-bottom: 10px; letter-spacing: -0.02em; }
.svc-card p { color: #6B7280; font-size: 0.85rem; line-height: 1.65; }

.svc-pill {
  display: inline-block;
  margin-top: 20px;
  padding: 4px 12px;
  border-radius: 100px;
  font-size: 0.72rem;
  font-weight: 600;
  background: rgba(94,234,212,0.1);
  border: 1px solid rgba(94,234,212,0.2);
  color: #5EEAD4;
}

.svc-pill-hot {
  background: rgba(45,212,191,0.1);
  border-color: rgba(45,212,191,0.3);
  color: #99F6E4;
}

.svc-featured {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  flex-wrap: wrap;
  background: rgba(94,234,212,0.04) !important;
  border-color: rgba(94,234,212,0.2) !important;
}

.svc-feat-main { display: flex; align-items: center; gap: 20px; }
.svc-feat-main .svc-icon { margin-bottom: 0; flex-shrink: 0; }
.svc-feat-main h3 { margin-bottom: 8px; }
.svc-featured .svc-pill { margin-top: 0; white-space: nowrap; }

/* ============ TÓTEMS ============ */
.totems-section { background: rgba(255,255,255,0.01); }
.totems-title { font-size: clamp(1.9rem, 4vw, 3rem); font-weight: 800; letter-spacing: -0.04em; line-height: 1.1; margin-bottom: 16px; }
.totems-sub { max-width: 560px; margin-bottom: 56px; }

.totems-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }

.totem-card {
  background: #0A0A0F;
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 18px;
  transition: 0.35s;
  display: flex;
  flex-direction: column;
  padding: 16px;
}
.totem-card:hover {
  border-color: rgba(94,234,212,0.4);
  transform: translateY(-6px);
  box-shadow: 0 22px 50px -24px rgba(94,234,212,0.35);
}

.totem-screen {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  background: #000;
  aspect-ratio: 478 / 850;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.05);
}
.totem-screen video { width: 100%; height: 100%; object-fit: cover; display: block; }

.totem-tag {
  align-self: flex-start;
  font-size: 0.7rem; letter-spacing: 0.12em; text-transform: uppercase; font-weight: 600;
  color: var(--c);
  background: rgba(94,234,212,0.1);
  border: 1px solid rgba(94,234,212,0.22);
  padding: 4px 11px; border-radius: 100px;
  margin: 18px 0 12px;
}

.totem-body { padding: 0 4px 6px; display: flex; flex-direction: column; }
.totem-body h3 { font-size: 1.1rem; font-weight: 700; margin-bottom: 8px; letter-spacing: -0.01em; }
.totem-body p { color: #6B7280; font-size: 0.88rem; line-height: 1.6; }

/* Gamificación · Abuelo Julio */
.totem-feature {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: clamp(32px, 5vw, 54px);
  align-items: center;
  margin-top: clamp(48px, 7vw, 80px);
  padding-top: clamp(48px, 7vw, 80px);
  border-top: 1px solid var(--border);
}
.totem-feature-title { font-size: clamp(1.6rem, 3vw, 2.4rem); font-weight: 800; letter-spacing: -0.03em; line-height: 1.1; margin: 14px 0 14px; }
.totem-feature-lead { color: #9CA3AF; font-size: 1rem; line-height: 1.75; max-width: 46ch; }
.totem-feature .case-feature-list { margin-top: 24px; }
.totem-feature-screen {
  justify-self: center;
  width: 100%; max-width: 320px;
  border-radius: 18px; overflow: hidden; background: #000;
  aspect-ratio: 478 / 850;
  border: 1px solid var(--border);
  box-shadow: 0 30px 70px -30px rgba(94,234,212,0.4);
}
.totem-feature-screen video { width: 100%; height: 100%; object-fit: cover; display: block; }

@media (max-width: 768px) {
  .totem-feature { grid-template-columns: 1fr; }
  .totem-feature-screen { order: -1; max-width: 300px; }
}

/* ============ CASOS ============ */
.cases-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 16px; margin-top: 56px; }

.case-card,
.case-card:visited {
  background: #0A0A0F;
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 14px;
  overflow: hidden;
  transition: 0.3s;
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: inherit;
}

.case-card:hover { border-color: rgba(94,234,212,0.3); transform: translateY(-3px); }

.case-media {
  height: 190px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

/* Foto real: cubre todo el recuadro */
.case-photo { width: 100%; height: 100%; object-fit: cover; }
/* Gráfico / ilustración / screenshot: centrado sobre el gradiente */
.case-graphic { max-width: 82%; max-height: 86%; width: auto; object-fit: contain; position: relative; z-index: 1; }

.case-link { margin-top: 16px; color: #5EEAD4; font-size: 0.8rem; font-weight: 600; transition: 0.2s; }
.case-card:hover .case-link { color: #fff; }

.case-media-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, transparent 50%, rgba(0,0,0,0.6));
}

.case-body { padding: 24px; flex: 1; display: flex; flex-direction: column; }

.case-tag {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #2DD4BF;
  margin-bottom: 10px;
}

.case-body h3 { font-size: 0.97rem; font-weight: 700; margin-bottom: 8px; letter-spacing: -0.01em; }
.case-body p { color: #6B7280; font-size: 0.83rem; line-height: 1.6; flex: 1; }

.case-result {
  margin-top: 16px;
  padding: 10px 14px;
  background: rgba(94,234,212,0.07);
  border: 1px solid rgba(94,234,212,0.15);
  border-radius: 8px;
  font-size: 0.8rem;
  color: #5EEAD4;
  font-weight: 600;
}

.case-result::before { content: '↗ '; }

/* ============ PROCESO ============ */
.process-title { font-size: clamp(1.9rem, 4vw, 3rem); font-weight: 800; letter-spacing: -0.04em; line-height: 1.1; margin-bottom: 56px; }

.process-timeline {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  position: relative;
}

.process-step {
  position: relative;
  padding-top: 28px;
  border-top: 1px solid rgba(255,255,255,0.1);
}

.process-step::before {
  content: '';
  position: absolute;
  top: -4px; left: 0;
  width: 7px; height: 7px;
  border-radius: 50%;
  background: #5EEAD4;
  box-shadow: 0 0 12px #5EEAD4;
}

.process-num {
  font-size: 0.8rem;
  font-weight: 800;
  color: #5EEAD4;
  letter-spacing: 0.1em;
  margin-bottom: 12px;
}

.process-step h3 { font-size: 1.05rem; font-weight: 700; margin-bottom: 10px; letter-spacing: -0.02em; }
.process-step p { color: #6B7280; font-size: 0.85rem; line-height: 1.65; }

/* ============ QUIÉNES SOMOS ============ */
.about-inner { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: clamp(32px, 5vw, 64px); align-items: center; }
.about-title { font-size: clamp(1.9rem, 4vw, 3rem); font-weight: 800; letter-spacing: -0.04em; line-height: 1.1; margin-bottom: 24px; }
.about-p { color: #6B7280; font-size: 0.95rem; line-height: 1.8; margin-bottom: 36px; }

.about-metrics { display: flex; gap: 40px; }
.about-metrics div { display: flex; flex-direction: column; gap: 2px; }
.about-metrics strong { font-size: 1.8rem; font-weight: 800; letter-spacing: -0.03em; }
.about-metrics span { color: #6B7280; font-size: 0.8rem; }

.about-card {
  background: linear-gradient(135deg, rgba(94,234,212,0.08), rgba(45,212,191,0.04));
  border: 1px solid rgba(94,234,212,0.2);
  border-radius: 18px;
  padding: 40px;
}

.about-quote { font-size: 1.2rem; font-weight: 600; line-height: 1.6; letter-spacing: -0.02em; margin-bottom: 20px; }
.about-author { color: #5EEAD4; font-size: 0.85rem; font-weight: 600; }

/* ============ CTA ============ */
.cta-section { padding: clamp(96px, 16vw, 140px) var(--pad-x); text-align: center; position: relative; overflow: hidden; z-index: 1; }

.cta-section::before {
  content: '';
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 800px; height: 500px;
  background: radial-gradient(ellipse, rgba(94,234,212,0.12), transparent 65%);
  pointer-events: none;
  filter: blur(20px);
}

.cta-section h2 {
  font-size: clamp(2.2rem, 5vw, 4rem);
  font-weight: 900;
  letter-spacing: -0.05em;
  margin-bottom: 20px;
  line-height: 1.05;
  position: relative;
  z-index: 1;
}

.cta-sub { color: #6B7280; font-size: 1rem; max-width: 440px; margin: 0 auto 40px; line-height: 1.75; position: relative; z-index: 1; }

.cta-form { display: flex; gap: 10px; justify-content: center; max-width: 460px; margin: 0 auto; position: relative; z-index: 1; }

.cta-input {
  flex: 1;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 9px;
  padding: 14px 18px;
  color: #fff;
  font-size: 0.9rem;
  outline: none;
  font-family: inherit;
  transition: 0.2s;
}

.cta-input:focus { border-color: rgba(94,234,212,0.5); background: rgba(94,234,212,0.05); }
.cta-input::placeholder { color: #6B7280; }
.cta-note { color: #6B7280; font-size: 0.78rem; margin-top: 16px; position: relative; z-index: 1; }

/* ============ FOOTER ============ */
footer {
  border-top: 1px solid rgba(255,255,255,0.06);
  padding: 56px var(--pad-x) 28px;
  position: relative;
  z-index: 1;
}

.footer-grid {
  max-width: 1100px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.5fr 1fr 1.2fr;
  gap: 40px;
  align-items: start;
}

.footer-col { display: flex; flex-direction: column; gap: 16px; }
.footer-tag { color: #6B7280; font-size: 0.85rem; line-height: 1.7; max-width: 320px; }
.footer-col-title {
  color: #fff;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.footer-links { display: flex; flex-direction: column; gap: 12px; }
.footer-links a { color: #6B7280; font-size: 0.85rem; text-decoration: none; transition: 0.2s; }
.footer-links a:hover { color: #fff; }

/* Contacto con iconos */
.footer-contact-item {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #6B7280;
  font-size: 0.85rem;
  text-decoration: none;
  transition: 0.2s;
}
.footer-contact-item svg { width: 18px; height: 18px; flex-shrink: 0; color: var(--c); }
.footer-contact-item:hover { color: #fff; }

/* Redes sociales (solo logo) */
.footer-socials { display: flex; gap: 12px; margin-top: 4px; }
.social-icon {
  width: 38px;
  height: 38px;
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  color: #9CA3AF;
  transition: 0.2s;
}
.social-icon svg { width: 18px; height: 18px; }
.social-icon:hover {
  color: #fff;
  border-color: var(--c);
  background: rgba(94,234,212,0.12);
  transform: translateY(-2px);
}

.footer-bottom {
  max-width: 1100px;
  margin: 40px auto 0;
  padding-top: 24px;
  border-top: 1px solid rgba(255,255,255,0.06);
  color: #6B7280;
  font-size: 0.78rem;
  text-align: center;
}

.wa-float {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 999;
  width: 50px;
  height: 50px;
  background: linear-gradient(135deg, #25D366, #128C7E);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  text-decoration: none;
  box-shadow: 0 4px 20px rgba(37,211,102,0.3);
  transition: transform 0.2s;
}

.wa-float:hover { transform: scale(1.08); }

/* ============ ANIMACIÓN FADE-IN AL SCROLL ============ */
.fade-in {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.visible { opacity: 1; transform: translateY(0); }

/* ============ RESPONSIVE - 768px (solo reacomodo estructural) ============ */
@media (max-width: 768px) {
  .services-header { flex-direction: column; align-items: flex-start; }
  .services-grid { grid-template-columns: 1fr 1fr; }

  .stats-row { grid-template-columns: 1fr 1fr; }
  .totems-grid { grid-template-columns: 1fr 1fr; }
  .process-timeline { grid-template-columns: 1fr 1fr; }
  .about-inner { grid-template-columns: 1fr; }

  /* Footer mobile: alineado a la izquierda, lista tappable (mas nativo) */
  .footer-grid { grid-template-columns: 1fr; gap: 36px; text-align: left; }
  .footer-tag { max-width: none; }
  .footer-socials { justify-content: flex-start; }
  .footer-links { gap: 0; }
  .footer-links a { padding: 13px 2px; font-size: 0.95rem; border-bottom: 1px solid rgba(255,255,255,0.06); }
  .footer-links a:last-child { border-bottom: none; }
  .footer-contact-item { justify-content: flex-start; }
  .footer-bottom { text-align: left; }
}

/* ============ RESPONSIVE - 480px (solo reacomodo estructural) ============ */
@media (max-width: 480px) {
  .hero-actions { flex-direction: column; width: 100%; }
  .hero-btn-main, .hero-btn-ghost { width: 100%; text-align: center; }
  .hero-mini-stats { flex-direction: column; }

  .services-grid { grid-template-columns: 1fr; }
  .stats-row { grid-template-columns: 1fr; }
  .totems-grid { grid-template-columns: 1fr; }
  .process-timeline { grid-template-columns: 1fr; }

  .cta-form { flex-direction: column; }
  .about-metrics { gap: 24px; flex-wrap: wrap; }
}


/* ============================================================
   PÁGINAS DE CASO DE ÉXITO (subpáginas)
   ============================================================ */
.case-main { padding-top: 60px; position: relative; z-index: 1; }

.breadcrumb {
  max-width: 1100px;
  margin: 0 auto;
  padding: 28px var(--pad-x) 0;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  font-size: 0.82rem;
  color: #6B7280;
}
.breadcrumb a { color: #6B7280; text-decoration: none; transition: 0.2s; }
.breadcrumb a:hover { color: var(--c); }
.breadcrumb .sep { color: #4B5563; }
.breadcrumb .current { color: #fff; font-weight: 600; }

.case-hero {
  max-width: 1100px;
  margin: 0 auto;
  padding: 36px var(--pad-x) 0;
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: clamp(28px, 5vw, 56px);
  align-items: center;
}
.case-hero h1 {
  font-size: clamp(2rem, 4.5vw, 3.2rem);
  font-weight: 900;
  letter-spacing: -0.04em;
  line-height: 1.08;
  margin: 16px 0 18px;
}
.case-hero-lead { color: #9CA3AF; font-size: 1.02rem; line-height: 1.75; }

.case-tags { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 8px; }
.case-tag-chip {
  font-size: 0.7rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--c); background: rgba(94,234,212,0.08);
  border: 1px solid rgba(94,234,212,0.2); padding: 4px 12px; border-radius: 100px;
}

.case-hero-media {
  border-radius: 16px; overflow: hidden; border: 1px solid var(--border);
  aspect-ratio: 4 / 3; display: flex; align-items: center; justify-content: center;
  padding: 0;
}
.case-hero-media img.cover { width: 100%; height: 100%; object-fit: cover; }
.case-hero-media img.contain { max-width: 96%; max-height: 96%; object-fit: contain; }

.case-body { max-width: 1100px; margin: 0 auto; padding: clamp(48px, 7vw, 80px) var(--pad-x); }
.case-block { margin-bottom: clamp(40px, 6vw, 64px); }
.case-block:last-child { margin-bottom: 0; }
.case-block h2 { font-size: clamp(1.3rem, 2.6vw, 1.7rem); font-weight: 800; letter-spacing: -0.02em; margin-bottom: 16px; }
.case-block > p { color: #9CA3AF; font-size: 1rem; line-height: 1.8; max-width: 760px; }

.result-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 16px; margin-top: 28px; }
.result-item { background: #0A0A0F; border: 1px solid var(--border); border-radius: 14px; padding: 28px 24px; }
.result-num {
  font-size: clamp(1.7rem, 3vw, 2.1rem); font-weight: 900; letter-spacing: -0.03em;
  background: linear-gradient(135deg, #fff, #5EEAD4);
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
.result-label { color: #6B7280; font-size: 0.85rem; margin-top: 8px; line-height: 1.5; }

.case-feature-list { list-style: none; margin-top: 18px; display: grid; gap: 12px; max-width: 760px; }
.case-feature-list li { color: #9CA3AF; font-size: 0.95rem; line-height: 1.6; padding-left: 28px; position: relative; }
.case-feature-list li::before { content: '✓'; position: absolute; left: 0; color: var(--c); font-weight: 800; }

.case-quote { border-left: 3px solid var(--c); padding: 6px 0 6px 24px; margin-top: 28px; max-width: 760px; }
.case-quote p { font-size: clamp(1.05rem, 2vw, 1.2rem); font-weight: 600; line-height: 1.6; color: #E5E7EB; font-style: italic; }
.case-quote cite { display: block; margin-top: 12px; color: var(--c); font-size: 0.85rem; font-weight: 600; font-style: normal; }

/* Sub-clientes (caso chatbot) */
.subcases { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; margin-top: 28px; }
.subcase { background: #0A0A0F; border: 1px solid var(--border); border-radius: 14px; padding: 28px 24px; }
.subcase h3 { font-size: 1.05rem; font-weight: 700; margin-bottom: 6px; }
.subcase .subcase-tag { color: var(--c); font-size: 0.75rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; }
.subcase p { color: #9CA3AF; font-size: 0.88rem; line-height: 1.65; margin: 10px 0 14px; }
.subcase .subcase-result { color: #5EEAD4; font-size: 0.82rem; font-weight: 600; }

.case-cta { text-align: center; padding: clamp(60px, 9vw, 100px) var(--pad-x); border-top: 1px solid var(--border); position: relative; z-index: 1; }
.case-cta h2 { font-size: clamp(1.6rem, 3.5vw, 2.4rem); font-weight: 900; letter-spacing: -0.03em; margin-bottom: 14px; }
.case-cta p { color: #6B7280; margin-bottom: 28px; }

@media (max-width: 768px) {
  .case-hero { grid-template-columns: 1fr; }
  .case-hero-media { aspect-ratio: 16 / 10; }
}


/* ===== Íconos SVG como media de caso (erp, portal) ===== */
.case-media .case-svg { width: 72px; height: 72px; color: var(--c); position: relative; z-index: 1; }
.case-hero-media .case-svg { width: 145px; height: 145px; color: var(--c); }

/* ===== Encabezado del índice de casos ===== */
.casos-index-head { margin-bottom: 8px; }
.casos-index-head h1 {
  font-size: clamp(2rem, 4.5vw, 3.2rem);
  font-weight: 900; letter-spacing: -0.04em; line-height: 1.08;
  margin: 14px 0 14px;
}
.casos-index-head .section-sub { max-width: 560px; }

/* ===== Botón "ver todos" en la sección de casos de la landing ===== */
.cases-cta { text-align: center; margin-top: 40px; }


/* ===== Caso Mostaza App: showcase métricas + mockup de teléfono ===== */
.app-showcase {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: clamp(32px, 5vw, 72px);
  align-items: center;
}

.app-metric-block { }
.app-metric-num {
  display: block;
  font-size: clamp(1.9rem, 3.6vw, 2.7rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.05;
  color: #fff;
}
.app-metric-label { font-size: clamp(1rem, 1.6vw, 1.15rem); font-weight: 700; margin-top: 4px; letter-spacing: -0.01em; }
.app-metric-block p { color: #6B7280; font-size: 0.9rem; line-height: 1.65; margin-top: 8px; max-width: 52ch; }
.app-divider { width: 42px; height: 3px; border-radius: 3px; background: var(--c); margin: clamp(22px, 3vw, 32px) 0; }

/* La imagen ya incluye el marco del telefono: se muestra directa con sombra */
.app-phone { display: flex; justify-content: center; }
.app-phone img {
  width: 100%;
  max-width: 390px;
  height: auto;
  display: block;
  filter: drop-shadow(0 40px 55px rgba(0,0,0,0.55));
}

@media (max-width: 768px) {
  .app-showcase { grid-template-columns: 1fr; }
  .app-phone { order: -1; }
}


/* ===== Formatos alternativos para casos (variar la lectura) ===== */
/* Pasos numerados (para 'La solución / La implementación') */
.steps { list-style: none; margin-top: 28px; max-width: 880px; }
.step { display: grid; grid-template-columns: auto 1fr; gap: 24px; padding: 24px 0; border-top: 1px solid var(--border); }
.step:first-child { border-top: none; padding-top: 4px; }
.step-num { font-size: 1.5rem; font-weight: 800; color: var(--c); letter-spacing: -0.02em; line-height: 1; min-width: 42px; }
.step-body h3 { font-size: 1.12rem; font-weight: 700; margin-bottom: 6px; letter-spacing: -0.01em; }
.step-body p { color: #9CA3AF; font-size: 0.95rem; line-height: 1.7; max-width: 72ch; }

/* Lista de beneficios con ícono check (para 'Por qué...') */
.why-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 26px 44px; margin-top: 28px; }
.why-item { display: grid; grid-template-columns: auto 1fr; gap: 16px; align-items: start; }
.why-ico { width: 34px; height: 34px; border-radius: 9px; background: rgba(94,234,212,0.1); border: 1px solid rgba(94,234,212,0.22); display: flex; align-items: center; justify-content: center; color: var(--c); flex-shrink: 0; }
.why-ico svg { width: 17px; height: 17px; }
.why-item h3 { font-size: 1rem; font-weight: 700; margin-bottom: 4px; }
.why-item p { color: #9CA3AF; font-size: 0.9rem; line-height: 1.6; }

@media (max-width: 680px) {
  .why-grid { grid-template-columns: 1fr; }
}


/* ===== Servicios: layout alternado (zig-zag) ===== */
.svc-list { display: flex; flex-direction: column; gap: 16px; }
.svc-row {
  display: grid;
  grid-template-columns: 300px 1fr;
  background: #0A0A0F;
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
  transition: border-color 0.25s, transform 0.25s;
}
.svc-row:hover { border-color: rgba(94,234,212,0.3); transform: translateY(-2px); }
.svc-row-visual {
  position: relative;
  display: flex; align-items: center; justify-content: center;
  min-height: 150px;
  background: linear-gradient(135deg, rgba(94,234,212,0.08), rgba(45,212,191,0.03));
  border-right: 1px solid var(--border);
}
.svc-row-num { position: absolute; top: 18px; left: 22px; font-size: 0.85rem; font-weight: 800; color: var(--c); letter-spacing: 0.06em; }
.svc-row-ico {
  width: 62px; height: 62px; border-radius: 15px;
  background: rgba(94,234,212,0.1); border: 1px solid rgba(94,234,212,0.22);
  display: flex; align-items: center; justify-content: center; color: var(--c);
}
.svc-row-ico svg { width: 28px; height: 28px; }
.svc-row-text { padding: 28px 36px; display: flex; flex-direction: column; justify-content: center; }
.svc-row-text h3 { font-size: 1.2rem; font-weight: 700; margin-bottom: 8px; letter-spacing: -0.02em; }
.svc-row-text p { color: #6B7280; font-size: 0.92rem; line-height: 1.65; max-width: 62ch; }
.svc-row-text .svc-pill { margin-top: 16px; align-self: flex-start; }

/* Alternar lado: filas pares -> visual a la derecha */
.svc-row:nth-child(even) .svc-row-visual { order: 2; border-right: none; border-left: 1px solid var(--border); }

.svc-row-featured { border-color: rgba(94,234,212,0.25); }
.svc-row-featured .svc-row-visual { background: linear-gradient(135deg, rgba(94,234,212,0.15), rgba(45,212,191,0.05)); }

@media (max-width: 760px) {
  .svc-row { grid-template-columns: 1fr; }
  .svc-row:nth-child(even) .svc-row-visual { order: 0; border-left: none; }
  .svc-row-visual { min-height: 120px; border-right: none; border-bottom: 1px solid var(--border); }
}

/* Logo de WhatsApp en el boton flotante */
.wa-float { color: #fff; }
.wa-float svg { width: 28px; height: 28px; }


/* ===== Menú móvil (hamburguesa) ===== */
.nav-menu { display: contents; }
.nav-toggle {
  display: none; background: none; border: none; cursor: pointer;
  width: 42px; height: 42px; padding: 0;
  flex-direction: column; align-items: center; justify-content: center; gap: 5px;
}
.nav-toggle span { display: block; width: 22px; height: 2px; background: #fff; border-radius: 2px; transition: transform .25s ease, opacity .2s ease; }

@media (max-width: 768px) {
  .nav-toggle { display: flex; }
  .nav-menu {
    display: flex;
    position: fixed; top: 60px; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: rgba(0,0,0,0.97);
    -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
    padding: 8px var(--pad-x) 22px;
    transform: translateY(-14px); opacity: 0; pointer-events: none;
    transition: transform .25s ease, opacity .25s ease;
  }
  #navbar.nav-open .nav-menu { transform: translateY(0); opacity: 1; pointer-events: auto; }
  .nav-menu .nav-links { display: flex; flex-direction: column; gap: 0; width: 100%; }
  .nav-menu .nav-links a { padding: 15px 6px; font-size: 1rem; border-radius: 0; border-bottom: 1px solid rgba(255,255,255,0.06); }
  .nav-menu .nav-right { width: 100%; margin-top: 16px; }
  .nav-menu .nav-right .btn-primary { display: block; text-align: center; padding: 13px; font-size: 0.95rem; }
  #navbar.nav-open .nav-toggle span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  #navbar.nav-open .nav-toggle span:nth-child(2) { opacity: 0; }
  #navbar.nav-open .nav-toggle span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
}


/* ===== Casos de éxito: acordeón expansible (estilo Devin) ===== */
.cases-accordion { display: flex; flex-direction: column; gap: 16px; margin-top: 56px; }

@media (min-width: 861px) {
  .cases-accordion { flex-direction: row; height: 460px; gap: 14px; }
  .cases-accordion .case-card {
    flex: 1; height: 100%;
    position: relative; overflow: hidden;
    min-width: 0;
    transition: flex 0.55s cubic-bezier(.4,0,.2,1), border-color 0.3s;
  }
  .cases-accordion .case-card { transform: none; }
  /* la card activa se mantiene expandida; JS mueve .active al hacer hover */
  .cases-accordion .case-card.active { flex: 2.8; }

  .cases-accordion .case-media { position: absolute; inset: 0; height: 100%; padding: 0; border-radius: 0; align-items: flex-start; }
  .cases-accordion .case-photo { width: 100%; height: 100%; object-fit: cover; }
  .cases-accordion .case-graphic { max-width: 74%; max-height: 44%; margin-top: 40px; margin-bottom: 0; }
  .cases-accordion .case-media-overlay { background: linear-gradient(to bottom, rgba(0,0,0,0) 18%, rgba(0,0,0,0.55) 48%, rgba(0,0,0,0.97) 100%); }

  .cases-accordion .case-body {
    position: absolute; left: 0; right: 0; bottom: 0; z-index: 2;
    width: 460px; max-width: 100%;
    padding: 96px 30px 30px;
    background: linear-gradient(to top, rgba(0,0,0,0.95) 32%, rgba(0,0,0,0.6) 68%, transparent);
    opacity: 0; transform: translateY(12px);
    transition: opacity 0.4s ease 0.05s, transform 0.4s ease 0.05s;
  }
  .cases-accordion .case-card.active .case-body { opacity: 1; transform: translateY(0); }
  .cases-accordion .case-body h3 { white-space: normal; }
}


/* ===== Casos: acordeón colapsable en mobile (click para abrir) ===== */
@media (max-width: 860px) {
  .cases-accordion .case-card { position: relative; overflow: hidden; cursor: pointer; }
  .cases-accordion .case-card .case-body {
    max-height: 0; opacity: 0; padding-top: 0; padding-bottom: 0;
    transition: max-height 0.4s ease, opacity 0.3s ease, padding 0.3s ease;
  }
  .cases-accordion .case-card.active .case-body {
    max-height: 420px; opacity: 1; padding-top: 22px; padding-bottom: 22px;
  }
}
