/* ==========================================================================
   Hermanos Calatayud — hoja de estilos
   Concepto "plano y presupuesto de obra": rojo del logo, tinta y hormigón; titulares condensados
   (Archivo variable); cotas de plano, capítulos numerados (Cap. 01…) y cartelas de datos.
   Retícula de azulejo muy suave en cabeceras (solados y alicatados). Ver CLAUDE.md.
   ========================================================================== */

@font-face { font-family: "Archivo"; src: url("../fonts/archivo-100-900.woff2") format("woff2"); font-weight: 100 900; font-stretch: 62% 125%; font-style: normal; font-display: swap; }

:root {
  --ink: #17181a;        /* tinta: texto */
  --paper: #ffffff;      /* fondo */
  --cal: #f6f5f2;        /* blanco cal: fondo de secciones */
  --paper-2: #ebe8e2;    /* hormigón claro: fondos alternativos y formulario */
  --line: #d6d2ca;       /* filetes */
  --muted: #5a5a5a;      /* texto secundario (≥ 4.5:1 sobre blanco y cal) */
  --accent: #c41212;     /* rojo del logo (#cd1313), un punto más oscuro para contraste AA con texto blanco */
  --accent-ink: #ffffff;
  --rojo: #cd1313;       /* rojo exacto del logo, para detalles grandes */
  --cota: #0c4da2;       /* azul de la web original: solo líneas y rótulos de cota */
  --ok: #1c6b2d;
  --error: #b3261e;

  --f-display: "Archivo", "Arial Narrow", sans-serif;
  --f-body: "Archivo", system-ui, sans-serif;
  --f-mono: "Archivo", system-ui, sans-serif; /* rótulos técnicos: misma familia, mayúsculas y cifras tabulares */

  --wrap: 1240px;
  --gutter: clamp(18px, 4vw, 44px);
  --radius: 2px;
}

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { transition: none !important; animation: none !important; } }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: var(--f-body); font-stretch: 100%; font-size: 1.0625rem; line-height: 1.6; -webkit-font-smoothing: antialiased; overflow-x: hidden; }
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-underline-offset: .18em; }
:focus-visible { outline: 3px solid var(--cota); outline-offset: 3px; }
h1, h2, h3, h4 { margin: 0 0 .5em; font-family: var(--f-display); line-height: 1.02; }
h1, h2 { font-stretch: 70%; font-weight: 800; text-transform: uppercase; letter-spacing: -.005em; }
h3 { font-stretch: 85%; font-weight: 700; font-size: 1.3rem; line-height: 1.15; }
p { margin: 0 0 1em; }
.rojo { color: var(--rojo); }

.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gutter); }
.skip { position: absolute; left: -9999px; top: 0; background: var(--ink); color: var(--paper); padding: .6em 1em; z-index: 100; }
.skip:focus { left: 8px; top: 8px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* rótulo técnico, como los textos de un plano */
.kicker, .cap, .m-tag, dt { font-family: var(--f-mono); font-size: .78rem; font-weight: 600; font-stretch: 100%; letter-spacing: .12em; text-transform: uppercase; font-variant-numeric: tabular-nums; }
.kicker { color: var(--muted); margin-bottom: .9em; display: flex; align-items: center; gap: .7em; }
.kicker::before { content: ""; width: 28px; height: 2px; background: var(--rojo); flex-shrink: 0; }

/* ---------- botones y enlaces ---------- */
.btn { display: inline-flex; align-items: center; gap: .6em; padding: .95em 1.4em; border: 0; border-radius: var(--radius); background: var(--accent); color: var(--accent-ink); font: 700 .95rem/1 var(--f-body); letter-spacing: .04em; text-transform: uppercase; text-decoration: none; cursor: pointer; transition: background .2s; }
.btn:hover { background: #a10e0e; }
.btn .arr { transition: transform .2s; }
.btn:hover .arr { transform: translateX(4px); }
.btn--ghost { background: transparent; color: inherit; box-shadow: inset 0 0 0 2px currentColor; }
.btn--ghost:hover { background: var(--ink); color: var(--paper); }
.btn--claro { background: var(--paper); color: var(--ink); }
.btn--claro:hover { background: var(--paper-2); }
.btn:disabled { opacity: .6; cursor: wait; }
.lnk { display: inline-flex; gap: .4em; font-weight: 700; text-decoration: none; border-bottom: 2px solid var(--rojo); padding-bottom: 2px; }
.lnk:hover { color: var(--accent); }

/* ---------- cota (línea de medida con topes) ---------- */
.cota { position: absolute; color: var(--cota); pointer-events: none; }
.cota span { position: absolute; background: var(--paper); padding: 0 .6em; font: 600 .7rem/1.4 var(--f-mono); letter-spacing: .12em; text-transform: uppercase; white-space: nowrap; }
.cota--h { left: 0; right: 0; top: -22px; height: 11px; border-inline: 1.5px solid currentColor; }
.cota--h::before { content: ""; position: absolute; left: 0; right: 0; top: 5px; border-top: 1.5px solid currentColor; }
.cota--h span { left: 50%; top: -3px; transform: translateX(-50%); }
.cota--v { top: 0; bottom: 0; right: -22px; width: 11px; border-block: 1.5px solid currentColor; }
.cota--v::before { content: ""; position: absolute; top: 0; bottom: 0; left: 5px; border-left: 1.5px solid currentColor; }
.cota--v span { top: 50%; left: 50%; transform: translate(-50%, -50%) rotate(90deg); }

/* ---------- cabecera y menú (móvil incluido) ---------- */
.site-head { position: sticky; top: 0; z-index: 50; background: var(--paper); border-bottom: 1px solid var(--line); }
.site-head .wrap { display: flex; align-items: center; gap: 28px; min-height: 76px; }
.brand { flex-shrink: 0; }
.brand img { height: 44px; width: auto; }
.nav { display: flex; gap: 2px; align-items: center; margin-left: auto; }
.nav a { padding: .55em .85em; text-decoration: none; font-weight: 600; font-size: .98rem; }
.nav a:hover { color: var(--accent); }
.nav a[aria-current="page"] { box-shadow: inset 0 -3px 0 var(--rojo); }
.head-tel { display: flex; flex-direction: column; text-decoration: none; line-height: 1.15; padding-left: 22px; border-left: 1px solid var(--line); }
.head-tel span { font-size: .68rem; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); font-weight: 600; }
.head-tel strong { font-size: 1.2rem; font-stretch: 80%; font-weight: 800; color: var(--accent); }
.nav-toggle { display: none; margin-left: auto; background: none; border: 2px solid var(--ink); color: inherit; font: 700 .85rem var(--f-body); letter-spacing: .08em; text-transform: uppercase; padding: .55em .9em; border-radius: var(--radius); cursor: pointer; }
@media (max-width: 1060px) { .head-tel span { display: none; } }
@media (max-width: 940px) {
  .site-head .wrap { min-height: 66px; gap: 14px; }
  .brand img { height: 36px; }
  .nav-toggle { display: inline-block; }
  .head-tel { order: 2; border: 0; padding: 0; }
  .head-tel strong { font-size: 1.05rem; }
  .nav { display: none; position: absolute; left: 0; right: 0; top: 100%; flex-direction: column; align-items: stretch; background: var(--paper); padding: 8px var(--gutter) 22px; border-bottom: 2px solid var(--ink); margin: 0; }
  .nav.is-open { display: flex; }
  .nav a { padding: .95em .2em; border-bottom: 1px solid var(--line); font-size: 1.1rem; }
  .nav a[aria-current="page"] { box-shadow: inset 4px 0 0 var(--rojo); padding-left: .8em; }
}
@media (max-width: 480px) {
  .site-head .wrap { gap: 10px; }
  .brand img { height: 29px; }
  .head-tel strong { font-size: .98rem; }
  .nav-toggle { padding: .5em .65em; font-size: .76rem; }
}
@media (max-width: 340px) { .head-tel { display: none; } }

/* ---------- secciones comunes ---------- */
.page-head { padding: clamp(44px, 7vw, 100px) 0 clamp(28px, 4vw, 52px);
  background-image: linear-gradient(to right, rgba(23,24,26,.05) 1px, transparent 1px), linear-gradient(to bottom, rgba(23,24,26,.05) 1px, transparent 1px);
  background-size: 48px 48px; background-color: var(--cal); border-bottom: 1px solid var(--line); }
.page-head h1 { font-size: clamp(2.5rem, 7vw, 5.2rem); max-width: 16ch; }
.lead { font-size: clamp(1.1rem, 1.6vw, 1.32rem); max-width: 40em; line-height: 1.5; }
.sec { padding: clamp(56px, 8vw, 110px) 0; }
.sec--tight { padding: clamp(36px, 5vw, 64px) 0; }
.sec h2 { font-size: clamp(2rem, 4.4vw, 3.4rem); }
.sec-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 20px 40px; flex-wrap: wrap; margin-bottom: clamp(28px, 4vw, 48px); }
.sec-head h2 { margin: 0; max-width: 18ch; }

/* ---------- portada: hero ---------- */
.hero { padding: clamp(40px, 6vw, 84px) 0 clamp(56px, 7vw, 96px); background-color: var(--cal);
  background-image: linear-gradient(to right, rgba(23,24,26,.05) 1px, transparent 1px), linear-gradient(to bottom, rgba(23,24,26,.05) 1px, transparent 1px);
  background-size: 48px 48px; }
.hero-grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: clamp(36px, 6vw, 90px); align-items: center; }
.hero h1 { font-size: clamp(2.9rem, 7.4vw, 6.3rem); line-height: .94; margin-bottom: .35em; }
.hero h1 .rojo { display: block; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.hero-foto { margin: 30px 30px 0 0; }
.cotado { position: relative; }
.cotado img { width: 100%; aspect-ratio: 1; object-fit: cover; }
.hero-foto figcaption { margin-top: 14px; font-weight: 600; }
.hero-foto figcaption a { text-decoration: none; }
.hero-foto figcaption a:hover { color: var(--accent); }
.hero .cota span { background: var(--cal); }
@media (max-width: 860px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-foto { margin: 26px 26px 0 0; }
}

/* ---------- portada: banda de oficios ---------- */
.oficios { background: var(--ink); color: var(--paper); padding: 18px 0; }
.oficios ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 4px 0; justify-content: center; }
.oficios li { font-stretch: 70%; font-weight: 700; font-size: clamp(1.05rem, 2vw, 1.35rem); text-transform: uppercase; letter-spacing: .02em; }
.oficios li + li::before { content: "/"; color: var(--rojo); margin: 0 .55em; font-weight: 400; }

/* ---------- capítulos de presupuesto ---------- */
.pres-grid { display: grid; grid-template-columns: .9fr 1.1fr; gap: clamp(32px, 6vw, 90px); align-items: start; margin-bottom: 36px; }
.pres-head h2 { max-width: 14ch; }
.partidas { list-style: none; margin: 0; padding: 0; border-top: 3px solid var(--ink); }
.partidas li { display: grid; grid-template-columns: 6.5rem 1fr; gap: 4px 20px; padding: 24px 0; border-bottom: 1px solid var(--line); }
.partidas .cap { color: var(--accent); padding-top: .35em; grid-row: span 2; }
.partidas h3 { margin: 0; font-size: 1.55rem; }
.partidas h3 a { text-decoration: none; }
.partidas h3 a:hover { color: var(--accent); }
.partidas p { margin: 0; color: var(--muted); }
.partidas--fila { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0 32px; }
.partidas--fila li { grid-template-columns: 1fr; }
.partidas--fila .cap { grid-row: auto; }
@media (max-width: 860px) { .pres-grid, .partidas--fila { grid-template-columns: 1fr; } }
@media (max-width: 480px) { .partidas li { grid-template-columns: 1fr; } .partidas .cap { grid-row: auto; } }

/* ---------- portada: mosaico de obras ---------- */
.obras-home { background: var(--cal); }
.mosaico { display: grid; grid-template-columns: repeat(12, 1fr); grid-template-rows: repeat(2, clamp(180px, 26vw, 370px)); gap: 12px; }
.mosaico a { position: relative; overflow: hidden; display: block; background: var(--paper-2); }
.mosaico img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s ease; }
.mosaico a:hover img { transform: scale(1.03); }
.m-a { grid-column: 1 / 8; grid-row: 1; }
.m-b { grid-column: 8 / 13; grid-row: 1; }
.m-c { grid-column: 1 / 5; grid-row: 2; }
.m-d { grid-column: 5 / 13; grid-row: 2; }
.m-tag { position: absolute; left: 0; bottom: 0; background: var(--paper); padding: .7em 1em; letter-spacing: .08em; }
@media (max-width: 700px) {
  .mosaico { grid-template-columns: 1fr 1fr; grid-template-rows: auto; max-height: none; }
  .mosaico a { aspect-ratio: 4 / 3; }
  .m-a, .m-d { grid-column: 1 / 3; grid-row: auto; }
  .m-b, .m-c { grid-column: auto; grid-row: auto; }
}

/* ---------- portada: lema ---------- */
.lema { background: var(--accent); color: var(--paper); padding: clamp(56px, 8vw, 110px) 0; }
.lema blockquote { margin: 0; }
.lema blockquote p { font-family: var(--f-display); font-stretch: 72%; font-weight: 700; font-size: clamp(1.9rem, 4.6vw, 3.6rem); line-height: 1.05; text-transform: uppercase; max-width: 22ch; margin: 0; }
.lema-firma { margin: 26px 0 0; font-weight: 600; display: flex; align-items: center; gap: .8em; }
.lema-firma::before { content: ""; width: 40px; height: 2px; background: currentColor; }

/* ---------- banda de llamada a la acción ---------- */
.banda { background: var(--ink); color: var(--paper); padding: clamp(48px, 6vw, 80px) 0; }
.banda-grid { display: grid; grid-template-columns: 1fr auto; gap: 8px 40px; align-items: center; }
.banda h2 { font-size: clamp(2rem, 4.4vw, 3.2rem); margin: 0; }
.banda p { margin: 0; opacity: .85; }
.banda-cta { grid-column: 2; grid-row: 1 / span 2; display: flex; align-items: center; gap: 22px; flex-wrap: wrap; opacity: 1 !important; }
.banda-tel { font-size: 1.5rem; font-weight: 800; font-stretch: 80%; text-decoration: none; }
@media (max-width: 760px) { .banda-grid { grid-template-columns: 1fr; } .banda-cta { grid-column: 1; grid-row: auto; margin-top: 18px !important; } }

/* ---------- servicios ---------- */
.intro-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 20px clamp(32px, 5vw, 70px); font-size: 1.1rem; }
@media (max-width: 760px) { .intro-2 { grid-template-columns: 1fr; } }
.capitulos { padding-top: 0; }
.capitulo { display: grid; grid-template-columns: .9fr 1.1fr; gap: 18px clamp(32px, 6vw, 90px); padding: clamp(32px, 4vw, 52px) 0; border-top: 3px solid var(--ink); }
.capitulo .cap { color: var(--accent); display: block; margin-bottom: 10px; }
.capitulo h2 { font-size: clamp(2rem, 4.4vw, 3.4rem); margin: 0; }
.lineas { list-style: none; padding: 0; margin: 0 0 22px; columns: 2; column-gap: 32px; }
.lineas li { padding: 10px 0; border-bottom: 1px dashed var(--line); break-inside: avoid; font-weight: 600; display: flex; gap: .6em; }
.lineas li::before { content: ""; width: 8px; height: 8px; background: var(--rojo); margin-top: .55em; flex-shrink: 0; }
.capitulo-foto { margin: 0 0 clamp(32px, 4vw, 52px); }
.capitulo-foto img { width: 100%; max-height: 560px; object-fit: cover; }
.capitulo-foto figcaption, .duo figcaption { margin-top: 10px; font-size: .9rem; color: var(--muted); }
@media (max-width: 760px) { .capitulo { grid-template-columns: 1fr; } }
@media (max-width: 420px) { .lineas { columns: 1; } }

.habituales { background: var(--cal); }
.fichas-trabajo { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; counter-reset: ficha; border-top: 3px solid var(--ink); }
.fichas-trabajo li { counter-increment: ficha; padding: 28px 28px 30px 0; border-bottom: 1px solid var(--line); }
.fichas-trabajo li:not(:nth-child(3n+1)) { padding-left: 28px; border-left: 1px solid var(--line); }
.fichas-trabajo li::before { content: counter(ficha, decimal-leading-zero); display: block; font: 800 2.4rem/1 var(--f-display); font-stretch: 70%; color: var(--rojo); margin-bottom: 14px; }
.fichas-trabajo p { margin: 0; color: var(--muted); }
@media (max-width: 900px) {
  .fichas-trabajo { grid-template-columns: 1fr 1fr; }
  .fichas-trabajo li:not(:nth-child(3n+1)) { padding-left: 0; border-left: 0; }
  .fichas-trabajo li:nth-child(even) { padding-left: 24px; border-left: 1px solid var(--line); }
}
@media (max-width: 560px) {
  .fichas-trabajo { grid-template-columns: 1fr; }
  .fichas-trabajo li:nth-child(even) { padding-left: 0; border-left: 0; }
}

.pasos-grid, .faq-grid { display: grid; grid-template-columns: .8fr 1.2fr; gap: 28px clamp(32px, 6vw, 90px); align-items: start; }
.pasos-lista { list-style: none; margin: 0; padding: 0; counter-reset: paso; }
.pasos-lista li { counter-increment: paso; position: relative; padding: 0 0 30px 64px; }
.pasos-lista li::before { content: counter(paso); position: absolute; left: 0; top: 0; width: 42px; height: 42px; display: grid; place-items: center; border: 2px solid var(--ink); font-weight: 800; }
.pasos-lista li:not(:last-child)::after { content: ""; position: absolute; left: 20px; top: 46px; bottom: 4px; border-left: 2px dashed var(--line); }
.pasos-lista h3 { margin-bottom: .25em; padding-top: .35em; }
.pasos-lista p { margin: 0; color: var(--muted); }
.faq { background: var(--cal); }
.faq-lista { border-top: 3px solid var(--ink); }
.faq-lista details { border-bottom: 1px solid var(--line); }
.faq-lista summary { cursor: pointer; list-style: none; padding: 20px 40px 20px 0; position: relative; font-weight: 700; font-size: 1.12rem; }
.faq-lista summary::-webkit-details-marker { display: none; }
.faq-lista summary::after { content: "+"; position: absolute; right: 4px; top: 14px; font-size: 1.6rem; color: var(--accent); }
.faq-lista details[open] summary::after { content: "–"; }
.faq-lista details p { margin: 0 0 20px; color: var(--muted); max-width: 40em; }
@media (max-width: 760px) { .pasos-grid, .faq-grid { grid-template-columns: 1fr; } }

/* ---------- empresa ---------- */
.empresa-grid { display: grid; grid-template-columns: 1.2fr .8fr; gap: 32px clamp(32px, 6vw, 90px); align-items: start; }
.empresa-txt > p { font-size: 1.12rem; }
.principios { list-style: none; margin: 32px 0 0; padding: 0; counter-reset: pr; border-top: 3px solid var(--ink); }
.principios li { counter-increment: pr; display: grid; grid-template-columns: 4rem 1fr; gap: 2px 16px; padding: 20px 0; border-bottom: 1px solid var(--line); }
.principios li::before { content: counter(pr, decimal-leading-zero); grid-row: span 2; font: 800 2rem/1 var(--f-display); font-stretch: 70%; color: var(--rojo); }
.principios h2 { font-size: 1.6rem; margin: 0; }
.principios p { margin: 0; color: var(--muted); }
.ficha { background: var(--cal); border: 2px solid var(--ink); }
.ficha dl { margin: 0; }
.ficha dl > div { padding: 14px 20px; border-bottom: 1px solid var(--line); }
.ficha dl > div:last-child { border-bottom: 0; }
.ficha dt { color: var(--muted); margin-bottom: 2px; }
.ficha dd { margin: 0; font-weight: 600; }
.ficha a { text-decoration: none; }
.hacemos { background: var(--cal); }
.duo-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.duo figure { margin: 0; }
.duo img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.duo-pie { display: flex; gap: 28px; flex-wrap: wrap; margin-top: 28px; }
@media (max-width: 860px) { .empresa-grid { grid-template-columns: 1fr; } }
@media (max-width: 600px) { .duo-grid { grid-template-columns: 1fr; } }

/* ---------- trabajos y fichas de obra ---------- */
.obra-fila { display: grid; grid-template-columns: 1.25fr .75fr; gap: 28px clamp(28px, 5vw, 64px); align-items: center; padding: clamp(28px, 4vw, 48px) 0; }
.obra-fila + .obra-fila { border-top: 1px solid var(--line); }
.obra-fila--inv { grid-template-columns: .75fr 1.25fr; }
.obra-fila--inv .obra-portada { order: 2; }
.obra-portada { display: block; overflow: hidden; }
.obra-portada img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; transition: transform .6s ease; }
.obra-portada:hover img { transform: scale(1.03); }
.obra-info h2 { font-size: clamp(2rem, 4vw, 3rem); }
.obra-info h2 a { text-decoration: none; }
.obra-info h2 a:hover { color: var(--accent); }
.cartela-mini { margin: 22px 0 24px; border: 2px solid var(--ink); display: grid; grid-template-columns: 1fr 1fr; }
.cartela-mini > div { padding: 10px 14px; border-bottom: 1px solid var(--line); }
.cartela-mini > div:nth-child(odd) { border-right: 1px solid var(--line); }
.cartela-mini > div:nth-last-child(-n+2):nth-child(odd), .cartela-mini > div:last-child { border-bottom: 0; }
.cartela-mini dt { color: var(--muted); font-size: .68rem; }
.cartela-mini dd { margin: 0; font-weight: 600; font-size: .95rem; }
@media (max-width: 800px) { .obra-fila, .obra-fila--inv { grid-template-columns: 1fr; } .obra-fila--inv .obra-portada { order: 0; } }

.migas { font-size: .9rem; color: var(--muted); margin-bottom: 18px; }
.migas a { color: var(--ink); font-weight: 600; }
.obra-head h1 { max-width: 20ch; }
.obra-head-grid { display: grid; grid-template-columns: 1.2fr .8fr; gap: 20px clamp(28px, 5vw, 64px); align-items: start; }
.obra-head .cartela-mini { margin: 0; background: var(--paper); }
@media (max-width: 800px) { .obra-head-grid { grid-template-columns: 1fr; } }

.galeria { list-style: none; margin: 0; padding: 0; columns: 3 260px; column-gap: 12px; }
.galeria li { break-inside: avoid; margin-bottom: 12px; }
.galeria a { display: block; overflow: hidden; background: var(--paper-2); }
.galeria img { width: 100%; transition: transform .5s ease, opacity .3s; }
.galeria a:hover img { transform: scale(1.03); }
.obra-pie { border-top: 1px solid var(--line); }
.obra-pie-grid { display: flex; justify-content: space-between; gap: 18px; flex-wrap: wrap; }

.visor { border: 0; padding: 0; background: transparent; max-width: 100vw; max-height: 100vh; width: 100vw; height: 100vh; margin: 0; }
.visor::backdrop { background: rgba(10, 10, 10, .93); }
.visor figure { margin: 0; height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 56px 70px 20px; }
.visor img { max-width: 100%; max-height: calc(100vh - 120px); object-fit: contain; }
.visor figcaption { color: #e9e9e9; margin-top: 12px; font-size: .92rem; text-align: center; }
.visor button { position: absolute; background: var(--paper); color: var(--ink); border: 0; width: 46px; height: 46px; font-size: 1.4rem; cursor: pointer; border-radius: var(--radius); }
.visor button:hover { background: var(--accent); color: var(--paper); }
.visor-cerrar { top: 10px; right: 10px; }
.visor-ant { left: 10px; top: 50%; transform: translateY(-50%); }
.visor-sig { right: 10px; top: 50%; transform: translateY(-50%); }
@media (max-width: 600px) { .visor figure { padding: 60px 10px 70px; } .visor-ant, .visor-sig { top: auto; bottom: 12px; transform: none; } .visor-ant { left: calc(50% - 56px); } .visor-sig { right: calc(50% - 56px); } }

/* ---------- blog (colección editable) ---------- */
.blog-lista { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 40px 28px; }
.blog-lista li { display: flex; flex-direction: column; border-top: 3px solid var(--ink); padding-top: 18px; }
.blog-foto { display: block; overflow: hidden; margin-bottom: 16px; background: var(--paper-2); }
.blog-foto img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; transition: transform .6s ease; }
.blog-foto:hover img { transform: scale(1.03); }
.blog-txt .kicker { margin-bottom: .6em; }
.blog-txt h2 { font-size: clamp(1.5rem, 2.4vw, 1.9rem); margin-bottom: .4em; }
.blog-txt h2 a { text-decoration: none; }
.blog-txt h2 a:hover { color: var(--accent); }
.blog-txt > p:not(.kicker) { color: var(--muted); }
.blog-destacada { grid-column: 1 / -1; display: grid !important; grid-template-columns: 1.3fr 1fr; gap: 0 clamp(28px, 5vw, 64px); align-items: center; }
.blog-destacada .blog-foto { margin: 0; }
.blog-destacada .blog-foto img { aspect-ratio: 16 / 10; }
.blog-destacada .blog-txt h2 { font-size: clamp(2rem, 4vw, 3.2rem); }
.blog-vacio { border-top: 3px solid var(--ink); padding-top: 22px; max-width: 40em; font-size: 1.1rem; }
.paginacion { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 44px; }
.paginacion a { min-width: 46px; padding: .6em .8em; text-align: center; border: 2px solid var(--ink); text-decoration: none; font-weight: 700; font-variant-numeric: tabular-nums; }
.paginacion a:hover { background: var(--paper-2); }
.paginacion a[aria-current="page"] { background: var(--ink); color: var(--paper); }
.noticia-head h1 { max-width: 22ch; font-size: clamp(2.2rem, 5.6vw, 4.4rem); }
.noticia-head .lead { margin-top: .6em; }
.noticia-portada { margin-top: clamp(28px, 4vw, 48px); margin-bottom: 0; }
.noticia-portada img { width: 100%; max-height: 640px; object-fit: cover; }
.texto { max-width: 44em; font-size: 1.1rem; margin-bottom: 36px; }
.texto h2 { font-size: clamp(1.7rem, 3vw, 2.3rem); margin: 1.4em 0 .5em; }
.texto h3 { font-size: 1.35rem; margin: 1.3em 0 .4em; }
.texto ul, .texto ol { padding-left: 1.3em; margin: 0 0 1em; }
.texto li { margin-bottom: .3em; }
.texto li::marker { color: var(--rojo); }
.texto a { color: var(--accent); font-weight: 600; }
@media (max-width: 960px) { .blog-lista { grid-template-columns: 1fr 1fr; } }
@media (max-width: 700px) { .blog-lista, .blog-destacada { grid-template-columns: 1fr; } .blog-destacada .blog-foto { margin-bottom: 16px; } }

/* ---------- contacto y formulario ---------- */
.contact { display: grid; grid-template-columns: .8fr 1.2fr; gap: clamp(32px, 6vw, 80px); }
.contact h2 { font-size: clamp(1.8rem, 3.4vw, 2.6rem); }
.contact .direct { list-style: none; padding: 0; margin: 24px 0 0; border-top: 3px solid var(--ink); }
.contact .direct li { border-bottom: 1px solid var(--line); }
.contact .direct a { display: grid; grid-template-columns: 6.5rem 1fr; gap: 12px; padding: 16px 0; text-decoration: none; align-items: baseline; }
.contact .direct a:hover strong { color: var(--accent); }
.contact .direct strong { font-size: 1.15rem; overflow-wrap: anywhere; }
.contact .direct .label { font-size: .75rem; letter-spacing: .1em; font-weight: 600; text-transform: uppercase; color: var(--muted); }
.visita { margin-top: 30px; padding: 22px; background: var(--cal); border-left: 4px solid var(--rojo); }
.visita h3 { margin-bottom: .4em; }
.social { display: flex; flex-wrap: wrap; gap: 8px 18px; margin-top: 20px; }
.form { background: var(--cal); padding: clamp(20px, 3vw, 36px); border-radius: var(--radius); border-top: 4px solid var(--ink); }
.form .row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 18px; }
.field label, .field legend { font-size: .85rem; font-weight: 700; }
.field input, .field select, .field textarea { font: inherit; color: var(--ink); padding: .8em .9em; background: var(--paper); border: 1px solid #b9b4aa; border-radius: var(--radius); width: 100%; }
.field input:focus, .field textarea:focus { border-color: var(--ink); }
.field textarea { min-height: 140px; resize: vertical; }
.field [aria-invalid="true"] { border-color: var(--error); box-shadow: 0 0 0 1px var(--error); }
fieldset.field { border: 0; padding: 0; margin: 0 0 18px; }
.choices { display: flex; flex-wrap: wrap; gap: 8px; }
.choices input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.choices span { display: inline-block; padding: .55em 1em; border: 1px solid #b9b4aa; border-radius: var(--radius); background: var(--paper); cursor: pointer; font-weight: 600; font-size: .95rem; }
.choices input:checked + span { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.choices input:focus-visible + span { outline: 3px solid var(--cota); outline-offset: 2px; }
.consent { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-start; font-size: .92rem; margin-bottom: 12px; }
.consent input { margin-top: .3em; width: 18px; height: 18px; flex-shrink: 0; accent-color: var(--accent); }
.consent > span:not(.field-err) { flex: 1; min-width: 0; }
.legal-small { font-size: .78rem; line-height: 1.5; color: var(--muted); margin: 8px 0 20px; }
.field-err { display: block; flex-basis: 100%; font-size: .82rem; color: var(--error); font-weight: 600; }
.form-msg { margin-top: 14px; font-size: .92rem; }
.form-msg.ok { color: var(--ok); }
.form-msg.err { color: var(--error); }
@media (max-width: 860px) { .contact { grid-template-columns: 1fr; } }
@media (max-width: 520px) { .form .row { grid-template-columns: 1fr; } }

/* ---------- textos legales ---------- */
.legal { max-width: 46em; padding-bottom: clamp(56px, 8vw, 100px); }
.legal h2 { font-size: 1.9rem; margin: 2em 0 .6em; scroll-margin-top: 100px; }
.legal h3 { font-size: 1.2rem; margin: 1.6em 0 .5em; }
.legal nav ul { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 8px 22px; }
.legal ul { padding-left: 1.2em; }
.legal .box { background: var(--cal); padding: 18px 20px; border-left: 4px solid var(--rojo); margin: 1.4em 0; line-height: 1.8; overflow-wrap: anywhere; }

/* ---------- pie: sencillo (los datos de contacto están en /contacto/, cabecera y WhatsApp) ---------- */
.site-foot { background: var(--cal); color: var(--ink); padding: 40px 0 24px; font-size: .95rem; border-top: 3px solid var(--ink); }
.site-foot a { color: inherit; text-decoration: none; }
.site-foot a:hover { color: var(--accent); }
.foot-main { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 20px 40px; padding-bottom: 26px; border-bottom: 1px solid var(--line); }
.foot-marca { display: flex; align-items: center; flex-wrap: wrap; gap: 10px 24px; }
.foot-marca .brand img { height: 40px; }
.foot-marca p { margin: 0; color: var(--muted); font-size: .9rem; max-width: 30em; }
.foot-nav { display: flex; flex-wrap: wrap; gap: 6px 24px; font-weight: 600; }
.foot-social { margin: 18px 0 0; display: flex; gap: 18px; }
.foot-bottom { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px 24px; padding-top: 20px; font-size: .84rem; color: var(--muted); }
.foot-bottom nav { display: flex; flex-wrap: wrap; gap: 18px; }

/* ---------- globo de WhatsApp ---------- */
.wa { position: fixed; right: 20px; bottom: 20px; z-index: 40; display: inline-flex; align-items: center; gap: .65em; padding: 6px 18px 6px 6px; border-radius: 999px; background: var(--paper); color: var(--ink); text-decoration: none; border: 2px solid var(--ink); box-shadow: 0 6px 18px rgba(0,0,0,.18); font: 700 .82rem/1 var(--f-body); letter-spacing: .08em; text-transform: uppercase; transition: transform .2s; }
.wa:hover { transform: translateY(-2px); }
.wa svg { width: 40px; height: 40px; padding: 8px; border-radius: 50%; background: #25d366; color: #fff; flex-shrink: 0; }
@media (max-width: 600px) {
  .wa { padding: 0; border: 0; right: 16px; bottom: 16px; }
  .wa span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .wa svg { width: 56px; height: 56px; padding: 13px; }
}
body:has(.wa) .site-foot { padding-bottom: 92px; } /* que el globo no tape la línea legal */

/* ---------- aparición al hacer scroll ---------- */
.reveal { opacity: 0; transform: translateY(14px); transition: opacity .6s ease, transform .6s ease; }
.reveal.is-in { opacity: 1; transform: none; }
.no-js .reveal { opacity: 1; transform: none; }
