/* ==========================================================================
   Legal-IA — Service as Software
   Enfoque V1 "El Resultado". Valores tomados 1:1 del diseño original.
   ========================================================================== */

/* --- Tokens ------------------------------------------------------------- */
:root {
  --brand: #38b6ff;
  --brand-light: #4cbcff;
  --brand-soft: #9fd9ff;
  --brand-wash: #eaf7ff;
  --ink: #2A3B5F;
  --ink-deep: #1b2742;
  --text: #64748b;
  --text-strong: #475569;
  --muted: #94a3b8;
  --line: #e2e8f0;
  --surface: #ffffff;
  --surface-alt: #f7fafc;
  --surface-chip: #f1f5f9;
  --page: #fbfdff;

  --font-body: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-display: 'Space Grotesk', 'Plus Jakarta Sans', -apple-system, sans-serif;

  --radius-card: 20px;
  --radius-pill: 999px;
  --shadow-card: 0 10px 30px rgba(42, 59, 95, .05);
  --shadow-brand: 0 16px 38px rgba(56, 182, 255, .45);
}

/* --- Reset -------------------------------------------------------------- */
* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-body);
  background: var(--surface);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img, svg { max-width: 100%; }

/* Visible focus for keyboard users — the design had none. */
:focus-visible {
  outline: 3px solid var(--brand);
  outline-offset: 3px;
  border-radius: 6px;
}

.skip-link {
  position: absolute;
  left: 50%;
  top: 8px;
  transform: translate(-50%, -160%);
  z-index: 200;
  background: var(--ink);
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  padding: 12px 22px;
  border-radius: var(--radius-pill);
  text-decoration: none;
  transition: transform .2s;
}
.skip-link:focus { transform: translate(-50%, 0); }

.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;
}

/* --- Keyframes ---------------------------------------------------------- */
@keyframes wordUp { 0% { opacity: 0; transform: translateY(.5em); } 100% { opacity: 1; transform: translateY(0); } }
@keyframes glow   { 0%, 100% { opacity: .4; } 50% { opacity: .85; } }

/* --- Page shell --------------------------------------------------------- */
.page {
  position: relative;
  background: var(--page);
  overflow: hidden;
}

.page__glow {
  position: absolute;
  top: -200px;
  left: 50%;
  transform: translateX(-50%);
  width: 980px;
  max-width: 130vw;
  height: 560px;
  background: radial-gradient(ellipse, rgba(56, 182, 255, .20), transparent 65%);
  filter: blur(24px);
  pointer-events: none;
  animation: glow 6s ease-in-out infinite;
}

.page__grid {
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(42, 59, 95, .06) 1px, transparent 1px);
  background-size: 26px 26px;
  mask-image: linear-gradient(180deg, #000, transparent 60%);
  -webkit-mask-image: linear-gradient(180deg, #000, transparent 60%);
  pointer-events: none;
}

.section { position: relative; padding: 60px 24px 90px; }

/* La barra fija taparía el inicio de cada sección al saltar por anclas. */
[id] { scroll-margin-top: 96px; }
.shell { max-width: 1120px; margin: 0 auto; }
.shell--narrow { max-width: 1000px; }

.section-head { text-align: center; margin-bottom: 44px; }

.eyebrow {
  text-transform: uppercase;
  letter-spacing: .12em;
  font-size: 13px;
  font-weight: 700;
  color: var(--brand);
  margin: 0 0 10px;
}

h2.section-title {
  font-family: var(--font-display);
  font-size: clamp(26px, 3.2vw, 42px);
  font-weight: 600;
  color: var(--ink);
  letter-spacing: -.025em;
  margin: 0 0 12px;
}

.section-sub {
  font-size: 18px;
  color: var(--text);
  max-width: 620px;
  margin: 0 auto;
  line-height: 1.6;
}
.section-sub strong { color: var(--ink); }

/* --- Nav ---------------------------------------------------------------- */
.nav {
  position: fixed;
  top: 18px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 60;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 7px 7px 7px 20px;
  background: rgba(255, 255, 255, .78);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border: 1px solid rgba(56, 182, 255, .18);
  box-shadow: 0 14px 40px rgba(56, 182, 255, .14);
  border-radius: var(--radius-pill);
  max-width: calc(100vw - 24px);
}

.nav__brand {
  display: inline-flex;
  align-items: center;
  margin-right: 8px;
  text-decoration: none;
}
.nav__brand img {
  display: block;
  height: 32px;
  width: auto;
}

.nav__links { display: flex; gap: 16px; margin: 0 12px; }

.nav__link {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text-strong);
  text-decoration: none;
  transition: color .2s;
  white-space: nowrap;
}
.nav__link:hover { color: var(--brand); }

.nav__cta {
  font-size: 13.5px;
  font-weight: 700;
  color: #fff;
  text-decoration: none;
  background: linear-gradient(180deg, var(--brand-light), var(--brand));
  padding: 9px 18px;
  border-radius: var(--radius-pill);
  box-shadow: 0 8px 20px rgba(56, 182, 255, .4);
  transition: transform .2s;
  white-space: nowrap;
}
.nav__cta:hover { transform: translateY(-1px); }

/* --- Hero --------------------------------------------------------------- */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 150px 24px 80px;
}
.hero__inner { max-width: 1040px; }

.badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border: 1px solid rgba(56, 182, 255, .4);
  background: rgba(255, 255, 255, .7);
  color: var(--ink);
  border-radius: var(--radius-pill);
  font-size: 13px;
  font-weight: 600;
  margin: 0 0 26px;
  box-shadow: 0 6px 18px rgba(56, 182, 255, .12);
}
.badge__dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--brand);
  display: inline-block;
  flex-shrink: 0;
  animation: glow 2s ease-in-out infinite;
}

.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(34px, 5.4vw, 72px);
  font-weight: 700;
  color: var(--ink);
  letter-spacing: -.035em;
  line-height: 1.02;
  margin: 0 0 18px;
}

.hero__line {
  font-size: clamp(20px, 2.6vw, 34px);
  font-weight: 600;
  color: var(--ink);
  font-family: var(--font-display);
  letter-spacing: -.02em;
  margin: 0 0 6px;
}
.hero__line--muted { color: var(--muted); margin-bottom: 26px; }

/* Rotador de tipos de documento */
.rotator {
  display: inline-block;
  color: var(--brand);
  font-family: var(--font-display);
  font-weight: 700;
}
.rotator.is-animating { animation: wordUp .6s cubic-bezier(.2, .75, .25, 1) both; }

.hero__lead {
  font-size: clamp(16px, 1.7vw, 20px);
  color: var(--text);
  max-width: 660px;
  margin: 0 auto 38px;
  line-height: 1.65;
}
.hero__lead strong { color: var(--ink); }

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  justify-content: center;
  align-items: flex-start;
}
.cta-group {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}
.cta-note { font-size: 12.5px; color: var(--muted); font-weight: 500; }
.cta-note--brand { color: var(--brand); font-weight: 600; }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  border-radius: 14px;
  font-weight: 700;
  transition: all .25s;
}
.btn--ghost {
  padding: 16px 30px;
  font-size: 16px;
  color: var(--ink);
  border: 1.5px solid #cbd5e1;
  background: rgba(255, 255, 255, .8);
}
.btn--ghost:hover { border-color: var(--brand); color: var(--brand); }

.btn--primary {
  padding: 16px 34px;
  font-size: 16px;
  color: #fff;
  background: linear-gradient(135deg, var(--brand-light), var(--brand));
  box-shadow: var(--shadow-brand);
}
.btn--primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 22px 46px rgba(56, 182, 255, .55);
}
.btn--lg { padding: 17px 38px; font-size: 17px; }
.btn__arrow { font-size: 18px; }

/* --- Tarjetas genéricas ------------------------------------------------- */
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  padding: 30px;
  box-shadow: var(--shadow-card);
}
.card__kicker {
  font-size: 13px;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .06em;
  margin: 0 0 12px;
}
.card p { font-size: 15px; color: var(--text); line-height: 1.6; margin: 0; }

.grid { display: grid; gap: 22px; align-items: stretch; }
.grid--3 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.grid--steps { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 24px; }
.grid--agents { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; }
.grid--trust { grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 16px; margin-top: 24px; }
.grid--docs { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; }
.grid--pricing { grid-template-columns: repeat(auto-fit, minmax(228px, 1fr)); gap: 20px; align-items: stretch; }

/* La tercera opción — tarjeta destacada */
.card--featured {
  position: relative;
  background: linear-gradient(165deg, var(--brand-wash), #fff);
  border: 2px solid var(--brand);
  box-shadow: 0 22px 50px rgba(56, 182, 255, .2);
}
.card--featured .card__kicker { color: var(--brand); }
.card--featured p { color: var(--ink); font-weight: 500; }

.ribbon {
  position: absolute;
  top: -13px;
  left: 24px;
  font-size: 12px;
  font-weight: 700;
  color: #fff;
  background: var(--brand);
  padding: 5px 14px;
  border-radius: var(--radius-pill);
  box-shadow: 0 6px 16px rgba(56, 182, 255, .4);
}

/* --- Pasos -------------------------------------------------------------- */
.step {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  padding: 32px;
  box-shadow: var(--shadow-card);
}
.step__num {
  width: 44px; height: 44px;
  border-radius: 12px;
  background: rgba(56, 182, 255, .12);
  color: var(--brand);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 0 18px;
}
.step h3 {
  font-family: var(--font-display);
  font-size: 19px;
  font-weight: 600;
  color: var(--ink);
  margin: 0 0 8px;
}
.step p { font-size: 14.5px; color: var(--text); line-height: 1.6; margin: 0; }

/* --- Multiagente -------------------------------------------------------- */
.orchestrator-wrap { display: flex; justify-content: center; margin: 32px 0 8px; }
.orchestrator {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  background: linear-gradient(135deg, var(--ink), var(--ink-deep));
  color: #fff;
  padding: 18px 28px;
  border-radius: 18px;
  box-shadow: 0 18px 44px rgba(42, 59, 95, .28);
}
.orchestrator__icon {
  width: 44px; height: 44px;
  border-radius: 12px;
  background: rgba(56, 182, 255, .2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  flex-shrink: 0;
}
.orchestrator__name { font-family: var(--font-display); font-weight: 700; font-size: 18px; }
.orchestrator__role { font-size: 13px; color: var(--brand-soft); }

.connector {
  width: 2px; height: 34px;
  background: linear-gradient(var(--brand), rgba(56, 182, 255, .2));
  margin: 0 auto;
}

.agent {
  background: var(--surface);
  border: 1px solid var(--line);
  border-top: 3px solid var(--brand);
  border-radius: 16px;
  padding: 24px;
  box-shadow: 0 10px 28px rgba(42, 59, 95, .05);
  transition: all .2s;
}
.agent:hover { transform: translateY(-4px); box-shadow: 0 18px 40px rgba(56, 182, 255, .14); }
.agent h3 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 16px;
  color: var(--ink);
  margin: 0 0 6px;
}
.agent p { font-size: 13.5px; color: var(--text); margin: 0; line-height: 1.5; }

.trust {
  background: var(--surface-alt);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 22px;
}
.trust h3 { font-weight: 700; color: var(--ink); font-size: 15px; margin: 0 0 5px; }
.trust p { font-size: 13.5px; color: var(--text); margin: 0; line-height: 1.5; }

/* --- Panel "Compras un resultado" --------------------------------------- */
.result-panel {
  max-width: 1000px;
  margin: 0 auto;
  background: linear-gradient(150deg, var(--ink), var(--ink-deep));
  border-radius: 28px;
  padding: clamp(36px, 5vw, 64px);
  box-shadow: 0 30px 70px rgba(42, 59, 95, .3);
  overflow: hidden;
  position: relative;
}
.result-panel__blob {
  position: absolute;
  top: -120px;
  right: -80px;
  width: 360px; height: 360px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(56, 182, 255, .35), transparent 65%);
  filter: blur(20px);
  pointer-events: none;
}
.result-panel__body { position: relative; text-align: center; }
.result-panel h2 {
  font-family: var(--font-display);
  font-size: clamp(26px, 3.4vw, 44px);
  font-weight: 600;
  color: #fff;
  letter-spacing: -.025em;
  margin: 0 0 10px;
}
.result-panel h2 .accent {
  display: block;
  font-weight: 700;
  color: var(--brand);
  margin-top: 6px;
}
.result-tags {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  max-width: 760px;
  margin: 32px auto 0;
  padding: 0;
  list-style: none;
}
.result-tags li {
  background: rgba(255, 255, 255, .08);
  border: 1px solid rgba(255, 255, 255, .15);
  color: #e7edf6;
  padding: 11px 18px;
  border-radius: var(--radius-pill);
  font-size: 14.5px;
  font-weight: 600;
}
.result-tags li.is-highlight {
  background: rgba(56, 182, 255, .15);
  border-color: rgba(56, 182, 255, .5);
  color: var(--brand-soft);
  font-weight: 700;
}

/* --- Documentos --------------------------------------------------------- */
.doc-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 24px;
  display: flex;
  align-items: center;
  gap: 12px;
  transition: all .2s;
}
.doc-card:hover { border-color: var(--brand); transform: translateY(-3px); }
.doc-card__dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--brand);
  flex-shrink: 0;
}
.doc-card__name { font-weight: 600; color: var(--ink); font-size: 15px; }

/* --- Precios ------------------------------------------------------------ */
.plan {
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 32px;
  box-shadow: 0 12px 34px rgba(42, 59, 95, .06);
  transition: all .25s;
}
.plan:hover { transform: translateY(-6px); box-shadow: 0 22px 48px rgba(42, 59, 95, .12); }

.plan__tag {
  align-self: flex-start;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--text);
  background: var(--surface-chip);
  padding: 5px 11px;
  border-radius: var(--radius-pill);
  margin: 0 0 16px;
}
.plan h3 {
  font-family: var(--font-display);
  font-size: 21px;
  font-weight: 600;
  color: var(--ink);
  margin: 0 0 8px;
}
.plan__price {
  display: flex;
  align-items: baseline;
  gap: 6px;
  margin: 0 0 18px;
  flex-wrap: wrap;
}
.plan__amount { font-size: 46px; font-weight: 800; color: var(--ink); line-height: 1; }
.plan__period { color: var(--muted); font-weight: 500; }

.plan__features {
  list-style: none;
  padding: 0;
  margin: 0 0 26px;
  display: flex;
  flex-direction: column;
  gap: 13px;
  flex-grow: 1;
}
.plan__features li { display: flex; gap: 10px; font-size: 14.5px; color: var(--text-strong); }
.plan__features li::before { content: "✓"; color: var(--brand); font-weight: 800; }

.plan__cta {
  text-align: center;
  padding: 13px;
  border-radius: 13px;
  font-weight: 700;
  font-size: 15px;
  text-decoration: none;
  color: var(--ink);
  background: var(--surface-chip);
  border: 1px solid var(--line);
  transition: all .2s;
}
.plan__cta:hover { background: #e7edf3; }

.plan__cta--outline { background: #fff; border: 1.5px solid var(--ink); }
.plan__cta--outline:hover { background: var(--ink); color: #fff; }

.plan--featured {
  position: relative;
  border: 2px solid var(--brand);
  padding: 34px 32px;
  box-shadow: 0 26px 60px rgba(56, 182, 255, .26);
  transform: scale(1.04);
}
.plan--featured:hover { transform: scale(1.04) translateY(-6px); }
.plan--featured::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 5px;
  background: linear-gradient(90deg, var(--brand-light), var(--brand), var(--ink));
  border-radius: 22px 22px 0 0;
}
.plan__badge {
  position: absolute;
  top: -13px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 12px;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(135deg, var(--brand-light), var(--brand));
  padding: 6px 16px;
  border-radius: var(--radius-pill);
  box-shadow: 0 8px 20px rgba(56, 182, 255, .45);
  white-space: nowrap;
}
.plan--featured .plan__tag { color: var(--brand); background: rgba(56, 182, 255, .1); }
.plan__cta--primary {
  padding: 15px;
  color: #fff;
  background: linear-gradient(135deg, var(--brand-light), var(--brand));
  border: 0;
  box-shadow: 0 14px 32px rgba(56, 182, 255, .45);
}
.plan__cta--primary:hover { transform: translateY(-2px); background: linear-gradient(135deg, var(--brand-light), var(--brand)); }

/* --- FAQ ---------------------------------------------------------------- */
/* Una sola columna: en rejilla, abrir una respuesta larga dejaba un hueco
   vacío del alto de la fila junto a ella. */
.faq-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
  max-width: 860px;
  margin: 0 auto;
}
.faq-item {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: var(--shadow-card);
  overflow: hidden;
  transition: border-color .2s;
}
.faq-item[open] { border-color: rgba(56, 182, 255, .5); }
.faq-item summary {
  cursor: pointer;
  list-style: none;
  padding: 22px 24px;
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 600;
  color: var(--ink);
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: "+";
  color: var(--brand);
  font-size: 22px;
  font-weight: 700;
  line-height: 1;
  flex-shrink: 0;
  transition: transform .2s;
}
.faq-item[open] summary::after { transform: rotate(45deg); }
.faq-item .faq-answer {
  padding: 0 24px 22px;
  font-size: 14.5px;
  color: var(--text);
  line-height: 1.65;
  margin: 0;
}
.faq-item .faq-answer strong { color: var(--ink); }

/* --- CTA final ---------------------------------------------------------- */
.final-cta { position: relative; padding: 20px 24px 100px; text-align: center; }
.final-cta__inner { max-width: 720px; margin: 0 auto; }
.final-cta h2 {
  font-family: var(--font-display);
  font-size: clamp(28px, 3.6vw, 48px);
  font-weight: 700;
  color: var(--ink);
  letter-spacing: -.03em;
  margin: 0 0 16px;
}
.final-cta p { font-size: 18px; color: var(--text); margin: 0 0 32px; line-height: 1.6; }

/* --- Footer ------------------------------------------------------------- */
.footer {
  position: relative;
  background: var(--ink);
  color: #cbd5e1;
  padding: 54px 24px 40px;
}
.footer__top {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  align-items: center;
  justify-content: space-between;
}
.footer__logo {
  display: block;
  height: 42px;
  width: auto;
}
.footer__tagline { font-size: 13px; color: var(--muted); margin: 12px 0 0; max-width: 300px; }
.footer__nav { display: flex; gap: 26px; flex-wrap: wrap; }
.footer__nav a { color: #cbd5e1; text-decoration: none; font-size: 14px; transition: color .2s; }
.footer__nav a:hover { color: var(--brand); }
.footer__copy { font-size: 13px; color: var(--muted); }

.footer__legal {
  max-width: 1100px;
  margin: 34px auto 0;
  padding-top: 22px;
  border-top: 1px solid rgba(255, 255, 255, .1);
  font-size: 12.5px;
  line-height: 1.6;
  color: var(--muted);
}

/* --- Responsive --------------------------------------------------------- */
@media (max-width: 860px) {
  .plan--featured { transform: none; }
  .plan--featured:hover { transform: translateY(-6px); }
}

@media (max-width: 760px) {
  /* La píldora fija no admite 3 enlaces + CTA en pantallas pequeñas.
     Se conservan marca y CTA; la navegación vive en el pie y en el flujo. */
  .nav__links { display: none; }
  .nav { padding-left: 16px; }
  .hero { padding-top: 120px; min-height: auto; }
  .section { padding: 40px 20px 64px; }
  .footer__top { flex-direction: column; align-items: flex-start; }
}

@media (max-width: 420px) {
  .plan__amount { font-size: 38px; }
  .hero { padding-left: 18px; padding-right: 18px; }
}

/* Impresión: sin decoraciones ni elementos fijos. */
@media print {
  .nav, .page__glow, .page__grid, .result-panel__blob, .skip-link { display: none !important; }
  .page, body { background: #fff; }
  .hero { min-height: auto; padding-top: 20px; }
}

/* Respeta la preferencia de movimiento reducido. */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
}
