/* =========================================================
   Latin Energy Group — sistema visual
   Todo el CSS vive bajo .leg para poder pegarlo en WordPress
   sin pisar los estilos del theme.
   ========================================================= */

@view-transition { navigation: auto; }

:root {
  --leg-ink: #0a1220;
  --leg-ink-2: #111b2c;
  --leg-navy: #1d3461;
  --leg-blue: #2b5ea8;
  --leg-lime: #a6ce39;
  --leg-lime-2: #c6e46a;
  --leg-slate: #3a4a52;
  --leg-paper: #f5f5f7;
  --leg-white: #ffffff;
  --leg-text: #1d1d1f;
  --leg-muted: #6e6e73;
  --leg-line: rgba(0, 0, 0, .08);
  --leg-line-dark: rgba(255, 255, 255, .12);
  --leg-radius: 28px;
  --leg-radius-sm: 16px;
  --leg-ease: cubic-bezier(.22, 1, .36, 1);
  --leg-ease-io: cubic-bezier(.65, 0, .35, 1);
  --leg-max: 1240px;
  --leg-font-head: "Manrope", system-ui, sans-serif;
  --leg-font-body: "Inter", system-ui, sans-serif;
}

.leg, .leg *, .leg *::before, .leg *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }
body.leg {
  margin: 0;
  background: var(--leg-white);
  color: var(--leg-text);
  font-family: var(--leg-font-body);
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
.leg img { max-width: 100%; display: block; }
:where(.leg) a { color: inherit; text-decoration: none; }
.leg h1, .leg h2, .leg h3, .leg h4 {
  font-family: var(--leg-font-head);
  margin: 0;
  letter-spacing: -.035em;
  line-height: 1.02;
  font-weight: 800;
}
.leg p { margin: 0; }
.leg ::selection { background: var(--leg-lime); color: var(--leg-ink); }

.leg-skip {
  position: absolute; left: -9999px; top: 8px; z-index: 999;
  background: var(--leg-lime); color: var(--leg-ink); padding: 10px 16px; border-radius: 99px;
}
.leg-skip:focus { left: 16px; }
.leg :focus-visible { outline: 3px solid var(--leg-lime); outline-offset: 3px; border-radius: 6px; }

.leg-wrap { width: min(var(--leg-max), calc(100% - 32px)); margin-inline: auto; }

/* ---------- Intro / telón de transición ---------- */
.leg-curtain { display: none; }
.leg-js .leg-curtain {
  position: fixed; inset: 0; z-index: 1000; pointer-events: none;
  background: #fff;
  display: grid; place-items: center;
  clip-path: inset(0 0 0 0);
  transition: clip-path .9s var(--leg-ease-io);
}
.leg-curtain.is-gone { clip-path: inset(0 0 100% 0); }
.leg-curtain.is-leaving { clip-path: inset(0 0 0 0); transition-duration: .55s; }
.leg-curtain.is-enter-from-bottom { clip-path: inset(100% 0 0 0); transition: none; }

/* Loader: isotipo que se arma + texto del logo */
.leg-loader { display: flex; flex-direction: column; align-items: center; gap: 22px; transition: opacity .4s, transform .6s var(--leg-ease); }
.leg-curtain.is-gone .leg-loader { opacity: 0; transform: translateY(-24px); }
.leg-loader__iso { position: relative; width: 112px; height: 112px; }
.leg-loader__iso img { position: absolute; inset: 0; width: 100%; height: 100%; }
.leg-loader__m { opacity: 0; transform: rotate(-150deg) scale(.7); }
.leg-loader__r { opacity: 0; clip-path: inset(0 100% 0 0); transform: translateX(-10px); }
.leg-loader__word { width: 168px; height: auto; opacity: 0; transform: translateY(10px); }
.leg-loader__bar { width: 168px; height: 2px; border-radius: 2px; background: rgba(0,0,0,.07); overflow: hidden; }
.leg-loader__bar::after { content: ""; display: block; height: 100%; width: 40%; border-radius: 2px; background: linear-gradient(90deg, var(--leg-blue), var(--leg-lime)); transform: translateX(-100%); }

.leg-curtain.is-play .leg-loader__m { animation: legMoon .9s var(--leg-ease) forwards; }
.leg-curtain.is-play .leg-loader__r {
  animation: legRay .6s var(--leg-ease) forwards, legGlow 1.6s ease-in-out infinite;
  animation-delay: calc(.28s + var(--k) * 70ms), calc(1.3s + var(--k) * 110ms);
}
.leg-curtain.is-play .leg-loader__word { animation: legWord .7s .55s var(--leg-ease) forwards; }
.leg-curtain.is-play .leg-loader__bar::after { animation: legBar 1.1s .7s var(--leg-ease-io) infinite; }
@keyframes legMoon { to { opacity: 1; transform: none; } }
@keyframes legRay { to { opacity: 1; clip-path: inset(0 0 0 0); transform: none; } }
@keyframes legGlow { 0%, 100% { filter: none; } 50% { filter: brightness(1.18) saturate(1.2); } }
@keyframes legWord { to { opacity: 1; transform: none; } }
@keyframes legBar { to { transform: translateX(260%); } }

/* ---------- Barra de progreso ---------- */
.leg-progress {
  position: fixed; top: 0; left: 0; height: 3px; width: 100%; z-index: 120;
  background: linear-gradient(90deg, var(--leg-blue), var(--leg-lime));
  transform-origin: 0 50%; transform: scaleX(0);
}

/* ---------- Navegación ---------- */
.leg-nav {
  position: fixed; inset: 0 0 auto 0; z-index: 110;
  height: 64px;
  color: #fff;
  transition: background .5s var(--leg-ease), color .5s var(--leg-ease), transform .5s var(--leg-ease), box-shadow .5s;
}
.leg-nav.is-solid {
  background: rgba(255, 255, 255, .78);
  backdrop-filter: saturate(160%) blur(12px);
  -webkit-backdrop-filter: saturate(160%) blur(12px);
  color: var(--leg-text);
  box-shadow: 0 1px 0 var(--leg-line);
}
.leg-nav.is-hidden { transform: translateY(-100%); }
.leg-nav__in { height: 100%; display: flex; align-items: center; gap: 28px; }
.leg-nav__logo { display: flex; align-items: center; gap: 10px; font-family: var(--leg-font-head); font-weight: 800; letter-spacing: -.02em; font-size: 18px; flex-shrink: 0; }
.leg-nav__logo img { height: 30px; width: auto; transition: filter .5s; }
.leg-nav:not(.is-solid) .leg-nav__logo img { filter: brightness(0) invert(1); }
.leg-nav__links { display: flex; gap: 4px; margin-left: auto; list-style: none; padding: 0; margin-block: 0; }
.leg-nav__links a {
  position: relative; display: block; padding: 8px 12px; font-size: 14px; font-weight: 500; opacity: .82;
  transition: opacity .3s;
}
.leg-nav__links a::after {
  content: ""; position: absolute; left: 12px; right: 12px; bottom: 2px; height: 2px; border-radius: 2px;
  background: var(--leg-lime); transform: scaleX(0); transform-origin: right; transition: transform .45s var(--leg-ease);
}
.leg-nav__links a:hover, .leg-nav__links a[aria-current="page"] { opacity: 1; }
.leg-nav__links a:hover::after, .leg-nav__links a[aria-current="page"]::after { transform: scaleX(1); transform-origin: left; }
.leg-nav__portal { flex-shrink: 0; }
.leg-nav__burger { display: none; margin-left: auto; width: 44px; height: 44px; border: 0; background: transparent; color: inherit; cursor: pointer; position: relative; }
.leg-nav__burger span { position: absolute; left: 11px; right: 11px; height: 2px; background: currentColor; border-radius: 2px; transition: transform .45s var(--leg-ease), top .45s var(--leg-ease), opacity .3s; }
.leg-nav__burger span:nth-child(1) { top: 17px; }
.leg-nav__burger span:nth-child(2) { top: 25px; }
.leg-nav.is-open .leg-nav__burger span:nth-child(1) { top: 21px; transform: rotate(45deg); }
.leg-nav.is-open .leg-nav__burger span:nth-child(2) { top: 21px; transform: rotate(-45deg); }

.leg-menu {
  position: fixed; inset: 0; z-index: 105; background: var(--leg-ink); color: #fff;
  padding: 96px 24px 32px; display: flex; flex-direction: column; gap: 6px;
  clip-path: circle(0 at calc(100% - 38px) 32px);
  transition: clip-path .8s var(--leg-ease-io);
  visibility: hidden;
}
.leg-menu.is-open { clip-path: circle(150% at calc(100% - 38px) 32px); visibility: visible; }
.leg-menu a {
  font-family: var(--leg-font-head); font-weight: 800; font-size: clamp(2rem, 9vw, 3rem); letter-spacing: -.04em;
  opacity: 0; transform: translateY(24px); transition: opacity .5s, transform .6s var(--leg-ease);
}
.leg-menu.is-open a { opacity: 1; transform: none; }
.leg-menu.is-open a:nth-child(2) { transition-delay: .05s; } .leg-menu.is-open a:nth-child(3) { transition-delay: .1s; }
.leg-menu.is-open a:nth-child(4) { transition-delay: .15s; } .leg-menu.is-open a:nth-child(5) { transition-delay: .2s; }
.leg-menu.is-open a:nth-child(6) { transition-delay: .25s; } .leg-menu.is-open a:nth-child(7) { transition-delay: .3s; }
.leg-menu .leg-btn { margin-top: auto; font-size: 17px; justify-content: center; }
.leg-nav.is-open { color: #fff; background: transparent; box-shadow: none; backdrop-filter: none; }
.leg-nav.is-open .leg-nav__logo img { filter: brightness(0) invert(1); }

/* ---------- Botones ---------- */
.leg-btn {
  --mx: 0px; --my: 0px;
  position: relative; display: inline-flex; align-items: center; gap: 10px;
  padding: 13px 24px; border-radius: 999px; border: 0; cursor: pointer;
  font: 600 15px/1 var(--leg-font-body); letter-spacing: -.01em;
  background: var(--leg-lime); color: var(--leg-ink);
  overflow: hidden; isolation: isolate;
  transform: translate(var(--mx), var(--my));
  transition: transform .35s var(--leg-ease), background .3s, color .3s, box-shadow .4s;
}
.leg-btn::before {
  content: ""; position: absolute; inset: 0; z-index: -1; border-radius: inherit;
  background: #fff; transform: translateY(101%); transition: transform .5s var(--leg-ease);
}
.leg-btn:hover::before { transform: none; }
.leg-btn:hover { box-shadow: 0 12px 30px -10px rgba(166, 206, 57, .7); }
.leg-btn svg { width: 16px; height: 16px; transition: transform .45s var(--leg-ease); }
.leg-btn:hover svg { transform: translateX(4px); }
.leg-btn--sm { padding: 9px 18px; font-size: 13.5px; }
.leg-btn--ghost { background: rgba(255, 255, 255, .12); color: #fff; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .35); backdrop-filter: blur(8px); }
.leg-btn--ghost::before { background: #fff; }
.leg-btn--ghost:hover { color: var(--leg-ink); box-shadow: none; }
.leg-btn--dark { background: var(--leg-ink); color: #fff; }
.leg-btn--dark::before { background: var(--leg-lime); }
.leg-btn--dark:hover { color: var(--leg-ink); }
.leg-nav.is-solid .leg-nav__portal { background: var(--leg-ink); color: #fff; }
.leg-nav.is-solid .leg-nav__portal::before { background: var(--leg-lime); }
.leg-nav.is-solid .leg-nav__portal:hover { color: var(--leg-ink); }
.leg-dot { position: relative; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.leg-dot::after, .leg-badge i::after, .leg-dash__live i::after { content: ""; position: absolute; inset: 0; border-radius: 50%; background: var(--leg-lime); animation: legPulse 2.4s var(--leg-ease) infinite; will-change: transform, opacity; }
@keyframes legPulse { 0% { transform: scale(1); opacity: .7; } 80%, 100% { transform: scale(3.2); opacity: 0; } }

.leg-link { display: inline-flex; align-items: center; gap: 6px; color: var(--leg-blue); font-weight: 600; }
.leg-link::after { content: "›"; font-size: 1.3em; line-height: 1; transition: transform .4s var(--leg-ease); }
.leg-link:hover::after { transform: translateX(5px); }
.leg-dark .leg-link, .leg-link--light { color: var(--leg-lime); }

/* ---------- Hero ---------- */
.leg-hero {
  position: relative; min-height: 100svh; color: #fff; overflow: hidden;
  display: flex; align-items: flex-end; background: var(--leg-ink);
}
.leg-hero--short { min-height: 78svh; }
.leg-hero__media { position: absolute; inset: -8% 0 0 0; z-index: 0; will-change: transform; }
.leg-hero__media img { width: 100%; height: 100%; object-fit: cover; will-change: transform; animation: legKen 22s var(--leg-ease-io) infinite alternate; }
@keyframes legKen { from { transform: scale(1.08); } to { transform: scale(1.22) translate(-2%, -1%); } }
.leg-hero::after {
  content: ""; position: absolute; inset: 0; z-index: 1;
  background:
    radial-gradient(120% 80% at 0% 100%, rgba(10,18,32,.92) 0%, rgba(10,18,32,.55) 45%, rgba(10,18,32,.15) 75%),
    linear-gradient(180deg, rgba(10,18,32,.7) 0%, rgba(10,18,32,.25) 14%, rgba(10,18,32,0) 30%);
}
.leg-hero__video { display: block; width: 100%; height: 100%; object-fit: cover; }
.leg-hero__content { position: relative; z-index: 3; padding-bottom: clamp(56px, 10vh, 120px); padding-top: 120px; }
.leg-eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: 13px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--leg-blue);
}
.leg-dark .leg-eyebrow, .leg-hero .leg-eyebrow, .leg-cta .leg-eyebrow, .leg-cta2 .leg-eyebrow, .leg-expand .leg-eyebrow { color: var(--leg-lime); }
.leg-eyebrow::before { content: ""; width: 28px; height: 2px; background: currentColor; border-radius: 2px; }
.leg-hero h1 { font-size: clamp(3rem, 9vw, 8.2rem); margin: 22px 0 26px; max-width: 12ch; }
.leg-hero--short h1 { font-size: clamp(2.8rem, 7.5vw, 6.4rem); max-width: 14ch; }
.leg-hero__lead { font-size: clamp(1.1rem, 1.7vw, 1.4rem); max-width: 40ch; color: rgba(255, 255, 255, .82); }
.leg-hero__cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 36px; }
.leg-hero__scroll {
  position: absolute; z-index: 3; right: 32px; bottom: 40px; width: 26px; height: 42px; border-radius: 14px;
  box-shadow: inset 0 0 0 2px rgba(255,255,255,.5);
}
.leg-hero__scroll::after { content: ""; position: absolute; left: 50%; top: 8px; width: 4px; height: 8px; margin-left: -2px; border-radius: 2px; background: #fff; animation: legScroll 1.8s infinite; }
@keyframes legScroll { 0% { opacity: 0; transform: translateY(0); } 30% { opacity: 1; } 100% { opacity: 0; transform: translateY(14px); } }

/* Palabras que entran */
.leg-split .leg-w { display: inline-block; overflow: hidden; vertical-align: top; padding: .14em .02em .26em; margin: -.14em -.02em -.26em; }
.leg-split .leg-w > span { display: inline-block; transform: translateY(110%) rotate(4deg); transition: transform 1.1s var(--leg-ease); transition-delay: calc(var(--i) * 70ms + var(--d, 0ms)); }
.leg-split.is-in .leg-w > span { transform: none; }
.leg-hl { color: var(--leg-lime); }

/* ---------- Secciones ---------- */
.leg-section { position: relative; padding: clamp(88px, 12vw, 160px) 0; }
.leg-paper { background: var(--leg-paper); }
.leg-dark { background: var(--leg-ink); color: #fff; }
.leg-dark .leg-muted { color: rgba(255, 255, 255, .62); }
.leg-muted { color: var(--leg-muted); }
.leg-head { max-width: 860px; margin-bottom: clamp(48px, 7vw, 88px); }
.leg-head--center { margin-inline: auto; text-align: center; }
.leg-head h2 { font-size: clamp(2.4rem, 5.6vw, 5rem); margin-top: 18px; }
.leg-head p { font-size: clamp(1.05rem, 1.5vw, 1.3rem); margin-top: 22px; }
.leg-head--center .leg-eyebrow::before { display: none; }

/* Reveal genérico */
.leg-js .leg-reveal { opacity: 0; transform: translateY(40px); transition: opacity 1s var(--leg-ease), transform 1.1s var(--leg-ease); transition-delay: calc(var(--i, 0) * 90ms); }
.leg-js .leg-reveal.is-in { opacity: 1; transform: none; }
.leg-js .leg-reveal--scale { transform: scale(.94); }
.leg-js .leg-reveal--left { transform: translateX(-50px); }

/* ---------- Manifiesto (texto que se ilumina al scrollear) ---------- */
.leg-manifesto { font-family: var(--leg-font-head); font-weight: 800; letter-spacing: -.035em; line-height: 1.12; font-size: clamp(2rem, 4.6vw, 4.1rem); max-width: 22ch; }
.leg-manifesto .leg-mw { color: rgba(29, 29, 31, .14); transition: color .35s; }
.leg-manifesto .leg-mw.is-lit { color: var(--leg-text); }
.leg-manifesto .leg-mw.is-lit.is-accent { color: var(--leg-blue); }
.leg-dark .leg-manifesto .leg-mw { color: rgba(255,255,255,.14); }
.leg-dark .leg-manifesto .leg-mw.is-lit { color: #fff; }
.leg-dark .leg-manifesto .leg-mw.is-lit.is-accent { color: var(--leg-lime); }

/* ---------- Tiles estilo Apple ---------- */
.leg-tiles { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.leg-tile {
  --sx: 50%; --sy: 50%;
  position: relative; min-height: clamp(460px, 52vw, 640px); border-radius: var(--leg-radius); overflow: hidden;
  color: #fff; display: flex; flex-direction: column; align-items: center; text-align: center; padding: 56px 32px;
  background: var(--leg-ink); isolation: isolate;
}
.leg-tile--wide { grid-column: span 2; min-height: clamp(480px, 46vw, 680px); }
.leg-tile__bg { position: absolute; inset: -48px 0; z-index: -2; }
.leg-tile__bg img { width: 100%; height: 100%; object-fit: cover; transform: scale(1.04); transition: transform 1.6s var(--leg-ease); }
.leg-tile:hover .leg-tile__bg img { transform: scale(1.12); }
.leg-tile::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(180deg, rgba(10,18,32,.78) 0%, rgba(10,18,32,.25) 45%, rgba(10,18,32,.55) 100%);
}
.leg-tile::after {
  content: ""; position: absolute; inset: 0; z-index: -1; opacity: 0; transition: opacity .5s;
  background: radial-gradient(500px circle at var(--sx) var(--sy), rgba(166,206,57,.28), transparent 45%);
}
.leg-tile:hover::after { opacity: 1; }
.leg-tile__tag { font-size: 13px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--leg-lime); }
.leg-tile h3 { font-size: clamp(2rem, 4vw, 3.4rem); margin: 12px 0 12px; }
.leg-tile p { text-shadow: 0 1px 12px rgba(10,18,32,.6); font-size: clamp(1rem, 1.4vw, 1.25rem); color: rgba(255,255,255,.85); max-width: 32ch; }
.leg-tile__actions { display: flex; gap: 22px; margin-top: 22px; flex-wrap: wrap; justify-content: center; }
.leg-tile--light { color: var(--leg-text); background: var(--leg-paper); }
.leg-tile--light::before { display: none; }
.leg-tile--light p { color: var(--leg-muted); }

/* ---------- Imagen que se expande (scroll) ---------- */
.leg-expand { position: relative; height: 150vh; }
.leg-expand__sticky { position: sticky; top: 0; height: 100vh; display: grid; place-items: center; overflow: hidden; }
.leg-expand__frame {
  --p: 0;
  position: absolute; inset: 0; overflow: hidden;
  border-radius: 40px; clip-path: inset(0 round 40px); isolation: isolate; transform: scale(calc(.52 + var(--p) * .48)); will-change: transform;
  transition: transform .5s var(--leg-ease), border-radius .5s var(--leg-ease);
}
.leg-expand__frame.is-full { border-radius: 0; clip-path: none; }
.leg-expand__frame img { width: 100%; height: 100%; object-fit: cover; transform: scale(calc(1.2 - var(--p) * .2)); will-change: transform; transition: transform .5s var(--leg-ease); }
.leg-expand__frame::after { content: ""; position: absolute; inset: 0; background: var(--leg-ink); opacity: calc(.2 + var(--p) * .45); will-change: opacity; transition: opacity .5s var(--leg-ease); }
.leg-expand__text { position: relative; z-index: 2; text-align: center; color: #fff; padding: 0 16px; opacity: calc(var(--t, 0)); transform: translateY(calc((1 - var(--t, 0)) * 40px)); will-change: transform, opacity; transition: opacity .5s var(--leg-ease), transform .6s var(--leg-ease); }
.leg-expand__text h2 { font-size: clamp(2.6rem, 7vw, 6.4rem); }
.leg-expand__text p { font-size: clamp(1.05rem, 1.6vw, 1.35rem); color: rgba(255,255,255,.85); max-width: 46ch; margin: 20px auto 0; }

/* ---------- Stats ---------- */
.leg-stats { display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1px solid var(--leg-line-dark); }
.leg-stat { padding: 40px 24px 8px 0; border-right: 1px solid var(--leg-line-dark); padding-left: 24px; }
.leg-stat:first-child { padding-left: 0; }
.leg-stat:last-child { border-right: 0; }
.leg-stat__n { font-family: var(--leg-font-head); font-weight: 800; letter-spacing: -.05em; font-size: clamp(3.4rem, 7vw, 6.4rem); line-height: 1; color: #fff; }
.leg-stat__l { margin-top: 14px; color: rgba(255,255,255,.66); font-size: 15px; }
.leg-paper .leg-stats, .leg-white .leg-stats { border-color: var(--leg-line); }
.leg-paper .leg-stat { border-color: var(--leg-line); }
.leg-paper .leg-stat__n { color: var(--leg-navy); }
.leg-paper .leg-stat__l { color: var(--leg-muted); }

/* ---------- Scroll horizontal fijado ---------- */
.leg-hscroll { position: relative; }
.leg-hscroll__sticky { position: sticky; top: 0; height: 100vh; overflow: hidden; display: flex; flex-direction: column; justify-content: center; }
.leg-hscroll__track { display: flex; gap: 20px; padding-left: max(16px, calc((100vw - var(--leg-max)) / 2)); will-change: transform; transition: transform .5s var(--leg-ease); }
.leg-step {
  flex: 0 0 min(440px, 82vw); min-height: 440px; border-radius: var(--leg-radius); padding: 40px;
  background: var(--leg-ink-2); color: #fff; display: flex; flex-direction: column; position: relative; overflow: hidden;
  box-shadow: inset 0 0 0 1px var(--leg-line-dark);
}
.leg-step__n { font-family: var(--leg-font-head); font-weight: 800; font-size: 120px; line-height: .8; letter-spacing: -.06em; color: transparent; -webkit-text-stroke: 1.5px rgba(166,206,57,.55); }
.leg-step h3 { font-size: 2rem; margin-top: auto; }
.leg-step p { margin-top: 14px; color: rgba(255,255,255,.7); }
.leg-step--img { padding: 0; }
.leg-step--img img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.leg-hscroll__bar { margin: 40px auto 0; width: min(var(--leg-max), calc(100% - 32px)); height: 2px; background: var(--leg-line-dark); border-radius: 2px; overflow: hidden; }
.leg-hscroll__bar span { display: block; height: 100%; width: 100%; background: var(--leg-lime); transform-origin: 0 50%; transform: scaleX(0); transition: transform .5s var(--leg-ease); }

/* ---------- Tarjetas genéricas ---------- */
.leg-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.leg-card {
  --sx: 50%; --sy: 50%;
  position: relative; border-radius: var(--leg-radius); padding: 36px; background: #fff; overflow: hidden;
  box-shadow: 0 0 0 1px var(--leg-line);
  transition: transform .6s var(--leg-ease), box-shadow .6s var(--leg-ease);
  transform-style: preserve-3d;
}
.leg-card::before {
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: 0; transition: opacity .4s;
  background: radial-gradient(420px circle at var(--sx) var(--sy), rgba(43,94,168,.10), transparent 45%);
}
.leg-card:hover { box-shadow: 0 30px 60px -30px rgba(10,18,32,.35), 0 0 0 1px var(--leg-line); }
.leg-card:hover::before { opacity: 1; }
.leg-dark .leg-card { background: var(--leg-ink-2); box-shadow: inset 0 0 0 1px var(--leg-line-dark); }
.leg-dark .leg-card::before { background: radial-gradient(420px circle at var(--sx) var(--sy), rgba(166,206,57,.16), transparent 45%); }
.leg-card__icon {
  width: 56px; height: 56px; border-radius: 16px; display: grid; place-items: center; margin-bottom: 28px;
  background: linear-gradient(135deg, var(--leg-navy), var(--leg-blue)); color: var(--leg-lime);
}
.leg-card__icon svg { width: 28px; height: 28px; }
.leg-card h3 { font-size: 1.6rem; letter-spacing: -.03em; }
.leg-card p { margin-top: 12px; color: var(--leg-muted); }
.leg-dark .leg-card p { color: rgba(255,255,255,.65); }
.leg-card .leg-link { margin-top: 22px; }

/* ---------- Marquesina de clientes ---------- */
.leg-marquee { overflow: hidden; mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent); -webkit-mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent); }
.leg-marquee__track { display: flex; gap: 20px; width: max-content; animation: legMarq 38s linear infinite; }
.leg-marquee:hover .leg-marquee__track { animation-play-state: paused; }
.leg-marquee__item { flex: 0 0 auto; width: 200px; height: 110px; border-radius: 20px; background: #fff; display: grid; place-items: center; padding: 18px 26px; box-shadow: 0 0 0 1px var(--leg-line); }
.leg-marquee__item img { max-height: 64px; width: auto; object-fit: contain; filter: grayscale(1); opacity: .7; transition: filter .4s, opacity .4s, transform .5s var(--leg-ease); }
.leg-marquee__item:hover img { filter: none; opacity: 1; transform: scale(1.08); }
@keyframes legMarq { to { transform: translateX(-50%); } }

/* ---------- Split (texto + imagen) ---------- */
.leg-split-row { display: grid; grid-template-columns: 1.05fr 1fr; gap: clamp(32px, 6vw, 96px); align-items: center; }
.leg-split-row + .leg-split-row { margin-top: clamp(96px, 12vw, 180px); }
.leg-split-row--rev .leg-split-row__media { order: -1; }
.leg-split-row__media { position: relative; border-radius: var(--leg-radius); overflow: hidden; aspect-ratio: 4 / 5; }
.leg-split-row__media img { width: 100%; height: 115%; object-fit: cover; will-change: transform; }
.leg-split-row__media .leg-badge { position: absolute; left: 20px; bottom: 20px; }
.leg-split-row h2 { font-size: clamp(2.2rem, 4.4vw, 3.8rem); margin: 18px 0 20px; }
.leg-split-row p { font-size: 1.15rem; color: var(--leg-muted); max-width: 46ch; }
.leg-dark .leg-split-row p { color: rgba(255,255,255,.7); }
.leg-num { font-family: var(--leg-font-head); font-weight: 800; color: var(--leg-blue); font-size: 15px; letter-spacing: .1em; }
.leg-checks { list-style: none; padding: 0; margin: 28px 0 32px; display: grid; gap: 12px; }
.leg-checks li { display: flex; gap: 12px; align-items: flex-start; }
.leg-checks li::before { content: ""; flex: 0 0 22px; height: 22px; margin-top: 2px; border-radius: 50%; background: var(--leg-lime) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230a1220' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12l5 5L20 7'/%3E%3C/svg%3E") center / 13px no-repeat; }
.leg-badge { display: inline-flex; align-items: center; gap: 8px; padding: 10px 16px; border-radius: 999px; background: rgba(255,255,255,.86); backdrop-filter: blur(10px); color: var(--leg-ink); font-size: 13px; font-weight: 600; }
.leg-badge i { position: relative; width: 8px; height: 8px; border-radius: 50%; background: var(--leg-lime); }

/* Sub-navegación de página (pills pegajosas) */
/* Sub-navegación: cápsula flotante tipo dock, con indicador que se desliza */
.leg-subnav { position: sticky; top: 108px; z-index: 50; height: 0; display: flex; justify-content: center; align-items: flex-start; pointer-events: none; transition: top .55s var(--leg-ease); }
.leg-nav.is-hidden ~ main .leg-subnav { top: 44px; }
.leg-subnav__in {
  --gx: 30%;
  pointer-events: auto; position: relative; isolation: isolate; display: flex; flex: 0 1 auto; gap: 2px; padding: 6px; margin-top: -30px;
  max-width: calc(100% - 32px); overflow-x: auto; scrollbar-width: none; border-radius: 999px;
  /* vidrio líquido: tinte muy leve + desenfoque y saturación fuertes */
  background: linear-gradient(180deg, rgba(255,255,255,.64) 0%, rgba(255,255,255,.4) 100%);
  backdrop-filter: blur(24px) saturate(210%) brightness(1.05);
  -webkit-backdrop-filter: blur(24px) saturate(210%) brightness(1.05);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.95),
    inset 0 -1px 0 rgba(255,255,255,.3),
    inset 0 0 12px rgba(255,255,255,.25),
    0 16px 36px -14px rgba(10,18,32,.38),
    0 2px 8px -2px rgba(10,18,32,.12);
}
/* reflejo especular que sigue al mouse */
.leg-subnav__in::before {
  content: ""; position: absolute; inset: 0; z-index: -1; border-radius: inherit; pointer-events: none;
  background: radial-gradient(120px 60px at var(--gx) 0%, rgba(255,255,255,.75), rgba(255,255,255,0) 70%);
  opacity: .8; transition: opacity .4s;
}
/* borde de luz: más brillante arriba, se desvanece abajo */
.leg-subnav__in::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit; padding: 1px; pointer-events: none;
  background: linear-gradient(180deg, rgba(255,255,255,.95), rgba(255,255,255,.15) 55%, rgba(255,255,255,.55));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
}
.leg-subnav__in::-webkit-scrollbar { display: none; }
.leg-subnav a { position: relative; z-index: 1; flex: 0 0 auto; display: inline-flex; align-items: center; gap: 8px; padding: 10px 18px; border-radius: 999px; font-size: 14px; font-weight: 500; color: rgba(29,29,31,.72); white-space: nowrap; text-shadow: 0 1px 0 rgba(255,255,255,.5); transition: color .45s var(--leg-ease); }
.leg-subnav a i { font-style: normal; font-size: 11px; font-weight: 700; letter-spacing: .04em; color: var(--leg-blue); opacity: .8; transition: color .45s var(--leg-ease), opacity .45s; }
.leg-subnav a:hover { color: var(--leg-text); }
.leg-subnav a.is-active { color: var(--leg-ink); font-weight: 600; }
.leg-subnav a.is-active i { color: #6f9a12; opacity: 1; }
/* pastilla activa: vidrio blanco brillante, como el selector segmentado de iOS */
.leg-subnav__ink {
  /* ocupa toda la cápsula y se recorta a la opción activa: se anima el recorte (solo pintura), no el ancho */
  position: absolute; z-index: 0; top: 6px; bottom: 6px; left: 0; border-radius: 999px; opacity: 0;
  background: linear-gradient(180deg, rgba(255,255,255,.98), rgba(255,255,255,.8));
  box-shadow: inset 0 1px 0 #fff, inset 0 -1px 0 rgba(10,18,32,.08), inset 0 0 0 .5px rgba(10,18,32,.08);
  clip-path: inset(0 100% 0 0 round 999px);
  transition: clip-path .6s var(--leg-ease), opacity .3s;
}
.leg-subnav__ink.is-on { opacity: 1; }
@media (max-width: 520px) { .leg-subnav a { padding: 9px 13px; font-size: 13px; } .leg-subnav a i { display: none; } }

/* ---------- Dashboard mock (servicios digitales) ---------- */
.leg-dash { border-radius: var(--leg-radius); background: linear-gradient(160deg, #13203a, #0a1220); box-shadow: inset 0 0 0 1px var(--leg-line-dark), 0 60px 120px -40px rgba(43,94,168,.55); padding: 28px; color: #fff; }
.leg-dash__top { display: flex; justify-content: space-between; align-items: center; font-size: 13px; color: rgba(255,255,255,.6); }
.leg-dash__live { display: inline-flex; align-items: center; gap: 8px; color: var(--leg-lime); font-weight: 600; letter-spacing: .08em; }
.leg-dash__live i { position: relative; width: 8px; height: 8px; border-radius: 50%; background: var(--leg-lime); }
.leg-dash__big { font-family: var(--leg-font-head); font-weight: 800; font-size: clamp(2.4rem, 5vw, 3.6rem); letter-spacing: -.04em; margin-top: 18px; }
.leg-dash svg.leg-chart { width: 100%; height: auto; margin-top: 18px; overflow: visible; }
.leg-chart .line { fill: none; stroke: var(--leg-lime); stroke-width: 3; stroke-linecap: round; stroke-dasharray: 1400; stroke-dashoffset: 1400; transition: stroke-dashoffset 2.4s var(--leg-ease); }
.leg-chart .area { fill: url(#legGrad); opacity: 0; transition: opacity 1.4s .9s; }
.leg-chart .grid line { stroke: rgba(255,255,255,.08); }
.leg-chart.is-static .line, .is-in .leg-chart .line { stroke-dashoffset: 0; }
.is-in .leg-chart .area { opacity: 1; }
.leg-dash__row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-top: 22px; }
.leg-dash__kpi { border-radius: 16px; background: rgba(255,255,255,.05); padding: 16px; }
.leg-dash__kpi b { display: block; font-family: var(--leg-font-head); font-size: 1.35rem; letter-spacing: -.02em; }
.leg-dash__kpi span { font-size: 12.5px; color: rgba(255,255,255,.55); }

/* ---------- Formularios ---------- */
.leg-form { display: grid; gap: 16px; }
.leg-form__row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.leg-field { position: relative; }
.leg-field input, .leg-field select, .leg-field textarea {
  width: 100%; font: inherit; font-size: 16px; color: var(--leg-text);
  padding: 26px 18px 10px; border-radius: 14px; border: 1px solid rgba(0,0,0,.14); background: #fff;
  transition: border-color .3s, box-shadow .3s; appearance: none;
}
.leg-field textarea { min-height: 140px; resize: vertical; }
.leg-field select { background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236e6e73' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") right 16px center / 18px no-repeat; padding-right: 44px; }
.leg-field label { position: absolute; left: 19px; top: 18px; font-size: 16px; color: var(--leg-muted); pointer-events: none; transform-origin: 0 0; transition: transform .3s var(--leg-ease), color .3s; }
.leg-field input:focus, .leg-field select:focus, .leg-field textarea:focus { outline: none; border-color: var(--leg-blue); box-shadow: 0 0 0 4px rgba(43,94,168,.15); }
.leg-field input:focus + label, .leg-field input:not(:placeholder-shown) + label,
.leg-field textarea:focus + label, .leg-field textarea:not(:placeholder-shown) + label,
.leg-field select + label { transform: translateY(-10px) scale(.74); }
.leg-field input:focus + label, .leg-field textarea:focus + label { color: var(--leg-blue); }
.leg-field.is-error input, .leg-field.is-error textarea { border-color: #d64545; animation: legShake .4s; }
@keyframes legShake { 25% { transform: translateX(-6px); } 75% { transform: translateX(6px); } }
.leg-form__note { font-size: 13px; color: var(--leg-muted); }
.leg-form__ok { display: none; align-items: center; gap: 12px; padding: 18px 20px; border-radius: 14px; background: rgba(166,206,57,.18); color: var(--leg-ink); font-weight: 600; }
.leg-form__err { display: none; padding: 14px 18px; border-radius: 14px; background: rgba(214,69,69,.1); color: #a52a2a; font-weight: 500; }
.leg-form.is-failed .leg-form__err { display: block; }
.leg-form__off { display: none; padding: 16px 20px; border-radius: 14px; background: rgba(43,94,168,.08); color: var(--leg-text); }
.leg-form__off a { color: var(--leg-blue); font-weight: 600; }
.leg-form.is-offline .leg-form__off { display: block; animation: legPop .6s var(--leg-ease); }
.leg-form.is-sent .leg-form__ok { display: flex; animation: legPop .6s var(--leg-ease); }
@keyframes legPop { from { opacity: 0; transform: scale(.95); } }
.leg-dark .leg-field input, .leg-dark .leg-field select, .leg-dark .leg-field textarea { background-color: rgba(255,255,255,.05); border-color: rgba(255,255,255,.16); color: #fff; }
.leg-dark .leg-field select option { color: var(--leg-text); }
.leg-dark .leg-field label { color: rgba(255,255,255,.55); }
.leg-dark .leg-form__note { color: rgba(255,255,255,.5); }
.leg-dark .leg-form__ok { color: #fff; }

/* Cotizador por pasos */
.leg-quote { border-radius: var(--leg-radius); background: #fff; box-shadow: 0 0 0 1px var(--leg-line), 0 40px 80px -50px rgba(10,18,32,.4); padding: clamp(24px, 4vw, 48px); }
.leg-steps { display: flex; gap: 8px; margin-bottom: 36px; }
.leg-steps__i { flex: 1; }
.leg-steps__bar { height: 4px; border-radius: 4px; background: var(--leg-line); overflow: hidden; }
.leg-steps__bar span { display: block; height: 100%; background: linear-gradient(90deg, var(--leg-blue), var(--leg-lime)); transform: scaleX(0); transform-origin: 0 50%; transition: transform .7s var(--leg-ease); }
.leg-steps__i.is-done .leg-steps__bar span, .leg-steps__i.is-current .leg-steps__bar span { transform: scaleX(1); }
.leg-steps__t { font-size: 13px; margin-top: 10px; color: var(--leg-muted); font-weight: 500; }
.leg-steps__i.is-current .leg-steps__t { color: var(--leg-text); }
.leg-pane { display: none; }
.leg-pane.is-active { display: grid; gap: 16px; animation: legPane .7s var(--leg-ease); }
@keyframes legPane { from { opacity: 0; transform: translateX(30px); } }
.leg-months { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.leg-months .leg-field input { padding: 24px 12px 8px; }
.leg-months .leg-field label { left: 13px; font-size: 14px; top: 16px; }
.leg-quote__total { display: flex; justify-content: space-between; align-items: baseline; padding: 18px 20px; border-radius: 14px; background: var(--leg-paper); }
.leg-quote__total b { font-family: var(--leg-font-head); font-size: 1.8rem; letter-spacing: -.03em; }
.leg-quote__nav { display: flex; justify-content: space-between; gap: 12px; margin-top: 8px; }
.leg-seg { display: flex; gap: 8px; flex-wrap: wrap; }
.leg-seg input { position: absolute; opacity: 0; pointer-events: none; }
.leg-seg label { padding: 12px 20px; border-radius: 999px; box-shadow: inset 0 0 0 1px rgba(0,0,0,.16); cursor: pointer; font-weight: 500; transition: background .3s, color .3s, box-shadow .3s; }
.leg-seg input:checked + label { background: var(--leg-ink); color: #fff; box-shadow: none; }
.leg-seg input:focus-visible + label { outline: 3px solid var(--leg-lime); outline-offset: 2px; }

/* ---------- Equipo ---------- */
.leg-team { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.leg-person { border-radius: var(--leg-radius-sm); background: #fff; box-shadow: 0 0 0 1px var(--leg-line); padding: 28px; transition: transform .6s var(--leg-ease), box-shadow .6s; }
.leg-person:hover { transform: translateY(-6px); box-shadow: 0 30px 50px -30px rgba(10,18,32,.35), 0 0 0 1px var(--leg-line); }
.leg-avatar { width: 108px; height: 108px; border-radius: 50%; display: grid; place-items: center; font-family: var(--leg-font-head); font-weight: 800; font-size: 20px; color: #fff; background: linear-gradient(135deg, var(--leg-navy), var(--leg-blue)); margin-bottom: 24px; position: relative; }
.leg-avatar::after { content: ""; position: absolute; inset: -6px; border-radius: 50%; border: 3px solid var(--leg-lime); border-right-color: transparent; border-bottom-color: transparent; transform: rotate(-45deg); transition: transform .8s var(--leg-ease); }
.leg-person:hover .leg-avatar::after { transform: rotate(315deg); }
.leg-person h3 { font-size: 1.25rem; letter-spacing: -.02em; }
.leg-person__role { color: var(--leg-blue); font-weight: 600; font-size: 14px; margin-top: 4px; }
.leg-person a { display: inline-block; margin-top: 14px; font-size: 14px; color: var(--leg-muted); word-break: break-all; transition: color .3s; }
.leg-person a:hover { color: var(--leg-blue); }
.leg-leader { display: grid; grid-template-columns: 280px 1fr; gap: clamp(28px, 5vw, 72px); padding: clamp(32px, 4vw, 56px) 0; border-top: 1px solid var(--leg-line); }
.leg-leader:last-child { border-bottom: 1px solid var(--leg-line); }
.leg-leader .leg-avatar { width: 148px; height: 148px; font-size: 30px; }
.leg-leader h3 { font-size: clamp(1.8rem, 3vw, 2.6rem); }
.leg-leader p { font-size: 1.1rem; color: var(--leg-muted); }
.leg-leader p + p { margin-top: 14px; }
.leg-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 22px; }
.leg-tags span { padding: 7px 14px; border-radius: 999px; background: var(--leg-paper); font-size: 13.5px; font-weight: 500; }

/* ---------- Noticias ---------- */
.leg-filters { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 36px; }
.leg-filters button { font: inherit; font-size: 14px; font-weight: 500; padding: 10px 18px; border-radius: 999px; border: 0; cursor: pointer; background: #fff; box-shadow: inset 0 0 0 1px var(--leg-line); color: var(--leg-muted); transition: background .3s, color .3s; }
.leg-filters button.is-active { background: var(--leg-ink); color: #fff; box-shadow: none; }
.leg-news { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.leg-news--feature { grid-template-columns: 1.4fr 1fr; }
.leg-news--4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 1080px) { .leg-news--4 { grid-template-columns: repeat(2, 1fr); } }
.leg-post { position: relative; border-radius: var(--leg-radius); overflow: hidden; background: #fff; box-shadow: 0 0 0 1px var(--leg-line); display: flex; flex-direction: column; transition: transform .6s var(--leg-ease), box-shadow .6s, opacity .4s; }
.leg-post:hover { transform: translateY(-8px); box-shadow: 0 40px 60px -40px rgba(10,18,32,.45), 0 0 0 1px var(--leg-line); }
.leg-post.is-hidden { display: none; }
.leg-post__img { aspect-ratio: 16 / 10; overflow: hidden; }
.leg-post__img img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s var(--leg-ease); }
.leg-post:hover .leg-post__img img { transform: scale(1.08); }
.leg-post__body { padding: 28px; display: flex; flex-direction: column; gap: 12px; flex: 1; }
.leg-post__meta { font-size: 12.5px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--leg-blue); }
.leg-post h3 { font-size: 1.45rem; letter-spacing: -.025em; line-height: 1.15; }
.leg-post .leg-link { margin-top: auto; padding-top: 8px; }
.leg-post a.leg-post__cover { position: absolute; inset: 0; z-index: 1; }
.leg-post--big .leg-post__img { aspect-ratio: auto; flex: 1; min-height: 320px; }
.leg-post--big h3 { font-size: clamp(1.8rem, 3vw, 2.4rem); }

/* ---------- Contacto ---------- */
.leg-contact { display: grid; grid-template-columns: 1fr 1.15fr; gap: clamp(32px, 6vw, 96px); align-items: start; }
.leg-contact__list { display: grid; gap: 0; margin-top: 40px; }
.leg-contact__item { display: flex; gap: 18px; padding: 22px 0; border-top: 1px solid var(--leg-line); align-items: flex-start; }
.leg-dark .leg-contact__item { border-color: var(--leg-line-dark); }
.leg-contact__item svg { flex: 0 0 24px; height: 24px; color: var(--leg-lime); margin-top: 2px; }
.leg-contact__item small { display: block; font-size: 13px; color: var(--leg-muted); }
.leg-dark .leg-contact__item small { color: rgba(255,255,255,.55); }
.leg-contact__item a, .leg-contact__item span { font-size: 1.1rem; font-weight: 500; }
.leg-map { border-radius: var(--leg-radius); overflow: hidden; aspect-ratio: 21 / 9; box-shadow: 0 0 0 1px var(--leg-line); }
.leg-map iframe { width: 100%; height: 100%; border: 0; filter: grayscale(.4) contrast(1.05); }

/* ---------- CTA final ---------- */
.leg-cta { position: relative; overflow: hidden; border-radius: calc(var(--leg-radius) + 8px); padding: clamp(56px, 8vw, 120px) clamp(28px, 6vw, 96px); background: var(--leg-navy); color: #fff; isolation: isolate; }
.leg-cta::before { content: ""; position: absolute; width: 1000px; height: 1000px; right: -380px; top: -460px; z-index: -1; background: radial-gradient(closest-side at 38% 42%, rgba(166,206,57,.55), transparent), radial-gradient(closest-side at 64% 60%, rgba(43,94,168,.75), transparent); animation: legSpin 18s linear infinite; will-change: transform; }
@keyframes legSpin { to { transform: rotate(360deg); } }
.leg-cta h2 { font-size: clamp(2.4rem, 6vw, 5.2rem); max-width: 14ch; }
.leg-cta p { margin-top: 20px; font-size: 1.2rem; color: rgba(255,255,255,.8); max-width: 44ch; }
.leg-cta .leg-hero__cta { margin-top: 36px; }

/* ---------- Footer ---------- */
.leg-footer { background: var(--leg-ink); color: rgba(255,255,255,.7); padding: 96px 0 40px; overflow: hidden; }
.leg-footer__grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1.2fr; gap: 40px; }
.leg-footer__brand img { height: 36px; width: auto; filter: brightness(0) invert(1); }
.leg-footer__brand p { margin-top: 20px; max-width: 30ch; }
.leg-footer h4 { font-size: 13px; letter-spacing: .12em; text-transform: uppercase; color: #fff; font-weight: 700; margin-bottom: 18px; font-family: var(--leg-font-body); }
.leg-footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; font-size: 15px; }
.leg-footer a { transition: color .3s; }
.leg-footer a:hover { color: var(--leg-lime); }
.leg-footer__giant { font-family: var(--leg-font-head); font-weight: 800; letter-spacing: -.06em; line-height: .8; font-size: clamp(3.4rem, 15.5vw, 14.5rem); margin-top: 80px; padding-bottom: .06em; white-space: nowrap; color: rgba(255,255,255,.07); user-select: none; }
.leg-footer__bottom { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding-top: 28px; border-top: 1px solid var(--leg-line-dark); font-size: 13.5px; }

/* ---------- Maqueta del portal de clientes ---------- */
.leg-app { position: relative; border-radius: 22px; background: #fff; color: var(--leg-text); box-shadow: 0 0 0 1px rgba(0,0,0,.08), 0 50px 100px -40px rgba(10,18,32,.45), 0 30px 60px -30px rgba(43,94,168,.35); overflow: visible; font-size: 14px; }
.leg-dark .leg-app { box-shadow: 0 0 0 1px rgba(255,255,255,.12), 0 60px 120px -40px rgba(0,0,0,.7), 0 0 90px -30px rgba(166,206,57,.35); }
.leg-app__bar { display: flex; align-items: center; gap: 7px; padding: 12px 16px; border-bottom: 1px solid var(--leg-line); background: #f7f7f9; border-radius: 22px 22px 0 0; }
.leg-app__bar i { width: 11px; height: 11px; border-radius: 50%; background: #e2e2e7; }
.leg-app__bar i:nth-child(1) { background: #ff5f57; } .leg-app__bar i:nth-child(2) { background: #febc2e; } .leg-app__bar i:nth-child(3) { background: #28c840; }
.leg-app__url { margin: 0 auto; display: inline-flex; align-items: center; gap: 6px; padding: 5px 14px; border-radius: 8px; background: #fff; box-shadow: 0 0 0 1px var(--leg-line); font-size: 12px; color: var(--leg-muted); }
.leg-app__url svg { width: 11px; height: 11px; }
.leg-app__body { display: grid; grid-template-columns: 168px 1fr; min-height: 400px; }
.leg-app__side { padding: 18px 12px; border-right: 1px solid var(--leg-line); display: flex; flex-direction: column; gap: 4px; background: #fbfbfc; border-radius: 0 0 0 22px; }
.leg-app__brand { display: flex; align-items: center; gap: 8px; padding: 0 8px 16px; font-family: var(--leg-font-head); font-weight: 800; font-size: 13px; letter-spacing: -.02em; }
.leg-app__brand img { width: 24px; height: 24px; }
.leg-app__side button { all: unset; box-sizing: border-box; display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 10px; cursor: pointer; color: var(--leg-muted); font-weight: 500; font-size: 13px; transition: background .3s, color .3s; position: relative; }
.leg-app__side button svg { width: 17px; height: 17px; flex: 0 0 17px; }
.leg-app__side button:hover { background: rgba(0,0,0,.04); color: var(--leg-text); }
.leg-app__side button.is-active { background: var(--leg-ink); color: #fff; }
.leg-app__side button:focus-visible { outline: 3px solid var(--leg-lime); outline-offset: 2px; }
.leg-app__side button b { margin-left: auto; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: #f5a524; color: #fff; font-size: 11px; display: grid; place-items: center; }
.leg-app__timer { margin-top: auto; height: 3px; border-radius: 3px; background: var(--leg-line); overflow: hidden; }
.leg-app__timer span { display: block; height: 100%; background: var(--leg-lime); transform-origin: 0 50%; transform: scaleX(0); }
.leg-app.is-cycling .leg-app__timer span { animation: legTimer 5s linear infinite; }
@keyframes legTimer { to { transform: scaleX(1); } }
.leg-app__main { padding: 20px 22px 22px; min-width: 0; }
.leg-app__head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 18px; }
.leg-app__head small { display: block; color: var(--leg-muted); font-size: 12px; }
.leg-app__head strong { display: block; font-family: var(--leg-font-head); font-size: 20px; letter-spacing: -.03em; margin-top: 2px; }
.leg-app__demo { flex: 0 0 auto; font-size: 11px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--leg-blue); background: rgba(43,94,168,.08); padding: 5px 10px; border-radius: 999px; }
.leg-app__pane { display: none; }
.leg-app__pane.is-active { display: block; animation: legPane .6s var(--leg-ease); }
.leg-kpis { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.leg-kpi { border-radius: 14px; padding: 12px 14px; background: var(--leg-paper); min-width: 0; }
.leg-split-row:has(.leg-app) { grid-template-columns: .82fr 1.18fr; }
.leg-kpi small { display: block; font-size: 11.5px; color: var(--leg-muted); }
.leg-kpi b { display: block; font-family: var(--leg-font-head); font-size: 22px; letter-spacing: -.03em; margin-top: 4px; line-height: 1.1; }
.leg-kpi b em { font-style: normal; font-size: 12px; color: var(--leg-muted); font-weight: 600; margin-left: 3px; letter-spacing: 0; }
.leg-kpi i { display: inline-block; margin-top: 4px; font-style: normal; font-size: 11.5px; font-weight: 600; color: #3f8f2f; }
.leg-kpi i.is-warn { color: #c77700; }
.leg-bars { margin-top: 16px; border-radius: 14px; box-shadow: inset 0 0 0 1px var(--leg-line); padding: 14px 14px 10px; }
.leg-bars__t { display: flex; justify-content: space-between; font-size: 12px; color: var(--leg-muted); margin-bottom: 10px; }
.leg-bars__t b { color: var(--leg-text); font-weight: 600; }
.leg-bars__g { display: grid; grid-template-columns: repeat(9, 1fr); gap: 8px; align-items: end; height: 130px; }
.leg-bars__c { display: flex; flex-direction: column; align-items: center; gap: 6px; height: 100%; justify-content: flex-end; }
.leg-bars__c span { width: 100%; border-radius: 6px 6px 3px 3px; background: linear-gradient(180deg, #8fb0de, var(--leg-blue)); height: var(--h); transform-origin: 50% 100%; transform: scaleY(0); transition: transform .9s var(--leg-ease); transition-delay: calc(var(--k) * 60ms); }
.leg-bars__c.is-now span { background: linear-gradient(180deg, var(--leg-lime-2), var(--leg-lime)); }
.leg-bars__c small { font-size: 10.5px; color: var(--leg-muted); }
.leg-app__pane.is-shown .leg-bars__c span { transform: none; }
.leg-mix { margin-top: 16px; border-radius: 14px; box-shadow: inset 0 0 0 1px var(--leg-line); padding: 16px; }
.leg-mix__bar { display: flex; height: 16px; border-radius: 8px; overflow: hidden; background: var(--leg-paper); margin: 10px 0 14px; }
.leg-mix__bar span { width: var(--w); transform-origin: 0 50%; transform: scaleX(0); transition: transform 1s var(--leg-ease); }
.leg-app__pane.is-shown .leg-mix__bar span { transform: none; }
.leg-mix__bar span:nth-child(2) { transition-delay: .12s; } .leg-mix__bar span:nth-child(3) { transition-delay: .24s; }
.leg-mix__leg { display: grid; gap: 8px; }
.leg-mix__leg div { display: flex; align-items: center; gap: 8px; font-size: 13px; }
.leg-mix__leg i { width: 10px; height: 10px; border-radius: 3px; }
.leg-mix__leg b { margin-left: auto; font-family: var(--leg-font-head); }
.leg-rows { display: grid; gap: 8px; }
.leg-row { display: grid; grid-template-columns: 34px 1fr auto; gap: 12px; align-items: center; padding: 10px 12px; border-radius: 12px; box-shadow: inset 0 0 0 1px var(--leg-line); opacity: 0; transform: translateY(10px); transition: opacity .5s, transform .6s var(--leg-ease); transition-delay: calc(var(--k) * 90ms); }
.leg-app__pane.is-shown .leg-row { opacity: 1; transform: none; }
.leg-row__ic { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: var(--leg-paper); color: var(--leg-navy); }
.leg-row__ic svg { width: 17px; height: 17px; }
.leg-row strong { display: block; font-size: 13.5px; }
.leg-row small { display: block; font-size: 12px; color: var(--leg-muted); }
.leg-chip { font-size: 11.5px; font-weight: 600; padding: 5px 10px; border-radius: 999px; white-space: nowrap; }
.leg-chip--ok { background: rgba(63,143,47,.1); color: #3f8f2f; }
.leg-chip--warn { background: rgba(245,165,36,.14); color: #b36b00; }
.leg-chip--info { background: rgba(43,94,168,.1); color: var(--leg-blue); }
.leg-app__toast { position: absolute; right: -22px; bottom: 34px; display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-radius: 16px; background: rgba(255,255,255,.94); box-shadow: 0 20px 40px -18px rgba(10,18,32,.45), 0 0 0 1px var(--leg-line); font-size: 13px; color: var(--leg-text); opacity: 0; transform: translateY(16px) scale(.96); transition: opacity .5s, transform .7s var(--leg-ease); pointer-events: none; }
.leg-app__toast.is-on { opacity: 1; transform: none; }
.leg-app__toast i { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: var(--leg-lime); color: var(--leg-ink); font-style: normal; font-weight: 800; }
.leg-app__toast small { display: block; color: var(--leg-muted); font-size: 11.5px; }
.leg-feats { list-style: none; padding: 0; margin: 28px 0 32px; display: grid; gap: 16px; }
.leg-feats li { display: grid; grid-template-columns: 44px 1fr; gap: 14px; align-items: start; }
.leg-feats li > span { width: 44px; height: 44px; border-radius: 13px; display: grid; place-items: center; background: linear-gradient(135deg, var(--leg-navy), var(--leg-blue)); color: var(--leg-lime); }
.leg-feats li > span svg { width: 22px; height: 22px; }
.leg-feats b { display: block; font-size: 1.05rem; }
.leg-feats small { display: block; color: var(--leg-muted); font-size: .95rem; margin-top: 2px; }
.leg-dark .leg-feats small { color: rgba(255,255,255,.62); }

/* ---------- CTA final: foto + panel para arrancar la consulta ---------- */
.leg-cta2 { position: relative; overflow: hidden; border-radius: calc(var(--leg-radius) + 8px); color: #fff; isolation: isolate; display: grid; grid-template-columns: 1.05fr 1fr; gap: clamp(28px, 5vw, 72px); align-items: center; padding: clamp(40px, 6vw, 88px); min-height: 620px; background: var(--leg-ink); }
.leg-cta2__bg { position: absolute; inset: 0; z-index: -2; overflow: hidden; }
.leg-cta2__bg img { width: 100%; height: 100%; object-fit: cover; transform: scale(1.12); transition: transform 2.4s var(--leg-ease); }
.leg-cta2.is-in .leg-cta2__bg img { transform: scale(1.02); }
.leg-cta2::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(100deg, rgba(10,18,32,.92) 0%, rgba(10,18,32,.72) 45%, rgba(29,52,97,.45) 100%); }
.leg-cta2 h2 { font-size: clamp(2.6rem, 5.6vw, 5rem); margin-top: 18px; }
.leg-cta2 > div > p { margin-top: 20px; font-size: 1.15rem; color: rgba(255,255,255,.82); max-width: 40ch; }
.leg-cta2__direct { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 32px; }
.leg-cta2__direct a, .leg-cta2__direct span { display: inline-flex; align-items: center; gap: 8px; padding: 10px 16px; border-radius: 999px; background: rgba(255,255,255,.1); box-shadow: inset 0 0 0 1px rgba(255,255,255,.2); font-size: 14px; font-weight: 500; transition: background .3s, color .3s; }
.leg-cta2__direct a:hover { background: var(--leg-lime); color: var(--leg-ink); }
.leg-cta2__direct svg { width: 16px; height: 16px; }
.leg-cta2__panel { border-radius: 24px; padding: clamp(24px, 3vw, 36px); background: rgba(255,255,255,.1); box-shadow: inset 0 0 0 1px rgba(255,255,255,.22), 0 40px 80px -40px rgba(0,0,0,.6); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); }
.leg-cta2__panel h3 { font-size: 1.5rem; letter-spacing: -.03em; }
.leg-cta2__panel > p { margin-top: 6px; color: rgba(255,255,255,.7); font-size: .95rem; }
.leg-cta2__chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 20px 0 22px; }
.leg-cta2__chips button { all: unset; box-sizing: border-box; cursor: pointer; display: inline-flex; align-items: center; gap: 8px; padding: 10px 15px; border-radius: 999px; font-size: 14px; font-weight: 500; background: rgba(255,255,255,.08); box-shadow: inset 0 0 0 1px rgba(255,255,255,.28); transition: background .3s, color .3s, box-shadow .3s, transform .3s var(--leg-ease); }
.leg-cta2__chips button::before { content: "+"; font-weight: 700; width: 12px; text-align: center; transition: transform .35s var(--leg-ease); }
.leg-cta2__chips button:hover { background: rgba(255,255,255,.16); }
.leg-cta2__chips button[aria-pressed="true"] { background: var(--leg-lime); color: var(--leg-ink); box-shadow: none; }
.leg-cta2__chips button[aria-pressed="true"]::before { content: "✓"; }
.leg-cta2__chips button:active { transform: scale(.96); }
.leg-cta2__chips button:focus-visible { outline: 3px solid var(--leg-lime); outline-offset: 2px; }
.leg-cta2__go { display: flex; gap: 10px; }
.leg-cta2__go input { flex: 1; min-width: 0; font: inherit; font-size: 15px; color: #fff; padding: 14px 18px; border-radius: 999px; border: 0; background: rgba(255,255,255,.12); box-shadow: inset 0 0 0 1px rgba(255,255,255,.3); transition: box-shadow .3s; }
.leg-cta2__go input::placeholder { color: rgba(255,255,255,.6); }
.leg-cta2__go input:focus { outline: none; box-shadow: inset 0 0 0 2px var(--leg-lime); }
.leg-cta2__go.is-error input { box-shadow: inset 0 0 0 2px #ff6b6b; animation: legShake .4s; }
.leg-cta2__note { margin-top: 12px; font-size: 12.5px; color: rgba(255,255,255,.6); }
.leg-cta2__count { color: var(--leg-lime); font-weight: 600; }

@media (max-width: 860px) {
  .leg-cta2 { grid-template-columns: 1fr; min-height: 0; }
  .leg-app__body { grid-template-columns: 1fr; }
  .leg-app__side { flex-direction: row; overflow-x: auto; border-right: 0; border-bottom: 1px solid var(--leg-line); border-radius: 0; padding: 10px; }
  .leg-app__brand, .leg-app__timer { display: none; }
  .leg-app__side button { flex: 0 0 auto; }
  .leg-app__toast { right: 12px; bottom: -18px; }
}
@media (max-width: 520px) {
  .leg-app__side { justify-content: space-between; gap: 2px; scrollbar-width: none; }
  .leg-app__side::-webkit-scrollbar { display: none; }
  .leg-app__side button { padding: 8px 10px; font-size: 12.5px; gap: 6px; }
  .leg-app__side button svg { display: none; }
  .leg-app__main { padding: 16px; }
  .leg-bars__g { gap: 5px; }
  .leg-bars__c small { font-size: 0; }
  .leg-bars__c small::after { content: attr(data-s); font-size: 10.5px; }
  .leg-app__toast { left: 12px; right: 12px; bottom: -34px; }
  .leg-kpis { grid-template-columns: 1fr 1fr; }
  .leg-kpis .leg-kpi:nth-child(3) { display: none; }
  .leg-cta2__go { flex-direction: column; }
  .leg-cta2 { padding: 36px 20px; border-radius: 26px; }
  .leg-cta2__panel { padding: 22px 18px; }
  .leg-cta2__chips button { padding: 9px 13px; font-size: 13.5px; }
}

/* Fotos del equipo (dentro del círculo del avatar) */
.leg-avatar--photo { background: var(--leg-paper); }
.leg-avatar--photo img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; transition: transform .8s var(--leg-ease); }
.leg-person:hover .leg-avatar--photo img, .leg-leader:hover .leg-avatar--photo img { transform: scale(1.08); }
.leg-avatar--photo { overflow: visible; }
.leg-avatar--photo img { clip-path: circle(50%); }

/* ---------- Responsive ---------- */
@media (max-width: 1080px) {
  .leg-nav__links, .leg-nav__portal { display: none; }
  .leg-nav__burger { display: block; }
  .leg-team { grid-template-columns: repeat(2, 1fr); }
  .leg-footer__grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 860px) {
  .leg-split-row:has(.leg-app) { grid-template-columns: 1fr; }
  body.leg { font-size: 16px; }
  .leg-tiles, .leg-cards, .leg-news, .leg-news--feature, .leg-split-row, .leg-contact, .leg-leader { grid-template-columns: 1fr; }
  .leg-tile--wide { grid-column: auto; }
  .leg-split-row--rev .leg-split-row__media { order: 0; }
  .leg-split-row__media { aspect-ratio: 4 / 3; }
  .leg-stats { grid-template-columns: 1fr 1fr; }
  .leg-stat { border-right: 0; padding-left: 0; border-bottom: 1px solid var(--leg-line-dark); padding-bottom: 28px; }
  .leg-paper .leg-stat { border-color: var(--leg-line); }
  .leg-form__row { grid-template-columns: 1fr; }
  .leg-months { grid-template-columns: repeat(3, 1fr); }
  .leg-hero__scroll { display: none; }
  .leg-dash__row { grid-template-columns: 1fr 1fr; }
  .leg-map { aspect-ratio: 4 / 3; }
}
@media (max-width: 520px) {
  .leg-footer__grid { grid-template-columns: 1fr; }
  .leg-team { grid-template-columns: 1fr; }
  .leg-months { grid-template-columns: repeat(2, 1fr); }
  .leg-tile { padding: 44px 22px; }
}

/* ---------- Sin movimiento ---------- */
@media (prefers-reduced-motion: reduce) {
  .leg *, .leg *::before, .leg *::after { animation: none !important; transition-duration: .01ms !important; transition-delay: 0s !important; }
  .leg-reveal, .leg-split .leg-w > span { opacity: 1 !important; transform: none !important; }
  .leg-manifesto .leg-mw { color: inherit !important; }
  .leg-expand { height: auto; }
  .leg-expand__sticky { position: relative; height: 80vh; }
  .leg-expand__frame { --p: 1 !important; }
  .leg-expand__text { opacity: 1; transform: none; }
  .leg-hscroll { height: auto !important; }
  .leg-hscroll__sticky { position: relative; height: auto; padding: 40px 0; }
  .leg-hscroll__track { overflow-x: auto; transform: none !important; padding-right: 16px; }
  .leg-curtain { display: none; }
}
.leg-menu a[aria-current="page"] { color: var(--leg-lime); }
