/* ============================================================
   TOKENS — CIAA Legal (marino + dorado, tipografía Jost/Work Sans)
   Estructura y estilo tomados de concepts/concepto4-ciaa-legal-v3
   ============================================================ */
:root {
  --navy-950: #0a0e1a;
  --navy-900: #0d1526;
  --navy-800: #131f38;
  --gold: #c9a227;
  --gold-light: #e0bc4a;
  --white: #ffffff;
  --ink: #1b2430;
  --gray: #5c6672;
  --line: #e7e5da;
  --whatsapp: #25d366;

  --font-h: 'Jost', sans-serif;
  --font-b: 'Work Sans', sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-b);
  color: var(--ink);
  background: #fff;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

.container { max-width: 1140px; margin: 0 auto; padding: 0 24px; }
h1, h2, h3 { font-family: var(--font-h); margin: 0; font-weight: 600; }

a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
}

.reveal { opacity: 0; transform: translateY(28px); transition: opacity .7s ease, transform .7s ease; }
.reveal.is-visible { opacity: 1; transform: translateY(0); }

.eyebrow {
  font-family: var(--font-h);
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-size: 1.125rem;
  color: var(--gold);
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.eyebrow img { height: 14px; width: auto; }

/* ---------- Logo / marca ---------- */
.logo-nav { height: 32px; width: auto; }
.logo-footer { height: 30px; width: auto; }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(255,255,255,0.95);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--line);
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 74px;
}
.header-cta {
  background: var(--navy-950);
  color: #fff;
  font-family: var(--font-h);
  font-weight: 500;
  font-size: 1.125rem;
  padding: 11px 24px;
  border-radius: 6px;
}
.header-cta:hover { background: var(--navy-800); }

/* ---------- Botón dorado ---------- */
.btn-gold {
  display: inline-block;
  background: var(--gold);
  color: var(--navy-950);
  font-family: var(--font-h);
  font-weight: 600;
  padding: 16px 30px;
  border-radius: 8px;
  border: none;
  font-size: 1.125rem;
  cursor: pointer;
  transition: background .15s ease, transform .12s ease;
}
.btn-gold:hover { background: var(--gold-light); transform: translateY(-1px); }
.btn-gold:active { transform: translateY(0); }
.btn-gold.btn-block { width: 100%; text-align: center; }

.btn-whatsapp {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: var(--whatsapp);
  color: var(--white);
  font-family: var(--font-h);
  font-weight: 600;
  font-size: 1.125rem;
  padding: 14px 26px;
  border-radius: 999px;
}

/* ---------- HERO ---------- */
.hero {
  position: relative;
  min-height: 78vh;
  display: flex;
  align-items: center;
  color: #fff;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(10,14,26,0.72), rgba(10,14,26,0.82)),
    url('../img/lawyerteam.jpg');
  background-size: cover;
  background-position: center 30%;
  animation: hero-kenburns 22s ease-in-out infinite alternate;
  z-index: 0;
}
.hero .container { position: relative; z-index: 1; }
@keyframes hero-kenburns {
  from { transform: scale(1); }
  to { transform: scale(1.09); }
}
@media (prefers-reduced-motion: reduce) {
  .hero::before { animation: none; }
}
.hero-inner { max-width: 640px; padding: 60px 0; animation: fade-up .9s ease both; }
@keyframes fade-up { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: translateY(0); } }
.hero .eyebrow { color: var(--gold-light); }
.hero h1 {
  font-family: var(--font-h);
  font-weight: 500;
  font-size: clamp(2.2rem, 4.6vw, 3.4rem);
  line-height: 1.12;
  margin-bottom: 20px;
}
.hero p { color: rgba(255,255,255,0.8); font-size: 1.175rem; max-width: 46ch; margin-bottom: 32px; }
.hero-note { margin-top: 16px; font-size: 1.125rem; color: rgba(255,255,255,0.65); }

/* ---------- Trust bar ---------- */
.trust-bar {
  background: var(--navy-900);
  color: rgba(255,255,255,0.8);
  text-align: center;
  padding: 16px 0;
  font-family: var(--font-h);
  font-size: 1.125rem;
  letter-spacing: 0.03em;
}
.trust-bar strong { color: var(--gold-light); }

/* ---------- Section shell ---------- */
section { padding: 90px 0; }
.section-head { text-align: center; max-width: 640px; margin: 0 auto 50px; }
.section-head .eyebrow { justify-content: center; }
.section-head h2 { font-size: clamp(1.6rem, 3vw, 2.1rem); font-weight: 600; }
.section-head .rule { width: 54px; height: 3px; background: var(--gold); margin: 16px auto 0; border-radius: 2px; }
section.on-navy { background: var(--navy-950); color: #fff; }
section.on-navy .section-head h2 { color: #fff; }
section.on-navy .section-head p { color: rgba(255,255,255,0.65); }

/* ---------- Feature blocks (imagen + copy) ---------- */
.feature { padding: 90px 0; }
.feature .container { display: grid; grid-template-columns: 1fr 1fr; gap: 60px; align-items: center; }
.feature.reverse .container { direction: rtl; }
.feature.reverse .container > * { direction: ltr; }
.feature-media {
  border-radius: 14px;
  overflow: hidden;
  height: 380px;
  background-size: cover;
  background-position: center;
  box-shadow: 0 30px 60px -30px rgba(10,14,26,0.35);
}
.feature-copy h2 { font-size: 1.9rem; margin-bottom: 16px; font-weight: 600; }
.feature-copy p { color: var(--gray); margin-bottom: 22px; }
.feature-copy ul { list-style: none; padding: 0; margin: 0 0 24px; }
.feature-copy li { display: flex; gap: 10px; padding: 8px 0; font-weight: 500; font-size: 1.125rem; }
.feature-copy li svg { flex-shrink: 0; margin-top: 2px; }
.feature-copy .link-cta { font-weight: 700; color: var(--navy-950); border-bottom: 2px solid var(--gold); padding-bottom: 2px; }

/* ---------- Listado completo de contratos del pack ---------- */
.contract-checklist {
  columns: 2;
  column-gap: 36px;
  max-width: 900px;
  margin: 0 auto;
}
.contract-checklist .contract-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 0;
  break-inside: avoid;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.contract-checklist .contract-item svg { flex-shrink: 0; margin-top: 2px; }
.contract-checklist .contract-item span { font-size: 1.125rem; color: rgba(255,255,255,0.85); line-height: 1.35; }
.contract-count {
  text-align: center;
  font-family: var(--font-h);
  color: var(--gold-light);
  font-size: 1.125rem;
  font-weight: 500;
  margin-bottom: 30px;
}
.contract-category-heading {
  column-span: all;
  font-family: var(--font-h);
  font-weight: 600;
  font-size: 1.125rem;
  color: var(--gold-light);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin: 22px 0 6px;
  padding-bottom: 6px;
  border-bottom: 1px solid rgba(255,255,255,0.15);
}
.contract-category-heading:first-child { margin-top: 0; }
@media (max-width: 700px) { .contract-checklist { columns: 1; } }

/* ---------- Testimonios ---------- */
.testimonios { background: #f7f6f1; }
.test-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; }
.test-grid.single { grid-template-columns: minmax(0, 560px); justify-content: center; }
.test-grid.duo { grid-template-columns: repeat(2, minmax(0, 420px)); justify-content: center; }
.test-card { background: #fff; border-radius: 12px; padding: 30px 26px; border: 1px solid var(--line); }
.test-card .quote-mark { font-family: var(--font-h); font-size: 2.4rem; color: var(--gold); line-height: 1; margin-bottom: 8px; }
.test-card p.quote { font-size: 1.125rem; color: var(--ink); margin-bottom: 18px; }
.test-card .author { font-weight: 700; font-family: var(--font-h); font-size: 1.125rem; }
.test-card .role { color: var(--gray); font-size: 1.125rem; }
.placeholder-flag { color: var(--gray); font-size: 1.125rem; }

/* ---------- Tarjeta de vista previa (PDF de muestra) ---------- */
.contract-preview-card {
  appearance: none;
  display: flex;
  align-items: center;
  gap: 18px;
  width: 100%;
  max-width: 480px;
  margin: -14px auto 30px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(224,188,74,0.35);
  border-radius: 14px;
  padding: 14px 20px 14px 14px;
  cursor: pointer;
  text-align: left;
  font: inherit;
  font-family: var(--font-b);
  transition: border-color .2s ease, background .2s ease;
}
.contract-preview-card:hover { border-color: var(--gold-light); background: rgba(255,255,255,0.08); }
.contract-preview-thumb {
  position: relative;
  flex-shrink: 0;
  display: block;
  width: 64px;
  height: 88px;
  border-radius: 6px;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 10px 22px rgba(0,0,0,0.35);
}
.contract-preview-thumb canvas { display: block; width: 100%; height: 100%; }
.contract-preview-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(10,14,26,0.5);
}
.contract-preview-copy { display: flex; flex-direction: column; gap: 4px; }
.contract-preview-title { color: #fff; font-family: var(--font-h); font-weight: 600; font-size: 1.125rem; }
.contract-preview-sub { color: rgba(255,255,255,0.6); font-size: 1.125rem; }

/* ---------- Modal de vista previa (PDF) ---------- */
.pdf-modal { position: fixed; inset: 0; z-index: 100; display: none; }
.pdf-modal.is-open { display: block; }
.pdf-modal-backdrop { position: absolute; inset: 0; background: rgba(10,14,26,0.75); }
.pdf-modal-dialog {
  position: relative;
  z-index: 1;
  max-width: 860px;
  margin: 40px auto;
  height: calc(100vh - 80px);
  background: #525659;
  border-radius: 12px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 30px 80px rgba(0,0,0,0.45);
}
.pdf-modal-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  background: var(--navy-950);
  color: #fff;
  font-family: var(--font-h);
  font-weight: 600;
  font-size: 1.125rem;
  flex-shrink: 0;
}
.pdf-modal-actions { display: flex; gap: 8px; }
.pdf-modal-actions button {
  background: rgba(255,255,255,0.1);
  color: #fff;
  border: none;
  width: 34px;
  height: 34px;
  border-radius: 6px;
  font-family: var(--font-h);
  font-size: 1.225rem;
  line-height: 1;
  cursor: pointer;
}
.pdf-modal-actions button:hover { background: rgba(255,255,255,0.22); }
.pdf-modal-viewport { flex: 1; overflow: auto; -webkit-overflow-scrolling: touch; }
.pdf-modal-pages { display: flex; flex-direction: column; align-items: center; gap: 18px; padding: 22px; min-height: 100%; }
.pdf-page-canvas { max-width: 100%; height: auto; background: #fff; box-shadow: 0 6px 20px rgba(0,0,0,0.4); }
.pdf-modal-loading { color: #fff; font-family: var(--font-h); font-size: 1.125rem; text-align: center; padding: 60px 20px; }
@media (max-width: 720px) {
  .pdf-modal-dialog { margin: 16px; height: calc(100vh - 32px); max-width: none; }
}

/* ---------- Demo animado ---------- */
.demo { background: var(--navy-950); color: #fff; }
.demo .section-head h2 { color: #fff; }
.demo .section-head p { color: rgba(255,255,255,0.65); }
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; max-width: 820px; margin: 0 auto; position: relative; }
.step {
  padding: 28px 22px;
  text-align: center;
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,0.1);
  position: relative;
  transition: background .4s ease, border-color .4s ease;
}
.step .num {
  width: 40px; height: 40px;
  border-radius: 50%;
  background: rgba(201,162,39,0.12);
  border: 1.5px solid var(--gold);
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 14px;
  font-family: var(--font-h);
  font-weight: 600;
  color: var(--gold-light);
  transition: background .4s ease, color .4s ease;
}
.step h3 { font-size: 1.125rem; margin-bottom: 8px; font-weight: 600; }
.step p { font-size: 1.125rem; color: rgba(255,255,255,0.6); margin: 0; }
.step.active { background: rgba(201,162,39,0.08); border-color: var(--gold); }
.step.active .num { background: var(--gold); color: var(--navy-950); }

/* ---------- FAQ ---------- */
.faq-item { border-bottom: 1px solid var(--line); }
.faq-question {
  width: 100%;
  text-align: left;
  background: none;
  border: none;
  padding: 22px 0;
  font-family: var(--font-h);
  font-weight: 600;
  font-size: 1.125rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  color: var(--ink);
}
.faq-question .plus { transition: transform .25s ease; font-size: 1.4rem; color: var(--gold); }
.faq-item.open .faq-question .plus { transform: rotate(45deg); }
.faq-answer { max-height: 0; overflow: hidden; transition: max-height .3s ease; }
.faq-answer p { padding: 0 0 22px; color: var(--gray); margin: 0; max-width: 70ch; }

/* ---------- Checkout ---------- */
.checkout { background: linear-gradient(160deg, var(--navy-950), var(--navy-800)); color: #fff; }
.checkout .section-head h2 { color: #fff; }
.checkout-card {
  max-width: 440px;
  margin: 0 auto;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.14);
  border-radius: 14px;
  padding: 42px;
  text-align: center;
}
.checkout-card .currency-tag {
  font-family: var(--font-h);
  font-size: 1.125rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gold-light);
}
.checkout-card .price { font-family: var(--font-h); font-size: 2.6rem; font-weight: 600; margin: 6px 0 22px; }
.checkout-card form { text-align: left; }
.checkout-card input[type="text"],
.checkout-card input[type="email"] {
  width: 100%;
  padding: 14px 16px;
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,0.2);
  background: rgba(255,255,255,0.05);
  color: #fff;
  font-family: var(--font-b);
  margin-bottom: 16px;
  font-size: 1.125rem;
}
.checkout-card input::placeholder { color: rgba(255,255,255,0.4); }
.checkout-card .btn-gold { width: 100%; }
#checkout-error {
  color: #e0846f;
  font-size: 1.125rem;
  margin-top: 10px;
  display: none;
}
.checkout-card .fineprint { font-size: 1.125rem; color: rgba(255,255,255,0.6); margin-top: 14px; text-align: center; }

.security-badges {
  display: flex;
  justify-content: center;
  gap: 22px;
  flex-wrap: wrap;
  margin-top: 20px;
  padding-top: 18px;
  border-top: 1px solid rgba(255,255,255,0.1);
}
.security-badges span {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 1.125rem;
  color: rgba(255,255,255,0.6);
  font-family: var(--font-h);
}

/* ---------- Footer ---------- */
footer { background: var(--navy-950); color: rgba(255,255,255,0.65); padding: 44px 0; font-size: 1.125rem; }
.footer-grid { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 20px; margin-bottom: 22px; }
footer a { color: rgba(255,255,255,0.75); }
.footer-links { display: flex; gap: 22px; flex-wrap: wrap; }
.footer-note { border-top: 1px solid rgba(255,255,255,0.08); padding-top: 16px; font-size: 1.125rem; color: rgba(255,255,255,0.4); }

/* ---------- WhatsApp flotante ---------- */
.whatsapp-widget {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 50;
  display: flex;
  align-items: center;
  gap: 10px;
}
.whatsapp-tooltip {
  background: #fff;
  color: var(--ink);
  font-family: var(--font-h);
  font-weight: 500;
  font-size: 1.125rem;
  padding: 8px 14px;
  border-radius: 999px;
  box-shadow: 0 8px 20px rgba(0,0,0,0.18);
  white-space: nowrap;
}
.whatsapp-float {
  position: static;
  width: 56px; height: 56px;
  border-radius: 50%;
  background: var(--whatsapp);
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 10px 24px rgba(0,0,0,0.3);
  flex-shrink: 0;
}
@media (max-width: 480px) {
  .whatsapp-tooltip { display: none; }
}

/* ---------- Barra de compra fija (solo móvil) ---------- */
.mobile-cta-bar {
  display: none;
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 60;
  background: var(--navy-950);
  border-top: 1px solid rgba(255,255,255,0.12);
  padding: 12px 16px;
  box-shadow: 0 -8px 24px rgba(0,0,0,0.3);
}
.mobile-cta-bar .btn-gold { width: 100%; text-align: center; padding: 14px; }
@media (max-width: 720px) {
  .mobile-cta-bar { display: block; }
  body { padding-bottom: 76px; } /* espacio para que la barra no tape el contenido/footer */
}

/* ---------- Comparativo de precio ---------- */
.comparativo-table {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 20px;
  align-items: center;
  max-width: 820px;
  margin: 0 auto;
}
.comparativo-col { border-radius: 14px; padding: 32px 28px; border: 1px solid rgba(255,255,255,0.12); }
.comparativo-despacho { background: rgba(255,255,255,0.03); }
.comparativo-pack { background: rgba(201,162,39,0.1); border-color: var(--gold); }
.comparativo-label { font-family: var(--font-h); font-weight: 600; font-size: 1.125rem; color: rgba(255,255,255,0.7); margin: 0 0 8px; text-transform: uppercase; letter-spacing: 0.04em; }
.comparativo-pack .comparativo-label { color: var(--gold-light); }
.comparativo-price { font-family: var(--font-h); font-weight: 600; font-size: 1.5rem; color: #fff; margin: 0 0 18px; }
.comparativo-col ul { list-style: none; padding: 0; margin: 0; }
.comparativo-col li { padding: 7px 0; font-size: 1.125rem; color: rgba(255,255,255,0.65); }
.comparativo-vs {
  font-family: var(--font-h);
  font-weight: 700;
  color: var(--gold);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1.5px solid var(--gold);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.125rem;
}
@media (max-width: 720px) {
  .comparativo-table { grid-template-columns: 1fr; }
  .comparativo-vs { margin: 0 auto; }
}

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .feature .container, .feature.reverse .container { grid-template-columns: 1fr; direction: ltr; }
  .feature-media { height: 280px; }
  .test-grid, .test-grid.duo { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr; gap: 14px; }
  .footer-grid { flex-direction: column; align-items: flex-start; }
}