/* ============================================================
   ComunIA — Sistema de diseño · Layout B (Rejilla)
   Archivo + IBM Plex Mono · Editorial Cálido
   ============================================================ */

/* ---------- TOKENS ---------- */
:root {
  --paper:        #FBF7F0;
  --surface:      #EBE2D4;
  --ink:          #1C1714;
  --fg-mute:      rgba(28,23,20,.60);
  --line:         rgba(28,23,20,.12);
  --line-strong:  rgba(28,23,20,.28);
  --accent:       #D92D20;
  --accent-hover: #9E2417;
  --on-accent:    #FFFFFF;
  --bg-invert:    #1C1714;
  --fg-invert:    #FBF7F0;
  --umh-granate:  #8B1538;

  --grey-100: #C9C7C2;
  --grey-200: #9F9DA0;
  --grey-300: #737074;
  --grey-400: #585459;
  --grey-500: #2E2930;

  --bg: var(--paper);
  --fg: var(--ink);

  --font-display: "Archivo", system-ui, sans-serif;
  --font-mono:    "IBM Plex Mono", ui-monospace, "SFMono-Regular", monospace;

  --gutter:  20px;
  --margin:  clamp(20px, 4vw, 64px);
  --maxw:    1480px;

  --sp-1: 4px;  --sp-2: 8px;   --sp-3: 12px;  --sp-4: 16px;
  --sp-5: 24px; --sp-6: 32px;  --sp-7: 48px;  --sp-8: 64px;
  --sp-9: 96px; --sp-10: 128px; --sp-11: 180px;

  --radius: 3px;
  --bw:     1px;
  --ease:   cubic-bezier(.53, 0, 0, 1);
}

/* ---------- RESET ---------- */
*, *::before, *::after { box-sizing: border-box; }
html {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  scroll-behavior: smooth;
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-display);
  letter-spacing: -0.011em;
  font-weight: 400;
  line-height: 1.4;
  overflow-x: hidden;
}
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: none; cursor: pointer; }
h1,h2,h3,h4,h5,p,figure,ul,ol { margin: 0; padding: 0; }
ul, ol { list-style: none; }

.skip-link {
  position: absolute; left: -9999px; top: 0;
  background: var(--ink); color: var(--paper);
  padding: 12px 18px; z-index: 300;
  font-family: var(--font-mono); font-size: 0.75rem;
}
.skip-link:focus { left: 12px; top: 12px; }

/* ============================================================
   TIPOGRAFÍA
   ============================================================ */
.t-display {
  font-family: var(--font-display); font-weight: 600;
  font-size: clamp(44px, 5.5vw, 92px);
  line-height: 0.9; letter-spacing: -0.03em;
}
.t-xl {
  font-family: var(--font-display); font-weight: 600;
  font-size: clamp(44px, 5.5vw, 88px);
  line-height: 0.92; letter-spacing: -0.028em;
}
.t-l {
  font-family: var(--font-display); font-weight: 600;
  font-size: clamp(34px, 3.6vw, 60px);
  line-height: 0.96; letter-spacing: -0.024em;
}
.t-m {
  font-family: var(--font-display); font-weight: 600;
  font-size: clamp(26px, 2.4vw, 40px);
  line-height: 1.02; letter-spacing: -0.02em;
}
.t-s {
  font-family: var(--font-display); font-weight: 600;
  font-size: clamp(20px, 1.6vw, 26px);
  line-height: 1.1; letter-spacing: -0.015em;
}
.body-xl { font-size: clamp(18px, 1.4vw, 24px); line-height: 1.3; letter-spacing: -0.012em; }
.body-l  { font-size: clamp(16px, 1.2vw, 20px); line-height: 1.4; letter-spacing: -0.01em; }
.body-m  { font-size: 16px; line-height: 1.5; }
.body-s  { font-size: 14px; line-height: 1.5; color: var(--fg-mute); }

.caption {
  font-family: var(--font-mono); font-weight: 400;
  font-size: 11px; line-height: 1.5;
  letter-spacing: 0.04em; text-transform: uppercase;
  color: var(--fg-mute);
}
.eyebrow {
  display: inline-flex; align-items: center; gap: var(--sp-3);
  font-family: var(--font-mono); font-weight: 500;
  font-size: 12px; letter-spacing: 0.09em; text-transform: uppercase;
}
.eyebrow::before {
  content: ""; width: 7px; height: 7px;
  background: var(--accent); flex: none;
}
.eyebrow--mute { color: var(--fg-mute); }
.eyebrow--mute::before { background: var(--fg-mute); }

/* ============================================================
   LAYOUT
   ============================================================ */
.wrap { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: var(--margin); }
.section { padding-block: clamp(var(--sp-8), 9vw, var(--sp-11)); }
.section--surface { background: var(--surface); }
.rule { border: 0; border-top: var(--bw) solid var(--line); margin: 0; }

/* ============================================================
   COMPONENTES
   ============================================================ */

/* --- Botón --- */
.btn {
  display: inline-flex; align-items: center; gap: var(--sp-4);
  padding: 14px 20px; border-radius: var(--radius);
  border: var(--bw) solid var(--ink);
  font-family: var(--font-mono); font-weight: 500;
  font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase;
  line-height: 1; white-space: nowrap; text-decoration: none;
  transition: background .4s var(--ease), color .4s var(--ease), border-color .4s var(--ease);
  cursor: pointer;
}
.btn .arrow { width: 11px; height: 11px; flex: none; transition: transform .4s var(--ease); }
.btn:hover .arrow { transform: translateX(3px); }
.btn--solid { background: var(--accent); color: var(--on-accent); border-color: var(--accent); }
.btn--solid:hover { background: var(--accent-hover); border-color: var(--accent-hover); }
.btn--ghost { background: transparent; color: var(--ink); }
.btn--ghost:hover { background: var(--ink); color: var(--paper); }
.btn--sm { padding: 10px 14px; font-size: 11px; }

/* --- Bloque invertido --- */
.invert { background: var(--bg-invert); color: var(--fg-invert); }
.invert .eyebrow::before { background: var(--accent); }
.invert .btn--ghost { border-color: var(--fg-invert); color: var(--fg-invert); }
.invert .btn--ghost:hover { background: var(--fg-invert); color: var(--ink); }

/* Utilidades */
.u-mute { color: var(--fg-mute); }
.flex { display: flex; }
.gap-3 { gap: var(--sp-3); }
.gap-4 { gap: var(--sp-4); }
.wrap-row { flex-wrap: wrap; }

:where(a, button, input, select, textarea):focus-visible {
  outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 2px;
}

/* ============================================================
   HEADER
   ============================================================ */
:root { --header-h: 72px; }

.site-head {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--paper) 92%, transparent);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-bottom: var(--bw) solid var(--line);
}
/* Anula el max-width del .wrap solo en el header */
.site-head .wrap {
  max-width: none;
  padding-inline: clamp(16px, 2.5vw, 40px);
}
.site-head__row {
  display: flex;
  align-items: stretch;
  justify-content: space-between;
  height: var(--header-h);
}
.brand {
  font-family: var(--font-display); font-weight: 800;
  font-size: 22px; letter-spacing: -0.01em;
  text-decoration: none; color: var(--ink);
  align-self: center;
  flex-shrink: 0;
}


/* --- Dos botones grandes en el lado derecho --- */
.head-actions {
  display: flex;
  align-items: stretch;
  gap: var(--sp-3);
  padding-block: var(--sp-3);  /* respira dentro del header */
}

/* Menú: bordered, texto + sep + hamburger */
.head-menu {
  display: flex;
  align-items: stretch;
  border: var(--bw) solid var(--ink);
  border-radius: var(--radius);
  background: transparent;
  cursor: pointer;
  padding: 0;
  overflow: hidden;
  transition: background .25s var(--ease);
}
.head-menu:hover { background: var(--surface); }

.head-menu__text {
  display: flex; align-items: center;
  padding-inline: var(--sp-6);
  font-family: var(--font-display); font-weight: 800;
  font-size: 18px; letter-spacing: -0.01em;
  color: var(--ink); white-space: nowrap;
}
.head-menu__sep {
  display: block; width: var(--bw);
  background: var(--line-strong); align-self: stretch;
}
.head-menu__icon {
  display: flex; flex-direction: column;
  justify-content: center; gap: 5px;
  padding-inline: var(--sp-5);
}
.head-menu__icon span {
  display: block; width: 22px; height: 2px;
  background: var(--ink); border-radius: 1px;
}

/* Mi selección: sólido oscuro */
.head-cta {
  display: flex; align-items: center;
  gap: var(--sp-4); padding-inline: var(--sp-6);
  background: var(--ink); color: var(--paper);
  font-family: var(--font-display); font-weight: 800;
  font-size: 18px; letter-spacing: -0.01em;
  white-space: nowrap; border: 0;
  border-radius: var(--radius); cursor: pointer;
  transition: background .25s var(--ease);
}
.head-cta:hover { background: var(--grey-500); }
.head-cta__count {
  font-family: var(--font-mono); font-size: 10px; font-weight: 600;
  min-width: 20px; height: 20px;
  display: inline-grid; place-items: center;
  background: var(--accent); color: #fff;
  border-radius: 999px; padding-inline: 4px;
}
.head-cta__arrow {
  width: 13px; height: 13px; flex: none;
  transition: transform .4s var(--ease);
}
.head-cta:hover .head-cta__arrow { transform: translateX(3px); }

/* ============================================================
   MENÚ OVERLAY — drawer lateral derecho
   ============================================================ */
.menu-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  justify-content: flex-end;
  opacity: 0;
  pointer-events: none;
}
.menu-overlay[hidden] { display: none; }
.menu-overlay.is-open {
  opacity: 1;
  pointer-events: auto;
}

/* Fondo oscuro sobre la página */
.menu-overlay__backdrop {
  flex: 1;
  background: rgba(28, 23, 20, .55);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  cursor: pointer;
}

/* Panel blanco a la derecha */
.menu-overlay__panel {
  width: min(480px, 92vw);
  background: var(--paper);
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  box-shadow: -12px 0 48px rgba(28,23,20,.18);
  transform: translateX(100%);
  transition: transform .38s var(--ease);
  will-change: transform;
  outline: 0;
}
.menu-overlay.is-open .menu-overlay__panel { transform: translateX(0); }

/* Barra superior del panel */
.menu-overlay__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--header-h);
  padding-inline: var(--sp-7);
  border-bottom: var(--bw) solid var(--line);
  flex-shrink: 0;
}
.menu-overlay__bar .brand { font-size: 18px; letter-spacing: -0.01em; }

.menu-overlay__close {
  display: flex; align-items: center; justify-content: center;
  width: 40px; height: 40px;
  background: transparent; border: 0; cursor: pointer;
  color: var(--ink); border-radius: var(--radius);
  transition: background .2s var(--ease);
}
.menu-overlay__close:hover { background: var(--surface); }

/* Nav: links grandes con bordes finos */
.menu-overlay__nav {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: var(--sp-4) var(--sp-7) 0;
}
.menu-nav__item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-family: var(--font-display); font-weight: 800;
  font-size: clamp(32px, 4vw, 48px);
  line-height: 1; letter-spacing: -0.03em;
  color: var(--ink); text-decoration: none;
  padding-block: clamp(14px, 2vw, 20px);
  border-bottom: var(--bw) solid var(--line);
  background: transparent; border-top: 0;
  border-left: 0; border-right: 0;
  cursor: pointer; width: 100%; text-align: left;
  transition: color .2s var(--ease), padding-left .2s var(--ease);
}
.menu-nav__item:first-child { border-top: var(--bw) solid var(--line); }
.menu-nav__item:hover { color: var(--accent); padding-left: var(--sp-3); }
.menu-nav__item--plan { color: var(--accent); }
.menu-nav__count {
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0;
  min-width: 34px;
  height: 34px;
  display: inline-grid;
  place-items: center;
  background: var(--accent);
  color: #fff;
  border-radius: 999px;
  padding-inline: 8px;
  flex: none;
}

/* Pie del panel: 2 columnas con separador central */
.menu-overlay__foot {
  border-top: var(--bw) solid var(--line);
  margin-top: auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  flex-shrink: 0;
}
.menu-foot__col {
  display: flex; flex-direction: column;
  gap: var(--sp-2);
  padding: var(--sp-6) var(--sp-7);
}
.menu-foot__col:first-child {
  border-right: var(--bw) solid var(--line);
}
.menu-foot__label {
  font-family: var(--font-mono); font-size: 10px;
  letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--grey-200); margin-bottom: var(--sp-2);
  display: block;
}
.menu-foot__col a {
  font-family: var(--font-mono); font-size: 12px;
  letter-spacing: 0.05em; text-transform: uppercase;
  color: var(--fg-mute); text-decoration: none;
  transition: color .2s var(--ease);
  display: inline-block;
}
.menu-foot__col a:hover { color: var(--ink); }
.menu-foot__copy {
  font-family: var(--font-mono); font-size: 11px;
  letter-spacing: 0.04em; text-transform: uppercase;
  color: var(--grey-300); margin-top: var(--sp-3);
  display: block;
}

/* ============================================================
   HERO — Layout B (rejilla 6+6)
   ============================================================ */
.hero { border-bottom: var(--bw) solid var(--line); }
.hero__inner { padding-block: clamp(var(--sp-7), 6vw, var(--sp-10)); }
.hero__eyebrow {
  display: flex; justify-content: space-between;
  align-items: center; flex-wrap: wrap; gap: var(--sp-4);
  margin-bottom: clamp(var(--sp-6), 5vw, var(--sp-9));
}
.hero__grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: var(--gutter);
  align-items: stretch;
}
.hero__left {
  grid-column: 1 / span 6;
  display: flex; flex-direction: column;
}
.hero__title { margin-bottom: var(--sp-6); }
.hero__lede { margin-top: auto; }
.hero__lede .body-xl { margin-bottom: var(--sp-6); }
.hero__right {
  grid-column: 7 / span 6;
  display: flex; flex-direction: column; gap: var(--sp-4);
}

/* Panel de datos — ocupa el espacio de la imagen en el wireframe */
.hero__panel {
  flex: 1;
  border: var(--bw) solid var(--line-strong);
  border-radius: var(--radius);
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 1fr 1fr;
  min-height: 360px;
}
.hero__fact {
  display: flex; flex-direction: column;
  justify-content: flex-end;
  padding: var(--sp-6);
  border-right: var(--bw) solid var(--line);
  border-bottom: var(--bw) solid var(--line);
}
.hero__fact:nth-child(2n) { border-right: 0; }
.hero__fact:nth-last-child(-n+2) { border-bottom: 0; }
.hero__fact-num {
  font-family: var(--font-display); font-weight: 600;
  font-size: clamp(40px, 4vw, 64px);
  line-height: 0.9; letter-spacing: -0.03em;
  display: block; margin-bottom: var(--sp-3);
}
.hero__fact-label {
  font-family: var(--font-mono); font-size: 11px;
  letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--fg-mute);
}
.hero__meta {
  display: flex; justify-content: space-between;
  align-items: center; flex-wrap: wrap; gap: var(--sp-3);
}

/* ============================================================
   MARQUEE
   ============================================================ */
.marquee {
  background: var(--accent); color: #fff;
  overflow: hidden; padding-block: 14px; white-space: nowrap;
}
.marquee__track {
  display: inline-flex; align-items: center;
  gap: var(--sp-5);
  animation: marquee 40s linear infinite;
  will-change: transform;
}
.marquee__track span {
  font-family: var(--font-mono); font-size: 11px;
  font-weight: 500; letter-spacing: 0.1em; text-transform: uppercase;
}
.marquee__dot {
  font-size: 14px; line-height: 1;
  color: rgba(255,255,255,.65); flex-shrink: 0;
}
@keyframes marquee {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

/* ============================================================
   SECCIONES CON REJILLA — cabecera + tarjetas con borde compartido
   Usado por: Enfoque (3 principios) y Cómo se cursa (3 pasos)
   ============================================================ */
.svc__head {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: var(--gutter);
  margin-bottom: var(--sp-7);
}
.svc__head-title { grid-column: 1 / span 7; }
.svc__head-note  { grid-column: 9 / span 4; align-self: end; }

/* Rejilla de 3 tarjetas con bordes compartidos */
.svc__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  border: var(--bw) solid var(--line);
}
.svc__item {
  display: flex; flex-direction: column; gap: var(--sp-5);
  padding: var(--sp-6);
  border-right: var(--bw) solid var(--line);
  border-bottom: var(--bw) solid var(--line);
}
.svc__grid .svc__item:nth-child(3n)        { border-right: 0; }
.svc__grid .svc__item:nth-last-child(-n+3) { border-bottom: 0; }

.svc__index {
  display: flex; justify-content: space-between; align-items: flex-start;
}
.svc__index-num {
  font-family: var(--font-mono); font-weight: 500;
  font-size: 13px; letter-spacing: 0.04em;
  display: inline-flex; align-items: center; gap: var(--sp-2);
}
.svc__diag { width: 8px; height: 14px; flex: none; color: var(--accent); }
.svc__body { flex: 1; display: flex; flex-direction: column; gap: var(--sp-3); }
.svc__title { /* usa t-s */ }
.svc__desc { color: var(--fg-mute); font-size: 15px; line-height: 1.55; }

/* ============================================================
   VIDEO HERO
   ============================================================ */
.videohero {
  position: relative;
  min-height: 70vh;
  display: flex;
  align-items: center;
  overflow: hidden;
  background: var(--bg-invert); /* fallback hasta que cargue el vídeo */
}

/* Vídeo ocupa todo el contenedor */
.videohero__bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
}

/* Variante before-footer: altura más compacta */
.videohero--footer { min-height: 60vh; }
.videohero--footer .videohero__overlay { background: rgba(10,10,12,.70); }

/* Capa de oscurecimiento para legibilidad del texto */
.videohero__overlay {
  position: absolute;
  inset: 0;
  background: rgba(10, 10, 12, .62);
  z-index: 1;
}

.videohero__content {
  position: relative;
  z-index: 2;
  padding-block: clamp(var(--sp-9), 10vw, var(--sp-11));
}

/* Texto tipo terminal */
.videohero__phrase {
  font-family: var(--font-mono);
  font-size: clamp(18px, 2.4vw, 34px);
  font-weight: 400;
  color: #fff;
  line-height: 1.55;
  letter-spacing: 0.01em;
  max-width: 52ch;
}

/* Cursor parpadeante */
.videohero__cursor {
  display: inline-block;
  width: 2px;
  height: 1.05em;
  background: var(--accent);
  vertical-align: text-bottom;
  margin-left: 3px;
  animation: cur-blink .75s step-end infinite;
}
@keyframes cur-blink {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0; }
}

/* ============================================================
   MOSAICO VISUAL
   ============================================================ */
.mosaic__grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: var(--gutter);
}
.mosaic__cell { margin: 0; }
.mosaic__cell--lg   { grid-column: 1 / span 7; }
.mosaic__cell--md   { grid-column: 8 / span 5; }
.mosaic__cell--sm   { grid-column: span 4; }
.mosaic__cell--half { grid-column: span 6; }

.mosaic__ph {
  width: 100%; height: 100%; min-height: 280px;
  background: repeating-linear-gradient(
    -45deg,
    transparent 0 11px,
    rgba(240,239,235,.08) 11px 12px
  );
  border: var(--bw) solid rgba(240,239,235,.18);
  border-radius: var(--radius);
  position: relative;
  display: flex;
  align-items: flex-end;
}
.mosaic__cell--lg .mosaic__ph   { min-height: 420px; }
.mosaic__cell--md .mosaic__ph   { min-height: 420px; }
.mosaic__cell--sm .mosaic__ph   { min-height: 200px; }
.mosaic__cell--half .mosaic__ph { min-height: 240px; }

.mosaic__tag {
  position: absolute; left: var(--sp-4); bottom: var(--sp-4);
  font-family: var(--font-mono); font-size: 10px;
  letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--grey-200);
  background: rgba(28,23,20,.7);
  padding: 5px 8px;
  border: var(--bw) solid rgba(240,239,235,.15);
  border-radius: var(--radius);
}

/* ============================================================
   TESTIMONIOS
   ============================================================ */
.testi__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  border: var(--bw) solid var(--line);
}
.testi__item {
  display: flex; flex-direction: column; gap: var(--sp-5);
  padding: var(--sp-7) var(--sp-6) var(--sp-6);
  border-right: var(--bw) solid var(--line);
}
.testi__grid .testi__item:last-child { border-right: 0; }

.testi__quote {
  font-size: 17px; line-height: 1.6;
  letter-spacing: -0.008em;
  color: var(--ink); flex: 1;
}
.testi__sep {
  border: 0; border-top: var(--bw) solid var(--line); margin: 0;
}
.testi__author { display: flex; align-items: center; gap: var(--sp-3); }
.testi__avatar {
  width: 40px; height: 40px; border-radius: 50%;
  background: var(--surface);
  border: var(--bw) solid var(--line-strong);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-mono); font-size: 11px; font-weight: 600;
  color: var(--fg-mute); flex-shrink: 0;
}
.testi__name {
  font-weight: 600; font-size: 14px;
  letter-spacing: -0.01em; margin-bottom: 3px;
}
.testi__role {
  font-family: var(--font-mono); font-size: 10px;
  letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--fg-mute);
}

/* ============================================================
   ENTIDADES COLABORADORAS
   ============================================================ */
.colabs__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  border: var(--bw) solid var(--line);
}
.colab__item {
  display: flex; align-items: center; justify-content: center;
  padding: var(--sp-7) var(--sp-5);
  border-right: var(--bw) solid var(--line);
  border-bottom: var(--bw) solid var(--line);
  transition: background .2s var(--ease);
}
.colab__item:nth-child(4n)        { border-right: 0; }
.colab__item:nth-last-child(-n+4) { border-bottom: 0; }
.colab__item:hover { background: var(--paper); }

.colab__name {
  font-family: var(--font-display); font-weight: 700;
  font-size: clamp(18px, 1.6vw, 24px); letter-spacing: -0.02em;
  color: var(--fg-mute);
  transition: color .2s var(--ease);
}
.colab__item:hover .colab__name { color: var(--ink); }

/* ============================================================
   PERFILES PROFESIONALES
   ============================================================ */
.perfiles__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-auto-rows: 110px;
  gap: 0;
  border: var(--bw) solid var(--line);
}
.perfil__item {
  display: flex; align-items: center; justify-content: center;
  text-align: center;
  padding: var(--sp-4);
  overflow: hidden;
  border-right: var(--bw) solid var(--line);
  border-bottom: var(--bw) solid var(--line);
  transition: background .2s var(--ease);
}
.perfiles__grid .perfil__item:nth-child(4n)        { border-right: 0; }
.perfiles__grid .perfil__item:nth-last-child(-n+4) { border-bottom: 0; }
.perfil__item:hover { background: var(--surface); }
.perfil__name {
  font-family: var(--font-display); font-weight: 600;
  font-size: clamp(13px, 1.1vw, 16px); letter-spacing: -0.015em;
  color: var(--fg-mute); line-height: 1.3;
  transition: color .2s var(--ease);
}
.perfil__item:hover .perfil__name { color: var(--ink); }

/* ============================================================
   CATÁLOGO
   ============================================================ */
.catalog__layout {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: clamp(var(--sp-6), 4vw, var(--sp-8));
  align-items: start;
}

/* Filtros */
.filters {
  position: sticky;
  top: calc(var(--header-h) + var(--sp-5));
  display: grid; gap: var(--sp-6);
}
.filters__search { display: grid; gap: var(--sp-2); }
.filters__search-label {
  font-family: var(--font-mono); font-size: 11px;
  letter-spacing: 0.09em; text-transform: uppercase; color: var(--fg-mute);
}
.filters__search input {
  font-family: var(--font-display); font-size: 15px;
  padding: 10px 14px; background: var(--paper);
  border: var(--bw) solid var(--line-strong);
  border-radius: var(--radius); color: var(--ink); letter-spacing: -0.01em;
}
.filters__search input::placeholder { color: var(--grey-200); }
.filters__search input:focus { outline: 2px solid var(--accent); outline-offset: 1px; }

.facet { border: 0; display: grid; gap: var(--sp-2); }
.facet legend {
  font-family: var(--font-mono); font-size: 11px;
  letter-spacing: 0.09em; text-transform: uppercase;
  color: var(--fg-mute); margin-bottom: var(--sp-2);
}
.chip { display: inline-flex; }
.chip input { position: absolute; opacity: 0; width: 0; height: 0; }
.chip span {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 13px; letter-spacing: -0.005em;
  padding: 6px 12px; border: var(--bw) solid var(--line-strong);
  border-radius: var(--radius); cursor: pointer;
  transition: all 200ms var(--ease); user-select: none;
}
.chip span::before {
  content: ""; width: 6px; height: 6px; border-radius: 50%;
  border: var(--bw) solid var(--grey-200);
  transition: all 200ms var(--ease);
}
.chip:hover span { border-color: var(--ink); }
.chip input:checked + span { background: var(--accent); border-color: var(--accent); color: #fff; }
.chip input:checked + span::before { background: #fff; border-color: #fff; }
.chip input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }

.filters__clear {
  justify-self: start;
  font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.06em;
  text-transform: uppercase; background: transparent; border: 0;
  border-bottom: var(--bw) solid var(--ink); padding: 0 0 2px;
  cursor: pointer; color: var(--ink);
}

/* Resultados */
.catalog__bar {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: var(--sp-5); padding-bottom: var(--sp-4);
  border-bottom: var(--bw) solid var(--line);
}
.catalog__count {
  font-family: var(--font-mono); font-size: 12px;
  letter-spacing: 0.04em; text-transform: uppercase; color: var(--fg-mute);
}

.cards {
  list-style: none; display: grid;
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
  gap: var(--sp-3);
}
.card {
  display: flex; flex-direction: column;
  background: var(--surface);
  border: var(--bw) solid var(--line-strong);
  border-radius: var(--radius); padding: var(--sp-5);
  transition: transform 240ms var(--ease), box-shadow 240ms var(--ease), border-color 240ms var(--ease);
}
.card:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 32px rgba(28,23,20,.10);
  border-color: rgba(28,23,20,.35);
}
.card[hidden] { display: none; }
.card.is-selected { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.card__top {
  display: flex; align-items: center;
  justify-content: space-between; margin-bottom: var(--sp-4);
}
.card__code {
  font-family: var(--font-mono); font-size: 11px; font-weight: 500;
  letter-spacing: 0.08em; text-transform: uppercase; color: var(--fg-mute);
}
.card__level {
  font-family: var(--font-mono); font-size: 10px; font-weight: 500;
  letter-spacing: 0.08em; text-transform: uppercase;
  padding: 4px 8px; border-radius: 999px;
  border: var(--bw) solid var(--line-strong); color: var(--fg-mute);
}
.card__level--intermedio { border-color: var(--ink); color: var(--ink); }
.card__level--avanzado { background: var(--ink); color: var(--paper); border-color: var(--ink); }

.card__title {
  font-family: var(--font-display); font-weight: 600;
  font-size: clamp(18px, 1.4vw, 22px);
  line-height: 1.1; letter-spacing: -0.015em; margin-bottom: var(--sp-3);
}
.card__summary {
  font-size: 14px; color: var(--fg-mute); line-height: 1.5;
  letter-spacing: -0.005em; margin-bottom: var(--sp-4); flex-grow: 1;
}
.card__meta {
  display: grid; gap: 6px;
  padding-top: var(--sp-4); border-top: var(--bw) solid var(--line);
  margin-bottom: var(--sp-4);
}
.card__meta > div { display: flex; justify-content: space-between; gap: var(--sp-4); }
.card__meta dt {
  font-family: var(--font-mono); font-size: 10px;
  letter-spacing: 0.08em; text-transform: uppercase; color: var(--fg-mute);
}
.card__meta dd { font-size: 13px; letter-spacing: -0.005em; }

.card__add {
  display: flex; align-items: center; justify-content: space-between;
  width: 100%; font-family: var(--font-mono); font-size: 11px;
  font-weight: 500; letter-spacing: 0.06em; text-transform: uppercase;
  background: transparent; color: var(--ink);
  border: var(--bw) solid var(--ink); border-radius: var(--radius);
  padding: 10px 14px; cursor: pointer;
  transition: background 250ms var(--ease), color 250ms var(--ease);
}
.card__add:hover { background: var(--ink); color: var(--paper); }
.card__add-icon {
  font-family: var(--font-mono); font-size: 16px; line-height: 1;
  transition: transform 250ms var(--ease);
}
.card__add[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: #fff; }
.card__add[aria-pressed="true"] .card__add-icon { transform: rotate(45deg); }
.card__add[aria-pressed="true"] .card__add-label::before { content: "Quitar del plan"; }
.card__add[aria-pressed="true"] .card__add-label { font-size: 0; }
.card__add[aria-pressed="true"] .card__add-label::before { font-size: 11px; }

/* Estado vacío */
.catalog__empty {
  text-align: center;
  padding: clamp(var(--sp-8), 6vw, var(--sp-10)) var(--sp-4);
  border: var(--bw) dashed var(--line-strong); border-radius: var(--radius);
  display: grid; gap: var(--sp-3); justify-items: center;
}
.catalog__empty[hidden] { display: none; }
.catalog__empty-title {
  font-family: var(--font-display); font-weight: 600;
  font-size: clamp(22px, 2vw, 28px); letter-spacing: -0.02em;
}
.catalog__empty p { color: var(--fg-mute); }
.catalog__empty .btn { margin-top: var(--sp-3); }

/* ============================================================
   CONTACTO
   ============================================================ */
.contacto__grid {
  display: grid;
  grid-template-columns: 5fr 7fr;
  gap: clamp(var(--sp-8), 7vw, var(--sp-10));
  align-items: start;
}
.contacto__h2 { margin-top: var(--sp-5); margin-bottom: var(--sp-5); }
.contacto__desc {
  font-size: 16px; line-height: 1.6; color: var(--fg-mute);
  margin-bottom: var(--sp-7); max-width: 36ch;
}
.contacto__email {
  display: inline-flex; align-items: center; gap: var(--sp-3);
  font-family: var(--font-mono); font-size: clamp(13px, 1.2vw, 16px);
  letter-spacing: 0.02em;
  color: var(--ink); text-decoration: none;
  border-bottom: 2px solid var(--accent); padding-bottom: 3px;
  transition: color .2s var(--ease);
}
.contacto__email:hover { color: var(--accent); }
.contacto__email .arrow { width: 11px; height: 11px; color: var(--accent); transition: transform .3s var(--ease); }
.contacto__email:hover .arrow { transform: translateX(3px); }

.contacto__form { display: grid; gap: var(--sp-4); }
.contacto__submit { width: 100%; justify-content: center; margin-top: var(--sp-2); }
.form-success {
  display: grid;
  gap: var(--sp-4);
  padding: var(--sp-5);
  background: color-mix(in srgb, var(--accent) 7%, var(--paper));
  border: var(--bw) solid color-mix(in srgb, var(--accent) 35%, var(--line));
  border-radius: var(--radius);
}
.form-success__mark {
  font-size: 18px; width: 48px; height: 48px;
  display: grid; place-items: center;
  background: rgba(217,45,32,.1); color: var(--accent); border-radius: 999px;
}
.form-success h3 {
  font-family: var(--font-display); font-weight: 600;
  font-size: 24px; letter-spacing: -0.02em;
}
.form-success p { color: var(--fg-mute); font-size: 15px; }

@media (max-width: 860px) {
  .contacto__grid { grid-template-columns: 1fr; }
}

/* ============================================================
   EMPRESAS E INSTITUCIONES
   ============================================================ */
.empresas__head { margin-bottom: clamp(var(--sp-7), 5vw, var(--sp-9)); }
.empresas__h2 {
  color: var(--fg-invert);
  margin-top: var(--sp-5);
}
.empresas__body {
  display: grid;
  grid-template-columns: 6fr 5fr;
  gap: clamp(var(--sp-8), 7vw, var(--sp-10));
  align-items: start;
}
.empresas__bajada {
  font-family: var(--font-display); font-weight: 600;
  font-size: clamp(17px, 1.4vw, 20px);
  letter-spacing: -0.015em; line-height: 1.3;
  color: var(--fg-invert); margin-bottom: var(--sp-5);
}
.empresas__para {
  font-size: 15px; line-height: 1.7;
  color: var(--grey-200); margin-bottom: var(--sp-7);
}
/* btn--ghost en .invert ya hereda los colores correctos */

.empresas__mods {
  list-style: none;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  border: var(--bw) solid rgba(251,247,240,.12);
}
.empresas__mod {
  display: flex; flex-direction: column; gap: var(--sp-3);
  padding: var(--sp-6) var(--sp-5);
  border-right: var(--bw) solid rgba(251,247,240,.12);
  border-bottom: var(--bw) solid rgba(251,247,240,.12);
}
.empresas__mods .empresas__mod:nth-child(2n)        { border-right: 0; }
.empresas__mods .empresas__mod:nth-last-child(-n+2) { border-bottom: 0; }
.empresas__mod-num {
  font-family: var(--font-mono); font-size: 11px;
  letter-spacing: 0.08em; color: var(--accent);
}
.empresas__mod-label {
  font-family: var(--font-display); font-weight: 600;
  font-size: clamp(16px, 1.5vw, 22px);
  letter-spacing: -0.015em; line-height: 1.2;
  color: var(--fg-invert);
}

/* ============================================================
   PREFOOTER CTA
   ============================================================ */
.prefooter { background: var(--accent); color: var(--on-accent); }
.prefooter .eyebrow { color: rgba(255,255,255,.7); }
.prefooter .eyebrow::before { background: var(--on-accent); }
.prefooter .btn--ghost { border-color: var(--on-accent); color: var(--on-accent); }
.prefooter .btn--ghost:hover { background: var(--on-accent); color: var(--accent); }
.prefooter__inner { padding-block: clamp(var(--sp-8), 9vw, var(--sp-11)); }
.prefooter h2 { max-width: 18ch; margin-block: var(--sp-5) var(--sp-6); color: var(--on-accent); }

/* UMH stamp (usado en Cómo y Footer) */
.umh-seal__mark {
  font-family: var(--font-mono); font-size: 11px; font-weight: 600;
  letter-spacing: 0.08em; color: var(--on-accent);
  background: var(--umh-granate); padding: 5px 8px;
  border-radius: var(--radius); flex-shrink: 0;
}
.como__backing {
  display: flex; align-items: center; gap: var(--sp-4);
  margin-top: var(--sp-7); padding-top: var(--sp-5);
  border-top: var(--bw) solid var(--line);
  font-size: 14px; color: var(--fg-mute); max-width: 60ch;
}

/* ============================================================
   FOOTER — estructura Namedly
   ============================================================ */
.site-foot {
  background: var(--bg-invert); color: var(--fg-invert);
  padding-block: clamp(var(--sp-8), 7vw, var(--sp-10)) var(--sp-6);
}

/* Grid: columna izquierda ancha + 3 columnas de nav */
.foot__grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr 1fr;
  gap: clamp(var(--sp-6), 4vw, var(--sp-9));
  padding-bottom: clamp(var(--sp-7), 5vw, var(--sp-9));
  border-bottom: var(--bw) solid rgba(240,239,235,.12);
}

/* Columna izquierda */
.foot__left {
  display: flex; flex-direction: column; gap: var(--sp-5);
}
.foot__logo {
  font-family: var(--font-display); font-weight: 800;
  font-size: 22px; letter-spacing: -0.01em;
  color: var(--fg-invert); text-decoration: none;
}
.foot__desc {
  font-size: 14px; line-height: 1.6;
  color: var(--grey-200); max-width: 34ch;
}
.foot__social {
  display: flex; gap: var(--sp-3); margin-top: var(--sp-2);
}
.foot__social-link {
  display: flex; align-items: center; justify-content: center;
  width: 36px; height: 36px;
  border: var(--bw) solid rgba(240,239,235,.20);
  border-radius: var(--radius); color: var(--grey-200);
  text-decoration: none;
  transition: border-color .2s var(--ease), color .2s var(--ease);
}
.foot__social-link:hover { border-color: var(--fg-invert); color: var(--fg-invert); }

/* Columnas de nav */
.foot__col { display: flex; flex-direction: column; gap: var(--sp-4); }
.foot__col-label {
  font-family: var(--font-mono); font-size: 11px;
  letter-spacing: 0.09em; text-transform: uppercase;
  color: var(--grey-300); display: block;
}
.foot__links {
  list-style: none; display: flex; flex-direction: column; gap: var(--sp-3);
}
.foot__links a,
.foot__link-btn {
  font-size: 14px; color: var(--grey-200);
  text-decoration: none; background: transparent; border: 0;
  padding: 0; cursor: pointer; text-align: left;
  font-family: var(--font-display);
  transition: color .2s var(--ease);
}
.foot__links a:hover,
.foot__link-btn:hover { color: var(--fg-invert); }

/* Barra inferior */
.foot__bottom {
  display: flex; align-items: center;
  justify-content: space-between; flex-wrap: wrap;
  gap: var(--sp-4); padding-top: var(--sp-5);
}
/* Logo UMH en footer oscuro: invert + screen elimina el fondo blanco */
.foot__umh-logo-link { display: inline-flex; align-items: center; }
.foot__umh-logo {
  width: 130px; height: auto;
  filter: invert(1);
  mix-blend-mode: screen;
  opacity: 0.65;
  transition: opacity .2s var(--ease);
}
.foot__umh-logo-link:hover .foot__umh-logo { opacity: 0.9; }

/* Logo UMH en menú overlay (fondo crema): negro discreto */
.menu-umh-logo {
  width: 110px; height: auto;
  filter: brightness(0);
  opacity: 0.35;
  transition: opacity .2s var(--ease);
}
.menu-umh-logo:hover { opacity: 0.6; }

.umh-foot {
  display: inline-flex; align-items: center; gap: var(--sp-3);
  font-family: var(--font-mono); font-size: 11px;
  letter-spacing: 0.06em; text-transform: uppercase; color: var(--grey-300);
}
.foot__copy {
  font-family: var(--font-mono); font-size: 11px;
  letter-spacing: 0.04em; text-transform: uppercase; color: var(--grey-300);
}

/* ============================================================
   BARRA FLOTANTE
   ============================================================ */
.selbar {
  position: fixed; left: 50%;
  bottom: clamp(var(--sp-4), 3vw, var(--sp-6));
  transform: translateX(-50%); z-index: 90;
  display: flex; align-items: center; gap: var(--sp-5);
  background: var(--ink); color: var(--fg-invert);
  padding: 12px 12px 12px var(--sp-5);
  border-radius: 999px;
  box-shadow: 0 16px 50px rgba(28,23,20,.32);
  animation: selbar-in 360ms var(--ease);
  max-width: calc(100vw - var(--sp-6));
}
.selbar[hidden] { display: none; }
@keyframes selbar-in {
  from { transform: translateX(-50%) translateY(120%); opacity: 0; }
  to   { transform: translateX(-50%) translateY(0); opacity: 1; }
}
.selbar__text {
  font-family: var(--font-mono); font-size: 12px;
  letter-spacing: 0.04em; display: flex; align-items: center; gap: var(--sp-3);
}
.selbar__count {
  font-weight: 600; background: var(--accent); color: #fff;
  min-width: 22px; height: 22px;
  display: inline-grid; place-items: center;
  border-radius: 999px; padding-inline: 5px;
}
.selbar__btn {
  border-radius: 999px;
  padding: 12px 20px;
}

/* ============================================================
   DRAWER
   ============================================================ */
.drawer { position: fixed; inset: 0; z-index: 150; }
.drawer[hidden] { display: none; }
.drawer__overlay {
  position: absolute; inset: 0;
  background: rgba(28,23,20,.45); backdrop-filter: blur(3px);
  animation: fade-in 240ms var(--ease);
}
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }

.drawer__panel {
  position: absolute; top: 0; right: 0;
  height: 100%; width: min(480px, 100%);
  background: var(--paper); display: flex; flex-direction: column;
  box-shadow: -20px 0 60px rgba(28,23,20,.2);
  animation: drawer-in 360ms var(--ease);
}
@keyframes drawer-in { from { transform: translateX(100%); } to { transform: translateX(0); } }

.drawer__head {
  display: flex; align-items: flex-start; justify-content: space-between;
  padding: var(--sp-6) var(--sp-6) var(--sp-4);
  border-bottom: var(--bw) solid var(--line-strong);
}
.drawer__title {
  font-family: var(--font-display); font-weight: 600;
  font-size: 28px; letter-spacing: -0.02em; margin-top: var(--sp-2);
}
.drawer__close {
  font-size: 28px; line-height: 1; background: transparent;
  border: 0; cursor: pointer; color: var(--ink); padding: 4px;
}
.drawer__scroll { overflow-y: auto; padding: var(--sp-5) var(--sp-6) var(--sp-8); flex-grow: 1; }

.drawer__list { list-style: none; display: grid; gap: var(--sp-3); margin-bottom: var(--sp-5); }
.drawer__item {
  display: grid; grid-template-columns: 1fr auto;
  gap: var(--sp-2) var(--sp-4); align-items: start;
  background: var(--surface); border: var(--bw) solid var(--line-strong);
  border-radius: var(--radius); padding: var(--sp-4);
}
.drawer__item-code {
  font-family: var(--font-mono); font-size: 10px;
  letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--fg-mute); grid-column: 1 / 2;
}
.drawer__item-title {
  font-family: var(--font-display); font-weight: 600;
  font-size: 16px; letter-spacing: -0.01em;
  line-height: 1.2; grid-column: 1 / 2;
}
.drawer__item-ects {
  font-family: var(--font-mono); font-size: 10px;
  letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--fg-mute); grid-column: 1 / 2;
}
.drawer__item-remove {
  grid-column: 2 / 3; grid-row: 1 / 4; align-self: center;
  background: transparent; border: var(--bw) solid var(--line-strong);
  border-radius: 999px; width: 28px; height: 28px;
  cursor: pointer; font-size: 16px; line-height: 1; color: var(--ink);
  transition: all 200ms var(--ease);
}
.drawer__item-remove:hover { background: var(--ink); color: var(--paper); border-color: var(--ink); }

.drawer__empty { color: var(--fg-mute); font-size: 15px; padding: var(--sp-4) 0 var(--sp-5); }
.drawer__empty[hidden] { display: none; }

/* Mini-catálogo (estado vacío del drawer) */
.drawer__catalog[hidden] { display: none; }
.drawer__cat-hint {
  font-size: 13px; color: var(--fg-mute); line-height: 1.5;
  padding-bottom: var(--sp-4);
  border-bottom: var(--bw) solid var(--line);
  margin-bottom: var(--sp-2);
}
.drawer__cat-item {
  display: flex; align-items: center;
  justify-content: space-between; gap: var(--sp-4);
  padding: var(--sp-3) 0;
  border-bottom: var(--bw) solid var(--line);
}
.drawer__cat-item.is-selected .drawer__cat-title { color: var(--accent); }
.drawer__cat-item:last-child { border-bottom: 0; }
.drawer__cat-info {
  display: flex; flex-direction: column; gap: 3px;
  min-width: 0; flex: 1;
}
.drawer__cat-code {
  font-family: var(--font-mono); font-size: 10px;
  letter-spacing: 0.08em; text-transform: uppercase; color: var(--fg-mute);
}
.drawer__cat-title {
  font-family: var(--font-display); font-weight: 600;
  font-size: 14px; letter-spacing: -0.01em;
  line-height: 1.2; color: var(--ink);
}
.drawer__cat-meta {
  font-family: var(--font-mono); font-size: 10px;
  letter-spacing: 0.04em; text-transform: uppercase; color: var(--fg-mute);
}
.drawer__cat-add {
  flex-shrink: 0; width: 32px; height: 32px;
  border: var(--bw) solid var(--ink); border-radius: 999px;
  font-size: 20px; line-height: 0; color: var(--ink);
  display: inline-grid; place-items: center;
  transition: background 200ms var(--ease), color 200ms var(--ease);
}
.drawer__cat-add:hover { background: var(--ink); color: var(--paper); }
.drawer__cat-add[aria-pressed="true"] {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

/* Formulario */
.lead-form { display: grid; gap: var(--sp-4); }
.lead-form[hidden] { display: none; }
.lead-form__intro {
  font-size: 13px; color: var(--fg-mute);
  padding-top: var(--sp-4); border-top: var(--bw) solid var(--line);
}
.field { display: grid; gap: 6px; }
.field label {
  font-family: var(--font-mono); font-size: 11px;
  letter-spacing: 0.07em; text-transform: uppercase; color: var(--ink);
}
.field__opt { color: var(--fg-mute); }
.field input, .field select, .field textarea {
  font-family: var(--font-display); font-size: 15px; letter-spacing: -0.01em;
  padding: 10px 14px; background: var(--surface);
  border: var(--bw) solid var(--line-strong);
  border-radius: var(--radius); color: var(--ink); width: 100%;
}
.field textarea { resize: vertical; }
.field--hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.field__error {
  color: #B02A2A; font-family: var(--font-mono);
  font-size: 10px; letter-spacing: 0.04em; min-height: 14px;
}
.field input[aria-invalid="true"],
.field select[aria-invalid="true"] { border-color: #B02A2A; }

.consent {
  display: grid; grid-template-columns: auto 1fr;
  gap: var(--sp-3); align-items: start;
  font-size: 13px; color: var(--fg-mute); line-height: 1.5;
}
.consent input { margin-top: 2px; accent-color: var(--accent); }
.lead-form__submit { width: 100%; justify-content: center; margin-top: var(--sp-2); }

/* Éxito */
.drawer__success {
  display: grid; gap: var(--sp-4); justify-items: start;
  padding: var(--sp-5);
  background: color-mix(in srgb, var(--accent) 7%, var(--paper));
  border: var(--bw) solid color-mix(in srgb, var(--accent) 35%, var(--line));
  border-radius: var(--radius);
}
.drawer__success[hidden] { display: none; }
.drawer__success[data-sent="false"] {
  background: transparent;
  border-color: var(--line);
}
.drawer__success [hidden] { display: none; }
.drawer__success-mark {
  font-size: 18px; width: 48px; height: 48px;
  display: grid; place-items: center;
  background: rgba(217,45,32,.1); color: var(--accent); border-radius: 999px;
}
.drawer__success h3 {
  font-family: var(--font-display); font-weight: 600;
  font-size: 24px; letter-spacing: -0.02em;
}
.drawer__success p { color: var(--fg-mute); font-size: 15px; }
.drawer__success .btn { width: 100%; justify-content: center; }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1024px) {
  .catalog__layout { grid-template-columns: 1fr; }
  .filters { position: static; }
}

@media (max-width: 860px) {
  .site-head .wrap { padding-inline: var(--sp-4); }

  .head-actions { gap: var(--sp-2); }

  /* En móvil: ocultar el texto del menú, solo icono hamburger */
  .head-menu__text { display: none; }
  .head-menu__sep  { display: none; }
  .head-menu__icon { padding-inline: var(--sp-4); }

  .head-cta {
    gap: var(--sp-3);
    padding-inline: var(--sp-4);
  }
  .head-cta__label { display: none; }

  .menu-overlay {
    display: block;
    overflow: hidden;
  }
  .menu-overlay__backdrop { display: none; }
  .menu-overlay__panel {
    width: 100%;
    max-width: none;
    height: 100dvh;
    overflow-x: hidden;
  }
  .menu-overlay__bar {
    padding-inline: var(--sp-5);
  }
  .menu-overlay__nav {
    padding-inline: var(--sp-5);
  }
  .menu-nav__item {
    font-size: clamp(28px, 8vw, 36px);
    letter-spacing: -0.025em;
  }
  .menu-nav__count {
    min-width: 30px;
    height: 30px;
    font-size: 12px;
  }
  .menu-overlay__foot {
    grid-template-columns: 1fr;
  }
  .menu-foot__col {
    padding: var(--sp-5);
    min-width: 0;
  }
  .menu-foot__col:first-child {
    border-right: 0;
    border-bottom: var(--bw) solid var(--line);
  }

  /* Hero B: colapsar a 1 col */
  .hero__left, .hero__right { grid-column: 1 / -1; }
  .hero__panel { min-height: 280px; }

  /* Mosaico */
  .mosaic__cell--lg,
  .mosaic__cell--md,
  .mosaic__cell--sm,
  .mosaic__cell--half { grid-column: 1 / -1; }

  /* Testimonios */
  .testi__grid { grid-template-columns: 1fr; }
  .testi__item { border-right: 0 !important; border-bottom: var(--bw) solid var(--line); }
  .testi__grid .testi__item:last-child { border-bottom: 0; }

  /* Colaboradores */
  .colabs__grid { grid-template-columns: repeat(2, 1fr); }
  .colab__item:nth-child(2n) { border-right: 0; }
  .colab__item:nth-child(4n) { border-right: var(--bw) solid var(--line); }
  .colab__item:nth-last-child(-n+4) { border-bottom: var(--bw) solid var(--line); }
  .colab__item:nth-last-child(-n+2) { border-bottom: 0; }

  /* Perfiles: 4 cols → 2 cols */
  .perfiles__grid { grid-template-columns: repeat(2, 1fr); grid-auto-rows: auto; }
  .perfiles__grid .perfil__item { min-height: 90px; }
  .perfiles__grid .perfil__item:nth-child(4n) { border-right: var(--bw) solid var(--line); }
  .perfiles__grid .perfil__item:nth-child(2n) { border-right: 0; }
  .perfiles__grid .perfil__item:nth-last-child(-n+4) { border-bottom: var(--bw) solid var(--line); }
  .perfiles__grid .perfil__item:nth-last-child(-n+2) { border-bottom: 0; }

  /* Svc grid: 1 col en móvil */
  .svc__grid { grid-template-columns: 1fr; }
  .svc__item { border-right: 0 !important; }
  .svc__grid .svc__item:nth-last-child(-n+3) { border-bottom: var(--bw) solid var(--line); }
  .svc__grid .svc__item:last-child { border-bottom: 0; }

  .svc__head { grid-template-columns: 1fr; }
  .svc__head-title, .svc__head-note { grid-column: 1 / -1; }

  /* Empresas */
  .empresas__body { grid-template-columns: 1fr; }

  .foot__grid { grid-template-columns: 1fr 1fr; }
  .foot__left { grid-column: 1 / -1; }

  .selbar {
    left: var(--sp-4);
    right: var(--sp-4);
    transform: none;
    justify-content: space-between;
    max-width: none;
  }
  .selbar__btn-extra { display: none; }
  @keyframes selbar-in {
    from { transform: translateY(120%); opacity: 0; }
    to   { transform: translateY(0); opacity: 1; }
  }
}

@media (max-width: 640px) {
  .foot__grid { grid-template-columns: 1fr 1fr; }
  .foot__left { grid-column: 1 / -1; }
  .cards { grid-template-columns: 1fr; }
}

/* ============================================================
   REDUCED MOTION
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}
