/* ==========================================================
   Pacto Jurídico — hoja de estilos
   Paleta: cordobán (marca), tinta, papel, verde de sello
   Tipografía: Young Serif (títulos) + Instrument Sans (texto)
   ========================================================== */

@font-face {
  font-family: "Young Serif";
  src: url("../fonts/young-serif-latin-400-normal.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Young Serif";
  src: url("../fonts/young-serif-latin-ext-400-normal.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0100-02AF, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Instrument Sans";
  src: url("../fonts/instrument-sans-latin-400-normal.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Instrument Sans";
  src: url("../fonts/instrument-sans-latin-500-normal.woff2") format("woff2");
  font-weight: 500;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Instrument Sans";
  src: url("../fonts/instrument-sans-latin-600-normal.woff2") format("woff2");
  font-weight: 600;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Instrument Sans";
  src: url("../fonts/instrument-sans-latin-ext-400-normal.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
  unicode-range: U+0100-02AF, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  --cordoban: #5c0006;
  --cordoban-vivo: #7a0a12;
  --cordoban-hondo: #3f0004;
  --tinta: #211a1b;
  --papel: #f0f0ee;
  --blanco: #fbfbfa;
  --linea: #d3d0cd;
  --pacto: #1f6b5a;
  --menta: #7fd1b9;
  --sobre-cordoban: #f6ecea;
  --radio: 14px;
  --serif: "Young Serif", Georgia, "Times New Roman", serif;
  --sans: "Instrument Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 84px; -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--sans); font-size: 1.0625rem; line-height: 1.65; color: var(--tinta); background: var(--papel); }
img, svg { max-width: 100%; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--serif); font-weight: 400; line-height: 1.12; margin: 0; letter-spacing: -.01em; }
p { margin: 0; }
:focus-visible { outline: 3px solid var(--pacto); outline-offset: 3px; border-radius: 4px; }
.cabecera :focus-visible, .portada :focus-visible, .areas-banda :focus-visible, .pie :focus-visible { outline-color: var(--menta); }

.contenedor { width: min(1160px, 100% - 2.5rem); margin-inline: auto; }
.saltar { position: absolute; left: -999px; top: 8px; background: var(--blanco); color: var(--tinta); padding: .6rem 1rem; border-radius: 8px; z-index: 100; }
.saltar:focus { left: 8px; }

/* Botones */
.boton { display: inline-flex; align-items: center; justify-content: center; gap: .5rem; font: 600 1rem/1 var(--sans); padding: 1rem 1.6rem; border-radius: 999px; border: 2px solid transparent; text-decoration: none; cursor: pointer; transition: transform .18s ease, background-color .18s ease, color .18s ease, border-color .18s ease; }
.boton:hover { transform: translateY(-2px); }
.boton--chico { padding: .7rem 1.2rem; font-size: .95rem; }
.boton--luz { background: var(--sobre-cordoban); color: var(--cordoban); }
.boton--luz:hover { background: #fff; }
.boton--borde-claro { border-color: rgba(246,236,234,.55); color: var(--sobre-cordoban); }
.boton--borde-claro:hover { border-color: var(--sobre-cordoban); background: rgba(246,236,234,.08); }
.boton--solido { background: var(--cordoban); color: var(--sobre-cordoban); }
.boton--solido:hover { background: var(--cordoban-vivo); }
.boton--solido[disabled] { opacity: .6; cursor: progress; transform: none; }
.boton--linea { border-color: var(--cordoban); color: var(--cordoban); }
.boton--linea:hover { background: var(--cordoban); color: var(--sobre-cordoban); }

/* Cabecera */
.cabecera { position: sticky; top: 0; z-index: 50; background: var(--cordoban); color: var(--sobre-cordoban); border-bottom: 1px solid rgba(246,236,234,.12); }
.cabecera__fila { display: flex; align-items: center; gap: 2rem; min-height: 72px; }
.marca { display: block; line-height: 0; margin-right: auto; }
.marca img { height: 38px; width: auto; }
.nav { display: flex; gap: 1.75rem; }
.nav a { text-decoration: none; font-weight: 500; font-size: .98rem; padding: .4rem 0; border-bottom: 2px solid transparent; }
.nav a:hover { border-bottom-color: var(--menta); }

/* Portada */
.portada { position: relative; overflow: hidden; background: var(--cordoban); color: var(--sobre-cordoban); padding: clamp(3.5rem, 8vw, 7rem) 0 clamp(4rem, 9vw, 8rem); isolation: isolate;
  background-image: repeating-linear-gradient(to bottom, transparent 0, transparent 47px, rgba(246,236,234,.06) 47px, rgba(246,236,234,.06) 48px); }
.portada::before { content: ""; position: absolute; right: -6%; top: 50%; width: min(70vw, 720px); aspect-ratio: 1; transform: translateY(-50%); background: url("../img/marca-fondo.svg") center / contain no-repeat; z-index: -1; }
.portada__rejilla { display: grid; grid-template-columns: 1.15fr .85fr; gap: clamp(2rem, 5vw, 5rem); align-items: center; }
.portada h1 { font-size: clamp(2.4rem, 5.4vw, 4.4rem); max-width: 14ch; }
.portada__texto { margin-top: 1.5rem; max-width: 46ch; font-size: 1.2rem; color: rgba(246,236,234,.9); }
.portada__acciones { margin-top: 2.25rem; display: flex; flex-wrap: wrap; gap: .9rem; }
.portada__nota { margin-top: 1.75rem; font-size: .95rem; color: rgba(246,236,234,.75); }

/* Libro de gestión */
.libro { position: relative; background: var(--blanco); color: var(--tinta); border-radius: var(--radio); padding: 1.5rem 1.5rem 2rem; box-shadow: 0 30px 60px -20px rgba(0,0,0,.5); transform: rotate(1.2deg); }
.libro table { width: 100%; border-collapse: collapse; font-size: .98rem; }
.libro caption { text-align: left; font-family: var(--serif); font-size: 1.35rem; color: var(--cordoban); padding-bottom: .9rem; }
.libro th { text-align: left; font-size: .8rem; font-weight: 600; color: #5d5456; padding: .5rem 0; border-bottom: 2px solid var(--cordoban); }
.libro td { padding: .95rem .75rem .95rem 0; border-bottom: 1px solid var(--linea); vertical-align: top; }
.libro td + td { color: var(--pacto); font-weight: 600; padding-right: 0; }
.libro tbody tr:last-child td { border-bottom: 0; }
.sello { position: absolute; right: 1rem; bottom: -1.25rem; font-family: var(--serif); font-size: 1.4rem; text-transform: uppercase; letter-spacing: .08em; color: var(--pacto); border: 3px solid var(--pacto); border-radius: 8px; padding: .3rem .9rem; background: rgba(251,251,250,.92); transform: rotate(-8deg); animation: sellar .6s .5s cubic-bezier(.2,1.6,.4,1) both; }
@keyframes sellar { from { opacity: 0; transform: rotate(-8deg) scale(1.8); } to { opacity: 1; transform: rotate(-8deg) scale(1); } }

/* Secciones */
.seccion { padding: clamp(4rem, 8vw, 7rem) 0; }
.seccion__cabeza { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; align-items: end; margin-bottom: 3rem; }
.seccion h2, .areas-banda h2 { font-size: clamp(2rem, 4vw, 3rem); }
.seccion__cabeza p { color: #4a4143; max-width: 52ch; }

/* Bento de servicios */
.bento { display: grid; grid-template-columns: 1.3fr 1fr; grid-template-rows: auto auto; gap: 1.25rem; }
.tarjeta { background: var(--blanco); border: 1px solid var(--linea); border-radius: calc(var(--radio) + 4px); padding: 2rem; transition: transform .2s ease, box-shadow .2s ease; }
.tarjeta:hover { transform: translateY(-4px); box-shadow: 0 18px 40px -22px rgba(92,0,6,.45); }
.tarjeta--principal { grid-row: span 2; background: var(--cordoban); color: var(--sobre-cordoban); border-color: var(--cordoban); }
.tarjeta h3 { font-size: 1.5rem; margin: 1.1rem 0 .7rem; }
.tarjeta p { color: #4a4143; }
.tarjeta--principal p { color: rgba(246,236,234,.88); }
.icono { color: var(--cordoban); }
.tarjeta--principal .icono { color: var(--menta); }
.pasos { list-style: none; padding: 0; margin: 2rem 0 0; position: relative; }
.pasos::before { content: ""; position: absolute; left: 15px; top: 16px; bottom: 16px; width: 2px; background: rgba(246,236,234,.28); }
.pasos li { position: relative; display: flex; gap: 1rem; padding: .7rem 0; }
.pasos strong { display: block; font-weight: 600; }
.pasos li span:not(.paso__n) { display: block; font-size: .95rem; color: rgba(246,236,234,.8); }
.paso__n { flex: none; width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; font-weight: 600; font-size: .9rem; background: var(--cordoban-hondo); border: 2px solid rgba(246,236,234,.5); position: relative; }
.paso__n--fin { background: var(--menta); border-color: var(--menta); color: var(--cordoban-hondo); }

/* Áreas */
.areas-banda { background: var(--tinta); color: var(--sobre-cordoban); padding: clamp(3.5rem, 7vw, 6rem) 0; }
.seccion__cabeza--oscura p { color: rgba(246,236,234,.8); }
.areas { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.1rem; }
.area { background: rgba(246,236,234,.05); border: 1px solid rgba(246,236,234,.18); border-radius: calc(var(--radio) + 2px); padding: 1.75rem; transition: background-color .2s ease, transform .2s ease, border-color .2s ease; }
.area:hover { background: rgba(246,236,234,.1); border-color: var(--menta); transform: translateY(-3px); }
.area__icono .icono { color: var(--menta); }
.area h3 { font-size: 1.4rem; margin: 1rem 0 .55rem; }
.area p { color: rgba(246,236,234,.82); font-size: 1rem; }

/* Método */
.metodo { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.5rem; counter-reset: none; }
.metodo li { position: relative; padding-top: 3.4rem; }
.metodo li::before { content: ""; position: absolute; top: 18px; left: 44px; right: -1.5rem; height: 2px; background: var(--linea); }
.metodo li:last-child::before { display: none; }
.metodo__n { position: absolute; top: 0; left: 0; width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; background: var(--cordoban); color: var(--sobre-cordoban); font-weight: 600; }
.metodo__n--fin { background: var(--pacto); }
.metodo h3 { font-size: 1.3rem; margin-bottom: .5rem; }
.metodo p { color: #4a4143; font-size: 1rem; }

/* Principios */
.principios { background: var(--blanco); border-block: 1px solid var(--linea); padding: clamp(3.5rem, 7vw, 6rem) 0; }
.principios h2 { font-size: clamp(2rem, 4vw, 3rem); max-width: 20ch; margin-bottom: 2.5rem; }
.principios__rejilla { display: grid; grid-template-columns: repeat(4, 1fr); gap: 2rem; }
.principios__rejilla > div { border-top: 3px solid var(--cordoban); padding-top: 1.1rem; }
.principios h3 { font-size: 1.25rem; margin-bottom: .5rem; }
.principios p { color: #4a4143; font-size: 1rem; }

/* FAQ */
.seccion--faq { padding-bottom: clamp(3rem, 6vw, 5rem); }
.faq__rejilla { display: grid; grid-template-columns: .8fr 1.2fr; gap: clamp(2rem, 6vw, 5rem); align-items: start; }
.seccion--faq h2 { font-size: clamp(2rem, 4vw, 3rem); }
.faq details { border-top: 1px solid var(--linea); }
.faq details:last-child { border-bottom: 1px solid var(--linea); }
.faq summary { cursor: pointer; list-style: none; display: flex; justify-content: space-between; gap: 1rem; align-items: center; padding: 1.2rem 0; font-weight: 600; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-size: 1.6rem; line-height: 1; color: var(--cordoban); transition: transform .2s ease; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { padding: 0 2.5rem 1.3rem 0; color: #4a4143; }

/* Llamado */
.llamado { background: var(--cordoban); color: var(--sobre-cordoban); padding: clamp(2.5rem, 5vw, 4rem) 0; }
.llamado__fila { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1.5rem; }
.llamado h2 { font-size: clamp(1.7rem, 3.4vw, 2.5rem); max-width: 22ch; }

/* Contacto */
.contacto__rejilla { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2rem, 6vw, 5rem); align-items: start; }
.contacto__intro { margin-top: 1rem; color: #4a4143; max-width: 44ch; }
.datos { margin: 2rem 0 0; }
.datos > div { padding: 1rem 0; border-top: 1px solid var(--linea); }
.datos > div:last-child { border-bottom: 1px solid var(--linea); }
.datos dt { font-size: .85rem; font-weight: 600; color: var(--pacto); margin-bottom: .2rem; }
.datos dd { margin: 0; }
.datos a { text-decoration-color: var(--linea); text-underline-offset: 3px; }
.datos a:hover { text-decoration-color: var(--cordoban); }
.contacto__mapa { margin-top: 1.75rem; }

.formulario { background: var(--blanco); border: 1px solid var(--linea); border-radius: calc(var(--radio) + 6px); padding: clamp(1.5rem, 3vw, 2.5rem); box-shadow: 0 30px 60px -40px rgba(92,0,6,.5); }
.formulario h3 { font-size: 1.7rem; margin-bottom: 1.25rem; }
.campo { margin-bottom: 1.15rem; }
.campo label { display: block; font-weight: 600; font-size: .95rem; margin-bottom: .4rem; }
.opcional { font-weight: 400; color: #5d5456; }
.campo input, .campo textarea { width: 100%; font: inherit; color: inherit; background: var(--papel); border: 1.5px solid var(--linea); border-radius: 10px; padding: .85rem 1rem; transition: border-color .15s ease, background-color .15s ease; }
.campo textarea { min-height: 150px; resize: vertical; }
.campo input:hover, .campo textarea:hover { border-color: #aaa5a2; }
.campo input:focus, .campo textarea:focus { outline: none; border-color: var(--cordoban); background: #fff; box-shadow: 0 0 0 3px rgba(92,0,6,.15); }
.campo [aria-invalid="true"] { border-color: #a4161a; }
.error { color: #a4161a; font-size: .9rem; margin-top: .35rem; }
.error:empty { display: none; }
.trampa { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.formulario .boton { width: 100%; margin-top: .5rem; }
.formulario__nota { margin-top: 1rem; font-size: .85rem; color: #5d5456; }
.aviso { padding: .9rem 1.1rem; border-radius: 10px; margin-bottom: 1.25rem; font-weight: 500; }
.aviso[hidden] { display: none; }
.aviso--ok { background: #e3f1ec; color: #134a3d; border: 1px solid #a9d4c6; }
.aviso--error { background: #fbe9e9; color: #7d1013; border: 1px solid #ecb7b8; }

/* Pie */
.pie { background: var(--cordoban-hondo); color: rgba(246,236,234,.85); padding: 2.5rem 0 5rem; font-size: .95rem; }
.pie__fila { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1.5rem; }
.pie img { height: 28px; width: auto; }
.pie p + p { margin-top: .25rem; opacity: .85; }

/* WhatsApp flotante (solo móvil) */
.flotante { display: none; }

@media (max-width: 920px) {
  .areas, .principios__rejilla, .faq__rejilla { grid-template-columns: 1fr 1fr; }
  .faq__rejilla { grid-template-columns: 1fr; }
  .metodo { grid-template-columns: 1fr 1fr; }
  .metodo li::before { display: none; }
  .nav { display: none; }
  .portada__rejilla, .contacto__rejilla, .seccion__cabeza, .bento { grid-template-columns: 1fr; }
  .tarjeta--principal { grid-row: auto; }
  .portada h1 { max-width: 16ch; }
  .portada::before { right: -30%; opacity: .8; }
  .libro { transform: none; margin-bottom: 1.5rem; }
  .sello { right: .75rem; }
}
@media (max-width: 640px) {
  .areas, .principios__rejilla, .metodo { grid-template-columns: 1fr; }
  .cabecera .boton { display: none; }
  .marca img { height: 32px; }
  .cabecera__fila { min-height: 64px; }
  .flotante { position: fixed; right: 1rem; bottom: 1rem; z-index: 60; display: inline-flex; align-items: center; gap: .55rem; background: var(--pacto); color: #fff; font-weight: 600; text-decoration: none; padding: .85rem 1.2rem; border-radius: 999px; box-shadow: 0 10px 24px -8px rgba(0,0,0,.5); }
  .libro td { padding-right: .5rem; font-size: .93rem; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
