/* ============================================================
   Catalina Zamorano Liberón — Abogada de familia
   Dirección: Ciruela.  Alegreya + Alegreya Sans, autoalojadas.
   ============================================================ */

@font-face { font-family:'Alegreya'; font-style:normal; font-weight:400 700;
  src:url(fonts/alegreya-normal-400-700.woff2) format('woff2'); font-display:swap; }
@font-face { font-family:'Alegreya'; font-style:italic; font-weight:400 500;
  src:url(fonts/alegreya-italic-400-500.woff2) format('woff2'); font-display:swap; }
@font-face { font-family:'Alegreya Sans'; font-style:normal; font-weight:400;
  src:url(fonts/alegreya-sans-normal-400.woff2) format('woff2'); font-display:swap; }
@font-face { font-family:'Alegreya Sans'; font-style:normal; font-weight:500;
  src:url(fonts/alegreya-sans-normal-500.woff2) format('woff2'); font-display:swap; }
@font-face { font-family:'Alegreya Sans'; font-style:normal; font-weight:700;
  src:url(fonts/alegreya-sans-normal-700.woff2) format('woff2'); font-display:swap; }
@font-face { font-family:'Alegreya Sans'; font-style:italic; font-weight:400;
  src:url(fonts/alegreya-sans-italic-400.woff2) format('woff2'); font-display:swap; }

:root {
  --ink:    #2E1B2E;
  --plum:   #5C3A52;
  --mauve:  #A8899C;
  --paper:  #FAF7F5;
  --paper2: #F3EDEB;
  --brass:  #C99A5B;
  --text:   #4E3A48;
  --rule:   rgba(168,137,156,.38);

  --display: 'Alegreya', Georgia, 'Times New Roman', serif;
  --body: 'Alegreya Sans', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;

  --wrap: 68rem;
  --pad: clamp(1.25rem, 4vw, 3rem);
}

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

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; }
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--text);
  font-family: var(--body);
  font-size: 1.05rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 { font-family: var(--display); color: var(--ink); text-wrap: balance; margin: 0; }
p { margin: 0; }
img { max-width: 100%; height: auto; display: block; }

a { color: var(--plum); }
a:focus-visible, button:focus-visible, input:focus-visible,
select:focus-visible, textarea:focus-visible, summary:focus-visible {
  outline: 2px solid var(--plum);
  outline-offset: 3px;
  border-radius: 2px;
}

.wrap { max-width: var(--wrap); margin-inline: auto; padding-inline: var(--pad); }

/* La barra superior es sticky y mide ~73px. Sin esto, todo destino de ancla
   queda escondido debajo de ella al saltar. */
[id] { scroll-margin-top: 5.5rem; }

/* Al aterrizar desde "O dime cuál se parece a lo tuyo", que se vea qué se señaló. */
.svc__item--lead:target { box-shadow: 0 0 0 2px var(--brass); }
.chips li:target { border-color: var(--brass); background: rgba(201,154,91,.16); box-shadow: 0 0 0 1px var(--brass); }
.faq details:target > summary { color: var(--plum); }

.skip {
  position: absolute; left: -9999px; top: 0; z-index: 100;
  background: var(--ink); color: var(--paper); padding: .75rem 1.25rem; text-decoration: none;
}
.skip:focus { left: 0; }

/* ---------- rótulos y botones ---------- */
.eyebrow {
  font-size: .72rem; font-weight: 700; letter-spacing: .18em;
  text-transform: uppercase; color: var(--plum);
}

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  font-family: var(--body); font-size: .95rem; font-weight: 700;
  padding: .85rem 1.5rem; border-radius: 2px; border: 1px solid transparent;
  text-decoration: none; cursor: pointer;
  transition: background .18s ease, color .18s ease, transform .18s ease, border-color .18s ease;
}
.btn:hover { transform: translateY(-2px); }
@media (prefers-reduced-motion: reduce) { .btn:hover { transform: none; } }

.btn--brass { background: var(--brass); color: var(--ink); }
.btn--brass:hover { background: var(--plum); color: var(--paper); }
.btn--ghost { background: transparent; color: var(--plum); border-color: var(--mauve); }
.btn--ghost:hover { border-color: var(--plum); background: rgba(92,58,82,.05); }
.btn--onDark { background: var(--brass); color: var(--ink); }
.btn--onDark:hover { background: var(--paper); }

/* ---------- barra superior ---------- */
.topbar {
  border-bottom: 1px solid var(--rule);
  background: var(--paper);
  position: sticky; top: 0; z-index: 20;
}
.topbar__in {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding-block: .9rem;
}
.topbar__name {
  font-family: var(--display); font-size: 1.15rem; font-weight: 500; color: var(--ink);
  text-decoration: none; line-height: 1.2;
}
.topbar__name span {
  display: block; font-family: var(--body); font-size: .68rem; font-weight: 700;
  letter-spacing: .16em; text-transform: uppercase; color: var(--plum);
}
.topbar .btn { padding: .6rem 1.1rem; font-size: .85rem; }

/* ---------- hero ---------- */
.hero { display: grid; grid-template-columns: .58fr 1.42fr; border-bottom: 1px solid var(--rule); }

.panel {
  background: var(--ink); color: var(--paper);
  padding: clamp(2rem, 4vw, 3rem) clamp(1.25rem, 3vw, 2.25rem);
  display: flex; flex-direction: column; justify-content: center; gap: 2.25rem;
}
.panel__eyebrow { color: var(--brass); font-size: .72rem; font-weight: 700; letter-spacing: .18em; text-transform: uppercase; }
.panel__portrait {
  width: 100%; height: auto; aspect-ratio: 3/4; object-fit: cover; object-position: 50% 22%;
  border-radius: 2px; filter: saturate(.9) contrast(1.02);
}
.panel__facts { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 1.1rem; }
.panel__facts li { display: flex; flex-direction: column; gap: .15rem; border-top: 1px solid rgba(201,154,91,.3); padding-top: .9rem; }
.panel__facts dt, .panel__k {
  font-size: .68rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--brass);
}
.panel__v { font-size: .95rem; line-height: 1.5; color: #E4D8DF; }

.hero__body { padding: clamp(2.5rem, 5vw, 4.5rem) clamp(1.25rem, 4vw, 3.5rem); }
.hero__quote {
  font-size: clamp(2rem, 4.6vw, 3.6rem); font-weight: 500; line-height: 1.08;
  letter-spacing: -.015em; margin-bottom: 1.5rem;
}
.hero__quote em { font-style: italic; color: var(--plum); }
.hero__answer { font-size: 1.12rem; line-height: 1.7; max-width: 38ch; margin-bottom: 2rem; }
.hero__ctas { display: flex; flex-wrap: wrap; gap: .75rem; }
.hero__free { font-size: .9rem; color: var(--plum); margin-top: 1rem; font-style: italic; }

/* ---------- lista de preguntas: la firma de la página ---------- */
.qlist { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--rule); }
.qlist li { border-bottom: 1px solid var(--rule); }
.qlist a {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: .95rem 0; text-decoration: none; color: var(--ink); font-size: 1rem;
  transition: color .18s ease, padding-left .18s ease;
}
.qlist a::after { content: "→"; color: var(--mauve); transition: transform .18s ease, color .18s ease; }
.qlist a:hover, .qlist a:focus-visible { color: var(--plum); padding-left: .5rem; }
.qlist a:hover::after, .qlist a:focus-visible::after { transform: translateX(4px); color: var(--plum); }
.qlist__label { margin: 2.5rem 0 .75rem; }

/* ---------- secciones ---------- */
.section { padding-block: clamp(3.5rem, 7vw, 6rem); }
.section--tint { background: var(--paper2); border-block: 1px solid var(--rule); }
.section__head { max-width: 46rem; margin-bottom: 2.5rem; display: flex; flex-direction: column; gap: .9rem; }
.section__title { font-size: clamp(1.75rem, 3.4vw, 2.6rem); font-weight: 500; line-height: 1.15; letter-spacing: -.01em; }
.section__intro { font-size: 1.08rem; line-height: 1.7; }

/* ---------- sobre ella ---------- */
.about { display: grid; grid-template-columns: 1.25fr .75fr; gap: clamp(2rem, 5vw, 4rem); align-items: start; }
.about__prose { display: flex; flex-direction: column; gap: 1.1rem; max-width: 60ch; }
.about__prose p { font-size: 1.08rem; line-height: 1.75; }
.about__pull {
  font-family: var(--display); font-style: italic; font-size: 1.35rem; line-height: 1.45;
  color: var(--ink); border-left: 2px solid var(--brass); padding-left: 1.25rem; margin-block: .5rem;
}
.card {
  background: var(--paper); border: 1px solid var(--rule); border-radius: 2px;
  padding: 1.75rem; display: flex; flex-direction: column; gap: 1rem;
}
.section--tint .card { background: #FBF8F7; }
.card__title { font-size: 1.05rem; font-weight: 700; font-family: var(--body); color: var(--ink); letter-spacing: .01em; }
.card ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: .75rem; }
.card li { display: flex; gap: .6rem; font-size: .95rem; line-height: 1.5; }
.card li::before { content: "—"; color: var(--brass); flex-shrink: 0; }

/* ---------- servicios ---------- */
.svc { display: grid; grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr)); gap: 1.25rem; }
.svc__item {
  border: 1px solid var(--rule); border-radius: 2px; padding: 1.5rem;
  display: flex; flex-direction: column; gap: .6rem; background: var(--paper);
  transition: border-color .18s ease, transform .18s ease;
}
.svc__item:hover { border-color: var(--mauve); transform: translateY(-2px); }
@media (prefers-reduced-motion: reduce) { .svc__item:hover { transform: none; } }
.svc__item--lead { background: var(--ink); border-color: var(--ink); }
.svc__item--lead .svc__name { color: var(--paper); }
.svc__item--lead .svc__desc { color: #DFD2DA; }
.svc__item--lead .svc__tag { color: var(--brass); }
.svc__tag { font-size: .65rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--plum); }
.svc__name { font-family: var(--display); font-size: 1.3rem; font-weight: 500; color: var(--ink); line-height: 1.2; }
.svc__desc { font-size: .95rem; line-height: 1.55; }

.svc__more { margin-top: 2rem; padding-top: 1.75rem; border-top: 1px solid var(--rule); }
.svc__more h3 { font-family: var(--body); font-size: .95rem; font-weight: 700; color: var(--ink); margin-bottom: 1rem; }
.chips { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: .5rem; }
.chips li {
  font-size: .9rem; border: 1px solid var(--rule); border-radius: 999px;
  padding: .45rem 1rem; color: var(--text); background: var(--paper);
}

/* ---------- proceso (secuencia real: la numeración informa) ---------- */
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr)); gap: 1.75rem; counter-reset: s; }
.steps li { counter-increment: s; display: flex; flex-direction: column; gap: .6rem; border-top: 2px solid var(--brass); padding-top: 1rem; }
.steps li::before {
  content: counter(s, decimal-leading-zero);
  font-family: var(--display); font-size: 1.5rem; color: var(--brass); line-height: 1;
}
.steps h3 { font-family: var(--body); font-size: 1rem; font-weight: 700; color: var(--ink); }
.steps p { font-size: .95rem; line-height: 1.6; }

/* ---------- preguntas frecuentes ---------- */
.faq { max-width: 48rem; border-top: 1px solid var(--rule); }
.faq details { border-bottom: 1px solid var(--rule); }
.faq summary {
  cursor: pointer; list-style: none; padding: 1.15rem 0;
  display: flex; align-items: center; justify-content: space-between; gap: 1.5rem;
  font-family: var(--display); font-size: 1.2rem; font-weight: 500; color: var(--ink);
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--brass); font-size: 1.5rem; line-height: 1; flex-shrink: 0; transition: transform .2s ease; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq summary:hover { color: var(--plum); }
.faq__a { padding: 0 0 1.35rem; display: flex; flex-direction: column; gap: .85rem; max-width: 62ch; }
.faq__a p { font-size: 1rem; line-height: 1.7; }

/* ---------- formulario ---------- */
.contact { display: grid; grid-template-columns: .85fr 1.15fr; gap: clamp(2rem, 5vw, 4rem); align-items: start; }
.contact__aside { display: flex; flex-direction: column; gap: 1.5rem; }
.contact__wa {
  border: 1px solid var(--rule); border-radius: 2px; padding: 1.5rem;
  display: flex; flex-direction: column; gap: .85rem; background: var(--paper);
}
.contact__wa p { font-size: .95rem; line-height: 1.6; }

/* Mapa de Google. Se carga en diferido: si nadie baja hasta acá, Google no
   recibe nada. La política de privacidad declara esta carga. */
.mapa {
  position: relative; aspect-ratio: 4/3; margin-top: .25rem;
  border: 1px solid var(--rule); border-radius: 2px; overflow: hidden;
  background: var(--paper2);
}
.mapa iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; display: block; }

.form { display: flex; flex-direction: column; gap: 1.1rem; }
.field { display: flex; flex-direction: column; gap: .4rem; }
.field label { font-size: .82rem; font-weight: 700; color: var(--ink); letter-spacing: .02em; }
.field .hint { font-size: .82rem; color: var(--plum); font-weight: 400; }
.field input, .field select, .field textarea {
  font-family: var(--body); font-size: 1rem; color: var(--ink);
  background: var(--paper); border: 1px solid var(--mauve); border-radius: 2px;
  padding: .75rem .9rem; width: 100%;
  transition: border-color .18s ease;
}
.field input:hover, .field select:hover, .field textarea:hover { border-color: var(--plum); }
.field textarea { resize: vertical; min-height: 8rem; line-height: 1.6; }
.field select {
  appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, var(--plum) 50%), linear-gradient(135deg, var(--plum) 50%, transparent 50%);
  background-position: calc(100% - 1.1rem) 1.25rem, calc(100% - .75rem) 1.25rem;
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat;
  padding-right: 2.5rem;
}
.form__row { display: grid; grid-template-columns: 1fr 1fr; gap: 1.1rem; }

.consent { display: flex; gap: .7rem; align-items: flex-start; font-size: .88rem; line-height: 1.55; }
.consent input { width: 1.05rem; height: 1.05rem; margin-top: .2rem; flex-shrink: 0; accent-color: var(--plum); }

/* trampa antispam: fuera de pantalla, no display:none (los bots lo detectan) */
.hp { position: absolute !important; left: -9999px !important; opacity: 0; height: 0; overflow: hidden; }

.form__note { font-size: .82rem; color: var(--plum); line-height: 1.55; }
.form__status { font-size: .95rem; line-height: 1.6; padding: .9rem 1.1rem; border-radius: 2px; }
.form__status[data-state="ok"]   { background: rgba(92,58,82,.08); border: 1px solid var(--plum); color: var(--ink); }
.form__status[data-state="err"]  { background: rgba(201,154,91,.12); border: 1px solid var(--brass); color: var(--ink); }
.form__status[hidden] { display: none; }

/* ---------- pie ---------- */
.footer { background: var(--ink); color: #DFD2DA; padding-block: clamp(2.5rem, 5vw, 4rem); }
.footer a { color: var(--brass); }
.footer__grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr)); gap: 2rem; }
.footer h2 { font-size: .68rem; font-family: var(--body); font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: var(--brass); margin-bottom: .9rem; }
.footer p, .footer li { font-size: .92rem; line-height: 1.65; }
.footer ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: .4rem; }
.footer__bottom {
  margin-top: 2.5rem; padding-top: 1.5rem; border-top: 1px solid rgba(201,154,91,.25);
  display: flex; flex-wrap: wrap; gap: 1rem; justify-content: space-between;
  font-size: .82rem; color: var(--mauve);
}

/* ---------- botón flotante de WhatsApp ----------
   Verde oficial de la marca a propósito: el reconocimiento manda por sobre
   la paleta. El anillo oscuro no es decoración — el verde sobre papel claro
   da 1.87:1 y sin él la forma del control no se distingue del fondo.        */
.fab {
  position: fixed; z-index: 30;
  right: clamp(1rem, 3vw, 2rem); bottom: clamp(1rem, 3vw, 2rem);
  width: 3.5rem; height: 3.5rem; border-radius: 50%;
  background: #25D366; color: #fff;
  display: grid; place-items: center;
  box-shadow: 0 0 0 1px rgba(46,27,46,.85), 0 8px 24px rgba(46,27,46,.3);
  transition: transform .18s ease, box-shadow .18s ease;
}
.fab svg { width: 1.7rem; height: 1.7rem; fill: currentColor; display: block; }
.fab:hover { transform: scale(1.06); box-shadow: 0 0 0 1px rgba(46,27,46,.85), 0 12px 30px rgba(46,27,46,.38); }
.fab:focus-visible { outline: 3px solid var(--ink); outline-offset: 4px; }
@media (prefers-reduced-motion: reduce) { .fab:hover { transform: none; } }

/* que el botón no tape el enlace de privacidad en móvil */
@media (max-width: 560px) {
  .footer__bottom { padding-bottom: 3.25rem; }
}

/* ---------- páginas de texto ---------- */
.doc { max-width: 44rem; padding-block: clamp(3rem, 6vw, 5rem); display: flex; flex-direction: column; gap: 1.1rem; }
.doc h1 { font-size: clamp(1.8rem, 4vw, 2.6rem); font-weight: 500; margin-bottom: .5rem; }
.doc h2 { font-size: 1.3rem; font-weight: 500; margin-top: 1.5rem; }
.doc p, .doc li { font-size: 1rem; line-height: 1.75; }
.doc ul { padding-left: 1.2rem; display: flex; flex-direction: column; gap: .5rem; }
.doc__date { font-size: .85rem; color: var(--plum); }

/* ---------- responsive ---------- */
@media (max-width: 860px) {
  .hero { grid-template-columns: 1fr; }
  .panel { flex-direction: column; }
  .panel__facts { margin-top: 0; }
  .about, .contact { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  body { font-size: 1rem; }
  .form__row { grid-template-columns: 1fr; }
  .topbar__in { padding-block: .7rem; }
  .topbar .btn { padding: .55rem .85rem; font-size: .8rem; }
}
