/* Mezquíriz Abogados — hoja de estilos principal.
   Titulares: Playfair Display cursiva. Texto, etiquetas e interfaz: Instrument Sans. Logotipo: imagen del despacho. */

@font-face { font-family: 'Playfair Display'; src: url('/assets/fonts/playfair-display-latin-wght-normal.woff2') format('woff2'); font-weight: 400 900; font-style: normal; font-display: swap; }
@font-face { font-family: 'Playfair Display'; src: url('/assets/fonts/playfair-display-latin-wght-italic.woff2') format('woff2'); font-weight: 400 900; font-style: italic; font-display: swap; }
@font-face { font-family: 'Instrument Sans'; src: url('/assets/fonts/instrument-sans-latin-wght-normal.woff2') format('woff2'); font-weight: 400 700; font-style: normal; font-display: swap; }

:root {
  --ground: #F4F4F2;
  --paper: #FFFFFF;
  --tone: #EAE9E5;
  --ink: #16233B;
  --soft: #46526A;
  --navy: #0F2E59;
  --plum: #8A3B70;
  --sage: #6AA592;
  --teal: #2C7A80;
  --wa: #1F7A4D;
  --a: var(--navy);
  --serif: 'Playfair Display', 'Iowan Old Style', Georgia, serif;
  --sans: 'Instrument Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --ease-in-out: cubic-bezier(0.77, 0, 0.175, 1);
  interpolate-size: allow-keywords;
  --gap: 8px;
  --pad: 20px;
  --header-h: 68px;
}
@media (min-width: 900px) { :root { --pad: 32px; --header-h: 88px; } }

/* Colores de cada área */
.area--herencias { --a: #2C7A80; }
.area--inmuebles { --a: #3E6E5F; }
.area--familia { --a: #8A3B70; }
.area--penal { --a: #0F2E59; }
.area--violencia { --a: #7A4B5E; }
.area--civil { --a: #3F4A5E; }
.area--danos { --a: #8A5A2B; }
.area--despacho { --a: #16233B; }

/* Base */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--header-h) + 16px); }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
body { margin: 0; background: var(--ground); color: var(--ink); font-family: var(--sans); font-size: 1.0625rem; line-height: 1.6; letter-spacing: -0.003em; font-synthesis: none; -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; padding-bottom: 64px; }
@media (min-width: 760px) { body { font-size: 1.125rem; padding-bottom: 0; } }
img { display: block; max-width: 100%; height: auto; }
a { color: var(--navy); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { color: var(--plum); }
:focus-visible { outline: 2px solid var(--plum); outline-offset: 3px; }
::selection { background: var(--navy); color: #fff; }
h1, h2, h3 { font-family: var(--serif); font-weight: 400; margin: 0; text-wrap: balance; letter-spacing: -0.02em; }
h1, h2, h3, .h3 { font-style: italic; letter-spacing: -0.03em; }
h1, h2 { letter-spacing: -0.035em; }
h1 { font-size: clamp(3.3rem, 7.6vw, 7rem); line-height: 0.98; }
h2 { font-size: clamp(2.9rem, 5.8vw, 5.4rem); line-height: 1; }
h3, .h3 { font-size: 1.8rem; line-height: 1.15; font-weight: 500; }
strong, b { font-weight: 600; }
p { margin: 0 0 1em; text-wrap: pretty; }
p:last-child { margin-bottom: 0; }
ul, ol { margin: 0; }
.lead { font-size: 1.18rem; line-height: 1.55; color: var(--ink); }
@media (min-width: 900px) { .lead { font-size: 1.28rem; } }
.wrap { width: 100%; max-width: 1280px; margin: 0 auto; padding: 0 var(--pad); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 8px; top: -60px; background: var(--navy); color: #fff; padding: 12px 16px; z-index: 100; }
.skip:focus { top: 8px; }
.icon { width: 1.15em; height: 1.15em; flex-shrink: 0; }
.tel { font-variant-numeric: tabular-nums; white-space: nowrap; }
mark.todo { background: #FFEFB8; color: inherit; padding: 0 0.2em; }

/* Botones */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 50px; padding: 0 22px; border: 0; border-radius: 2px; font: 500 1rem/1.2 var(--sans); text-decoration: none; cursor: pointer; transition: transform 160ms var(--ease-out), filter 200ms ease, background-color 200ms ease; }
.btn:active { transform: scale(0.97); }
.btn-primary { background: var(--navy); color: #fff; }
/* Relleno que barre el botón al pasar el ratón */
.btn-primary, .btn-light, .btn-outline { position: relative; isolation: isolate; overflow: hidden; }
.btn-primary::before, .btn-light::before, .btn-outline::before { content: ""; position: absolute; inset: 0; z-index: -1; background: var(--plum); clip-path: inset(0 100% 0 0); transition: clip-path 380ms var(--ease-out); }
.btn-light::before, .btn-outline::before { background: var(--navy); }
.btn-outline { background: var(--tone); color: var(--navy); }
.btn-ink { background: var(--ink); color: #fff; }
.btn-light { background: #fff; color: var(--navy); }
.btn-ghost { background: rgba(255, 255, 255, 0.16); color: #fff; }
.btn-wa { background: var(--wa); color: #fff; }
.btn-block { width: 100%; }
.btn-arrow { transition: transform 250ms var(--ease-out); }
.text-link { display: inline-flex; align-items: center; gap: 8px; font-weight: 500; color: var(--plum); text-decoration: none; }
.actions { display: flex; flex-wrap: wrap; gap: var(--gap); }
@media (hover: hover) and (pointer: fine) {
  .btn-ink:hover, .btn-wa:hover, .btn-ghost:hover { filter: brightness(1.15); color: #fff; }
  .btn-primary:hover, .btn-light:hover, .btn-outline:hover { color: #fff; }
  .btn-primary:hover::before, .btn-light:hover::before, .btn-outline:hover::before { clip-path: inset(0 0 0 0); }
  .btn { transition: transform 160ms var(--ease-out), filter 200ms ease, background-color 200ms ease, color 300ms ease; }
  .btn:hover .btn-arrow, .text-link:hover .btn-arrow, .area-card:hover .btn-arrow, .sub-card:hover .btn-arrow, .group--link:hover .btn-arrow { transform: translateX(4px); }
}

/* Cabecera */
.site-header { position: sticky; top: 0; z-index: 50; background: rgba(244, 244, 242, 0.97); }
.read-progress { position: absolute; left: 0; right: 0; bottom: 0; height: 2px; background: var(--plum); transform: scaleX(0); transform-origin: left; pointer-events: none; }
.bar { display: flex; align-items: center; gap: 16px; min-height: var(--header-h); }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--navy); margin-right: auto; }
.brand-logo { display: block; height: 46px; width: auto; }
@media (min-width: 900px) { .brand-logo { height: 68px; } }
.nav-desktop { display: none; }
.nav-desktop ul { display: flex; gap: 26px; list-style: none; padding: 0; }
.nav-desktop a { color: var(--ink); text-decoration: none; font-size: 1rem; padding: 10px 0; position: relative; }
.nav-desktop a::after { content: ""; position: absolute; left: 0; right: 0; bottom: 4px; height: 2px; background: var(--plum); transform: scaleX(0); transform-origin: left; transition: transform 250ms var(--ease-out); }
.nav-desktop a[aria-current="page"]::after, .nav-desktop a:hover::after { transform: scaleX(1); }
.bar-actions { display: flex; align-items: center; gap: 8px; }
.bar-phone, .bar-cta { display: none; }
.bar-phone { align-items: center; gap: 8px; color: var(--ink); text-decoration: none; font-weight: 500; padding: 10px 8px; }
.lang-link { display: inline-flex; align-items: center; justify-content: center; min-width: 44px; min-height: 44px; font-weight: 600; font-size: 0.9rem; color: var(--navy); text-decoration: none; background: var(--tone); }
.menu-toggle { display: inline-flex; align-items: center; justify-content: center; width: 48px; height: 48px; border: 0; background: var(--navy); color: #fff; cursor: pointer; }
.menu-toggle .icon { width: 24px; height: 24px; }
.menu-toggle .i-close, .menu-toggle[aria-expanded="true"] .i-open { display: none; }
.menu-toggle[aria-expanded="true"] .i-close { display: block; }
.nav-mobile { background: var(--paper); padding: 8px var(--pad) 24px; max-height: calc(100vh - var(--header-h)); overflow-y: auto; }
.nav-mobile ul { list-style: none; padding: 0; }
.nav-mobile li a { display: block; padding: 14px 0; font-size: 1.5rem; font-family: var(--serif); font-style: italic; letter-spacing: -0.02em; color: var(--ink); text-decoration: none; }
.nav-mobile-actions { display: flex; gap: var(--gap); margin-top: 16px; }
@media (min-width: 760px) { .bar-phone, .bar-cta { display: inline-flex; } .bar-cta { min-height: 46px; } }
@media (min-width: 1140px) { .nav-desktop { display: block; } .menu-toggle { display: none; } .nav-mobile { display: none !important; } }

/* Contacto fijo: barra inferior en móvil, botón de WhatsApp en escritorio */
.dock { position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; display: grid; grid-template-columns: repeat(3, 1fr); background: var(--navy); }
.dock a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; min-height: 64px; color: #fff; text-decoration: none; font-size: 0.85rem; }
.dock a:nth-child(2) { background: var(--wa); }
.dock .icon { width: 22px; height: 22px; }
.wa-float { display: none; }
@media (min-width: 760px) {
  .dock { display: none; }
  .wa-float { position: fixed; right: 20px; bottom: 20px; z-index: 40; display: inline-flex; align-items: center; justify-content: center; width: 58px; height: 58px; border-radius: 50%; background: var(--wa); color: #fff; box-shadow: 0 6px 18px -8px rgba(15, 46, 89, 0.55); transition: transform 160ms var(--ease-out); }
  .wa-float .icon { width: 26px; height: 26px; }
  .wa-float:active { transform: scale(0.95); }
}

/* Migas de pan */
.crumbs { padding-top: 16px; font-size: 0.92rem; color: var(--soft); }
.crumbs ol { display: flex; flex-wrap: wrap; gap: 4px 8px; list-style: none; padding: 0; }
.crumbs li + li::before { content: "/"; margin-right: 8px; color: #8A92A2; }
.crumbs a { color: var(--soft); }

/* Portada: fotografía a sangre con el lema encima */
.hero { padding: 0; }
.hero-stage { position: relative; display: grid; align-items: end; min-height: min(calc(100svh - var(--header-h) - 64px), 880px); padding: calc(min(52svh, 400px) + 14px) 0 44px; overflow: hidden; background: radial-gradient(ellipse 46% 62% at 82% 46%, #EDEEEA 0%, rgb(237 238 234 / 0) 70%), #E3E5E0; color: var(--ink); isolation: isolate; }
/* Grabado de la Justicia (Bureau of Engraving and Printing, dominio público), recortado y entintado en azul. */
.hero-art { position: absolute; top: 14px; right: 0; height: min(52svh, 400px); margin: 0; z-index: -1; pointer-events: none; }
.hero-art figcaption { display: none; }
.hero-art img { height: 100%; width: auto; display: block; }
.hero-inner { position: relative; }
.hero-copy { display: flex; flex-direction: column; gap: 22px; max-width: 46rem; }
.hero-copy h1 { font-size: clamp(3.4rem, 7.4vw, 7.6rem); line-height: 0.96; font-weight: 400; color: var(--navy); }
.hero-copy h1 .line { display: block; overflow: hidden; padding-bottom: 0.08em; margin-bottom: -0.08em; }
.hero-copy h1 .line > span { display: inline-block; }
.hero-copy .lead { color: var(--ink); max-width: 32em; }
.hero-line { display: flex; gap: 10px; align-items: flex-start; color: var(--soft); font-size: 1rem; margin: 0; }
.hero-line .icon { margin-top: 0.25em; color: var(--plum); }
.ph { width: 100%; height: 100%; object-fit: cover; filter: grayscale(1) contrast(1.05); }
.ph--top { object-position: 50% 0%; }
.hero-strip { display: flex; flex-wrap: wrap; gap: 12px 32px; padding-top: 20px; padding-bottom: 20px; font-size: 1rem; }
.hero-strip a, .hero-strip span { display: inline-flex; align-items: center; gap: 8px; color: var(--ink); text-decoration: none; }
.hero-strip .icon { color: var(--teal); }
@media (min-width: 900px) {
  .hero-stage { padding: 64px 0 72px; align-items: center; border-bottom: 1px solid rgb(15 46 89 / 0.14); }
  .hero-art { top: 28px; bottom: 24px; height: auto; right: max(var(--pad), calc(50% - 680px)); display: flex; align-items: stretch; gap: 22px; }
  .hero-art figcaption { display: block; writing-mode: vertical-rl; transform: rotate(180deg); order: -1; align-self: flex-end; margin-bottom: 8px; padding-top: 18px; border-left: 1px solid rgb(15 46 89 / 0.28); padding-left: 10px; font-size: 0.72rem; font-weight: 500; letter-spacing: 0.24em; text-transform: uppercase; color: var(--soft); white-space: nowrap; }
  .hero-copy { max-width: min(64%, 60rem); }
  .hero-copy .lead, .hero-line { max-width: 34rem; }
}
/* Portada en móvil y tableta: composición centrada, como la portada de un libro antiguo. */
.hero-kicker { display: none; }
@media (max-width: 899px) {
  .hero-stage { display: flex; flex-direction: column; align-items: center; min-height: 0; padding: 26px 0 40px; text-align: center; background: radial-gradient(ellipse 70% 42% at 50% 30%, #EDEEEA 0%, rgb(237 238 234 / 0) 72%), #E3E5E0; }
  .hero-art { order: 0; position: relative; top: auto; right: auto; z-index: 0; height: min(40svh, 340px); margin: 6px 0 20px; }
  .hero-kicker { order: 1; display: block; max-width: calc(100% - 2 * var(--pad)); margin: 0 0 12px; font-size: 0.72rem; font-weight: 600; line-height: 1.5; letter-spacing: 0.16em; text-transform: uppercase; text-align: center; color: var(--plum); }
  .hero-inner { order: 2; }
  .hero-kicker > span { white-space: nowrap; }
  .hero-inner { width: 100%; }
  .hero-copy { align-items: center; gap: 16px; max-width: 34rem; margin: 0 auto; }
  .hero-copy h1 { font-size: clamp(2.1rem, 9vw, 3.4rem); line-height: 1.02; }
  .hero-copy .lead { font-size: 1.06rem; line-height: 1.5; max-width: 30ch; color: var(--soft); }
  .hero-line { display: none; }
  .hero-copy .actions { flex-direction: column; align-items: stretch; width: 100%; max-width: 340px; margin-top: 6px; }
  .hero-copy .actions .btn { width: 100%; }
}
@media (max-width: 759px) { .hero-strip { display: none; } }
@media (max-width: 359px) { .hero-kicker .sep { display: none; } .hero-kicker > span:not(.sep) { display: block; } }

/* Cinta de especialidades */
.marquee { overflow: hidden; background: var(--ink); color: #fff; }
.marquee-track { display: flex; width: max-content; }
.marquee span { font-family: var(--serif); font-style: italic; letter-spacing: -0.02em; font-size: clamp(1.4rem, 2.3vw, 1.9rem); font-weight: 400; padding: 20px 0; white-space: nowrap; }
.marquee span::after { content: "·"; color: #A9D1C3; margin: 0 0.9em; }

/* Áreas en filas editoriales */
/* Áreas de la portada: galería horizontal.
   Móvil: carrusel con desplazamiento lateral. Escritorio con soporte de animaciones ligadas al scroll: la sección queda fija y las tarjetas avanzan de lado al bajar. */
.rail-section { padding: 80px 0; --rail-start: max(var(--pad), calc((100vw - 1280px) / 2 + var(--pad))); }
.rail-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; column-gap: 24px; }
.rail-head .section-head { flex: 1 1 22rem; }
.rail-head .section-head { margin-bottom: 32px; }
.rail-hint { display: inline-flex; align-items: center; gap: 8px; margin-bottom: 20px; font-size: 0.78rem; font-weight: 600; letter-spacing: 0.2em; text-transform: uppercase; color: var(--plum); white-space: nowrap; }
.rail-track { list-style: none; margin: 0; padding: 4px var(--rail-start) 12px; display: flex; gap: 16px; overflow-x: auto; scroll-snap-type: x mandatory; scroll-padding-inline: var(--rail-start); scrollbar-width: none; }
.rail-track::-webkit-scrollbar { display: none; }
.rail-item { flex: 0 0 min(80vw, 360px); scroll-snap-align: start; }
.rail-card { position: relative; display: flex; flex-direction: column; height: 100%; background: var(--paper); color: var(--ink); text-decoration: none; overflow: hidden; isolation: isolate; }
.rail-photo { position: relative; margin: 0; aspect-ratio: 4 / 3; overflow: hidden; background: var(--ink); }
.rail-photo img { transition: scale 900ms var(--ease-out); }
.rail-photo::after { content: ""; position: absolute; inset: 0; background: var(--a); mix-blend-mode: multiply; opacity: 0.35; transition: opacity 500ms ease; }
.rail-num { position: absolute; left: 18px; bottom: 10px; z-index: 1; font-family: var(--serif); font-style: italic; font-size: 3.4rem; line-height: 1; letter-spacing: -0.03em; color: #fff; text-shadow: 0 2px 18px rgb(0 0 0 / 0.35); }
.rail-body { position: relative; display: flex; flex-direction: column; gap: 10px; padding: 24px 24px 26px; flex: 1; }
.rail-body::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 3px; background: var(--a); transform: scaleX(0.18); transform-origin: left; transition: transform 500ms var(--ease-out); }
.rail-icon { color: var(--a); }
.rail-icon .icon { width: 30px; height: 30px; }
.rail-name { font-family: var(--serif); font-style: italic; letter-spacing: -0.025em; font-size: clamp(1.6rem, 2.2vw, 2rem); line-height: 1.08; }
.rail-text { color: var(--soft); font-size: 1rem; flex: 1; }
.rail-more { display: inline-flex; align-items: center; gap: 8px; margin-top: 6px; font-weight: 500; color: var(--a); }
.rail-progress { display: none; }
@media (hover: hover) and (pointer: fine) {
  .rail-card:hover .rail-photo img { scale: 1.06; }
  .rail-card:hover .rail-photo::after { opacity: 0.6; }
  .rail-card:hover .rail-body::before { transform: scaleX(1); }
  .rail-card:hover .btn-arrow { transform: translateX(4px); }
}
.rail-card:active { transform: scale(0.99); }
@media (min-width: 1000px) {
  .rail-item { flex-basis: clamp(300px, 26vw, 380px); }
  .rail-hint { display: none; }
}
/* Recorrido fijo en escritorio */
@media (min-width: 1000px) and (prefers-reduced-motion: no-preference) {
  @supports (animation-timeline: view()) {
    .rail-section { padding: 0; height: calc(100vh + 7 * clamp(300px, 26vw, 380px) + 6 * 16px + 2 * var(--rail-start) - 100vw + 160px); view-timeline: --rail block; }
    .rail-sticky { position: sticky; top: var(--header-h); height: calc(100vh - var(--header-h)); display: flex; flex-direction: column; justify-content: center; padding: 24px 0; overflow: hidden; }
    .rail-head .section-head { margin-bottom: 24px; gap: 10px; }
    .rail-head h2 { font-size: clamp(2.6rem, 4.2vw, 4.2rem); }
    .rail-head .lead { font-size: 1.1rem; }
    .rail-photo { aspect-ratio: 16 / 10; }
    .rail-body { padding: 20px 22px 22px; gap: 8px; }
    .rail-text { font-size: 0.95rem; }
    .rail-track { overflow: visible; width: max-content; scroll-snap-type: none; animation: rail-move linear both; animation-timeline: --rail; animation-range: contain 0% contain 100%; }
    .rail-progress { display: block; position: relative; height: 2px; margin-top: 22px; background: rgb(15 46 89 / 0.14); }
    .rail-progress > span { position: absolute; inset: 0; background: var(--plum); transform-origin: left; animation: track-fill-x linear both; animation-timeline: --rail; animation-range: contain 0% contain 100%; }
    .rail-photo img { animation: rail-pan linear both; animation-timeline: --rail; animation-range: contain 0% contain 100%; }
  }
}
@keyframes rail-move { to { transform: translateX(calc(-100% + 100vw)); } }
@keyframes track-fill-x { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@keyframes rail-pan { from { object-position: 30% 50%; } to { object-position: 70% 50%; } }
.area-rows { display: grid; gap: var(--gap); }
.area-row { position: relative; isolation: isolate; overflow: hidden; display: grid; grid-template-columns: 40px 1fr 32px; align-items: center; gap: 6px 18px; padding: 24px 22px; background: var(--paper); color: var(--ink); text-decoration: none; }
.area-row::before { content: ""; position: absolute; inset: 0; z-index: -1; background: var(--a); clip-path: inset(0 100% 0 0); transition: clip-path 450ms var(--ease-out); }
.area-row-icon { color: var(--a); grid-row: span 2; align-self: start; transition: color 300ms ease; }
.area-row-icon .icon { width: 32px; height: 32px; }
.area-row-name { font-family: var(--serif); font-style: italic; letter-spacing: -0.025em; font-weight: 400; font-size: clamp(1.7rem, 2.8vw, 2.5rem); line-height: 1.05; transition: color 300ms ease; }
.area-row-text { grid-column: 2; color: var(--soft); font-size: 1rem; transition: color 300ms ease; }
.area-row-go { grid-column: 3; grid-row: 1 / span 2; color: var(--a); transition: transform 300ms var(--ease-out), color 300ms ease; }
.area-row-go .icon { width: 26px; height: 26px; }
.area-row:active { transform: scale(0.99); }
@media (min-width: 900px) {
  .area-row { grid-template-columns: 48px minmax(0, 5fr) minmax(0, 6fr) 40px; padding: 30px 32px; }
  .area-row-icon { grid-row: auto; align-self: center; }
  .area-row-text { grid-column: auto; }
  .area-row-go { grid-column: auto; grid-row: auto; }
}
@media (hover: hover) and (pointer: fine) {
  .area-row:hover { color: #fff; }
  .area-row:hover::before { clip-path: inset(0 0 0 0); }
  .area-row:hover .area-row-icon, .area-row:hover .area-row-go { color: #fff; }
  .area-row:hover .area-row-text { color: rgba(255, 255, 255, 0.86); }
  .area-row:hover .area-row-go { transform: translateX(8px); }
}

/* Secciones */
.section { padding: 80px 0; }
.section--tight { padding: 48px 0 80px; }
@media (min-width: 900px) { .section { padding: 128px 0; } .section--tight { padding: 64px 0 112px; } }
.tone { background: var(--tone); }
.ink { background: var(--navy); color: #fff; }
.section-head { max-width: 46rem; margin-bottom: 40px; display: flex; flex-direction: column; gap: 16px; }
.section-head--row { max-width: none; flex-direction: row; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; }
.split { display: grid; gap: 40px; align-items: center; }
.split-copy { display: flex; flex-direction: column; gap: 22px; }
.split-photo { margin: 0; aspect-ratio: 4 / 3; overflow: hidden; }
.split-copy .eyebrow { margin-bottom: -6px; }
.exp { display: flex; align-items: center; gap: 20px; margin: 4px 0; padding: 18px 0; border-top: 1px solid rgb(15 46 89 / 0.16); border-bottom: 1px solid rgb(15 46 89 / 0.16); }
.exp-num { font-family: var(--serif); font-style: italic; font-weight: 400; font-size: clamp(4rem, 7vw, 5.6rem); line-height: 0.9; letter-spacing: -0.04em; color: var(--plum); }
.exp-text { color: var(--soft); max-width: 22em; }
.exp-text strong { display: block; font-weight: 600; color: var(--navy); font-size: 1.08rem; }
.split--text { align-items: start; }
.split--text h2 { margin-bottom: 20px; }
@media (min-width: 900px) { .split { grid-template-columns: 1fr 1fr; gap: 80px; } }

/* Cabecera de página interior */
.page-head { padding-top: 40px; padding-bottom: 24px; display: flex; flex-direction: column; gap: 20px; }
.page-head h1 { max-width: 15em; }
.page-head .lead { max-width: 40em; }
.page-head--center { min-height: 50vh; justify-content: center; padding-top: 80px; padding-bottom: 80px; }
.page-hero { padding: 16px 0 0; }
.page-hero-grid { display: grid; gap: var(--gap); }
.page-hero-copy { background: var(--a); color: #fff; padding: 40px 24px; display: flex; flex-direction: column; justify-content: flex-end; gap: 20px; }
.page-hero-copy h1 { font-size: clamp(3.1rem, 6vw, 5.9rem); line-height: 0.98; }
.page-hero-copy .lead { color: #fff; max-width: 32em; }
.page-head h1 { font-size: clamp(2.7rem, 5.8vw, 5.2rem); }
.page-hero-photo { margin: 0; overflow: hidden; aspect-ratio: 16 / 10; background: var(--ink); }
@media (min-width: 900px) {
  .page-hero-grid { grid-template-columns: 7fr 5fr; min-height: 560px; }
  .page-hero-copy { padding: 56px 48px; }
  .page-hero-photo { aspect-ratio: auto; }
}

/* Áreas */
.area-grid { display: grid; gap: var(--gap); grid-template-columns: repeat(auto-fill, minmax(min(100%, 290px), 1fr)); }
.area-grid--2 { grid-template-columns: repeat(auto-fill, minmax(min(100%, 360px), 1fr)); }
.area-card { position: relative; display: flex; flex-direction: column; gap: 12px; padding: 28px 26px 26px; background: var(--paper); color: var(--ink); text-decoration: none; transition: transform 160ms var(--ease-out); }
.area-card::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 3px; background: var(--a); transform: scaleX(0.18); transform-origin: left; transition: transform 300ms var(--ease-out); }
.area-card:active { transform: scale(0.985); }
.area-card h3 { font-size: 1.85rem; }
.area-card p { color: var(--soft); flex: 1; font-size: 1rem; }
.area-card .more { display: inline-flex; align-items: center; gap: 8px; font-weight: 500; color: var(--a); }
.area-icon { color: var(--a); }
.area-icon .icon { width: 34px; height: 34px; }
.area-icon--lg { color: #fff; }
.area-icon--lg .icon { width: 44px; height: 44px; }
@media (hover: hover) and (pointer: fine) { .area-card:hover { color: var(--ink); } .area-card:hover::before { transform: scaleX(1); } }

/* Por qué elegirnos */
.why-grid { list-style: none; padding: 0; display: grid; gap: 40px 32px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 250px), 1fr)); }
@media (min-width: 900px) { .why-grid { grid-template-columns: repeat(3, 1fr); gap: 48px 48px; } }
.why-grid li { display: flex; flex-direction: column; gap: 10px; }
.why-icon { width: 28px; height: 28px; color: var(--sage); }
.why-grid h3 { font-size: 1.6rem; }
.why-grid p { color: var(--soft); }

/* Pasos */
/* Consultas online */
.online { background: linear-gradient(180deg, var(--tone) 0%, var(--ground) 100%); padding-bottom: 40px; }
.online + .section { padding-top: 40px; }
.eyebrow { display: inline-flex; align-items: center; gap: 12px; margin: 0 0 18px; font-size: 0.78rem; font-weight: 600; letter-spacing: 0.22em; text-transform: uppercase; color: var(--plum); }
.eyebrow::before { content: ""; width: 32px; height: 1px; background: currentColor; }
.online-head { display: grid; gap: 28px; margin-bottom: 56px; }
.online-head h2 { max-width: 12ch; }
.online-head-side { display: flex; flex-direction: column; gap: 24px; align-items: flex-start; }
.online-list { list-style: none; padding: 0; margin: 0 0 var(--gap); display: grid; gap: var(--gap); grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); }
.online-list li { position: relative; background: var(--paper); padding: 32px 28px 30px; display: flex; flex-direction: column; gap: 10px; overflow: hidden; }
.online-list li::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: var(--plum); transform: scaleX(0); transform-origin: left; transition: transform 450ms var(--ease-out); }
.online-badge { display: grid; place-items: center; width: 56px; height: 56px; border-radius: 50%; background: rgb(138 59 112 / 0.08); margin-bottom: 14px; }
.online-icon { width: 28px; height: 28px; color: var(--plum); }
.online-list h3 { font-size: 1.55rem; line-height: 1.1; }
.online-list p { color: var(--soft); margin: 0; }
@media (hover: hover) and (pointer: fine) { .online-list li:hover::after { transform: scaleX(1); } }
.meet { background: var(--navy); color: #fff; padding: 36px 28px; display: grid; gap: 28px; }
.meet-title { display: flex; align-items: center; gap: 16px; }
.meet-badge { display: grid; place-items: center; flex: none; width: 52px; height: 52px; border-radius: 50%; border: 1px solid rgb(255 255 255 / 0.3); color: #8CC4B1; }
.meet-badge .icon { width: 26px; height: 26px; }
.meet-title h3 { font-size: clamp(1.7rem, 2.6vw, 2.3rem); line-height: 1.05; color: #fff; }
.meet-steps { list-style: none; margin: 0; padding: 0; counter-reset: meet; display: grid; gap: 22px; }
.meet-steps li { counter-increment: meet; position: relative; display: grid; grid-template-columns: 48px 1fr; align-items: baseline; gap: 8px; }
.meet-steps li::before { content: counter(meet, decimal-leading-zero); font-family: var(--serif); font-style: italic; font-size: 2rem; line-height: 1; color: #8CC4B1; }
.meet-steps p { margin: 0; color: #E4E8EF; font-size: 1.05rem; }
.meet-note { margin: 0; padding-top: 20px; border-top: 1px solid rgb(255 255 255 / 0.18); color: #B9C2D3; font-size: 0.95rem; }
@media (min-width: 900px) {
  .online-head { grid-template-columns: 7fr 5fr; gap: 64px; align-items: end; }
  .online-list { grid-template-columns: repeat(4, 1fr); }
  .meet { grid-template-columns: 4fr 8fr; column-gap: 56px; row-gap: 24px; padding: 48px; align-items: start; }
  .meet-title { flex-direction: column; align-items: flex-start; }
  .meet-steps { grid-template-columns: repeat(3, 1fr); gap: 32px; }
  .meet-steps li { grid-template-columns: 1fr; gap: 14px; padding-top: 18px; border-top: 1px solid rgb(255 255 255 / 0.22); }
  .meet-steps li::before { font-size: 2.6rem; }
  .meet-note { grid-column: 2; }
}
.how { display: grid; gap: 40px; }
.steps { list-style: none; padding: 0; counter-reset: step; display: grid; gap: 32px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 210px), 1fr)); }
.steps li { counter-increment: step; display: flex; flex-direction: column; gap: 10px; }
.steps li { position: relative; padding-top: 22px; }
.steps li::after { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 1px; background: currentColor; opacity: 0.28; transform-origin: left; }
.steps li::before { content: counter(step, decimal-leading-zero); font-family: var(--serif); font-style: italic; font-weight: 400; font-size: 3rem; line-height: 1; color: var(--sage); }
.steps h3 { font-size: 1.6rem; }
.ink .steps p { color: #D5DBE6; }
.steps--light li::before { color: var(--plum); }
.steps--light p { color: var(--soft); }
/* «Cómo trabajamos» como recorrido: en escritorio el título queda fijo y los pasos avanzan con el scroll. */
.how-lead { color: #C9D2E1; max-width: 22em; margin: 16px 0 0; font-size: 1.1rem; }
.how-track { display: none; }
@media (min-width: 900px) {
  .how--story { grid-template-columns: 5fr 7fr; gap: 80px; align-items: start; timeline-scope: --how; }
  .how-aside { position: sticky; top: calc(var(--header-h) + 56px); }
  .how-track { display: block; position: relative; width: 2px; height: 180px; margin-top: 40px; background: rgb(255 255 255 / 0.18); }
  .how-track > span { position: absolute; inset: 0; background: #8CC4B1; transform-origin: top; }
  .steps--story { grid-template-columns: 1fr; gap: 0; view-timeline: --how block; }
  .steps--story li { display: grid; grid-template-columns: 96px 1fr; column-gap: 24px; align-content: center; min-height: 42vh; padding: 40px 0; }
  .steps--story li::before { grid-row: span 2; font-size: 4.6rem; }
  .steps--story li::after { top: auto; bottom: 0; }
  .steps--story h3 { font-size: clamp(1.9rem, 2.6vw, 2.5rem); }
  .steps--story p { font-size: 1.12rem; max-width: 30em; }
}
@keyframes step-focus { 0%, 100% { opacity: 0.25; } 44%, 56% { opacity: 1; } }
@keyframes track-fill { from { transform: scaleY(0); } to { transform: scaleY(1); } }

/* Equipo */
.team-grid { display: grid; gap: var(--gap); }
@media (min-width: 900px) { .team-grid { grid-template-columns: 1fr 1fr; } }
.person { position: relative; display: flex; flex-direction: column; gap: 14px; padding: 36px 26px 30px; background: var(--paper); min-width: 0; }
.person::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 4px; background: var(--navy); }
.person--andrea::before { background: var(--plum); }
.person a { overflow-wrap: anywhere; }
.person h3 { font-style: normal; letter-spacing: -0.01em; font-size: clamp(2rem, 3vw, 2.7rem); line-height: 1.05; }
.person-role { color: var(--teal); font-weight: 500; margin: 0; font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.16em; }
.person-facts { list-style: none; padding: 0; display: grid; gap: 8px; color: var(--soft); font-size: 1rem; flex: 1; }
.person-contact { display: flex; flex-wrap: wrap; gap: var(--gap); margin-top: 8px; }
.btn-sm { min-height: 44px; padding: 0 16px; font-size: 0.95rem; }
@media (min-width: 600px) { .person { padding: 44px 40px 36px; } }
.contact-list a, .site-footer a, .cta-mail a { overflow-wrap: anywhere; }

/* Dónde estamos y contacto */
.where { display: grid; gap: 40px; }
.where h2 { margin-bottom: 28px; }
@media (min-width: 900px) { .where { grid-template-columns: 5fr 7fr; gap: 64px; } }
.contact-list { list-style: none; padding: 0; display: grid; gap: 20px; }
.contact-list li { display: flex; gap: 14px; align-items: flex-start; }
.contact-list .icon { margin-top: 0.35em; color: var(--teal); }
.contact-list li > span { display: flex; flex-direction: column; }
.cl-label { font-size: 0.85rem; color: var(--soft); }
.where-map, .contact-map { display: flex; flex-direction: column; gap: 12px; align-items: flex-start; }
.contact-map { margin-top: 32px; }
.map { position: relative; width: 100%; height: 340px; overflow: hidden; margin: 0; background: var(--tone); }
.map img { position: absolute; left: calc(50% - 512px); top: calc(50% - 384px); width: 1024px; height: 768px; max-width: none; filter: saturate(0.4); }
.map-pin { position: absolute; left: 50%; top: 50%; width: 42px; height: 42px; margin: -42px 0 0 -21px; background: var(--plum); border-radius: 50% 50% 50% 0; transform: rotate(-45deg); display: flex; align-items: center; justify-content: center; }
.map-pin span { transform: rotate(45deg); color: #fff; font-weight: 600; }
.map-credit { position: absolute; right: 0; bottom: 0; background: #fff; font-size: 0.8rem; padding: 2px 8px; }
.contact-grid { display: grid; gap: 48px; }
.contact-grid h2 { margin-bottom: 24px; }
.contact-form { background: var(--paper); padding: 28px 22px; }
@media (min-width: 900px) { .contact-grid { grid-template-columns: 1fr 1fr; gap: 64px; } .contact-form { padding: 40px; } }

/* Llamada a la acción con formulario */
.cta-band { background: var(--navy); color: #fff; padding: 80px 0; }
.cta-grid { display: grid; gap: 40px; }
.cta-copy { display: flex; flex-direction: column; gap: 22px; }
.cta-copy .lead { color: #fff; }
.cta-copy h2 { font-size: clamp(2.5rem, 4.2vw, 3.9rem); }
.cta-actions { display: flex; flex-wrap: wrap; gap: var(--gap); }
.cta-mail { display: flex; align-items: center; gap: 10px; margin: 0; }
.cta-mail a { color: #fff; }
.cta-form { background: var(--paper); color: var(--ink); padding: 28px 22px; }
@media (min-width: 900px) { .cta-band { padding: 120px 0; } .cta-grid { grid-template-columns: 5fr 6fr; gap: 72px; align-items: start; } .cta-form { padding: 40px; } }

/* Formulario */
.form { display: flex; flex-direction: column; gap: 18px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field-row { display: grid; gap: 18px; }
@media (min-width: 600px) { .field-row { grid-template-columns: 1fr 1fr; } }
.form label { font-weight: 500; font-size: 0.98rem; }
.form input:not([type="checkbox"]):not([type="radio"]), .form select, .form textarea { font: inherit; font-size: 1rem; color: var(--ink); background: #fff; border: 1px solid #8F96A3; border-radius: 2px; padding: 12px 14px; min-height: 50px; width: 100%; transition: border-color 150ms ease; }
.form textarea { resize: vertical; min-height: 120px; }
.form input:focus, .form select:focus, .form textarea:focus { border-color: var(--navy); }
.hint, .layer { font-size: 0.9rem; color: var(--soft); margin: 0; }
.modes-pick { border: 0; margin: 0; padding: 0; min-width: 0; }
.modes-pick legend { padding: 0; margin-bottom: 8px; font-weight: 500; font-size: 0.98rem; }
.modes-options { display: grid; gap: 10px; }
@media (min-width: 600px) { .modes-options { grid-template-columns: 1fr 1fr; } }
.mode-opt { position: relative; display: flex; align-items: center; gap: 12px; min-height: 64px; padding: 12px 14px; background: #fff; border: 1px solid #8F96A3; border-radius: 2px; cursor: pointer; transition: border-color 150ms ease, box-shadow 150ms ease, background-color 150ms ease; }
.mode-opt input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.mode-opt-icon { width: 26px; height: 26px; flex: none; color: var(--plum); }
.mode-opt span { display: flex; flex-direction: column; line-height: 1.25; color: var(--ink); }
.mode-opt strong { font-weight: 600; font-size: 1rem; }
.mode-opt small { font-size: 0.86rem; color: var(--soft); }
.mode-opt::after { content: ""; margin-left: auto; flex: none; width: 20px; height: 20px; border-radius: 50%; border: 1.5px solid #8F96A3; background: #fff; transition: border-color 150ms ease, box-shadow 150ms ease; }
.mode-opt:has(input:checked) { border-color: var(--navy); box-shadow: inset 0 0 0 1px var(--navy); background: #F7F8FB; }
.mode-opt:has(input:checked)::after { border-color: var(--navy); box-shadow: inset 0 0 0 5px var(--navy); }
.mode-opt:has(input:focus-visible) { outline: 2px solid var(--plum); outline-offset: 2px; }
@media (hover: hover) and (pointer: fine) { .mode-opt:hover { border-color: var(--navy); } }
.check { display: flex; gap: 12px; align-items: flex-start; }
.check input { width: 22px; height: 22px; margin-top: 2px; accent-color: var(--navy); flex-shrink: 0; }
.check label { font-weight: 400; font-size: 0.95rem; }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

/* Contenido de áreas */
.situations { background: var(--paper); padding: 28px; }
.situations h3 { margin-bottom: 16px; }
.ticks { list-style: none; padding: 0; display: grid; gap: 12px; }
.ticks li { display: flex; gap: 12px; align-items: flex-start; }
.ticks .icon { margin-top: 0.3em; color: var(--sage); }
.groups { display: grid; gap: var(--gap); grid-template-columns: 1fr; }
/* Columnas según el número de recuadros, para que nunca quede uno suelto en otra fila. */
@media (min-width: 600px) { .groups--n2, .groups--n4 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 900px) { .groups--n3 { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1200px) { .groups--n4 { grid-template-columns: repeat(4, 1fr); } }
/* Títulos y listas alineados entre recuadros de la misma fila. */
@supports (grid-template-rows: subgrid) {
  .groups--aligned .group { display: grid; grid-row: span 2; grid-template-rows: subgrid; align-content: start; row-gap: 12px; }
}
.group { position: relative; background: var(--paper); padding: 28px 26px; display: flex; flex-direction: column; gap: 12px; color: var(--ink); text-decoration: none; }
.group ul { padding-left: 1.1em; display: grid; gap: 6px; }
.group::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 3px; background: var(--a); transform-origin: left; }
.group p { color: var(--soft); font-size: 1rem; flex: 1; }
.group .more { display: inline-flex; align-items: center; gap: 8px; font-weight: 500; color: var(--plum); }
.navarra { background: var(--a); color: #fff; padding: 40px 24px; display: flex; flex-direction: column; gap: 20px; }
.navarra .lead { color: #fff; max-width: 46rem; }
@media (min-width: 900px) { .navarra { padding: 64px; } }
.sub-card { display: flex; align-items: center; justify-content: space-between; gap: 20px; background: #fff; color: var(--ink); padding: 22px 24px; text-decoration: none; margin-top: 8px; }
.sub-card > span { display: flex; flex-direction: column; gap: 4px; }
.sub-card strong { font-family: var(--serif); font-style: italic; letter-spacing: -0.02em; font-size: 1.6rem; font-weight: 400; }
.sub-card span span { color: var(--soft); font-size: 1rem; }
.docs { list-style: none; padding: 0; display: grid; gap: var(--gap); grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)); }
.docs li { background: var(--paper); padding: 16px 20px; }
.tone .docs li { background: var(--paper); }
.faq-wrap { display: grid; gap: 32px; }
.faq-wrap h2 { margin-bottom: 16px; }
.faq-wrap > div > p { color: var(--soft); }
@media (min-width: 900px) { .faq-wrap { grid-template-columns: 4fr 7fr; gap: 64px; } }
.faq { display: grid; gap: var(--gap); }
.faq details { background: var(--paper); }
.faq summary { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 20px 24px; cursor: pointer; font-weight: 500; list-style: none; }
.faq summary::-webkit-details-marker { display: none; }
.faq-sign { position: relative; width: 14px; height: 14px; flex-shrink: 0; }
.faq-sign::before, .faq-sign::after { content: ""; position: absolute; left: 0; right: 0; top: 6px; height: 2px; background: var(--plum); transition: transform 250ms var(--ease-out); }
.faq-sign::after { transform: rotate(90deg); }
.faq details[open] .faq-sign::after { transform: rotate(0); }
.faq details p { padding: 0 24px 22px; color: var(--soft); }

/* Violencia de género */
.safety { margin-top: 16px; }
.safety p { background: #F3E7EC; padding: 18px 22px; margin: 0; }
.quick-exit { position: fixed; z-index: 45; right: 12px; bottom: 76px; background: var(--ink); color: #fff; padding: 12px 16px; text-decoration: none; font-weight: 500; font-size: 0.95rem; }
@media (min-width: 760px) { .quick-exit { bottom: auto; top: calc(var(--header-h) + 8px); } }
.quick-exit:hover { color: #fff; }

/* Consultas */
.modes { display: grid; gap: var(--gap); }
@media (min-width: 900px) { .modes { grid-template-columns: 1fr 1fr; } }
.mode { background: var(--paper); padding: 32px 28px; display: flex; flex-direction: column; gap: 12px; }
.mode-icon { width: 34px; height: 34px; color: var(--teal); }
.notice { background: var(--paper); padding: 32px 28px; display: flex; flex-direction: column; gap: 12px; }
.notice h2 { font-size: 2.3rem; }
.review-notice { margin-top: 16px; }
.review-notice::before { content: ""; }
.review-notice { display: block; background: #FFF4D6; color: #5A4300; padding: 14px 18px; font-size: 0.98rem; }

/* Blog y textos */
.cats { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; padding: 0; }
.cats li { background: var(--tone); padding: 6px 14px; font-size: 0.95rem; }
.post-list { list-style: none; padding: 0; display: grid; gap: var(--gap); }
.post-item { display: flex; flex-direction: column; gap: 8px; background: var(--paper); padding: 28px; color: var(--ink); text-decoration: none; }
.post-item h3 { font-size: 1.9rem; }
.post-item p { color: var(--soft); }
.post-item time { font-size: 0.92rem; color: var(--soft); }
.post-cat { color: var(--teal); font-weight: 500; margin: 0; }
.prose { max-width: 48rem; }
/* Página del Impuesto de Sucesiones y Donaciones */
.isd-head { padding-bottom: 8px; }
.isd-head h1 { max-width: 22ch; }
.isd-head .lead { max-width: 38em; }
.isd-facts { list-style: none; padding: 0; margin: 36px 0 0; display: grid; gap: var(--gap); grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); }
.isd-facts li { background: var(--navy); color: #D5DBE6; padding: 26px 24px; display: flex; flex-direction: column; gap: 10px; font-size: 0.98rem; line-height: 1.5; }
.isd-fact-num { font-family: var(--serif); font-style: italic; font-size: clamp(2.6rem, 4vw, 3.4rem); line-height: 1; letter-spacing: -0.03em; color: #8CC4B1; }
.isd-layout { display: grid; gap: 32px; padding-top: 48px; padding-bottom: 96px; }
.isd-toc { background: var(--tone); padding: 22px 24px; align-self: start; }
.isd-toc-title { margin: 0 0 10px; font-size: 0.78rem; font-weight: 600; letter-spacing: 0.2em; text-transform: uppercase; color: var(--plum); }
.isd-toc ol { margin: 0; padding: 0; list-style: none; display: grid; gap: 2px; counter-reset: toc; }
.isd-toc li { counter-increment: toc; display: grid; grid-template-columns: 28px 1fr; }
.isd-toc li::before { content: counter(toc, decimal-leading-zero); font-family: var(--serif); font-style: italic; color: var(--soft); padding-top: 6px; }
.isd-toc a { display: block; padding: 6px 0; color: var(--ink); text-decoration: none; font-size: 0.98rem; line-height: 1.35; transition: color 150ms ease; }
.isd-toc a:hover { color: var(--plum); }
.isd-toc a { position: relative; transition: color 200ms ease, transform 250ms var(--ease-out); }
.isd-toc a.is-active { color: var(--plum); font-weight: 600; transform: translateX(4px); }
.isd-toc li:has(a.is-active)::before { color: var(--plum); }
.isd-section { scroll-margin-top: calc(var(--header-h) + 24px); }
.isd-body > .isd-section:first-child h2 { margin-top: 0; }
.prose h3 { font-size: clamp(1.45rem, 2.2vw, 1.8rem); margin: 1.6em 0 0.4em; color: var(--navy); }
.isd-note { margin: 1.2em 0; padding: 16px 20px; background: #F6EFF3; border-left: 3px solid var(--plum); color: var(--ink); }
.isd-list { list-style: none; padding: 0 !important; display: grid; gap: 14px !important; margin: 1em 0 1.4em; }
.isd-list li { position: relative; padding-left: 26px; }
.isd-list li::before { content: ""; position: absolute; left: 4px; top: 0.72em; width: 9px; height: 9px; border-radius: 50%; border: 2px solid var(--plum); }
.isd-list strong { color: var(--navy); font-weight: 600; }
.isd-table { margin: 1.4em 0 1.8em; overflow-x: auto; }
.isd-table table { width: 100%; border-collapse: collapse; font-size: 1rem; background: var(--paper); }
.isd-table th { text-align: left; font-weight: 600; font-size: 0.86rem; letter-spacing: 0.04em; text-transform: uppercase; color: #fff; background: var(--navy); padding: 12px 16px; }
.isd-table td { padding: 12px 16px; border-bottom: 1px solid rgb(15 46 89 / 0.12); }
.isd-table td:last-child, .isd-table th:last-child { text-align: right; width: 7.5em; }
.isd-table td:last-child { white-space: nowrap; }
@media (max-width: 599px) { .isd-table th, .isd-table td { padding: 10px 12px; } .isd-table th { font-size: 0.74rem; letter-spacing: 0.02em; } .isd-table table { font-size: 0.95rem; } }
.isd-table td:last-child { font-family: var(--serif); font-style: italic; font-size: 1.3rem; color: var(--plum); }
.isd-table tbody tr:nth-child(even) td { background: #FAFAF8; }
.isd-table figcaption { margin-top: 10px; font-size: 0.88rem; color: var(--soft); }
.isd-refs { margin-top: 3em; padding-top: 24px; border-top: 1px solid rgb(15 46 89 / 0.16); }
.isd-refs h2 { font-size: 1.5rem; margin: 0 0 12px; }
.isd-refs ul { padding-left: 1.1em; font-size: 0.95rem; color: var(--soft); }
.isd-updated { margin: 12px 0 0; font-size: 0.9rem; color: var(--soft); }
@media (min-width: 1000px) {
  .isd-layout { grid-template-columns: 260px minmax(0, 48rem); gap: 72px; }
  .isd-toc { position: sticky; top: calc(var(--header-h) + 24px); }
}

.prose h1 { font-size: clamp(2.8rem, 6vw, 4.9rem); margin: 12px 0 20px; }
.prose h2 { font-size: clamp(2.1rem, 3.4vw, 2.9rem); margin: 2em 0 0.5em; }
.prose p, .prose li { line-height: 1.75; }
.prose ul { padding-left: 1.2em; margin-bottom: 1em; display: grid; gap: 6px; }
.post-meta { color: var(--soft); font-size: 0.98rem; }
.post-note { margin-top: 2.5em; color: var(--soft); font-size: 0.98rem; }

/* Pie */
.site-footer { background: var(--ink); color: #D5D9E0; padding: 72px 0 32px; }
.site-footer a { color: #fff; }
.footer-grid { display: grid; gap: 40px; }
@media (min-width: 900px) { .footer-grid { grid-template-columns: 1.3fr 1fr 1fr 1fr; } }
.footer-logo { margin: 0 0 20px; }
.footer-logo img { display: block; height: 64px; width: auto; max-width: 100%; }
.footer-badge { display: inline-block; margin-top: 20px; padding: 10px 14px; background: #fff; border-radius: 6px; transition: transform 200ms var(--ease-out, ease); }
.footer-badge:hover { transform: translateY(-2px); }
.footer-badge img { display: block; height: 52px; width: auto; }
.footer-h { font-family: var(--sans); font-size: 0.78rem; font-weight: 500; text-transform: uppercase; letter-spacing: 0.16em; color: #fff; margin-bottom: 12px; }
.site-footer ul { list-style: none; padding: 0; display: grid; gap: 8px; }
.footer-hours { display: flex; flex-direction: column; }
.footer-base { margin-top: 56px; display: flex; flex-direction: column; gap: 10px; font-size: 0.88rem; }
.credits { max-width: 80ch; }
.link-btn { background: none; border: 0; padding: 0; font: inherit; color: #fff; text-decoration: underline; cursor: pointer; }

/* Consentimiento de cookies (solo si se activa la analítica) */
.consent { position: fixed; z-index: 70; left: 12px; right: 12px; bottom: 76px; max-width: 520px; background: var(--paper); color: var(--ink); padding: 20px; box-shadow: 0 10px 30px -12px rgba(22, 35, 59, 0.4); display: flex; flex-direction: column; gap: 14px; }
.consent[hidden] { display: none; }
.consent-actions { display: flex; gap: var(--gap); }
@media (min-width: 760px) { .consent { left: 20px; bottom: 20px; } }

/* ------------------------------------------------------------------
   Movimiento. Principios: ease-out fuerte, duraciones cortas en la interfaz,
   un solo gesto protagonista por página (la llegada del título y la foto),
   solo transform y opacity, y nada de desplazamientos si el sistema pide
   reducir el movimiento. Todo es CSS: la web funciona igual sin estos efectos.
   ------------------------------------------------------------------ */
@keyframes rise { from { opacity: 0; transform: translateY(14px); } }
@keyframes rise-soft { from { transform: translateY(18px); } }
@keyframes line-up { from { transform: translateY(105%); } }
@keyframes unveil { from { clip-path: inset(0 0 100% 0); } to { clip-path: inset(0 0 0 0); } }
@keyframes settle { from { transform: scale(1.1); } }
@keyframes settle-in { from { scale: 1.24; } }
@keyframes parallax { from { translate: 0 -5%; } to { translate: 0 6%; } }
@keyframes wipe { from { clip-path: inset(0 100% 0 0); } to { clip-path: inset(0 0 0 0); } }
@keyframes wipe-up { from { clip-path: inset(100% 0 0 0); } to { clip-path: inset(0 0 0 0); } }
@keyframes ink-draw { from { stroke-dashoffset: 1; } }
@keyframes pin-drop { 0% { opacity: 0; translate: 0 -60px; } 60% { opacity: 1; translate: 0 4px; } 80% { translate: 0 -3px; } 100% { translate: 0 0; } }
@keyframes progress { to { transform: scaleX(1); } }
@keyframes row-in { from { opacity: 0; transform: translateX(-12px); } }
@keyframes drift { from { transform: scale(1.04); } to { transform: scale(1.14) translate3d(-1.5%, -1%, 0); } }
@keyframes art-drift { to { transform: translateY(14%); } }
@keyframes marquee { to { transform: translate3d(-50%, 0, 0); } }
@keyframes draw { from { transform: scaleX(0); } }
@keyframes unclip { from { clip-path: inset(12% 12% 12% 12%); } to { clip-path: inset(0 0 0 0); } }
@keyframes title-in { from { clip-path: inset(-0.3em -0.2em 100% -0.2em); transform: translateY(0.35em); } to { clip-path: inset(-0.3em -0.2em -0.3em -0.2em); } }
@keyframes fade { from { opacity: 0; } }
@keyframes pop { from { opacity: 0; transform: scale(0.85); } }
@keyframes header-lift { to { box-shadow: 0 8px 24px -18px rgba(22, 35, 59, 0.45); background: rgba(244, 244, 242, 0.99); } }
@keyframes vt-out { to { opacity: 0; } }
@keyframes vt-in { from { opacity: 0; transform: translateY(10px); } }

/* Paso suave entre páginas (View Transitions entre documentos): la cabecera y la barra de contacto se quedan quietas. */
@media (prefers-reduced-motion: no-preference) {
  @view-transition { navigation: auto; }
  .site-header { view-transition-name: site-header; }
  .dock { view-transition-name: dock; }
  ::view-transition-old(root) { animation: vt-out 160ms ease-in both; }
  ::view-transition-new(root) { animation: vt-in 380ms var(--ease-out) both; }
}

/* Interacción: respuesta inmediata al pasar y al pulsar (solo con ratón para los efectos de hover). */
.area-row, .area-card, .group--link, .post-item, .sub-card, .docs li, .faq details { transition: transform 220ms var(--ease-out), background-color 200ms ease; }
.area-icon .icon { transition: transform 300ms var(--ease-out); }
.split-photo img, .page-hero-photo img { transition: transform 900ms var(--ease-out); }
@media (hover: hover) and (pointer: fine) {
  .area-card:hover { transform: translateY(-4px); }
  .area-card:hover .area-icon .icon { transform: translateY(-2px) rotate(-4deg); }
  .group--link:hover, .post-item:hover { transform: translateY(-3px); }
  .sub-card:hover { transform: translateX(4px); }
  .split-photo:hover img { transform: scale(1.03); }
  .faq summary:hover { color: var(--plum); }
}
.group--link:active, .post-item:active, .sub-card:active { transform: scale(0.985); }

/* Preguntas frecuentes: apertura con altura animada (Chrome y Edge; en el resto se abren al instante). */
.faq details::details-content { block-size: 0; overflow: clip; transition: block-size 320ms var(--ease-out), content-visibility 320ms allow-discrete; }
.faq details[open]::details-content { block-size: auto; }
.faq summary { transition: color 200ms ease; }

@media (prefers-reduced-motion: no-preference) {
  /* Llegada a la portada: el lema sube línea a línea desde una máscara, después el resto. */
  .hero-copy h1 .line > span { animation: line-up 900ms var(--ease-out) backwards; }
  .hero-copy h1 .line:nth-child(2) > span { animation-delay: 110ms; }
  .hero-copy > :not(h1) { animation: rise 700ms var(--ease-out) backwards; }
  .hero-copy > :nth-child(2) { animation-delay: 280ms; }
  .hero-copy > :nth-child(3) { animation-delay: 350ms; }
  .hero-copy > :nth-child(4) { animation-delay: 420ms; }
  .hero-strip > * { animation: fade 600ms ease backwards; animation-delay: 600ms; }
  .hero-kicker { animation: fade 700ms ease 150ms backwards; }

  /* Fotografía principal: se asienta y después deriva muy despacio (efecto Ken Burns). */
  /* El grabado se descubre de abajo arriba y, al bajar, se desplaza más despacio que la página. */
  .hero-art { animation: unveil 1400ms var(--ease-in-out) 120ms backwards; }
  @supports (animation-timeline: scroll()) {
    .hero-art img { animation: art-drift linear both; animation-timeline: scroll(root); animation-range: 0 100vh; }
  }
  /* Fotografía de cada área: se descubre de abajo arriba mientras se asienta. */
  .page-hero-photo { animation: unveil 1100ms var(--ease-in-out) 260ms backwards; }
  .page-hero-photo img { scale: 1.14; animation: settle-in 1700ms var(--ease-out) 260ms backwards; }

  /* Páginas interiores: el bloque de color entra barriendo, el icono se dibuja y el título sube desde una máscara. */
  .page-hero-copy { animation: wipe 900ms var(--ease-in-out) backwards; }
  .area-icon--lg .icon { stroke-dasharray: 1; animation: ink-draw 1400ms var(--ease-out) 450ms backwards; }
  .crumbs { animation: fade 600ms ease backwards; }
  .isd-facts li { animation: rise 700ms var(--ease-out) backwards; animation-delay: 300ms; }
  .isd-facts li:nth-child(2) { animation-delay: 380ms; }
  .isd-facts li:nth-child(3) { animation-delay: 460ms; }

  /* Cinta de especialidades: avance continuo, se detiene al pasar el ratón. */
  .marquee-track { animation: marquee 55s linear infinite; }
  .marquee:hover .marquee-track { animation-play-state: paused; }

  /* Cabecera de páginas interiores. */
  .page-hero-copy > *, .page-head > * { animation: rise 700ms var(--ease-out) backwards; }
  .page-head > :nth-child(2) { animation-delay: 70ms; }
  .page-head > :nth-child(3) { animation-delay: 140ms; }
  .page-head > :nth-child(4) { animation-delay: 210ms; }
  .page-hero-copy > * { animation-delay: 380ms; }
  .page-hero-copy > h1 { animation: title-in 900ms var(--ease-out) 420ms backwards; }
  .page-hero-copy > :nth-child(3) { animation-delay: 560ms; }
  .page-hero-copy > :nth-child(4) { animation-delay: 640ms; }
  .page-head > h1 { animation: title-in 900ms var(--ease-out) 60ms backwards; }

  .wa-float { animation: pop 450ms var(--ease-out) 900ms backwards; }

  /* Aparición al hacer scroll, ligada a la posición (sin JavaScript). En móvil solo desplaza: nunca deja contenido oculto. */
  @supports (animation-timeline: view()) {
    .site-header { animation: header-lift linear both; animation-timeline: scroll(root); animation-range: 0 140px; }
    .section-head h2 { animation: title-in both var(--ease-out); animation-timeline: view(); animation-range: entry 10% entry 70%; }
    .split-photo { animation: unclip both var(--ease-out); animation-timeline: view(); animation-range: entry 0% cover 40%; }
    .steps li::after { animation: draw both var(--ease-out); animation-timeline: view(); animation-range: entry 20% entry 90%; }
    /* Páginas interiores, al hacer scroll */
    .read-progress { animation: progress linear both; animation-timeline: scroll(root); }
    .page-hero-photo img { animation: settle-in 1700ms var(--ease-out) 260ms backwards, parallax linear both; animation-timeline: auto, scroll(root); animation-range: normal, 0 120vh; }
    .split--text h2, .navarra h2, .faq-wrap h2, .where h2, .contact-grid h2, .isd-section h2, .isd-refs h2, .cta-copy h2 { animation: title-in both var(--ease-out); animation-timeline: view(); animation-range: entry 10% entry 70%; }
    .navarra { animation: wipe both var(--ease-in-out); animation-timeline: view(); animation-range: entry 0% cover 35%; }
    .group::before { animation: draw both var(--ease-out); animation-timeline: view(); animation-range: entry 30% entry 100%; }
    .ticks li, .isd-table tbody tr, .isd-list li, .isd-toc li { animation: row-in both var(--ease-out); animation-timeline: view(); animation-range: entry 0% entry 70%; }
    .isd-note, .isd-table, .isd-refs, .sub-card { animation: rise-soft both var(--ease-out); animation-timeline: view(); animation-range: entry 0% entry 55%; }
    .map-pin { animation: pin-drop both linear; animation-timeline: view(); animation-range: entry 30% cover 45%; }
    .area-row, .section-head p, .split > :not(.split-photo), .area-card, .why-grid li, .online-list li, .meet, .steps li, .person, .group, .faq details, .docs li, .post-item, .mode, .notice, .situations, .cta-form, .contact-list li, .where-map {
      animation: rise-soft both var(--ease-out);
      animation-timeline: view();
      animation-range: entry 0% entry 55%;
    }
    .area-rows > :nth-child(2n), .area-grid > :nth-child(3n+2), .why-grid > :nth-child(4n+2), .steps > :nth-child(2), .groups > :nth-child(2), .docs > :nth-child(2n), .team-grid > :nth-child(2) { animation-range: entry 6% entry 61%; }
    .area-grid > :nth-child(3n), .why-grid > :nth-child(4n+3), .steps > :nth-child(3), .groups > :nth-child(3) { animation-range: entry 12% entry 67%; }
    .why-grid > :nth-child(4n), .steps > :nth-child(4), .groups > :nth-child(4) { animation-range: entry 18% entry 73%; }
    .steps > :nth-child(5) { animation-range: entry 24% entry 79%; }
  }
}
@media (prefers-reduced-motion: no-preference) and (min-width: 760px) {
  @supports (animation-timeline: view()) {
    .area-row, .section-head p, .split > :not(.split-photo), .area-card, .why-grid li, .online-list li, .meet, .steps li, .person, .group, .faq details, .docs li, .post-item, .mode, .notice, .situations, .cta-form, .contact-list li, .where-map { animation-name: rise; }
  }
}
@media (prefers-reduced-motion: reduce) {
  .hero-copy > *, .page-hero-copy > *, .page-hero-photo { animation: fade 300ms ease backwards; }
  .read-progress { display: none; }
  .marquee-track { flex-wrap: wrap; width: auto; justify-content: center; padding: 0 16px; }
  .marquee-track > :nth-child(n+8) { display: none; }
}

@media (prefers-reduced-motion: no-preference) and (min-width: 900px) {
  @supports (animation-timeline: view()) {
    .how--story .steps--story li { animation: step-focus linear both; animation-timeline: view(); animation-range: cover 5% cover 95%; }
    .how--story .steps--story li::after { animation: none; }
    .how-track > span { animation: track-fill linear both; animation-timeline: --how; animation-range: contain 0% contain 100%; }
  }
}

@media (prefers-reduced-motion: no-preference) and (min-width: 900px) {
  @supports (animation-timeline: scroll()) {
    .hero-copy h1 .line:nth-child(1) { animation: split-left linear both; animation-timeline: scroll(root); animation-range: 0 75vh; }
    .hero-copy h1 .line:nth-child(2) { animation: split-right linear both; animation-timeline: scroll(root); animation-range: 0 75vh; }
    .hero-copy > :not(h1) { animation: rise 700ms var(--ease-out) backwards, hero-fade linear both; animation-timeline: auto, scroll(root); animation-range: normal, 10vh 65vh; }
    .hero-copy > :nth-child(2) { animation-delay: 280ms, 0s; }
    .hero-copy > :nth-child(3) { animation-delay: 350ms, 0s; }
    .hero-copy > :nth-child(4) { animation-delay: 420ms, 0s; }
  }
}
@keyframes split-left { to { translate: -9% 0; opacity: 0.15; } }
@keyframes split-right { to { translate: 9% 0; opacity: 0.15; } }
@keyframes hero-fade { to { opacity: 0; translate: 0 -24px; } }
@media (min-width: 1000px) and (max-height: 760px) and (prefers-reduced-motion: no-preference) {
  @supports (animation-timeline: view()) {
    .rail-head .lead { display: none; }
    .rail-photo { aspect-ratio: 2 / 1; }
  }
}
