/* ============================================================
   CAC Abogados: hoja de estilos única del sitio.
   Escala de letra: 14 16 19 24 32 44 64 84. Radios: 12, 24 y píldora.
   Pesos: 800 solo en h1, h2 y cifras; 700 en el resto de títulos y botones.
   Un solo naranja (#D13D1F). Azul de marca #034EA2 dominante; navy solo en el pie.
   ============================================================ */
@font-face { font-family: "Satoshi"; src: url("fonts/Satoshi-Variable.woff2") format("woff2"); font-weight: 300 900; font-display: swap; }

:root {
  color-scheme: light;
  --t-14: 0.875rem; --t-16: 1rem; --t-19: 1.1875rem; --t-24: 1.5rem; --t-32: 2rem; --t-44: 2.75rem; --t-64: 4rem; --t-84: 5.25rem;
  --r-s: 12px; --r-l: 24px; --r-pill: 999px;
  --s-1: 4px; --s-2: 8px; --s-3: 12px; --s-4: 16px; --s-5: 24px; --s-6: 32px; --s-7: 48px; --s-8: 64px; --s-9: 96px; --s-10: 128px;

  --blue: #034ea2;
  --blue-dark: #033f82;
  --navy: #021f45;
  --orange: #d13d1f;
  --orange-dark: #ad3017;
  --page: #ffffff;
  --tint: #eef4fb;
  --card: #ffffff;
  --ink: #021f45;
  --text: #2f3742;
  --muted: #56606e;
  --line: #d5dce6;
  --control: #7c8797;
  --link: #034ea2;
  --focus: #034ea2;
  --danger: #b3261e;
  --ok: #0b6534;
  --scrim: rgb(2 31 69 / 0.5);
  --shadow: 0 16px 40px -18px rgb(2 31 69 / 0.28);

  --font: "Satoshi", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-drawer: cubic-bezier(0.32, 0.72, 0, 1);
  --wrap: 1280px;
  --gutter: 16px;
  --tap: 44px;
  --header-h: 72px;
}
@media (min-width: 768px) { :root { --gutter: 40px; } }

/* Modo oscuro opcional: mismo carácter, teñido de navy (no gris) */
:root[data-theme="dark"] {
  color-scheme: dark;
  --page: #071427; --tint: #0d1f3a; --card: #0f2342;
  --ink: #f2f6fb; --text: #cdd7e4; --muted: #a3b1c4; --line: #26395a; --control: #7f93b3;
  --link: #8fbcf2; --focus: #8fbcf2; --danger: #ff9d94; --ok: #6fd69a;
  --blue: #1f5fb5; --blue-dark: #2a6dc6;
  --scrim: rgb(0 0 0 / 0.6);
  --shadow: 0 16px 40px -18px rgb(0 0 0 / 0.6);
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--header-h) + 16px); }
body { margin: 0; min-height: 100dvh; display: flex; flex-direction: column; background: var(--page); color: var(--text); font-family: var(--font); font-size: var(--t-16); line-height: 1.6; font-weight: 500; text-wrap: pretty; -webkit-font-smoothing: antialiased; overflow-x: clip; }
main { flex: 1; }
img, svg { display: block; max-width: 100%; }
h1, h2, h3, h4, p, figure, dl, dd, ul, ol { margin: 0; }
ul, ol { padding: 0; list-style: none; }
address { font-style: normal; }
a { color: var(--link); text-decoration: none; text-underline-offset: 3px; }
@media (hover: hover) and (pointer: fine) { a:hover { text-decoration: underline; } }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; }
.on-blue :focus-visible, .footer :focus-visible { outline-color: #fff; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.nowrap { white-space: nowrap; }
.skip { position: absolute; left: 16px; top: -80px; z-index: 100; padding: 12px 16px; border-radius: var(--r-s); background: var(--blue); color: #fff; font-weight: 700; transition: top 200ms var(--ease); }
.skip:focus { top: 16px; }

.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gutter); }
.section { padding-block: clamp(var(--s-8), 9vw, var(--s-10)); }
.section--tint { background: var(--tint); --ring: var(--tint); }
.section:not(.section--tint) + .section:not(.section--tint) { padding-top: 0; }
.phero + .section:not(.section--tint) { padding-top: var(--s-7); }
.section--flush { padding-top: 0; }

/* ---------- Tipografía ---------- */
.h1 { font-size: clamp(var(--t-32), 0.9rem + 4.6vw, var(--t-64)); line-height: 1.02; letter-spacing: -0.045em; font-weight: 800; color: var(--ink); text-wrap: balance; }
.h2 { font-size: clamp(1.625rem, 0.6rem + 2.4vw, var(--t-44)); line-height: 1.06; letter-spacing: -0.04em; font-weight: 800; color: var(--ink); text-wrap: balance; max-width: 20ch; }
.h3 { font-size: var(--t-24); line-height: 1.15; letter-spacing: -0.025em; font-weight: 700; color: var(--ink); }
.h4 { font-size: var(--t-19); line-height: 1.25; letter-spacing: -0.015em; font-weight: 700; color: var(--ink); }
.lead { font-size: var(--t-19); line-height: 1.5; color: var(--text); max-width: 36rem; text-wrap: pretty; }
.small { font-size: var(--t-14); }
.muted { color: var(--muted); }
.stack > * + * { margin-top: var(--s-4); }
.head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: var(--s-5); margin-bottom: var(--s-7); }
.head .lead { margin-top: var(--s-4); }

/* ---------- Botones ---------- */
.btn {
  --bg: var(--blue); --fg: #fff; --bd: var(--blue); --hover: var(--blue-dark);
  display: inline-flex; align-items: center; justify-content: center; gap: var(--s-2);
  min-height: 56px; padding: 0 var(--s-6); border-radius: var(--r-pill); border: 1.5px solid var(--bd);
  background: var(--bg); color: var(--fg); font-size: var(--t-16); font-weight: 700; letter-spacing: -0.005em; line-height: 1.1; white-space: nowrap;
  cursor: pointer; -webkit-tap-highlight-color: transparent;
  transition: transform 140ms var(--ease), background-color 160ms ease, border-color 160ms ease, color 160ms ease;
}
.btn:hover { text-decoration: none; }
.btn:active { transform: scale(0.97); }
.btn svg { flex: none; width: 20px; height: 20px; transition: transform 240ms var(--ease); }
.btn--accent { --bg: var(--orange); --bd: var(--orange); --hover: var(--orange-dark); }
.btn--secondary { --bg: transparent; --fg: var(--link); --bd: var(--line); --hover: var(--tint); }
.btn--light { --bg: #fff; --fg: #021f45; --bd: #fff; --hover: #dfeaf8; }
.btn--sm { min-height: 48px; padding: 0 var(--s-5); }
.btn--block { display: flex; width: 100%; }
@media (hover: hover) and (pointer: fine) {
  .btn:hover { background: var(--hover); border-color: var(--hover); }
  .btn--secondary:hover { border-color: var(--link); }
  .btn--go:hover svg { transform: translateX(4px); }
}
.link-go { display: inline-flex; align-items: center; gap: var(--s-2); min-height: var(--tap); font-weight: 700; }
.link-go--wa { color: var(--ok); }
.link-go--wa svg { width: 22px; height: 22px; }
.link-go svg { flex: none; width: 18px; height: 18px; transition: transform 240ms var(--ease); }
@media (hover: hover) and (pointer: fine) { .link-go:hover { text-decoration: none; } .link-go:hover svg { transform: translateX(4px); } }

/* ---------- Cabecera: barra anclada, sin desenfoque ---------- */
.header { position: sticky; top: 0; z-index: 50; background: var(--page); border-bottom: 1px solid var(--line); view-transition-name: cabecera; }
.header__inner { display: flex; align-items: center; gap: var(--s-5); min-height: 72px; }
/* Sombra bajo la cabecera al bajar: vive en un ::after y solo cambia su opacidad */
.header::after { content: ""; position: absolute; inset: 100% 0 auto 0; height: 16px; pointer-events: none; background: linear-gradient(rgb(2 31 69 / 0.08), transparent); opacity: 0; transition: opacity 240ms ease; }
.header[data-scrolled="true"]::after { opacity: 1; }
.logo { display: inline-flex; align-items: center; flex: none; min-height: var(--tap); }
.logo img { height: 44px; width: auto; }
.logo .logo--dark { display: none; }
:root[data-theme="dark"] .logo .logo--light { display: none; }
:root[data-theme="dark"] .logo .logo--dark { display: block; }
.nav { display: none; margin-left: auto; }
.nav__list { display: flex; align-items: center; gap: var(--s-1); }
.nav__item { position: relative; }
.nav__link { display: inline-flex; align-items: center; gap: 6px; min-height: var(--tap); padding: 0 14px; border: 0; border-radius: var(--r-pill); background: none; color: var(--ink); font-size: var(--t-16); font-weight: 700; cursor: pointer; white-space: nowrap; transition: background-color 160ms ease, color 160ms ease; }
.nav__link svg { width: 16px; height: 16px; transition: transform 200ms var(--ease); }
.nav__link[aria-expanded="true"] svg { transform: rotate(180deg); }
.nav__link[aria-current="page"], .nav__link[data-current="true"] { color: var(--link); background: var(--tint); }
@media (hover: hover) and (pointer: fine) { .nav__link:hover { background: var(--tint); color: var(--link); text-decoration: none; } }
.dropdown {
  position: absolute; top: calc(100% + 12px); left: 0; min-width: 320px; padding: var(--s-2);
  border-radius: var(--r-l); background: var(--card); border: 1px solid var(--line); box-shadow: var(--shadow);
  transform-origin: top left; opacity: 0; transform: scale(0.97) translateY(-4px); visibility: hidden;
  transition: opacity 160ms var(--ease), transform 160ms var(--ease), visibility 0s linear 160ms;
}
.dropdown[data-open="true"] { opacity: 1; transform: none; visibility: visible; transition: opacity 180ms var(--ease), transform 180ms var(--ease), visibility 0s; }
.dropdown a { display: flex; align-items: center; min-height: 48px; padding: 0 var(--s-4); border-radius: var(--r-s); color: var(--ink); font-weight: 700; transition: background-color 160ms ease, color 160ms ease; }
@media (hover: hover) and (pointer: fine) { .dropdown a:hover { background: var(--tint); color: var(--link); text-decoration: none; } }
.header__cta { margin-left: auto; }
.cta-short { display: none; }
.menu-btn { flex: none; display: inline-flex; align-items: center; justify-content: center; width: 48px; height: 48px; border: 0; border-radius: 50%; background: none; color: var(--ink); cursor: pointer; -webkit-tap-highlight-color: transparent; transition: transform 140ms var(--ease); }
.menu-btn:active { transform: scale(0.94); }
.menu-btn svg { width: 24px; height: 24px; }
@media (min-width: 1240px) { .nav { display: block; } .header__cta { margin-left: 0; } .header .menu-btn { display: none; } }
@media (max-width: 539px) {
  .header__inner { gap: var(--s-3); }
  .cta-long { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .cta-short { display: inline; }
  .header__cta { padding: 0 var(--s-4); }
  .header .logo img { height: 34px; }
}

@media (max-width: 359px) {
  .dl dd a, .wa-hint strong { white-space: normal; }
  .header__inner { gap: var(--s-2); }
  .header .logo img { height: 26px; }
  .header__cta { padding: 0 var(--s-3); font-size: var(--t-14); }
  .menu-btn { width: 44px; height: 44px; }
}

/* ---------- Menú móvil ---------- */
.drawer-scrim { position: fixed; inset: 0; z-index: 60; background: var(--scrim); opacity: 0; visibility: hidden; transition: opacity 200ms ease, visibility 0s linear 200ms; }
.drawer {
  position: fixed; inset: 8px 8px 8px auto; z-index: 61; width: min(calc(100vw - 16px), 400px); overflow-y: auto; overscroll-behavior: contain;
  display: flex; flex-direction: column; padding: var(--s-4) var(--s-5) var(--s-6);
  border-radius: var(--r-l); background: var(--card); box-shadow: var(--shadow);
  transform: translateX(calc(100% + 16px)); visibility: hidden;
  transition: transform 200ms var(--ease), visibility 0s linear 200ms;
}
body[data-menu="open"] { overflow: hidden; }
body[data-menu="open"] .drawer-scrim { opacity: 1; visibility: visible; transition: opacity 300ms ease, visibility 0s; }
body[data-menu="open"] .drawer { transform: none; visibility: visible; transition: transform 300ms var(--ease-drawer), visibility 0s; }
.drawer__top { display: flex; align-items: center; justify-content: space-between; min-height: 56px; margin-bottom: var(--s-2); }
.drawer__top .logo img { height: 36px; }
.drawer__label { margin-top: var(--s-5); margin-bottom: var(--s-1); font-size: var(--t-14); font-weight: 700; color: var(--muted); }
.drawer > a:not(.btn) { display: flex; align-items: center; min-height: 52px; padding: 0 var(--s-3); margin-inline: calc(var(--s-3) * -1); border-radius: var(--r-s); color: var(--ink); font-size: var(--t-19); font-weight: 700; }
.drawer > a[aria-current="page"] { background: var(--tint); color: var(--link); }
.drawer > .btn { margin-top: var(--s-5); }
.theme-toggle { display: inline-flex; align-items: center; gap: var(--s-2); min-height: var(--tap); padding: 0 var(--s-4); border-radius: var(--r-pill); border: 1.5px solid var(--line); background: none; color: var(--text); font-size: var(--t-14); font-weight: 700; cursor: pointer; transition: transform 140ms var(--ease), border-color 160ms ease; }
.theme-toggle svg { width: 16px; height: 16px; }
.theme-toggle .i-sun { display: none; }
:root[data-theme="dark"] .theme-toggle .i-moon { display: none; }
:root[data-theme="dark"] .theme-toggle .i-sun { display: inline; }
.theme-toggle:active { transform: scale(0.97); }
.drawer .theme-toggle { align-self: flex-start; margin-top: var(--s-5); }

/* ---------- Héroe: las dos puertas en el primer pliegue ---------- */
.hero { padding-block: clamp(var(--s-5), 3vw, var(--s-7)) clamp(var(--s-7), 6vw, var(--s-9)); }
.hero__grid { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr); gap: clamp(var(--s-5), 3vw, 40px); align-items: center; }
.hero .h1 { font-size: clamp(var(--t-32), 0.2rem + 4.2vw, var(--t-64)); }
@media (max-width: 1023px) { .hero .h1 { font-size: clamp(var(--t-32), 1rem + 4.6vw, var(--t-64)); } }
.hero__lead { margin-top: var(--s-5); font-size: var(--t-19); line-height: 1.5; max-width: 34rem; }
.doors { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s-4); margin-top: var(--s-6); }
.door { position: relative; display: flex; flex-direction: column; gap: var(--s-2); min-height: 176px; padding: var(--s-5); border-radius: var(--r-l); border: 1.5px solid var(--line); background: var(--card); color: var(--text); transition: transform 240ms var(--ease), border-color 160ms ease, background-color 160ms ease; }
.door:hover { text-decoration: none; }
.door:active { transform: scale(0.985); }
.door__kind { font-size: var(--t-14); font-weight: 700; color: var(--muted); }
.door__title { font-size: var(--t-24); line-height: 1.12; letter-spacing: -0.03em; font-weight: 700; color: var(--ink); }
.door__text { font-size: var(--t-16); line-height: 1.45; }
.door__go { margin-top: auto; align-self: flex-end; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; background: var(--blue); color: #fff; transition: transform 240ms var(--ease); }
.door__go svg { width: 20px; height: 20px; }
.door--primary { background: var(--blue); border-color: var(--blue); color: #fff; }
.door--primary .door__kind { color: #d6e6fa; }
.door--primary .door__title { color: #fff; }
.door--primary .door__go { background: #fff; color: #021f45; }
.door, .door__kind, .door__title, .door__go { transition-property: transform, background-color, border-color, color; transition-duration: 240ms; transition-timing-function: var(--ease); }
@media (hover: hover) and (pointer: fine) {
  /* La secundaria se tiñe y marca el borde; la primaria se oscurece. En ambas avanza la flecha. */
  .door:hover { background: var(--tint); border-color: var(--link); }
  .door:hover .door__go { transform: translateX(4px); }
  .door--primary:hover { background: var(--blue-dark); border-color: var(--blue-dark); }
}
.hero__wa { display: inline-flex; align-items: center; gap: var(--s-2); min-height: var(--tap); margin-top: var(--s-4); font-weight: 700; color: var(--ok); }
.hero__wa svg { width: 22px; height: 22px; flex: none; }
.hero__media { position: relative; overflow: hidden; border-radius: var(--r-l); background: var(--tint); }
.hero__img { width: 100%; height: clamp(360px, calc(100svh - 190px), 640px); object-fit: cover; object-position: center 18%; }
.photo { outline: 1px solid rgb(2 31 69 / 0.08); outline-offset: -1px; }
@media (max-width: 1023px) {
  .hero__grid { grid-template-columns: 1fr; }
  .hero__img { height: auto; aspect-ratio: 1 / 1; object-position: center 38%; }
}
@media (max-width: 599px) {
  .hero__lead { font-size: var(--t-16); margin-top: var(--s-4); }
  .doors { grid-template-columns: 1fr; gap: var(--s-3); margin-top: var(--s-5); }
  .door { position: relative; min-height: 0; padding: var(--s-4) var(--s-8) var(--s-4) var(--s-4); gap: 2px; }
  .door__title { font-size: var(--t-19); }
  .door__text { display: none; }
  .door__go { position: absolute; right: var(--s-4); top: 50%; margin-top: -22px; }
}

/* ---------- Etapas: la línea del cobro (motivo propio del sitio) ---------- */
.cycle { position: relative; display: grid; grid-template-columns: repeat(var(--steps, 3), minmax(0, 1fr)); gap: var(--s-6); padding-top: var(--s-6); }
.cycle::before, .cycle::after { content: ""; position: absolute; left: 0; right: 0; top: 6px; height: 2px; }
.cycle::before { background: var(--line); }
.cycle::after { background: var(--orange); transform-origin: left center; }
.cycle__step { position: relative; display: flex; flex-direction: column; align-items: flex-start; padding-right: var(--s-5); }
.cycle__step::before { content: ""; position: absolute; left: 0; top: calc(var(--s-6) * -1); width: 14px; height: 14px; border-radius: 50%; background: var(--orange); box-shadow: 0 0 0 5px var(--ring, var(--page)); z-index: 1; }
.cycle__name { font-size: var(--t-24); line-height: 1.15; letter-spacing: -0.025em; font-weight: 700; color: var(--ink); }
.cycle__desc { margin-top: var(--s-2); max-width: 30ch; }
@media (min-width: 900px) and (max-width: 1160px) { .cycle--4 .cycle__name { min-height: 2.3em; } }
.cycle__step .link-go { margin-top: auto; padding-top: var(--s-2); }
@media (max-width: 899px) {
  .cycle { grid-template-columns: 1fr; gap: var(--s-5); padding-top: 0; padding-left: var(--s-6); }
  .cycle::before, .cycle::after { left: 6px; right: auto; top: 6px; bottom: 6px; width: 2px; height: auto; }
  .cycle::after { transform-origin: center top; }
  .cycle__step::before { left: calc(var(--s-6) * -1); top: 6px; }
}

/* Lista de servicios: filas con enlace (aparecen una sola vez en la portada) */
.rows { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: var(--s-8); margin-top: var(--s-8); border-top: 1px solid var(--line); }
.row { position: relative; isolation: isolate; display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: var(--s-1) var(--s-4); min-height: 96px; padding-block: var(--s-4); border-bottom: 1px solid var(--line); color: var(--text); }
.row::before { content: ""; position: absolute; inset: 6px -12px; z-index: -1; border-radius: var(--r-s); background: var(--card); opacity: 0; transition: opacity 200ms ease; }
.row:hover { text-decoration: none; }
.row__name { font-size: var(--t-19); line-height: 1.25; letter-spacing: -0.015em; font-weight: 700; color: var(--ink); text-wrap: balance; transition: color 160ms ease; }
.row__desc { grid-column: 1; font-size: var(--t-16); line-height: 1.45; color: var(--muted); }
.row svg { grid-column: 2; grid-row: 1 / span 2; width: 22px; height: 22px; color: var(--link); transition: transform 240ms var(--ease); }
@media (hover: hover) and (pointer: fine) { .row:hover::before { opacity: 1; } .row:hover .row__name { color: var(--link); } .row:hover svg { transform: translateX(4px); } }
.row:active::before { opacity: 1; }
@media (min-width: 768px) {
  .row { grid-template-rows: auto 1fr; row-gap: var(--s-2); padding-block: 20px; }
  .row__name, .row__desc { align-self: start; }
}
@media (max-width: 767px) { .rows { grid-template-columns: 1fr; } .row { min-height: 72px; } .row__desc { display: none; } }

/* ---------- Respaldo: foto a plena fuerza + panel azul ---------- */
.trust { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); }
.trust__photo { min-height: 420px; }
.trust__photo img { width: 100%; height: 100%; object-fit: cover; object-position: left center; }
.trust__panel { background: var(--blue); color: #e6effa; padding: clamp(var(--s-7), 5vw, var(--s-8)) clamp(var(--gutter), 5vw, var(--s-9)); }
.trust__panel .h2 { color: #fff; }
.figures { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s-6); margin-top: var(--s-7); }
.figure { display: grid; gap: var(--s-2); align-content: start; }
.figure dd { order: -1; display: flex; align-items: baseline; gap: 0.1em; font-size: clamp(var(--t-64), 2rem + 4vw, var(--t-84)); line-height: 0.9; font-weight: 800; letter-spacing: -0.06em; color: #fff; font-variant-numeric: tabular-nums; }
.figure dd small { font-size: var(--t-32); font-weight: 800; letter-spacing: -0.03em; }
.figure dt { font-size: var(--t-16); line-height: 1.4; max-width: 22ch; text-wrap: balance; }
.creds { display: grid; gap: 0; margin-top: var(--s-7); border-top: 1px solid rgb(255 255 255 / 0.28); }
.creds li { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--s-1) var(--s-4); min-height: 56px; padding-block: var(--s-3); border-bottom: 1px solid rgb(255 255 255 / 0.28); }
.creds strong { font-size: var(--t-19); font-weight: 700; letter-spacing: -0.015em; color: #fff; }
.creds span { display: inline-flex; align-items: center; gap: var(--s-4); font-size: var(--t-16); }
.creds img { height: 44px; width: auto; padding: 4px 8px; border-radius: var(--r-s); background: #fff; }
@media (max-width: 899px) { .trust { grid-template-columns: 1fr; } .trust__photo { min-height: 0; aspect-ratio: 3 / 2; } }
@media (max-width: 599px) { .creds li { flex-direction: column; align-items: flex-start; } .figures { gap: var(--s-5) var(--s-4); } .figure dd small { font-size: var(--t-19); font-weight: 700; } }

.clients { display: flex; flex-wrap: wrap; align-items: baseline; gap: var(--s-3) var(--s-8); padding-block: var(--s-7); }
.clients__title { font-size: var(--t-16); font-weight: 700; color: var(--muted); }
.clients__list { display: flex; flex-wrap: wrap; align-items: baseline; gap: var(--s-2) var(--s-7); }
.clients__list li { font-size: var(--t-24); line-height: 1.15; letter-spacing: -0.025em; font-weight: 700; color: var(--ink); white-space: nowrap; }
@media (max-width: 899px) { .clients__title { flex-basis: 100%; } .clients__list { gap: var(--s-2) var(--s-5); } .clients__list li { font-size: var(--t-19); } }

/* ---------- Sedes ---------- */
.visit { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); gap: clamp(var(--s-6), 5vw, var(--s-9)); align-items: center; }
.visit__photo { overflow: hidden; border-radius: var(--r-l); background: var(--tint); }
.visit__photo img { width: 100%; height: auto; aspect-ratio: 4 / 5; object-fit: cover; }
.places { margin-top: var(--s-6); border-top: 1px solid var(--line); }
.place { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--s-2) var(--s-5); padding-block: var(--s-5); border-bottom: 1px solid var(--line); }
.place__name { font-size: var(--t-24); line-height: 1.15; letter-spacing: -0.025em; font-weight: 700; color: var(--ink); }
.place address { margin-top: var(--s-1); }
.hours { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s-5); margin-top: var(--s-6); }
.hours dt { font-size: var(--t-14); font-weight: 700; color: var(--muted); }
.hours dd { margin-top: var(--s-1); }
.hours a { display: inline-flex; align-items: center; min-height: var(--tap); font-weight: 700; }
@media (max-width: 899px) { .visit { grid-template-columns: 1fr; } .visit__photo img { aspect-ratio: 4 / 3; } }
@media (max-width: 599px) { .hours { grid-template-columns: 1fr; } }

/* ---------- Cierre: franja azul a sangre, pegada al pie ---------- */
.closing { background: var(--blue); color: #e6effa; padding-block: clamp(var(--s-7), 7vw, var(--s-9)); }
.closing__grid { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "titulo boton" "texto ."; align-items: end; gap: var(--s-4) var(--s-7); }
.closing .h2 { grid-area: titulo; color: #fff; max-width: 18ch; }
.closing__text { grid-area: texto; font-size: var(--t-19); line-height: 1.5; max-width: 32rem; text-wrap: pretty; }
.closing .btn { grid-area: boton; }
@media (max-width: 767px) { .closing__grid { grid-template-columns: 1fr; grid-template-areas: "titulo" "texto" "boton"; justify-items: start; } .closing .btn { margin-top: var(--s-3); } }

/* ---------- Pie ---------- */
.footer { background: #021f45; color: #c9d6e8; }
.footer .wrap { padding-block: var(--s-8) var(--s-6); }
.footer__grid { display: grid; gap: var(--s-7) var(--s-6); grid-template-columns: 1.3fr 1fr 1fr 1.3fr; }
.footer__brand img { height: 44px; width: auto; }
.footer__brand p { margin-top: var(--s-5); max-width: 22rem; }
.footer h2 { margin-bottom: var(--s-3); font-size: var(--t-16); font-weight: 700; color: #fff; }
.footer li + li { margin-top: 2px; }
.footer a { display: inline-flex; align-items: center; min-height: var(--tap); color: #fff; }
.footer address, .footer__hours { padding-block: var(--s-2); }
.social { display: flex; gap: var(--s-1); margin-top: var(--s-4); margin-left: -12px; }
.social a { justify-content: center; width: var(--tap); border-radius: 50%; }
.social svg { width: 20px; height: 20px; }
@media (hover: hover) and (pointer: fine) { .social a:hover { background: rgb(255 255 255 / 0.12); } }
.footer__legal { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--s-3) var(--s-6); margin-top: var(--s-7); padding-top: var(--s-5); border-top: 1px solid rgb(255 255 255 / 0.2); font-size: var(--t-14); }
.footer .theme-toggle { color: #fff; border-color: rgb(255 255 255 / 0.4); }
@media (max-width: 899px) { .footer__grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 599px) { .footer__grid { grid-template-columns: 1fr; } }

/* ---------- WhatsApp flotante ---------- */
.fab { position: fixed; right: max(16px, env(safe-area-inset-right)); bottom: max(16px, env(safe-area-inset-bottom)); z-index: 40; display: inline-flex; align-items: center; gap: var(--s-2); min-height: 56px; padding: 0 var(--s-5) 0 var(--s-4); border-radius: var(--r-pill); background: #0b6534; color: #fff; font-weight: 700; box-shadow: var(--shadow); opacity: 0; transform: translateY(8px); pointer-events: none; transition: opacity 200ms var(--ease), transform 200ms var(--ease); }
.fab svg { width: 24px; height: 24px; }
.fab[data-visible="true"] { opacity: 1; transform: none; pointer-events: auto; }
.fab[data-visible="true"]:active { transform: scale(0.96); }
.fab:hover { text-decoration: none; }
body[data-menu="open"] .fab { opacity: 0; pointer-events: none; }
@media (max-width: 1679px) { .fab { width: 56px; padding: 0; justify-content: center; } .fab span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); } }

/* ---------- Encabezado de páginas internas ---------- */
.phero { padding-block: clamp(var(--s-6), 4vw, var(--s-8)) clamp(var(--s-7), 5vw, var(--s-8)); }
.phero__grid { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr); gap: clamp(var(--s-6), 5vw, var(--s-9)); align-items: center; }
.phero--plain { padding-bottom: var(--s-6); }
.phero--plain .phero__grid { grid-template-columns: 1fr; gap: var(--s-4); }
@media (min-width: 1024px) {
  /* Sin foto: título a la izquierda y texto con enlaces a la derecha, alineados por abajo */
  .phero--plain .phero__grid { grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr); gap: var(--s-8); align-items: end; }
  .phero--plain .lead { margin-top: 0; }
}
.crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-2); font-size: var(--t-14); font-weight: 700; color: var(--muted); }
/* El área táctil de 44 px va en un ::after, para no separar el enlace del "/" */
.crumbs a { position: relative; display: inline-flex; align-items: center; min-height: var(--tap); }
.crumbs a::after { content: ""; position: absolute; top: 0; bottom: 0; left: 0; width: max(100%, var(--tap)); }
.phero .h1 { margin-top: var(--s-2); max-width: 16ch; font-size: clamp(var(--t-32), 0.2rem + 4.2vw, var(--t-64)); }
.phero:not(.phero--plain) .h1 { max-width: 18ch; }
@media (max-width: 599px) { .phero .h1, .phero:not(.phero--plain) .h1 { max-width: none; } }
.phero .lead { margin-top: var(--s-5); }
.phero__media { overflow: hidden; border-radius: var(--r-l); background: var(--tint); }
.phero__media img { width: 100%; height: auto; aspect-ratio: 3 / 2; object-fit: cover; }
.phero__media:not(.phero__media--tall):not(.phero__media--square) img { object-position: left center; }
.phero__media--tall { max-width: 416px; justify-self: end; }
.phero__media--tall img { aspect-ratio: 4 / 5; }
.phero__media--square { max-width: 360px; justify-self: end; }
.phero__media--square img { aspect-ratio: 1 / 1; object-position: center 30%; }
.phero__links { display: flex; flex-wrap: wrap; gap: var(--s-1) var(--s-6); margin-top: var(--s-4); }
@media (max-width: 899px) { .phero__grid { grid-template-columns: 1fr; } .phero__media--tall, .phero__media--square { max-width: none; justify-self: stretch; }
  .phero__media--square img { aspect-ratio: 4 / 3; object-position: center 22%; } .phero__media--tall img { aspect-ratio: 4 / 3; object-position: center 22%; } }

/* ---------- Servicios (página) ---------- */
.svc { display: grid; grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr); gap: var(--s-4) clamp(var(--s-6), 5vw, var(--s-9)); padding-block: var(--s-7); border-top: 1px solid var(--line); scroll-margin-top: calc(var(--header-h) + 16px); }
.svc:last-of-type { border-bottom: 1px solid var(--line); }
.svc__name { font-size: var(--t-32); line-height: 1.05; letter-spacing: -0.035em; font-weight: 800; color: var(--ink); max-width: 14ch; text-wrap: balance; }
.svc__desc { font-size: var(--t-19); line-height: 1.5; }
.svc .link-go { margin-top: var(--s-3); }
.svc__for { margin-bottom: var(--s-2); font-size: var(--t-14); font-weight: 700; color: var(--muted); }
@media (max-width: 767px) { .svc { grid-template-columns: 1fr; padding-block: var(--s-6); } .svc__name { font-size: var(--t-24); } }

/* ---------- Somos CAC ---------- */
.facts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--s-6); margin-top: var(--s-6); }
.facts dt { font-size: var(--t-14); font-weight: 700; color: var(--muted); }
.facts dd { margin-top: var(--s-1); font-size: var(--t-19); line-height: 1.3; font-weight: 700; letter-spacing: -0.015em; color: var(--ink); }
@media (max-width: 899px) { .facts { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.statement { display: grid; grid-template-columns: minmax(0, 0.6fr) minmax(0, 1.4fr); gap: var(--s-4) var(--s-8); padding-block: var(--s-6); border-top: 1px solid var(--line); }
.statement:last-child { border-bottom: 1px solid var(--line); }
.statement p { font-size: var(--t-19); line-height: 1.55; max-width: 44rem; text-wrap: pretty; }
.statement .h2 { max-width: 12ch; }
.checks { margin-top: var(--s-5); border-top: 1px solid var(--line); }
.checks li { padding-block: var(--s-3); border-bottom: 1px solid var(--line); font-size: var(--t-16); }
.checks li:last-child { border-bottom: 0; padding-bottom: 0; }
@media (max-width: 767px) { .statement { grid-template-columns: 1fr; } }

/* ---------- Formularios ---------- */
.form-layout { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: var(--s-6) var(--s-8); align-items: start; }
@media (min-width: 960px) { .form-layout > * { position: sticky; top: calc(var(--header-h) + 24px); } }
@media (max-width: 959px) { .form-layout { grid-template-columns: 1fr; } }
.panel { padding: clamp(var(--s-5), 4vw, var(--s-7)); border-radius: var(--r-l); background: var(--card); border: 1px solid var(--line); }
.panel--tint { background: var(--tint); border-color: transparent; }
/* El formulario va sobre la página, con un filete superior: sin caja */
.panel--flat { padding: var(--s-5) 0 0; border: 0; border-top: 2px solid var(--ink); border-radius: 0; background: none; }
.panel > .h3 + p { margin-top: var(--s-2); }
.form { display: grid; gap: var(--s-5); margin-top: var(--s-5); }
.fields { display: grid; gap: var(--s-5); grid-template-columns: repeat(2, minmax(0, 1fr)); }
.field { display: flex; flex-direction: column; gap: var(--s-2); min-width: 0; margin: 0; padding: 0; border: 0; }
.field--full { grid-column: 1 / -1; }
@media (max-width: 599px) { .fields { grid-template-columns: 1fr; } }
.field > label:not(.consent), .field legend { padding: 0; font-size: var(--t-16); font-weight: 700; color: var(--ink); }
.field legend { margin-bottom: var(--s-2); }
.opt { font-weight: 500; color: var(--muted); }
.input, .select, .textarea { width: 100%; min-height: 56px; padding: 0 var(--s-4); border-radius: var(--r-s); border: 1.5px solid var(--control); background: var(--card); color: var(--ink); font-size: var(--t-16); transition: border-color 160ms ease; }
.textarea { min-height: 128px; padding-block: var(--s-3); line-height: 1.5; resize: vertical; }
.select { appearance: none; padding-right: var(--s-7); background-image: url("assets/ui/flecha-select.svg"); background-repeat: no-repeat; background-position: right var(--s-4) center; }
:root[data-theme="dark"] .select { background-image: url("assets/ui/flecha-select-oscuro.svg"); }
.input::placeholder, .textarea::placeholder { color: var(--muted); opacity: 1; }
.input:focus-visible, .select:focus-visible, .textarea:focus-visible { outline: 2px solid var(--focus); outline-offset: 1px; border-color: var(--focus); border-radius: var(--r-s); }
.field[data-invalid="true"] .input, .field[data-invalid="true"] .select, .field[data-invalid="true"] .textarea, .field[data-invalid="true"] .choice span, .field[data-invalid="true"] .consent input { border-color: var(--danger); }
.hint, .wa-hint { font-size: var(--t-14); color: var(--muted); }
.wa-hint strong { color: var(--ink); white-space: nowrap; }
.error { font-size: var(--t-14); font-weight: 700; color: var(--danger); }
.error:empty { display: none; }
.choices { display: flex; flex-wrap: wrap; gap: var(--s-2); }
.choice { position: relative; }
.choice input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.choice span { display: inline-flex; align-items: center; min-height: 48px; padding: 0 var(--s-4); white-space: nowrap; border-radius: var(--r-pill); border: 1.5px solid var(--control); background: var(--card); color: var(--text); font-weight: 700; transition: background-color 160ms ease, border-color 160ms ease, color 160ms ease, transform 140ms var(--ease); }
.choice input:checked + span { background: var(--blue); border-color: var(--blue); color: #fff; }
.choice input:focus-visible + span { outline: 2px solid var(--focus); outline-offset: 2px; }
.choice input:active + span { transform: scale(0.97); }
.consent { display: flex; align-items: flex-start; gap: var(--s-3); padding-block: var(--s-2); cursor: pointer; line-height: 1.5; }
.consent input { flex: none; appearance: none; -webkit-appearance: none; display: grid; place-content: center; width: 24px; height: 24px; margin: 0; border-radius: 6px; /* única excepción: la mitad de 12 px */ border: 1.5px solid var(--muted); background: var(--card); cursor: pointer; transition: background-color 160ms ease, border-color 160ms ease; }
.consent input::after { content: ""; width: 14px; height: 14px; opacity: 0; background: url("assets/ui/check.svg") center / contain no-repeat; }
.consent input:checked { background: var(--blue); border-color: var(--blue); }
.consent input:checked::after { opacity: 1; }
.consent a { text-decoration: underline; }
.form__foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--s-4); }
.form__foot > p { max-width: 24rem; }
.form__actions { display: flex; flex-wrap: wrap; gap: var(--s-3); }
.status:empty { display: none; }
.alert { display: flex; gap: var(--s-3); align-items: flex-start; padding: var(--s-4) var(--s-5); border-radius: var(--r-s); background: var(--tint); color: var(--text); }
.alert svg { flex: none; width: 22px; height: 22px; margin-top: 2px; color: var(--link); }
.alert strong { color: var(--ink); }
.alert a { text-decoration: underline; }
.alert--success svg { color: var(--ok); }
.aside { display: grid; gap: var(--s-4); }
.dl { display: grid; margin-top: var(--s-4); }
.dl > div { padding-block: var(--s-3); border-top: 1px solid var(--line); }
.dl > div:last-child { padding-bottom: 0; }
.dl dt { font-weight: 700; color: var(--ink); }
.dl dd a { display: inline-flex; align-items: center; min-height: var(--tap); font-weight: 700; white-space: nowrap; }
.dl__k { margin-right: var(--s-2); font-size: var(--t-14); color: var(--muted); }
.vacancy { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: var(--s-4) var(--s-6); padding-block: var(--s-5); border-top: 1px solid var(--line); }
.vacancy:last-child { border-bottom: 1px solid var(--line); }
.vacancy p { margin-top: var(--s-2); }
.vacancy__terms { margin-top: var(--s-2); font-size: var(--t-14); font-weight: 700; color: var(--muted); }
@media (max-width: 599px) { .vacancy { grid-template-columns: 1fr; } }
.maint { min-height: 100dvh; display: grid; place-items: center; padding: var(--s-6) var(--gutter); }
.maint .panel { max-width: 40rem; }
.maint img { height: 48px; width: auto; }
.maint .h2 { margin-top: var(--s-6); }
.maint .form__actions { margin-top: var(--s-6); }

/* Formularios en pantallas angostas: opciones y botones a ancho completo (va al final para ganar a las reglas base) */
@media (max-width: 479px) {
  .choices { display: grid; grid-template-columns: minmax(0, 1fr); }
  .choice { min-width: 0; }
  .choice span { display: flex; width: 100%; white-space: normal; padding-block: var(--s-2); line-height: 1.3; }
  .form__actions { width: 100%; }
  .form__actions .btn { flex: 1 1 100%; }
}

/* ---------- Movimiento: entrada del héroe y la línea de etapas; el resto, solo opacidad ---------- */
@keyframes rise { from { opacity: 0; transform: translateY(20px); } }
@keyframes fade { from { opacity: 0; } }
@keyframes unveil { from { clip-path: inset(0 0 100% 0 round 24px); } to { clip-path: inset(0 0 0 0 round 24px); } }
@keyframes draw-x { from { transform: scaleX(0); } }
@keyframes draw-y { from { transform: scaleY(0); } }
@media (prefers-reduced-motion: no-preference) {
  @view-transition { navigation: auto; }
  .hero__in { animation: rise 700ms var(--ease) backwards; animation-delay: calc(var(--d, 0) * 90ms + 40ms); }
  .hero__media { animation: unveil 900ms var(--ease) 160ms backwards; }
  .js .reveal { opacity: 0; }
  .js .reveal.is-in { opacity: 1; animation: fade 500ms ease backwards; animation-delay: calc(var(--i, 0) * 70ms); }
  .js .cycle.reveal { opacity: 1; }
  .js .cycle.reveal::after { transform: scaleX(0); }
  .js .cycle.reveal.is-in { animation: none; }
  .js .cycle.reveal.is-in::after { transform: none; animation: draw-x 900ms linear backwards; }
  .js .cycle.reveal .cycle__step { opacity: 0; }
  .js .cycle.reveal.is-in .cycle__step { opacity: 1; animation: fade 500ms ease backwards; animation-delay: calc(var(--n, 0) / var(--steps, 3) * 900ms); }
}
@media (prefers-reduced-motion: no-preference) and (max-width: 899px) {
  .js .cycle.reveal::after { transform: scaleY(0); }
  .js .cycle.reveal.is-in::after { animation-name: draw-y; }
}
@media (prefers-reduced-motion: reduce) {
  .btn:active, .door:active, .menu-btn:active, .theme-toggle:active, .choice input:active + span, .fab[data-visible="true"]:active { transform: none; }
  .fab { transform: none; }
  .dropdown, .dropdown[data-open="true"] { transform: none; }
  .drawer { transform: none; opacity: 0; transition: opacity 200ms ease, visibility 0s linear 200ms; }
  body[data-menu="open"] .drawer { opacity: 1; transition: opacity 200ms ease, visibility 0s; }
  .door:hover .door__go, .row:hover svg, .btn--go:hover svg, .link-go:hover svg { transform: none; }
}
@media (prefers-contrast: more) {
  :root { --line: #6b7686; --muted: #2f3742; }
  :root[data-theme="dark"] { --line: #8fa3c2; --muted: #cdd7e4; }
  main a:not(.btn):not(.door):not(.row) { text-decoration: underline; }
}
@media (forced-colors: active) { .btn, .door, .choice span, .panel { border: 1px solid CanvasText; } }

/* ---------- Ajustes finos en pantallas angostas ---------- */
@media (max-width: 359px) {
  .head .btn { padding-inline: var(--s-5); }
  .figures { column-gap: var(--s-2); }
}
@media (max-width: 374px) {
  .maint .panel { padding: var(--s-5) var(--s-4); }
  .maint .btn { padding-inline: var(--s-4); max-width: 100%; }
}
@media (min-width: 360px) and (max-width: 374px) { .header .logo img { height: 30px; } }
:root[data-theme="dark"] .header::after { background: linear-gradient(rgb(0 0 0 / 0.4), transparent); }

/* Sin estilos en linea: la CSP de produccion (default-src 'self') bloquea los atributos style="" */
.d-1 { --d: 1; } .d-2 { --d: 2; } .d-3 { --d: 3; }
.cycle--4 { --steps: 4; }
.cycle__step:nth-child(2) { --n: 1; } .cycle__step:nth-child(3) { --n: 2; } .cycle__step:nth-child(4) { --n: 3; }
.mt-4 { margin-top: var(--s-4); } .mt-9 { margin-top: var(--s-9); } .mb-6 { margin-bottom: var(--s-6); } .mb-7 { margin-bottom: var(--s-7); }
