/* ==========================================================================
   Fincas Armengol — base
   Diseño "01 Registro": Newsreader (titulares) + Inter (texto).

   REGLA DEL ROJO (feedback, punto 9.2): --accent solo se usa en
   · el botón principal del buscador ("Ver X inmuebles")
   · las etiquetas de alto valor comercial (licencia turística, obra nueva)
   Nada de rojo decorativo: ni filetes, ni bordes, ni enlaces, ni iconos.
   Para cambiar a otra paleta (PREGUNTAS.md, E1) basta con tocar estos tokens.
   ========================================================================== */

:root {
  --accent: #b8202d;
  --accent-hover: #9f1b27;

  --ink: #1e2124;
  --ink-soft: #2c3033;
  --navy: #172b36;
  --paper: #f6f6f4;
  --surface: #fff;
  --line: #dcdcd7;
  --mute: #62666a;

  --strip-bg: var(--navy);
  --strip-fg: #fff;

  /* --font-newsreader y --font-inter las genera la API de fuentes de Astro (astro.config.mjs) */
  --font-serif: var(--font-newsreader), Georgia, 'Times New Roman', serif;
  --font-sans: var(--font-inter), system-ui, -apple-system, 'Segoe UI', sans-serif;

  /* Más amplitud editorial en escritorio: favorece fotografía, listados y fichas. */
  --wrap: 1360px;
  --gutter: clamp(30px, 3vw, 46px);
  --header-h: 84px;
  --radius: 2px;
}

@media (max-width: 920px) {
  :root {
    --gutter: 20px;
    --header-h: 68px;
  }
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 12px);
  -webkit-text-size-adjust: 100%;
}

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

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

a {
  color: inherit;
  text-decoration: none;
}

h1,
h2,
h3 {
  font-family: var(--font-serif);
  font-weight: 400;
  margin: 0;
  letter-spacing: -0.01em;
  text-wrap: balance;
}

p {
  text-wrap: pretty;
}

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

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}

:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 2px;
}

/* --- utilidades ---------------------------------------------------------- */

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

.sr-only {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  left: 12px;
  top: -60px;
  z-index: 200;
  background: var(--ink);
  color: #fff;
  padding: 10px 16px;
}
.skip-link:focus {
  top: 12px;
}

/* filete de sección (en tinta, nunca en rojo) */
.rule {
  width: 56px;
  height: 3px;
  background: var(--ink);
  margin-bottom: 22px;
}

.section {
  padding-block: 64px;
}

.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 20px;
  border-bottom: 2px solid var(--ink);
  padding-bottom: 10px;
}
.section-head h2 {
  font-size: 28px;
}

.page-head {
  padding: 44px 0 26px;
  border-bottom: 2px solid var(--ink);
}
.page-head h1 {
  font-size: 40px;
  line-height: 1.1;
  max-width: 22ch;
}
.page-head p {
  margin: 14px 0 0;
  color: var(--mute);
  font-size: 16px;
  max-width: 62ch;
  line-height: 1.65;
}
@media (max-width: 920px) {
  .page-head h1 {
    font-size: 30px;
  }
}

.eyebrow {
  display: block;
  font-size: 12px;
  color: var(--mute);
  letter-spacing: 0.04em;
  margin-bottom: 8px;
}

/* enlace con flecha (secundario, en tinta) */
.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  color: var(--ink);
  border-bottom: 1px solid var(--ink);
  padding-bottom: 1px;
  white-space: nowrap;
}
.link-arrow::after {
  content: '→';
  transition: transform 0.15s;
}
.link-arrow:hover::after {
  transform: translateX(3px);
}

/* --- botones ------------------------------------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid var(--ink);
  background: var(--ink);
  color: #fff;
  font-size: 14.5px;
  font-weight: 500;
  padding: 12px 24px;
  border-radius: var(--radius);
  cursor: pointer;
  text-align: center;
  transition: background-color 0.15s, color 0.15s, border-color 0.15s;
}
.btn:hover {
  background: #000;
}

.btn--ghost {
  background: transparent;
  color: var(--ink);
}
.btn--ghost:hover {
  background: var(--ink);
  color: #fff;
}

.btn--light {
  background: #fff;
  color: var(--ink);
  border-color: #fff;
}
.btn--light:hover {
  background: transparent;
  color: #fff;
}

/* Única llamada a la acción en rojo: el botón principal del buscador. */
.btn--accent {
  background: var(--accent);
  border-color: var(--accent);
}
.btn--accent:hover {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
}

.btn--block {
  width: 100%;
}

/* --- texto largo (guías, legales, agencia) ------------------------------- */

.prose {
  font-size: 16px;
  line-height: 1.75;
  color: var(--ink-soft);
  max-width: 68ch;
}
.prose h2 {
  font-size: 24px;
  color: var(--ink);
  margin: 40px 0 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--line);
}
.prose p {
  margin: 0 0 16px;
}
.prose ul,
.prose ol {
  margin: 0 0 16px;
  padding-left: 22px;
}
.prose li {
  margin-bottom: 6px;
}
.prose a {
  border-bottom: 1px solid var(--ink);
}

.note {
  font-size: 13.5px;
  color: var(--mute);
  border-left: 2px solid var(--line);
  padding: 4px 0 4px 14px;
  margin: 32px 0 0;
  max-width: 68ch;
}

/* --- formularios --------------------------------------------------------- */

.field {
  display: block;
  margin-bottom: 10px;
}
.field > span {
  display: block;
  font-size: 12px;
  color: var(--mute);
  margin-bottom: 5px;
}
.input {
  display: block;
  width: 100%;
  border: 1px solid var(--line);
  background: var(--surface);
  padding: 11px 12px;
  font-size: 14px;
  border-radius: 0;
  resize: vertical;
}
.input:focus {
  border-color: var(--ink);
  outline: none;
}
.check {
  display: flex;
  gap: 9px;
  align-items: flex-start;
  font-size: 12.5px;
  color: var(--mute);
  margin: 6px 0 14px;
  line-height: 1.5;
}
.check input {
  margin-top: 3px;
  accent-color: var(--ink);
}
.check a {
  color: var(--ink);
  border-bottom: 1px solid var(--line);
}
