/* Ruiz y Priego Abogados — base compartida por el sitio y el portal */

@font-face {
  font-family: 'Cormorant Garamond';
  font-style: normal;
  font-weight: 500 700;
  font-display: swap;
  src: url('/fonts/cormorant-garamond.woff2') format('woff2');
}
@font-face {
  font-family: 'Manrope';
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url('/fonts/manrope.woff2') format('woff2');
}

:root {
  --negro: #0b0b0b;
  --negro-puro: #000000;
  --blanco: #ffffff;
  --hueso: #f4f4f2;
  --gris-1: #e6e6e6;
  --gris-2: #d9d9d9;
  --gris-3: #bdbdbd;
  --gris-4: #8c8c8c;
  --gris-5: #6b6b6b;
  --gris-6: #4d4d4d;
  --gris-7: #3d3d3d;
  --gris-8: #2e2e2e;
  --rojo: #9b1c1c;
  --rojo-fondo: #fbeeee;
  --verde: #1d5c3a;
  --serif: 'Cormorant Garamond', 'Times New Roman', serif;
  --sans: 'Manrope', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --gutter: clamp(16px, 5vw, 48px);
  --ancho: 1240px;
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  color: var(--negro);
  background: var(--blanco);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-wrap: break-word;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3, h4 { margin: 0; font-family: var(--serif); font-weight: 600; line-height: 1.08; letter-spacing: -0.2px; font-variant-numeric: lining-nums; }
p { margin: 0; }
:focus-visible { outline: 2px solid var(--negro); outline-offset: 2px; }
.oscuro :focus-visible { outline-color: var(--blanco); }
.solo-lector { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
[hidden] { display: none !important; }

.sobretitulo {
  font-family: var(--sans);
  font-size: 12px;
  letter-spacing: 5px;
  text-transform: uppercase;
  color: var(--gris-5);
}
.oscuro .sobretitulo { color: var(--gris-3); }

/* Sello RP */
.rp-sello {
  width: 44px; height: 44px; flex: none;
  border: 1px solid currentColor;
  display: inline-flex; align-items: center; justify-content: center;
  font-family: var(--serif); font-weight: 600; font-size: 22px; letter-spacing: 1px;
}
.marca { display: inline-flex; align-items: center; gap: 14px; }
.marca-texto { display: flex; flex-direction: column; line-height: 1.1; }
.marca-nombre { font-family: var(--serif); font-weight: 600; font-size: 24px; }
.marca-sub { font-size: 11px; letter-spacing: 4px; text-transform: uppercase; color: var(--gris-3); }

/* Botones */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 48px; padding: 12px 28px;
  border: 1px solid transparent; border-radius: 0;
  font-family: var(--sans); font-weight: 700; font-size: 15px; line-height: 1.2;
  cursor: pointer; text-align: center;
  transition: background-color .15s, border-color .15s, color .15s;
}
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn-blanco { background: var(--blanco); color: var(--negro); }
.btn-blanco:hover:not(:disabled) { background: var(--gris-2); }
.btn-negro { background: var(--negro); color: var(--blanco); }
.btn-negro:hover:not(:disabled) { background: var(--gris-8); }
.btn-fantasma { border-color: var(--gris-4); color: var(--blanco); background: transparent; }
.btn-fantasma:hover:not(:disabled) { background: rgba(255,255,255,.12); border-color: var(--blanco); }
.btn-borde { border-color: var(--negro); color: var(--negro); background: var(--blanco); }
.btn-borde:hover:not(:disabled) { background: var(--hueso); }
.btn-peligro { border-color: var(--rojo); color: var(--rojo); background: var(--blanco); }
.btn-peligro:hover:not(:disabled) { background: var(--rojo-fondo); }
.btn-chico { min-height: 40px; padding: 8px 16px; font-size: 13px; }
.btn-grande { min-height: 52px; padding: 16px 36px; }
.btn-texto { background: none; border: 0; padding: 6px 2px; min-height: 36px; font-weight: 600; font-size: 14px; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.btn-texto:hover { color: var(--gris-6); }
.btn .giro { width: 16px; height: 16px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: girar .7s linear infinite; }
@keyframes girar { to { transform: rotate(360deg); } }

/* Campos */
.campo { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.campo > label, .campo-etiqueta { font-size: 13px; font-weight: 600; }
.campo-ayuda { font-size: 12px; color: var(--gris-5); line-height: 1.5; }
.entrada {
  width: 100%;
  min-height: 48px;
  padding: 12px 14px;
  border: 1px solid var(--gris-4);
  border-radius: 0;
  background: var(--blanco);
  color: var(--negro);
  font-size: 15px;
  line-height: 1.4;
  -webkit-appearance: none;
  appearance: none;
}
.entrada:focus { outline: 2px solid var(--negro); outline-offset: 1px; border-color: var(--negro); }
.entrada[aria-invalid="true"] { border-color: var(--rojo); }
textarea.entrada { resize: vertical; min-height: 120px; }
select.entrada {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%230b0b0b' stroke-width='1.6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 40px;
}
.casilla { display: flex; align-items: flex-start; gap: 12px; font-size: 14px; line-height: 1.5; cursor: pointer; }
.casilla input { width: 20px; height: 20px; margin: 1px 0 0; accent-color: var(--negro); flex: none; }

/* Pantallas táctiles: 16 px evita que Safari haga zoom al tocar un campo */
@media (pointer: coarse) {
  .entrada { font-size: 16px; }
}

.aviso-error {
  border-left: 3px solid var(--rojo);
  background: var(--rojo-fondo);
  color: var(--rojo);
  padding: 12px 16px;
  font-size: 14px;
  font-weight: 600;
}

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