/* ==========================================================================
   RASCER — Consultores Empresariales
   Sistema de diseño 2026
   Paleta derivada del logo original: rojo del abanico + azul del wordmark.
   ========================================================================== */

/* ---------- Tokens ---------- */
:root {
  /* Marca */
  --red-500: #d3312a;
  --red-600: #b8241e;
  --red-400: #e8534b;
  --blue-700: #12518f;
  --blue-600: #1b6fc0;
  --blue-500: #2f8ada;
  --blue-400: #56a9e8;

  /* Superficies */
  --ink-900: #060d16;
  --ink-800: #0a1420;
  --ink-700: #0f1e2e;
  --ink-600: #16293c;
  --line: rgba(255, 255, 255, 0.09);
  --line-solid: #e3e8ef;

  --paper: #ffffff;
  --paper-alt: #f5f7fa;
  --paper-tint: #eef3f9;

  /* Texto */
  --text-900: #0b1622;
  --text-700: #33465c;
  --text-500: #64748b;
  --text-inv: #ffffff;
  --text-inv-dim: rgba(255, 255, 255, 0.66);

  /* Tipografía */
  --font-display: "Sora", ui-sans-serif, system-ui, -apple-system, sans-serif;
  --font-body: "Inter", ui-sans-serif, system-ui, -apple-system, sans-serif;

  /* Escala fluida */
  --step--1: clamp(0.82rem, 0.79rem + 0.14vw, 0.9rem);
  --step-0: clamp(1rem, 0.96rem + 0.18vw, 1.09rem);
  --step-1: clamp(1.2rem, 1.11rem + 0.42vw, 1.45rem);
  --step-2: clamp(1.5rem, 1.32rem + 0.85vw, 2rem);
  --step-3: clamp(1.9rem, 1.55rem + 1.6vw, 2.9rem);
  --step-4: clamp(2.2rem, 1.6rem + 2.7vw, 3.6rem);
  --step-5: clamp(2.5rem, 1.75rem + 3.3vw, 4rem);

  /* Espaciado */
  --gutter: clamp(1.15rem, 4vw, 2.5rem);
  --section-y: clamp(4.5rem, 9vw, 8.5rem);
  --max: 1240px;
  --max-narrow: 780px;

  /* Radios y sombras */
  --r-sm: 8px;
  --r-md: 14px;
  --r-lg: 22px;
  --r-xl: 32px;
  --shadow-sm: 0 1px 2px rgba(11, 22, 34, 0.06), 0 4px 12px rgba(11, 22, 34, 0.05);
  --shadow-md: 0 2px 6px rgba(11, 22, 34, 0.06), 0 14px 34px rgba(11, 22, 34, 0.09);
  --shadow-lg: 0 4px 12px rgba(11, 22, 34, 0.07), 0 30px 70px rgba(11, 22, 34, 0.14);
  --shadow-red: 0 10px 30px rgba(211, 49, 42, 0.28);

  /* Motion */
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
  --spring: cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* ---------- Reset ---------- */
*,
*::before,
*::after { box-sizing: border-box; }

* { margin: 0; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 92px;
}

body {
  font-family: var(--font-body);
  font-size: var(--step-0);
  line-height: 1.65;
  color: var(--text-700);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

img,
svg,
video,
canvas { display: block; max-width: 100%; }

img { height: auto; }

input,
button,
textarea,
select { font: inherit; color: inherit; }

button { background: none; border: 0; cursor: pointer; }

a { color: inherit; text-decoration: none; }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  color: var(--text-900);
  line-height: 1.1;
  letter-spacing: -0.025em;
  font-weight: 600;
  text-wrap: balance;
}

p { text-wrap: pretty; }

ul { list-style: none; padding: 0; }

::selection { background: var(--red-500); color: #fff; }

:focus-visible {
  outline: 2px solid var(--blue-500);
  outline-offset: 3px;
  border-radius: 4px;
}

/* ---------- Layout ---------- */
.wrap {
  width: 100%;
  max-width: var(--max);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.section { padding-block: var(--section-y); }

.section--tint { background: var(--paper-alt); }

.section--dark {
  background: var(--ink-800);
  color: var(--text-inv-dim);
}

.section--dark h2,
.section--dark h3,
.section--dark h4 { color: #fff; }

.skip {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--ink-800);
  color: #fff;
  padding: 0.85rem 1.4rem;
  z-index: 999;
  border-radius: 0 0 var(--r-sm) 0;
}
.skip:focus { left: 0; }

/* ---------- Tipografía utilitaria ---------- */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--font-display);
  font-size: var(--step--1);
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--red-500);
  margin-bottom: 1.1rem;
}

.eyebrow::before {
  content: "";
  width: 26px;
  height: 2px;
  background: currentColor;
  border-radius: 2px;
}

.section--dark .eyebrow { color: var(--red-400); }

.h-display { font-size: var(--step-4); }
.h-1 { font-size: var(--step-3); }
.h-2 { font-size: var(--step-2); }
.h-3 { font-size: var(--step-1); }

.lede {
  font-size: var(--step-1);
  line-height: 1.55;
  color: var(--text-700);
  max-width: 62ch;
}

.section--dark .lede { color: var(--text-inv-dim); }

.muted { color: var(--text-500); }

.section-head { max-width: 64ch; margin-bottom: clamp(2.5rem, 5vw, 4rem); }

.section-head--center {
  margin-inline: auto;
  text-align: center;
}
.section-head--center .eyebrow { justify-content: center; }
.section-head--center .lede { margin-inline: auto; }

/* ---------- Botones ---------- */
.btn {
  --btn-bg: var(--red-500);
  --btn-fg: #fff;
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  padding: 0.95rem 1.75rem;
  font-family: var(--font-display);
  font-size: var(--step--1);
  font-weight: 600;
  letter-spacing: 0.01em;
  color: var(--btn-fg);
  background: var(--btn-bg);
  border-radius: 999px;
  overflow: hidden;
  isolation: isolate;
  transition: transform 0.35s var(--spring), box-shadow 0.35s var(--ease-out),
    background-color 0.3s var(--ease-out), color 0.3s var(--ease-out);
  will-change: transform;
}

.btn::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(115deg, var(--red-400), var(--red-600));
  opacity: 0;
  transition: opacity 0.35s var(--ease-out);
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-red);
}
.btn:hover::after { opacity: 1; }
.btn:active { transform: translateY(0) scale(0.985); }

.btn__icon {
  transition: transform 0.35s var(--spring);
  flex: none;
}
.btn:hover .btn__icon { transform: translateX(3px); }

.btn--ghost {
  --btn-bg: transparent;
  --btn-fg: var(--text-900);
  box-shadow: inset 0 0 0 1.5px rgba(11, 22, 34, 0.16);
}
.btn--ghost::after { background: var(--ink-800); }
.btn--ghost:hover {
  --btn-fg: #fff;
  box-shadow: var(--shadow-md);
}

.btn--ghost-inv {
  --btn-bg: transparent;
  --btn-fg: #fff;
  box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, 0.28);
}
.btn--ghost-inv::after { background: #fff; }
.btn--ghost-inv:hover {
  --btn-fg: var(--ink-900);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
}

.btn--lg { padding: 1.1rem 2.15rem; font-size: var(--step-0); }

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  align-items: center;
}

/* Enlace con subrayado animado */
.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: var(--step--1);
  color: var(--blue-600);
  position: relative;
}
.link-arrow::before {
  content: "";
  position: absolute;
  left: 0;
  bottom: -3px;
  width: 100%;
  height: 1.5px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.4s var(--ease-out);
}
.link-arrow:hover::before { transform: scaleX(1); transform-origin: left; }
.link-arrow svg { transition: transform 0.35s var(--spring); }
.link-arrow:hover svg { transform: translateX(4px); }

/* ==========================================================================
   Header
   ========================================================================== */
.header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100;
  transition: transform 0.5s var(--ease-out), background-color 0.4s var(--ease-out),
    box-shadow 0.4s var(--ease-out), backdrop-filter 0.4s var(--ease-out);
}

.header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  height: 86px;
  transition: height 0.4s var(--ease-out);
}

.header.is-stuck {
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: saturate(180%) blur(18px);
  -webkit-backdrop-filter: saturate(180%) blur(18px);
  box-shadow: 0 1px 0 rgba(11, 22, 34, 0.07), 0 12px 34px rgba(11, 22, 34, 0.07);
}
.header.is-stuck .header__inner { height: 70px; }

.header.is-hidden { transform: translateY(-100%); }

.logo {
  display: flex;
  align-items: center;
  flex: none;
  transition: transform 0.4s var(--spring);
}
.logo:hover { transform: scale(1.03); }
.logo img {
  height: 42px;
  width: auto;
  transition: height 0.4s var(--ease-out);
}
.header.is-stuck .logo img { height: 36px; }

/* Sobre hero oscuro: el logo se invierte a blanco hasta que el header se fija */
.header:not(.is-stuck) .logo img { filter: brightness(0) invert(1); }
.page--light-header .header:not(.is-stuck) .logo img { filter: none; }

.nav { display: flex; align-items: center; gap: clamp(1rem, 2.4vw, 2.1rem); }

.nav__link {
  position: relative;
  font-family: var(--font-display);
  font-size: var(--step--1);
  font-weight: 500;
  letter-spacing: 0.01em;
  color: rgba(255, 255, 255, 0.82);
  padding-block: 0.4rem;
  transition: color 0.3s var(--ease-out);
  white-space: nowrap;
}
.header.is-stuck .nav__link,
.page--light-header .header:not(.is-stuck) .nav__link { color: var(--text-700); }

.nav__link::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 2px;
  border-radius: 2px;
  background: var(--red-500);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.4s var(--ease-out);
}
.nav__link:hover::after,
.nav__link[aria-current="page"]::after { transform: scaleX(1); transform-origin: left; }

.nav__link:hover,
.header.is-stuck .nav__link:hover { color: var(--red-500); }
.nav__link[aria-current="page"] { color: #fff; }
.header.is-stuck .nav__link[aria-current="page"],
.page--light-header .header:not(.is-stuck) .nav__link[aria-current="page"] { color: var(--text-900); }

.header__cta { flex: none; }
@media (max-width: 1000px) { .header__cta { display: none; } }

/* Botón hamburguesa */
.burger {
  display: none;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  align-items: center;
  justify-content: center;
  flex: none;
  transition: background-color 0.3s var(--ease-out);
}
.burger:hover { background: rgba(127, 127, 127, 0.14); }
.burger__box { width: 22px; height: 14px; position: relative; }
.burger__line {
  position: absolute;
  left: 0;
  width: 100%;
  height: 2px;
  border-radius: 2px;
  background: #fff;
  transition: transform 0.45s var(--spring), opacity 0.25s var(--ease-out),
    background-color 0.3s var(--ease-out);
}
.header.is-stuck .burger__line,
.page--light-header .header:not(.is-stuck) .burger__line { background: var(--text-900); }
.burger__line:nth-child(1) { top: 0; }
.burger__line:nth-child(2) { top: 6px; }
.burger__line:nth-child(3) { top: 12px; }

body.nav-open .burger__line { background: var(--text-900); }
body.nav-open .burger__line:nth-child(1) { transform: translateY(6px) rotate(45deg); }
body.nav-open .burger__line:nth-child(2) { opacity: 0; transform: scaleX(0.2); }
body.nav-open .burger__line:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

@media (max-width: 860px) {
  .burger { display: flex; }
  .nav {
    position: fixed;
    inset: 0;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    gap: 0.35rem;
    padding: 5.5rem var(--gutter) 3rem;
    background: var(--paper);
    clip-path: circle(0% at calc(100% - 46px) 46px);
    transition: clip-path 0.75s var(--ease-in-out);
    pointer-events: none;
    z-index: -1;
  }
  body.nav-open .nav {
    clip-path: circle(150% at calc(100% - 46px) 46px);
    pointer-events: auto;
  }
  .nav__link {
    font-size: var(--step-3);
    font-weight: 600;
    color: var(--text-900) !important;
    padding-block: 0.5rem;
    opacity: 0;
    transform: translateY(18px);
    transition: opacity 0.5s var(--ease-out), transform 0.6s var(--ease-out);
  }
  body.nav-open .nav__link { opacity: 1; transform: none; }
  body.nav-open .nav__link:nth-child(1) { transition-delay: 0.16s; }
  body.nav-open .nav__link:nth-child(2) { transition-delay: 0.22s; }
  body.nav-open .nav__link:nth-child(3) { transition-delay: 0.28s; }
  body.nav-open .nav__link:nth-child(4) { transition-delay: 0.34s; }
  body.nav-open .nav__link:nth-child(5) { transition-delay: 0.4s; }
  .nav__link::after { display: none; }
  .nav__mobile-foot {
    margin-top: 2.5rem;
    opacity: 0;
    transform: translateY(18px);
    transition: opacity 0.5s var(--ease-out) 0.46s, transform 0.6s var(--ease-out) 0.46s;
  }
  body.nav-open .nav__mobile-foot { opacity: 1; transform: none; }
}

.nav__mobile-foot { display: none; }
@media (max-width: 860px) { .nav__mobile-foot { display: block; } }

.nav__mobile-foot a {
  display: block;
  color: var(--text-500);
  font-size: var(--step--1);
}
.nav__mobile-foot a:hover { color: var(--red-500); }

/* ==========================================================================
   Hero
   ========================================================================== */
.hero {
  position: relative;
  min-height: min(100svh, 900px);
  display: flex;
  align-items: center;
  padding-block: 6.75rem 2.5rem;
  background: var(--ink-900);
  color: var(--text-inv-dim);
  overflow: hidden;
  isolation: isolate;
}

/* Fondo: degradado radial + malla sutil */
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -3;
  background:
    radial-gradient(120% 90% at 78% 32%, rgba(27, 111, 192, 0.4) 0%, transparent 62%),
    radial-gradient(90% 80% at 12% 88%, rgba(211, 49, 42, 0.24) 0%, transparent 60%),
    linear-gradient(165deg, #0a1725 0%, #060d16 55%, #08111c 100%);
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -2;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.028) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.028) 1px, transparent 1px);
  background-size: 58px 58px;
  mask-image: radial-gradient(80% 70% at 50% 45%, #000 20%, transparent 82%);
  -webkit-mask-image: radial-gradient(80% 70% at 50% 45%, #000 20%, transparent 82%);
}

/* Lienzo WebGL */
.hero__canvas {
  position: absolute;
  inset: 0;
  z-index: -1;
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: opacity 1.4s var(--ease-out);
}
.hero__canvas.is-ready { opacity: 1; }

/* Respaldo si no hay WebGL: el abanico del logo en CSS */
.hero__fallback {
  position: absolute;
  z-index: -1;
  right: -6%;
  top: 50%;
  width: min(46vw, 560px);
  aspect-ratio: 1;
  translate: 0 -50%;
  background: conic-gradient(from 210deg at 50% 50%, var(--red-500), var(--red-600) 40%, transparent 65%);
  border-radius: 50%;
  filter: blur(60px);
  opacity: 0.5;
  display: none;
}
.no-webgl .hero__fallback { display: block; }

.hero__inner {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
  width: 100%;
}
@media (max-width: 900px) {
  .hero__inner { grid-template-columns: 1fr; }
  .hero { min-height: auto; padding-block: 7.5rem 4.5rem; }

  /* En móvil el texto pasa por encima del abanico: lo atenuamos para que
     el titular siga siendo lo primero que se lee. */
  .hero__canvas.is-ready,
  .pagehero__canvas.is-ready { opacity: 0.5; }
}

@media (max-width: 440px) {
  /* Evita que "Más de 24 años" se parta a media frase. */
  .hero__badge { font-size: 0.8rem; padding-right: 0.9rem; }
  .hero__badge b { white-space: nowrap; }
}

.hero__badge {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.5rem 1.05rem 0.5rem 0.55rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(10px);
  font-size: var(--step--1);
  color: rgba(255, 255, 255, 0.8);
  margin-bottom: 1.6rem;
}
.hero__badge b { color: #fff; font-weight: 600; }
.hero__badge-dot {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--red-500);
  display: grid;
  place-items: center;
  flex: none;
  box-shadow: 0 0 0 0 rgba(211, 49, 42, 0.6);
  animation: pulse 2.8s var(--ease-out) infinite;
}
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(211, 49, 42, 0.55); }
  70% { box-shadow: 0 0 0 12px rgba(211, 49, 42, 0); }
  100% { box-shadow: 0 0 0 0 rgba(211, 49, 42, 0); }
}

.hero h1 {
  font-size: var(--step-5);
  color: #fff;
  font-weight: 600;
  letter-spacing: -0.035em;
  margin-bottom: 1.5rem;
}

.hero h1 .accent {
  background: linear-gradient(100deg, var(--blue-400) 0%, var(--blue-500) 45%, var(--red-400) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero__lede {
  font-size: var(--step-1);
  color: rgba(255, 255, 255, 0.7);
  max-width: 54ch;
  margin-bottom: 2.4rem;
}

/* Métricas del hero */
.hero__stats {
  display: flex;
  flex-wrap: wrap;
  gap: clamp(1.5rem, 4vw, 3rem);
  margin-top: 2.6rem;
  padding-top: 1.8rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}
.hero__stat b {
  display: block;
  font-family: var(--font-display);
  font-size: var(--step-3);
  font-weight: 600;
  color: #fff;
  line-height: 1;
  letter-spacing: -0.03em;
}
.hero__stat span {
  font-size: var(--step--1);
  color: rgba(255, 255, 255, 0.55);
  letter-spacing: 0.02em;
}

/* Tarjeta flotante del hero */
/* La tarjeta se alinea abajo para dejar respirar al abanico 3D encima. */
.hero__aside { position: relative; align-self: end; }
@media (max-width: 900px) { .hero__aside { display: none; } }

.glass-card {
  position: relative;
  padding: 1.7rem 1.8rem;
  border-radius: var(--r-lg);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.12);
  /* Blur moderado a propósito: la tarjeta flota sobre el abanico 3D y
     conviene que el rojo se siga leyendo a través del cristal. */
  backdrop-filter: blur(14px) saturate(170%);
  -webkit-backdrop-filter: blur(14px) saturate(170%);
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.35);
}

.glass-card h3 { color: #fff; font-size: var(--step-1); margin-bottom: 1.1rem; }

.glass-card ul { display: grid; gap: 0.75rem; }
.glass-card li {
  display: flex;
  gap: 0.85rem;
  align-items: flex-start;
  color: rgba(255, 255, 255, 0.74);
  font-size: var(--step--1);
  line-height: 1.5;
}
.glass-card li svg { flex: none; margin-top: 3px; color: var(--red-400); }

/* Indicador de scroll */
.scroll-hint {
  position: absolute;
  left: 50%;
  bottom: 2rem;
  translate: -50% 0;
  display: grid;
  justify-items: center;
  gap: 0.6rem;
  font-size: 0.72rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.4);
}
.scroll-hint__track {
  width: 1px;
  height: 46px;
  background: rgba(255, 255, 255, 0.18);
  position: relative;
  overflow: hidden;
}
.scroll-hint__track::after {
  content: "";
  position: absolute;
  inset: 0 auto auto 0;
  width: 100%;
  height: 40%;
  background: var(--red-500);
  animation: trickle 2.4s var(--ease-in-out) infinite;
}
@keyframes trickle {
  0% { transform: translateY(-100%); }
  60%, 100% { transform: translateY(250%); }
}
@media (max-width: 900px) { .scroll-hint { display: none; } }

/* Hero interior (páginas secundarias) */
.pagehero {
  position: relative;
  padding-block: clamp(9rem, 16vw, 12rem) clamp(3.5rem, 7vw, 6rem);
  background: var(--ink-900);
  color: var(--text-inv-dim);
  overflow: hidden;
  isolation: isolate;
}
.pagehero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(100% 100% at 82% 12%, rgba(27, 111, 192, 0.36) 0%, transparent 60%),
    radial-gradient(80% 90% at 6% 100%, rgba(211, 49, 42, 0.22) 0%, transparent 58%),
    linear-gradient(160deg, #0a1725, #060d16);
}
/* width/height explícitos: <canvas> es un elemento reemplazado, así que con
   `inset: 0` a solas conserva su tamaño intrínseco en vez de estirarse, y el
   tamaño del búfer acaba realimentando al del elemento. */
.pagehero__canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  opacity: 0;
  transition: opacity 1.4s var(--ease-out);
}
.pagehero__canvas.is-ready { opacity: 0.85; }
.pagehero h1 { color: #fff; font-size: var(--step-4); margin-bottom: 1.2rem; }
.pagehero .lede { color: rgba(255, 255, 255, 0.68); }

/* Migas de pan */
.crumbs {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  font-size: var(--step--1);
  color: rgba(255, 255, 255, 0.45);
  margin-bottom: 1.4rem;
}
.crumbs a:hover { color: #fff; }
.crumbs span { opacity: 0.5; }

/* ==========================================================================
   Servicios
   ========================================================================== */
.grid-3 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
  gap: clamp(1.1rem, 2.2vw, 1.6rem);
}

.grid-2 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 380px), 1fr));
  gap: clamp(1.5rem, 4vw, 3.5rem);
  align-items: center;
}

.svc {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: clamp(1.8rem, 3vw, 2.4rem);
  border-radius: var(--r-lg);
  background: var(--paper);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  isolation: isolate;
  transition: transform 0.55s var(--ease-out), box-shadow 0.55s var(--ease-out);
}

/* Borde degradado que aparece al hover */
.svc::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1.5px;
  background: linear-gradient(140deg, var(--red-400), var(--blue-500));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  mask-composite: exclude;
  opacity: 0;
  transition: opacity 0.5s var(--ease-out);
  z-index: 1;
  pointer-events: none;
}

/* Resplandor que sigue al cursor */
.svc::after {
  content: "";
  position: absolute;
  z-index: -1;
  width: 320px;
  height: 320px;
  border-radius: 50%;
  left: var(--mx, 50%);
  top: var(--my, 50%);
  translate: -50% -50%;
  background: radial-gradient(circle, rgba(211, 49, 42, 0.1), transparent 68%);
  opacity: 0;
  transition: opacity 0.45s var(--ease-out);
  pointer-events: none;
}

.svc:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
}
.svc:hover::before,
.svc:hover::after { opacity: 1; }

.svc__num {
  position: absolute;
  top: 1.5rem;
  right: 1.8rem;
  font-family: var(--font-display);
  font-size: 3.6rem;
  font-weight: 600;
  line-height: 1;
  color: var(--paper-tint);
  letter-spacing: -0.05em;
  transition: color 0.5s var(--ease-out), transform 0.6s var(--ease-out);
  z-index: -1;
}
.svc:hover .svc__num { color: rgba(211, 49, 42, 0.1); transform: translateY(-4px); }

.svc__icon {
  width: 56px;
  height: 56px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  background: linear-gradient(140deg, var(--ink-700), var(--ink-800));
  color: #fff;
  margin-bottom: 1.5rem;
  flex: none;
  transition: transform 0.6s var(--spring), background 0.5s var(--ease-out);
}
.svc:hover .svc__icon {
  transform: rotate(-6deg) scale(1.06);
  background: linear-gradient(140deg, var(--red-500), var(--red-600));
}

.svc h3 { font-size: var(--step-1); margin-bottom: 0.75rem; }
.svc p { font-size: var(--step--1); line-height: 1.65; margin-bottom: 1.6rem; }
.svc .link-arrow { margin-top: auto; }

/* Lista de sub-servicios */
.svc__list {
  display: grid;
  gap: 0.55rem;
  margin: 0 0 1.6rem;
}
.svc__list li {
  display: flex;
  gap: 0.6rem;
  align-items: flex-start;
  font-size: var(--step--1);
  color: var(--text-500);
  line-height: 1.5;
}
.svc__list li::before {
  content: "";
  flex: none;
  width: 5px;
  height: 5px;
  margin-top: 0.62em;
  border-radius: 50%;
  background: var(--red-500);
}

/* ==========================================================================
   Bloque con imagen
   ========================================================================== */
.media {
  position: relative;
  border-radius: var(--r-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  background: var(--paper-tint);
  aspect-ratio: 4 / 3;
}
.media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 1.2s var(--ease-out);
}
.media:hover img { transform: scale(1.045); }

.media--tall { aspect-ratio: 3 / 4; }
.media--wide { aspect-ratio: 16 / 9; }

/* Marco decorativo */
.media-frame { position: relative; }
.media-frame::before {
  content: "";
  position: absolute;
  inset: auto -18px -18px auto;
  width: 62%;
  height: 62%;
  border-radius: var(--r-lg);
  background: linear-gradient(140deg, var(--red-500), var(--blue-600));
  opacity: 0.14;
  z-index: -1;
}

/* Tarjeta de dato superpuesta */
.media-badge {
  position: absolute;
  left: clamp(1rem, 3vw, 1.8rem);
  bottom: clamp(1rem, 3vw, 1.8rem);
  padding: 1.1rem 1.5rem;
  border-radius: var(--r-md);
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(16px);
  box-shadow: var(--shadow-md);
}
.media-badge b {
  display: block;
  font-family: var(--font-display);
  font-size: var(--step-2);
  color: var(--text-900);
  line-height: 1;
  letter-spacing: -0.03em;
}
.media-badge span { font-size: var(--step--1); color: var(--text-500); }

/* ==========================================================================
   Proceso
   ========================================================================== */
.steps { display: grid; gap: 0; counter-reset: step; }

.step {
  position: relative;
  display: grid;
  grid-template-columns: 84px minmax(0, 1fr);
  gap: clamp(1.2rem, 3vw, 2.5rem);
  padding-block: clamp(1.8rem, 3.5vw, 2.6rem);
  border-top: 1px solid var(--line);
}
.step:last-child { border-bottom: 1px solid var(--line); }

.section:not(.section--dark) .step { border-color: var(--line-solid); }

.step__num {
  font-family: var(--font-display);
  font-size: var(--step-2);
  font-weight: 600;
  letter-spacing: -0.03em;
  color: var(--red-500);
  line-height: 1;
}

.step h3 { font-size: var(--step-1); margin-bottom: 0.6rem; }
.step p { max-width: 58ch; font-size: var(--step-0); }

@media (max-width: 620px) {
  .step { grid-template-columns: 1fr; gap: 0.7rem; }
}

/* ==========================================================================
   Testimonios
   ========================================================================== */
.quotes {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr));
  gap: clamp(1.1rem, 2.2vw, 1.6rem);
}

.quote {
  position: relative;
  padding: clamp(1.8rem, 3vw, 2.4rem);
  border-radius: var(--r-lg);
  background: rgba(255, 255, 255, 0.045);
  border: 1px solid rgba(255, 255, 255, 0.09);
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  transition: transform 0.5s var(--ease-out), background-color 0.5s var(--ease-out),
    border-color 0.5s var(--ease-out);
}
.quote:hover {
  transform: translateY(-5px);
  background: rgba(255, 255, 255, 0.075);
  border-color: rgba(255, 255, 255, 0.18);
}

.quote__mark {
  font-family: var(--font-display);
  font-size: 3.4rem;
  line-height: 0.7;
  color: var(--red-500);
  opacity: 0.85;
}

.quote p {
  font-size: var(--step-0);
  line-height: 1.65;
  color: rgba(255, 255, 255, 0.8);
  flex: 1;
}

.quote__who {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  padding-top: 1.2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}
.quote__avatar {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  flex: none;
  background: linear-gradient(140deg, var(--blue-600), var(--red-500));
  color: #fff;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: var(--step--1);
}
.quote__who b { display: block; color: #fff; font-weight: 600; font-size: var(--step-0); }
.quote__who span { font-size: var(--step--1); color: rgba(255, 255, 255, 0.45); }

/* ==========================================================================
   Estadísticas / franja
   ========================================================================== */
.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr));
  gap: clamp(1.5rem, 3vw, 2.5rem);
}
.stat { text-align: center; }
.stat b {
  display: block;
  font-family: var(--font-display);
  font-size: var(--step-4);
  font-weight: 600;
  line-height: 1;
  letter-spacing: -0.04em;
  background: linear-gradient(140deg, var(--blue-400), var(--red-400));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  margin-bottom: 0.5rem;
}
.stat span {
  font-size: var(--step--1);
  color: var(--text-500);
  letter-spacing: 0.03em;
}
.section--dark .stat span { color: rgba(255, 255, 255, 0.5); }

/* ==========================================================================
   Acordeón (valores / preguntas)
   ========================================================================== */
.acc { border-top: 1px solid var(--line-solid); }
.acc__item { border-bottom: 1px solid var(--line-solid); }

.acc__btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  width: 100%;
  padding-block: clamp(1.2rem, 2.4vw, 1.7rem);
  text-align: left;
  font-family: var(--font-display);
  font-size: var(--step-1);
  font-weight: 600;
  color: var(--text-900);
  letter-spacing: -0.02em;
  transition: color 0.3s var(--ease-out);
}
.acc__btn:hover { color: var(--red-500); }

.acc__sign {
  position: relative;
  flex: none;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--paper-alt);
  transition: background-color 0.4s var(--ease-out), transform 0.5s var(--spring);
}
.acc__sign::before,
.acc__sign::after {
  content: "";
  position: absolute;
  inset: 50% auto auto 50%;
  translate: -50% -50%;
  background: var(--text-900);
  border-radius: 2px;
  transition: transform 0.45s var(--spring), background-color 0.3s var(--ease-out);
}
.acc__sign::before { width: 13px; height: 1.8px; }
.acc__sign::after { width: 1.8px; height: 13px; }

.acc__item.is-open .acc__sign { background: var(--red-500); transform: rotate(180deg); }
.acc__item.is-open .acc__sign::before,
.acc__item.is-open .acc__sign::after { background: #fff; }
.acc__item.is-open .acc__sign::after { transform: scaleY(0); }

.acc__panel {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.55s var(--ease-out);
}
.acc__item.is-open .acc__panel { grid-template-rows: 1fr; }

.acc__panel > div { overflow: hidden; }
.acc__panel p {
  padding-bottom: 1.7rem;
  max-width: 68ch;
  font-size: var(--step-0);
  opacity: 0;
  transform: translateY(-6px);
  transition: opacity 0.5s var(--ease-out) 0.1s, transform 0.5s var(--ease-out) 0.1s;
}
.acc__item.is-open .acc__panel p { opacity: 1; transform: none; }

/* ==========================================================================
   Blog
   ========================================================================== */
.posts {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 330px), 1fr));
  gap: clamp(1.4rem, 3vw, 2.2rem);
}

.post {
  display: flex;
  flex-direction: column;
  border-radius: var(--r-lg);
  overflow: hidden;
  background: var(--paper);
  box-shadow: var(--shadow-sm);
  transition: transform 0.5s var(--ease-out), box-shadow 0.5s var(--ease-out);
}
.post:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); }

.post__media {
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: var(--paper-tint);
  position: relative;
}
.post__media img { width: 100%; height: 100%; object-fit: cover; transition: transform 1s var(--ease-out); }
.post:hover .post__media img { transform: scale(1.06); }

.post__tag {
  position: absolute;
  top: 1rem;
  left: 1rem;
  padding: 0.35rem 0.85rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(10px);
  font-family: var(--font-display);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--red-500);
}

.post__body {
  padding: clamp(1.3rem, 2.4vw, 1.8rem);
  display: flex;
  flex-direction: column;
  flex: 1;
  gap: 0.7rem;
}
.post__date { font-size: var(--step--1); color: var(--text-500); letter-spacing: 0.02em; }
.post h3 { font-size: var(--step-1); }
.post p { font-size: var(--step--1); line-height: 1.6; flex: 1; }
.post .link-arrow { margin-top: 0.4rem; }

/* Aviso de contenido de muestra */
.notice {
  display: flex;
  gap: 0.9rem;
  align-items: flex-start;
  padding: 1.1rem 1.4rem;
  border-radius: var(--r-md);
  background: #fff8e6;
  border: 1px solid #f5e3b3;
  color: #7a5c12;
  font-size: var(--step--1);
  line-height: 1.55;
  margin-bottom: 2.5rem;
}
.notice svg { flex: none; margin-top: 2px; }

/* ==========================================================================
   Contacto
   ========================================================================== */
.contact-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr);
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: start;
}
@media (max-width: 900px) { .contact-grid { grid-template-columns: 1fr; } }

.info-list { display: grid; gap: 1.6rem; margin-top: 2.5rem; }

.info {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr);
  gap: 1.1rem;
  align-items: start;
}
.info__icon {
  width: 46px;
  height: 46px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: var(--paper-alt);
  color: var(--red-500);
  flex: none;
  transition: background-color 0.4s var(--ease-out), color 0.4s var(--ease-out),
    transform 0.5s var(--spring);
}
.info:hover .info__icon {
  background: var(--red-500);
  color: #fff;
  transform: scale(1.06) rotate(-5deg);
}
.info h4 {
  font-size: var(--step--1);
  font-weight: 600;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--text-500);
  margin-bottom: 0.3rem;
}
.info p, .info a { font-size: var(--step-0); color: var(--text-900); line-height: 1.5; }
.info a:hover { color: var(--red-500); }

/* Formulario */
.form {
  padding: clamp(1.6rem, 3.5vw, 2.6rem);
  border-radius: var(--r-lg);
  background: var(--paper);
  box-shadow: var(--shadow-md);
  display: grid;
  gap: 1.15rem;
}

.field { position: relative; display: grid; }

.field input,
.field textarea,
.field select {
  width: 100%;
  padding: 1.35rem 1.1rem 0.6rem;
  border: 1.5px solid var(--line-solid);
  border-radius: var(--r-md);
  background: var(--paper);
  color: var(--text-900);
  transition: border-color 0.3s var(--ease-out), box-shadow 0.3s var(--ease-out);
  font-size: var(--step-0);
}
.field textarea { min-height: 130px; resize: vertical; line-height: 1.55; }

.field select { appearance: none; cursor: pointer; padding-top: 1.35rem; }

.field label {
  position: absolute;
  left: 1.15rem;
  top: 1.05rem;
  font-size: var(--step-0);
  color: var(--text-500);
  pointer-events: none;
  transform-origin: left top;
  transition: transform 0.3s var(--ease-out), color 0.3s var(--ease-out);
}

.field input:focus,
.field textarea:focus,
.field select:focus {
  outline: none;
  border-color: var(--red-500);
  box-shadow: 0 0 0 4px rgba(211, 49, 42, 0.1);
}

.field input:focus + label,
.field input:not(:placeholder-shown) + label,
.field textarea:focus + label,
.field textarea:not(:placeholder-shown) + label,
.field select:focus + label,
.field select:valid + label {
  transform: translateY(-0.72rem) scale(0.76);
  color: var(--red-500);
}

.field__chevron {
  position: absolute;
  right: 1.1rem;
  top: 50%;
  translate: 0 -50%;
  pointer-events: none;
  color: var(--text-500);
}

.form__foot {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: center;
  justify-content: space-between;
  margin-top: 0.4rem;
}
.form__note { font-size: 0.8rem; color: var(--text-500); max-width: 34ch; line-height: 1.5; }

/* Mapa */
.map {
  border-radius: var(--r-lg);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  aspect-ratio: 21 / 9;
  background: var(--paper-tint);
  margin-top: clamp(3rem, 6vw, 5rem);
}
.map iframe { width: 100%; height: 100%; border: 0; display: block; filter: grayscale(0.25) contrast(1.04); }
@media (max-width: 700px) { .map { aspect-ratio: 4 / 3; } }

/* ==========================================================================
   CTA final
   ========================================================================== */
.cta {
  position: relative;
  padding-block: clamp(4rem, 8vw, 7rem);
  overflow: hidden;
  isolation: isolate;
  background: var(--ink-800);
  text-align: center;
}
.cta::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(70% 130% at 50% 0%, rgba(27, 111, 192, 0.42), transparent 62%),
    radial-gradient(60% 120% at 88% 100%, rgba(211, 49, 42, 0.32), transparent 60%);
}
.cta h2 { color: #fff; font-size: var(--step-3); margin-bottom: 1.1rem; }
.cta p {
  color: rgba(255, 255, 255, 0.68);
  font-size: var(--step-1);
  max-width: 56ch;
  margin: 0 auto 2.4rem;
}
.cta .btn-row { justify-content: center; }

/* ==========================================================================
   Footer
   ========================================================================== */
.footer {
  background: var(--ink-900);
  color: rgba(255, 255, 255, 0.55);
  padding-block: clamp(3.5rem, 6vw, 5rem) 2rem;
  font-size: var(--step--1);
}

.footer__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) repeat(3, minmax(0, 1fr));
  gap: clamp(2rem, 4vw, 3.5rem);
  padding-bottom: 3rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.09);
}
@media (max-width: 860px) {
  .footer__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer__brand { grid-column: 1 / -1; }
}

.footer__brand img {
  height: 42px;
  width: auto;
  filter: brightness(0) invert(1);
  margin-bottom: 1.3rem;
}
.footer__brand p { max-width: 38ch; line-height: 1.65; }

.footer h4 {
  font-size: var(--step--1);
  font-weight: 600;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  color: #fff;
  margin-bottom: 1.2rem;
}

.footer ul { display: grid; gap: 0.7rem; }
.footer a { transition: color 0.3s var(--ease-out); }
.footer a:hover { color: #fff; }

.footer__social { display: flex; gap: 0.6rem; margin-top: 1.6rem; }
.footer__social a {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.07);
  color: rgba(255, 255, 255, 0.75);
  transition: background-color 0.35s var(--ease-out), color 0.35s var(--ease-out),
    transform 0.45s var(--spring);
}
.footer__social a:hover {
  background: var(--red-500);
  color: #fff;
  transform: translateY(-3px);
}

.footer__bar {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: space-between;
  align-items: center;
  padding-top: 2rem;
  font-size: 0.82rem;
  color: rgba(255, 255, 255, 0.38);
}
.footer__bar a:hover { color: #fff; }

/* WhatsApp flotante */
.wa-float {
  position: fixed;
  right: clamp(1rem, 3vw, 1.9rem);
  bottom: clamp(1rem, 3vw, 1.9rem);
  z-index: 90;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: #25d366;
  color: #fff;
  box-shadow: 0 10px 30px rgba(37, 211, 102, 0.4);
  transition: transform 0.45s var(--spring), box-shadow 0.4s var(--ease-out);
  opacity: 0;
  visibility: hidden;
  translate: 0 14px;
}
.wa-float.is-visible { opacity: 1; visibility: visible; translate: 0; }
.wa-float:hover { transform: scale(1.09); box-shadow: 0 14px 38px rgba(37, 211, 102, 0.5); }

/* ==========================================================================
   Animaciones de entrada al hacer scroll
   ========================================================================== */
[data-reveal] {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 0.9s var(--ease-out), transform 1s var(--ease-out);
  will-change: opacity, transform;
}
[data-reveal].is-in { opacity: 1; transform: none; }

[data-reveal="left"] { transform: translateX(-30px); }
[data-reveal="right"] { transform: translateX(30px); }
[data-reveal="scale"] { transform: scale(0.955); }
[data-reveal="left"].is-in,
[data-reveal="right"].is-in,
[data-reveal="scale"].is-in { transform: none; }

/* Escalonado por índice, lo aplica main.js */
[data-reveal][style*="--d"] { transition-delay: var(--d); }

/* Titular revelado línea por línea */
.reveal-lines { display: block; }
.reveal-lines .line { display: block; overflow: hidden; }
.reveal-lines .line > span {
  display: block;
  transform: translateY(105%);
  transition: transform 1.05s var(--ease-out);
}
.reveal-lines.is-in .line > span { transform: none; }
.reveal-lines.is-in .line:nth-child(2) > span { transition-delay: 0.09s; }
.reveal-lines.is-in .line:nth-child(3) > span { transition-delay: 0.18s; }

/* ==========================================================================
   Accesibilidad: respetar preferencia de movimiento reducido
   ========================================================================== */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  [data-reveal] { opacity: 1 !important; transform: none !important; }
  .reveal-lines .line > span { transform: none !important; }
  .hero__canvas, .pagehero__canvas { opacity: 1; }
}

/* ---------- Impresión ---------- */
@media print {
  .header, .wa-float, .hero__canvas, .scroll-hint, .cta { display: none !important; }
  body { color: #000; background: #fff; }
}

/* ==========================================================================
   COMPONENTES DE WORDPRESS
   Todo lo que el sitio estático no necesitaba: contenido del editor,
   avisos del formulario, paginación, buscador, etiquetas y accesibilidad.
   ========================================================================== */

/* ---------- Accesibilidad ---------- */
.screen-reader-text {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.screen-reader-text:focus {
  position: static !important;
  width: auto;
  height: auto;
  margin: 0;
  clip: auto;
  white-space: normal;
}

/* Trampa antibots del formulario: fuera de vista, nunca display:none
   (algunos bots ignoran los campos ocultos así). */
.trampa {
  position: absolute !important;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* ---------- Contenido del editor ---------- */
.entry {
  font-size: var(--step-0);
  line-height: 1.75;
}

.entry > * + * { margin-top: 1.35em; }

.entry h2 {
  font-size: var(--step-2);
  margin-top: 2.2em;
  margin-bottom: 0.1em;
}

.entry h3 {
  font-size: var(--step-1);
  margin-top: 1.9em;
  margin-bottom: 0.1em;
}

.entry h4 {
  font-size: var(--step-0);
  font-weight: 600;
  margin-top: 1.7em;
}

.entry a {
  color: var(--blue-600);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
  transition: color 0.3s var(--ease-out);
}
.entry a:hover { color: var(--red-500); }

.entry ul,
.entry ol {
  padding-left: 1.4em;
  display: grid;
  gap: 0.55em;
}
.entry ul { list-style: disc; }
.entry ol { list-style: decimal; }
.entry li::marker { color: var(--red-500); }

.entry blockquote {
  padding: 1.4rem 1.7rem;
  border-left: 3px solid var(--red-500);
  background: var(--paper-alt);
  border-radius: 0 var(--r-md) var(--r-md) 0;
  font-size: var(--step-1);
  line-height: 1.6;
  color: var(--text-900);
}
.entry blockquote p + p { margin-top: 0.8em; }
.entry blockquote cite {
  display: block;
  margin-top: 0.9em;
  font-size: var(--step--1);
  font-style: normal;
  color: var(--text-500);
}

.entry img,
.entry figure { border-radius: var(--r-md); }

.entry figure { margin-block: 2em; }

.entry figcaption {
  margin-top: 0.7em;
  font-size: var(--step--1);
  color: var(--text-500);
  text-align: center;
}

.entry code {
  padding: 0.15em 0.4em;
  border-radius: 5px;
  background: var(--paper-tint);
  font-size: 0.9em;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}

.entry pre {
  padding: 1.3rem 1.5rem;
  border-radius: var(--r-md);
  background: var(--ink-800);
  color: #e6edf5;
  overflow-x: auto;
  font-size: var(--step--1);
  line-height: 1.6;
}
.entry pre code { background: none; padding: 0; color: inherit; }

.entry table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--step--1);
}
.entry table th,
.entry table td {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--line-solid);
  text-align: left;
}
.entry table th {
  font-family: var(--font-display);
  font-weight: 600;
  color: var(--text-900);
}

/* Las tablas anchas hacen scroll dentro de sí mismas, no en la página. */
.entry .wp-block-table { overflow-x: auto; }

.entry hr {
  border: 0;
  height: 1px;
  background: var(--line-solid);
  margin-block: 2.6em;
}

/* Alineaciones de Gutenberg */
.entry .alignwide {
  width: min(100vw - var(--gutter) * 2, var(--max));
  margin-inline: calc(50% - min(50vw - var(--gutter), var(--max) / 2));
}
.entry .alignfull {
  width: 100vw;
  margin-inline: calc(50% - 50vw);
  border-radius: 0;
}
.entry .alignleft { float: left; margin: 0.4em 1.6em 1.2em 0; max-width: 50%; }
.entry .alignright { float: right; margin: 0.4em 0 1.2em 1.6em; max-width: 50%; }
.entry .aligncenter { margin-inline: auto; }

@media (max-width: 620px) {
  .entry .alignleft,
  .entry .alignright { float: none; max-width: 100%; margin-inline: 0; }
}

/* ---------- Meta de la entrada ---------- */
.pagehero--post { padding-bottom: clamp(4rem, 9vw, 7rem); }

.post__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  align-items: center;
  margin-top: 1.4rem;
  font-size: var(--step--1);
  color: rgba(255, 255, 255, 0.55);
}

/* ---------- Etiquetas ---------- */
.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 2.5rem;
  padding-top: 2rem;
  border-top: 1px solid var(--line-solid);
}

.tag {
  padding: 0.4rem 0.9rem;
  border-radius: 999px;
  background: var(--paper-alt);
  font-size: var(--step--1);
  color: var(--text-500);
  transition: background-color 0.3s var(--ease-out), color 0.3s var(--ease-out);
}
.tag:hover { background: var(--red-500); color: #fff; }

/* ---------- Avisos del formulario ---------- */
.aviso {
  display: flex;
  gap: 0.9rem;
  align-items: flex-start;
  padding: 1.1rem 1.4rem;
  border-radius: var(--r-md);
  font-size: var(--step--1);
  line-height: 1.55;
  margin-bottom: 1.6rem;
}
.aviso:focus { outline: 2px solid var(--blue-500); outline-offset: 3px; }
.aviso svg { flex: none; margin-top: 2px; }
.aviso p { margin: 0; }
.aviso a { text-decoration: underline; }

.aviso--ok {
  background: #e8f7ee;
  border: 1px solid #b7e3c8;
  color: #17683a;
}

.aviso--error {
  background: #fdeaea;
  border: 1px solid #f5c2c2;
  color: #9a2020;
}

/* ---------- Estado vacío ---------- */
.vacio {
  max-width: 52ch;
  margin-inline: auto;
  text-align: center;
  padding-block: clamp(2.5rem, 6vw, 4.5rem);
  color: var(--text-500);
}
.vacio svg { margin-inline: auto; color: var(--red-500); }
.vacio h2 { font-size: var(--step-2); margin-block: 1.2rem 0.7rem; }
.vacio p { margin-bottom: 2rem; }

/* ---------- Buscador ---------- */
.buscador {
  display: flex;
  gap: 0.6rem;
  align-items: stretch;
}

.buscador__campo {
  flex: 1;
  min-width: 0;
  padding: 0.95rem 1.2rem;
  border: 1.5px solid var(--line-solid);
  border-radius: 999px;
  background: var(--paper);
  color: var(--text-900);
  font-size: var(--step-0);
  transition: border-color 0.3s var(--ease-out), box-shadow 0.3s var(--ease-out);
}
.buscador__campo:focus {
  outline: none;
  border-color: var(--red-500);
  box-shadow: 0 0 0 4px rgba(211, 49, 42, 0.1);
}

.buscador__btn { flex: none; }

/* ---------- Paginación ---------- */
.pagination {
  display: flex;
  justify-content: center;
  margin-top: clamp(2.5rem, 5vw, 4rem);
}

.nav-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  align-items: center;
}

.page-numbers {
  display: grid;
  place-items: center;
  min-width: 44px;
  height: 44px;
  padding-inline: 0.9rem;
  border-radius: 999px;
  font-family: var(--font-display);
  font-size: var(--step--1);
  font-weight: 600;
  color: var(--text-700);
  background: var(--paper-alt);
  transition: background-color 0.3s var(--ease-out), color 0.3s var(--ease-out),
    transform 0.35s var(--spring);
}
.page-numbers:hover { background: var(--ink-800); color: #fff; transform: translateY(-2px); }
.page-numbers.current { background: var(--red-500); color: #fff; }
.page-numbers.dots { background: none; }
.page-numbers.dots:hover { transform: none; color: var(--text-700); }

.paginacion-entrada {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
  margin-top: 2.5rem;
  font-size: var(--step--1);
  color: var(--text-500);
}
.paginacion-entrada a { color: var(--blue-600); text-decoration: underline; }

/* ---------- Comentarios ---------- */
.comment-list { display: grid; gap: 1.6rem; }

.comment-list .comment-body {
  padding: 1.4rem 1.6rem;
  border-radius: var(--r-md);
  background: var(--paper-alt);
}

.comment-list .children {
  margin-top: 1.6rem;
  margin-left: clamp(1rem, 4vw, 2.5rem);
  display: grid;
  gap: 1.6rem;
}

.comment-meta { font-size: var(--step--1); color: var(--text-500); margin-bottom: 0.7rem; }
.comment-author .fn { font-weight: 600; color: var(--text-900); font-style: normal; }

.comment-respond { margin-top: 3rem; }
.comment-respond .comment-form { display: grid; gap: 1rem; }
.comment-respond input[type="text"],
.comment-respond input[type="email"],
.comment-respond input[type="url"],
.comment-respond textarea {
  width: 100%;
  padding: 0.9rem 1.1rem;
  border: 1.5px solid var(--line-solid);
  border-radius: var(--r-md);
  font-size: var(--step-0);
}
.comment-respond textarea { min-height: 130px; resize: vertical; }

/* ---------- Pie: enlaces legales ---------- */
.footer__legal {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 1.2rem;
  margin: 0;
}
.footer__legal li { margin: 0; }

/* ---------- Barra de administración ---------- */
body.admin-bar .header { top: 32px; }

@media screen and (max-width: 782px) {
  body.admin-bar .header { top: 46px; }
}

@media screen and (max-width: 600px) {
  /* Por debajo de 600px la barra deja de ser fija y no desplaza el header. */
  body.admin-bar .header { top: 0; }
}

/* ---------- Bloques de WordPress ---------- */
.wp-block-image img { border-radius: var(--r-md); }
.wp-block-button__link { border-radius: 999px; }
.wp-caption { max-width: 100%; }
.wp-caption-text { font-size: var(--step--1); color: var(--text-500); text-align: center; }
.sticky .post { box-shadow: var(--shadow-md); }
