/* ═══════════════════════════════════════════════════
   layout.css — Nav, Sections, Container, Grid, Footer
   ═══════════════════════════════════════════════════ */

/* ── Scroll progress bar ───────────────────────────── */
#scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  width: 0%;
  height: 2px;
  background: linear-gradient(90deg, var(--accent-dark), var(--accent));
  z-index: 1000;
  transition: width 80ms linear;
  transform-origin: left;
  box-shadow: 0 0 8px var(--accent-glow);
}

/* ── Canvas background ─────────────────────────────── */
/* Lives inside the final contact section (.cta-section) */
#canvas-container {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
  opacity: 0;
  transition: opacity 1.2s cubic-bezier(0.22, 1, 0.36, 1);
}
#canvas-container.is-ready { opacity: 1; }

#city-canvas {
  width: 100%;
  height: 100%;
  display: block;
}

/* Edges melt into the neighbouring sections; the centre is dimmed so the form stays readable */
.vignette {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 40% 55% at 50% 48%, rgba(5,5,7,0.6) 0%, rgba(5,5,7,0.3) 60%, transparent 100%),
    linear-gradient(to bottom, var(--bg-tertiary) 0%, rgba(12,12,15,0.55) 14%, transparent 34%, transparent 80%, var(--deep-bg) 100%);
  pointer-events: none;
}
/* Phones: the drone-view city runs its fibre light down the RIGHT of the form, where the fields
   are empty; the left half (labels and what the visitor types) stays dimmed for contrast */
@media (max-width: 767px) {
  .vignette {
    background:
      linear-gradient(to right, rgba(5,5,7,0.6) 0%, rgba(5,5,7,0.45) 45%, rgba(5,5,7,0.1) 72%, transparent 85%),
      linear-gradient(to bottom, var(--bg-tertiary) 0%, rgba(12,12,15,0.5) 8%, transparent 20%, transparent 88%, var(--deep-bg) 100%);
  }
}

/* ── Navigation ────────────────────────────────────── */
#main-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 200;
  height: var(--nav-h);
  border-bottom: 1px solid transparent;
  transition: background var(--transition-base), border-color var(--transition-base);
}

/* Blur en pseudo-elemento para no crear stacking context que rompe el nav móvil */
#main-nav::before {
  content: '';
  position: absolute;
  inset: 0;
  backdrop-filter: blur(20px) saturate(1.4);
  -webkit-backdrop-filter: blur(20px) saturate(1.4);
  opacity: 0;
  transition: opacity var(--transition-base);
  pointer-events: none;
  z-index: -1;
}

#main-nav.scrolled {
  background: rgba(5, 5, 7, 0.86);
  border-color: var(--border);
}

#main-nav.scrolled::before {
  opacity: 1;
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  gap: var(--space-8);
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  flex-shrink: 0;
}

.logo-img {
  height: 30px;
  width: auto;
  display: block;
  flex-shrink: 0;
}

.logo-img--footer {
  height: 40px;
}

.logo-wordmark {
  height: 60px;
  width: auto;
  display: block;
  flex-shrink: 0;
}

.logo-wordmark--footer {
  height: 36px;
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: var(--space-8);
  flex: 1;
  justify-content: flex-end;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: var(--space-4);
}

.nav-link {
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--text-secondary);
  letter-spacing: 0.01em;
  transition: color var(--transition-fast);
  position: relative;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -3px;
  left: 0;
  right: 100%;
  height: 1px;
  background: var(--accent);
  transition: right var(--transition-base);
}

.nav-link:hover {
  color: var(--text-primary);
}

.nav-link:hover::after,
.nav-link.active::after {
  right: 0;
}

.nav-link.active {
  color: var(--text-primary);
}

/* Desktop: three zones — logo | centred links | actions (call + WhatsApp).
   .nav-menu turns into "contents" so its two children sit in the grid directly. */
@media (min-width: 901px) {
  .nav-inner {
    display: grid;
    /* side columns never narrower than their content, so the logo cannot overlap the links */
    grid-template-columns: minmax(max-content, 1fr) auto minmax(max-content, 1fr);
  }
  .nav-menu { display: contents; }
  .nav-links { justify-self: center; }
  .nav-actions {
    justify-self: end;
    display: flex;
    align-items: center;
    gap: var(--space-3);
  }
}
.nav-call svg { flex: none; }
/* The call button keeps a dark glass base so it reads over the light top of the hero */
@media (min-width: 901px) {
  .nav-actions .nav-call {
    background: rgba(5, 5, 7, 0.62);
    border-color: rgba(214, 255, 0, 0.35);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
  }
  .nav-actions .nav-call:hover { background: rgba(5, 5, 7, 0.8); }
}
/* Medium screens: the call button keeps only its icon so nothing wraps */
@media (min-width: 901px) and (max-width: 1240px) {
  .nav-call-num { display: none; }
  .nav-call { padding-inline: 0.85em; }
  .nav-links { gap: var(--space-3); }
  .nav-inner { gap: var(--space-4); }
  .logo-wordmark { height: 46px; }
}
/* 901–1010px (rare: between tablets and laptops): too narrow for both buttons; WhatsApp stays */
@media (min-width: 901px) and (max-width: 1010px) {
  .nav-link { font-size: 0.8rem; }
  .nav-links { gap: 0.7rem; }
  .nav-actions .nav-call { display: none; }
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  width: 28px;
  padding: 4px 0;
  flex-shrink: 0;
}

.nav-toggle span {
  display: block;
  height: 1.5px;
  background: var(--text-primary);
  border-radius: 2px;
  transition: transform var(--transition-base), opacity var(--transition-fast);
  transform-origin: center;
}

.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

/* ── Container ─────────────────────────────────────── */
.container {
  width: 100%;
  max-width: 1200px;
  margin-inline: auto;
  padding-inline: var(--space-8);
}

/* ── Main ──────────────────────────────────────────── */
main {
  position: relative;
  z-index: 1;
}

/* ── Hero ──────────────────────────────────────────── */
.hero {
  background: transparent;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  position: relative;
  padding-top: var(--nav-h);
  overflow: hidden;
}

.hero-inner {
  padding-top: var(--space-20);
  padding-bottom: var(--space-24);
}

.hero-content {
  max-width: 720px;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-3);
  background: rgba(214, 255, 0, 0.08);
  border: 1px solid rgba(214, 255, 0, 0.2);
  border-radius: 100px;
  padding: var(--space-2) var(--space-4);
  margin-bottom: var(--space-8);
}

.badge-pulse {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  flex-shrink: 0;
  animation: pulse-dot 2.4s ease-in-out infinite;
}

.hero-title {
  font-size: var(--text-hero);
  font-weight: 900;
  line-height: 1.05;
  letter-spacing: -0.035em;
  margin-bottom: var(--space-8);
  color: var(--text-primary);
}

.hero-title em {
  font-style: normal;
  font-weight: 900;
}

.hero-lead {
  font-size: var(--text-lg);
  color: var(--text-secondary);
  line-height: 1.65;
  max-width: 540px;
  margin-bottom: var(--space-10);
  font-weight: 400;
}

.hero-actions {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  flex-wrap: wrap;
  margin-bottom: var(--space-6);
}

.hero-meta {
  color: var(--text-muted);
  margin-bottom: var(--space-2);
  font-size: var(--text-xs);
}

.hero-meta:last-of-type {
  margin-bottom: var(--space-12);
}

.hero-steps {
  line-height: 2;
}

.hero-meta-link {
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: rgba(214,255,0,0.4);
  transition: text-decoration-color var(--transition-fast);
}
.hero-meta-link:hover {
  text-decoration-color: var(--accent);
}

.hero-stats {
  display: flex;
  align-items: center;
  gap: var(--space-6);
  flex-wrap: wrap;
  padding: var(--space-6) var(--space-8);
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  backdrop-filter: blur(12px);
  width: fit-content;
}

.stat-item {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
  text-align: center;
}

.stat-value {
  font-size: var(--text-xl);
  font-weight: 900;
  letter-spacing: -0.02em;
  line-height: 1.1;
}

.stat-label {
  color: var(--text-muted);
  font-size: var(--text-xs);
}

.stat-sep {
  width: 1px;
  height: 36px;
  background: var(--border);
  flex-shrink: 0;
}

.scroll-hint {
  display: none;
}

@media (min-width: 1025px) {
.scroll-hint {
  display: flex;
  position: absolute;
  bottom: var(--space-5);
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-2);
  color: var(--text-muted);
  animation: scroll-hint-fade 3s ease-in-out infinite;
}
}

.scroll-hint-line {
  width: 1px;
  height: 40px;
  background: linear-gradient(to bottom, var(--accent-dark), transparent);
  animation: scroll-line-grow 2s ease-in-out infinite;
}

/* ── Sections base ──────────────────────────────────── */
.section {
  position: relative;
  z-index: 1;
  padding-block: var(--space-24);
  background:
    linear-gradient(180deg, rgba(255,255,255,0.018) 0%, transparent 18%),
    var(--deep-bg);
}

.section-header {
  max-width: 900px; /* titles get room for each sentence on one line; .section-lead keeps its own 520px */
  margin-bottom: var(--space-12);
}

.section-tag {
  display: inline-block;
  color: var(--accent);
  font-size: var(--text-xs);
  margin-bottom: var(--space-4);
}

.section-title {
  font-size: var(--text-4xl);
  font-weight: 900;
  letter-spacing: -0.03em;
  line-height: 1.25;
  padding-bottom: 0.1em;
  margin-bottom: var(--space-6);
  overflow-wrap: break-word;
}

@media (max-width: 480px) {
  .section-title {
    font-size: clamp(1.65rem, 5.5vw, 2.5rem);
  }
}

.section-lead {
  font-size: var(--text-md);
  color: var(--text-secondary);
  line-height: 1.7;
  max-width: 520px;
}

/* ── Services grid ──────────────────────────────────── */
.services-section {
  background: var(--bg-secondary);
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-5);
}

/* ── Split sections ─────────────────────────────────── */
.split-section {
  background: var(--deep-bg);
}

.split-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-20);
  align-items: center;
}

/* Companies: give more room to the maps column */
.companies-section .split-inner {
  grid-template-columns: minmax(0, 2fr) minmax(320px, 1fr);
  gap: var(--space-10);
}

.companies-section .section-title {
  font-size: clamp(1.6rem, 3vw, 2.4rem);
}

.split-inner--reverse {
  direction: rtl;
}

.split-inner--reverse > * {
  direction: ltr;
}

.split-text {
  max-width: 520px;
}

.split-desc {
  font-size: var(--text-md);
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: var(--space-5);
}

.split-visual {
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: hidden;
}

/* ── Cases ──────────────────────────────────────────── */
.cases-section {
  background: var(--bg-secondary);
  padding-block-end: 0;
}

.cases-list {
  display: flex;
  flex-direction: column;
  gap: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  overflow: hidden;
}

/* ── Companies section ──────────────────────────────── */
.companies-section {
  background: var(--deep-bg);
}

/* ── Lead magnet ────────────────────────────────────── */
.leadmagnet-section {
  background: var(--bg-secondary);
}

/* ── Community ──────────────────────────────────────── */
.community-section {
  background: var(--deep-bg);
}

/* ── Testimonials ───────────────────────────────────── */
.testimonials-section {
  background: var(--bg-secondary);
  padding-block-start: var(--space-16);
}

.testimonials-section > .container::before {
  content: '';
  display: block;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--border) 15%, var(--border) 85%, transparent);
  margin-bottom: var(--space-16);
}

.testimonials-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-5);
}

/* ── Comparison ─────────────────────────────────────── */
.comparison-section {
  background: var(--deep-bg);
}

.comparison-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-5);
  margin-bottom: var(--space-10);
}

/* ── FAQ ────────────────────────────────────────────── */
.faq-section {
  background: var(--bg-secondary);
}

.faq-section .section-header {
  margin-bottom: var(--space-6);
}

/* ── CTA ────────────────────────────────────────────── */
.cta-section {
  position: relative;
  overflow: hidden;
  background: var(--deep-bg);
  text-align: center;
  padding-block: clamp(var(--space-16), 14vh, 10rem);
}

.cta-inner {
  position: relative;
  z-index: 1;
  max-width: 700px;
  margin-inline: auto;
}

.cta-title {
  font-size: min(var(--text-4xl), 3.1rem); /* "Ya sabes que pagas de más." on one line in its column */
  font-weight: 900;
  letter-spacing: -0.035em;
  line-height: 1.1;
  margin-bottom: var(--space-6);
}

.cta-lead {
  font-size: var(--text-md);
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: var(--space-10);
}

.cta-form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-4);
  margin-bottom: var(--space-5);
}

.form-group--full {
  grid-column: 1 / -1;
}

.form-hint {
  grid-column: 1 / -1;
  font-size: 0.75rem;
  color: var(--text-muted);
  text-align: center;
  margin-top: calc(var(--space-2) * -1);
}

.cta-form-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-4);
  flex-wrap: wrap;
}

/* ── Footer ─────────────────────────────────────────── */
.site-footer {
  position: relative;
  z-index: 1;
  background: var(--deep-bg);
  border-top: 1px solid var(--border);
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: var(--space-12);
  padding-block: var(--space-20);
}

.footer-brand {
  display: flex;
  flex-direction: column;
  gap: var(--space-5);
}

.footer-contact-info {
  margin-top: var(--space-4);
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.footer-phone {
  font-size: var(--text-md);
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: 0.02em;
}

.footer-phone:hover { color: var(--accent); }

.footer-offices {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.footer-office {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.footer-office-name {
  font-size: var(--text-xs);
  color: var(--accent);
  letter-spacing: 0.1em;
}

.footer-office-label {
  font-size: var(--text-xs);
  color: var(--accent);
  letter-spacing: 0.1em;
  display: block;
  margin-bottom: var(--space-1);
}

.footer-office-addr {
  font-size: var(--text-xs);
  color: var(--text-muted);
}

.footer-desc {
  font-size: var(--text-sm);
  color: var(--text-secondary);
  line-height: 1.7;
  max-width: 260px;
}

.footer-social {
  display: flex;
  gap: var(--space-3);
}

.social-link {
  width: 34px;
  height: 34px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  -webkit-tap-highlight-color: transparent;
  transition:
    color 0.2s ease,
    border-color 0.2s ease,
    background 0.2s ease,
    box-shadow 0.25s ease,
    transform 0.25s cubic-bezier(0.23, 1, 0.32, 1);
}

.social-link svg {
  transition: transform 0.3s cubic-bezier(0.23, 1, 0.32, 1);
}

.social-link:active {
  transform: scale(0.92);
  transition-duration: 0.1s;
}

.footer-nav {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

.footer-nav-title {
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--accent);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: var(--space-2);
}

.footer-nav ul {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.footer-link {
  position: relative;
  display: inline-block;
  font-size: var(--text-sm);
  color: var(--text-secondary);
  -webkit-tap-highlight-color: transparent;
  transition:
    color 0.2s ease,
    transform 0.3s cubic-bezier(0.23, 1, 0.32, 1);
}

.footer-nav .footer-link::before {
  content: '';
  position: absolute;
  left: -14px;
  top: 50%;
  width: 8px;
  height: 1px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s cubic-bezier(0.23, 1, 0.32, 1);
}

.footer-office .footer-link::after,
.footer-phone::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: -2px;
  height: 1px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.35s cubic-bezier(0.23, 1, 0.32, 1);
}

.footer-phone {
  position: relative;
  display: inline-block;
  transition: color 0.2s ease;
}

.footer-link:active,
.footer-phone:active {
  color: var(--accent);
}

@media (hover: hover) and (pointer: fine) {
  .footer-link:hover { color: var(--text-primary); }

  .footer-nav .footer-link:hover {
    transform: translateX(14px);
  }
  .footer-nav .footer-link:hover::before {
    transform: scaleX(1);
  }

  .footer-office .footer-link:hover::after,
  .footer-phone:hover::after {
    transform: scaleX(1);
    transform-origin: left;
  }

  .social-link:hover {
    color: #050507;
    background: var(--accent);
    border-color: var(--accent);
    transform: translateY(-3px);
    box-shadow: 0 6px 18px rgba(214,255,0,0.22);
  }
  .social-link:hover svg {
    transform: scale(1.1);
  }

  .site-footer .nav-logo {
    transition: opacity 0.2s ease;
  }
  .site-footer .nav-logo:hover {
    opacity: 0.8;
  }
}

.footer-bar {
  border-top: 1px solid var(--border);
  padding-block: var(--space-5);
}

.footer-copy {
  color: var(--text-muted);
  font-size: var(--text-xs);
}

/* ═══════════════════════════════════════════════════
   Responsive — 900px
   ═══════════════════════════════════════════════════ */
@media (max-width: 900px) {
  .nav-toggle {
    display: flex;
  }

  .nav-menu {
    position: fixed;
    inset: 0;
    top: var(--nav-h);
    background: #0d0f14;
    flex-direction: column;
    justify-content: flex-start;
    padding: var(--space-6) var(--space-6) var(--space-8);
    gap: var(--space-8);
    overflow-y: auto;
    transform: translateY(-110%);
    transition: transform var(--transition-slow);
    pointer-events: none;
  }

  .nav-menu.open {
    transform: translateY(0);
    pointer-events: auto;
  }

  /* Phone menu: plain list split by thin lines, buttons underneath */
  .nav-links {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    width: 100%;
  }
  .nav-links li { border-bottom: 1px solid rgba(255, 255, 255, 0.08); }
  .nav-links li:first-child { border-top: 1px solid rgba(255, 255, 255, 0.08); }

  .nav-link {
    display: block;
    padding-block: 0.95rem;
    font-size: var(--text-lg);
    font-weight: 600;
    color: var(--text-primary);
  }
  .nav-link::after { display: none; }

  .nav-cta {
    width: 100%;
    justify-content: center;
  }

  /* Phone menu: big call and WhatsApp buttons */
  .nav-actions {
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
    width: 100%;
  }
  .nav-actions .btn {
    width: 100%;
    justify-content: center;
    padding-block: 0.85em;
  }

  .section {
    padding-block: var(--space-16);
  }

  .section-header {
    margin-bottom: var(--space-10);
  }

  .services-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .split-inner,
  .companies-section .split-inner {
    grid-template-columns: 1fr;
    gap: var(--space-8);
  }

  .split-inner--reverse {
    direction: ltr;
  }

  .split-text {
    max-width: 100%;
  }

  .testimonials-grid {
    grid-template-columns: 1fr;
  }

  .testimonials-grid .testimonial-card:nth-child(n+4) {
    display: none;
  }

  .comparison-grid {
    grid-template-columns: 1fr;
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: var(--space-10);
  }

  .footer-brand {
    grid-column: 1 / -1;
  }

  .cta-form-grid {
    grid-template-columns: 1fr;
  }

  .hero-stats {
    gap: var(--space-4);
    padding: var(--space-5) var(--space-6);
  }

  .stat-sep {
    height: 28px;
  }
}

/* ═══════════════════════════════════════════════════
   Responsive — 500px
   ═══════════════════════════════════════════════════ */
@media (max-width: 500px) {
  :root {
    --nav-h: 60px;
  }

  .container {
    padding-inline: var(--space-5);
  }

  .section {
    padding-block: var(--space-12);
  }

  .section-header {
    margin-bottom: var(--space-8);
  }

  .resolve-list {
    margin-block: var(--space-5);
  }

  .services-grid {
    grid-template-columns: 1fr;
    gap: var(--space-2);
  }

  .hero-stats {
    flex-direction: column;
    width: 100%;
    text-align: left;
  }

  .stat-item {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    text-align: left;
  }

  .stat-sep {
    display: none;
  }

  .footer-grid {
    grid-template-columns: 1fr;
  }

  .hero-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .hero-actions .btn {
    justify-content: center;
  }

  .cta-form-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .cta-form-actions .btn {
    justify-content: center;
    width: 100%;
  }
}

/* ── Utility ────────────────────────────────────────── */
.mobile-only { display: none; }
@media (max-width: 600px) {
  .mobile-only { display: inline; }
}

/* ── Mobile hero background orbs ──────────────────── */
.mobile-hero-bg { display: none; }

@media (max-width: 768px) {
  .mobile-hero-bg {
    display: block;
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
  }
  .mhb-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(48px);
    animation: mhb-drift 10s ease-in-out infinite alternate;
  }
  .mhb-orb--1 {
    width: 320px; height: 320px;
    background: radial-gradient(circle, rgba(214,255,0,0.32) 0%, transparent 60%);
    top: -60px; left: -40px;
    animation-duration: 12s;
  }
  .mhb-orb--2 {
    width: 240px; height: 240px;
    background: radial-gradient(circle, rgba(214,255,0,0.22) 0%, transparent 60%);
    top: 30%; right: -30px;
    animation-duration: 9s;
    animation-delay: -3s;
  }
  .mhb-orb--3 {
    width: 180px; height: 180px;
    background: radial-gradient(circle, rgba(214,255,0,0.18) 0%, transparent 60%);
    bottom: 20%; left: 15%;
    animation-duration: 14s;
    animation-delay: -7s;
  }
  @keyframes mhb-drift {
    0%   { transform: translate(0, 0) scale(1); }
    50%  { transform: translate(20px, -25px) scale(1.12); }
    100% { transform: translate(-15px, 15px) scale(0.92); }
  }
  @media (prefers-reduced-motion: reduce) {
    .mhb-orb { animation: none; }
  }
}

/* ── Testimonials — marquee on all viewports ─── */
.testimonials-swipe-hint { display: none; }
.testimonials-grid       { display: none !important; }
.testimonials-marquee {
  display: block;
  margin-inline: calc(-1 * var(--space-4));
}

/* ── Marquee layout ── */
.marquee-row {
  overflow: hidden;
  margin-bottom: var(--space-3);
}
.marquee-track {
  display: flex;
  gap: 16px;
  width: max-content;
  animation: mq-left 32s linear infinite;
}
.marquee-track--right {
  animation: mq-right 38s linear infinite;
}
@keyframes mq-left {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}
@keyframes mq-right {
  from { transform: translateX(-50%); }
  to   { transform: translateX(0%); }
}

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

@media (prefers-reduced-motion: reduce) {
  .marquee-track, .marquee-track--right { animation: none; }
}

/* ── Touch: rows become swipeable; JS drives auto-scroll ── */
@media (max-width: 1024px), (hover: none) and (pointer: coarse) {
  .testimonials-marquee .marquee-row {
    overflow-x: auto;
    overflow-y: hidden;
    overscroll-behavior-x: contain;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
    touch-action: pan-x pan-y;
  }
  .testimonials-marquee .marquee-row::-webkit-scrollbar { display: none; }
  .testimonials-marquee .marquee-track,
  .testimonials-marquee .marquee-track--right {
    animation: none;
  }
  .testimonials-marquee .mq-card {
    user-select: none;
    -webkit-user-select: none;
    -webkit-touch-callout: none;
  }
}

/* ── Marquee card ── */
.mq-card {
  width: 72vw;
  max-width: 280px;
  flex-shrink: 0;
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-5);
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}
.mq-card--alt {
  background: rgba(214,255,0,0.03);
  border-color: rgba(214,255,0,0.12);
}
.mq-stars {
  color: var(--accent);
  font-size: 0.75rem;
  letter-spacing: 0.06em;
}
.mq-text {
  font-size: 0.8rem;
  color: var(--text-secondary);
  line-height: 1.62;
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
  flex: 1;
}
.mq-author {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-muted);
}

@media (min-width: 769px) {
  .testimonials-marquee {
    margin-inline: calc(-1 * var(--space-8));
  }
  .marquee-track { gap: 20px; }
  .mq-card {
    width: 340px;
    max-width: 340px;
    padding: var(--space-6);
  }
  .mq-text {
    font-size: 0.875rem;
    -webkit-line-clamp: 5;
  }
}

/* ── Alternating reveal directions on mobile ──────── */
@media (max-width: 768px) {
  .reveal[data-dir="left"] {
    transform: translateX(-36px);
    opacity: 0;
  }
  .reveal[data-dir="right"] {
    transform: translateX(36px);
    opacity: 0;
  }
  .reveal[data-dir="left"].is-visible,
  .reveal[data-dir="right"].is-visible {
    transform: translateX(0);
    opacity: 1;
    transition: opacity 0.55s var(--ease-out), transform 0.55s var(--ease-out);
  }
  @media (prefers-reduced-motion: reduce) {
    .reveal[data-dir="left"],
    .reveal[data-dir="right"] { transform: none; }
  }
}

/* ── Hero backdrop: perspective grid (echo of the city at the end of the page) + soft aura ── */
.hero::before,
.hero::after {
  content: "";
  position: absolute;
  pointer-events: none;
  z-index: 0;
}
/* Studio set: dark cove with lime rim lights; its light pool sits under ST Bot (left-anchored cover puts it at ~67%) */
.hero::before {
  inset: 0;
  /* Darkened studio: the spot stays as a soft pool, the rest sinks into black */
  background:
    linear-gradient(90deg, rgba(5, 5, 7, 0.45) 0%, rgba(5, 5, 7, 0.15) 40%, rgba(5, 5, 7, 0) 60%),
    linear-gradient(to bottom, rgba(5, 5, 7, 0) 78%, var(--deep-bg) 100%),
    url('../assets/hero/fondo-hero.webp') center / cover no-repeat;
}
.hero::after {
  display: none;
  width: min(900px, 90vw);
  aspect-ratio: 1;
  right: -12%;
  top: 8%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(214, 255, 0, 0.10) 0%, rgba(214, 255, 0, 0.03) 40%, transparent 68%);
}
.hero-inner { position: relative; z-index: 1; }
@media (max-width: 999px) {
  .hero::before {
    background:
      /* Fades to black before the image ends, so there is no hard edge and the headline sits on a dark area */
      linear-gradient(to bottom, rgba(5, 5, 7, 0) 12%, rgba(5, 5, 7, 0.6) 30%, var(--deep-bg) 46%),
      url('../assets/hero/fondo-hero-movil.webp?v=2') 50% top / auto 50% no-repeat,
      var(--deep-bg);
  }
  .hero::after { right: auto; left: -30%; top: -10%; }
}

/* ── Hero: ST Bot ─────────────────────────────────────── */
/* No fade at the waist: the cut lines up with a hard edge (hero bottom on desktop,
   a hairline on phones), so ST Bot looks like he rises from below the frame */
.hero-bot {
  --bot-x: 0px;
  --bot-y: 0px;
  --bot-r: 0deg;
  position: relative;
  pointer-events: none;
  user-select: none;
  -webkit-user-select: none;
}
.hero-bot-stage {
  position: relative;
  aspect-ratio: 770 / 900;
  transform: translate3d(var(--bot-x), var(--bot-y), 0) rotate(var(--bot-r));
  transform-origin: 50% 100%;
  will-change: transform;
}
.hero-bot-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: bottom;
  opacity: 0;
  transition: opacity 0.22s cubic-bezier(0.22, 1, 0.36, 1);
  -webkit-user-drag: none;
}
/* The outgoing pose stays fully opaque underneath while the new one fades in on top: no see-through dip */
.hero-bot-img.is-prev { opacity: 1; z-index: 1; transition: none; }
.hero-bot-img.is-active { opacity: 1; z-index: 2; }
/* v2: frames from the head-turn video sit above the poses; a reaction hides them and its pose shows through */
.hero-bot-frames {
  position: absolute;
  inset: 0;
  z-index: 3;
  opacity: 0;
  transition: opacity .22s cubic-bezier(.22,1,.36,1);
}
.hero-bot.is-frames .hero-bot-frames { opacity: 1; }
/* Reaction poses fade in above the (still opaque) frames, which drop only once the pose is in;
   leaving, the frames are back at once and the pose fades out above them. No half-and-half moment. */
.hero-bot.is-frames.is-reacting .hero-bot-frames { opacity: 0; transition: opacity 0s linear .24s; }
.hero-bot.is-frames:not(.is-reacting) .hero-bot-frames { transition: none; }
.hero-bot.is-frames .hero-bot-img.is-active,
.hero-bot.is-frames .hero-bot-img.is-prev { z-index: 4; }
/* The poster pose must not stay under the frames: a turned head would let its frontal outline show */
.hero-bot.is-frames:not(.is-reacting) .hero-bot-img { opacity: 0; transition: opacity .22s cubic-bezier(.22,1,.36,1); }
.hero-bot-frame {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: bottom;
  opacity: 0;
}
/* Eyes drawn over the empty visor (sizes in em: 1em = 1 px of the source video, set from JS) */
.hero-bot-eye {
  position: absolute;
  z-index: 3;
  border-radius: 50%;
  background: radial-gradient(ellipse at 50% 42%, #eeff3d 0%, #e3f900 55%, #d9ee00 100%);
  box-shadow:
    0 0 2em rgba(225, 248, 0, .55),
    0 0 9em rgba(225, 248, 0, .28),
    0 0 22em rgba(225, 248, 0, .10);
  opacity: 0;
  will-change: left, top, transform;
}

.hero-callback {
  background: none;
  border: 0;
  padding: 0;
  font: inherit;
  color: var(--accent);
  cursor: pointer;
}

@media (min-width: 1000px) {
  .hero { border-bottom: 1px solid var(--border); }
  /* Wider frame than the 1200px sections: the text moves left and ST Bot gets the room on the right */
  .nav-inner, .hero-inner { max-width: 1560px; }
  .hero-inner { --bot-w: clamp(420px, 38vw, 700px); }
  /* hero-inner gets a parallax transform, which makes it the bot's containing block:
     it fills the hero height so the bot still sits on the hero's bottom edge */
  .hero-inner {
    flex: 1 0 auto;
    display: flex;
    align-items: center;
    padding-block: var(--space-12) var(--space-16);
  }
  /* sized so each sentence of the title fits on its own line in the room left of ST Bot */
  .hero-title { font-size: clamp(2.2rem, 3.75vw, 3.6rem); }
  .hero-content {
    position: relative;
    z-index: 2;
    max-width: min(800px, calc(100% - var(--bot-w) - var(--space-4)));
  }
  .hero-bot {
    position: absolute;
    z-index: 1;
    /* sunk a little below the (overflow-hidden) hero edge so the pointer drift never opens a gap */
    bottom: -12px;
    right: var(--space-8);
    width: var(--bot-w);
  }
}
.hero-lead-short { display: none; }
@media (max-width: 999px) {
  /* Phones: short lead with ST Bot beside it, right above the buttons (where the eye lands) */
  .hero { min-height: 0; }
  .hero-inner {
    display: grid;
    grid-template-columns: 1fr auto;
    column-gap: var(--space-4);
    padding-top: var(--space-8);
    padding-bottom: var(--space-10);
  }
  .hero-content { display: contents; }
  .hero-badge   { grid-row: 1; grid-column: 1 / -1; justify-self: start; }
  .hero-title   { grid-row: 2; grid-column: 1 / -1; font-size: min(var(--text-hero), 2.5rem); } /* "hacemos nosotros." fits one phone line */
  .hero-lead    { grid-row: 3; grid-column: 1; align-self: center; margin: 0; }
  .hero-actions { grid-row: 4; grid-column: 1 / -1; margin-top: var(--space-6); }
  .hero-meta    { grid-row: 5; grid-column: 1 / -1; }
  .hero-meta:last-of-type { margin-bottom: 0; }
  .hero-lead-full { display: none; }
  .hero-lead-short { display: inline; }
  .hero-lead strong { color: var(--accent); font-weight: 600; }
  .hero-bot {
    grid-row: 3;
    grid-column: 2;
    align-self: end;
    width: min(150px, 38vw);
    border-bottom: 1px solid var(--border-light);
    overflow: hidden;
  }
  .hero-bot-stage { margin-bottom: -8px; }
}
@media (prefers-reduced-motion: reduce) {
  .hero-bot-img { transition: none; }
}
