/* CAVAS Abogados — hoja de estilo principal
   Sin dependencias externas: no hay fuentes ni scripts de terceros que carguen,
   por lo que el sitio abre rápido y no filtra visitas a otros servidores. */

:root {
  --ink:        #14181f;
  --ink-soft:   #4a5261;
  --line:       #dfe3ea;
  --bg:         #ffffff;
  --bg-alt:     #f5f6f8;
  --navy:       #1b2a41;
  --navy-deep:  #111b2b;
  --accent:     #8a6d3b;
  --accent-lit: #a98c56;
  --focus:      #2563eb;

  --serif: Georgia, "Times New Roman", Times, serif;
  --sans:  -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;

  --wrap: 1120px;
  --r: 4px;
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

body {
  margin: 0;
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.65;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: 24px;
}

h1, h2, h3 {
  font-family: var(--serif);
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.01em;
  color: var(--navy-deep);
  margin: 0 0 .5em;
}

h1 { font-size: clamp(2rem, 5vw, 3.25rem); }
h2 { font-size: clamp(1.6rem, 3.4vw, 2.25rem); }
h3 { font-size: 1.2rem; }

p { margin: 0 0 1.1em; }

a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--navy); }

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

.skip {
  position: absolute;
  left: -9999px;
  background: var(--navy);
  color: #fff;
  padding: 10px 16px;
  z-index: 100;
}
.skip:focus { left: 12px; top: 12px; }

.eyebrow {
  font-size: .78rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 600;
  margin-bottom: .6em;
}

/* ---------- Encabezado ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255,255,255,.92);
  backdrop-filter: saturate(1.4) blur(8px);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 72px;
}

.brand {
  display: flex;
  align-items: baseline;
  gap: 8px;
  text-decoration: none;
  color: var(--navy-deep);
}
.brand-mark {
  font-family: var(--serif);
  font-size: 1.35rem;
  font-weight: 600;
  letter-spacing: .08em;
}
.brand-sub {
  font-size: .78rem;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.menu {
  display: flex;
  gap: 28px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.menu a {
  color: var(--ink-soft);
  text-decoration: none;
  font-size: .95rem;
}
.menu a:hover { color: var(--navy); }

.nav-toggle {
  display: none;
  font: inherit;
  font-size: .9rem;
  padding: 8px 14px;
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: #fff;
  color: var(--navy);
  cursor: pointer;
}

/* ---------- Portada ---------- */

.hero {
  background: linear-gradient(165deg, var(--navy-deep) 0%, var(--navy) 62%, #24374f 100%);
  color: #eef1f5;
  padding: clamp(64px, 11vw, 128px) 0;
}
.hero h1 { color: #fff; }
.hero .eyebrow { color: var(--accent-lit); }

.lede {
  font-size: clamp(1.02rem, 1.9vw, 1.2rem);
  max-width: 58ch;
  color: #c9d2de;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 30px;
}

.btn {
  display: inline-block;
  padding: 13px 26px;
  border-radius: var(--r);
  font-size: .96rem;
  font-weight: 500;
  text-decoration: none;
  border: 1px solid transparent;
  transition: background-color .18s ease, color .18s ease, border-color .18s ease;
}
.btn-primary {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}
.btn-primary:hover { background: var(--accent-lit); border-color: var(--accent-lit); color: #fff; }
.btn-ghost {
  border-color: rgba(255,255,255,.38);
  color: #eef1f5;
}
.btn-ghost:hover { background: rgba(255,255,255,.1); color: #fff; }
.btn-block { display: block; text-align: center; }

.btn-outline {
  border-color: var(--line);
  background: #fff;
  color: var(--navy);
  margin-top: 10px;
}
.btn-outline:hover { border-color: var(--navy); color: var(--navy); }

/* Cifras de trayectoria bajo la portada */
.stats {
  display: flex;
  flex-wrap: wrap;
  gap: clamp(28px, 5vw, 56px);
  list-style: none;
  margin: 48px 0 0;
  padding: 26px 0 0;
  border-top: 1px solid rgba(255,255,255,.16);
}
.stats li { display: flex; flex-direction: column; gap: 2px; }
.stats strong {
  font-family: var(--serif);
  font-size: clamp(1.5rem, 3vw, 2rem);
  color: var(--accent-lit);
  font-weight: 600;
  line-height: 1.1;
}
.stats span {
  font-size: .84rem;
  color: #a9b6c6;
  letter-spacing: .02em;
}

/* ---------- Secciones ---------- */

.section { padding: clamp(56px, 8vw, 96px) 0; }
.section-alt { background: var(--bg-alt); }

.section-lede {
  max-width: 62ch;
  color: var(--ink-soft);
  font-size: 1.03rem;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 22px;
  margin-top: 36px;
}
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(290px, 1fr)); }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); }

.card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 26px 24px;
  border-top: 3px solid var(--accent);
}
.card h3 { margin-bottom: .4em; }
.card p { margin: 0; color: var(--ink-soft); font-size: .96rem; }
.card p + p { margin-top: .9em; }

.card-tag {
  display: inline-block;
  font-size: .72rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--accent);
  background: #f6f1e7;
  border-radius: 2px;
  padding: 4px 9px;
  margin-bottom: 14px;
}

.card-lg { padding: 32px 30px; }

/* Proceso numerado */
.steps {
  list-style: none;
  counter-reset: paso;
  margin: 38px 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 30px 34px;
}
.steps li {
  counter-increment: paso;
  padding-top: 18px;
  border-top: 2px solid var(--line);
  position: relative;
}
.steps li::before {
  content: counter(paso, decimal-leading-zero);
  font-family: var(--serif);
  font-size: .95rem;
  color: var(--accent);
  font-weight: 600;
  letter-spacing: .06em;
  display: block;
  margin-bottom: 8px;
}
.steps h3 { font-size: 1.1rem; margin-bottom: .35em; }
.steps p { margin: 0; color: var(--ink-soft); font-size: .95rem; }

/* Hueco por llenar en documentos legales (p. ej. domicilio fiscal) */
.pendiente {
  display: inline-block;
  min-width: 200px;
  border-bottom: 1px solid var(--ink-soft);
}

.note {
  margin: 38px 0 0;
  padding: 20px 24px;
  background: #f6f1e7;
  border-left: 3px solid var(--accent);
  border-radius: 0 var(--r) var(--r) 0;
  color: #6a5432;
  font-size: .97rem;
  max-width: 66ch;
}

.two-col {
  display: grid;
  grid-template-columns: 1.25fr .85fr;
  gap: clamp(32px, 5vw, 64px);
  align-items: start;
}

.two-col-wide { margin-top: 34px; }

/* Panel lateral con expectativas del cliente */
.panel {
  background: var(--navy-deep);
  color: #d3dbe6;
  border-radius: var(--r);
  padding: 30px 28px;
  border-top: 3px solid var(--accent);
}
.panel h3 { color: #fff; margin-bottom: .8em; }

.checklist {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 14px;
}
.checklist li {
  position: relative;
  padding-left: 26px;
  font-size: .95rem;
  line-height: 1.5;
}
.checklist li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: .45em;
  width: 9px;
  height: 5px;
  border-left: 2px solid var(--accent-lit);
  border-bottom: 2px solid var(--accent-lit);
  transform: rotate(-45deg);
}

.facts {
  list-style: none;
  margin: 26px 0 0;
  padding: 0;
  border-top: 1px solid var(--line);
}
.facts li {
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
  color: var(--ink-soft);
  font-size: .95rem;
}

.portrait { margin: 0; }
.portrait-placeholder {
  aspect-ratio: 4 / 5;
  background: #e6e9ee;
  border: 1px dashed #b8bfcb;
  border-radius: var(--r);
  display: grid;
  place-items: center;
  text-align: center;
  color: #7a8496;
  font-size: .9rem;
  line-height: 1.5;
}
.portrait img {
  width: 100%;
  height: auto;
  border-radius: var(--r);
  display: block;
}
.portrait figcaption {
  margin-top: 12px;
  font-size: .9rem;
  color: var(--ink-soft);
  text-align: center;
}

.contact-list { margin: 28px 0 0; }
.contact-list > div {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}
.contact-list dt {
  font-size: .82rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--ink-soft);
}
.contact-list dd { margin: 0; }

.contact-box {
  background: var(--bg-alt);
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 30px 28px;
}
.contact-box h3 { margin-bottom: .3em; }
.small { font-size: .93rem; color: var(--ink-soft); }

.disclaimer {
  margin: 20px 0 0;
  font-size: .8rem;
  line-height: 1.55;
  color: #6b7484;
  border-top: 1px solid var(--line);
  padding-top: 16px;
}

/* ---------- Pie ---------- */

.site-footer {
  background: var(--navy-deep);
  color: #9fabbc;
  padding: 34px 0;
  font-size: .89rem;
}
.footer-inner {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  justify-content: space-between;
  align-items: center;
}
.site-footer p { margin: 0; }
.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 22px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.site-footer a { color: #c6d0dd; text-decoration: none; }
.site-footer a:hover { color: #fff; text-decoration: underline; }

/* ---------- Adaptación a pantallas chicas ---------- */

@media (max-width: 860px) {
  .two-col { grid-template-columns: 1fr; }
  .portrait { max-width: 340px; margin-inline: auto; }
}

@media (max-width: 700px) {
  .nav-toggle { display: block; }
  .menu {
    display: none;
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    flex-direction: column;
    gap: 0;
    background: #fff;
    border-bottom: 1px solid var(--line);
    padding: 8px 24px 16px;
  }
  .menu.is-open { display: flex; }
  .menu a { display: block; padding: 12px 0; }
  .menu .lang-switch {
    display: inline-block;
    width: auto;
    align-self: flex-start;
    margin-top: 8px;
    padding: 6px 14px;
  }
  .header-inner { position: relative; }
  .contact-list > div { grid-template-columns: 1fr; gap: 2px; }
}

/* ---------- Impresión ---------- */

@media print {
  .site-header, .hero-actions, .nav-toggle { display: none; }
  body { font-size: 12pt; color: #000; }
  .hero { background: none; color: #000; }
  .hero h1, .hero .lede { color: #000; }
}

/* Selector de idioma */
.lang-switch {
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 5px 11px;
  font-size: .82rem !important;
  letter-spacing: .08em;
  color: var(--navy) !important;
  transition: border-color .15s, background .15s;
}
.lang-switch:hover {
  border-color: var(--navy);
  background: var(--bg-alt);
}
