/* =========================================================
   Solventa Lex Firma · Estilos
   Colores de marca: azul marino + dorado sobre marfil
   ========================================================= */

:root {
  --navy: hsl(218 45% 17%);
  --navy-deep: hsl(218 48% 12%);
  --gold: hsl(36 46% 52%);
  --gold-soft: hsl(36 46% 92%);
  --ivory: hsl(40 33% 97%);
  --sand: hsl(40 24% 92%);
  --ink: hsl(218 42% 14%);
  --muted: hsl(218 12% 40%);
  --line: hsl(40 16% 85%);
  --white: #fff;
  --error: hsl(0 65% 42%);
  --logo-ink: #1e1510;   /* SOLVENTA */
  --logo-brown: #44291a; /* pluma y LEX FIRMA */

  --serif: "Fraunces", Georgia, serif;
  --display: "Bebas Neue", "Oswald", "Arial Narrow", sans-serif;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;

  --container: 1180px;
  --gutter: clamp(16px, 4vw, 32px);
  --section-y: clamp(64px, 9vw, 112px);
  --radius: 4px;
  --header-h: 72px;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: var(--header-h); -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font: 400 1rem/1.65 var(--sans);
  color: var(--ink);
  background: var(--ivory);
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--serif); font-weight: 400; line-height: 1.15; margin: 0 0 .6em; }
h1 { font-size: clamp(2.3rem, 5.5vw, 4rem); }
h2 { font-size: clamp(1.8rem, 3.6vw, 2.6rem); }
h3 { font-size: 1.25rem; }
p { margin: 0 0 1em; }

.container { width: min(100% - 2 * var(--gutter), var(--container)); margin-inline: auto; }
.narrow { max-width: 820px; }

.ico { width: 1.15em; height: 1.15em; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; flex: none; vertical-align: -0.2em; }
.ico-lg { width: 32px; height: 32px; color: var(--gold); }

.skip-link { position: absolute; left: -999px; top: 8px; background: var(--gold); color: var(--navy); padding: 8px 14px; z-index: 100; }
.skip-link:focus { left: 8px; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }

.eyebrow { font-size: .75rem; font-weight: 600; letter-spacing: .2em; text-transform: uppercase; color: var(--gold); margin-bottom: 1rem; }
.section { padding-block: var(--section-y); }
.section-alt { background: var(--sand); }
.section-dark { background: var(--navy); color: var(--ivory); }
.section-intro { max-width: 680px; color: var(--muted); margin-bottom: 2.5rem; }
.section-dark .section-intro { color: hsl(40 20% 80%); }

/* ---------- Botones ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5em;
  padding: .9em 1.5em; border: 1px solid transparent; border-radius: var(--radius);
  font: 500 .95rem var(--sans); text-decoration: none; cursor: pointer;
  transition: background-color .2s, color .2s, border-color .2s;
}
.btn-sm { padding: .6em 1.1em; font-size: .875rem; }
.btn-block { width: 100%; }
.btn-gold { background: var(--gold); color: var(--navy-deep); }
.btn-gold:hover { background: var(--ivory); }
.btn-primary { background: var(--navy); color: var(--ivory); }
.btn-primary:hover { background: var(--gold); color: var(--navy-deep); }
.btn-ghost { border-color: hsl(40 33% 97% / .35); color: var(--ivory); }
.btn-ghost:hover { border-color: var(--gold); color: var(--gold); }

/* ---------- Encabezado ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: hsl(218 48% 12% / .94);
  backdrop-filter: blur(8px);
  color: var(--ivory);
  border-bottom: 1px solid hsl(40 33% 97% / .08);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; min-height: var(--header-h); }

.brand { display: inline-flex; align-items: center; gap: .75rem; text-decoration: none; }
.brand-fallback { display: inline-flex; flex-direction: column; align-items: flex-end; line-height: 1; color: var(--logo-ink); }
.brand-word { font: 400 2rem/0.9 var(--display); letter-spacing: .02em; text-transform: uppercase; }
.brand-sub { font: 500 .6rem var(--sans); letter-spacing: .5em; margin-right: -.5em; text-transform: uppercase; color: var(--logo-brown); margin-top: .3rem; }
/* El logo café se ve tal cual sobre fondo claro; "multiply" oculta un fondo blanco si la imagen lo trae */
.brand-logo { display: none; height: 52px; width: auto; max-width: 200px; object-fit: contain; mix-blend-mode: multiply; }
.has-logo .brand-logo { display: block; }
.has-logo .brand-fallback { display: none; }

/* Logo de Línea Registral */
.lr-logo { display: inline-flex; align-items: center; gap: .75rem; color: var(--ivory); }
.lr-mark {
  display: grid; place-items: center; width: 42px; height: 42px;
  border: 1px solid var(--gold); color: var(--gold);
  font: 500 1.05rem var(--serif); letter-spacing: .05em;
}
.lr-text { display: flex; flex-direction: column; line-height: 1.2; }
.lr-text strong { font: 500 1.2rem var(--serif); }
.lr-text small { font-size: .62rem; letter-spacing: .18em; text-transform: uppercase; color: var(--gold); }

/* Franja "Un sitio de Solventa Lex Firma" */
.endorsement { background: var(--white); border-top: 1px solid var(--line); }
.endorsement-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: .75rem 1.5rem; padding-block: 2rem; }
.endorsement p { margin: 0; font-size: .8rem; letter-spacing: .18em; text-transform: uppercase; color: var(--muted); }
.endorsement .brand-logo { height: 64px; max-width: 240px; }

.nav { display: flex; align-items: center; gap: 1.75rem; }
.nav a:not(.btn) { text-decoration: none; font-size: .9rem; opacity: .85; }
.nav a:not(.btn):hover { opacity: 1; color: var(--gold); }

.nav-toggle { display: none; background: none; border: 0; padding: 10px; cursor: pointer; }
.nav-toggle span { display: block; width: 24px; height: 2px; margin: 5px 0; background: var(--ivory); transition: transform .2s, opacity .2s; }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

@media (max-width: 900px) {
  .nav-toggle { display: block; }
  .nav {
    position: absolute; inset: var(--header-h) 0 auto 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--navy-deep); padding: .5rem var(--gutter) 1.5rem;
    border-bottom: 1px solid hsl(40 33% 97% / .1);
    display: none;
  }
  .nav.is-open { display: flex; }
  .nav a:not(.btn) { padding: .9rem 0; border-bottom: 1px solid hsl(40 33% 97% / .08); font-size: 1rem; }
  .nav .btn { margin-top: 1rem; }
}

/* ---------- Portada ---------- */
.hero {
  position: relative; color: var(--ivory);
  padding-block: clamp(80px, 14vw, 160px) clamp(56px, 8vw, 96px);
  background:
    linear-gradient(180deg, hsl(218 48% 12% / .55), hsl(218 48% 12% / .96)),
    url("https://d8j0ntlcm91z4.cloudfront.net/user_3KHf4zgbYoUTq5RG5xKyfsS26NZ/hf_20261119_231229_7697a594-7de4-4d73-b4ff-d9ec37bad399_min.webp") center / cover no-repeat,
    var(--navy-deep);
}
.hero-inner { max-width: var(--container); }
.hero h1 { max-width: 18ch; }
.hero h1 em { font-style: italic; color: var(--gold); }
.lead { max-width: 640px; font-size: 1.1rem; color: hsl(40 20% 85%); }
.hero-actions { display: flex; flex-wrap: wrap; gap: .75rem; margin: 2rem 0 3rem; }
.hero-facts {
  list-style: none; margin: 0; padding: 1.5rem 0 0;
  display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 1.25rem;
  border-top: 1px solid hsl(40 33% 97% / .15);
  font-size: .9rem; color: hsl(40 20% 80%);
}
.hero-facts strong { display: block; font: 400 2rem var(--serif); color: var(--gold); }

/* ---------- Diagnóstico rápido ---------- */
.problems { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 1rem; }
.problem {
  display: flex; flex-direction: column; justify-content: space-between; gap: 1rem;
  padding: 1.4rem; background: var(--white); border: 1px solid var(--line); border-radius: var(--radius);
  text-decoration: none; transition: border-color .2s, transform .2s;
}
.problem:hover { border-color: var(--gold); transform: translateY(-2px); }
.problem-q { font: 400 1.1rem/1.35 var(--serif); }
.problem-a { display: inline-flex; align-items: center; gap: .4em; font-size: .85rem; font-weight: 500; color: var(--gold); }

/* ---------- Bloques de dos columnas ---------- */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(32px, 6vw, 80px); align-items: center; }
.split-top { align-items: start; }
@media (max-width: 860px) { .split { grid-template-columns: 1fr; } }

.split-media { position: relative; margin: 0; }
.split-media img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; background: var(--line); }
.badge-years {
  position: absolute; right: -16px; bottom: 24px; max-width: 220px;
  background: var(--navy); color: hsl(40 20% 85%); padding: 1.2rem 1.4rem; font-size: .85rem;
}
.badge-years strong { display: block; font: 400 2.2rem var(--serif); color: var(--gold); }
@media (max-width: 860px) { .badge-years { right: 12px; } }

.checklist { list-style: none; padding: 0; margin: 1.5rem 0 0; display: grid; gap: .8rem; }
.checklist li { display: flex; gap: .7rem; }
.checklist .ico { color: var(--gold); margin-top: .2em; }

/* ---------- Servicios ---------- */
.services { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); }
@media (max-width: 380px) { .services { grid-template-columns: 1fr; } }
.service { background: var(--white); padding: 2rem; }
.service h3 { margin-top: 1.1rem; }
.service p { color: var(--muted); font-size: .95rem; }
.service ul { margin: 0; padding-left: 1.1rem; font-size: .9rem; display: grid; gap: .35rem; }
.service li::marker { color: var(--gold); }
.service:target { outline: 2px solid var(--gold); outline-offset: -2px; }

.b2b {
  display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 1.5rem;
  margin-top: 2rem; padding: 2rem; background: var(--gold-soft); border-left: 3px solid var(--gold);
}
.b2b h3 { margin-bottom: .4rem; }
.b2b p { margin: 0; color: var(--muted); }
@media (max-width: 760px) { .b2b { grid-template-columns: 1fr; } }

/* ---------- Paquetes ---------- */
.packages { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 1rem; }
.package {
  position: relative; display: flex; flex-direction: column;
  padding: 1.75rem; border: 1px solid hsl(40 33% 97% / .15); border-radius: var(--radius);
}
.package-featured { border-color: var(--gold); background: hsl(218 48% 12% / .5); }
.package .ico-lg { position: absolute; top: 1.5rem; right: 1.5rem; width: 24px; height: 24px; }
.package h3 { margin-bottom: .3rem; }
.package-for { font-size: .9rem; color: hsl(40 20% 78%); }
.package ul { list-style: none; padding: 0; margin: 0 0 1.5rem; font-size: .9rem; display: grid; gap: .5rem; flex: 1; }
.package li { padding-left: 1.2rem; position: relative; }
.package li::before { content: ""; position: absolute; left: 0; top: .6em; width: 6px; height: 6px; background: var(--gold); transform: rotate(45deg); }
.tag { position: absolute; top: -.75rem; left: 1.75rem; background: var(--gold); color: var(--navy-deep); font-size: .7rem; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; padding: .25rem .6rem; }

/* ---------- Método ---------- */
.method-img { margin-top: 2rem; width: 100%; aspect-ratio: 3 / 2; object-fit: cover; background: var(--line); }
.steps { list-style: none; counter-reset: paso; margin: 0; padding: 0; }
.steps li { counter-increment: paso; display: grid; grid-template-columns: 3.5rem 1fr; padding: 1.5rem 0; border-top: 1px solid var(--line); }
.steps li::before { content: counter(paso, decimal-leading-zero); font: 400 1.5rem var(--serif); color: var(--gold); grid-row: span 2; }
.steps h3 { margin-bottom: .3rem; }
.steps p { margin: 0; color: var(--muted); }

/* ---------- Perfil ---------- */
.profile { display: grid; grid-template-columns: 280px 1fr; gap: clamp(32px, 6vw, 72px); align-items: center; }
.profile-role { color: var(--gold); font-size: 1.05rem; font-weight: 500; }
.team-panel { background: var(--navy); color: var(--ivory); padding: 2rem; border-top: 3px solid var(--gold); }
.team-panel-title { font-size: .75rem; font-weight: 600; letter-spacing: .2em; text-transform: uppercase; color: var(--gold); }
.team-panel ul { list-style: none; margin: 0; padding: 0; }
.team-panel li { font: 400 1.15rem/1.35 var(--serif); padding: .8rem 0; border-top: 1px solid hsl(40 33% 97% / .12); }
@media (max-width: 760px) { .profile { grid-template-columns: 1fr; } }

/* ---------- Preguntas frecuentes ---------- */
.faq { border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary {
  list-style: none; cursor: pointer; padding: 1.25rem 2.5rem 1.25rem 0; position: relative;
  font: 400 1.15rem/1.4 var(--serif);
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: .25rem; top: 1.1rem; font: 300 1.5rem var(--sans); color: var(--gold); transition: transform .2s; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { color: var(--muted); padding-right: 2.5rem; }

/* ---------- Contacto ---------- */
.contact-list { list-style: none; padding: 0; margin: 2rem 0 0; display: grid; gap: 1rem; }
.contact-list li { display: flex; gap: .9rem; align-items: flex-start; }
.contact-list .ico { width: 40px; height: 40px; padding: 10px; background: var(--gold-soft); color: var(--gold); }
.contact-list a { text-decoration: none; padding-top: .5rem; }
.contact-list a:hover { color: var(--gold); }

.contact-form { background: var(--white); border: 1px solid var(--line); padding: clamp(1.5rem, 4vw, 2.5rem); display: grid; gap: 1.1rem; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1.1rem; }
@media (max-width: 560px) { .field-row { grid-template-columns: 1fr; } }
.field label { display: block; font-size: .85rem; font-weight: 500; margin-bottom: .4rem; }
.optional { font-weight: 400; color: var(--muted); }
.field input, .field select, .field textarea {
  width: 100%; padding: .8rem 1rem; font: inherit; font-size: .95rem; color: var(--ink);
  background: var(--ivory); border: 1px solid var(--line); border-radius: var(--radius);
}
.field textarea { resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--gold); }
.field .is-invalid { border-color: var(--error); }
.consent { display: flex; gap: .6rem; font-size: .85rem; color: var(--muted); align-items: flex-start; }
.consent input { margin-top: .25rem; accent-color: var(--navy); }
.hp { position: absolute; left: -9999px; }
.form-status { margin: 0; font-size: .9rem; min-height: 1.4em; }
.form-status.is-ok { color: hsl(150 45% 30%); }
.form-status.is-error { color: var(--error); }

/* ---------- Pie ---------- */
.site-footer { background: var(--navy-deep); color: hsl(40 20% 78%); padding-top: 64px; font-size: .9rem; }
.site-footer .brand { margin-bottom: 1rem; }

.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1.3fr; gap: 2.5rem; padding-bottom: 48px; }
.footer-grid nav { display: flex; flex-direction: column; gap: .4rem; }
.footer-grid a { text-decoration: none; }
.footer-grid a:hover { color: var(--gold); }
.footer-title { font: 600 .75rem var(--sans); letter-spacing: .15em; text-transform: uppercase; color: var(--ivory); margin-bottom: 1rem; }
.footer-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1rem; padding-block: 1.5rem; border-top: 1px solid hsl(40 33% 97% / .1); font-size: .8rem; }
.footer-bottom p { margin: 0; }
@media (max-width: 760px) { .footer-grid { grid-template-columns: 1fr; } }

/* ---------- Botón flotante de WhatsApp ---------- */
.wa-float {
  position: fixed; right: 20px; bottom: 20px; z-index: 40;
  display: grid; place-items: center; width: 56px; height: 56px; border-radius: 50%;
  background: #25d366; color: var(--white); box-shadow: 0 6px 20px rgb(0 0 0 / .25);
}
.wa-float .ico { width: 28px; height: 28px; }

/* ---------- Página de aviso de privacidad ---------- */
.legal { padding-block: var(--section-y); }
.legal h1 { font-size: clamp(2rem, 4vw, 2.8rem); }
.legal h2 { font-size: 1.4rem; margin-top: 2rem; }
.legal p, .legal li { color: var(--muted); }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}
