/* =============================================================
   1. Tokens
   ============================================================= */
:root {
  --bg:        #F8F2E3;   /* beige/crema muy claro */
  --bg-2:      #EFE3C8;   /* sand un poco más oscuro */
  --paper:     #FFFDF8;
  --ink:       #201D16;   /* casi negro cálido */
  --ink-soft:  #3A362B;
  --ink-mute:  #6B6555;
  --bottle:    #1B3A2B;   /* verde botella oscuro */
  --bottle-2:  #142C20;
  --copper:    #B5651D;   /* cobre / terracota */
  --copper-2:  #8F4E14;
  --copper-soft: #E7C9A6;
  --line:      rgba(32,29,22,0.12);
  --line-soft: rgba(32,29,22,0.07);
  --cream-on-dark: #F3ECDA;

  --sans: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --serif: "Fraunces", "Cormorant Garamond", Georgia, serif;

  --ease-out:  cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in:   cubic-bezier(0.7, 0, 0.84, 0);
  --ease-soft: cubic-bezier(0.25, 0.46, 0.45, 0.94);
  --ease-bounce: cubic-bezier(0.34, 1.56, 0.64, 1);

  --container: 1200px;
  --gutter: clamp(1.25rem, 4vw, 3rem);
  --radius: 18px;
  --radius-sm: 10px;
  --shadow-soft: 0 20px 45px -25px rgba(27, 58, 43, 0.35);
  --shadow-lift: 0 30px 70px -30px rgba(27, 58, 43, 0.45);
}

/* =============================================================
   2. Reset & base
   ============================================================= */
*, *::before, *::after { box-sizing: border-box; margin: 0; }
html {
  -webkit-text-size-adjust: 100%;
  tab-size: 2;
  overflow-x: clip;
  scroll-behavior: smooth;
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.65;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
  overscroll-behavior-y: none;
}
img, svg, video { display: block; max-width: 100%; }
img { height: auto; }
button { font: inherit; color: inherit; cursor: pointer; border: 0; background: none; }
a { color: inherit; text-decoration: none; }
p { text-wrap: pretty; }
ul, ol { list-style: none; padding: 0; }
h1, h2, h3, h4 { text-wrap: balance; line-height: 1.05; letter-spacing: -0.02em; font-family: var(--serif); font-weight: 500; }
h1 em, h2 em, h3 em { font-style: italic; color: var(--copper); }
::selection { background: var(--copper); color: var(--cream-on-dark); }

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

.skip-link {
  position: fixed; top: -100px; left: 1rem;
  padding: .7rem 1.1rem; background: var(--bottle); color: var(--cream-on-dark);
  z-index: 9999; border-radius: 8px; font-weight: 600; font-size: .9rem;
  transition: top .3s var(--ease-out);
}
.skip-link:focus { top: 1rem; }

/* =============================================================
   3. Utilities
   ============================================================= */
.container { max-width: var(--container); margin-inline: auto; padding-inline: var(--gutter); }
.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;
}
.eyebrow {
  display: inline-flex; align-items: center; gap: .5em;
  font-family: var(--sans); font-size: .78rem; font-weight: 600;
  letter-spacing: .12em; text-transform: uppercase; color: var(--copper);
}
.eyebrow::before {
  content: ""; width: 22px; height: 1px; background: var(--copper);
}
.section { padding-block: clamp(4rem, 9vw, 8rem); position: relative; }
.section-head { max-width: 46rem; margin-bottom: clamp(2.5rem, 5vw, 4rem); }
.section-head h2 { font-size: clamp(2rem, 4vw, 3.1rem); margin-block: .6rem 1rem; }
.section-head p { color: var(--ink-mute); font-size: 1.08rem; max-width: 42ch; }
.section-bg-dark { background: var(--bottle); color: var(--cream-on-dark); }
.section-bg-dark .ink-mute { color: rgba(243,236,218,0.72); }
.section-bg-paper { background: var(--paper); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .6em;
  padding: .95rem 1.7rem; border-radius: 999px; font-weight: 600; font-size: .98rem;
  transition: transform .35s var(--ease-out), box-shadow .35s var(--ease-out), background-color .3s var(--ease-out), color .3s var(--ease-out);
  white-space: nowrap;
}
.btn-primary {
  background: var(--copper); color: #fff;
  box-shadow: 0 14px 30px -12px rgba(181,101,29,0.55);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 20px 40px -14px rgba(181,101,29,0.6); }
.btn-ghost {
  background: transparent; color: var(--ink); border: 1.5px solid var(--line);
}
.btn-ghost:hover { border-color: var(--bottle); background: rgba(27,58,43,0.05); }
.btn-on-dark { background: var(--copper); color: #fff; }
.btn-solid-bottle { background: var(--bottle); color: var(--cream-on-dark); }
.btn-solid-bottle:hover { background: var(--bottle-2); transform: translateY(-2px); }
.btn-ghost-on-dark { border: 1.5px solid rgba(243,236,218,0.3); color: var(--cream-on-dark); }
.btn-ghost-on-dark:hover { border-color: var(--cream-on-dark); background: rgba(243,236,218,0.08); }
.btn-block { width: 100%; white-space: normal; }
.btn[disabled] { opacity: .55; pointer-events: none; }

/* =============================================================
   4. Reveal / reduced-motion rules
   ============================================================= */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity .9s var(--ease-out), transform .9s var(--ease-out); }
.reveal.is-visible { opacity: 1; transform: none; }
.reveal[data-split] { opacity: 1; transform: none; }
.reveal-delay-1 { transition-delay: .08s; }
.reveal-delay-2 { transition-delay: .16s; }
.reveal-delay-3 { transition-delay: .24s; }
.reveal-delay-4 { transition-delay: .32s; }

@media (prefers-reduced-motion: reduce) {
  .marquee-track { animation: none !important; }
  .hero-mesh { animation: none !important; }
  .particle, .hero-particles { display: none !important; }
}

/* =============================================================
   5. Header / nav
   ============================================================= */
.site-header {
  position: fixed; inset-inline: 0; top: 0; z-index: 500;
  padding-block: 1.1rem;
  transition: background-color .4s var(--ease-out), box-shadow .4s var(--ease-out), padding .4s var(--ease-out);
}
.site-header .container { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.site-header.is-scrolled {
  background: rgba(248,242,227,0.92);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  box-shadow: 0 1px 0 var(--line);
  padding-block: .75rem;
}
.site-header.is-scrolled .brand { color: var(--ink); }
.site-header.is-scrolled .main-nav a { color: var(--ink-soft); text-shadow: none; }
.site-header.is-scrolled .header-actions .btn-ghost { color: var(--ink); border-color: var(--line); }
.site-header.is-scrolled .nav-toggle { border-color: var(--line); }
.site-header.is-scrolled .nav-toggle span,
.site-header.is-scrolled .nav-toggle span::before,
.site-header.is-scrolled .nav-toggle span::after { background: var(--ink); }
.brand { display: flex; align-items: center; gap: .5rem; font-family: var(--serif); font-size: clamp(1rem, 3.6vw, 1.25rem); font-weight: 600; letter-spacing: -0.01em; color: var(--cream-on-dark); white-space: nowrap; transition: color .4s var(--ease-out); }
.brand-mark {
  width: 38px; height: 38px; border-radius: 10px;
  background: linear-gradient(155deg, var(--bottle), var(--bottle-2));
  display: grid; place-items: center; color: var(--copper-soft); font-family: var(--serif); font-style: italic; font-size: 1.1rem;
  flex-shrink: 0;
  box-shadow: 0 0 0 1px rgba(243,236,218,0.25);
}
.main-nav { display: none; }
.main-nav ul { display: flex; align-items: center; gap: 1.3rem; }
.main-nav a {
  font-size: .89rem; font-weight: 500; white-space: nowrap; color: rgba(243,236,218,0.92); position: relative; padding-bottom: 3px;
  text-shadow: 0 1px 6px rgba(0,0,0,0.35);
  transition: color .4s var(--ease-out);
}
.main-nav a::after {
  content: ""; position: absolute; left: 0; right: 100%; bottom: 0; height: 1.5px; background: var(--copper);
  transition: right .4s var(--ease-out);
}
.main-nav a:hover::after { right: 0; }
.header-actions { display: flex; align-items: center; gap: .6rem; }
.header-actions .btn { padding: .7rem 1.1rem; font-size: .84rem; }
.header-actions .btn-primary { padding-inline: 1rem; }
.header-actions .btn-ghost { display: none; color: var(--cream-on-dark); border-color: rgba(243,236,218,0.35); transition: color .4s var(--ease-out), border-color .4s var(--ease-out); }
.nav-toggle {
  display: grid; place-items: center; width: 42px; height: 42px; border-radius: 10px;
  border: 1.5px solid rgba(243,236,218,0.35);
  transition: border-color .4s var(--ease-out);
}
.nav-toggle span, .nav-toggle span::before, .nav-toggle span::after {
  content: ""; display: block; width: 18px; height: 1.6px; background: var(--cream-on-dark); position: relative; transition: transform .3s var(--ease-out), opacity .3s var(--ease-out), background-color .4s var(--ease-out);
}
.nav-toggle span::before { position: absolute; top: -6px; }
.nav-toggle span::after { position: absolute; top: 6px; }
.nav-toggle[aria-expanded="true"] span { background: transparent; }
.nav-toggle[aria-expanded="true"] span::before { transform: translateY(6px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span::after { transform: translateY(-6px) rotate(-45deg); }

.mobile-nav {
  position: fixed; inset: 0; z-index: 490; background: var(--bottle); color: var(--cream-on-dark);
  display: flex; flex-direction: column; justify-content: center; padding: 6rem var(--gutter) 3rem;
  overflow-y: auto;
  transform: translateY(-100%); transition: transform .5s var(--ease-out);
}
.mobile-nav.is-open { transform: translateY(0); }
.mobile-nav ul { display: flex; flex-direction: column; gap: 1.1rem; margin-bottom: 2.5rem; }
.mobile-nav ul a { font-family: var(--serif); font-size: 1.7rem; font-style: italic; }
.mobile-nav .btn { align-self: flex-start; max-width: 100%; white-space: normal; text-align: center; }

/* Pantallas bajas (móvil en horizontal): compactar para que quepa sin desbordarse */
@media (max-height: 480px) {
  .mobile-nav { padding: 4.5rem var(--gutter) 1.5rem; justify-content: flex-start; }
  .mobile-nav ul { gap: .5rem; margin-bottom: 1.2rem; }
  .mobile-nav ul a { font-size: 1.2rem; }
}

@media (min-width: 1280px) {
  .main-nav { display: block; }
  .nav-toggle { display: none; }
  .header-actions { gap: .9rem; }
  .header-actions .btn { padding: .7rem 1.35rem; font-size: .88rem; }
  .header-actions .btn-ghost { display: inline-flex; }
}

/* =============================================================
   6. Hero
   ============================================================= */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex; align-items: flex-end;
  padding-block: 9rem 4.5rem;
  overflow: clip;
  isolation: isolate;
}
.hero-bg { position: absolute; inset: 0; z-index: -2; }
.hero-bg img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 30%; }
.hero-bg-tint {
  position: absolute; inset: 0;
  background:
    linear-gradient(180deg, rgba(10,20,15,0.65) 0%, rgba(10,20,15,0.32) 12%, transparent 24%),
    linear-gradient(190deg, rgba(20,44,32,0.16) 0%, rgba(20,44,32,0.55) 62%, rgba(20,44,32,0.86) 100%);
}
.hero-grain {
  position: absolute; inset: 0; z-index: -1; opacity: .06; mix-blend-mode: overlay; pointer-events: none;
  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='0.9' numOctaves='2' stitchTiles='stitch'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
}
.hero-content { color: var(--cream-on-dark); max-width: 44rem; }
.hero-meta { display: flex; align-items: center; gap: .6rem; margin-bottom: 1.3rem; font-size: .85rem; letter-spacing: .04em; color: rgba(243,236,218,0.85); }
.hero-meta .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--copper); box-shadow: 0 0 0 4px rgba(181,101,29,0.25); }
.hero-title { font-size: clamp(2.6rem, 6vw, 4.6rem); line-height: 1.03; max-width: 20ch; margin-bottom: 1.3rem; text-shadow: 0 6px 30px rgba(0,0,0,0.25); }
.hero-title em { color: var(--copper-soft); }
.hero-sub { font-size: clamp(1.05rem, 1.6vw, 1.25rem); color: rgba(243,236,218,0.9); max-width: 38ch; margin-bottom: 2.1rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 1rem; margin-bottom: 2.6rem; }
.hero-stats { display: grid; grid-template-columns: repeat(2,1fr); gap: 1.4rem 2.2rem; max-width: 30rem; padding-top: 1.8rem; border-top: 1px solid rgba(243,236,218,0.22); }
.hero-stat b { display: block; font-family: var(--serif); font-size: clamp(1.5rem, 3vw, 2rem); color: var(--copper-soft); }
.hero-stat span { font-size: .82rem; color: rgba(243,236,218,0.78); }

@media (min-width: 720px) { .hero-stats { grid-template-columns: repeat(4,1fr); } }

/* =============================================================
   7. Manifesto
   ============================================================= */
.manifesto { padding-block: clamp(4rem, 8vw, 6.5rem); }
.manifesto .container { display: grid; gap: 2.5rem; }
.manifesto-num { font-family: var(--serif); font-style: italic; color: var(--copper); font-size: 1.1rem; }
.manifesto-text { font-family: var(--serif); font-size: clamp(1.4rem, 2.6vw, 2rem); line-height: 1.35; max-width: 34ch; }
.manifesto-text em { color: var(--bottle); }
.manifesto-aside { color: var(--ink-mute); max-width: 40ch; align-self: end; font-size: 1.02rem; }

@media (min-width: 960px) {
  .manifesto .container { grid-template-columns: .8fr 1.2fr; align-items: end; }
}

/* =============================================================
   8. Ventajas — bento grid
   ============================================================= */
.bento-grid {
  display: grid; gap: 1.1rem;
  grid-template-columns: repeat(2, 1fr);
}
@media (min-width: 720px) { .bento-grid { grid-template-columns: repeat(4, 1fr); } }
.bento-card {
  background: var(--paper); border: 1px solid var(--line-soft); border-radius: var(--radius);
  padding: 1.9rem 1.6rem; display: flex; flex-direction: column; gap: .9rem;
  grid-column: span 2;
  transition: transform .5s var(--ease-out), box-shadow .5s var(--ease-out), border-color .5s var(--ease-out);
  position: relative; overflow: clip;
}
.bento-card:nth-child(1), .bento-card:nth-child(4) { grid-column: span 2; }
@media (min-width: 720px) {
  .bento-card:nth-child(1) { grid-column: span 2; }
  .bento-card:nth-child(2) { grid-column: span 2; }
  .bento-card:nth-child(3) { grid-column: span 2; }
  .bento-card:nth-child(4) { grid-column: span 2; }
  .bento-card:nth-child(5) { grid-column: span 2; }
  .bento-card:nth-child(6) { grid-column: span 2; }
}
.bento-card::before {
  content: ""; position: absolute; inset: -40% -20% auto -20%; height: 60%;
  background: radial-gradient(closest-side, rgba(181,101,29,0.16), transparent 75%);
  opacity: 0; transition: opacity .5s var(--ease-out); pointer-events: none;
}
.bento-card:hover, .bento-card:focus-within {
  transform: translateY(-6px) rotate(-.3deg);
  box-shadow: var(--shadow-soft); border-color: rgba(181,101,29,0.35);
}
.bento-card:hover::before { opacity: 1; }
.bento-icon {
  width: 46px; height: 46px; border-radius: 12px; background: var(--bg-2);
  display: grid; place-items: center; color: var(--bottle);
}
.bento-card h3 { font-size: 1.18rem; }
.bento-card p { color: var(--ink-mute); font-size: .95rem; }

/* =============================================================
   9. Cómo funciona — dos rutas
   ============================================================= */
.rutas { display: grid; gap: 1.6rem; }
@media (min-width: 960px) { .rutas { grid-template-columns: repeat(2, 1fr); } }
.ruta-card {
  background: var(--paper); border-radius: 22px; padding: clamp(1.8rem, 3vw, 2.6rem);
  border: 1px solid var(--line-soft); position: relative; overflow: clip;
  display: flex; flex-direction: column;
}
.ruta-card.is-judicial { background: var(--bottle); color: var(--cream-on-dark); border-color: transparent; }
.ruta-card.is-judicial .ruta-sub { color: rgba(243,236,218,0.8); }
.ruta-badge {
  display: inline-flex; align-self: flex-start; padding: .4rem .9rem; border-radius: 999px;
  font-size: .76rem; font-weight: 600; letter-spacing: .05em; text-transform: uppercase;
  background: var(--bg-2); color: var(--bottle); margin-bottom: 1.2rem;
}
.ruta-card.is-judicial .ruta-badge { background: rgba(181,101,29,0.22); color: var(--copper-soft); }
.ruta-card h3 { font-size: clamp(1.5rem, 2.4vw, 1.9rem); margin-bottom: .5rem; }
.ruta-sub { color: var(--ink-mute); margin-bottom: 1.4rem; font-size: .98rem; }
.ruta-duracion {
  display: flex; align-items: center; gap: .6rem; font-size: .92rem; font-weight: 600;
  color: var(--copper); margin-bottom: 1.3rem; padding-bottom: 1.3rem; border-bottom: 1px dashed var(--line);
}
.ruta-card.is-judicial .ruta-duracion { color: var(--copper-soft); border-color: rgba(243,236,218,0.2); }
.ruta-cuando { font-size: .93rem; margin-bottom: 1.5rem; }
.ruta-cuando strong { display: block; font-size: .78rem; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-mute); margin-bottom: .35rem; }
.ruta-card.is-judicial .ruta-cuando strong { color: rgba(243,236,218,0.6); }
.ruta-pasos { display: flex; flex-direction: column; gap: .9rem; margin-top: 1.6rem; }
.ruta-paso { display: flex; gap: .8rem; font-size: .93rem; }
.ruta-paso-num {
  flex-shrink: 0; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center;
  font-size: .78rem; font-weight: 700; background: var(--bg-2); color: var(--bottle);
}
.ruta-card.is-judicial .ruta-paso-num { background: rgba(243,236,218,0.14); color: var(--copper-soft); }

/* =============================================================
   10. Diagnóstico interactivo
   ============================================================= */
.diagnostico-panel {
  background: linear-gradient(155deg, var(--bottle) 0%, var(--bottle-2) 100%);
  color: var(--cream-on-dark); border-radius: 28px; padding: clamp(2rem, 5vw, 4rem);
  position: relative; overflow: clip; display: grid; gap: 2.2rem;
}
.diagnostico-panel > * { min-width: 0; }
.diagnostico-halo {
  position: absolute; inset: -60% -20% auto -20%; height: 90%;
  background: radial-gradient(45% 55% at 50% 30%, rgba(181,101,29,0.35), transparent 70%);
  filter: blur(60px); pointer-events: none;
}
.diagnostico-copy h2 { font-size: clamp(1.9rem, 3.6vw, 2.6rem); margin-bottom: 1rem; max-width: 20ch; }
.diagnostico-copy p { color: rgba(243,236,218,0.85); max-width: 46ch; margin-bottom: 1.6rem; }
.diagnostico-points { display: flex; flex-wrap: wrap; gap: .7rem 1.5rem; margin-bottom: 1.8rem; }
.diagnostico-points li { display: flex; align-items: center; gap: .5rem; font-size: .88rem; color: rgba(243,236,218,0.85); }
.diagnostico-points li::before { content: "✓"; color: var(--copper-soft); font-weight: 700; }

@media (min-width: 960px) { .diagnostico-panel { grid-template-columns: 1fr 1fr; align-items: center; } }

.diag-card {
  background: rgba(248,242,227,0.06); border: 1px solid rgba(243,236,218,0.16); border-radius: 22px;
  padding: clamp(1.5rem, 3vw, 2.2rem); backdrop-filter: blur(6px);
}
.diag-progress { display: flex; gap: .4rem; margin-bottom: 1.5rem; }
.diag-progress span { flex: 1; height: 4px; border-radius: 999px; background: rgba(243,236,218,0.18); overflow: hidden; }
.diag-progress span::after { content: ""; display: block; height: 100%; width: 0%; background: var(--copper); transition: width .4s var(--ease-out); }
.diag-progress span.is-done::after, .diag-progress span.is-active::after { width: 100%; }

.diag-step { display: none; }
.diag-step.is-active { display: block; animation: diagFade .5s var(--ease-out); }
@keyframes diagFade { from { opacity: 0; transform: translateX(14px); } to { opacity: 1; transform: none; } }
.diag-step h3 { font-size: 1.25rem; margin-bottom: 1.1rem; font-family: var(--serif); }
.diag-options { display: flex; flex-direction: column; gap: .7rem; margin-bottom: 1.6rem; }
.diag-option {
  display: flex; align-items: center; gap: .8rem; padding: .9rem 1.1rem; border-radius: 12px;
  border: 1.5px solid rgba(243,236,218,0.18); cursor: pointer; transition: border-color .3s var(--ease-out), background-color .3s var(--ease-out);
  font-size: .95rem;
}
.diag-option:hover { border-color: rgba(243,236,218,0.4); }
.diag-option input { accent-color: var(--copper); width: 17px; height: 17px; flex-shrink: 0; }
.diag-option.is-checked { border-color: var(--copper); background: rgba(181,101,29,0.14); }
.diag-nav { display: flex; justify-content: space-between; gap: .8rem; flex-wrap: wrap; }
.diag-nav .btn { white-space: normal; text-align: center; flex: 1 1 auto; min-width: 0; }
.diag-fields { display: grid; gap: .9rem; margin-bottom: 1.4rem; }
.diag-fields label { font-size: .82rem; color: rgba(243,236,218,0.7); display: block; margin-bottom: .4rem; }
.diag-fields input {
  width: 100%; padding: .8rem 1rem; border-radius: 10px; border: 1.5px solid rgba(243,236,218,0.2);
  background: rgba(5,15,10,0.25); color: var(--cream-on-dark); font: inherit;
}
.diag-fields input::placeholder { color: rgba(243,236,218,0.4); }
.diag-fields input:focus { outline: none; border-color: var(--copper); }
.diag-consent { display: flex; align-items: flex-start; gap: .6rem; font-size: .8rem; color: rgba(243,236,218,0.65); margin-bottom: 1.2rem; }
.diag-consent input { margin-top: 3px; accent-color: var(--copper); }

.diag-result { display: none; }
.diag-result.is-active { display: block; animation: diagFade .5s var(--ease-out); }
.diag-result-badge {
  display: inline-flex; padding: .45rem 1rem; border-radius: 999px; font-size: .78rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: .05em; margin-bottom: 1.1rem;
}
.diag-result-badge.is-notarial { background: rgba(52,199,89,0.18); color: #8be6a4; }
.diag-result-badge.is-judicial { background: rgba(181,101,29,0.25); color: var(--copper-soft); }
.diag-result-badge.is-mixto { background: rgba(255,193,7,0.2); color: #ffdf8a; }
.diag-result h3 { font-size: 1.4rem; margin-bottom: .8rem; }
.diag-result p { font-size: .95rem; color: rgba(243,236,218,0.85); margin-bottom: 1rem; }
.diag-result-metrics { display: grid; grid-template-columns: 1fr 1fr; gap: .9rem; margin-bottom: 1.3rem; }
.diag-result-metric { background: rgba(243,236,218,0.06); border-radius: 12px; padding: .9rem 1rem; }
.diag-result-metric span { display: block; font-size: .72rem; text-transform: uppercase; letter-spacing: .05em; color: rgba(243,236,218,0.55); margin-bottom: .3rem; }
.diag-result-metric b { font-family: var(--serif); font-size: 1.15rem; color: var(--copper-soft); }
.diag-result-note { font-size: .78rem; color: rgba(243,236,218,0.55); border-top: 1px solid rgba(243,236,218,0.15); padding-top: 1rem; }
.diag-loading { display: flex; align-items: center; gap: .6rem; font-size: .88rem; color: rgba(243,236,218,0.7); }
.diag-loading .dot-spin { width: 14px; height: 14px; border-radius: 50%; border: 2px solid rgba(243,236,218,0.25); border-top-color: var(--copper-soft); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* =============================================================
   11. Testimonios
   ============================================================= */
.testi-wrap { position: relative; }
.testi-demo-flag {
  display: inline-flex; align-items: center; gap: .4rem; font-size: .76rem; font-weight: 600;
  color: var(--ink-mute); background: var(--bg-2); padding: .3rem .8rem; border-radius: 999px; margin-bottom: 1.6rem;
}
.testi-track { display: grid; gap: 1.4rem; }
@media (min-width: 960px) { .testi-track { grid-template-columns: repeat(3, 1fr); } }
.testi-card {
  background: var(--paper); border: 1px solid var(--line-soft); border-radius: var(--radius);
  padding: 2rem; display: flex; flex-direction: column; gap: 1.1rem;
}
.testi-quote { font-family: var(--serif); font-style: italic; font-size: 1.12rem; line-height: 1.5; color: var(--ink-soft); }
.testi-quote::before { content: "\201C"; color: var(--copper); margin-right: .1em; }
.testi-person { display: flex; align-items: center; gap: .8rem; margin-top: auto; }
.testi-avatar {
  width: 44px; height: 44px; border-radius: 50%; background: var(--bottle); color: var(--copper-soft);
  display: grid; place-items: center; font-family: var(--serif); font-weight: 600; flex-shrink: 0;
}
.testi-person b { display: block; font-size: .93rem; }
.testi-person span { font-size: .8rem; color: var(--ink-mute); }

/* =============================================================
   12. FAQ accordion
   ============================================================= */
.faq-list { display: flex; flex-direction: column; border-top: 1px solid var(--line); }
.faq-item { border-bottom: 1px solid var(--line); }
.faq-q {
  width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: 1.5rem .2rem; text-align: left; font-family: var(--serif); font-size: 1.1rem;
}
.faq-q-plus {
  flex-shrink: 0; width: 30px; height: 30px; border-radius: 50%; border: 1.5px solid var(--line);
  display: grid; place-items: center; position: relative;
}
.faq-q-plus::before, .faq-q-plus::after { content: ""; position: absolute; background: var(--bottle); transition: transform .35s var(--ease-out); }
.faq-q-plus::before { width: 12px; height: 1.6px; }
.faq-q-plus::after { width: 1.6px; height: 12px; }
.faq-item.is-open .faq-q-plus::after { transform: rotate(90deg) scaleY(0); }
.faq-a { max-height: 0; overflow: hidden; transition: max-height .5s var(--ease-out); }
.faq-a-inner { padding: 0 .2rem 1.6rem; color: var(--ink-mute); max-width: 62ch; font-size: .97rem; }

/* =============================================================
   13. Contacto
   ============================================================= */
.contacto-grid { display: grid; gap: 2.5rem; }
.contacto-grid > * { min-width: 0; }
@media (min-width: 960px) { .contacto-grid { grid-template-columns: 1fr 1fr; align-items: start; } }
.contacto-info { display: flex; flex-direction: column; gap: 1.6rem; }
.contacto-item { display: flex; gap: 1rem; align-items: flex-start; }
.contacto-icon {
  width: 44px; height: 44px; border-radius: 12px; background: var(--bg-2); color: var(--bottle);
  display: grid; place-items: center; flex-shrink: 0;
}
.contacto-item b { display: block; font-size: .95rem; margin-bottom: .2rem; }
.contacto-item span, .contacto-item a { color: var(--ink-mute); font-size: .93rem; }
.contacto-item a:hover { color: var(--copper); }

.contacto-form { background: var(--bg); border: 1px solid var(--line-soft); border-radius: var(--radius); padding: clamp(1.6rem, 3vw, 2.4rem); box-shadow: var(--shadow-soft); }
.form-row { display: grid; gap: .4rem; margin-bottom: 1.1rem; }
.form-row label { font-size: .82rem; font-weight: 600; color: var(--ink-soft); }
.form-row input, .form-row textarea {
  width: 100%; padding: .85rem 1rem; border-radius: 10px; border: 1.5px solid var(--line);
  background: var(--bg); font: inherit; color: var(--ink); resize: vertical;
  transition: border-color .3s var(--ease-out);
}
.form-row input:focus, .form-row textarea:focus { outline: none; border-color: var(--bottle); }
.form-consent { display: flex; align-items: flex-start; gap: .6rem; font-size: .8rem; color: var(--ink-mute); margin-bottom: 1.3rem; }
.form-consent input { margin-top: 3px; accent-color: var(--bottle); }
.form-status { font-size: .88rem; margin-top: 1rem; padding: .8rem 1rem; border-radius: 10px; display: none; }
.form-status.is-ok { display: block; background: rgba(52,199,89,0.12); color: #1e7a3d; }
.form-status.is-err { display: block; background: rgba(220,53,69,0.1); color: #b3273b; }

/* =============================================================
   14. Footer
   ============================================================= */
.site-footer { background: var(--bottle-2); color: rgba(243,236,218,0.75); padding-block: 3.5rem 2rem; }
.footer-top { display: grid; gap: 2.5rem; margin-bottom: 2.5rem; }
@media (min-width: 720px) { .footer-top { grid-template-columns: 1.4fr repeat(2, 1fr); } }
.footer-brand .brand { color: var(--cream-on-dark); margin-bottom: .9rem; }
.footer-brand p { max-width: 34ch; font-size: .9rem; }
.footer-col h4 { font-family: var(--sans); font-size: .82rem; text-transform: uppercase; letter-spacing: .06em; color: rgba(243,236,218,0.5); margin-bottom: 1rem; }
.footer-col ul { display: flex; flex-direction: column; gap: .65rem; }
.footer-col a { font-size: .9rem; }
.footer-col a:hover { color: var(--copper-soft); }
.footer-bottom { display: flex; flex-wrap: wrap; gap: .8rem 1.5rem; justify-content: space-between; align-items: center; padding-top: 1.8rem; border-top: 1px solid rgba(243,236,218,0.12); font-size: .82rem; }
.footer-disclaimer { font-size: .78rem; color: rgba(243,236,218,0.45); max-width: 70ch; margin-top: 1rem; }
.footer-credits { font-size: .78rem; color: rgba(243,236,218,0.5); }
.footer-credits a { text-decoration: underline; }

/* =============================================================
   15. Marquee
   ============================================================= */
.marquee { overflow: hidden; border-block: 1px solid var(--line); padding-block: 1.4rem; background: var(--bg-2); }
.marquee-track { display: flex; gap: 3rem; width: max-content; animation: marquee 32s linear infinite; }
.marquee-track span { font-family: var(--serif); font-style: italic; font-size: 1.15rem; color: var(--ink-mute); white-space: nowrap; display: flex; align-items: center; gap: 3rem; }
.marquee-track span::after { content: "•"; color: var(--copper); }
@keyframes marquee { from { transform: translateX(0); } to { transform: translateX(-50%); } }

/* =============================================================
   16. Chat widget (asistente IA)
   ============================================================= */
.chat-launcher {
  position: fixed; right: 1.4rem; bottom: 1.4rem; z-index: 960;
  width: 54px; height: 54px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--bottle); color: var(--cream-on-dark);
  box-shadow: var(--shadow-lift); transition: transform .35s var(--ease-out);
}
.chat-launcher:hover { transform: translateY(-3px) scale(1.04); }
.chat-launcher .chat-dot {
  position: absolute; top: 3px; right: 3px;
  width: 11px; height: 11px; border-radius: 50%; background: #4ade80;
  box-shadow: 0 0 0 2px var(--bottle);
}

.chat-panel {
  position: fixed; right: 1.4rem; bottom: 1.4rem; z-index: 900;
  width: min(380px, calc(100vw - 2.4rem)); height: min(560px, calc(100vh - 2.4rem));
  background: var(--paper); border-radius: 22px; box-shadow: var(--shadow-lift);
  display: flex; flex-direction: column; overflow: hidden;
  transform: translateY(24px) scale(.96); opacity: 0; pointer-events: none;
  transition: transform .4s var(--ease-out), opacity .4s var(--ease-out);
}
.chat-panel.is-open { transform: none; opacity: 1; pointer-events: auto; }
.chat-head { background: var(--bottle); color: var(--cream-on-dark); padding: 1.1rem 1.3rem; display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.chat-head-info { display: flex; align-items: center; gap: .7rem; }
.chat-head-avatar { width: 36px; height: 36px; border-radius: 50%; background: var(--copper); display: grid; place-items: center; font-family: var(--serif); font-weight: 700; }
.chat-head b { display: block; font-size: .93rem; }
.chat-head small { font-size: .76rem; color: rgba(243,236,218,0.7); display: flex; align-items: center; gap: .35rem; }
.chat-head small .chat-dot { width: 6px; height: 6px; border-radius: 50%; background: #4ade80; }
.chat-close { width: 30px; height: 30px; display: grid; place-items: center; border-radius: 50%; }
.chat-close:hover { background: rgba(243,236,218,0.14); }
.chat-body { flex: 1; overflow-y: auto; padding: 1.1rem; display: flex; flex-direction: column; gap: .8rem; }
.chat-msg { max-width: 85%; padding: .75rem 1rem; border-radius: 16px; font-size: .89rem; line-height: 1.5; }
.chat-msg.is-bot { background: var(--bg-2); border-bottom-left-radius: 4px; align-self: flex-start; }
.chat-msg.is-user { background: var(--bottle); color: var(--cream-on-dark); border-bottom-right-radius: 4px; align-self: flex-end; }
.chat-suggestions { display: flex; flex-wrap: wrap; gap: .5rem; padding: 0 1.1rem 1rem; }
.chat-chip { font-size: .78rem; padding: .5rem .8rem; border-radius: 999px; border: 1px solid var(--line); color: var(--ink-mute); }
.chat-chip:hover { border-color: var(--copper); color: var(--copper); }
.chat-typing { display: flex; gap: 4px; align-self: flex-start; padding: .75rem 1rem; }
.chat-typing span { width: 6px; height: 6px; border-radius: 50%; background: var(--ink-mute); animation: chatTyping 1.2s ease-in-out infinite; }
.chat-typing span:nth-child(2) { animation-delay: .15s; }
.chat-typing span:nth-child(3) { animation-delay: .3s; }
@keyframes chatTyping { 0%, 60%, 100% { opacity: .3; transform: translateY(0); } 30% { opacity: 1; transform: translateY(-3px); } }
.chat-form { display: flex; gap: .6rem; padding: 1rem; border-top: 1px solid var(--line); }
.chat-form input { flex: 1; padding: .75rem 1rem; border-radius: 999px; border: 1.5px solid var(--line); font: inherit; }
.chat-form input:focus { outline: none; border-color: var(--bottle); }
.chat-form button { width: 42px; height: 42px; border-radius: 50%; background: var(--copper); color: #fff; display: grid; place-items: center; flex-shrink: 0; }
.chat-form button[disabled] { opacity: .5; }

/* =============================================================
   16b. WhatsApp floating button
   ============================================================= */
.whatsapp-launcher {
  position: fixed; right: 1.4rem; bottom: 5.9rem; z-index: 960;
  width: 54px; height: 54px; border-radius: 50%;
  background: #25D366; display: grid; place-items: center;
  box-shadow: var(--shadow-lift);
  transition: transform .35s var(--ease-out);
}
.whatsapp-launcher:hover { transform: translateY(-3px) scale(1.04); }

/* =============================================================
   16c. Cookie consent banner
   ============================================================= */
.cookie-banner {
  position: fixed; inset-inline: 0; bottom: 0; z-index: 950;
  background: var(--bottle-2); color: rgba(243,236,218,0.9);
  padding: 1.2rem calc(var(--gutter) + 4.6rem) 1.2rem var(--gutter);
  display: flex; flex-wrap: wrap; gap: 1rem 1.5rem;
  align-items: center; justify-content: space-between;
  box-shadow: 0 -10px 30px -10px rgba(0,0,0,0.4);
  transform: translateY(110%); transition: transform .5s var(--ease-out);
}
.cookie-banner.is-visible { transform: translateY(0); }
.cookie-banner p { font-size: .86rem; max-width: 62ch; line-height: 1.55; }
.cookie-banner p a { text-decoration: underline; color: var(--copper-soft); }
.cookie-banner-actions { display: flex; gap: .7rem; flex-shrink: 0; }
.cookie-banner-actions .btn { padding: .65rem 1.2rem; font-size: .85rem; }

/* =============================================================
   16d. Footer legal links
   ============================================================= */
.footer-legal-links { font-size: .82rem; }
.footer-legal-links a { text-decoration: underline; text-underline-offset: 2px; }
.footer-legal-links a:hover { color: var(--copper-soft); }

/* =============================================================
   17. Count-up numbers
   ============================================================= */
[data-count-to] { font-variant-numeric: tabular-nums; }

/* =============================================================
   17b. Legal pages (prose)
   ============================================================= */
.legal-hero {
  padding-block: clamp(7rem, 12vw, 9rem) 3rem;
  background: var(--bg-2);
}
.legal-hero .eyebrow { margin-bottom: 1rem; }
.legal-hero h1 { font-size: clamp(2.2rem, 4.5vw, 3.2rem); max-width: 20ch; }
.legal-hero p { color: var(--ink-mute); margin-top: 1rem; max-width: 50ch; }
.legal-body { padding-block: clamp(3rem, 6vw, 5rem) 6rem; }
.legal-body .container { max-width: 780px; }
.legal-body h2 { font-size: 1.4rem; margin-top: 2.6rem; margin-bottom: .9rem; }
.legal-body h2:first-child { margin-top: 0; }
.legal-body p { color: var(--ink-soft); margin-bottom: 1.1rem; max-width: 70ch; }
.legal-body ul { margin: 0 0 1.1rem; padding-left: 1.3rem; list-style: disc; color: var(--ink-soft); }
.legal-body li { margin-bottom: .5rem; max-width: 68ch; }
.legal-body strong { color: var(--ink); }
.legal-body .legal-updated { font-size: .85rem; color: var(--ink-mute); margin-bottom: 2.5rem; }
.legal-body a { text-decoration: underline; color: var(--bottle); }

/* =============================================================
   17c. Gracias / thank-you page
   ============================================================= */
.gracias-section {
  min-height: 80svh; display: flex; align-items: center;
  padding-block: clamp(7rem, 12vw, 9rem) 5rem;
}
.gracias-card {
  max-width: 640px; margin-inline: auto; text-align: center;
}
.gracias-check {
  width: 76px; height: 76px; border-radius: 50%; background: var(--bottle);
  color: var(--copper-soft); display: grid; place-items: center; margin: 0 auto 1.6rem;
}
.gracias-card h1 { font-size: clamp(2rem, 4vw, 2.8rem); margin-bottom: 1rem; }
.gracias-card p { color: var(--ink-mute); font-size: 1.05rem; max-width: 46ch; margin-inline: auto; }
.gracias-result {
  margin-top: 2.2rem; background: var(--paper); border: 1px solid var(--line-soft);
  border-radius: var(--radius); padding: 1.8rem; text-align: left; display: none;
}
.gracias-result.is-active { display: block; }
.gracias-result-badge {
  display: inline-flex; padding: .4rem .9rem; border-radius: 999px; font-size: .76rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: .05em; margin-bottom: 1rem;
  background: var(--bg-2); color: var(--bottle);
}
.gracias-result h3 { font-size: 1.25rem; margin-bottom: .7rem; }
.gracias-result-metrics { display: grid; grid-template-columns: 1fr 1fr; gap: .8rem; margin-top: 1.2rem; }
.gracias-result-metric { background: var(--bg-2); border-radius: 10px; padding: .8rem 1rem; }
.gracias-result-metric span { display: block; font-size: .72rem; text-transform: uppercase; letter-spacing: .05em; color: var(--ink-mute); margin-bottom: .25rem; }
.gracias-result-metric b { font-family: var(--serif); color: var(--copper); }
.gracias-actions { margin-top: 2.2rem; display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }

/* =============================================================
   18. Responsive tune-ups
   ============================================================= */
@media (max-width: 539px) {
  .site-header .container { gap: .5rem; }
  .brand-mark { width: 32px; height: 32px; font-size: .95rem; }
  .brand { font-size: .92rem; gap: .4rem; }
  .header-actions { gap: .4rem; }
  .header-actions .btn-primary { padding: .62rem .75rem; font-size: .74rem; }
  .nav-toggle { width: 36px; height: 36px; flex-shrink: 0; }
  .hero { padding-block: 7.5rem 3rem; align-items: flex-end; }
  .hero-actions .btn { width: 100%; }
  .diag-result-metrics { grid-template-columns: 1fr; }
  .chat-panel { right: .8rem; left: .8rem; width: auto; bottom: .8rem; }
  .chat-launcher { right: .8rem; bottom: .8rem; width: 48px; height: 48px; }
  .whatsapp-launcher { right: .8rem; bottom: 5rem; width: 48px; height: 48px; }
  .cookie-banner { flex-direction: column; align-items: stretch; text-align: left; padding: 1rem 3.6rem 1rem 1.2rem; }
  .cookie-banner-actions { justify-content: flex-start; }
}

@media (min-width: 1600px) {
  .container { max-width: 1360px; }
}
