/* ============================================================
   Leizer — sistema de diseño compartido
   Lo cargan: index.html, servicio.php, 404.html, privacidad.html
   Lo exclusivo de la landing vive en css/leizer-landing.css
   ============================================================ */

:root {
  /* --- Marca (valores canónicos, no usar directo en componentes) --- */
  --azul: #1e50e6;
  --azul-claro: #4d7bff;
  --azul-profundo: #12329b;
  --naranja: #f26b1f;
  --naranja-claro: #ff8a45;
  --dark: #080c1a;
  --dark-2: #0d1226;
  --dark-3: #141a33;
  --claro: #f6f5f2;
  --claro-2: #ffffff;
  --tinta: #0b0d14;

  /* --- Acentos del ecosistema --- */
  --eco-studio: #00d4ff;
  --eco-tienda: #f26b1f;
  --eco-deco:   #10b981;
  --eco-dtf:    #1e50e6;
  --eco-magic:  #f6c681;

  /* --- Tipografía --- */
  --display: 'Sora', system-ui, -apple-system, sans-serif;
  --body: 'Inter', system-ui, -apple-system, sans-serif;

  /* --- Escala fluida --- */
  --t-hero: clamp(2.6rem, 1.1rem + 6.2vw, 5.5rem);
  --t-h2:   clamp(1.9rem, 1.1rem + 3.2vw, 3.4rem);
  --t-h3:   clamp(1.25rem, 1rem + 1vw, 1.65rem);
  --t-body: clamp(0.98rem, 0.94rem + 0.2vw, 1.08rem);
  --t-small: 0.86rem;
  --t-eyebrow: 0.78rem;

  /* --- Ritmo --- */
  --sec-y: clamp(4.5rem, 3rem + 6vw, 8.5rem);
  --gap: clamp(1rem, 0.6rem + 1.4vw, 1.75rem);
  --ancho: 1240px;

  /* --- Forma --- */
  --r-sm: 8px;
  --r: 14px;
  --r-lg: 22px;
  --r-full: 999px;

  /* --- Movimiento --- */
  --ease: cubic-bezier(.22, 1, .36, 1);
  --ease-suave: cubic-bezier(.4, 0, .2, 1);
  --dur: .45s;
  --dur-rapida: .22s;

  /* --- Gradiente de marca. Pasa por un punto claro para no atravesar el malva --- */
  --grad-marca: linear-gradient(100deg, var(--azul) 0%, #6f8dff 38%, #ffb07a 62%, var(--naranja) 100%);
}

/* ---------- Temas por sección ---------- */
[data-theme="dark"] {
  --fondo: var(--dark);
  --superficie: rgba(255, 255, 255, .038);
  --superficie-2: rgba(255, 255, 255, .07);
  --texto: #f2f4fa;
  --texto-suave: rgba(233, 238, 250, .72);
  --texto-tenue: rgba(233, 238, 250, .62);
  --borde: rgba(255, 255, 255, .1);
  --borde-fuerte: rgba(255, 255, 255, .2);
  --acento: var(--naranja);
  --sombra: 0 24px 60px -18px rgba(0, 0, 0, .75);
  color-scheme: dark;
}

[data-theme="light"] {
  --fondo: var(--claro);
  --superficie: #ffffff;
  --superficie-2: #ffffff;
  --texto: var(--tinta);
  --texto-suave: rgba(11, 13, 20, .68);
  --texto-tenue: rgba(11, 13, 20, .62);
  --borde: rgba(11, 13, 20, .1);
  --borde-fuerte: rgba(11, 13, 20, .2);
  --acento: var(--naranja);
  --sombra: 0 22px 50px -20px rgba(16, 24, 48, .22);
  color-scheme: light;
}

[data-theme="accent"] {
  --fondo: var(--azul-profundo);
  --superficie: rgba(255, 255, 255, .1);
  --superficie-2: rgba(255, 255, 255, .16);
  --texto: #ffffff;
  --texto-suave: rgba(255, 255, 255, .8);
  --texto-tenue: rgba(255, 255, 255, .72);
  --borde: rgba(255, 255, 255, .2);
  --borde-fuerte: rgba(255, 255, 255, .34);
  --acento: #ffd0ac;
  --sombra: 0 22px 50px -20px rgba(0, 0, 0, .45);
  color-scheme: dark;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--body);
  font-size: var(--t-body);
  line-height: 1.65;
  background: var(--dark);
  color: #f2f4fa;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img, svg, video { display: block; max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
button { background: none; border: 0; cursor: pointer; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4 { font-family: var(--display); font-weight: 700; line-height: 1.06; letter-spacing: -.025em; }

:focus-visible {
  outline: 2px solid var(--naranja);
  outline-offset: 3px;
  border-radius: 4px;
}

/* ---------- Contenedor y secciones ---------- */
.c { width: 100%; max-width: var(--ancho); margin-inline: auto; padding-inline: clamp(1.1rem, .6rem + 2vw, 2.5rem); }

.section {
  position: relative;
  padding-block: var(--sec-y);
  background: var(--fondo);
  color: var(--texto);
}
.section > .c { position: relative; z-index: 2; }

/* ---------- Encabezado de sección ---------- */
.section-header { max-width: 780px; margin-bottom: clamp(2.2rem, 1.4rem + 2.4vw, 3.8rem); }

.eyebrow {
  display: inline-flex; align-items: center; gap: .55rem;
  font-family: var(--body); font-size: var(--t-eyebrow); font-weight: 600;
  letter-spacing: .16em; text-transform: uppercase; color: var(--texto-tenue);
  margin-bottom: 1rem;
}
.eyebrow::before {
  content: ''; width: 26px; height: 1px; background: currentColor; opacity: .55;
}

.section-heading { font-size: var(--t-h2); margin-bottom: 1rem; text-wrap: balance; }
.section-desc { font-size: 1.06rem; color: var(--texto-suave); max-width: 62ch; }

/* Realces del titular. .accent y .blue existen ya en el marcado actual: se conservan. */
.accent { color: var(--naranja); font-style: normal; }
/* El naranja de marca sobre el hueso claro da 2.79:1, por debajo del 3:1
   que exige AA incluso en texto grande. Se oscurece solo en tema claro. */
[data-theme="light"] .accent { color: #c2500f; }
.blue { color: var(--azul-claro); }
[data-theme="light"] .blue { color: var(--azul); }

.grad-texto {
  background: var(--grad-marca);
  background-size: 220% 100%;
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
  animation: desliza-grad 9s var(--ease-suave) infinite alternate;
}
@keyframes desliza-grad { to { background-position: 100% 50%; } }

/* ---------- Botones ---------- */
.btn {
  --btn-h: 52px;
  position: relative; display: inline-flex; align-items: center; justify-content: center; gap: .6rem;
  min-height: var(--btn-h); padding: 0 1.7rem;
  border-radius: var(--r-full);
  font-family: var(--display); font-weight: 600; font-size: .97rem; letter-spacing: -.01em;
  cursor: pointer; white-space: nowrap;
  transition: transform var(--dur-rapida) var(--ease), box-shadow var(--dur) var(--ease),
              background-color var(--dur-rapida) var(--ease), color var(--dur-rapida) var(--ease),
              border-color var(--dur-rapida) var(--ease);
}
.btn:active { transform: translateY(1px) scale(.99); }
.btn .btn-arrow { transition: transform var(--dur-rapida) var(--ease); }
.btn:hover .btn-arrow { transform: translateX(4px); }

.btn-primary {
  background: var(--naranja); color: #fff;
  box-shadow: 0 8px 24px -8px rgba(242, 107, 31, .55);
}
.btn-primary:hover {
  background: var(--naranja-claro);
  transform: translateY(-2px);
  box-shadow: 0 16px 40px -10px rgba(242, 107, 31, .7);
}
/* El resplandor respira solo al pasar el cursor, no en reposo */
.btn-primary::after {
  content: ''; position: absolute; inset: -3px; border-radius: inherit; z-index: -1;
  background: radial-gradient(60% 120% at 50% 50%, rgba(242,107,31,.55), transparent 70%);
  opacity: 0; transition: opacity var(--dur) var(--ease);
}
.btn-primary:hover::after { opacity: 1; animation: respira 2.4s var(--ease-suave) infinite; }
@keyframes respira { 50% { opacity: .45; transform: scale(1.06); } }

.btn-outline {
  background: transparent; color: var(--texto);
  border: 1px solid var(--borde-fuerte);
}
.btn-outline:hover { background: var(--superficie-2); border-color: var(--texto); transform: translateY(-2px); }

.btn-ghost { background: var(--superficie); color: var(--texto); border: 1px solid var(--borde); }
.btn-ghost:hover { background: var(--superficie-2); }

/* ---------- Iconos ---------- */
.icono {
  width: 24px; height: 24px; flex: none;
  fill: none; stroke: currentColor; stroke-width: 1.75;
  stroke-linecap: round; stroke-linejoin: round;
}
.icono-solido { fill: currentColor; stroke: none; }

/* ---------- Motor de reveals ---------- */
.reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity .8s var(--ease), transform .8s var(--ease);
  transition-delay: var(--reveal-delay, 0ms);
}
.reveal.is-visible { opacity: 1; transform: none; }
.reveal-d1 { --reveal-delay: 90ms; }
.reveal-d2 { --reveal-delay: 180ms; }
.reveal-d3 { --reveal-delay: 270ms; }
.reveal-d4 { --reveal-delay: 360ms; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
    scroll-behavior: auto !important;
  }
  .reveal { opacity: 1 !important; transform: none !important; }
}

/* ---------- Nav adaptativo ---------- */
.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 900;
  transition: background-color var(--dur) var(--ease), border-color var(--dur) var(--ease),
              backdrop-filter var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
  border-bottom: 1px solid transparent;
}
.nav-inner {
  width: 100%; max-width: var(--ancho); margin-inline: auto;
  padding: .85rem clamp(1.1rem, .6rem + 2vw, 2.5rem);
  display: flex; align-items: center; gap: clamp(1rem, .5rem + 2vw, 2.5rem);
}

/* Las dos variantes del logo se apilan y se cruzan por opacidad:
   sin salto de layout ni parpadeo por carga tardía. */
.nav-logo { position: relative; display: block; height: 34px; aspect-ratio: 950 / 313; flex: none; }
.nav-logo img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain;
  transition: opacity var(--dur) var(--ease);
}
.nav-logo .logo-claro { opacity: 0; }
[data-nav-theme="light"] .nav-logo .logo-oscuro { opacity: 0; }
[data-nav-theme="light"] .nav-logo .logo-claro { opacity: 1; }

.nav-links { display: flex; align-items: center; gap: clamp(.9rem, .4rem + 1.4vw, 2rem); margin-left: auto; }
.nav-links a {
  position: relative; font-size: .95rem; font-weight: 500; padding: .35rem 0;
  color: var(--nav-texto); transition: color var(--dur-rapida) var(--ease);
}
.nav-links a::after {
  content: ''; position: absolute; left: 0; bottom: 0; height: 2px; width: 100%;
  background: var(--naranja); border-radius: 2px;
  transform: scaleX(0); transform-origin: right;
  transition: transform .34s var(--ease);
}
.nav-links a:hover::after { transform: scaleX(1); transform-origin: left; }

.nav-cta {
  display: inline-flex; align-items: center; gap: .5rem;
  height: 42px; padding: 0 1.25rem; border-radius: var(--r-full);
  background: var(--naranja); color: #fff;
  font-family: var(--display); font-weight: 600; font-size: .92rem;
  transition: transform var(--dur-rapida) var(--ease), box-shadow var(--dur) var(--ease), background-color var(--dur-rapida) var(--ease);
}
.nav-cta:hover {
  background: var(--naranja-claro); transform: translateY(-2px);
  box-shadow: 0 12px 28px -10px rgba(242, 107, 31, .7);
}

/* Tema del nav según la sección que lo cruza */
.nav { --nav-texto: rgba(242, 244, 250, .86); }
.nav[data-nav-theme="light"] { --nav-texto: rgba(11, 13, 20, .8); }
.nav-links a:hover { color: var(--naranja); }

/* En reposo (sobre el hero) el nav es transparente; al desplazar aparece el vidrio */
.nav.is-scrolled { backdrop-filter: blur(18px) saturate(1.5); -webkit-backdrop-filter: blur(18px) saturate(1.5); }
.nav.is-scrolled[data-nav-theme="dark"] {
  background: rgba(8, 12, 26, .72); border-bottom-color: rgba(255, 255, 255, .09);
}
.nav.is-scrolled[data-nav-theme="light"] {
  background: rgba(246, 245, 242, .82); border-bottom-color: rgba(11, 13, 20, .09);
  box-shadow: 0 10px 30px -22px rgba(16, 24, 48, .5);
}

.nav-toggle { display: none; width: 44px; height: 44px; align-items: center; justify-content: center; color: var(--nav-texto); }
.nav-toggle .icono { width: 26px; height: 26px; }

@media (max-width: 900px) {
  .nav-toggle { display: inline-flex; margin-left: auto; order: 3; flex-shrink: 0; }
  .nav-cta { order: 2; height: 38px; padding: 0 1rem; font-size: .86rem; flex-shrink: 0; white-space: nowrap; }

  .nav-links {
    position: fixed; inset: 0; z-index: -1;
    margin: 0; padding: 6rem 1.6rem 2rem;
    flex-direction: column; align-items: flex-start; justify-content: flex-start;
    gap: .35rem;
    background: rgba(8, 12, 26, .97);
    backdrop-filter: blur(22px); -webkit-backdrop-filter: blur(22px);
    opacity: 0; visibility: hidden;
    transform: translateY(-14px);
    transition: opacity .32s var(--ease), transform .38s var(--ease), visibility 0s linear .38s;
  }
  .nav-links.is-open {
    z-index: 890; opacity: 1; visibility: visible; transform: none;
    transition: opacity .32s var(--ease), transform .38s var(--ease), visibility 0s;
  }
  .nav-links a {
    width: 100%; padding: 1rem 0;
    font-family: var(--display); font-size: 1.6rem; font-weight: 600;
    color: #f2f4fa;
    border-bottom: 1px solid rgba(255, 255, 255, .08);
    opacity: 0; transform: translateY(14px);
    transition: opacity .4s var(--ease), transform .4s var(--ease);
  }
  .nav-links.is-open a { opacity: 1; transform: none; }
  .nav-links.is-open a:nth-child(1) { transition-delay: .06s; }
  .nav-links.is-open a:nth-child(2) { transition-delay: .12s; }
  .nav-links.is-open a:nth-child(3) { transition-delay: .18s; }
  .nav-links.is-open a:nth-child(4) { transition-delay: .24s; }
  .nav-links a::after { display: none; }

  /* Con el panel abierto el botón siempre va en claro, sobre el fondo oscuro */
  body.menu-abierto { overflow: hidden; }
  body.menu-abierto .nav-toggle { color: #f2f4fa; }
}

/* js/site-switcher.js inyecta su pastilla en .nav-inner antes de .nav-cta (ver riesgo
   crítico documentado en el commit). En teléfonos angostos, esa pastilla + el CTA +
   el toggle no caben y empujan al toggle fuera de la pantalla sin que haya scroll
   horizontal visible (queda simplemente inalcanzable). Se oculta solo aquí: el
   contrato de site-switcher.js (anclarse dentro de .nav-inner, antes de .nav-cta)
   no cambia, solo su visibilidad en este rango. */
@media (max-width: 540px) {
  .nav-inner .lz-switcher { display: none; }
}

/* ---------- Footer ---------- */
.footer {
  position: relative;
  background: #05070f;
  color: #f2f4fa;
  padding-top: clamp(3.5rem, 2.5rem + 3vw, 5.5rem);
  overflow: hidden;
  --fondo: #05070f; --texto: #f2f4fa;
  --texto-suave: rgba(233, 238, 250, .68);
  --texto-tenue: rgba(233, 238, 250, .62);
  --borde: rgba(255, 255, 255, .09);
}
/* Filo superior con el gradiente de marca */
.footer::before {
  content: ''; position: absolute; inset: 0 0 auto 0; height: 1px;
  background: var(--grad-marca);
}

/* Palabra LEIZER en contorno, recortada por el borde inferior */
.footer-wordmark {
  position: absolute; left: 50%; bottom: -.22em; translate: -50% 0;
  z-index: 0; pointer-events: none; user-select: none;
  font-family: var(--display); font-weight: 800;
  font-size: clamp(5rem, 17vw, 15rem);
  letter-spacing: -.05em; line-height: .8;
  color: transparent;
  -webkit-text-stroke: 1px rgba(255, 255, 255, .07);
  white-space: nowrap;
}

.footer > .c { position: relative; z-index: 1; }

.footer-grid {
  display: grid;
  grid-template-columns: minmax(260px, 1.5fr) repeat(3, minmax(150px, 1fr));
  gap: clamp(1.8rem, 1rem + 3vw, 3.4rem);
  padding-bottom: clamp(2.5rem, 1.6rem + 2.5vw, 4rem);
}
@media (max-width: 980px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .footer-grid { grid-template-columns: 1fr; gap: 2.2rem; } }

.footer-marca img { height: 38px; width: auto; margin-bottom: 1.1rem; }
.footer-tagline { font-size: .88rem; color: var(--texto-suave); margin-bottom: .7rem; }
.footer-desc { font-size: .86rem; color: var(--texto-tenue); line-height: 1.65; max-width: 34ch; margin-bottom: 1.3rem; }

.footer-resenas {
  display: inline-flex; align-items: center; gap: .5rem;
  padding: .5rem .9rem; margin-bottom: 1.3rem;
  border-radius: var(--r-full);
  background: rgba(255, 255, 255, .05);
  border: 1px solid rgba(255, 255, 255, .1);
  font-size: .82rem; color: var(--texto-suave);
  transition: background-color var(--dur-rapida) var(--ease), transform var(--dur-rapida) var(--ease);
}
.footer-resenas:hover { background: rgba(255, 255, 255, .09); transform: translateY(-2px); }
.footer-resenas svg { width: 15px; height: 15px; fill: #ffc44d; stroke: none; }
.footer-resenas strong { color: #fff; font-weight: 700; }

.footer-col-h {
  font-family: var(--display); font-size: .76rem; font-weight: 700;
  letter-spacing: .14em; text-transform: uppercase;
  color: var(--texto-tenue);
  margin-bottom: 1.05rem;
}
.footer-col ul { list-style: none; padding: 0; display: grid; gap: .58rem; }
.footer-col a {
  display: inline-flex; align-items: center; gap: .5rem;
  font-size: .87rem; color: var(--texto-suave);
  transition: color var(--dur-rapida) var(--ease), transform var(--dur-rapida) var(--ease);
}
.footer-col a:hover { color: #fff; transform: translateX(3px); }
.footer-col a .icono { width: 15px; height: 15px; opacity: .55; flex: none; }

/* Punto de color por plataforma del ecosistema */
.footer-eco-dot { width: 7px; height: 7px; border-radius: 50%; flex: none; background: var(--eco, var(--azul)); }
.footer-col a:hover .footer-eco-dot { box-shadow: 0 0 0 3px color-mix(in srgb, var(--eco, var(--azul)) 30%, transparent); }

.footer-ver-todos { color: var(--naranja) !important; font-weight: 600; }

.footer-legal {
  display: flex; flex-wrap: wrap; align-items: center; gap: .6rem 1.6rem;
  padding-block: 1.4rem;
  border-top: 1px solid var(--borde);
  font-size: .8rem; color: var(--texto-tenue);
}
.footer-legal a { color: inherit; text-decoration: underline; text-underline-offset: 3px; transition: color var(--dur-rapida) var(--ease); }
.footer-legal a:hover { color: #fff; }
.footer-legal .footer-creditos { margin-left: auto; }
@media (max-width: 720px) { .footer-legal .footer-creditos { margin-left: 0; } }

/* ---------- Enlace de salto (accesibilidad) ---------- */
.salto-contenido {
  position: absolute; left: -9999px; top: 0; z-index: 2000;
  padding: .8rem 1.3rem; border-radius: 0 0 var(--r) 0;
  background: var(--naranja); color: #fff;
  font-family: var(--display); font-weight: 600; font-size: .92rem;
}
.salto-contenido:focus { left: 0; }
