/* ============================================================
   G&R LEGAL CORP · Sistema de diseño
   Azul marino #0F243E · Dorado/bronce #B4905D · Blanco humo #F7F7F7
   ============================================================ */

/* ---------- 1. Tokens ---------- */
:root {
  --navy:        #0F243E;
  --navy-deep:   #0A1928;
  --navy-soft:   #16324F;
  --navy-card:   #17334E;
  --navy-line:   #1E3E60;

  --gold:        #B4905D;
  --gold-light:  #CBAA7C;
  --gold-deep:   #8D6E42;
  --gold-text:   #86683D;   /* dorado para TEXTO pequeño sobre fondo claro (4,8:1) */
  --gold-glow:   rgba(180, 144, 93, .28);

  --smoke:       #F7F7F7;
  --paper:       #FFFFFF;
  --smoke-2:     #ECECEC;

  --ink:         #0F243E;
  --ink-soft:    #38495C;
  --ink-mute:    #62707F;

  --on-dark:     #EDF1F5;
  --on-dark-2:   #B8C4D2;
  --on-dark-3:   #93A3B5;

  --line-dark:   rgba(237, 241, 245, .13);
  --line-light:  rgba(15, 36, 62, .12);
  --line-gold:   rgba(180, 144, 93, .38);

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

  --sp-1: .5rem;  --sp-2: 1rem;   --sp-3: 1.5rem;  --sp-4: 2rem;
  --sp-5: 3rem;   --sp-6: 4rem;   --sp-7: 6rem;    --sp-8: 8rem;

  --container: 1240px;
  --container-narrow: 860px;
  --radius:    4px;
  --radius-lg: 10px;

  --ease-out:  cubic-bezier(.16, 1, .3, 1);
  --ease-io:   cubic-bezier(.65, 0, .35, 1);

  --shadow-sm: 0 1px 2px rgba(15,36,62,.06), 0 4px 16px rgba(15,36,62,.05);
  --shadow-md: 0 4px 12px rgba(15,36,62,.08), 0 18px 44px rgba(15,36,62,.10);
  --shadow-lg: 0 10px 30px rgba(15,36,62,.12), 0 40px 90px rgba(15,36,62,.16);
  --shadow-dark: 0 20px 60px rgba(5,14,25,.55);

  --nav-h: 82px;
}

/* ---------- 2. Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html {
  /* Sin scroll-behavior: smooth. Interfiere con las mediciones de GSAP durante el
     anclaje; el desplazamiento suave a las anclas lo hace main.js. */
  scroll-padding-top: calc(var(--nav-h) + 16px);
  -webkit-text-size-adjust: 100%;
}
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.65;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}
body.is-locked { overflow: hidden; }
img, svg, video { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
button, input, textarea, select { font: inherit; color: inherit; }
h1, h2, h3, h4 {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 400;
  line-height: 1.08;
  letter-spacing: -.015em;
  font-variation-settings: "SOFT" 0, "WONK" 0;
}
p  { margin: 0 0 1.1em; }
ul, ol { margin: 0 0 1.2em; padding-left: 1.25em; }
li { margin-bottom: .5em; }
hr { border: 0; border-top: 1px solid var(--line-light); margin: var(--sp-5) 0; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; border-radius: 2px; }
::selection { background: var(--gold); color: #fff; }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

/* ---------- 3. Layout ---------- */
.container { width: min(100% - 2.5rem, var(--container)); margin-inline: auto; }
.container-narrow { width: min(100% - 2.5rem, var(--container-narrow)); margin-inline: auto; }
.section { padding: clamp(4rem, 9vw, 7.5rem) 0; position: relative; }
.section--tight { padding: clamp(3rem, 6vw, 5rem) 0; }
.section--dark { background: var(--navy); color: var(--on-dark); }
.section--deep { background: var(--navy-deep); color: var(--on-dark); }
.section--smoke { background: var(--smoke); }
.section--paper { background: var(--paper); }
.section--dark h1, .section--dark h2, .section--dark h3, .section--dark h4,
.section--deep h1, .section--deep h2, .section--deep h3, .section--deep h4 { color: var(--on-dark); }
.section--dark p, .section--deep p { color: var(--on-dark-2); }

/* ---------- 4. Tipografía de composición ---------- */
.kicker {
  font-family: var(--font-mono);
  font-size: .70rem;
  font-weight: 500;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--gold);
  margin: 0 0 1.1rem;
  display: flex;
  align-items: center;
  gap: .75rem;
}
.kicker::before { content: ""; width: 34px; height: 1px; background: var(--gold); flex: none; }

.display-1 { font-size: clamp(2.5rem, 6vw, 4.7rem); }
.display-2 { font-size: clamp(2rem, 4.2vw, 3.3rem); }
.display-3 { font-size: clamp(1.45rem, 2.4vw, 1.95rem); line-height: 1.2; }
.display-1 em, .display-2 em, .display-3 em {
  font-style: italic;
  color: var(--gold);
  font-variation-settings: "SOFT" 0, "WONK" 1;
}
.section--dark .display-1 em, .section--dark .display-2 em,
.section--deep .display-1 em, .section--deep .display-2 em { color: var(--gold-light); }
/* Sobre fondo claro, un dorado un punto más profundo: cumple el 3:1 de texto grande. */
.section--paper .display-1 em, .section--paper .display-2 em, .section--paper .display-3 em,
.section--smoke .display-1 em, .section--smoke .display-2 em, .section--smoke .display-3 em { color: var(--gold-deep); }
.cta-band .display-3 em { color: var(--gold-light); }

.lead {
  font-size: clamp(1.04rem, 1.5vw, 1.2rem);
  line-height: 1.72;
  color: var(--ink-soft);
  max-width: 62ch;
}
.section--dark .lead, .section--deep .lead,
.phases .lead, .thanks .lead, .page-head .lead { color: var(--on-dark-2); }
.phases .muted, .thanks .muted, .page-head .muted { color: var(--on-dark-3); }
.muted { color: var(--ink-mute); }
.center { text-align: center; }
.center .kicker { justify-content: center; }
.center .lead { margin-inline: auto; }
.rule-gold { width: 56px; height: 2px; background: var(--gold); margin: var(--sp-3) 0; border: 0; }
.center .rule-gold { margin-inline: auto; }

/* Sobre fondo claro, el dorado como TEXTO usa la variante de contraste;
   sobre fondo oscuro se mantiene el dorado de marca. */
.section--paper .kicker, .section--smoke .kicker,
.section--paper .card-num, .section--smoke .card-num,
.section--paper .eyebrow-num, .section--smoke .eyebrow-num { color: var(--gold-text); }
.section--paper .kicker::before, .section--smoke .kicker::before { background: var(--gold); }
.card--dark .card-num, .svc .card-num { color: var(--gold-light); }
.cta-band .kicker { color: var(--gold); }

/* ---------- 5. Botones ---------- */
.btn {
  --btn-bg: var(--gold);
  --btn-fg: var(--navy);        /* azul marino sobre dorado: 5,3:1 (blanco daba 2,96) */
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .6rem;
  padding: 1.02rem 2rem;
  background: var(--btn-bg);
  color: var(--btn-fg);
  border: 1px solid var(--btn-bg);
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-size: .845rem;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
  cursor: pointer;
  overflow: hidden;
  isolation: isolate;
  text-align: center;
  transition: transform .35s var(--ease-out), box-shadow .35s var(--ease-out),
              background-color .35s var(--ease-out), border-color .35s var(--ease-out), color .35s var(--ease-out);
}
.btn::after {
  content: "";
  position: absolute; inset: 0;
  background: var(--gold-light);
  transform: translateY(101%);
  transition: transform .45s var(--ease-out);
  z-index: -1;
}
.btn:hover { transform: translateY(-3px); box-shadow: 0 12px 30px var(--gold-glow); }
.btn:hover::after { transform: translateY(0); }
.btn:active { transform: translateY(-1px); }
.btn .arr { transition: transform .35s var(--ease-out); }
.btn:hover .arr { transform: translateX(4px); }

.btn--ghost { --btn-bg: transparent; --btn-fg: var(--ink); border-color: var(--line-gold); }
.btn--ghost::after { background: var(--navy); }
.btn--ghost:hover { color: #fff; border-color: var(--navy); box-shadow: var(--shadow-md); }

.btn--ghost-light { --btn-bg: transparent; --btn-fg: var(--on-dark); border-color: rgba(180,144,93,.55); }
.btn--ghost-light::after { background: var(--gold); }
.btn--ghost-light:hover { color: var(--navy); border-color: var(--gold); }

.btn--sm { padding: .72rem 1.3rem; font-size: .74rem; }
.btn--block { width: 100%; }
.btn[disabled] { opacity: .55; pointer-events: none; }
.btn-group { display: flex; flex-wrap: wrap; gap: .9rem; }

.link-gold {
  color: var(--gold-text);
  font-weight: 500;
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  padding-bottom: 2px;
}
.link-gold::after {
  content: ""; position: absolute; left: 0; bottom: 0;
  width: 100%; height: 1px; background: currentColor;
  transform: scaleX(0); transform-origin: right;
  transition: transform .45s var(--ease-out);
}
.link-gold:hover::after { transform: scaleX(1); transform-origin: left; }
.link-gold .arr { transition: transform .35s var(--ease-out); }
.section--dark .link-gold, .section--deep .link-gold, .thanks .link-gold, .phases .link-gold,
.hero .link-gold, .footer .link-gold, .svc .link-gold, .card--dark .link-gold,
.form-panel .link-gold, .cta-band .link-gold { color: var(--gold-light); }
.link-gold:hover .arr { transform: translateX(4px); }

/* ---------- 6. Revelado ---------- */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity .85s var(--ease-out), transform .85s var(--ease-out);
  will-change: opacity, transform;
}
.reveal.is-visible { opacity: 1; transform: none; }
.reveal[data-split] { opacity: 1; transform: none; }
.reveal[data-delay="1"] { transition-delay: .09s; }
.reveal[data-delay="2"] { transition-delay: .18s; }
.reveal[data-delay="3"] { transition-delay: .27s; }
.reveal[data-delay="4"] { transition-delay: .36s; }
.reveal[data-delay="5"] { transition-delay: .45s; }

.split-word {
  display: inline-block;
  opacity: 0;
  transform: translateY(.6em) rotate(1.2deg);
  transition: opacity .9s var(--ease-out), transform .9s var(--ease-out);
}
.split-word.is-in { opacity: 1; transform: none; }

/* ---------- 7. Progreso ---------- */
.progress-bar {
  position: fixed; top: 0; left: 0;
  height: 2px; width: 100%;
  transform: scaleX(0); transform-origin: left;
  background: linear-gradient(90deg, var(--gold-deep), var(--gold-light));
  z-index: 1200;
  pointer-events: none;
}

/* ---------- 8. Navegación ---------- */
.nav {
  position: fixed; top: 0; left: 0; right: 0;
  height: var(--nav-h);
  z-index: 1000;
  display: flex; align-items: center;
  background: transparent;
  border-bottom: 1px solid transparent;
  transition: background-color .45s var(--ease-out), border-color .45s var(--ease-out), height .45s var(--ease-out);
}
.nav.is-solid {
  background: rgba(15, 36, 62, .94);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  backdrop-filter: saturate(160%) blur(14px);
  border-bottom-color: var(--line-dark);
  height: 70px;
}
.nav-inner {
  width: min(100% - 2.5rem, 1400px);
  margin-inline: auto;
  display: flex; align-items: center; justify-content: space-between;
  gap: var(--sp-3);
}
.brand { display: flex; align-items: center; flex: none; }
.brand-mark {
  height: 50px; width: auto; flex: none; display: block;
  transition: height .45s var(--ease-out), opacity .3s var(--ease-out);
}
.brand:hover .brand-mark { opacity: .82; }
.nav.is-solid .brand-mark { height: 42px; }
.brand--footer .brand-mark { height: 62px; }
@media (max-width: 620px) {
  .brand-mark, .nav.is-solid .brand-mark { height: 40px; }
  .brand--footer .brand-mark { height: 52px; }
}

.nav-links { display: flex; align-items: center; gap: .2rem; list-style: none; margin: 0; padding: 0; }
.nav-links li { margin: 0; }
.nav-links a {
  position: relative;
  display: block;
  white-space: nowrap;
  padding: .55rem .9rem;
  font-size: .84rem;
  font-weight: 500;
  color: var(--on-dark-2);
  transition: color .3s var(--ease-out);
}
.nav-links a::after {
  content: ""; position: absolute; left: .9rem; right: .9rem; bottom: .16rem;
  height: 1px; background: var(--gold);
  transform: scaleX(0); transform-origin: right;
  transition: transform .45s var(--ease-out);
}
.nav-links a:hover { color: var(--on-dark); }
.nav-links a:hover::after { transform: scaleX(1); transform-origin: left; }
.nav-links a[aria-current="page"] { color: var(--gold); }
.nav-links a[aria-current="page"]::after { transform: scaleX(1); }
.nav-cta { display: flex; align-items: center; gap: .7rem; flex: none; }

.nav-toggle {
  display: none;
  width: 46px; height: 46px;
  background: rgba(15,36,62,.55); border: 1px solid var(--line-dark);
  border-radius: var(--radius);
  cursor: pointer;
  position: relative;
}
.nav-toggle span {
  position: absolute; left: 13px; width: 19px; height: 1.5px;
  background: var(--on-dark);
  transition: transform .4s var(--ease-out), opacity .25s var(--ease-out);
}
.nav-toggle span:nth-child(1) { top: 17px; }
.nav-toggle span:nth-child(2) { top: 22px; }
.nav-toggle span:nth-child(3) { top: 27px; }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(5px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-5px) rotate(-45deg); }

.nav-mobile {
  position: fixed; inset: 0;
  background: var(--navy-deep);
  z-index: 999;
  padding: calc(var(--nav-h) + 1.5rem) 1.5rem 2rem;
  display: flex; flex-direction: column;
  clip-path: inset(0 0 100% 0);
  transition: clip-path .6s var(--ease-io);
  overflow-y: auto;
  visibility: hidden;
}
.nav-mobile.is-open { clip-path: inset(0 0 0 0); visibility: visible; }
.nav-mobile ul { list-style: none; margin: 0 0 auto; padding: 0; }
.nav-mobile li { border-bottom: 1px solid var(--line-dark); margin: 0; }
.nav-mobile a {
  display: flex; align-items: baseline; gap: 1rem;
  padding: 1.05rem .25rem;
  font-family: var(--font-display);
  font-size: 1.45rem;
  color: var(--on-dark);
}
.nav-mobile a i { font-family: var(--font-mono); font-style: normal; font-size: .6rem; color: var(--gold); letter-spacing: .1em; }
.nav-mobile a[aria-current="page"] { color: var(--gold); }
.nav-mobile-foot { padding-top: 1.6rem; border-top: 1px solid var(--line-dark); margin-top: 1.6rem; }
.nav-mobile-foot p { font-size: .84rem; color: var(--on-dark-3); margin: 0 0 .3rem; }
.nav-mobile-foot a.big { font-family: var(--font-display); font-size: 1.28rem; color: var(--gold); display: inline; padding: 0; }
.nav-mobile .btn { margin-top: 1.2rem; }

@media (max-width: 1100px) {
  .nav-links { display: none; }
  .nav-cta > .btn { display: none; }
  .nav-toggle { display: block; }
}

/* Menú de aterrizaje (páginas de Google Ads): sin enlaces al resto del sitio.
   Solo el teléfono y el botón al formulario, visibles en todos los anchos. */
.nav--landing .nav-cta { gap: 1.1rem; }
.nav--landing .nav-cta > .btn { display: inline-flex; }
.nav--landing .brand { cursor: default; }
.nav--landing .brand:hover .brand-mark { opacity: 1; }
.nav-phone {
  display: inline-flex; align-items: center; gap: .5rem;
  font-family: var(--font-display);
  font-size: 1.05rem;
  color: var(--on-dark);
  white-space: nowrap;
  transition: color .3s var(--ease-out);
}
.nav-phone svg { width: 18px; height: 18px; color: var(--gold); flex: none; }
.nav-phone:hover { color: var(--gold-light); }
.nav--landing .nav-cta > .btn { white-space: nowrap; }
.nav--landing .cta-short { display: none; }
@media (max-width: 620px) {
  .nav--landing .nav-inner { gap: .6rem; }
  .nav--landing .nav-cta { gap: .6rem; min-width: 0; }
  .nav-phone span { display: none; }
  .nav-phone { width: 42px; height: 42px; justify-content: center; border: 1px solid var(--line-gold); border-radius: var(--radius); }
  .nav--landing .nav-cta > .btn { padding: .72rem .95rem; font-size: .7rem; letter-spacing: .05em; }
  .nav--landing .cta-long { display: none; }
  .nav--landing .cta-short { display: inline; }
}

/* ---------- 9. Hero ---------- */
.hero {
  position: relative;
  min-height: min(92vh, 900px);
  display: flex; align-items: flex-end;
  padding: calc(var(--nav-h) + 5rem) 0 clamp(3rem, 6vw, 5.5rem);
  background: var(--navy-deep);
  color: var(--on-dark);
  overflow: hidden;
  isolation: isolate;
}
.hero--compact { min-height: min(72vh, 700px); }
.hero-media { position: absolute; inset: 0; z-index: -3; }
.hero-media img { width: 100%; height: 100%; object-fit: cover; opacity: .72; filter: saturate(.92) contrast(1.03); }
.hero-tint {
  position: absolute; inset: 0; z-index: -2;
  /* Calibrado para que la fotografía se vea y el titular siga legible en blanco. */
  background:
    linear-gradient(180deg, rgba(10,25,40,.71) 0%, rgba(10,25,40,.31) 38%, rgba(10,25,40,.92) 100%),
    linear-gradient(90deg, rgba(15,36,62,.91) 0%, rgba(15,36,62,.14) 62%, rgba(15,36,62,.43) 100%);
}
.hero-mesh {
  position: absolute; inset: -20%; z-index: -2;
  background:
    radial-gradient(38% 42% at 18% 78%, rgba(180,144,93,.30) 0%, transparent 70%),
    radial-gradient(34% 38% at 82% 22%, rgba(30,62,96,.72) 0%, transparent 72%),
    radial-gradient(28% 30% at 58% 96%, rgba(180,144,93,.16) 0%, transparent 70%);
  filter: blur(46px);
  animation: meshDrift 26s ease-in-out infinite alternate;
  pointer-events: none;
}
@keyframes meshDrift {
  0%   { transform: translate3d(0,0,0) scale(1); }
  100% { transform: translate3d(-3%, 2%, 0) scale(1.14); }
}
.grain {
  position: absolute; inset: 0; z-index: -1; pointer-events: none;
  opacity: .30; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='140' height='140'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/></filter><rect width='140' height='140' filter='url(%23n)' opacity='.5'/></svg>");
}
.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, .85fr);
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: end;
}
.hero h1 { max-width: 16ch; }
.hero .lead { color: var(--on-dark-2); max-width: 52ch; margin-top: 1.6rem; }
.hero-actions { margin-top: 2.4rem; }

.hero-side {
  border-left: 1px solid var(--line-gold);
  padding-left: clamp(1.2rem, 2.5vw, 2rem);
  display: flex; flex-direction: column; gap: 1.6rem;
}
.hero-stat { }
.hero-stat b {
  display: block;
  font-family: var(--font-display);
  font-size: clamp(1.9rem, 3.2vw, 2.6rem);
  font-weight: 400;
  color: var(--gold);
  line-height: 1;
}
.hero-stat span {
  display: block;
  font-size: .82rem;
  color: var(--on-dark-3);
  margin-top: .45rem;
  line-height: 1.45;
  max-width: 26ch;
}
.hero-scroll {
  position: absolute; left: 50%; bottom: 1.4rem; transform: translateX(-50%);
  font-family: var(--font-mono); font-size: .6rem; letter-spacing: .2em; text-transform: uppercase;
  color: var(--on-dark-3);
  display: flex; flex-direction: column; align-items: center; gap: .5rem;
  z-index: 2;
}
.hero-scroll i { display: block; width: 1px; height: 34px; background: linear-gradient(var(--gold), transparent); }

@media (max-width: 900px) {
  .hero { min-height: auto; padding-top: calc(var(--nav-h) + 3rem); }
  .hero-grid { grid-template-columns: 1fr; }
  .hero-side { border-left: 0; border-top: 1px solid var(--line-gold); padding-left: 0; padding-top: 1.6rem; flex-direction: row; flex-wrap: wrap; gap: 1.4rem 2rem; }
  .hero-side .hero-stat { flex: 1 1 min(100%, 240px); }
  .hero .lead { margin-top: 1.2rem; }
  .hero-actions { margin-top: 1.8rem; }
  .hero-actions .btn { flex: 1 1 100%; }
  .hero-scroll { display: none; }
}

/* ---------- 10. Marquesina ---------- */
.marquee {
  overflow: hidden;
  border-top: 1px solid var(--line-dark);
  border-bottom: 1px solid var(--line-dark);
  background: var(--navy-deep);
  padding: 1.05rem 0;
}
.marquee-track { display: flex; width: max-content; animation: marquee 42s linear infinite; }
.marquee:hover .marquee-track { animation-play-state: paused; }
.marquee-track span {
  font-family: var(--font-mono);
  font-size: .74rem; letter-spacing: .16em; text-transform: uppercase;
  color: var(--on-dark-3);
  padding: 0 1.6rem;
  display: inline-flex; align-items: center; gap: 1.6rem;
  white-space: nowrap;
}
.marquee-track span::after { content: ""; width: 4px; height: 4px; background: var(--gold); border-radius: 50%; }
@keyframes marquee { from { transform: translateX(0); } to { transform: translateX(-50%); } }

/* ---------- 11. Tarjetas ---------- */
.cards-3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(280px, 100%), 1fr)); gap: clamp(1.2rem, 2.2vw, 1.8rem); }

.card {
  position: relative;
  background: var(--paper);
  border: 1px solid var(--line-light);
  border-radius: var(--radius-lg);
  padding: clamp(1.7rem, 2.6vw, 2.4rem);
  overflow: hidden;
  isolation: isolate;
  transition: transform .5s var(--ease-out), box-shadow .5s var(--ease-out), border-color .5s var(--ease-out);
  transform-style: preserve-3d;
}
.card::before {
  content: "";
  position: absolute; inset: 0; z-index: -1;
  background: radial-gradient(420px circle at var(--mx, 50%) var(--my, 0%), var(--gold-glow), transparent 62%);
  opacity: 0; transition: opacity .5s var(--ease-out);
}
.card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); border-color: var(--line-gold); }
.card:hover::before { opacity: 1; }
.card-num {
  font-family: var(--font-mono);
  font-size: .7rem; letter-spacing: .18em;
  color: var(--gold);
  margin-bottom: 1.2rem;
  display: block;
}
.card h3 { font-size: 1.4rem; margin-bottom: .8rem; }
.card p { color: var(--ink-soft); font-size: .96rem; margin-bottom: 0; }
.card-icon { width: 46px; height: 46px; margin-bottom: 1.3rem; color: var(--gold); }
.card-icon svg { width: 100%; height: 100%; }

.card--dark { background: var(--navy-card); border-color: var(--line-dark); }
.card--dark h3 { color: var(--on-dark); }
.card--dark p { color: var(--on-dark-2); }
.card--dark:hover { border-color: var(--line-gold); box-shadow: var(--shadow-dark); }

/* Tarjeta-servicio con imagen */
.svc-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr)); gap: clamp(1.2rem, 2vw, 1.6rem); }
.svc {
  position: relative;
  display: flex; flex-direction: column;
  min-height: 400px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--navy);
  isolation: isolate;
  border: 1px solid var(--line-dark);
  transition: transform .55s var(--ease-out), box-shadow .55s var(--ease-out), border-color .55s var(--ease-out);
}
.svc img {
  position: absolute; inset: 0; z-index: -2;
  width: 100%; height: 100%; object-fit: cover;
  opacity: .60;
  transition: transform 1.1s var(--ease-out), opacity .6s var(--ease-out);
}
.svc::after {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(180deg, rgba(10,25,40,.22) 0%, rgba(10,25,40,.59) 52%, rgba(10,25,40,.94) 100%);
}
.svc:hover { transform: translateY(-6px); box-shadow: var(--shadow-dark); border-color: var(--line-gold); }
.svc:hover img { transform: scale(1.07); opacity: .74; }
.svc-body { margin-top: auto; padding: clamp(1.6rem, 2.4vw, 2.2rem); }
.svc h3 { font-size: 1.55rem; color: var(--on-dark); margin-bottom: .7rem; }
.svc p { color: var(--on-dark-2); font-size: .94rem; margin-bottom: 1.2rem; }

/* ---------- 12. Editorial dos columnas ---------- */
.split {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(320px, 100%), 1fr));
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: center;
}
.split--top { align-items: start; }
.figure {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}
.figure img { width: 100%; aspect-ratio: 4/3; object-fit: cover; }
.figure--tall img { aspect-ratio: 3/4; }
.figure-badge {
  position: absolute; left: 0; bottom: 0;
  background: var(--navy);
  color: var(--on-dark);
  padding: 1rem 1.4rem;
  border-top-right-radius: var(--radius-lg);
  font-family: var(--font-mono);
  font-size: .68rem; letter-spacing: .16em; text-transform: uppercase;
  border-top: 1px solid var(--line-gold); border-right: 1px solid var(--line-gold);
}

/* Lista con checks dorados */
.check-list { list-style: none; padding: 0; margin: 1.6rem 0 0; }
.check-list li {
  position: relative;
  padding-left: 2.1rem;
  margin-bottom: 1rem;
  color: var(--ink-soft);
  font-size: .98rem;
}
.check-list li::before {
  content: "";
  position: absolute; left: 0; top: .42em;
  width: 14px; height: 8px;
  border-left: 1.8px solid var(--gold);
  border-bottom: 1.8px solid var(--gold);
  transform: rotate(-45deg);
}
.check-list li b { color: var(--ink); font-weight: 600; }
.section--dark .check-list li, .section--deep .check-list li { color: var(--on-dark-2); }
.section--dark .check-list li b, .section--deep .check-list li b { color: var(--on-dark); }

/* ---------- 13. Metodología (scroll horizontal) ---------- */
.phases { position: relative; background: var(--navy-deep); color: var(--on-dark); overflow: hidden; }
/* En escritorio la sección queda anclada a pantalla completa mientras avanzan las
   tarjetas: debe llenar la ventana entera para que no asome nada por debajo. */
@media (min-width: 861px) {
  .phases { min-height: 100vh; display: flex; flex-direction: column; justify-content: center; }
  .phases-head { padding-top: calc(var(--nav-h) + 2rem); }
}
.phases-head { padding: clamp(4rem, 8vw, 6.5rem) 0 2.5rem; }
.phases-viewport { overflow: hidden; }
.phases-track {
  display: flex;
  gap: clamp(1rem, 2vw, 1.6rem);
  padding: 0 0 clamp(4rem, 8vw, 6rem);
  will-change: transform;
}
.phase {
  flex: none;
  width: min(84vw, 400px);
  background: var(--navy-card);
  border: 1px solid var(--line-dark);
  border-radius: var(--radius-lg);
  padding: clamp(1.7rem, 2.6vw, 2.3rem);
  display: flex; flex-direction: column;
  position: relative;
  overflow: hidden;
  isolation: isolate;
  transition: border-color .5s var(--ease-out), transform .5s var(--ease-out);
}
.phase::before {
  content: "";
  position: absolute; left: 0; top: 0; height: 2px; width: 100%;
  background: linear-gradient(90deg, var(--gold), transparent);
  transform: scaleX(0); transform-origin: left;
  transition: transform .7s var(--ease-out);
}
.phase:hover { border-color: var(--line-gold); transform: translateY(-4px); }
.phase:hover::before { transform: scaleX(1); }
.phase-num {
  font-family: var(--font-display);
  font-size: 3.4rem;
  line-height: 1;
  color: transparent;
  -webkit-text-stroke: 1px var(--gold);
  margin-bottom: 1.2rem;
}
.phase h3 { font-size: 1.32rem; color: var(--on-dark); margin-bottom: .8rem; }
.phase p { font-size: .93rem; color: var(--on-dark-2); margin-bottom: 1.2rem; }
.phase ul { list-style: none; padding: 0; margin: auto 0 0; border-top: 1px solid var(--line-dark); padding-top: 1.1rem; }
.phase ul li {
  font-family: var(--font-mono);
  font-size: .68rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--on-dark-3);
  margin-bottom: .5rem;
  padding-left: 1rem;
  position: relative;
}
.phase ul li::before { content: ""; position: absolute; left: 0; top: .55em; width: 5px; height: 1px; background: var(--gold); }
.phases-progress { height: 2px; background: var(--line-dark); position: relative; margin-bottom: clamp(3rem,6vw,4rem); }
.phases-progress i { position: absolute; inset: 0; background: var(--gold); transform: scaleX(0); transform-origin: left; }

@media (max-width: 860px) {
  .phases-viewport { overflow-x: auto; -webkit-overflow-scrolling: touch; scroll-snap-type: x mandatory; }
  .phases-track { padding-inline: 1.25rem; }
  .phase { scroll-snap-align: center; width: 82vw; }
}

/* ---------- 14. Estadísticas ---------- */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(190px, 100%), 1fr)); gap: 1px; background: var(--line-dark); border: 1px solid var(--line-dark); border-radius: var(--radius-lg); overflow: hidden; }
.stat { background: var(--navy); padding: clamp(1.6rem, 3vw, 2.4rem); }
.stat b {
  display: block;
  font-family: var(--font-display);
  font-size: clamp(2.1rem, 4vw, 3rem);
  font-weight: 400; color: var(--gold); line-height: 1;
}
.stat span { display: block; margin-top: .6rem; font-size: .85rem; color: var(--on-dark-3); line-height: 1.5; }

/* ---------- 15. Testimonios ---------- */
.testi-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr)); gap: clamp(1.2rem, 2vw, 1.7rem); }
.testi {
  background: var(--paper);
  border: 1px solid var(--line-light);
  border-radius: var(--radius-lg);
  padding: clamp(1.7rem, 2.6vw, 2.3rem);
  display: flex; flex-direction: column;
  position: relative;
  transition: transform .5s var(--ease-out), box-shadow .5s var(--ease-out);
}
.testi:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.testi-quote { font-family: var(--font-display); font-size: 2.6rem; line-height: 1; color: var(--gold); opacity: .35; margin-bottom: .4rem; }
.testi p { font-size: 1rem; color: var(--ink-soft); font-style: italic; margin-bottom: 1.6rem; }
.testi footer { margin-top: auto; border-top: 1px solid var(--line-light); padding-top: 1.1rem; }
.testi footer b { display: block; font-size: .92rem; color: var(--ink); font-weight: 600; }
.testi footer span { display: block; font-size: .8rem; color: var(--ink-mute); margin-top: .1rem; }
.demo-note {
  display: inline-flex; align-items: center; gap: .5rem;
  font-family: var(--font-mono); font-size: .64rem; letter-spacing: .14em; text-transform: uppercase;
  color: var(--ink-mute);
  border: 1px dashed var(--line-gold);
  border-radius: 100px;
  padding: .38rem .85rem;
  margin-bottom: 1.4rem;
}
.section--dark .demo-note, .section--deep .demo-note { color: var(--on-dark-3); }

/* ---------- 16. FAQ ---------- */
.faq { border-top: 1px solid var(--line-light); }
.faq-item { border-bottom: 1px solid var(--line-light); }
.faq-q {
  width: 100%;
  display: flex; align-items: flex-start; justify-content: space-between; gap: 1.5rem;
  background: none; border: 0; cursor: pointer;
  padding: 1.5rem 0;
  text-align: left;
  font-family: var(--font-display);
  font-size: clamp(1.05rem, 1.7vw, 1.28rem);
  line-height: 1.35;
  color: var(--ink);
  transition: color .3s var(--ease-out);
}
.faq-q:hover { color: var(--gold-text); }
.faq-icon { flex: none; width: 20px; height: 20px; position: relative; margin-top: .35em; }
.faq-icon::before, .faq-icon::after {
  content: ""; position: absolute; left: 0; top: 50%;
  width: 20px; height: 1.5px; background: var(--gold);
  transition: transform .45s var(--ease-out);
}
.faq-icon::after { transform: rotate(90deg); }
.faq-item.is-open .faq-icon::after { transform: rotate(0deg); }
.faq-a { overflow: hidden; height: 0; transition: height .5s var(--ease-out); }
.faq-a-inner { padding: 0 0 1.6rem; max-width: 72ch; }
.faq-a-inner p { color: var(--ink-soft); font-size: .98rem; }
.faq-a-inner p:last-child { margin-bottom: 0; }

.section--dark .faq, .section--dark .faq-item, .section--deep .faq, .section--deep .faq-item { border-color: var(--line-dark); }
.section--dark .faq-q, .section--deep .faq-q { color: var(--on-dark); }
.section--dark .faq-q:hover, .section--deep .faq-q:hover { color: var(--gold-light); }
.section--dark .faq-a-inner p, .section--deep .faq-a-inner p { color: var(--on-dark-2); }

/* ---------- 17. Formularios ---------- */
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(230px, 100%), 1fr)); gap: 1.1rem; }
.field { position: relative; display: flex; flex-direction: column; }
.field--full { grid-column: 1 / -1; }
.field label {
  font-family: var(--font-mono);
  font-size: .64rem; letter-spacing: .16em; text-transform: uppercase;
  color: var(--gold-light); margin-bottom: .5rem;
}
.field label .req { color: var(--gold-light); }
.field input, .field textarea, .field select {
  width: 100%;
  background: rgba(255,255,255,.04);
  border: 1px solid var(--line-dark);
  border-radius: var(--radius);
  padding: .92rem 1rem;
  color: var(--on-dark);
  font-size: .96rem;
  transition: border-color .35s var(--ease-out), background-color .35s var(--ease-out), box-shadow .35s var(--ease-out);
}
.field textarea { min-height: 140px; resize: vertical; }
.field input::placeholder, .field textarea::placeholder { color: var(--on-dark-3); opacity: .75; }
.field input:focus, .field textarea:focus, .field select:focus {
  outline: none;
  border-color: var(--gold);
  background: rgba(255,255,255,.07);
  box-shadow: 0 0 0 3px rgba(180,144,93,.16);
}
.field.has-error input, .field.has-error textarea, .field.has-error select { border-color: #E06B5B; }
.field-error { font-size: .76rem; color: #F0A093; margin-top: .4rem; min-height: 1.1em; }

/* Formulario sobre fondo claro */
.form--light .field input, .form--light .field textarea, .form--light .field select {
  background: var(--paper); border-color: var(--line-light); color: var(--ink);
}
.form--light .field label { color: var(--gold-text); }
.form--light .field input::placeholder, .form--light .field textarea::placeholder { color: var(--ink-mute); }
.form--light .field input:focus, .form--light .field textarea:focus { background: #fff; border-color: var(--gold); }

.form-consent { display: flex; gap: .8rem; align-items: flex-start; margin: 1.4rem 0 0; font-size: .82rem; color: var(--on-dark-3); line-height: 1.55; }
.form--light .form-consent { color: var(--ink-mute); }
.form-consent input[type="checkbox"] { width: 18px; height: 18px; flex: none; margin-top: .18em; accent-color: var(--gold); }
.form-consent a { color: var(--gold-light); text-decoration: underline; text-underline-offset: 3px; }
.form--light .form-consent a { color: var(--gold-text); }
.form-status { margin-top: 1rem; font-size: .9rem; min-height: 1.4em; }
.form-status.is-error { color: #F0A093; }
.form-status.is-ok { color: var(--gold-light); }
.form--light .form-status.is-error { color: #C0392B; }
.form--light .form-status.is-ok { color: var(--gold-deep); }

.form-panel {
  background: var(--navy-card);
  border: 1px solid var(--line-dark);
  border-radius: var(--radius-lg);
  padding: clamp(1.7rem, 3vw, 2.6rem);
}

/* Campo trampa antispam: fuera de pantalla, no enfocable, sin ocupar sitio */
.hp { position: absolute; left: -9999px; top: -9999px; width: 1px; height: 1px; overflow: hidden; opacity: 0; pointer-events: none; }

/* ---------- 18. Banda CTA ---------- */
.cta-band {
  position: relative;
  background: var(--navy);
  border-radius: var(--radius-lg);
  padding: clamp(2.2rem, 5vw, 4rem);
  overflow: hidden;
  isolation: isolate;
  border: 1px solid var(--line-gold);
}
.cta-band::before {
  content: "";
  position: absolute; inset: -40%;
  z-index: -1;
  background:
    radial-gradient(40% 46% at 12% 88%, rgba(180,144,93,.32) 0%, transparent 68%),
    radial-gradient(34% 40% at 88% 14%, rgba(30,62,96,.85) 0%, transparent 70%);
  filter: blur(40px);
  animation: meshDrift 24s ease-in-out infinite alternate;
}
.cta-band h2 { color: var(--on-dark); max-width: 20ch; }
.cta-band p { color: var(--on-dark-2); max-width: 56ch; }
.cta-band-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr)); gap: clamp(1.6rem, 4vw, 3rem); align-items: center; }

/* ---------- 19. Pie de página ---------- */
.footer { background: var(--navy-deep); color: var(--on-dark-2); padding: clamp(3.5rem, 7vw, 5.5rem) 0 0; border-top: 1px solid var(--line-gold); }
.footer-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) repeat(auto-fit, minmax(min(180px, 100%), 1fr));
  gap: clamp(2rem, 4vw, 3.5rem);
  padding-bottom: clamp(2.5rem, 5vw, 4rem);
}
.footer-brand .brand { margin-bottom: 1.3rem; }
.footer-brand p { font-size: .92rem; max-width: 40ch; color: var(--on-dark-3); }
.footer h4 {
  font-family: var(--font-mono);
  font-size: .66rem; letter-spacing: .2em; text-transform: uppercase;
  color: var(--gold); font-weight: 500;
  margin-bottom: 1.2rem;
}
.footer ul { list-style: none; margin: 0; padding: 0; }
.footer ul li { margin-bottom: .7rem; }
.footer ul a, .footer address a {
  font-size: .9rem; color: var(--on-dark-2);
  transition: color .3s var(--ease-out);
  display: inline-flex; align-items: baseline; gap: .4rem;
}
.footer ul a:hover, .footer address a:hover { color: var(--gold); }
.footer address { font-style: normal; font-size: .9rem; line-height: 1.75; color: var(--on-dark-2); }
.footer address strong { display: block; color: var(--on-dark); font-weight: 500; margin-bottom: .15rem; font-size: .82rem; }
.footer address + address { margin-top: 1.1rem; }
.footer-bottom {
  border-top: 1px solid var(--line-dark);
  padding: 1.5rem 0;
  display: flex; flex-wrap: wrap; gap: 1rem 2rem;
  align-items: center; justify-content: space-between;
  font-size: .78rem; color: var(--on-dark-3);
}
.footer-bottom nav { display: flex; flex-wrap: wrap; gap: 1.2rem; }
.footer-bottom a:hover { color: var(--gold); }
.footer-legal-note { font-size: .74rem; color: var(--on-dark-3); opacity: .8; padding-bottom: 1.5rem; max-width: 90ch; line-height: 1.6; }

/* Tableta: la marca a todo el ancho y el resto en dos columnas limpias */
@media (max-width: 1000px) {
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 2.4rem 2rem; }
  .footer-brand { grid-column: 1 / -1; }
  .footer-brand p { max-width: 60ch; }
}

/* Móvil: una sola columna, bloques separados por una línea fina */
@media (max-width: 720px) {
  .footer { padding-top: 3rem; }
  .footer-grid { grid-template-columns: 1fr; gap: 0; padding-bottom: 1.5rem; }
  .footer-grid > div { padding: 1.7rem 0; border-top: 1px solid var(--line-dark); }
  .footer-grid > .footer-brand { padding-top: 0; border-top: 0; }
  .footer-brand p { max-width: none; font-size: .95rem; }
  .footer h4 { margin-bottom: .9rem; }
  .footer ul li { margin-bottom: .55rem; }
  .footer address { line-height: 1.6; }
  .footer address + address { margin-top: .9rem; }
  .footer-bottom { flex-direction: column; align-items: flex-start; gap: .9rem; padding: 1.4rem 0 1.6rem; }
  .footer-bottom nav { flex-direction: column; gap: .55rem; }
  .footer-legal-note { padding-bottom: 1.2rem; }
}

/* ---------- 20. Widgets flotantes ---------- */
.float-stack {
  position: fixed;
  right: clamp(1rem, 2.5vw, 1.6rem);
  bottom: clamp(1rem, 2.5vw, 1.6rem);
  z-index: 900;
  display: flex; flex-direction: column; align-items: flex-end;
  gap: .8rem;
}
.fab {
  width: 58px; height: 58px;
  border-radius: 50%;
  border: 0;
  display: grid; place-items: center;
  cursor: pointer;
  box-shadow: 0 8px 26px rgba(5,14,25,.35);
  transition: transform .4s var(--ease-out), box-shadow .4s var(--ease-out);
  position: relative;
}
.fab:hover { transform: translateY(-4px) scale(1.05); box-shadow: 0 14px 34px rgba(5,14,25,.45); }
.fab svg { width: 28px; height: 28px; }
/* El glifo oficial de WhatsApp llena todo su marco, asi que va algo mas pequeno
   para que pese lo mismo que el del asistente dentro del circulo. */
.fab-wa svg { width: 26px; height: 26px; }
.fab-wa { background: #25D366; color: #fff; }
.fab-wa::after {
  content: ""; position: absolute; inset: -6px; border-radius: 50%;
  border: 1.5px solid rgba(37,211,102,.45);
  animation: fabPulse 2.8s ease-out infinite;
}
@keyframes fabPulse {
  0%   { transform: scale(.9); opacity: .9; }
  70%  { transform: scale(1.25); opacity: 0; }
  100% { transform: scale(1.25); opacity: 0; }
}
.fab-chat { background: var(--gold); color: #fff; }
.fab-chat .icon-close { display: none; }
.fab-chat.is-open .icon-chat { display: none; }
.fab-chat.is-open .icon-close { display: block; }
.fab-label {
  position: absolute; right: calc(100% + .7rem); top: 50%; transform: translateY(-50%) translateX(6px);
  background: var(--navy-deep); color: var(--on-dark);
  font-size: .76rem; white-space: nowrap;
  padding: .45rem .8rem; border-radius: var(--radius);
  border: 1px solid var(--line-gold);
  opacity: 0; pointer-events: none;
  transition: opacity .3s var(--ease-out), transform .3s var(--ease-out);
}
.fab:hover .fab-label { opacity: 1; transform: translateY(-50%) translateX(0); }
@media (max-width: 620px) {
  .fab-label { display: none; }
  .fab { width: 52px; height: 52px; }
  .fab svg { width: 25px; height: 25px; }
  .fab-wa svg { width: 23px; height: 23px; }
}

/* ---------- 21. Chat IA ---------- */
.chat-panel {
  position: fixed;
  right: clamp(1rem, 2.5vw, 1.6rem);
  bottom: calc(clamp(1rem, 2.5vw, 1.6rem) + 138px);
  width: min(calc(100vw - 2rem), 380px);
  max-height: min(72vh, 560px);
  background: var(--navy);
  border: 1px solid var(--line-gold);
  border-radius: var(--radius-lg);
  box-shadow: 0 24px 70px rgba(5,14,25,.6);
  z-index: 901;
  display: flex; flex-direction: column;
  overflow: hidden;
  opacity: 0; visibility: hidden;
  transform: translateY(14px) scale(.97);
  transform-origin: bottom right;
  transition: opacity .4s var(--ease-out), transform .4s var(--ease-out), visibility .4s;
}
.chat-panel.is-open { opacity: 1; visibility: visible; transform: none; }
.chat-head {
  padding: 1rem 1.15rem;
  border-bottom: 1px solid var(--line-dark);
  background: var(--navy-deep);
  display: flex; align-items: center; gap: .8rem;
}
.chat-avatar {
  width: 38px; height: 38px; flex: none;
  border-radius: 50%;
  background: var(--gold);
  display: grid; place-items: center;
  font-family: var(--font-display); font-size: 1rem; color: #fff;
}
.chat-head b { display: block; font-size: .9rem; color: var(--on-dark); font-weight: 600; }
.chat-head span { display: flex; align-items: center; gap: .4rem; font-size: .72rem; color: var(--on-dark-3); }
.chat-head span i { width: 6px; height: 6px; border-radius: 50%; background: #4ADE80; display: block; }
.chat-log { flex: 1; overflow-y: auto; padding: 1.15rem; display: flex; flex-direction: column; gap: .85rem; }
.chat-log::-webkit-scrollbar { width: 6px; }
.chat-log::-webkit-scrollbar-thumb { background: var(--line-gold); border-radius: 3px; }
.msg { max-width: 86%; padding: .75rem 1rem; border-radius: 12px; font-size: .89rem; line-height: 1.55; }
.msg--bot { background: var(--navy-card); color: var(--on-dark-2); border: 1px solid var(--line-dark); border-bottom-left-radius: 3px; align-self: flex-start; }
.msg--user { background: var(--gold); color: var(--navy); border-bottom-right-radius: 3px; align-self: flex-end; }
.msg strong { color: var(--on-dark); }
.msg--bot a { color: var(--gold-light); text-decoration: underline; text-underline-offset: 3px; }
.chat-typing { display: flex; gap: 4px; align-self: flex-start; padding: .8rem 1rem; }
.chat-typing i { width: 6px; height: 6px; border-radius: 50%; background: var(--on-dark-3); animation: typing 1.3s ease-in-out infinite; }
.chat-typing i:nth-child(2) { animation-delay: .18s; }
.chat-typing i:nth-child(3) { animation-delay: .36s; }
@keyframes typing { 0%, 60%, 100% { opacity: .3; transform: translateY(0); } 30% { opacity: 1; transform: translateY(-4px); } }
.chat-chips { display: flex; flex-wrap: wrap; gap: .45rem; padding: 0 1.15rem .9rem; }
.chat-chip {
  background: transparent; border: 1px solid var(--line-gold); color: var(--on-dark-2);
  border-radius: 100px; padding: .38rem .8rem; font-size: .74rem; cursor: pointer;
  transition: background-color .3s var(--ease-out), color .3s var(--ease-out);
}
.chat-chip:hover { background: var(--gold); color: var(--navy); border-color: var(--gold); }
.chat-form { display: flex; gap: .5rem; padding: .85rem 1.15rem 1rem; border-top: 1px solid var(--line-dark); }
.chat-form input {
  flex: 1; background: rgba(255,255,255,.05); border: 1px solid var(--line-dark);
  border-radius: var(--radius); padding: .7rem .9rem; color: var(--on-dark); font-size: .88rem;
}
.chat-form input:focus { outline: none; border-color: var(--gold); }
.chat-form button {
  width: 42px; height: 42px; flex: none;
  background: var(--gold); border: 0; border-radius: var(--radius); color: #fff;
  cursor: pointer; display: grid; place-items: center;
  transition: background-color .3s var(--ease-out);
}
.chat-form button:hover { background: var(--gold-deep); }
.chat-disclaimer { padding: 0 1.15rem .9rem; font-size: .67rem; color: var(--on-dark-3); line-height: 1.5; }


/* ---------- 22. Banner de cookies ---------- */
.cookie-banner {
  position: fixed;
  left: clamp(1rem, 2.5vw, 1.6rem);
  bottom: clamp(1rem, 2.5vw, 1.6rem);
  width: min(calc(100vw - 2rem), 380px);
  background: var(--navy);
  border: 1px solid var(--line-gold);
  border-radius: var(--radius-lg);
  box-shadow: 0 22px 60px rgba(5,14,25,.55);
  padding: 1.1rem 1.25rem;
  z-index: 1100;
  display: flex; align-items: center; gap: 1rem;
  transform: translateY(140%);
  transition: transform .65s var(--ease-out);
}
.cookie-banner.is-in { transform: none; }
.cookie-banner p { flex: 1; margin: 0; font-size: .82rem; color: var(--on-dark-2); line-height: 1.55; }
.cookie-banner p a { color: var(--gold); text-decoration: underline; text-underline-offset: 3px; white-space: nowrap; }
.cookie-actions { flex: none; }

/* Los botones flotantes se elevan mientras el aviso esté visible (solo en móvil,
   donde el aviso ocupa todo el ancho). El valor lo calcula main.js. */
:root { --cookie-lift: 0px; }
.float-stack, .chat-panel { transition: bottom .5s var(--ease-out); }

@media (max-width: 620px) {
  .cookie-banner {
    left: 0; right: 0; bottom: 0; width: auto;
    border-radius: 0; border-left: 0; border-right: 0; border-bottom: 0;
    padding: .85rem 1rem;
    padding-bottom: max(.85rem, env(safe-area-inset-bottom));
    gap: .8rem;
  }
  .cookie-banner p { font-size: .78rem; line-height: 1.45; }
  .cookie-actions .btn { padding: .62rem .95rem; font-size: .68rem; }
  .float-stack { bottom: calc(clamp(1rem, 2.5vw, 1.6rem) + var(--cookie-lift)); }
  .chat-panel { bottom: calc(clamp(1rem, 2.5vw, 1.6rem) + 124px + var(--cookie-lift)); }
}

/* ---------- 23. Diagnóstico IA ---------- */
.diag {
  background: var(--navy-card);
  border: 1px solid var(--line-gold);
  border-radius: var(--radius-lg);
  overflow: hidden;
  position: relative;
  isolation: isolate;
}
.diag-head { padding: clamp(1.5rem, 3vw, 2.2rem) clamp(1.5rem, 3vw, 2.4rem) 0; }
.diag-steps { display: flex; align-items: center; gap: .5rem; margin-bottom: 1.6rem; }
.diag-dot { flex: 1; height: 3px; background: var(--line-dark); border-radius: 2px; overflow: hidden; position: relative; }
.diag-dot i { position: absolute; inset: 0; background: var(--gold); transform: scaleX(0); transform-origin: left; transition: transform .6s var(--ease-out); }
.diag-dot.is-done i, .diag-dot.is-active i { transform: scaleX(1); }
.diag-count { font-family: var(--font-mono); font-size: .66rem; letter-spacing: .14em; color: var(--on-dark-3); flex: none; }
.diag-body { padding: 0 clamp(1.5rem, 3vw, 2.4rem) clamp(1.6rem, 3vw, 2.4rem); }
.diag-screen { display: none; }
.diag-screen.is-active { display: block; animation: diagIn .5s var(--ease-out); }
@keyframes diagIn { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
.diag-q { font-family: var(--font-display); font-size: clamp(1.3rem, 2.4vw, 1.75rem); color: var(--on-dark); margin-bottom: .5rem; line-height: 1.22; }
.diag-hint { font-size: .87rem; color: var(--on-dark-3); margin-bottom: 1.5rem; }
.diag-options { display: grid; gap: .65rem; }
.diag-opt {
  display: flex; align-items: center; gap: .9rem;
  width: 100%; text-align: left;
  background: rgba(255,255,255,.03);
  border: 1px solid var(--line-dark);
  border-radius: var(--radius);
  padding: 1rem 1.15rem;
  color: var(--on-dark-2);
  font-size: .95rem;
  cursor: pointer;
  transition: border-color .3s var(--ease-out), background-color .3s var(--ease-out), transform .3s var(--ease-out), color .3s var(--ease-out);
}
.diag-opt:hover { border-color: var(--gold); background: rgba(180,144,93,.1); color: var(--on-dark); transform: translateX(4px); }
.diag-opt.is-selected { border-color: var(--gold); background: rgba(180,144,93,.16); color: var(--on-dark); }
.diag-opt i {
  flex: none; width: 20px; height: 20px; border-radius: 50%;
  border: 1.5px solid var(--line-gold);
  display: grid; place-items: center;
  font-style: normal; font-size: .6rem; color: transparent;
  transition: background-color .3s var(--ease-out), color .3s var(--ease-out);
}
.diag-opt.is-selected i, .diag-opt:hover i { background: var(--gold); color: #fff; }
.diag-nav { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-top: 1.6rem; }
.diag-back {
  background: none; border: 0; color: var(--on-dark-3); font-size: .82rem; cursor: pointer;
  display: inline-flex; align-items: center; gap: .4rem;
  transition: color .3s var(--ease-out);
}
.diag-back:hover { color: var(--gold); }
.diag-back[hidden] { visibility: hidden; display: inline-flex !important; pointer-events: none; }

.diag-result-badge {
  display: inline-flex; align-items: center; gap: .6rem;
  background: rgba(180,144,93,.16);
  border: 1px solid var(--gold);
  border-radius: 100px;
  padding: .45rem 1rem;
  font-family: var(--font-mono); font-size: .66rem; letter-spacing: .14em; text-transform: uppercase;
  color: var(--gold-light);
  margin-bottom: 1.2rem;
}
.diag-result h3 { font-size: clamp(1.4rem, 2.6vw, 1.9rem); color: var(--on-dark); margin-bottom: .8rem; }
.diag-result-text { color: var(--on-dark-2); font-size: .97rem; line-height: 1.7; }
.diag-result-text p { margin-bottom: .9rem; }
.diag-result-text ul { padding-left: 1.2rem; }
.diag-result-text li { color: var(--on-dark-2); }
.diag-loading { display: flex; flex-direction: column; align-items: center; gap: 1.2rem; padding: 3rem 0; text-align: center; }
.diag-spinner {
  width: 46px; height: 46px; border-radius: 50%;
  border: 2px solid var(--line-dark); border-top-color: var(--gold);
  animation: spin 1s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.diag-loading p { color: var(--on-dark-3); font-size: .9rem; margin: 0; }
.diag-legal {
  margin-top: 1.5rem; padding-top: 1.2rem;
  border-top: 1px solid var(--line-dark);
  font-size: .74rem; color: var(--on-dark-3); line-height: 1.6;
}

/* ---------- 24. Páginas legales ---------- */
.legal-body { max-width: 78ch; }
.legal-body h2 { font-size: clamp(1.35rem, 2.4vw, 1.75rem); margin: 2.6rem 0 .9rem; }
.legal-body h2:first-child { margin-top: 0; }
.legal-body h3 { font-size: 1.15rem; margin: 1.8rem 0 .6rem; }
.legal-body p, .legal-body li { color: var(--ink-soft); font-size: .97rem; }
.legal-body table { width: 100%; border-collapse: collapse; margin: 1.4rem 0; font-size: .9rem; }
.legal-body th, .legal-body td { border: 1px solid var(--line-light); padding: .75rem .9rem; text-align: left; vertical-align: top; }
.legal-body th { background: var(--smoke); font-weight: 600; color: var(--ink); font-size: .84rem; }
.legal-toc {
  background: var(--smoke);
  border: 1px solid var(--line-light);
  border-left: 2px solid var(--gold);
  border-radius: var(--radius);
  padding: 1.4rem 1.6rem;
  margin-bottom: 2.5rem;
}
.legal-toc h4 { font-family: var(--font-mono); font-size: .66rem; letter-spacing: .18em; text-transform: uppercase; color: var(--gold-text); margin-bottom: .8rem; }
.legal-toc ol { margin: 0; padding-left: 1.2rem; }
.legal-toc li { margin-bottom: .35rem; font-size: .9rem; }
.legal-toc a:hover { color: var(--gold-text); text-decoration: underline; }
.legal-meta {
  font-family: var(--font-mono); font-size: .7rem; letter-spacing: .1em;
  color: var(--ink-mute); text-transform: uppercase;
  padding-bottom: 1.2rem; border-bottom: 1px solid var(--line-light); margin-bottom: 2.2rem;
}

/* ---------- 25. Gracias ---------- */
.thanks {
  min-height: 100vh;
  display: flex; align-items: center;
  background: var(--navy-deep);
  color: var(--on-dark);
  padding: calc(var(--nav-h) + 4rem) 0 5rem;
  position: relative; overflow: hidden; isolation: isolate;
}
.thanks-check {
  width: 84px; height: 84px;
  border-radius: 50%;
  border: 1.5px solid var(--gold);
  display: grid; place-items: center;
  margin-bottom: 2rem;
}
.thanks-check svg { width: 38px; height: 38px; }
.thanks-check svg path {
  stroke: var(--gold); stroke-width: 2.2; fill: none;
  stroke-linecap: round; stroke-linejoin: round;
  stroke-dasharray: 48; stroke-dashoffset: 48;
  animation: drawCheck .9s var(--ease-out) .35s forwards;
}
@keyframes drawCheck { to { stroke-dashoffset: 0; } }
.next-steps { list-style: none; padding: 0; margin: 2.5rem 0 0; display: grid; gap: 1px; background: var(--line-dark); border: 1px solid var(--line-dark); border-radius: var(--radius-lg); overflow: hidden; }
.next-steps li { background: var(--navy); margin: 0; padding: 1.35rem 1.5rem; display: flex; gap: 1.1rem; align-items: flex-start; }
.next-steps li b { font-family: var(--font-mono); font-size: .68rem; letter-spacing: .14em; color: var(--gold); flex: none; padding-top: .28em; }
.next-steps li span { font-size: .95rem; color: var(--on-dark-2); }
.next-steps li span strong { color: var(--on-dark); font-weight: 600; }

/* ---------- 26. Cabecera de página interior ---------- */
.page-head {
  background: var(--navy-deep);
  color: var(--on-dark);
  padding: calc(var(--nav-h) + clamp(3.5rem, 7vw, 6rem)) 0 clamp(3rem, 6vw, 5rem);
  position: relative; overflow: hidden; isolation: isolate;
}
.breadcrumb {
  font-family: var(--font-mono);
  font-size: .66rem; letter-spacing: .14em; text-transform: uppercase;
  color: var(--on-dark-3);
  margin-bottom: 1.4rem;
  display: flex; flex-wrap: wrap; gap: .55rem;
}
.breadcrumb a:hover { color: var(--gold); }
.breadcrumb span { color: var(--gold); }

/* ---------- 27. Movimiento reducido (solo lo intrusivo) ---------- */
@media (prefers-reduced-motion: reduce) {
  .hero-mesh, .cta-band::before { animation: none; }
  .fab-wa::after { animation: none; }
  .marquee-track { animation-duration: 90s; }
}

/* ---------- 28. Impresión ---------- */
@media print {
  .nav, .float-stack, .chat-panel, .cookie-banner, .progress-bar, .footer { display: none !important; }
  body { background: #fff; color: #000; }
}
