/* ==========================================================================
   Asesoría Torres Mayans — Sistema de diseño y estilos corporativos
   Colores corporativos acordes al logotipo oficial:
   Azul petróleo (#115272) · Carbón (#1A2024) · Blanco (#FFFFFF)
   Máxima legibilidad, tipografía nítida y diseño 100% responsive.
   ========================================================================== */

/* ---------- Fuente Inter autoalojada ---------- */
@font-face {
  font-family: 'Inter';
  src: url('/assets/fonts/inter-latin-var.woff2') format('woff2');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

/* ---------- Tokens de diseño ---------- */
:root {
  /* Paleta cromática corporativa — extraída del logotipo oficial */
  --bg: #ffffff;
  --surface: #ffffff;
  --surface-alt: #f8fafc;
  --fg: #1a2024;           /* Texto principal de alto contraste (15:1) */
  --fg-muted: #4a5560;     /* Texto secundario claro y legible (6.5:1) */
  --fg-subtle: #68737d;    /* Etiquetas y notas al pie (4.8:1) */
  --line: #e2e8f0;         /* Líneas divisorias suaves */
  --line-strong: #cbd5e1;  /* Bordes de campos y tarjetas */
  --accent: #115272;       /* Azul petróleo institucional */
  --accent-hover: #0c3f59; /* Azul petróleo oscuro para interacción */
  --accent-tint: #f0f6f9;  /* Fondo suave azulado */
  --accent-line: #c2d8e3;  /* Borde suave de contraste */
  --on-accent: #ffffff;    /* Texto sobre color primario */
  --on-accent-muted: #d3e6ee;
  --danger: #991b1b;
  --danger-tint: #fef2f2;
  --success: #166534;
  --success-tint: #f0fdf4;
  --focus: #115272;

  /* Tipografía orientada a máxima legibilidad universal */
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --font-serif: Georgia, Cambria, 'Times New Roman', Times, serif;

  --text-xs: 0.8125rem;
  --text-sm: 0.9375rem;
  --text-base: 1.0625rem;
  --text-lg: 1.1875rem;
  --text-xl: clamp(1.25rem, 1.15rem + 0.5vw, 1.45rem);
  --h4: clamp(1.25rem, 1.15rem + 0.4vw, 1.45rem);
  --h3: clamp(1.45rem, 1.25rem + 0.8vw, 1.85rem);
  --h2: clamp(1.85rem, 1.4rem + 1.8vw, 2.65rem);
  --h1: clamp(1.95rem, 1.35rem + 2.5vw, 3.4rem);
  --leading: 1.68;

  /* Retícula y espaciados */
  --gutter: clamp(1rem, 0.6rem + 1.6vw, 2rem);
  --pad-x: clamp(1.25rem, 0.5rem + 3vw, 3rem);
  --section: clamp(4rem, 2.5rem + 6vw, 7.5rem);
  --maxw: 1240px;
  --radius: 8px;
  --radius-lg: 12px;
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.06), 0 1px 2px rgba(0, 0, 0, 0.04);
  --shadow-md: 0 4px 6px -1px rgba(17, 82, 114, 0.08), 0 2px 4px -2px rgba(17, 82, 114, 0.06);
  --shadow-card: 0 2px 8px rgba(17, 82, 114, 0.06), 0 0 1px rgba(0, 0, 0, 0.1);
  --ease: cubic-bezier(0.2, 0.65, 0.3, 1);
}

/* ---------- Reset & Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 5.5rem; }
body {
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-sans);
  font-size: var(--text-base);
  line-height: var(--leading);
  font-feature-settings: 'cv02', 'cv03', 'cv04', 'cv11';
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, svg { display: block; max-width: 100%; }
.icon { flex-shrink: 0; }
input, button, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 0.2em; }
p, li { text-wrap: pretty; }
h1, h2, h3, h4 { text-wrap: balance; color: var(--fg); font-family: var(--font-sans); font-weight: 700; letter-spacing: -0.02em; line-height: 1.22; }
h1, .display { font-size: var(--h1); line-height: 1.15; }
h2, .h2 { font-size: var(--h2); }
h3, .h3 { font-size: var(--h3); }
h4 { font-size: var(--h4); font-weight: 600; }
h1 em, h2 em, .display em { font-style: normal; color: var(--accent); }

::selection { background: var(--accent); color: var(--on-accent); }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; border-radius: 4px; }
main:focus { outline: none; }

/* ---------- Componentes de texto ---------- */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
}
.eyebrow__rule { width: 1.75rem; height: 2px; background: var(--accent); border-radius: 2px; }
.lead { font-size: var(--text-xl); line-height: 1.62; color: var(--fg-muted); max-width: 42ch; }
.muted { color: var(--fg-muted); }
.small { font-size: var(--text-sm); }

/* ---------- Estructura de página ---------- */
.container { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: var(--pad-x); }
.section { padding-block: var(--section); }
.section--tight { padding-block: calc(var(--section) * 0.6); }
.section--line { border-top: 1px solid var(--line); }
.grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gutter); row-gap: clamp(2rem, 3.5vw, 3.5rem); }
.grid > * { grid-column: 1 / -1; min-width: 0; }

.section-head { margin-bottom: clamp(2.5rem, 5vw, 4.5rem); }
@media (min-width: 960px) {
  .section-head .eyebrow { grid-column: 1 / span 4; align-self: start; }
  .section-head__title { grid-column: 1 / span 8; margin-top: 0.5rem; }
  .section-head__aside { grid-column: 9 / span 4; align-self: end; color: var(--fg-muted); }
}

/* ---------- Botones & Enlaces ---------- */
.btn {
  --_bg: transparent; --_fg: var(--fg); --_bd: var(--line-strong);
  display: inline-flex; align-items: center; justify-content: center; gap: 0.55rem;
  min-height: 3rem; padding: 0.75rem 1.4rem;
  border: 1px solid var(--_bd); border-radius: var(--radius);
  background: var(--_bg); color: var(--_fg);
  font-size: var(--text-sm); font-weight: 600; text-decoration: none; white-space: nowrap;
  transition: all 0.2s ease;
}
.btn:hover { border-color: var(--accent); color: var(--accent); background: var(--accent-tint); }
.btn:active { transform: translateY(1px); }
.btn--primary {
  --_bg: var(--accent); --_fg: var(--on-accent); --_bd: var(--accent);
  box-shadow: 0 2px 4px rgba(17, 82, 114, 0.2);
}
.btn--primary:hover { --_bg: var(--accent-hover); --_fg: var(--on-accent); --_bd: var(--accent-hover); }
.btn--outline { --_bg: var(--surface); --_bd: var(--accent); --_fg: var(--accent); }
.btn--outline:hover { --_bg: var(--accent); --_fg: var(--on-accent); }
.btn--ghost { --_bg: var(--surface); --_bd: var(--line-strong); --_fg: var(--fg); }
.btn--ghost:hover { border-color: var(--accent); color: var(--accent); }
.btn--light { --_bg: var(--surface); --_fg: var(--accent); --_bd: var(--surface); box-shadow: 0 2px 6px rgba(0,0,0,0.15); }
.btn--light:hover { background: var(--accent-tint); color: var(--accent-hover); }
.btn--sm { min-height: 2.4rem; padding: 0.45rem 1rem; font-size: var(--text-xs); }
.btn[disabled] { opacity: 0.6; pointer-events: none; }

.link-arrow {
  display: inline-flex; align-items: center; gap: 0.45rem;
  font-size: var(--text-sm); font-weight: 600; color: var(--accent); text-decoration: none;
  transition: gap 0.2s ease;
}
.link-arrow:hover { gap: 0.7rem; text-decoration: underline; }
.link-button { background: none; border: 0; padding: 0; font-size: inherit; color: var(--accent); text-decoration: underline; text-underline-offset: 0.2em; }

/* ---------- Accesibilidad ---------- */
.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: 1rem; top: -4rem; z-index: 100;
  background: var(--accent); color: var(--on-accent); padding: 0.75rem 1rem; border-radius: var(--radius); text-decoration: none;
  transition: top 0.2s;
}
.skip-link:focus { top: 1rem; }

/* ---------- Cabecera & Navegación ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
  transition: box-shadow 0.2s ease;
}
.site-header.is-scrolled { box-shadow: var(--shadow-sm); }
.site-header__inner { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; min-height: 5.25rem; }

.brand { display: inline-flex; align-items: center; text-decoration: none; }
.brand__logo {
  display: block;
  height: 52px;
  width: auto;
  max-width: 220px;
  object-fit: contain;
}

.nav { display: flex; align-items: center; gap: 2rem; }
.nav__list { display: flex; gap: 1.75rem; list-style: none; padding: 0; }
.nav__link {
  font-size: var(--text-sm); font-weight: 500; text-decoration: none; color: var(--fg);
  padding-block: 0.5rem; transition: color 0.15s ease;
}
.nav__link:hover, .nav__link[aria-current='page'] { color: var(--accent); font-weight: 600; }

.nav-toggle {
  display: none; background: none; border: 1px solid var(--line-strong); border-radius: var(--radius);
  width: 2.75rem; height: 2.75rem; place-items: center; color: var(--fg);
}
.nav-toggle__close { display: none; }
.nav-toggle[aria-expanded='true'] .nav-toggle__open { display: none; }
.nav-toggle[aria-expanded='true'] .nav-toggle__close { display: block; }

@media (max-width: 920px) {
  .nav-toggle { display: grid; }
  .brand__logo { height: 42px; max-width: 180px; }
  .nav {
    position: fixed; inset: 5.25rem 0 0 0; z-index: 49;
    flex-direction: column; align-items: stretch; gap: 1.5rem;
    padding: 2rem var(--pad-x) 3rem; background: #ffffff; border-top: 1px solid var(--line);
    visibility: hidden; opacity: 0; transform: translateY(-8px);
    transition: opacity 0.2s ease, transform 0.2s ease, visibility 0s linear 0.2s;
    overflow-y: auto;
  }
  .nav.is-open { visibility: visible; opacity: 1; transform: none; transition-delay: 0s; }
  .nav__list { flex-direction: column; gap: 0; }
  .nav__list li { border-bottom: 1px solid var(--line); }
  .nav__link { display: block; padding-block: 1rem; font-size: 1.25rem; font-weight: 600; }
  .nav__cta { align-self: flex-start; margin-top: 0.5rem; }
  body.nav-open { overflow: hidden; }
}

/* ---------- Hero (Inicio) ---------- */
.hero { padding-top: clamp(2.5rem, 2rem + 4vw, 5rem); padding-bottom: clamp(2.5rem, 4vw, 4.5rem); }
.hero__title { max-width: none; }
.hero__body { display: flex; flex-direction: column; gap: 1.75rem; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 0.75rem; }
.hero__meta {
  display: flex; flex-wrap: wrap; gap: 1.25rem 2rem; padding-top: 1.5rem;
  border-top: 1px solid var(--line); font-size: var(--text-sm); color: var(--fg-muted);
}
.hero__meta li { display: flex; align-items: center; gap: 0.55rem; list-style: none; font-weight: 500; }
.hero__meta .icon { color: var(--accent); }
.hero__meta ul { display: contents; }

@media (min-width: 960px) {
  .hero__title { grid-column: 1 / span 7; }
  .hero__body { grid-column: 8 / span 5; }
}

/* Tarjeta destacada 60 años en hero */
.experience-banner {
  background: var(--accent-tint);
  border: 1px solid var(--accent-line);
  border-radius: var(--radius-lg);
  padding: clamp(1.5rem, 3vw, 2.5rem);
  display: grid;
  gap: 1.5rem;
  margin-bottom: var(--section);
}
@media (min-width: 768px) {
  .experience-banner { grid-template-columns: auto 1fr auto; align-items: center; gap: 2rem; }
}
.experience-banner__badge {
  font-size: 2.75rem;
  font-weight: 800;
  color: var(--accent);
  line-height: 1;
}
.experience-banner__badge small { font-size: 1rem; font-weight: 600; display: block; color: var(--fg-muted); }
.experience-banner__text h3 { font-size: var(--text-lg); margin-bottom: 0.35rem; }
.experience-banner__text p { color: var(--fg-muted); font-size: var(--text-sm); }

/* ---------- Tarjetas de servicio ---------- */
.service-card {
  display: flex; flex-direction: column; gap: 1.5rem;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg);
  padding: clamp(1.5rem, 1.25rem + 2vw, 2.5rem);
  box-shadow: var(--shadow-card);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.service-card:hover { border-color: var(--accent); box-shadow: var(--shadow-md); }
.service-card__top { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.service-card__tag { font-size: var(--text-xs); font-weight: 600; color: var(--accent); text-transform: uppercase; letter-spacing: 0.06em; }
.service-card__icon {
  display: grid; place-items: center; width: 3rem; height: 3rem;
  background: var(--accent-tint); border-radius: var(--radius); color: var(--accent);
}
.service-card p { color: var(--fg-muted); font-size: var(--text-base); }
.check-list { list-style: none; padding: 0; display: grid; gap: 0.75rem; }
.check-list li { display: flex; gap: 0.65rem; align-items: flex-start; font-size: var(--text-sm); line-height: 1.55; }
.check-list .icon { color: var(--accent); margin-top: 0.2rem; }
@media (min-width: 960px) {
  .service-card--a { grid-column: 1 / span 6; }
  .service-card--b { grid-column: 7 / span 6; }
}

/* ---------- Audiencias / Sectores ---------- */
.audience-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  box-shadow: var(--shadow-card);
}
.audience-card__icon { color: var(--accent); }
.audience-card h3 { font-size: var(--h4); }
.audience-card p { color: var(--fg-muted); font-size: var(--text-sm); line-height: 1.6; }
@media (min-width: 768px) {
  .audience-card:nth-child(1) { grid-column: 1 / span 4; }
  .audience-card:nth-child(2) { grid-column: 5 / span 4; }
  .audience-card:nth-child(3) { grid-column: 9 / span 4; }
}

/* ---------- Prueba social ---------- */
.rating-card {
  background: var(--accent-tint); border: 1px solid var(--accent-line); border-radius: var(--radius-lg);
  padding: 2.25rem; display: flex; flex-direction: column; gap: 1rem;
}
.rating-card__number { font-size: 3.5rem; font-weight: 800; color: var(--accent); line-height: 1; }
.rating-card__number small { font-size: 1.25rem; color: var(--fg-muted); font-weight: 500; }
.stars { display: flex; gap: 0.25rem; color: #d97706; }
.stars .star--full .icon { fill: currentColor; }
.stars .star--part { position: relative; }
.stars .star--part .star__fill { position: absolute; inset: 0; width: 20%; overflow: hidden; }
.stars .star--part .star__fill .icon { fill: currentColor; }
@media (min-width: 960px) {
  .rating-card { grid-column: 1 / span 5; }
  .rating-benefits { grid-column: 6 / -1; }
}
.rating-benefits { list-style: none; padding: 0; display: grid; gap: 1.25rem; }
.rating-benefits li {
  display: flex; gap: 1.25rem; padding: 1.25rem; border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--surface); box-shadow: var(--shadow-card);
}
.rating-benefits .icon { color: var(--accent); margin-top: 0.2rem; }
.rating-benefits h3 { font-size: var(--text-base); margin-bottom: 0.25rem; }
.rating-benefits p { color: var(--fg-muted); font-size: var(--text-sm); }

/* ---------- Banda de contacto / llamada ---------- */
.cta-band {
  background: var(--accent); color: var(--on-accent); border-radius: var(--radius-lg);
  padding: clamp(2rem, 1.5rem + 4vw, 4.5rem);
  box-shadow: var(--shadow-md);
}
.cta-band h2 { color: var(--on-accent); }
.cta-band p { color: var(--on-accent-muted); max-width: 48ch; font-size: var(--text-base); }
.cta-band__actions { display: flex; flex-wrap: wrap; gap: 1rem 1.5rem; align-items: center; margin-top: 1.5rem; }
.cta-band__phone {
  display: inline-flex; align-items: center; gap: 0.5rem; color: var(--on-accent);
  text-decoration: none; font-size: var(--text-base); font-weight: 600;
}
.cta-band__phone:hover { text-decoration: underline; }

/* ---------- Páginas interiores ---------- */
.page-hero {
  padding-top: clamp(2.5rem, 2rem + 3vw, 4.5rem);
  padding-bottom: clamp(2rem, 3vw, 3.5rem);
  border-bottom: 1px solid var(--line);
  background: var(--surface-alt);
}
.page-hero .eyebrow { margin-bottom: 0.75rem; }
.page-hero__title { font-size: clamp(1.85rem, 1.35rem + 2.2vw, 3.1rem); max-width: 36ch; }
.page-hero__lead { margin-top: 1rem; max-width: 65ch; }

/* ---------- Quiénes somos ---------- */
.about-history {
  display: grid; gap: 2rem;
}
@media (min-width: 960px) {
  .about-history { grid-template-columns: 1fr 1fr; align-items: start; }
}
.about-history__card {
  background: var(--accent-tint); border: 1px solid var(--accent-line); border-radius: var(--radius-lg);
  padding: 2.5rem; display: flex; flex-direction: column; gap: 1.25rem;
}
.about-history__card h3 { color: var(--accent); font-size: 1.75rem; }
.about-history__card p { color: var(--fg); font-size: var(--text-base); line-height: 1.7; }

/* Mapa interactivo visible directamente */
.map-card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg);
  overflow: hidden; box-shadow: var(--shadow-card);
}
.map-card__head {
  padding: 1.25rem 1.5rem; background: var(--surface-alt); border-bottom: 1px solid var(--line);
  display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 1rem;
}
.map-card__head h3 { font-size: var(--text-base); display: flex; align-items: center; gap: 0.5rem; }
.map-card__head .icon { color: var(--accent); }
.map-frame-wrap {
  position: relative; width: 100%; aspect-ratio: 16 / 9; min-height: 320px;
}
.map-frame-wrap iframe {
  position: absolute; inset: 0; width: 100%; height: 100%; border: 0;
}
.map-card__foot {
  padding: 1rem 1.5rem; background: var(--surface); display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 0.75rem; font-size: var(--text-sm);
}

/* ---------- Servicios detallados ---------- */
.svc-layout { align-items: start; }
.svc-index { display: none; }
@media (min-width: 960px) {
  .svc-index { display: block; grid-column: 1 / span 3; position: sticky; top: 6.5rem; }
  .svc-content { grid-column: 4 / -1; }
}
.svc-index ol { list-style: none; padding: 0; border-left: 2px solid var(--line); }
.svc-index a {
  display: block; padding: 0.5rem 0 0.5rem 1.25rem; margin-left: -2px; border-left: 2px solid transparent;
  text-decoration: none; font-size: var(--text-sm); font-weight: 500; color: var(--fg-muted);
}
.svc-index a:hover, .svc-index a.is-active { color: var(--accent); border-left-color: var(--accent); font-weight: 600; }

.svc-area + .svc-area { margin-top: var(--section); padding-top: var(--section); border-top: 1px solid var(--line); }
.svc-area__head { margin-bottom: 2.5rem; }
.svc-area__head h2 { font-size: var(--h2); margin-top: 0.5rem; margin-bottom: 0.75rem; }
.svc-area__head p { color: var(--fg-muted); font-size: var(--text-lg); max-width: 62ch; }

.svc-list { list-style: none; padding: 0; display: grid; gap: 1.5rem; }
.svc-item {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg);
  padding: 1.75rem; box-shadow: var(--shadow-card);
}
.svc-item__title { display: flex; gap: 0.85rem; align-items: center; margin-bottom: 0.75rem; }
.svc-item__title .icon { color: var(--accent); }
.svc-item__title h3 { font-size: var(--h4); }
.svc-item__body p { color: var(--fg-muted); font-size: var(--text-base); margin-bottom: 0.75rem; }
.svc-item__body ul { padding-left: 1.25rem; display: grid; gap: 0.35rem; font-size: var(--text-sm); color: var(--fg); }
.svc-item__body li::marker { color: var(--accent); }

/* FAQ */
.faq { border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary {
  list-style: none; cursor: pointer; display: flex; justify-content: space-between; gap: 1.5rem; align-items: center;
  padding-block: 1.25rem; font-size: var(--text-lg); font-weight: 600; color: var(--fg);
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary .icon { color: var(--accent); transition: transform 0.2s ease; }
.faq details[open] summary .icon { transform: rotate(45deg); }
.faq details p { padding-bottom: 1.25rem; color: var(--fg-muted); font-size: var(--text-base); max-width: 64ch; }
@media (min-width: 960px) { .faq { grid-column: 4 / -1; } }

/* ---------- Contacto ---------- */
.contact-layout { align-items: start; }
@media (min-width: 1024px) {
  .contact-form-wrap { grid-column: 1 / span 7; }
  .contact-aside { grid-column: 8 / -1; }
}
.form-card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg);
  padding: clamp(1.5rem, 1rem + 2.5vw, 2.75rem); box-shadow: var(--shadow-card);
}
.form-card__head { margin-bottom: 2rem; display: grid; gap: 0.5rem; }
.form-card__head p { color: var(--fg-muted); font-size: var(--text-base); }
.form-grid { display: grid; grid-template-columns: 1fr; gap: 1.25rem; }
@media (min-width: 640px) {
  .form-grid { grid-template-columns: 1fr 1fr; }
  .field--full { grid-column: 1 / -1; }
}
.field { display: flex; flex-direction: column; gap: 0.4rem; }
.field label { font-size: var(--text-sm); font-weight: 600; color: var(--fg); }
.field .req { color: var(--danger); margin-left: 0.15rem; }
.field__hint { font-size: var(--text-xs); color: var(--fg-subtle); }
.input, .select, .textarea {
  width: 100%; min-height: 2.85rem; padding: 0.65rem 0.85rem;
  background: #ffffff; border: 1px solid var(--line-strong); border-radius: var(--radius);
  font-size: 1rem; line-height: 1.4; color: var(--fg);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.input:hover, .select:hover, .textarea:hover { border-color: var(--accent); }
.input:focus, .select:focus, .textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(17, 82, 114, 0.15); }
.textarea { min-height: 7.5rem; resize: vertical; }
.select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23115272' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 0.85rem center; padding-right: 2.5rem;
}
.field[data-invalid] .input, .field[data-invalid] .select, .field[data-invalid] .textarea { border-color: var(--danger); background: var(--danger-tint); }
.field__error { display: none; align-items: center; gap: 0.35rem; font-size: var(--text-xs); color: var(--danger); }
.field[data-invalid] .field__error { display: flex; }

.hp { position: absolute !important; left: -10000px !important; top: auto; width: 1px; height: 1px; overflow: hidden; }

.check { display: grid; grid-template-columns: auto 1fr; gap: 0.65rem; align-items: start; font-size: var(--text-sm); line-height: 1.5; }
.check input { width: 1.2rem; height: 1.2rem; margin-top: 0.15rem; accent-color: var(--accent); }
.check label { font-weight: normal; color: var(--fg); }
.check a { color: var(--accent); font-weight: 600; }

.form-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem 1.5rem; margin-top: 0.75rem; }
.form-actions .small { color: var(--fg-subtle); display: inline-flex; align-items: center; gap: 0.35rem; }
.spin { animation: spin 0.9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.btn .spin { display: none; }
.btn.is-loading .spin { display: block; }
.btn.is-loading .icon:not(.spin) { display: none; }

.form-status { display: none; gap: 0.65rem; align-items: flex-start; padding: 1rem 1.25rem; border-radius: var(--radius); font-size: var(--text-sm); border: 1px solid; margin-bottom: 1.25rem; }
.form-status:not(:empty) { display: flex; }
.form-status--ok { background: var(--success-tint); border-color: #bbf7d0; color: var(--success); }
.form-status--error { background: var(--danger-tint); border-color: #fecaca; color: var(--danger); }

.info-layer { margin-top: 1.75rem; border-top: 1px solid var(--line); padding-top: 1.25rem; font-size: var(--text-xs); color: var(--fg-subtle); line-height: 1.6; }
.info-layer h3 { font-size: var(--text-xs); text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 0.5rem; color: var(--fg); }
.info-layer dl { display: grid; grid-template-columns: max-content 1fr; gap: 0.25rem 0.75rem; }
.info-layer dt { font-weight: 600; color: var(--fg); }

/* Barra lateral de contacto */
.contact-aside { display: flex; flex-direction: column; gap: 2rem; }
.contact-info-card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg);
  padding: 1.75rem; display: flex; flex-direction: column; gap: 1.5rem; box-shadow: var(--shadow-card);
}
.contact-block { display: flex; flex-direction: column; gap: 0.35rem; }
.contact-block__title { font-size: var(--text-xs); text-transform: uppercase; letter-spacing: 0.08em; color: var(--accent); font-weight: 700; }
.contact-line { display: inline-flex; align-items: center; gap: 0.65rem; text-decoration: none; font-size: var(--text-lg); font-weight: 600; color: var(--fg); }
.contact-line:hover { color: var(--accent); }
.contact-line .icon { color: var(--accent); }
.contact-block address { font-style: normal; color: var(--fg-muted); font-size: var(--text-sm); line-height: 1.6; }

.hours { width: 100%; border-collapse: collapse; font-size: var(--text-sm); }
.hours th, .hours td { text-align: left; padding: 0.6rem 0; border-bottom: 1px solid var(--line); vertical-align: top; }
.hours th { font-weight: 600; color: var(--fg); padding-right: 1rem; }
.hours td { color: var(--fg-muted); text-align: right; }
.hours tr.is-today th, .hours tr.is-today td { color: var(--accent); font-weight: 700; }

/* ---------- Páginas legales ---------- */
.legal-layout { align-items: start; }
.legal-toc { display: none; }
@media (min-width: 1024px) {
  .legal-toc { display: block; grid-column: 1 / span 3; position: sticky; top: 6.5rem; font-size: var(--text-sm); }
  .prose { grid-column: 4 / -1; }
}
.legal-toc ol { list-style: none; padding: 0; border-left: 2px solid var(--line); display: grid; gap: 0.25rem; }
.legal-toc a { display: block; padding: 0.35rem 0 0.35rem 1rem; text-decoration: none; color: var(--fg-muted); border-left: 2px solid transparent; margin-left: -2px; }
.legal-toc a:hover { color: var(--accent); border-left-color: var(--accent); font-weight: 600; }

.prose { max-width: 72ch; color: var(--fg-muted); font-size: var(--text-base); }
.prose > * + * { margin-top: 1.25em; }
.prose h2 { font-size: var(--h3); color: var(--fg); margin-top: 2.5em; padding-top: 1.25rem; border-top: 1px solid var(--line); scroll-margin-top: 6.5rem; }
.prose h2:first-child { margin-top: 0; border-top: 0; padding-top: 0; }
.prose h3 { font-size: var(--h4); color: var(--fg); margin-top: 1.5em; }
.prose strong { color: var(--fg); font-weight: 600; }
.prose ul, .prose ol { padding-left: 1.25rem; display: grid; gap: 0.4rem; }
.prose li::marker { color: var(--accent); }
.prose a { color: var(--accent); font-weight: 600; }

.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); margin-block: 1rem; }
.prose table { width: 100%; border-collapse: collapse; font-size: var(--text-sm); }
.prose th, .prose td { text-align: left; padding: 0.75rem 1rem; border-bottom: 1px solid var(--line); vertical-align: top; }
.prose th { color: var(--fg); font-weight: 600; background: var(--surface-alt); }
.prose tr:last-child td { border-bottom: 0; }
.legal-meta { font-size: var(--text-sm); color: var(--fg-subtle); }

/* ---------- 404 ---------- */
.notfound { min-height: 55vh; display: flex; flex-direction: column; justify-content: center; gap: 1.5rem; }

/* ---------- Pie de página ---------- */
.site-footer {
  background: var(--surface-alt); border-top: 1px solid var(--line);
  padding-top: clamp(3.5rem, 6vw, 5.5rem); padding-bottom: 2rem; margin-top: var(--section);
}
.footer-grid { display: grid; gap: 2.5rem var(--gutter); grid-template-columns: 1fr; }
.footer-grid > * { min-width: 0; }
.footer-col { min-width: 0; }
.footer-grid__lead { display: flex; flex-direction: column; gap: 1.25rem; align-items: flex-start; }
.footer-statement { font-size: clamp(1.4rem, 1.1rem + 1vw, 1.85rem); font-weight: 700; color: var(--fg); line-height: 1.25; }
.footer-experience { font-size: var(--text-sm); color: var(--fg-muted); line-height: 1.6; max-width: 40ch; }
.footer-col__title { font-size: var(--text-xs); font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--accent); margin-bottom: 0.75rem; }
.footer-address { font-style: normal; font-size: var(--text-sm); color: var(--fg-muted); line-height: 1.65; }
.footer-list { list-style: none; padding: 0; display: grid; gap: 0.65rem; font-size: var(--text-sm); }
.footer-list li { min-width: 0; }
.footer-list a {
  display: inline-flex; gap: 0.5rem; align-items: center; text-decoration: none;
  color: var(--fg); font-weight: 500; white-space: nowrap;
}
.footer-list a:hover { color: var(--accent); text-decoration: underline; }
.footer-list a .icon { flex-shrink: 0; }
.footer-email-text { white-space: nowrap; word-break: keep-all; overflow-wrap: normal; }
.footer-hours { display: grid; gap: 0.5rem; font-size: var(--text-sm); }
.footer-hours dt { color: var(--fg); font-weight: 600; }
.footer-hours dd { color: var(--fg-muted); margin: 0; }
.footer-bottom {
  margin-top: clamp(2.5rem, 4vw, 4rem); padding-top: 1.25rem; border-top: 1px solid var(--line);
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1rem 2rem; font-size: var(--text-xs); color: var(--fg-subtle);
}
.footer-legal { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 0.5rem 1.5rem; }
.footer-legal a, .footer-legal .link-button { color: var(--fg-muted); text-decoration: none; font-size: var(--text-xs); }
.footer-legal a:hover, .footer-legal .link-button:hover { color: var(--accent); text-decoration: underline; }

@media (min-width: 640px) and (max-width: 1099px) {
  .footer-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 2.5rem 2.5rem;
  }
  .footer-grid__lead {
    grid-column: 1 / -1;
    max-width: 55ch;
  }
}

@media (min-width: 1100px) {
  .footer-grid {
    grid-template-columns: 1.6fr 1fr max-content 1.2fr;
    column-gap: clamp(2rem, 3vw, 3.5rem);
    row-gap: 2rem;
    align-items: start;
  }
  .footer-grid__lead {
    grid-column: auto;
  }
  .footer-col {
    grid-column: auto;
  }
}

/* ---------- Banner de cookies ---------- */
.cookie {
  position: fixed; z-index: 90; left: 50%; bottom: clamp(0.75rem, 2vw, 1.5rem);
  width: min(100% - 1.5rem, 44rem); transform: translateX(-50%);
  background: #ffffff; border: 1px solid var(--line-strong); border-radius: var(--radius-lg);
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.15), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
  animation: cookie-in 0.3s ease both;
}
.cookie[hidden] { display: none; }
@keyframes cookie-in { from { opacity: 0; transform: translate(-50%, 10px); } }
.cookie__inner { padding: 1.5rem; display: grid; gap: 1rem; max-height: calc(100dvh - 2rem); overflow-y: auto; }
.cookie__head { display: grid; grid-template-columns: auto 1fr; gap: 0.85rem; align-items: start; }
.cookie__icon { display: grid; place-items: center; width: 2.25rem; height: 2.25rem; background: var(--accent-tint); border-radius: var(--radius); color: var(--accent); }
.cookie__title { font-size: 1.15rem; margin-bottom: 0.25rem; }
.cookie__desc { font-size: var(--text-sm); color: var(--fg-muted); line-height: 1.55; }
.cookie__desc a { color: var(--accent); font-weight: 600; }
.cookie__prefs fieldset { border: 0; padding: 0; display: grid; gap: 0.65rem; }
.cookie__option { display: grid; grid-template-columns: auto 1fr; gap: 0.75rem; align-items: start; padding: 0.75rem 0.85rem; border: 1px solid var(--line); border-radius: var(--radius); }
.cookie__option input { width: 1.1rem; height: 1.1rem; margin-top: 0.2rem; accent-color: var(--accent); }
.cookie__option label { display: grid; gap: 0.15rem; font-size: var(--text-sm); }
.cookie__option label span { color: var(--fg-muted); font-size: var(--text-xs); line-height: 1.45; }
.cookie__actions { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: 0.5rem; }

/* Micro-animación sutil */
.reveal { transition: opacity 0.6s ease, transform 0.6s ease; }
.reveal.is-pending { opacity: 0; transform: translateY(14px); }
.reveal[data-delay='1'] { transition-delay: 0.08s; }
.reveal[data-delay='2'] { transition-delay: 0.16s; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
  .reveal.is-pending { opacity: 1; transform: none; }
}

@media print {
  .site-header, .cookie, .site-footer .btn, .nav-toggle, .skip-link { display: none !important; }
  body { background: #fff; }
  .reveal.is-pending { opacity: 1; transform: none; }
}
