/* ============================================================
   Aliado Financiero — tema claro editorial
   Inspirado en curaclimate.com: fondo crema calido, mucho
   espacio en blanco, lineas grid verticales, tipografia fina
   grande, imagenes fotorrealistas, scroll-driven (GSAP+Lenis).
   ============================================================ */

/* ===== TOKENS ===== */
:root {
  /* fondo crema calido, no blanco puro. tinte hacia el calido. */
  --bg:        oklch(96.5% 0.012 85);
  --bg-soft:   oklch(94% 0.016 80);
  --ink:       oklch(22% 0.02 60);     /* texto principal, casi negro calido */
  --ink-soft:  oklch(45% 0.02 65);     /* texto secundario */
  --muted:     oklch(58% 0.015 70);    /* labels, captions */
  --line:      oklch(22% 0.02 60 / 0.12);
  --line-soft: oklch(22% 0.02 60 / 0.06);

  /* superficie elevada: casi blanco, tinte calido (tarjetas resaltan sobre crema) */
  --surface:   oklch(99% 0.006 85);

  /* acento sobrio: verde bosque apagado (confianza, aprobacion, natural) */
  --accent:     oklch(48% 0.08 150);
  --accent-ink: oklch(97% 0.01 150);
  --accent-grad: linear-gradient(90deg, oklch(48% 0.08 150), oklch(58% 0.11 150));

  --font-display: 'Cabinet Grotesk', system-ui, sans-serif;
  --font-body:    'General Sans', system-ui, sans-serif;
  --font-prose:   'Switzer', system-ui, sans-serif;  /* prosa de lectura: recta, con cuerpo, más personalidad que body */

  --container: 1240px;
  --gutter: clamp(20px, 5vw, 64px);
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --space: clamp(6rem, 5rem + 8vw, 14rem);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: auto; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  line-height: 1.55;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
/* prosa de lectura en Switzer (recta, con cuerpo) — personalidad sin perder limpieza.
   UI chrome (nav, botones, labels, inputs, footer) se queda en --font-body. */
.hero-lead,
.benefit p, .benefit strong,
.quote p,
.svc-lead,
.svc-feat p,
.svc-step p,
.svc-form-copy p {
  font-family: var(--font-prose);
  font-weight: 550;
  letter-spacing: -0.005em;
}
.hero-lead { line-height: 1.55; }
.quote p { line-height: 1.6; }
.svc-feat p, .svc-step p { line-height: 1.65; }

/* textos chicos (labels bajo números, bios de equipo) — misma Switzer, peso algo menor por el tamaño */
.stat-label,
.sstat-label,
.cstat-label,
.member p,
.member-bio {
  font-family: var(--font-prose);
  font-weight: 520;
  letter-spacing: -0.005em;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  line-height: 1.02;
  font-weight: 600;          /* mas fino que antes, editorial */
  letter-spacing: -0.02em;
  color: var(--ink);
}
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; height: auto; }
em { font-style: italic; color: var(--accent); }

/* ===== GRID DE LINEAS VERTICALES (como curaclimate) ===== */
/* contenedor general */
main { position: relative; z-index: 1; }
.wrap { max-width: var(--container); margin: 0 auto; padding-inline: var(--gutter); }

/* ===== PRELOADER ===== */
#preloader {
  position: fixed; inset: 0; z-index: 100; background: var(--bg);
  display: grid; place-items: center; transition: opacity .9s var(--ease), visibility .9s;
}
#preloader.done { opacity: 0; visibility: hidden; }
.pre-inner { display: flex; flex-direction: column; align-items: center; gap: 26px; }
.pre-mark { font-family: var(--font-display); font-weight: 500; font-size: clamp(40px, 7vw, 86px); letter-spacing: -0.04em; color: var(--ink); }
.pre-mark span { color: var(--accent); }
.pre-bar { width: 220px; height: 1px; background: var(--line); overflow: hidden; }
#pre-fill { display: block; height: 100%; width: 0%; background: var(--ink); transition: width .2s linear; }
.pre-pct { font-family: var(--font-display); font-size: 12px; letter-spacing: .3em; color: var(--muted); }

/* ===== NAV ===== */
#nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 40;
  display: flex; align-items: center; justify-content: space-between;
  padding: 26px var(--gutter);
  transition: background .4s var(--ease), padding .4s var(--ease), border-color .4s;
  border-bottom: 1px solid transparent;
}
#nav.scrolled {
  background: oklch(96.5% 0.012 85 / 0.8); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  padding-top: 16px; padding-bottom: 16px; border-bottom: 1px solid var(--line);
}
.nav-logo { font-family: var(--font-display); font-weight: 600; font-size: 19px; letter-spacing: -0.02em; }
.nav-logo span { color: var(--accent); }
.nav-links { display: flex; gap: 36px; }
.nav-link { font-size: 14px; color: var(--ink-soft); transition: color .25s; }
.nav-link:hover { color: var(--ink); }
.nav-cta {
  font-size: 14px; font-weight: 500; padding: 11px 22px; border-radius: 100px;
  background: var(--accent); color: var(--accent-ink);
  transition: transform .25s var(--ease), box-shadow .25s;
}
.nav-cta:hover { transform: translateY(-2px); box-shadow: 0 12px 28px oklch(48% 0.08 150 / 0.28); }
.nav-burger { display: none; flex-direction: column; gap: 5px; background: none; border: 0; cursor: pointer; padding: 8px; }
.nav-burger span { width: 24px; height: 1.5px; background: var(--ink); transition: transform .3s; }

.mobile-menu {
  position: fixed; inset: 0; z-index: 39; background: var(--bg);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 30px;
  opacity: 0; visibility: hidden; transition: opacity .4s var(--ease), visibility .4s;
}
.mobile-menu.open { opacity: 1; visibility: visible; }
.mobile-menu a { font-family: var(--font-display); font-size: 30px; font-weight: 500; }
.mobile-menu .mm-cta { color: var(--accent); }

/* ===== BUTTONS ===== */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  font-weight: 500; font-size: 15px; padding: 16px 32px; border-radius: 100px;
  transition: transform .25s var(--ease), box-shadow .25s, background .25s, border-color .25s, color .25s;
  cursor: pointer; border: 1px solid transparent;
}
.btn-primary { background: var(--accent); color: var(--accent-ink); }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 16px 40px oklch(48% 0.08 150 / 0.3); }
.btn-ghost { border-color: var(--line); color: var(--ink); background: transparent; }
.btn-ghost:hover { border-color: var(--ink); transform: translateY(-2px); }
.btn-full { width: 100%; }

/* ===== REVEAL (GSAP setea, esto es fallback) ===== */
[data-reveal] { opacity: 0; transform: translateY(30px); }
.is-ready [data-reveal] { will-change: transform, opacity; }

/* ===== SHARED ===== */
.eyebrow {
  font-family: var(--font-display); font-weight: 800; font-size: 13px;
  letter-spacing: .14em; text-transform: uppercase; color: var(--ink); margin-bottom: 22px;
  display: flex; align-items: center; gap: 10px;
}
.sec-head { max-width: 760px; margin-bottom: var(--space); }
.sec-head h2 { font-size: clamp(34px, 5vw, 68px); }
section { padding-block: var(--space); }

/* ===== HERO ===== */
.hero {
  min-height: 100dvh; display: grid; align-items: center;
  grid-template-columns: 1.1fr 0.9fr; gap: 40px;
  padding-top: 140px; padding-bottom: 80px;
  will-change: opacity, transform;
}
.hero-copy { max-width: 620px; }
.hero-h1 { font-size: clamp(48px, 7.5vw, 104px); margin-bottom: 32px; font-weight: 600; }
.hero-h1 .line { display: block; overflow: hidden; }
.hero-h1 .line span { display: block; }
.hero-lead { font-size: clamp(17px, 1.3vw, 20px); color: var(--ink-soft); max-width: 46ch; margin-bottom: 40px; }
.hero-ctas { display: flex; gap: 14px; flex-wrap: wrap; }
.hero-visual { position: relative; }
.hero-visual img {
  width: 100%; border-radius: 18px;
  box-shadow: 0 40px 80px -30px oklch(22% 0.02 60 / 0.25);
}
.hero-scroll {
  position: absolute; bottom: 34px; left: var(--gutter);
  font-size: 11px; letter-spacing: .3em; text-transform: uppercase; color: var(--muted);
  display: flex; align-items: center; gap: 12px;
}
.hero-scroll span { width: 40px; height: 1px; background: var(--ink); display: inline-block; }

/* ===== STATS ===== */
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 48px; border-block: 1px solid var(--line); padding-block: clamp(3.5rem, 5vw, 5.5rem); }
.stat { display: flex; flex-direction: column; gap: 14px; }
.stat-num { font-family: var(--font-display); font-weight: 600; font-size: clamp(52px, 7vw, 96px); line-height: 1; letter-spacing: -0.04em; color: var(--ink); }
.stat-money { color: var(--accent); }
.stat-label { font-size: 14px; color: var(--ink-soft); max-width: 26ch; }

/* ===== SERVICIOS (ahora links a paginas detalle) ===== */
.serv-list { display: flex; flex-direction: column; }
.serv { display: grid; grid-template-columns: 80px 1fr auto; gap: 28px; align-items: center; padding-block: 42px; border-top: 1px solid var(--line); transition: padding-left .4s var(--ease), background .4s var(--ease); }
.serv:last-child { border-bottom: 1px solid var(--line); }
.serv:hover { padding-left: 18px; }
.serv-i { font-family: var(--font-display); font-weight: 500; font-size: 16px; color: var(--accent); align-self: start; }
.serv-body h3 { font-size: clamp(24px, 2.8vw, 38px); margin-bottom: 14px; font-weight: 600; transition: color .3s var(--ease); }
.serv:hover .serv-body h3 { color: var(--accent); }
.serv-body p { color: var(--ink-soft); max-width: 62ch; }
.serv-arrow { font-family: var(--font-display); font-size: 14px; font-weight: 500; color: var(--accent); white-space: nowrap; opacity: 0; transform: translateX(-10px); transition: opacity .35s var(--ease), transform .35s var(--ease); }
.serv:hover .serv-arrow { opacity: 1; transform: translateX(0); }

/* ===== PROCESO (con imagen) ===== */
.proceso-grid { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: clamp(40px, 6vw, 96px); align-items: center; }
.proceso-visual img { width: 100%; border-radius: 18px; box-shadow: 0 40px 80px -34px oklch(22% 0.02 60 / 0.22); }
.steps { display: flex; flex-direction: column; gap: 8px; }
.step { padding: 28px 0; border-bottom: 1px solid var(--line); }
.step:last-child { border-bottom: 0; }
.step-n { font-family: var(--font-display); font-weight: 500; font-size: 13px; letter-spacing: .2em; color: var(--accent); }
.step h3 { font-size: clamp(20px, 2.2vw, 26px); margin: 12px 0 8px; font-weight: 600; }
.step p { color: var(--ink-soft); font-size: 15px; max-width: 52ch; }

/* ===== EQUIPO ===== */
.team-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; }
.member { display: flex; flex-direction: column; gap: 18px; }
.member-ph { aspect-ratio: 4/5; border-radius: 16px; background: var(--bg-soft); border: 1px solid var(--line); display: grid; place-items: center; overflow: hidden; }
.member-ph::after { content: attr(data-initials); font-family: var(--font-display); font-weight: 600; font-size: 64px; color: var(--accent); opacity: .3; }
.member-photo { aspect-ratio: 4/5; border-radius: 16px; overflow: hidden; border: 1px solid var(--line); background: var(--bg-soft); }
.member-photo img { width: 100%; height: 100%; object-fit: cover; object-position: center top; display: block; transition: transform .6s var(--ease); }
.member:hover .member-photo img { transform: scale(1.04); }
.member h3 { font-size: 21px; font-weight: 600; }
.member p { font-size: 14px; color: var(--ink-soft); }

/* ===== TESTIMONIOS ===== */
.quotes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
.quote { padding: 34px; border: 1px solid var(--line); border-radius: 18px; background: var(--bg-soft); display: flex; flex-direction: column; gap: 24px; transition: transform .35s var(--ease), box-shadow .35s; }
.quote:hover { transform: translateY(-6px); box-shadow: 0 30px 60px -34px oklch(22% 0.02 60 / 0.2); }
.quote p { font-size: 16px; line-height: 1.6; color: var(--ink); }
.quote footer { font-size: 13px; color: var(--muted); display: flex; flex-direction: column; gap: 2px; }
.quote footer strong { color: var(--ink); font-weight: 600; }

/* ===== CTA / CONTACTO (con imagen de fondo suave) ===== */
.contacto { }
.cta-grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(40px, 6vw, 96px); align-items: center; }
.cta-visual img { width: 100%; border-radius: 18px; box-shadow: 0 40px 80px -34px oklch(22% 0.02 60 / 0.22); }
.cta-h { font-size: clamp(38px, 5.5vw, 76px); margin-bottom: 22px; font-weight: 600; }
.cta-lead { color: var(--ink-soft); font-size: 18px; margin-bottom: 40px; max-width: 44ch; }
.cta-form { display: flex; flex-direction: column; gap: 18px; }
.field { display: flex; flex-direction: column; gap: 8px; }
.field label { font-size: 13px; color: var(--muted); }
.field input, .field select, .field textarea {
  padding: 15px 18px; border-radius: 12px; border: 1px solid var(--line);
  background: var(--bg); color: var(--ink); font-family: var(--font-body); font-size: 15px;
  transition: border-color .25s;
}
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--accent); }
.field select { appearance: none; }
.field textarea { resize: vertical; min-height: 96px; line-height: 1.5; }
/* dos campos lado a lado (nombre+rut, email+teléfono) */
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 560px) { .field-row { grid-template-columns: 1fr; } }
.cta-note { font-size: 13px; color: var(--muted); margin-top: 6px; }

/* ===== FOOTER ===== */
.footer { border-top: 1px solid var(--line); display: grid; grid-template-columns: 1.4fr 1fr; gap: 56px; padding-block: clamp(4rem, 5vw, 6rem); }
.foot-brand p { color: var(--ink-soft); font-size: 14px; margin-top: 16px; max-width: 36ch; }
.foot-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; }
.foot-cols h4 { font-size: 13px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin-bottom: 16px; font-weight: 500; }
.foot-cols a, .foot-loc { display: block; font-size: 14px; color: var(--ink-soft); margin-bottom: 9px; transition: color .25s; }
.foot-cols a:hover { color: var(--accent); }
.foot-legal { grid-column: 1 / -1; font-size: 13px; color: var(--muted); padding-top: 30px; border-top: 1px solid var(--line); }

/* ============================================================
   SAGA — pantalla fija (pin). Hero queda fijo; el scroll avanza
   3 escenas (hero → números/beneficios → equipo) sin bajar.
   Suelta el pin y sigue scroll normal.
   ============================================================ */
.saga {
  position: relative;
  height: 400vh;            /* 3 escenas ≈ 1.3 pantalla de scroll c/u */
  background: var(--bg);    /* mismo crema del sitio */
  padding-block: 0;         /* anula padding global de section: empujaba el sticky stage abajo */
}
.saga-stage {
  position: sticky; top: 0;
  height: 100dvh; width: 100%;
  overflow: hidden;
}
/* cada escena ocupa toda la pantalla, apiladas; GSAP muestra una */
.scene {
  position: absolute; inset: 0;
  display: grid; align-content: start; align-items: start;
  padding-top: clamp(132px, 16vh, 180px); padding-bottom: 40px;   /* nav fija + aire */
  opacity: 0; pointer-events: none;
  will-change: opacity, transform;
}
.scene-inner { align-self: start; }
.scene[data-scene="0"] { opacity: 1; pointer-events: auto; }
.scene-inner { width: 100%; }
.hero-inner {
  display: grid; grid-template-columns: 1.05fr 0.95fr; gap: clamp(32px, 5vw, 72px); align-items: start;
}

/* escena hero: reusa estilos .hero-* existentes, h1 un poco mas contenido */
.scene-hero .hero-copy { max-width: 600px; }
.scene-hero .hero-h1 { font-size: clamp(44px, 6vw, 84px); margin-bottom: 26px; }
.scene-hero .hero-lead { margin-bottom: 32px; }
.scene-hero .hero-visual { max-width: 480px; margin-left: auto; }
.scene-hero .hero-visual img { width: 100%; aspect-ratio: 1/1; object-fit: cover; }
/* escena números + beneficios */
.scene-eyebrow { margin-bottom: 40px; }
.saga-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(28px, 4vw, 64px); margin-bottom: clamp(40px, 5vw, 72px); }
.sstat { display: flex; flex-direction: column; gap: 12px; }
.sstat-num { font-family: var(--font-display); font-weight: 600; font-size: clamp(52px, 7vw, 104px); line-height: 0.95; letter-spacing: -0.04em; color: var(--ink); }
.sstat-money { color: var(--accent); }
.sstat-label { font-size: 14px; color: var(--ink-soft); max-width: 24ch; }
.saga-benefits { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; border-top: 1px solid var(--line); padding-top: clamp(28px, 4vw, 48px); }
.benefit { display: flex; gap: 18px; align-items: flex-start; }
.benefit-i { color: var(--accent); font-weight: 700; flex-shrink: 0; font-size: 26px; line-height: 1.3; }
.benefit p { font-size: clamp(18px, 1.4vw, 22px); color: var(--ink-soft); line-height: 1.6; }
.benefit strong { display: block; margin-bottom: 6px; color: var(--ink); font-weight: 600; font-size: clamp(19px, 1.5vw, 23px); }

/* escena números: un toque más abajo + más aire entre números y beneficios */
.scene-stats { padding-top: clamp(160px, 19vh, 220px); }
.scene-stats .saga-benefits { padding-top: clamp(40px, 5vw, 64px); }

/* escena equipo */
.scene-head { margin-bottom: clamp(32px, 4vw, 56px); }
.saga-team { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; }
/* fotos del equipo dentro de la escena: aspecto más contenido para que la escena no quede gigante */
.scene-team { padding-top: clamp(104px, 13vh, 150px); }
.scene-team .scene-head h2 { font-size: clamp(28px, 3.4vw, 46px); line-height: 1.05; }
.scene-team .scene-head { margin-bottom: clamp(28px, 3vw, 44px); }
.scene-team .member-photo { aspect-ratio: 1 / 1; max-width: 200px; }
.scene-team .member { gap: 14px; }
.member-role { font-size: 13px; letter-spacing: .04em; text-transform: uppercase; color: var(--accent); font-weight: 600; }
.member-bio { font-size: clamp(14px, 1vw, 16px); color: var(--ink-soft); line-height: 1.6; max-width: 34ch; }
.scene-team .member h3 { font-size: clamp(20px, 1.6vw, 24px); }

/* separar el bloque de scroll-normal del pin de la saga */
.wrap > section:first-child { padding-top: clamp(2.5rem, 2rem + 2vw, 4rem); }

/* SERVICIOS: una sola pantalla, pegado al equipo */
.servicios {
  min-height: 100dvh;
  display: flex; flex-direction: column; justify-content: center;
  padding-block: clamp(2.5rem, 2rem + 2vw, 4rem);
}
.servicios .sec-head { margin-bottom: clamp(28px, 3vw, 48px); }

/* SAGA 2: proceso / testimonios / contacto — escenas centradas vertical */
.scene-proceso, .scene-testimonios, .scene-contacto { align-content: center; }
.scene-proceso .scene-inner,
.scene-testimonios .scene-inner,
.scene-contacto .scene-inner { align-self: center; }
.scene-testimonios .quotes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
.scene-contacto .cta-grid { align-items: center; }

/* SAGA 2: forzar todo dentro de una pantalla (no desbordar el pin) */
.saga-2 .scene { padding-top: clamp(96px, 12vh, 132px); padding-bottom: clamp(28px, 4vh, 48px); }
/* proceso: imagen contenida + steps compactos */
.scene-proceso .proceso-visual img { max-height: 62vh; width: auto; max-width: 100%; object-fit: cover; margin: 0 auto; display: block; }
.scene-proceso .step { padding: clamp(14px, 2vh, 22px) 0; }
.scene-proceso .step h3 { font-size: clamp(18px, 2vw, 24px); margin: 8px 0 6px; }
.scene-proceso .step p { font-size: clamp(13px, 1vw, 15px); }
.scene-proceso .scene-head { margin-bottom: clamp(16px, 2.5vh, 28px); }
/* testimonios: quotes más compactas */
.scene-testimonios .quote { padding: clamp(22px, 2.6vw, 30px); gap: 16px; }
.scene-testimonios .quote p { font-size: clamp(14px, 1.1vw, 16px); }
.scene-testimonios .scene-head { margin-bottom: clamp(20px, 3vh, 36px); }
/* contacto: título y form contenidos */
.scene-contacto .cta-h { font-size: clamp(32px, 4vw, 52px); margin-bottom: 16px; }
.scene-contacto .cta-lead { font-size: clamp(15px, 1.2vw, 18px); margin-bottom: 22px; }
.scene-contacto .cta-form { gap: 12px; }
.scene-contacto .cta-visual img { max-height: 66vh; width: auto; max-width: 100%; object-fit: cover; margin: 0 auto; display: block; }

/* indicador de escenas (derecha) */
/* fallback: sin GSAP / reduced-motion -> escenas en columna, scroll normal */
.no-gsap .saga, .saga.is-fallback { height: auto; }
.no-gsap .saga-stage, .saga.is-fallback .saga-stage { position: static; height: auto; display: block; }
.no-gsap .scene, .saga.is-fallback .scene { position: relative; inset: auto; opacity: 1; pointer-events: auto; padding-block: var(--space); min-height: 0; }

@media (max-width: 940px) {
  .saga { height: 360vh; }
  .hero-inner { grid-template-columns: 1fr; gap: 36px; padding-top: 96px; }
  .scene-hero .hero-visual { order: -1; max-width: 380px; }
  .saga-stats, .saga-benefits, .saga-team { grid-template-columns: 1fr; gap: 24px; }
  .scene { align-content: center; overflow-y: auto; }
}

/* ============================================================
   SERVICIOS — cards cuadradas (variante tower)
   ============================================================ */
.serv-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.serv-card {
  position: relative; overflow: hidden;
  display: flex; flex-direction: column;
  border: 1px solid var(--line); border-radius: 20px; background: var(--surface, #fff);
  box-shadow: 0 18px 40px -28px oklch(22% 0.02 60 / 0.22);   /* flota desde el inicio */
  transition: transform .4s var(--ease), box-shadow .4s var(--ease), border-color .4s;
}
/* barra de acento que crece en hover (sobre la foto) */
.serv-card::before {
  content: ""; position: absolute; left: 0; top: 0; height: 4px; width: 100%; z-index: 3;
  background: var(--accent-grad, var(--accent)); transform: scaleX(0); transform-origin: left;
  transition: transform .45s var(--ease);
}
.serv-card:hover { transform: translateY(-10px); border-color: var(--accent); box-shadow: 0 44px 80px -34px oklch(22% 0.02 60 / 0.34); }
.serv-card:hover::before { transform: scaleX(1); }
.serv-card:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

/* foto del servicio: banda superior */
.serv-card-photo { position: relative; aspect-ratio: 4 / 3; overflow: hidden; background: var(--bg-soft); }
.serv-card-photo img {
  width: 100%; height: 100%; object-fit: cover; object-position: center center; display: block;
  transition: transform .6s var(--ease);
}
.serv-card:hover .serv-card-photo img { transform: scale(1.05); }
/* numero: chip flotante sobre la foto */
.serv-card-i {
  position: absolute; left: 16px; bottom: 16px; z-index: 2;
  font-family: var(--font-display); font-weight: 600; font-size: 17px; color: #fff;
  display: inline-flex; align-items: center; justify-content: center;
  width: 42px; height: 42px; border-radius: 11px;
  background: var(--card-accent, var(--accent));
  box-shadow: 0 8px 20px -8px oklch(22% 0.02 60 / 0.5);
}
.serv-card-body { padding: clamp(22px, 2.4vw, 32px); flex: 1; display: flex; flex-direction: column; }
.serv-card-arrow { margin: auto clamp(22px, 2.4vw, 32px) clamp(22px, 2.4vw, 32px); }

/* acento propio por servicio (ninguna card igual a otra) */
.serv-card--1 { --card-accent: oklch(48% 0.08 150); --card-accent-soft: oklch(48% 0.08 150 / 0.12); }   /* verde bosque */
/* foto personal: llaves en tercio inferior, bajar el encuadre */
.serv-card--1 .serv-card-photo img { object-position: center 100%; }
.serv-card--2 { --card-accent: oklch(50% 0.09 230); --card-accent-soft: oklch(50% 0.09 230 / 0.12); }   /* azul acero */
.serv-card--3 { --card-accent: oklch(55% 0.10 50);  --card-accent-soft: oklch(55% 0.10 50 / 0.12); }    /* terracota */
.serv-card--1::before { background: linear-gradient(90deg, oklch(48% 0.08 150), oklch(58% 0.11 150)); }
.serv-card--2::before { background: linear-gradient(90deg, oklch(50% 0.09 230), oklch(60% 0.11 230)); }
.serv-card--3::before { background: linear-gradient(90deg, oklch(55% 0.10 50), oklch(64% 0.12 50)); }
.serv-card--1:hover { border-color: oklch(48% 0.08 150); }
.serv-card--2:hover { border-color: oklch(50% 0.09 230); }
.serv-card--3:hover { border-color: oklch(55% 0.10 50); }
.serv-card:hover .serv-card-body h3 { color: var(--card-accent, var(--accent)); }
.serv-card-arrow { color: var(--card-accent, var(--accent)); }
.serv-card-body h3 { font-size: clamp(20px, 2vw, 27px); margin: 0 0 12px; font-weight: 600; line-height: 1.14; transition: color .3s; }
.serv-card:hover .serv-card-body h3 { color: var(--card-accent, var(--accent)); }
.serv-card-body p { font-size: clamp(14px, 1.05vw, 16px); color: var(--ink-soft); line-height: 1.6; }
.serv-card-arrow {
  font-family: var(--font-display); font-size: 15px; font-weight: 600;
  display: inline-flex; align-items: center; gap: 6px;
  opacity: 1; transform: translateX(0);
  transition: gap .3s var(--ease);
}
.serv-card:hover .serv-card-arrow { gap: 12px; }

/* PROCESO estilo hero parallax: imagen más grande, más aire */
.proceso-hero .proceso-grid { grid-template-columns: 1fr 1fr; gap: clamp(48px, 7vw, 120px); }
.proceso-hero .proceso-visual img { border-radius: 22px; box-shadow: 0 50px 100px -34px oklch(22% 0.02 60 / 0.3); }

@media (max-width: 940px) {
  .serv-cards { grid-template-columns: 1fr; }
  .serv-card-photo { aspect-ratio: 4 / 3; }
  .proceso-hero .proceso-grid { grid-template-columns: 1fr; }
}

/* ============================================================
   TOWER — storytelling pinned estilo towerdoors, fondo crema.
   La pantalla se queda fija; el scroll avanza paneles+imagen
   sin bajar la página. Suelta el pin y sigue normal.
   ============================================================ */
.tower {
  position: relative;
  height: 500vh;             /* 4 paneles ≈ 1.25 pantalla c/u de scroll */
  background: var(--bg);     /* mismo crema del hero/sitio */
}
.tower-stage {
  position: sticky; top: 0;
  height: 100dvh; width: 100%;
  overflow: hidden;
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  max-width: var(--container); margin: 0 auto; padding: 0 var(--gutter);
}
/* lineas verticales sutiles dentro del stage para no perder el grid editorial */
.tower-stage::before {
  content: ''; position: absolute; inset: 0; z-index: 0; pointer-events: none;
  background:
    linear-gradient(var(--line-soft), var(--line-soft)) 33.33% 0 / 1px 100% no-repeat,
    linear-gradient(var(--line-soft), var(--line-soft)) 66.66% 0 / 1px 100% no-repeat;
}

/* imagen central que hace cross-fade entre paneles */
.tower-media {
  position: relative; z-index: 1;
  grid-column: 2;
  aspect-ratio: 1 / 1; width: 100%; max-width: 540px; justify-self: center;
  border-radius: 22px; overflow: hidden;
  box-shadow: 0 50px 100px -34px oklch(22% 0.02 60 / 0.3);
  perspective: 1200px;
}
.tower-img {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; opacity: 0;
  will-change: transform, opacity;
}
.tower-img[data-img="0"] { opacity: 1; }

/* paneles de texto apilados en la misma celda; GSAP muestra uno a la vez */
.tower-panels {
  position: relative; z-index: 2;
  grid-column: 1; grid-row: 1;
  align-self: center;
  display: grid;
}
.tower-panel {
  grid-area: 1 / 1;
  max-width: 30rem;
  opacity: 0; pointer-events: none;
  will-change: transform, opacity;
}
.tower-panel[data-panel="0"] { opacity: 1; }
.tower-idx {
  font-family: var(--font-display); font-weight: 500; font-size: 12px;
  letter-spacing: .22em; text-transform: uppercase; color: var(--accent);
  display: inline-block; margin-bottom: 22px;
}
.tower-panel h2 { font-size: clamp(34px, 4.6vw, 64px); margin-bottom: 22px; line-height: 1.02; }
.tower-panel p { font-size: clamp(16px, 1.3vw, 19px); color: var(--ink-soft); max-width: 40ch; margin-bottom: 28px; }
.tower-tags { display: flex; gap: 10px; flex-wrap: wrap; }
.tower-tags span {
  font-family: var(--font-display); font-size: 12px; font-weight: 500;
  letter-spacing: .04em; padding: 8px 16px; border-radius: 100px;
  border: 1px solid var(--line); color: var(--ink-soft);
}

/* indicador de pasos (vertical, derecha) */
.tower-steps {
  position: absolute; z-index: 3; right: var(--gutter); top: 50%;
  transform: translateY(-50%);
  display: flex; flex-direction: column; gap: 12px;
}
.tower-step { width: 2px; height: 30px; background: var(--line); border-radius: 2px; transition: background .35s var(--ease), height .35s var(--ease); }
.tower-step.is-active { background: var(--accent); height: 46px; }

/* fallback: sin GSAP / reduced-motion -> paneles en columna, scroll normal */
.no-gsap .tower, .tower.is-fallback { height: auto; }
.no-gsap .tower-stage, .tower.is-fallback .tower-stage {
  position: static; height: auto; display: block; padding: 80px var(--gutter);
}
.no-gsap .tower-stage::before, .tower.is-fallback .tower-stage::before { display: none; }
.no-gsap .tower-media, .tower.is-fallback .tower-media { margin: 0 auto 60px; }
.no-gsap .tower-img[data-img="0"], .tower.is-fallback .tower-img[data-img="0"] { position: relative; }
.no-gsap .tower-img:not([data-img="0"]), .tower.is-fallback .tower-img:not([data-img="0"]) { display: none; }
.no-gsap .tower-panels, .tower.is-fallback .tower-panels { display: block; }
.no-gsap .tower-panel, .tower.is-fallback .tower-panel { opacity: 1; pointer-events: auto; margin-bottom: 64px; max-width: none; }
.no-gsap .tower-steps, .tower.is-fallback .tower-steps { display: none; }

@media (max-width: 940px) {
  .tower { height: 460vh; }
  .tower-stage { grid-template-columns: 1fr; gap: 32px; align-content: center; }
  .tower-stage::before { display: none; }
  .tower-media { grid-column: 1; max-width: 360px; order: -1; }
  .tower-panels { grid-column: 1; }
  .tower-steps { right: 16px; }
  .tower-panel { max-width: none; }
}

/* ============================================================
   CINE — scrollytelling oscuro, fotos 3D una a una (pinned)
   (sin uso en esta variante, conservado por compatibilidad)
   ============================================================ */
.cine {
  position: relative;
  height: 520vh;            /* 3 fotos + salida + pantalla de datos */
  background: oklch(16% 0.012 260);   /* navy casi negro, frio */
}
.cine-stage {
  position: sticky; top: 0;
  height: 100vh; width: 100%;
  overflow: hidden;
  display: grid; place-items: center;
  perspective: 1400px;       /* da profundidad real al 3D */
  background: radial-gradient(120% 90% at 50% 30%, oklch(22% 0.02 260) 0%, oklch(13% 0.012 260) 70%);
}
/* grano sutil sobre el negro, no en scroll container -> sin repaint pesado */
.cine-grain {
  position: absolute; inset: 0; z-index: 3; pointer-events: none; opacity: .5;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.05'/%3E%3C/svg%3E");
  mix-blend-mode: overlay;
}
.cine-shot {
  position: absolute;
  width: min(46vw, 560px);
  display: grid; gap: 0;
  transform-style: preserve-3d;
  opacity: 0;                /* GSAP controla; fallback abajo */
  will-change: transform, opacity;
}
.cine-shot img {
  width: 100%; border-radius: 18px;
  box-shadow: 0 60px 120px -30px rgba(0,0,0,.7);
}
.cine-shot figcaption {
  position: absolute; left: -8%; bottom: -7%;
  max-width: 360px; padding: 22px 26px;
  background: oklch(96.5% 0.012 85 / 0.06);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  border: 1px solid oklch(96.5% 0.012 85 / 0.12); border-radius: 16px;
  color: oklch(96% 0.01 85);
}
.cine-idx { font-family: var(--font-display); font-size: 12px; letter-spacing: .3em; color: var(--accent-ink); opacity: .6; }
.cine-shot figcaption h3 { color: oklch(97% 0.01 85); font-size: clamp(22px, 2.4vw, 32px); margin: 8px 0 10px; }
.cine-shot figcaption p { color: oklch(82% 0.01 85); font-size: 14px; line-height: 1.55; }

.cine-progress {
  position: absolute; bottom: 40px; left: 50%; transform: translateX(-50%);
  z-index: 4; width: 180px; height: 2px; background: oklch(96% 0.01 85 / 0.15); border-radius: 2px; overflow: hidden;
}
.cine-progress span { display: block; height: 100%; width: 0%; background: var(--accent); }

/* DATOS sobre el negro: numeros animados, entran al final del carrusel */
.cine-stats {
  position: absolute; inset: 0; z-index: 2;
  display: flex; flex-direction: column; justify-content: center;
  max-width: var(--container); margin: 0 auto; padding: 0 var(--gutter);
  opacity: 0;                /* GSAP fade-in al final */
  pointer-events: none;
  will-change: opacity, transform;
}
.cine-stats-eyebrow {
  font-family: var(--font-display); font-weight: 800; font-size: 13px;
  letter-spacing: .14em; text-transform: uppercase; color: var(--ink);
  margin-bottom: 48px; display: flex; align-items: center; gap: 10px;
}
.cine-stats-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(32px, 5vw, 80px); }
.cstat { display: flex; flex-direction: column; gap: 16px; }
.cstat-num {
  font-family: var(--font-display); font-weight: 600; font-size: clamp(56px, 8vw, 120px);
  line-height: 0.95; letter-spacing: -0.04em; color: oklch(97% 0.01 85);
}
.cstat-money { color: var(--accent); }
.cstat-label { font-size: 14px; color: oklch(78% 0.01 85); max-width: 26ch; }

/* fallback stats sobre negro */
.no-gsap .cine-stats, .cine.is-fallback .cine-stats {
  position: relative; opacity: 1; pointer-events: auto; padding: 60px var(--gutter);
}

/* fallback: sin GSAP / reduced-motion -> muestra las 3 apiladas legibles */
.no-gsap .cine, .cine.is-fallback { height: auto; }
.no-gsap .cine-stage, .cine.is-fallback .cine-stage { position: static; height: auto; display: block; padding: 80px var(--gutter); }
.no-gsap .cine-shot, .cine.is-fallback .cine-shot { position: relative; opacity: 1; transform: none; width: min(90vw, 560px); margin: 0 auto 90px; }

/* ===== PARALLAX proceso: ya usa .proceso-visual img en JS ===== */

/* ===== STACK testimonios: cartas que se apilan al entrar ===== */
.quotes.is-stack { will-change: transform; }
.quotes .quote { will-change: transform, opacity; }

/* ===== IMAGENES VIVAS (0 peso, todo transform) ===== */
/* glow ambiental detras de cada foto: respira lento */
.hero-visual, .proceso-visual, .cta-visual { position: relative; }
.hero-visual::before, .proceso-visual::before, .cta-visual::before {
  content: ""; position: absolute; inset: -12% -8%;
  background: radial-gradient(60% 60% at 50% 45%, oklch(58% 0.11 150 / 0.18), transparent 70%);
  filter: blur(28px); z-index: -1;
  animation: breathe 7s var(--ease) infinite;
}
@keyframes breathe {
  0%, 100% { transform: scale(1); opacity: .8; }
  50%      { transform: scale(1.08); opacity: 1; }
}

/* float idle: la foto flota suave, infinito */
.img-float { animation: float-y 6s ease-in-out infinite; }
.proceso-visual .img-float { animation-duration: 7.5s; animation-delay: -2s; }
.cta-visual .img-float     { animation-duration: 8s;   animation-delay: -3.5s; }
@keyframes float-y {
  0%, 100% { transform: translate3d(0, 0, 0); }
  50%      { transform: translate3d(0, -14px, 0); }
}

/* wrapper para tilt mouse (hero): el JS escribe --rx/--ry */
.tilt-wrap {
  transform: perspective(900px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg));
  transform-style: preserve-3d;
  transition: transform .5s var(--ease);
  will-change: transform;
}
.tilt-wrap.is-tilting { transition: transform .12s linear; }

/* reveal con scale (mas cine que fade plano) */
.img-reveal { clip-path: inset(0 0 0 0 round 18px); }

@media (prefers-reduced-motion: reduce) {
  .img-float, .hero-visual::before, .proceso-visual::before, .cta-visual::before { animation: none; }
  .tilt-wrap { transform: none; }
}

/* ===== RESPONSIVE ===== */
@media (max-width: 940px) {
  .cine { height: 460vh; }
  .cine-shot { width: min(78vw, 420px); }
  .cine-shot figcaption { left: 0; right: 0; bottom: -12%; max-width: none; }
  .cine-stats-grid { grid-template-columns: 1fr; gap: 40px; }
  .cstat-label { max-width: none; }
  .nav-links, .nav-cta { display: none; }
  .nav-burger { display: flex; }
  .hero { grid-template-columns: 1fr; gap: 48px; padding-top: 120px; }
  .hero-visual { order: -1; max-width: 420px; }
  .proceso-grid, .cta-grid { grid-template-columns: 1fr; gap: 40px; }
  .proceso-visual, .cta-visual { max-width: 480px; }
  .stats, .team-grid, .quotes { grid-template-columns: 1fr; }
  .serv { grid-template-columns: 56px 1fr; gap: 16px; }
  .footer { grid-template-columns: 1fr; gap: 40px; }
}

@media (prefers-reduced-motion: reduce) {
  [data-reveal] { opacity: 1; transform: none; }
}
