/* Especialistas Jurídicos Asociados
   Identidad: verde esmeralda + dorado, Fraunces (titulares) + Work Sans (cuerpo) */

@font-face { font-family: 'Fraunces'; font-style: normal; font-weight: 100 900; font-display: swap; src: url('/assets/fonts/fraunces-latin-opsz-normal.woff2') format('woff2'); }
@font-face { font-family: 'Fraunces'; font-style: italic; font-weight: 100 900; font-display: swap; src: url('/assets/fonts/fraunces-latin-full-italic.woff2') format('woff2'); }
@font-face { font-family: 'Work Sans'; font-style: normal; font-weight: 100 900; font-display: swap; src: url('/assets/fonts/work-sans-latin-wght-normal.woff2') format('woff2'); }

:root {
  --emerald: #0A4A38;
  --emerald-deep: #06352A;
  --gold: #B08D3C;
  --gold-light: #DCC58B;
  --paper: #F1F4F0;
  --white: #FFFFFF;
  --ink: #14231D;
  --ink-soft: #46574F;
  --line: #CBD5CE;
  --line-dark: rgba(220, 197, 139, 0.32);
  --font-head: 'Fraunces', Georgia, serif;
  --font-body: 'Work Sans', system-ui, sans-serif;
  --wrap: 1080px;
}

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

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.6;
}

img { max-width: 100%; height: auto; display: block; }

h1, h2, h3 {
  font-family: var(--font-head);
  font-weight: 500;
  line-height: 1.14;
  margin: 0;
  text-wrap: balance;
}

p { margin: 0; }

a { color: inherit; }

:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 3px;
}

.wrap {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 20px;
}

/* Botones */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 52px;
  padding: 14px 28px;
  border: 1px solid transparent;
  border-radius: 3px;
  font-family: var(--font-body);
  font-size: 1.02rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease;
}

.btn-gold { background: var(--gold); color: var(--ink); }
.btn-gold:hover { background: var(--gold-light); }

.btn-line { border-color: var(--line-dark); color: var(--white); background: transparent; }
.btn-line:hover { border-color: var(--gold-light); }

.btn-emerald { background: var(--emerald); color: var(--white); }
.btn-emerald:hover { background: var(--emerald-deep); }

.btn svg { width: 20px; height: 20px; flex: none; }

/* Encabezado */
.site-header {
  background: var(--emerald-deep);
  color: var(--white);
  border-bottom: 1px solid var(--line-dark);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-top: 14px;
  padding-bottom: 14px;
}

.brand {
  font-family: var(--font-head);
  font-size: 1.12rem;
  font-weight: 500;
  color: var(--gold-light);
  text-decoration: none;
  line-height: 1.2;
}

.header-cta {
  min-height: 44px;
  padding: 8px 18px;
  font-size: 0.95rem;
  white-space: nowrap;
}

/* Hero */
.hero {
  background: var(--emerald);
  color: var(--white);
  padding: 56px 0 64px;
}

.hero-inner {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 0.65fr);
  gap: 56px;
  align-items: center;
}

.hero h1 {
  font-size: clamp(2.05rem, 5.2vw, 3.5rem);
  font-weight: 400;
  letter-spacing: -0.01em;
}

.hero h1 em {
  font-style: italic;
  font-variation-settings: 'WONK' 0;
  color: var(--gold-light);
}

.hero-lead {
  margin-top: 22px;
  font-size: 1.14rem;
  max-width: 52ch;
  color: #DDE7E1;
}

.hero-list {
  margin: 10px 0 0;
  padding-left: 1.5em;
  font-size: 1.14rem;
  max-width: 52ch;
  color: #DDE7E1;
}

.hero-list li {
  margin-top: 6px;
  padding-left: 4px;
}

.hero-list li::marker {
  color: var(--gold-light);
  font-weight: 600;
}

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

.hero-note {
  margin-top: 16px;
  font-size: 0.92rem;
  color: #B9CBC2;
  max-width: 52ch;
}

.portrait {
  position: relative;
  margin: 0;
  max-width: 320px;
  justify-self: end;
}

.portrait-frame { position: relative; }

.portrait-frame::before {
  content: "";
  position: absolute;
  inset: 14px -14px -14px 14px;
  border: 1px solid var(--gold);
}

.portrait img {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  object-position: center top;
}

.portrait figcaption {
  position: relative;
  margin-top: 26px;
  font-size: 0.9rem;
  line-height: 1.45;
  color: #C9D8D0;
}

.portrait figcaption strong {
  display: block;
  font-family: var(--font-head);
  font-weight: 500;
  font-size: 1.08rem;
  color: var(--white);
}

/* Secciones */
.band { padding: 64px 0; }
.band-white { background: var(--white); }
.band-emerald { background: var(--emerald); color: var(--white); }

.band h2 {
  font-size: clamp(1.6rem, 3.6vw, 2.3rem);
  max-width: 24ch;
}

.band-lead {
  margin-top: 14px;
  max-width: 60ch;
  color: var(--ink-soft);
  font-size: 1.06rem;
}

.band-emerald .band-lead { color: #DDE7E1; }

/* Creencias: lo que se dice frente a lo que ocurre */
.beliefs { margin-top: 36px; border-top: 1px solid var(--line); }

.belief {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 40px;
  padding: 30px 0;
  border-bottom: 1px solid var(--line);
  align-items: start;
}

.belief q {
  font-family: var(--font-head);
  font-style: italic;
  font-variation-settings: 'WONK' 0;
  font-weight: 400;
  font-size: clamp(1.35rem, 3vw, 1.8rem);
  line-height: 1.22;
  color: var(--emerald);
  quotes: "“" "”";
}

.belief p { color: var(--ink); max-width: 46ch; }

.belief p strong { color: var(--emerald); font-weight: 600; }

/* Dos servicios */
.doors {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
  margin-top: 36px;
}

.door {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 30px 28px;
  background: var(--paper);
  border-top: 3px solid var(--gold);
  text-decoration: none;
  color: var(--ink);
}

.door:hover { background: #E7ECE7; }

.door h3 { font-size: 1.45rem; color: var(--emerald); }

.door span {
  margin-top: auto;
  font-weight: 600;
  color: var(--emerald);
  text-decoration: underline;
  text-underline-offset: 4px;
}

/* Situaciones (lista de identificación) */
.cases {
  list-style: none;
  margin: 36px 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 48px;
}

.cases li {
  padding: 20px 0 20px 22px;
  border-top: 1px solid var(--line);
  border-left: 2px solid var(--gold);
  padding-left: 20px;
  margin-bottom: 20px;
  border-top: 0;
  font-size: 1.06rem;
}

/* Tarjetas por giro */
.trades {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
  margin-top: 36px;
}

.trade {
  padding: 26px 24px;
  background: var(--white);
  border-top: 3px solid var(--gold);
}

.band-white .trade { background: var(--paper); }

.trade h3 { font-size: 1.28rem; color: var(--emerald); margin-bottom: 10px; }

/* Multa */
.fine {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: 48px;
  align-items: center;
}

.fine-amount {
  font-family: var(--font-head);
  font-weight: 400;
  font-size: clamp(2.5rem, 8vw, 4.2rem);
  line-height: 1;
  color: var(--gold-light);
}

.fine-amount small {
  display: block;
  margin-top: 12px;
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.4;
  color: #DDE7E1;
}

.fine-copy p { color: #EDF3EF; font-size: 1.1rem; }

.fine-copy .fine-source {
  margin-top: 16px;
  font-size: 0.86rem;
  color: #B9CBC2;
}

/* Pasos */
.steps {
  list-style: none;
  counter-reset: paso;
  margin: 36px 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 32px;
}

.steps li { counter-increment: paso; padding-top: 18px; border-top: 1px solid var(--line); }

.steps li::before {
  content: counter(paso);
  display: block;
  font-family: var(--font-head);
  font-size: 2rem;
  line-height: 1;
  color: var(--gold);
  margin-bottom: 12px;
}

.steps h3 { font-size: 1.2rem; margin-bottom: 8px; color: var(--emerald); }

.steps p { color: var(--ink-soft); }

.fineprint {
  margin-top: 28px;
  font-size: 0.88rem;
  color: var(--ink-soft);
}

/* Cierre */
.closing { text-align: left; }

.closing h2 { max-width: 22ch; }

.closing .hero-actions { margin-top: 28px; }

.contact-list {
  list-style: none;
  margin: 40px 0 0;
  padding: 28px 0 0;
  border-top: 1px solid var(--line-dark);
  display: flex;
  flex-wrap: wrap;
  gap: 14px 36px;
}

.contact-list a {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  color: var(--white);
  text-decoration: none;
  font-weight: 500;
}

.contact-list a:hover { color: var(--gold-light); }

.contact-list svg { width: 20px; height: 20px; color: var(--gold-light); flex: none; }
.contact-list .contact-wa svg { width: 26px; height: 26px; }
.contact-list .contact-in img { height: 24px; width: auto; filter: brightness(0) invert(1); opacity: 0.9; }
.contact-list .contact-in:hover img { opacity: 1; }

/* Pie */
.site-footer {
  background: var(--emerald-deep);
  color: #B9CBC2;
  padding: 30px 0 34px;
  font-size: 0.9rem;
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 18px 40px;
}

.footer-inner p + p { margin-top: 4px; }

.site-footer strong { color: var(--white); font-weight: 600; }

.site-footer .brand { font-size: 1.05rem; }

.footer-links { display: flex; flex-wrap: wrap; gap: 6px 22px; align-content: start; }

.footer-links a { color: #DDE7E1; min-height: 32px; display: inline-flex; align-items: center; }

/* Formulario de valoración */
.lead-dialog {
  width: min(520px, calc(100vw - 24px));
  max-height: calc(100dvh - 24px);
  padding: 0;
  border: 0;
  border-top: 4px solid var(--gold);
  border-radius: 3px;
  background: var(--white);
  color: var(--ink);
  overflow-y: auto;
}

.lead-dialog::backdrop { background: rgba(6, 53, 42, 0.72); }

.lead-form { padding: 26px 24px 24px; }

.lead-head {
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 16px;
}

.lead-head h2 { font-size: 1.5rem; color: var(--emerald); }

.lead-close {
  flex: none;
  width: 44px;
  height: 44px;
  margin: -10px -12px 0 0;
  border: 0;
  background: transparent;
  font-size: 1.7rem;
  line-height: 1;
  color: var(--ink-soft);
  cursor: pointer;
}

.lead-intro { margin-top: 8px; color: var(--ink-soft); font-size: 0.96rem; }

.field { margin-top: 18px; border: 0; padding: 0; min-width: 0; }

.field > label, .field > legend {
  display: block;
  padding: 0;
  margin-bottom: 7px;
  font-weight: 600;
  font-size: 0.96rem;
}

.field input[type="text"], .field select {
  width: 100%;
  min-height: 50px;
  padding: 10px 12px;
  border: 1px solid #9FB0A6;
  border-radius: 3px;
  background: var(--white);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1rem;
}

.choices { display: grid; gap: 8px; }

.choice {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 46px;
  padding: 8px 12px;
  border: 1px solid #9FB0A6;
  border-radius: 3px;
  cursor: pointer;
}

.choice:has(input:checked) { border-color: var(--emerald); background: var(--paper); }

.choice input { accent-color: var(--emerald); width: 18px; height: 18px; flex: none; }

.lead-form .btn { width: 100%; margin-top: 22px; }

.lead-legal { margin-top: 12px; font-size: 0.84rem; color: var(--ink-soft); }

/* Texto legal */
.legal { padding: 48px 0 64px; }

.legal h1 { font-size: clamp(1.8rem, 4vw, 2.4rem); color: var(--emerald); }

.legal h2 { font-size: 1.25rem; margin-top: 32px; color: var(--emerald); }

.legal p, .legal ul { max-width: 68ch; margin-top: 12px; }

.legal ul { padding-left: 20px; }

/* Responsivo */
@media (max-width: 820px) {
  body { font-size: 16.5px; }
  .hero { padding: 40px 0 48px; }
  .hero-inner { grid-template-columns: 1fr; gap: 40px; }
  .portrait {
    justify-self: start;
    max-width: none;
    display: grid;
    grid-template-columns: 112px 1fr;
    gap: 20px;
    align-items: center;
  }
  .portrait-frame::before { display: none; }
  .portrait img { aspect-ratio: 1 / 1; border: 1px solid var(--gold); }
  .portrait figcaption { margin-top: 0; }
  .band { padding: 48px 0; }
  .belief { grid-template-columns: 1fr; gap: 12px; padding: 24px 0; }
  .doors, .trades, .steps, .cases, .fine { grid-template-columns: 1fr; }
  .fine { gap: 24px; }
  .steps { gap: 24px; }
  .hero-actions .btn { width: 100%; }
}

@media (max-width: 420px) {
  .brand { font-size: 0.98rem; }
  .header-cta { padding: 8px 12px; font-size: 0.88rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn { transition: none; }
}
