/* ════════════════════════════════════════════
   MOMENTUM LAB — HOME v5
   Scroll theme switching (dark ↔ light)
   ════════════════════════════════════════════ */

/* ── VARIABLES GLOBALES ── */
:root {
  --navy:   #0f172a;
  --accent: #6366f1;
  --ease:   cubic-bezier(0.72,0,0.28,1);

  /* Tema oscuro (por defecto) */
  --bg:          #0f172a;
  --fg:          #ffffff;
  --fg-muted:    rgba(255,255,255,.55);
  --fg-dim:      rgba(255,255,255,.3);
  --card-surf:   rgba(255,255,255,.03);
  --card-border: rgba(255,255,255,.07);
  --divider:     rgba(255,255,255,.06);
}

/* ── RESET ── */
*,*::before,*::after { box-sizing:border-box; margin:0; padding:0; }
html { scroll-behavior:smooth; }

body {
  font-family:'Inter','Helvetica Neue',Arial,sans-serif;
  background-color: var(--bg);
  color: var(--fg);
  line-height:1.6;
  -webkit-font-smoothing:antialiased;
  /* Transición suave al cambiar de tema — igual que basicagency */
  transition:
    background-color 0.65s cubic-bezier(0.72,0,0.28,1),
    color 0.65s cubic-bezier(0.72,0,0.28,1);
}

/* ── TEMA CLARO ── */
body.theme-light {
  --bg:          #f8fafc;
  --fg:          #0f172a;
  --fg-muted:    rgba(15,23,42,.55);
  --fg-dim:      rgba(15,23,42,.3);
  --card-surf:   rgba(15,23,42,.025);
  --card-border: rgba(15,23,42,.07);
  --divider:     rgba(15,23,42,.06);
}

a { color:inherit; text-decoration:none; }
img { max-width:100%; display:block; }

/* Wrapper del smooth scroll — JS lo pone en position:fixed cuando está activo */
#scroll-root { width:100%; }
#scroll-spacer { display:block; }

/* ── GRAIN CANVAS ── */
#grain {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: 9000;
  opacity: .06;
}

/* ── CURSOR ── */
.cursor-dot,.cursor-ring {
  pointer-events:none; position:fixed; top:0; left:0;
  z-index:9999; border-radius:50%; will-change:transform;
}
.cursor-dot { width:6px; height:6px; background:var(--accent); margin:-3px 0 0 -3px; }
.cursor-ring {
  width:36px; height:36px;
  border:2px solid rgba(99,102,241,.4);
  margin:-18px 0 0 -18px;
  transition:width .2s,height .2s,border-color .2s,margin .2s;
}
.cursor-ring--hover { width:52px; height:52px; border-color:var(--accent); margin:-26px 0 0 -26px; }
.has-custom-cursor * { cursor:none; }
.has-custom-cursor .c-form * { cursor:auto; }
.has-custom-cursor .c-form input,
.has-custom-cursor .c-form textarea { cursor:text; }
.has-custom-cursor .c-form button { cursor:pointer; }

/* ── NAV ── */
#nav {
  position:absolute; top:0; left:0; right:0; z-index:100;
  padding:2rem 2.5rem;
  display:flex; align-items:center; justify-content:space-between;
}
.nav__logo { display:flex; align-items:center; }
.nav__logo img { height:28px; width:auto; }
.nav__links { display:flex; gap:2.5rem; list-style:none; }
.nav__links a {
  font-size:.8rem; font-weight:500; letter-spacing:.1em; text-transform:uppercase;
  color:rgba(255,255,255,.55); transition:color .2s;
}
.nav__links a:hover { color:#fff; }
.nav__cta {
  display:inline-flex; align-items:center;
  padding:.5rem 1.2rem;
  border:1px solid rgba(255,255,255,.2); border-radius:2rem;
  font-size:.75rem; font-weight:600; letter-spacing:.08em; text-transform:uppercase;
  color:rgba(255,255,255,.7); transition:border-color .2s,color .2s;
}
.nav__cta:hover { border-color:var(--accent); color:#fff; }
.nav__burger { display:none; }
/* Mobile menu — oculto por defecto con [hidden], visible al abrirse */
[id^="mobile-menu"]:not([hidden]) {
  display: flex;
  flex-direction: column;
  position: fixed;
  inset: 0;
  z-index: 998;
  background: #0f172a;
  align-items: center;
  justify-content: center;
}
[id^="mobile-menu"] ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2.5rem;
}
[id^="mobile-menu"] a {
  font-size: clamp(2rem, 8vw, 3.5rem);
  font-weight: 800;
  letter-spacing: -.04em;
  color: #fff;
  transition: color .2s;
}
[id^="mobile-menu"] a:hover { color: var(--accent); }

/* ── ANIMACIONES DE ENTRADA ── */
.anim { transition:opacity .7s var(--ease), transform .7s var(--ease); }
html.js-ready .anim { opacity:0; transform:translateY(28px); }
html.js-ready .anim.anim--in { opacity:1; transform:translateY(0); }
/* Wrappers con parallax: solo opacity — el JS controla transform desde frame 0 */
html.js-ready .anim[data-parallax-wrap] { transition:opacity .7s var(--ease); transform:none; }
html.js-ready .anim[data-parallax-wrap].anim--in { opacity:1; }
html.js-ready .anim[data-delay="1"] { transition-delay:.1s; }
html.js-ready .anim[data-delay="2"] { transition-delay:.2s; }
html.js-ready .anim[data-delay="3"] { transition-delay:.3s; }
html.js-ready .anim[data-delay="4"] { transition-delay:.4s; }
html.js-ready .anim[data-delay="5"] { transition-delay:.5s; }
html.js-ready .anim[data-delay="6"] { transition-delay:.6s; }
html.js-ready .anim-card { opacity:0; transform:translateY(20px); transition:opacity .6s var(--ease),transform .6s var(--ease); }
html.js-ready .anim-card.anim--in { opacity:1; transform:translateY(0); }

/* ── HERO (siempre oscuro — tiene su propio fondo) ── */
.h-hero {
  position:relative; min-height:100vh;
  overflow:hidden;
}

/* Capa 1: imagen de fondo — 80px extra arriba y abajo para el paralaje inverso */
.h-hero__reveal-bg {
  position:absolute;
  top:-80px; left:0; right:0; bottom:-80px;
  z-index:0;
  will-change:transform;
  pointer-events:none;
}
.h-hero__reveal-bg img {
  width:100%; height:100%;
  object-fit:cover; object-position:center top;
  display:block;
}

/* Capa 2: cortina azul + contenido — sube como cortina al hacer scroll */
.h-hero__curtain {
  position:absolute; inset:0; z-index:1;
  display:flex; flex-direction:column; justify-content:flex-end;
  padding-bottom:5rem;
  background:#0f172a;
}

.h-hero__bg {
  position:absolute; inset:0; z-index:0; pointer-events:none;
  background:
    radial-gradient(ellipse 70% 70% at 75% 20%, rgba(99,102,241,.12) 0%, transparent 65%),
    radial-gradient(ellipse 40% 40% at 15% 85%, rgba(99,102,241,.07) 0%, transparent 60%);
}
.h-hero__vline {
  position:absolute; left:2.5rem; top:0; bottom:0; width:1px; z-index:1; pointer-events:none;
  background:linear-gradient(to bottom,transparent,rgba(255,255,255,.07) 30%,rgba(255,255,255,.07) 70%,transparent);
}
.h-hero__eyebrow {
  position:absolute; top:calc(96px + 2rem); right:2.5rem;
  font-size:.68rem; font-weight:500; letter-spacing:.2em; text-transform:uppercase;
  color:rgba(255,255,255,.25); writing-mode:vertical-rl; transform:rotate(180deg);
}
.h-hero__inner { position:relative; z-index:2; width:100%; padding:0 2.5rem; will-change:transform,opacity; }

.h-hero__title {
  font-size:clamp(3rem,10vw,9.5rem); font-weight:800; line-height:.96;
  letter-spacing:-.04em; color:#fff; margin-bottom:4rem;
}
.h-hero__title em { font-style:normal; color:var(--accent); }
.h-hero__title .split-line { display:block; overflow:hidden; line-height:1.02; padding-bottom:.12em; }
.h-hero__title .split-line > span { display:block; animation:heroSlide 1s var(--ease) both; }
.h-hero__title .split-line:nth-child(1) > span { animation-delay:.08s; }
.h-hero__title .split-line:nth-child(2) > span { animation-delay:.20s; }
.h-hero__title .split-line:nth-child(3) > span { animation-delay:.32s; }
@keyframes heroSlide { from{transform:translateY(105%)} to{transform:translateY(0)} }

.h-hero__footer {
  display:flex; align-items:flex-end; justify-content:space-between; gap:2rem;
  animation:fadeUp .8s .65s var(--ease) both;
}
@keyframes fadeUp { from{opacity:0;transform:translateY(16px)} to{opacity:1;transform:translateY(0)} }

.h-hero__sub { font-size:clamp(.9rem,1.4vw,1.1rem); color:rgba(255,255,255,.5); max-width:400px; line-height:1.75; }
.h-hero__footnote { font-size:.72rem; color:rgba(255,255,255,.25); letter-spacing:.06em; margin-top:1rem; animation:fadeUp .8s .9s var(--ease) both; }

.h-hero__cta-circle {
  flex-shrink:0; width:130px; height:130px; border-radius:50%;
  background:var(--accent);
  display:flex; align-items:center; justify-content:center; text-align:center;
  font-size:.72rem; font-weight:700; letter-spacing:.08em; text-transform:uppercase;
  color:#fff; line-height:1.5; position:relative;
  transition:transform .4s var(--ease),box-shadow .4s;
}
.h-hero__cta-circle:hover { transform:scale(1.08); box-shadow:0 20px 48px rgba(99,102,241,.45); }
.h-hero__cta-circle::after {
  content:''; position:absolute; inset:-10px;
  border:1px dashed rgba(99,102,241,.35); border-radius:50%;
  animation:spin 14s linear infinite;
}
@keyframes spin { to{transform:rotate(360deg)} }

/* ── BOTÓN VOLVER AL INICIO ── */
.back-to-top {
  position: fixed;
  bottom: 6rem; left: 50%; transform: translateX(-50%);
  z-index: 9000;
  width: 48px; height: 48px;
  border-radius: 50%;
  background: var(--accent);
  border: none; cursor: pointer;
  color: #fff;
  font-size: .9rem;
  display: flex; align-items: center; justify-content: center;
  transition: transform .4s var(--ease), box-shadow .4s;
}
.back-to-top::after {
  content: '';
  position: absolute; inset: -8px;
  border: 1px dashed rgba(99,102,241,.4);
  border-radius: 50%;
  animation: spin 14s linear infinite;
}
.back-to-top:hover { transform: translateX(-50%) scale(1.1); box-shadow: 0 16px 40px rgba(99,102,241,.45); }

/* ── SECCIONES BASE (transparentes — heredan color del body) ── */
.h-section { padding:11rem 2.5rem; background:transparent; }
.h-section__inner { max-width:1280px; margin:0 auto; }
.h-section__label { font-size:.7rem; font-weight:700; letter-spacing:.2em; text-transform:uppercase; color:var(--accent); margin-bottom:1.5rem; }
.h-section__title { font-size:clamp(1.8rem,4.5vw,3.5rem); font-weight:800; line-height:1.08; letter-spacing:-.025em; color:var(--fg); margin-bottom:1.5rem; }
.h-section__body { font-size:clamp(.9rem,1.4vw,1.05rem); color:var(--fg-muted); line-height:1.8; max-width:580px; }
em.accent { font-style:normal; color:var(--accent); }

/* ── MÉTRICAS (oscuro — propio fondo para diferenciarlo del hero) ── */
.h-metrics {
  background:rgba(99,102,241,.06);
  border-top:1px solid rgba(99,102,241,.15);
  border-bottom:1px solid rgba(99,102,241,.15);
  padding:2.5rem;
}
.h-metrics__inner { max-width:1280px; margin:0 auto; display:grid; grid-template-columns:repeat(4,1fr); gap:2rem; text-align:center; }
.h-metrics__num { display:block; font-size:clamp(1.8rem,3.5vw,2.8rem); font-weight:800; color:var(--accent); line-height:1; }
.h-metrics__label { font-size:.75rem; color:var(--fg-dim); letter-spacing:.08em; text-transform:uppercase; margin-top:.4rem; }

/* ── EL PROBLEMA (oscuro) ── */
.h-problema { background:transparent; }
.h-problema__layout { display:grid; grid-template-columns:1fr 1fr; gap:6rem; align-items:stretch; }
.h-problema__lista { list-style:none; margin-top:2.5rem; }
.h-problema__lista li {
  display:flex; align-items:flex-start; gap:1rem;
  padding:1.1rem 0; border-bottom:1px solid var(--divider);
  font-size:.95rem; color:var(--fg-muted); line-height:1.6;
}
.h-problema__lista li:first-child { border-top:1px solid var(--divider); }
.h-problema__img-wrap {
  position: relative;
  border-radius: 0;
  overflow: hidden;
  min-height: 560px;
  height: 100%;
}
.h-problema__img {
  position: absolute;
  top: -80px; left: 0;
  width: 100%; height: calc(100% + 160px);
  object-fit: cover; object-position: 70% center;
  display: block;
}
.h-problema__callout {
  position: absolute; bottom: 0; left: 0; right: 0;
  padding: 2.5rem;
  background: linear-gradient(to top, rgba(0,0,0,.88) 0%, rgba(0,0,0,.5) 50%, transparent 100%);
}
.h-problema__callout p { font-size:.9rem; color:rgba(255,255,255,.6); line-height:1.7; }
.h-problema__callout blockquote {
  font-size:clamp(1.4rem,2.5vw,2.1rem); font-weight:800; color:#fff;
  letter-spacing:-.02em; margin:1rem 0; border:none; padding:0;
}
.h-problema__callout cite { font-size:.78rem; color:rgba(255,255,255,.4); font-style:normal; }

/* ── LO QUE HACEMOS (claro) ── */
.h-servicios { background:transparent; }
.h-servicios__header { display:flex; justify-content:space-between; align-items:flex-end; gap:3rem; margin-bottom:4rem; }
.h-servicios__intro { font-size:.92rem; color:var(--fg-muted); max-width:340px; line-height:1.7; }
.h-servicios__grid {
  display:grid; grid-template-columns:repeat(3,1fr); gap:1px;
  background:var(--card-border);
  border-top:1px solid var(--card-border);
  border-bottom:1px solid var(--card-border);
  border-radius:0; overflow:hidden;
}
.h-service-card { background:var(--bg); padding:2.5rem; transition:background .3s; }
.h-service-card:hover { background:var(--card-surf); }
.h-service-card__num { font-size:.68rem; font-weight:700; letter-spacing:.14em; text-transform:uppercase; color:var(--accent); margin-bottom:1.2rem; opacity:.7; }
.h-service-card__title { font-size:1.1rem; font-weight:700; color:var(--fg); margin-bottom:.6rem; line-height:1.3; }
.h-service-card__body { font-size:.85rem; color:var(--fg-muted); line-height:1.7; }
.h-servicios__nota { margin-top:3rem; font-size:.9rem; color:var(--fg-dim); line-height:1.7; }
.h-link-flecha {
  display:inline-flex; align-items:center; gap:.5rem; margin-top:1.5rem;
  font-size:.82rem; font-weight:600; letter-spacing:.06em; color:var(--accent);
  border-bottom:1px solid rgba(99,102,241,.3); padding-bottom:.2rem;
  transition:border-color .2s,gap .2s;
}
.h-link-flecha:hover { border-color:var(--accent); gap:.75rem; }

/* ── NUESTRA FORMA (oscuro — sin fondo de color, puro navy) ── */
.h-forma { background:transparent; }
.h-forma .h-section__title { font-size:clamp(1.8rem,3.5vw,2.8rem); max-width:none; }
.h-forma__cuerpo { font-size:clamp(.9rem,1.5vw,1.05rem); color:var(--fg-muted); line-height:1.8; max-width:none; margin-bottom:1.5rem; }
.h-forma__pregunta { font-size:clamp(1rem,2vw,1.35rem); color:var(--fg); font-weight:600; line-height:1.5; max-width:600px; margin:2rem 0 1rem; }
.h-forma__pregunta em { font-style:italic; font-weight:400; color:var(--fg-muted); }
.h-forma__cierre { font-size:.95rem; color:var(--fg-dim); }
.h-forma__img-wrap { margin-top:4rem; overflow:hidden; border-radius:0; height:520px; }
.h-forma__img { position:absolute; top:-80px; left:0; width:100%; height:calc(100% + 160px); object-fit:cover; object-position:center; display:block; }

/* ── PROCESO (claro) ── */
.h-proceso { background:transparent; }
.h-proceso__grid { display:grid; grid-template-columns:repeat(3,1fr); gap:0; margin-top:4rem; border-top:1px solid var(--divider); }
.h-paso { padding:3rem 2rem 3rem 0; border-bottom:1px solid var(--divider); border-right:1px solid var(--divider); }
.h-paso:nth-child(3n) { border-right:none; }
.h-paso__num { font-size:2.5rem; font-weight:800; color:var(--accent); opacity:.2; line-height:1; margin-bottom:1.5rem; }
.h-paso__title { font-size:1rem; font-weight:700; color:var(--fg); margin-bottom:.6rem; line-height:1.4; }
.h-paso__body { font-size:.85rem; color:var(--fg-muted); line-height:1.75; }

/* ── EXPERIENCIA (oscuro) ── */
.h-experiencia { background:transparent; }
.h-experiencia__layout { display:grid; grid-template-columns:1fr 1fr; gap:6rem; align-items:stretch; }
.h-experiencia__img-wrap { position:relative; overflow:hidden; border-radius:0; min-height:560px; height:100%; }
.h-experiencia__img { position:absolute; top:-80px; left:0; width:100%; height:calc(100% + 160px); object-fit:cover; object-position:65% 30%; display:block; }

/* ── NOSOTROS (claro) ── */
.h-team { background:transparent; }
.h-team__layout { display:grid; grid-template-columns:1fr 1fr; gap:6rem; align-items:start; }
.h-team__body { font-size:clamp(.9rem,1.4vw,1.05rem); color:var(--fg-muted); line-height:1.8; margin-top:1.5rem; }
.h-team__lista { list-style:none; margin-top:3rem; max-width:800px; }
.h-team__lista li {
  display:flex; align-items:center; gap:1.25rem;
  padding:.9rem 0; border-bottom:1px solid var(--divider);
  font-size:.95rem; color:var(--fg-muted);
}
.h-team__lista li::before { content:''; width:4px; height:4px; background:var(--accent); border-radius:50%; flex-shrink:0; }
.h-team__cierre { margin-top:1.5rem; font-size:.9rem; color:var(--fg-dim); font-style:italic; }
.h-team__aside { display:flex; flex-direction:column; justify-content:flex-end; padding-top:4rem; }
.h-team-card { background:var(--bg); padding:2rem; transition:background .3s; }
.h-team-card:hover { background:var(--card-surf); }
.h-team-card__role { font-size:.7rem; font-weight:700; letter-spacing:.12em; text-transform:uppercase; color:var(--accent); margin-bottom:.5rem; }
.h-team-card__name { font-size:1rem; font-weight:700; color:var(--fg); margin-bottom:.5rem; }
.h-team-card__bio { font-size:.83rem; color:var(--fg-muted); line-height:1.65; }

/* ── CTA FINAL (oscuro) ── */
.h-cta { padding:12rem 2.5rem; background:transparent; }
.h-cta__inner { max-width:1280px; margin:0 auto; }
.h-cta__titulo { font-size:clamp(2.5rem,7vw,5.5rem); font-weight:800; color:var(--fg); line-height:1.02; letter-spacing:-.035em; margin-bottom:3rem; }
.h-cta__layout { display:grid; grid-template-columns:1fr 1fr; gap:6rem; align-items:start; }
.h-cta__img-wrap { aspect-ratio:1/1; overflow:hidden; border-radius:0; }
.h-cta__img { width:100%; height:100%; object-fit:cover; object-position:center; display:block; }
.h-cta__cuerpo { font-size:clamp(.9rem,1.4vw,1.05rem); color:var(--fg-muted); line-height:1.8; max-width:460px; margin-bottom:1rem; }
.h-cta__btn {
  display:inline-flex; align-items:center; gap:.75rem; margin-top:3rem;
  padding:1.1rem 2.5rem; background:var(--accent); color:#fff; border-radius:2rem;
  font-size:.95rem; font-weight:700; transition:transform .2s,box-shadow .2s;
}
.h-cta__btn:hover { transform:translateY(-3px); box-shadow:0 16px 40px rgba(99,102,241,.35); }
.h-cta__nota { margin-top:1.25rem; font-size:.75rem; color:var(--fg-dim); letter-spacing:.04em; }

/* ── FOOTER (siempre oscuro) ── */
footer {
  background:#0f172a;
  border-top:1px solid rgba(255,255,255,.05);
  padding:2.5rem;
}
.footer__inner { max-width:1280px; margin:0 auto; display:flex; align-items:center; justify-content:space-between; gap:2rem; flex-wrap:wrap; }
.footer__marca { display:flex; flex-direction:column; gap:.4rem; }
.footer__marca img { height:22px; width:auto; }
.footer__marca p { font-size:.7rem; color:rgba(255,255,255,.2); letter-spacing:.06em; }
.footer__nav { display:flex; gap:2rem; }
.footer__nav a { font-size:.75rem; color:rgba(255,255,255,.3); letter-spacing:.06em; text-transform:uppercase; transition:color .2s; }
.footer__nav a:hover { color:#fff; }
.footer__email { font-size:.8rem; color:rgba(255,255,255,.3); transition:color .2s; }
.footer__email:hover { color:#fff; }

/* ── RESPONSIVE ── */
@media(max-width:960px){
  .h-problema__layout,.h-experiencia__layout,.h-team__layout,.h-cta__layout { grid-template-columns:1fr; gap:3rem; }
  .h-servicios__grid { grid-template-columns:1fr 1fr; }
  .h-servicios__header { flex-direction:column; align-items:flex-start; }
  .h-proceso__grid { grid-template-columns:1fr 1fr; }
  .h-paso:nth-child(3n) { border-right:1px solid var(--divider); }
  .h-paso:nth-child(2n) { border-right:none; }
  .h-metrics__inner { grid-template-columns:repeat(2,1fr); }
  .nav__links,.nav__cta { display:none; }
  .nav__burger { display:block; background:none; border:none; color:#fff; font-size:1.4rem; cursor:pointer; }
  .h-experiencia__img { object-position: 65% 30% !important; }
}
@media(max-width:600px){
  .h-section { padding:5rem 1.5rem; }
  #nav { padding:1.5rem; }
  .h-hero__inner { padding:0 1.5rem; }
  .h-servicios__grid { grid-template-columns:1fr; }
  .h-proceso__grid { grid-template-columns:1fr; }
  .h-proceso__img-wrap { height:280px; }
  .h-hero__cta-circle { width:110px; height:110px; font-size:.65rem; }
  .footer__inner { flex-direction:column; align-items:flex-start; }
  footer { padding-bottom: 7rem; }
  .back-to-top { bottom: 1.5rem; }
}
