/* ============================================================
   REGISTROS DE MARCAS — Sistema de diseño
   Tema: "Sello & Ink" — navy tinta + latón/oro + acero.
   Display serif (certificado), sans legible, mono para metadatos.
   Un único archivo. Tokens en :root. (Prompt Maestro v3 §1, §31)
   ============================================================ */

:root{
  /* Paleta */
  --ink:        #0a1322;   /* fondo base */
  --ink-2:      #0e1c30;   /* superficie elevada */
  --ink-3:      #12233b;   /* superficie 2 */
  --panel:      rgba(255,255,255,.038);
  --panel-2:    rgba(255,255,255,.06);
  --hairline:   rgba(233,240,250,.10);
  --hairline-2: rgba(233,240,250,.16);

  --gold:       #d6ab55;   /* acento primario (sello / certificado) */
  --gold-2:     #f0d18a;   /* acento claro para degradados */
  --gold-deep:  #b98a34;
  --steel:      #6ea6db;   /* acento secundario (técnico / enlaces) */
  --steel-2:    #9cc6ee;

  --text:       #eaf1fb;
  --muted:      #a5b6cf;
  --muted-2:    #7f93b0;
  --ok:         #57c98a;
  --warn:       #e6b455;

  /* Tipografía */
  --font-display: "Fraunces", Georgia, "Times New Roman", serif;
  --font-body:    "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-mono:    "JetBrains Mono", "SFMono-Regular", Consolas, monospace;

  /* Formas y espacios */
  --radius:      16px;
  --radius-sm:   10px;
  --radius-lg:   24px;
  --container:   1200px;
  --gutter:      clamp(1.1rem, 4vw, 2.25rem);
  --section:     clamp(4.5rem, 9vw, 7.5rem);
  --header-h:    72px;

  /* Sincronización del hero (CSS <-> JS). --hero-fade == FADE en main.js */
  --hero-fade:   1100ms;
  --hero-kb:     9s;

  --shadow:      0 24px 60px -28px rgba(0,0,0,.75);
  --glow-gold:   0 0 0 1px rgba(214,171,85,.35), 0 14px 40px -12px rgba(214,171,85,.45);
}

/* ---- Reset ---- */
*,*::before,*::after{ box-sizing:border-box; margin:0; padding:0; }
html{ scroll-behavior:smooth; -webkit-text-size-adjust:100%; }
html,body{ overflow-x:clip; }               /* cinturón anti-desborde (§33) */
@supports not (overflow:clip){ html,body{ overflow-x:hidden; } }

body{
  font-family:var(--font-body);
  background:var(--ink);
  color:var(--text);
  line-height:1.6;
  font-size:clamp(1rem,.96rem + .2vw,1.06rem);
  -webkit-font-smoothing:antialiased;
  scroll-padding-top:calc(var(--header-h) + 12px);
}

/* Textura de fondo ambiente */
body::before{
  content:""; position:fixed; inset:0; z-index:-2; pointer-events:none;
  background:
    radial-gradient(1200px 700px at 78% -8%, rgba(214,171,85,.10), transparent 60%),
    radial-gradient(1000px 640px at 0% 8%, rgba(110,166,219,.10), transparent 55%),
    linear-gradient(180deg,#0a1322,#091120 60%,#080f1c);
}
body::after{
  content:""; position:fixed; inset:0; z-index:-1; pointer-events:none; opacity:.5;
  background-image:linear-gradient(rgba(233,240,250,.03) 1px,transparent 1px),
                   linear-gradient(90deg,rgba(233,240,250,.03) 1px,transparent 1px);
  background-size:64px 64px; mask-image:radial-gradient(1200px 800px at 50% 0%,#000,transparent 80%);
}

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

h1,h2,h3,h4{ font-family:var(--font-display); font-weight:560; line-height:1.08; letter-spacing:-.01em; }
h2{ font-size:clamp(1.9rem,1.3rem + 2.6vw,3rem); }
h3{ font-size:clamp(1.3rem,1.05rem + 1vw,1.7rem); font-weight:540; }
p{ color:var(--muted); }
strong{ color:var(--text); font-weight:640; }

/* Texto con degradado recortado (§41). Sin italic para no recortar glifos. */
.accent-grad{
  background:linear-gradient(118deg,var(--gold),var(--gold-2) 55%,var(--gold-deep));
  -webkit-background-clip:text; background-clip:text;
  -webkit-text-fill-color:transparent; color:transparent;
  font-style:normal;
  padding-bottom:.12em;          /* evita el recorte de descendentes (g, p, y) */
}
@supports not ((-webkit-background-clip:text) or (background-clip:text)){
  .accent-grad,.hero-phrase .w{ color:var(--gold)!important; -webkit-text-fill-color:currentColor; }
}

/* ---- Utilidades de layout ---- */
.container{ width:100%; max-width:var(--container); margin-inline:auto; padding-inline:var(--gutter); }
.section{ padding-block:var(--section); position:relative; }
.section.tight{ padding-block:clamp(3rem,6vw,4.5rem); }
.center{ text-align:center; }
.eyebrow{
  display:inline-flex; align-items:center; gap:.55rem;
  font-family:var(--font-mono); font-size:.72rem; letter-spacing:.24em; text-transform:uppercase;
  color:var(--gold); font-weight:500;
}
.eyebrow::before{
  content:""; width:7px; height:7px; border-radius:50%; background:var(--gold);
  box-shadow:0 0 0 0 rgba(214,171,85,.55); animation:blip 2.4s ease-out infinite;
}
@keyframes blip{ 0%{box-shadow:0 0 0 0 rgba(214,171,85,.55)} 70%{box-shadow:0 0 0 9px rgba(214,171,85,0)} 100%{box-shadow:0 0 0 0 rgba(214,171,85,0)} }
.lead{ font-size:clamp(1.05rem,1rem + .5vw,1.28rem); color:var(--muted); max-width:64ch; }
.section-head{ max-width:70ch; margin-bottom:clamp(2rem,4vw,3.25rem); }
.section-head.center{ margin-inline:auto; }
.section-head h2{ margin:.7rem 0 .8rem; }

/* Salto al contenido (accesibilidad) */
.skip{ position:absolute; left:-999px; top:0; z-index:2000;
  background:var(--gold); color:#1a1206; padding:.7rem 1.1rem; border-radius:0 0 var(--radius-sm) 0; font-weight:600; }
.skip:focus{ left:0; }

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

/* ============================================================
   BOTONES
   ============================================================ */
.btn{
  --_pad:.92rem 1.5rem;
  display:inline-flex; align-items:center; justify-content:center; gap:.55rem;
  font-family:var(--font-body); font-weight:600; font-size:.98rem; letter-spacing:.01em;
  padding:var(--_pad); border-radius:999px; border:1px solid transparent; cursor:pointer;
  transition:transform .2s ease, box-shadow .3s ease, background .25s ease, border-color .25s ease;
  white-space:nowrap; line-height:1.1;
}
.btn svg{ width:1.05em; height:1.05em; }
.btn-primary{ background:linear-gradient(120deg,var(--gold-2),var(--gold)); color:#1c1305; box-shadow:var(--glow-gold); }
.btn-primary:hover{ transform:translateY(-2px); box-shadow:0 0 0 1px rgba(214,171,85,.6),0 20px 46px -14px rgba(214,171,85,.7); }
.btn-outline{ border-color:var(--hairline-2); color:var(--text); background:var(--panel); }
.btn-outline:hover{ border-color:var(--gold); color:var(--gold); transform:translateY(-2px); }
.btn-ghost{ color:var(--muted); }
.btn-ghost:hover{ color:var(--text); }
.btn-lg{ --_pad:1.05rem 1.9rem; font-size:1.02rem; }

/* Latido del CTA (§29) */
.cta-pulse{
  background:linear-gradient(120deg,var(--gold-2),var(--gold)); color:#1c1305;
  font-weight:640; border-radius:999px; padding:.62rem 1.2rem; white-space:nowrap;
  animation:pulse 2.2s ease-in-out infinite; display:inline-flex; align-items:center; gap:.45rem;
}
@keyframes pulse{
  0%,100%{ box-shadow:0 0 0 1px rgba(214,171,85,.35),0 8px 22px -10px rgba(214,171,85,.5); transform:scale(1); }
  50%{ box-shadow:0 0 0 1px rgba(214,171,85,.6),0 14px 34px -8px rgba(214,171,85,.75); transform:scale(1.035); }
}
.cta-pulse:hover{ animation-play-state:paused; box-shadow:0 0 0 1px rgba(214,171,85,.75),0 16px 40px -8px rgba(214,171,85,.85); }

/* ============================================================
   HEADER + NAV
   ============================================================ */
.site-header{ position:fixed; inset:0 0 auto 0; z-index:1000; }
.site-header::before{                 /* backdrop en pseudo-elemento (§29) */
  content:""; position:absolute; inset:0; z-index:-1; opacity:0; transition:opacity .35s ease;
  background:rgba(9,17,30,.82); backdrop-filter:blur(14px) saturate(1.2); -webkit-backdrop-filter:blur(14px) saturate(1.2);
  border-bottom:1px solid var(--hairline);
}
.site-header.scrolled::before{ opacity:1; }

.nav{
  display:flex; align-items:center; justify-content:space-between; gap:.6rem;
  max-width:1400px; margin-inline:auto; padding:0 var(--gutter); height:var(--header-h);
}
.brand{ flex:1 1 0; display:flex; align-items:center; gap:.6rem; white-space:nowrap; }  /* SIN min-width:0 (§44) */
.brand .seal{ width:36px; height:36px; flex:0 0 auto; }
.brand b{ font-family:var(--font-display); font-weight:600; font-size:1.12rem; letter-spacing:-.01em; }
.brand span{ display:block; font-family:var(--font-mono); font-size:.58rem; letter-spacing:.2em; text-transform:uppercase; color:var(--gold); margin-top:1px; }

.nav-menu{ flex:0 0 auto; display:flex; align-items:center; gap:.02rem; justify-content:center; }
.nav-actions{ flex:1 1 0; display:flex; align-items:center; gap:.5rem; justify-content:flex-end; }  /* SIN min-width:0 */

.nav-item{ position:relative; }
.nav-item > a{
  display:inline-flex; align-items:center; gap:.28rem; padding:.5rem .52rem; border-radius:8px;
  font-size:.9rem; color:var(--muted); position:relative; transition:color .2s ease; white-space:nowrap;
}
.nav-item > a:hover, .nav-item.open > a, .nav-item > a.active{ color:var(--text); }
.nav-item > a::after{
  content:""; position:absolute; left:.52rem; right:.52rem; bottom:.24rem; height:1.5px;
  background:var(--gold); transform:scaleX(0); transform-origin:left; transition:transform .28s ease;
}
.nav-item > a:hover::after, .nav-item.open > a::after, .nav-item > a.active::after{ transform:scaleX(1); }
.nav-item.has-mega > a .chev{ width:.7em; height:.7em; opacity:.7; transition:transform .25s ease; }
.nav-item.open > a .chev{ transform:rotate(180deg); }

/* Mega-menú */
.mega{
  --mega-shift:0px;
  position:absolute; top:calc(100% + 10px); left:50%;
  transform:translateX(calc(-50% + var(--mega-shift))) translateY(-8px);
  width:min(680px, calc(100vw - 2rem)); background:var(--ink-2);
  border:1px solid var(--hairline-2); border-radius:var(--radius); box-shadow:var(--shadow);
  padding:1.1rem; opacity:0; visibility:hidden; pointer-events:none; transition:opacity .22s ease, transform .22s ease;
}
/* Puente invisible: cubre el hueco entre el ítem y el panel para que el hover no se corte (§43) */
.mega::before{ content:""; position:absolute; left:0; right:0; top:-14px; height:16px; }
.nav-item.open .mega{ opacity:1; visibility:visible; pointer-events:auto; transform:translateX(calc(-50% + var(--mega-shift))) translateY(0); }
.mega-grid{ display:grid; grid-template-columns:1fr 1fr; gap:.35rem; }
.mega-grid a{ display:block; padding:.6rem .7rem; border-radius:var(--radius-sm); transition:background .18s ease; }
.mega-grid a:hover{ background:var(--panel-2); }
.mega-grid a b{ display:block; font-family:var(--font-body); font-size:.92rem; color:var(--text); font-weight:600; }
.mega-grid a small{ display:block; color:var(--muted-2); font-size:.8rem; line-height:1.4; margin-top:2px; }
.mega-foot{ margin-top:.6rem; padding-top:.8rem; border-top:1px solid var(--hairline); display:flex; justify-content:space-between; align-items:center; gap:.6rem; }
.mega-foot a{ color:var(--gold); font-weight:600; font-size:.9rem; }

/* Buscador del mega */
.nav-search{ position:relative; }
.nav-search input{
  width:172px; max-width:24vw; background:var(--panel); border:1px solid var(--hairline);
  border-radius:999px; color:var(--text); font-family:var(--font-body); font-size:.86rem;
  padding:.48rem .9rem .48rem 2rem; transition:border-color .2s ease, width .2s ease;
}
.nav-search input:focus{ border-color:var(--gold); outline:none; }
.nav-search .ico{ position:absolute; left:.7rem; top:50%; transform:translateY(-50%); width:16px; height:16px; color:var(--muted-2); }
.search-results{
  position:absolute; top:calc(100% + 8px); right:0; width:340px; max-width:80vw;
  background:var(--ink-2); border:1px solid var(--hairline-2); border-radius:var(--radius); box-shadow:var(--shadow);
  padding:.4rem; display:none; max-height:60vh; overflow:auto; z-index:20;
}
.search-results.show{ display:block; }
.search-results a{ display:block; padding:.55rem .7rem; border-radius:var(--radius-sm); }
.search-results a:hover{ background:var(--panel-2); }
.search-results a b{ font-family:var(--font-body); font-size:.9rem; color:var(--text); display:block; }
.search-results a small{ color:var(--muted-2); font-size:.78rem; }
.search-results .cat{ font-family:var(--font-mono); font-size:.62rem; letter-spacing:.14em; text-transform:uppercase; color:var(--gold); }
.search-empty{ padding:.8rem; color:var(--muted-2); font-size:.85rem; text-align:center; }

/* Hamburguesa */
.hamb{ display:none; width:46px; height:46px; border:1px solid var(--hairline-2); border-radius:12px;
  background:var(--panel); cursor:pointer; align-items:center; justify-content:center; flex-direction:column; gap:5px; }
.hamb span{ width:20px; height:2px; background:var(--text); border-radius:2px; transition:transform .3s ease, opacity .2s ease; }
.hamb.open span:nth-child(1){ transform:translateY(7px) rotate(45deg); }
.hamb.open span:nth-child(2){ opacity:0; }
.hamb.open span:nth-child(3){ transform:translateY(-7px) rotate(-45deg); }

/* Panel móvil */
.mobile-panel{
  position:fixed; inset:0; z-index:1300; height:100dvh; background:rgba(8,15,28,.98);
  padding:calc(var(--header-h) + 1rem) var(--gutter) 2rem; overflow-y:auto;
  visibility:hidden; opacity:0; transform:translateY(-8px); transition:opacity .3s ease, transform .3s ease, visibility .3s;
}
.mobile-panel.open{ visibility:visible; opacity:1; transform:none; }
.m-close{ position:absolute; top:1rem; right:var(--gutter); width:46px; height:46px; z-index:2;
  border:1px solid var(--hairline-2); border-radius:12px; background:var(--panel); color:var(--text);
  cursor:pointer; display:flex; align-items:center; justify-content:center; }
.m-close svg{ width:22px; height:22px; }
.m-close:hover{ border-color:var(--gold); color:var(--gold); }
.mobile-panel .m-search{ position:relative; margin-bottom:1rem; }
.mobile-panel .m-search input{ width:100%; background:var(--panel); border:1px solid var(--hairline); border-radius:12px;
  color:var(--text); padding:.8rem .9rem .8rem 2.4rem; font-size:1rem; }
.mobile-panel .m-search .ico{ position:absolute; left:.9rem; top:50%; transform:translateY(-50%); width:18px; height:18px; color:var(--muted-2); }
.m-group{ border-bottom:1px solid var(--hairline); }
.m-group > a{ display:flex; justify-content:space-between; align-items:center; padding:1rem .2rem; font-family:var(--font-display); font-size:1.25rem; color:var(--text); }
.m-sub{ display:flex; flex-wrap:wrap; gap:.4rem; padding:0 .2rem 1rem; }
.m-sub a{ font-size:.85rem; color:var(--muted); background:var(--panel); border:1px solid var(--hairline); padding:.35rem .7rem; border-radius:999px; }
.m-sub a:hover{ color:var(--gold); border-color:var(--gold); }
.mobile-panel .btn{ width:100%; margin-top:1.3rem; }

/* ============================================================
   HERO
   ============================================================ */
.hero{
  position:relative; min-height:100svh; display:flex; align-items:center;
  padding-top:calc(var(--header-h) + 1.5rem); padding-bottom:2.5rem; overflow:hidden;
}
.hero-bg{ position:absolute; inset:0; z-index:0; }
.hero-slide{ position:absolute; inset:0; opacity:0; z-index:0;
  transition:opacity var(--hero-fade) cubic-bezier(.37,.01,.24,1); }
.hero-slide.active{ opacity:1; z-index:2; }
.hero-slide.leaving{ opacity:1; z-index:1; }
.hero-slide img{ width:100%; height:100%; object-fit:cover; backface-visibility:hidden; transform:translateZ(0); }
.hero-slide.active img, .hero-slide.leaving img{ animation:kenBurns var(--hero-kb) linear forwards; }
@keyframes kenBurns{ from{ transform:scale(1.02) translateX(0) } to{ transform:scale(1.1) translateX(-1%) } }
.hero-scrim{ position:absolute; inset:0; z-index:3;
  background:linear-gradient(90deg,rgba(8,14,26,.94) 0%,rgba(8,14,26,.82) 42%,rgba(8,14,26,.5) 100%),
             linear-gradient(0deg,rgba(8,14,26,.9),transparent 42%); }

.hero-inner{ position:relative; z-index:4; width:100%; }
.hero-eyebrow{ margin-bottom:1.1rem; }
.hero h1{ font-size:clamp(2.3rem,1.5rem + 4.4vw,4.4rem); line-height:1.14; max-width:16ch; }
.hero-phrase{ min-height:2.4em; display:block; }
.hero-phrase .w{ display:inline-block; padding-bottom:.14em;   /* descendentes visibles */
  background:linear-gradient(118deg,var(--gold),var(--gold-2) 55%,var(--gold-deep));
  -webkit-background-clip:text; background-clip:text; -webkit-text-fill-color:transparent; color:transparent;
  opacity:0; transform:translateY(.35em) rotateX(-40deg); transition:opacity .5s ease, transform .5s ease; }
.hero-phrase .w.in{ opacity:1; transform:none; }
.hero-title-static{ color:var(--text); }
.hero-sub{ margin-top:1.4rem; max-width:56ch; font-size:clamp(1.05rem,1rem + .5vw,1.25rem);
  transition:opacity .42s ease, transform .42s ease; }
.hero-sub.is-out{ opacity:0; transform:translateY(8px); }
.hero-cta{ display:flex; flex-wrap:wrap; gap:.9rem; margin-top:2rem; }
.hero-badges{ display:flex; flex-wrap:wrap; gap:1.2rem 2rem; margin-top:2.6rem; }
.hero-badge{ display:flex; align-items:center; gap:.55rem; color:var(--muted); font-size:.88rem; }
.hero-badge svg{ width:18px; height:18px; color:var(--gold); flex:0 0 auto; }

/* Dots del hero */
.hero-dots{ position:absolute; z-index:5; left:var(--gutter); bottom:1.6rem; display:flex; gap:.5rem; }
.hero-dots button{ width:34px; height:4px; border-radius:99px; border:none; background:var(--hairline-2); cursor:pointer; position:relative; overflow:hidden; padding:0; }
.hero-dots button .fill{ position:absolute; inset:0; width:0; background:var(--gold); }
.hero-dots button.active .fill{ width:100%; transition:width 7s linear; }

/* Flechas del hero */
.hero-arrow{ position:absolute; z-index:5; top:50%; transform:translateY(-50%);
  width:48px; height:48px; border-radius:50%; border:1px solid var(--hairline-2); background:rgba(9,17,30,.4);
  backdrop-filter:blur(6px); color:var(--text); cursor:pointer; opacity:0; transition:opacity .25s ease, background .2s ease;
  display:flex; align-items:center; justify-content:center; }
.hero:hover .hero-arrow{ opacity:.85; }
.hero-arrow:hover{ background:var(--gold); color:#1c1305; opacity:1; }
.hero-arrow.prev{ left:1rem; } .hero-arrow.next{ right:1rem; }

/* ============================================================
   TARJETAS DE VIDRIO + GLOW
   ============================================================ */
.card{
  position:relative; background:var(--panel); border:1px solid var(--hairline);
  border-radius:var(--radius); padding:1.6rem; overflow:hidden; transition:border-color .25s ease, transform .25s ease;
}
.card::before{
  content:""; position:absolute; inset:0; border-radius:inherit; opacity:0; transition:opacity .3s ease; pointer-events:none;
  background:radial-gradient(340px 340px at var(--mx,50%) var(--my,0%), rgba(214,171,85,.14), transparent 60%);
}
.card:hover{ border-color:var(--hairline-2); transform:translateY(-3px); }
.card:hover::before{ opacity:1; }
.card .num{ font-family:var(--font-mono); font-size:.72rem; letter-spacing:.16em; color:var(--gold); }
.card h3{ margin:.7rem 0 .55rem; }
.card p{ font-size:.96rem; }
.card .card-ico{ width:44px; height:44px; border-radius:12px; display:flex; align-items:center; justify-content:center;
  background:linear-gradient(135deg,rgba(214,171,85,.16),rgba(110,166,219,.1)); border:1px solid var(--hairline); color:var(--gold); }
.card .card-ico svg{ width:22px; height:22px; }
.card-link{ display:inline-flex; align-items:center; gap:.4rem; margin-top:1rem; color:var(--gold); font-weight:600; font-size:.9rem; }
.card-link svg{ width:15px; height:15px; transition:transform .2s ease; }
.card:hover .card-link svg{ transform:translateX(3px); }

.grid{ display:grid; gap:1.1rem; }
.grid-2{ grid-template-columns:repeat(2,1fr); }
.grid-3{ grid-template-columns:repeat(3,1fr); }
.grid-4{ grid-template-columns:repeat(4,1fr); }

/* ============================================================
   PANEL HUD (decorativo técnico)
   ============================================================ */
.hud{ background:var(--ink-2); border:1px solid var(--hairline-2); border-radius:var(--radius-lg); padding:1.4rem; box-shadow:var(--shadow); position:relative; }
.hud-top{ display:flex; align-items:center; justify-content:space-between; padding-bottom:1rem; border-bottom:1px solid var(--hairline); }
.hud-lights{ display:flex; gap:.4rem; } .hud-lights i{ width:10px; height:10px; border-radius:50%; display:block; }
.hud-lights i:nth-child(1){ background:#e5695f; } .hud-lights i:nth-child(2){ background:#e6b455; } .hud-lights i:nth-child(3){ background:var(--ok); }
.hud-title{ font-family:var(--font-mono); font-size:.72rem; letter-spacing:.16em; text-transform:uppercase; color:var(--muted-2); }
.hud-row{ display:flex; justify-content:space-between; align-items:center; padding:.7rem 0; border-bottom:1px solid var(--hairline); font-size:.9rem; }
.hud-row:last-child{ border-bottom:none; }
.hud-row .k{ color:var(--muted); font-family:var(--font-mono); font-size:.82rem; }
.hud-row .v{ color:var(--text); font-weight:600; }
.hud-row .v.gold{ color:var(--gold); }
.chip{ font-family:var(--font-mono); font-size:.68rem; letter-spacing:.1em; padding:.2rem .55rem; border-radius:999px; border:1px solid var(--hairline-2); color:var(--steel-2); }
.chip.ok{ color:var(--ok); border-color:rgba(87,201,138,.4); }

/* ============================================================
   TIMELINE / PASOS NUMERADOS
   ============================================================ */
.steps{ display:grid; gap:1rem; counter-reset:step; }
.step{ display:grid; grid-template-columns:auto 1fr; gap:1.1rem; align-items:start;
  background:var(--panel); border:1px solid var(--hairline); border-radius:var(--radius); padding:1.3rem 1.5rem; }
.step .idx{ font-family:var(--font-mono); font-size:1.5rem; color:var(--gold); font-weight:500; min-width:2.2rem; line-height:1; }
.step h3{ font-size:1.15rem; margin-bottom:.3rem; }
.step p{ font-size:.94rem; margin:0; }

/* ============================================================
   TABLA
   ============================================================ */
.table-wrap{ overflow-x:auto; border:1px solid var(--hairline); border-radius:var(--radius); }
table.data{ width:100%; border-collapse:collapse; min-width:520px; }
table.data th, table.data td{ text-align:left; padding:.95rem 1.1rem; border-bottom:1px solid var(--hairline); font-size:.94rem; vertical-align:top; }
table.data thead th{ font-family:var(--font-mono); font-size:.72rem; letter-spacing:.12em; text-transform:uppercase; color:var(--gold); background:var(--panel); }
table.data tbody tr:last-child td{ border-bottom:none; }
table.data td:first-child{ color:var(--text); font-weight:600; }
table.data .col-p{ color:var(--muted); } table.data .col-m{ color:var(--steel-2); }

/* ============================================================
   CONTADORES
   ============================================================ */
.stats{ display:grid; grid-template-columns:repeat(4,1fr); gap:1rem; }
.stat{ text-align:center; padding:1.4rem 1rem; border:1px solid var(--hairline); border-radius:var(--radius); background:var(--panel); }
.stat .big{ font-family:var(--font-display); font-size:clamp(2.2rem,1.5rem + 2.5vw,3.2rem); color:var(--gold); line-height:1; }
.stat .lbl{ color:var(--muted); font-size:.86rem; margin-top:.5rem; }

/* ============================================================
   MARQUEE
   ============================================================ */
.marquee{ overflow:hidden; border-block:1px solid var(--hairline); padding:1.1rem 0; -webkit-mask-image:linear-gradient(90deg,transparent,#000 8%,#000 92%,transparent); mask-image:linear-gradient(90deg,transparent,#000 8%,#000 92%,transparent); }
.marquee-track{ display:flex; gap:3rem; width:max-content; animation:scrollx 32s linear infinite; }
.marquee:hover .marquee-track{ animation-play-state:paused; }
.marquee-item{ font-family:var(--font-mono); font-size:.82rem; letter-spacing:.1em; color:var(--muted-2); white-space:nowrap; display:flex; align-items:center; gap:.6rem; }
.marquee-item::before{ content:"•"; color:var(--gold); }
@keyframes scrollx{ to{ transform:translateX(-50%); } }

/* ============================================================
   REVEALS
   ============================================================ */
.reveal{ opacity:0; transform:translateY(22px); transition:opacity .7s ease, transform .7s ease; }
.reveal.visible{ opacity:1; transform:none; }
.no-js .reveal{ opacity:1; transform:none; }
.reveal-d1{ transition-delay:.08s; } .reveal-d2{ transition-delay:.16s; } .reveal-d3{ transition-delay:.24s; }

/* Sección con halo */
.halo{ position:relative; }
.halo::before{ content:""; position:absolute; left:50%; top:0; width:900px; max-width:120vw; height:520px; transform:translateX(-50%);
  background:radial-gradient(circle, rgba(214,171,85,.14), transparent 62%); z-index:-1; pointer-events:none; }

/* ============================================================
   FAQ / ACORDEÓN
   ============================================================ */
.faq-item{ border:1px solid var(--hairline); border-radius:var(--radius); margin-bottom:.75rem; overflow:hidden; background:var(--panel); }
.faq-q{ width:100%; text-align:left; background:none; border:none; color:var(--text); cursor:pointer;
  font-family:var(--font-body); font-size:1.02rem; font-weight:600; padding:1.15rem 1.3rem; display:flex; justify-content:space-between; align-items:center; gap:1rem; }
.faq-q .pm{ width:22px; height:22px; flex:0 0 auto; position:relative; }
.faq-q .pm::before,.faq-q .pm::after{ content:""; position:absolute; background:var(--gold); border-radius:2px; inset:0; margin:auto; }
.faq-q .pm::before{ width:14px; height:2px; } .faq-q .pm::after{ width:2px; height:14px; transition:transform .25s ease; }
.faq-item.open .faq-q .pm::after{ transform:rotate(90deg); opacity:0; }
.faq-a{ max-height:0; overflow:hidden; transition:max-height .35s ease; }
.faq-a p{ padding:0 1.3rem 1.2rem; font-size:.96rem; }
.faq-tag{ font-family:var(--font-mono); font-size:.62rem; letter-spacing:.12em; text-transform:uppercase; color:var(--gold); margin-right:.6rem; }

/* ============================================================
   AVISOS / CALLOUTS
   ============================================================ */
.callout{ display:grid; grid-template-columns:auto 1fr; gap:1rem; align-items:start;
  border:1px solid rgba(230,180,85,.35); background:rgba(230,180,85,.07); border-radius:var(--radius); padding:1.3rem 1.5rem; }
.callout.info{ border-color:rgba(110,166,219,.35); background:rgba(110,166,219,.07); }
.callout .ci{ width:38px; height:38px; border-radius:10px; display:flex; align-items:center; justify-content:center;
  background:rgba(230,180,85,.15); color:var(--warn); flex:0 0 auto; }
.callout.info .ci{ background:rgba(110,166,219,.15); color:var(--steel-2); }
.callout h4{ font-family:var(--font-body); font-weight:700; color:var(--text); margin-bottom:.25rem; }
.callout p{ font-size:.94rem; margin:0; }

/* Lista de checks */
.checks{ list-style:none; display:grid; gap:.7rem; }
.checks li{ display:grid; grid-template-columns:auto 1fr; gap:.7rem; align-items:start; color:var(--muted); font-size:.96rem; }
.checks li svg{ width:20px; height:20px; color:var(--gold); flex:0 0 auto; margin-top:2px; }

/* ============================================================
   CTA BAND
   ============================================================ */
.cta-band{ text-align:center; border:1px solid var(--hairline-2); border-radius:var(--radius-lg);
  padding:clamp(2.4rem,5vw,4rem); background:linear-gradient(180deg,var(--ink-2),var(--ink-3)); position:relative; overflow:hidden; }
.cta-band::before{ content:""; position:absolute; inset:0; background:radial-gradient(600px 300px at 50% -20%, rgba(214,171,85,.18), transparent 70%); pointer-events:none; }
.cta-band h2{ position:relative; }
.cta-band .lead{ margin:1rem auto 2rem; }
.cta-band .hero-cta{ justify-content:center; }

/* ============================================================
   FORMULARIO
   ============================================================ */
.form-wrap{ display:grid; grid-template-columns:1.15fr .85fr; gap:2rem; align-items:start; }
.field{ margin-bottom:1.1rem; }
.field label{ display:block; font-size:.86rem; color:var(--muted); margin-bottom:.4rem; font-weight:600; }
.field .req{ color:var(--gold); }
.field input, .field select, .field textarea{
  width:100%; background:var(--ink-2); border:1px solid var(--hairline-2); border-radius:12px; color:var(--text);
  font-family:var(--font-body); font-size:1rem; padding:.85rem 1rem; transition:border-color .2s ease; }
.field input:focus, .field select:focus, .field textarea:focus{ outline:none; border-color:var(--gold); }
.field textarea{ resize:vertical; min-height:130px; }
.field.row2{ display:grid; grid-template-columns:1fr 1fr; gap:1rem; }
.hp{ position:absolute; left:-9999px; opacity:0; height:0; width:0; overflow:hidden; }
.form-check{ display:flex; gap:.6rem; align-items:flex-start; font-size:.88rem; color:var(--muted); margin-bottom:1.2rem; }
.form-check input{ width:auto; margin-top:3px; }
.form-status{ margin-top:1rem; font-size:.94rem; }
.form-status.ok{ color:var(--ok); } .form-status.err{ color:#e5695f; }
.form-aside{ background:var(--ink-2); border:1px solid var(--hairline); border-radius:var(--radius); padding:1.5rem; }
.form-aside h3{ margin-bottom:.8rem; }

/* ============================================================
   FOOTER
   ============================================================ */
.site-footer{ border-top:1px solid var(--hairline); margin-top:2rem; padding-top:3rem; }
.footer-top{ display:grid; grid-template-columns:1.4fr 1fr 1fr; gap:2rem; padding-bottom:2.5rem; }
.footer-brand .seal{ width:40px; height:40px; margin-bottom:.9rem; }
.footer-brand b{ font-family:var(--font-display); font-size:1.2rem; }
.footer-brand p{ font-size:.9rem; margin-top:.7rem; max-width:38ch; }
.footer-col h4{ font-family:var(--font-mono); font-size:.72rem; letter-spacing:.16em; text-transform:uppercase; color:var(--gold); margin-bottom:1rem; font-weight:500; }
.footer-col a, .footer-col span{ display:block; color:var(--muted); font-size:.9rem; padding:.28rem 0; }
.footer-col a:hover{ color:var(--gold); }
.footer-nav{ display:flex; flex-wrap:wrap; justify-content:center; align-items:center; gap:.5rem 0; padding:2rem 0; border-top:1px solid var(--hairline); border-bottom:1px solid var(--hairline); }
.footer-nav a{ position:relative; padding:.15rem clamp(.7rem,1.4vw,1.15rem); white-space:nowrap; color:var(--muted); font-size:.9rem; }
.footer-nav a:hover{ color:var(--gold); }

/* Grupo empresarial */
.footer-group{ padding:2.4rem 0; border-top:1px solid var(--hairline); }
.footer-group-head{ max-width:60ch; margin-bottom:1.6rem; }
.footer-group-head h4{ font-family:var(--font-display); font-size:1.35rem; margin:.5rem 0 .6rem; }
.footer-group-head p{ font-size:.9rem; color:var(--muted); }
.footer-group-head a{ color:var(--gold); }
.footer-group-grid{ display:grid; grid-template-columns:repeat(3,1fr); gap:.9rem; }
.group-card{ display:block; background:var(--panel); border:1px solid var(--hairline); border-radius:var(--radius-sm);
  padding:1rem 1.1rem; transition:border-color .2s ease, transform .2s ease, background .2s ease; }
.group-card:hover{ border-color:var(--gold); transform:translateY(-2px); background:var(--panel-2); }
.group-card b{ display:block; font-family:var(--font-body); font-weight:600; color:var(--gold); font-size:.95rem; margin-bottom:.3rem; }
.group-card small{ display:block; color:var(--muted-2); font-size:.82rem; line-height:1.45; }
.footer-nav a::after{ content:""; position:absolute; right:0; top:50%; transform:translateY(-50%); width:1px; height:13px; background:var(--hairline-2); }
.footer-nav a:last-child::after{ display:none; }
.footer-bottom{ display:flex; flex-wrap:wrap; justify-content:space-between; gap:1rem; padding:1.8rem 0; color:var(--muted-2); font-size:.82rem; }
.footer-bottom a{ color:var(--muted-2); } .footer-bottom a:hover{ color:var(--gold); }
.footer-legal{ font-size:.78rem; color:var(--muted-2); padding:0 0 2rem; max-width:none; line-height:1.6; }

/* ============================================================
   BURBUJA WHATSAPP
   ============================================================ */
.wa-bubble{ position:fixed; right:20px; bottom:calc(20px + env(safe-area-inset-bottom)); z-index:950;
  width:60px; height:60px; border-radius:50%; background:#25D366; display:flex; align-items:center; justify-content:center;
  box-shadow:0 12px 30px -8px rgba(37,211,102,.6); transition:transform .2s ease; }
.wa-bubble:hover{ transform:scale(1.07); }
.wa-bubble svg{ width:32px; height:32px; }
.wa-bubble::before{ content:""; position:absolute; inset:0; border-radius:50%; border:2px solid #25D366; animation:ping 2.4s ease-out infinite; }
@keyframes ping{ 0%{ transform:scale(1); opacity:.7 } 100%{ transform:scale(1.7); opacity:0 } }
.wa-tip{ position:absolute; right:72px; top:50%; transform:translateY(-50%); background:var(--ink-2); border:1px solid var(--hairline-2);
  color:var(--text); font-size:.82rem; padding:.5rem .8rem; border-radius:10px; white-space:nowrap; opacity:0; pointer-events:none; transition:opacity .2s ease; }
.wa-bubble:hover .wa-tip{ opacity:1; }

/* ============================================================
   MISC
   ============================================================ */
.breadcrumb{ font-family:var(--font-mono); font-size:.74rem; letter-spacing:.08em; color:var(--muted-2); padding-top:calc(var(--header-h) + 2rem); }
.breadcrumb a:hover{ color:var(--gold); } .breadcrumb .sep{ color:var(--hairline-2); margin:0 .5rem; }
.page-hero{ padding-top:1.5rem; padding-bottom:1rem; }
.page-hero h1{ font-size:clamp(2.1rem,1.4rem + 3.4vw,3.4rem); margin:.8rem 0 1rem; max-width:20ch; }
.anchor-target{ scroll-margin-top:calc(var(--header-h) + 20px); }
.pill-row{ display:flex; flex-wrap:wrap; gap:.5rem; margin-top:1.2rem; }
.pill{ font-size:.82rem; color:var(--muted); background:var(--panel); border:1px solid var(--hairline); padding:.35rem .8rem; border-radius:999px; }
.pill:hover{ color:var(--gold); border-color:var(--gold); }
.two-col{ display:grid; grid-template-columns:1fr 1fr; gap:2rem; align-items:center; }
.divider{ height:1px; background:var(--hairline); border:none; margin:0; }

/* Asistente interactivo */
.assist{ background:var(--ink-2); border:1px solid var(--hairline-2); border-radius:var(--radius-lg); padding:clamp(1.4rem,3vw,2.2rem); }
.assist .opt{ display:flex; justify-content:space-between; align-items:center; gap:1rem; width:100%; text-align:left;
  background:var(--panel); border:1px solid var(--hairline); border-radius:var(--radius); padding:1.1rem 1.3rem; margin-bottom:.7rem;
  color:var(--text); cursor:pointer; font-family:var(--font-body); font-size:1rem; transition:border-color .2s ease, background .2s ease; }
.assist .opt > span:first-child{ flex:1 1 auto; min-width:0; line-height:1.35; }
.assist .opt:hover{ border-color:var(--gold); background:var(--panel-2); }
.assist .opt .res{ flex:0 0 auto; text-align:right; white-space:nowrap; font-family:var(--font-mono); font-size:.72rem; letter-spacing:.08em; text-transform:uppercase; color:var(--gold); }
@media (max-width:520px){
  .assist .opt{ flex-direction:column; align-items:flex-start; gap:.5rem; }
  .assist .opt .res{ text-align:left; }
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width:1300px){
  .nav-menu{ display:none; }
  .nav-search{ display:none; }
  .nav-actions .cta-pulse{ display:none; }
  .hamb{ display:flex; }
  .brand{ flex:0 0 auto; }
  .nav-actions{ flex:0 0 auto; }
  .nav{ justify-content:space-between; max-width:var(--container); }
}
@media (max-width:1024px){
  .grid-4{ grid-template-columns:repeat(2,1fr); }
  .grid-3{ grid-template-columns:repeat(2,1fr); }
  .stats{ grid-template-columns:repeat(2,1fr); }
  .form-wrap{ grid-template-columns:1fr; }
  .two-col{ grid-template-columns:1fr; }
  .footer-group-grid{ grid-template-columns:repeat(2,1fr); }
}
@media (max-width:768px){
  :root{ --section:clamp(3.4rem,10vw,5rem); }
  .hero{ align-items:flex-start; padding-top:calc(var(--header-h) + 2.2rem); }
  .hero-scrim{ background:linear-gradient(180deg,rgba(8,14,26,.7),rgba(8,14,26,.94) 55%); }
  .hero h1{ font-size:clamp(2rem,7.5vw,2.9rem); }
  .hero-eyebrow .eyebrow{ letter-spacing:.16em; font-size:.64rem; }
  .hero-cta{ flex-direction:column; }
  .hero-cta .btn{ width:100%; }
  .hero-arrow{ display:none; }
  .btn{ white-space:normal; }
  .grid-2, .grid-3, .grid-4{ grid-template-columns:1fr; }
  .stats{ grid-template-columns:repeat(2,1fr); }
  .footer-top{ grid-template-columns:1fr; gap:1.6rem; }
  .footer-group-grid{ grid-template-columns:1fr; }
  .step{ grid-template-columns:1fr; gap:.4rem; }
  .step .idx{ font-size:1.2rem; }
  .field.row2{ grid-template-columns:1fr; }
  .mega{ display:none; }
}

/* ============================================================
   MOVIMIENTO REDUCIDO
   ============================================================ */
@media (prefers-reduced-motion:reduce){
  *,*::before,*::after{ animation-duration:.001ms!important; animation-iteration-count:1!important; transition-duration:.001ms!important; scroll-behavior:auto!important; }
  .hero-slide.active img,.hero-slide.leaving img{ animation:none; transform:none; }
  .hero-phrase .w{ opacity:1; transform:none; }
  .reveal{ opacity:1; transform:none; }
  .cta-pulse{ animation:none; }
  .wa-bubble::before{ animation:none; }
  .marquee-track{ animation:none; }
}
