/* ==========================================================================
   Tema «Aurora» · Andrea Ortiz Parera
   Papel crema + tinta pizarra + acento turquesa (identidad del logotipo)
   ========================================================================== */

:root {
  --brand: #4FB99F;
  --paper: #f6f4f0;
  --paper-2: #efebe4;
  --surface: #fffdfa;
  --ink: #232a33;
  --ink-2: #3b4450;
  --muted: #646d78;
  --line: #e2dcd2;
  --line-strong: #cfc7bb;
  --accent: var(--brand);
  --accent-ink: #23735f;
  --accent-soft: color-mix(in srgb, var(--brand) 14%, transparent);
  --dark: #1e242c;
  --dark-2: #29313b;
  --on-dark: #eef0ee;
  --on-dark-muted: #a9b2bc;

  --font-display: "Cormorant Garamond", "Iowan Old Style", Georgia, serif;
  --font-body: "Barlow", system-ui, -apple-system, "Segoe UI", sans-serif;

  --wrap: 1180px;
  --prose: 720px;
  --gutter: clamp(1.1rem, 4vw, 2.5rem);
  --radius: 18px;
  --radius-sm: 10px;
  --shadow: 0 1px 2px rgba(35, 42, 51, .05), 0 12px 32px -12px rgba(35, 42, 51, .16);
  --ease: cubic-bezier(.2, .7, .2, 1);
  --header-h: 76px;
}

/* ---------------------------------------------------------------- Base */

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 1rem); }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 1.125rem/1.7 var(--font-body);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, video, svg { max-width: 100%; height: auto; display: block; }
a { color: var(--accent-ink); text-decoration-thickness: 1px; text-underline-offset: .18em; }
a:hover { color: var(--ink); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }
::selection { background: color-mix(in srgb, var(--brand) 35%, white); color: var(--ink); }

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.08;
  letter-spacing: -.01em;
  color: var(--ink);
  margin: 1.6em 0 .55em;
  text-wrap: balance;
}
h1 { font-size: clamp(2.6rem, 2rem + 3.6vw, 4.7rem); }
h2 { font-size: clamp(2.05rem, 1.6rem + 2vw, 3.1rem); }
h3 { font-size: clamp(1.55rem, 1.35rem + .8vw, 1.95rem); font-weight: 700; }
h4 { font-size: 1.3rem; font-weight: 700; }
h5, h6 { font-family: var(--font-body); font-size: 1rem; text-transform: uppercase; letter-spacing: .08em; }
p, ul, ol, figure, blockquote, table, pre { margin: 0 0 1.15em; }
ul, ol { padding-left: 1.25em; }
li { margin: .3em 0; }
li::marker { color: var(--accent); }
hr { border: 0; height: 1px; background: var(--line); margin: 3rem 0; }
strong { font-weight: 600; }
small { font-size: .85em; }

.skip-link { position: absolute; left: -999px; top: 0; z-index: 1000; background: var(--ink); color: var(--paper); padding: .75rem 1rem; }
.skip-link:focus { left: 1rem; top: 1rem; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); border: 0; }

.wrap { width: min(100% - 2 * var(--gutter), var(--wrap)); margin-inline: auto; }
.wrap--prose { width: min(100% - 2 * var(--gutter), var(--prose)); margin-inline: auto; }

/* ---------------------------------------------------------------- Botones */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .55em;
  padding: .9em 1.6em;
  border-radius: 999px;
  border: 1.5px solid var(--ink);
  background: var(--ink);
  color: var(--paper);
  font: 600 .95rem/1.1 var(--font-body);
  letter-spacing: .04em;
  text-decoration: none;
  cursor: pointer;
  transition: background .25s var(--ease), color .25s var(--ease), border-color .25s var(--ease), transform .25s var(--ease);
}
.btn:hover { background: var(--accent); border-color: var(--accent); color: var(--ink); transform: translateY(-1px); }
.btn { white-space: nowrap; }
.btn svg { width: 1.15em; height: 1.15em; display: inline-block; flex-shrink: 0; transition: transform .25s var(--ease); }
.btn:hover svg { transform: translateX(3px); }
.btn--outline { background: transparent; color: var(--ink); }
.btn--outline:hover { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.btn--small { padding: .65em 1.15em; font-size: .85rem; }
.buttons { display: flex; flex-wrap: wrap; gap: .75rem; align-items: center; margin-top: 1.75rem; }

/* ---------------------------------------------------------------- Cabecera */

.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--paper) 86%, transparent);
  backdrop-filter: saturate(1.4) blur(14px);
  -webkit-backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color .3s, box-shadow .3s;
}
.site-header.is-scrolled { border-bottom-color: var(--line); box-shadow: 0 8px 24px -18px rgba(35, 42, 51, .35); }
.site-header__inner { display: flex; align-items: center; gap: 1.5rem; min-height: var(--header-h); }
.brand { display: flex; align-items: center; gap: .7rem; text-decoration: none; color: var(--ink); flex-shrink: 0; margin-right: auto; }
.brand img { height: 42px; width: auto; }
.brand__name { font: 600 1.55rem/1 var(--font-display); }

.nav { display: flex; align-items: center; gap: .25rem; }
.nav ul { list-style: none; margin: 0; padding: 0; }
.nav > ul { display: flex; align-items: center; gap: .1rem; }
.nav li { position: relative; margin: 0; }
.nav a {
  display: flex; align-items: center; gap: .3rem;
  padding: .55rem .8rem; border-radius: 999px;
  color: var(--ink-2); font-weight: 500; font-size: .98rem; text-decoration: none; white-space: nowrap;
  transition: background .2s, color .2s;
}
.nav a:hover, .nav li:focus-within > a { color: var(--ink); background: var(--paper-2); }
.nav .is-current > a, .nav .is-ancestor > a { color: var(--ink); }
.nav > ul > .is-current > a::before, .nav > ul > .is-ancestor > a::before { content: ""; position: absolute; left: .8rem; right: .8rem; bottom: .25rem; height: 2px; border-radius: 2px; background: var(--accent); }
.nav .sub-menu .is-current > a { background: var(--accent-soft); color: var(--ink); }
.nav .has-children > a::after { content: ""; width: .42em; height: .42em; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: rotate(45deg) translateY(-2px); margin-left: .15rem; opacity: .6; }
.nav .sub-menu {
  position: absolute; top: calc(100% + .35rem); left: -.5rem; min-width: 270px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow);
  padding: .5rem; opacity: 0; visibility: hidden; transform: translateY(6px);
  transition: opacity .2s, transform .2s, visibility .2s;
}
.nav .sub-menu::before { content: ""; position: absolute; inset: -.6rem 0 auto; height: .6rem; }
.nav li:hover > .sub-menu, .nav li:focus-within > .sub-menu { opacity: 1; visibility: visible; transform: none; }
.nav .sub-menu a { border-radius: 10px; white-space: normal; padding: .55rem .85rem; font-size: .95rem; }
.nav .sub-menu .sub-menu { position: static; opacity: 1; visibility: visible; transform: none; border: 0; box-shadow: none; padding: 0 0 0 .75rem; min-width: 0; background: transparent; }
.nav .sub-menu .has-children > a::after { display: none; }
.nav .header-cta { margin-left: .5rem; color: var(--paper); background: var(--ink); padding: .65em 1.25em; }
.nav .header-cta:hover { color: var(--ink); background: var(--accent); }
.menu-toggle { display: none; }

@media (max-width: 1080px) {
  .menu-toggle {
    display: inline-flex; align-items: center; justify-content: center; width: 46px; height: 46px;
    border-radius: 50%; border: 1px solid var(--line-strong); background: var(--surface); color: var(--ink); cursor: pointer;
  }
  .menu-toggle span, .menu-toggle span::before, .menu-toggle span::after { display: block; width: 18px; height: 1.5px; background: currentColor; position: relative; transition: transform .3s, background .3s; }
  .menu-toggle span::before, .menu-toggle span::after { content: ""; position: absolute; left: 0; }
  .menu-toggle span::before { top: -6px; }
  .menu-toggle span::after { top: 6px; }
  .nav-open .menu-toggle span { background: transparent; }
  .nav-open .menu-toggle span::before { transform: translateY(6px) rotate(45deg); }
  .nav-open .menu-toggle span::after { transform: translateY(-6px) rotate(-45deg); }
  .nav {
    position: fixed; inset: var(--header-h) 0 0 0; z-index: 40;
    background: var(--paper); padding: 1rem var(--gutter) 3rem; overflow-y: auto;
    flex-direction: column; align-items: stretch; gap: 1rem;
    opacity: 0; visibility: hidden; transform: translateY(-8px); transition: opacity .25s, transform .25s, visibility .25s;
  }
  .nav-open .nav { opacity: 1; visibility: visible; transform: none; }
  /* backdrop-filter crearía un bloque contenedor y el menú fijo quedaría encerrado en la cabecera */
  .nav-open .site-header { backdrop-filter: none; -webkit-backdrop-filter: none; background: var(--paper); }
  .nav > ul { flex-direction: column; align-items: stretch; }
  .nav a { font-size: 1.15rem; padding: .8rem .5rem; border-radius: 0; border-bottom: 1px solid var(--line); }
  .nav > ul > .is-current > a::before, .nav > ul > .is-ancestor > a::before { display: none; }
  .nav .has-children > a::after { display: none; }
  .nav .sub-menu { position: static; opacity: 1; visibility: visible; transform: none; border: 0; box-shadow: none; padding: 0 0 0 1rem; background: transparent; min-width: 0; }
  .nav .sub-menu a { font-size: 1rem; }
  .nav .header-cta { margin: 1rem 0 0; align-self: flex-start; border-bottom: 0; border-radius: 999px; padding: .8em 1.6em; }
  .nav-open { overflow: hidden; }
}
@media (max-width: 520px) {
  .brand img { height: 32px; }
  :root { --header-h: 66px; }
}

/* ---------------------------------------------------------------- Cabecera de página */

.page-head { padding: clamp(3rem, 6vw, 5.5rem) 0 clamp(2rem, 4vw, 3rem); position: relative; isolation: isolate; }
.page-head::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: url("../img/pattern.svg") 0 0 / 72px; filter: invert(1); opacity: .05;
  -webkit-mask-image: radial-gradient(60% 90% at 100% 0%, #000, transparent); mask-image: radial-gradient(60% 90% at 100% 0%, #000, transparent);
}
.page-head h1 { margin: .35em 0 .3em; max-width: 18ch; }
.page-head--split { padding-bottom: clamp(2.5rem, 5vw, 4rem); }
.page-head--split .wrap { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); gap: clamp(2rem, 5vw, 4.5rem); align-items: center; }
.page-head--split .page-head__media { margin: 0; position: relative; }
.page-head--split .page-head__media img { aspect-ratio: 5 / 4; object-position: 70% 30%; }
.page-head--split .page-head__media::after { content: ""; position: absolute; inset: auto -14px -14px auto; width: 60%; height: 60%; border-right: 2px solid var(--accent); border-bottom: 2px solid var(--accent); border-radius: 0 0 var(--radius) 0; pointer-events: none; }
@media (max-width: 860px) { .page-head--split .wrap { grid-template-columns: 1fr; } }
.page-body { padding-bottom: clamp(3rem, 7vw, 6rem); }

/* Contacto a dos columnas */
.contact-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: clamp(2rem, 6vw, 5rem); align-items: start; padding-bottom: clamp(3rem, 7vw, 6rem); }
.contact-layout__form { position: sticky; top: calc(var(--header-h) + 1.5rem); }
.contact-layout__form .contact-box { margin-top: 0; }
.contact-details { list-style: none; padding: 1.5rem 0 0; margin: 2rem 0 0; border-top: 1px solid var(--line); display: grid; gap: .8rem; }
.contact-details li { margin: 0; display: flex; align-items: center; gap: .8rem; }
.contact-details svg { width: 22px; height: 22px; color: var(--accent-ink); flex-shrink: 0; }
.contact-details a { color: var(--ink); text-decoration: none; font-weight: 500; }
.contact-details a:hover { color: var(--accent-ink); }
@media (max-width: 900px) { .contact-layout { grid-template-columns: 1fr; } .contact-layout__form { position: static; } }

/* Barra de progreso de lectura */
.read-progress { position: fixed; left: 0; top: 0; z-index: 70; height: 3px; width: 100%; transform-origin: 0 50%; transform: scaleX(var(--p, 0)); background: var(--accent); pointer-events: none; }
.page-head--wide h1 { max-width: 24ch; }
.page-head .lead { max-width: 60ch; }
.page-head__media { margin-top: 2.5rem; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.page-head__media img { width: 100%; aspect-ratio: 21 / 9; object-fit: cover; }
.breadcrumbs { font-size: .88rem; color: var(--muted); display: flex; flex-wrap: wrap; gap: .4rem; align-items: center; }
.breadcrumbs a { color: var(--muted); text-decoration: none; }
.breadcrumbs a:hover { color: var(--ink); }
.breadcrumbs span[aria-hidden] { opacity: .5; }

/* ---------------------------------------------------------------- Bloques de contenido */

.eyebrow {
  display: flex; align-items: center; gap: .75rem;
  font: 600 .8rem/1.3 var(--font-body); letter-spacing: .18em; text-transform: uppercase;
  color: var(--accent-ink); margin: 0 0 1rem;
}
.eyebrow::before { content: ""; width: 34px; height: 3px; border-radius: 3px; background: var(--accent); flex-shrink: 0; }
.eyebrow + h1, .eyebrow + h2, .eyebrow + h3 { margin-top: 0; }
h1 + .lead, h2 + .lead { margin-top: -.1em; }
.lead { font-size: clamp(1.18rem, 1.05rem + .4vw, 1.38rem); line-height: 1.6; color: var(--ink-2); }
.accent { color: var(--accent-ink); }
.text-center { text-align: center; }
.text-right { text-align: right; }

.content > :first-child, .card > :first-child, .column > :first-child, .grid__item > :first-child, .section > :first-child, .accordion__panel > :first-child { margin-top: 0; }
.content > :last-child, .card > :last-child, .column > :last-child, .section > :last-child { margin-bottom: 0; }

/* Páginas de ancho completo: cada sección ocupa toda la pantalla */
.content--landing > :not(section):not(.marquee):not(.marquee-wrap) { width: min(100% - 2 * var(--gutter), var(--wrap)); margin-inline: auto; }
.content--landing > :not(section):not(.marquee):not(.marquee-wrap):first-child { margin-top: 4rem; }
.content--landing > :not(section):not(.marquee):not(.marquee-wrap):last-child { margin-bottom: 4rem; }

.section {
  padding: clamp(3.5rem, 7vw, 6.5rem) max(var(--gutter), (100% - var(--wrap)) / 2);
}
.section > h2:first-child, .section > .eyebrow + h2 { max-width: 22ch; }
.section > p:not(.buttons):not(.eyebrow) { max-width: 70ch; }
.section > .lead { max-width: 62ch; }
.section--alt { background: var(--paper-2); }
.section + .section:not(.section--alt):not(.section--dark) { padding-top: 0; }
.section--alt + .section--alt { padding-top: 0; }
/* Sección oscura */
.section--dark { background: var(--dark); color: var(--on-dark-muted); position: relative; isolation: isolate; }
.section--dark::before { content: ""; position: absolute; inset: 0; z-index: -1; background: url("../img/pattern-dark.svg") 0 0 / 72px; -webkit-mask-image: radial-gradient(70% 60% at 100% 0%, #000, transparent); mask-image: radial-gradient(70% 60% at 100% 0%, #000, transparent); }
.section--dark h2, .section--dark h3, .section--dark strong { color: #fff; }
.section--dark .lead { color: var(--on-dark); }
.section--dark .eyebrow { color: var(--brand); }
.section--dark a:not(.btn) { color: var(--brand); }
.section--dark .card { background: var(--dark-2); border-color: rgba(255, 255, 255, .08); color: var(--on-dark-muted); }
.section--dark .grid > .card:hover { border-color: color-mix(in srgb, var(--brand) 50%, transparent); box-shadow: 0 20px 40px -20px rgba(0, 0, 0, .6); }
.section--dark .card h3 a { color: #fff; }
.section--dark .btn { background: var(--brand); border-color: var(--brand); color: var(--dark); }
.section--dark .btn:hover { background: #fff; border-color: #fff; }
.section--dark .btn--outline { background: transparent; color: var(--on-dark); border-color: rgba(255, 255, 255, .35); }
.section--dark .btn--outline:hover { background: var(--on-dark); color: var(--dark); border-color: var(--on-dark); }
.section--dark + .section { padding-top: clamp(3.5rem, 7vw, 6.5rem) !important; }
.section--alt + .section:not(.section--alt):not(.section--dark) { padding-top: clamp(3.5rem, 7vw, 6.5rem); }

/* Introducción bajo la cabecera: texto editorial, a dos columnas si es largo */
.section--intro { padding-block: clamp(3.5rem, 7vw, 6rem) clamp(2.5rem, 5vw, 4rem); position: relative; }
.section--intro > p { font-size: clamp(1.1rem, 1rem + .3vw, 1.24rem); line-height: 1.75; color: var(--ink-2); }
.section--intro > p:first-child::first-letter { float: left; font: 600 4.4em/.78 var(--font-display); color: var(--accent-ink); margin: .06em .12em 0 0; }
.section--intro-cols { columns: 2 22rem; column-gap: clamp(2rem, 6vw, 5rem); column-rule: 1px solid var(--line); }
.section--intro-cols > * { break-inside: avoid; max-width: none !important; }
.section--intro + .section { padding-top: clamp(1rem, 3vw, 2rem); }

/* Cabeceras de sección y bloques con imagen */
.columns--media { grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); align-items: center; margin-top: 0; }
/* Título que acompaña al leer cuando la columna de texto es larga */
@media (min-width: 821px) {
  .section > .columns:not(.columns--media) > .column:first-child:has(> h2:last-child) { position: sticky; top: calc(var(--header-h) + 2rem); }
}
.image--framed { margin: 0; position: relative; }
.image--framed img { box-shadow: 18px 18px 0 0 color-mix(in srgb, var(--brand) 26%, transparent); }
.section > .grid:last-child, .section > .grid + .buttons { margin-bottom: 0; }
.section > .grid + .buttons { justify-content: flex-start; }

/* Tarjeta enlazada (toda la tarjeta es clicable) */
.card--link { position: relative; display: flex; flex-direction: column; }
.card--link h3 { padding-right: 2.2rem; }
.card--link h3 a { color: inherit; text-decoration: none; }
.card--link h3 a::after { content: ""; position: absolute; inset: 0; border-radius: inherit; z-index: 1; }
.card--link::after {
  content: "→"; position: absolute; right: clamp(1.25rem, 2.5vw, 1.9rem); top: clamp(1.25rem, 2.5vw, 1.9rem);
  width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center;
  border: 1px solid var(--line-strong); color: var(--ink); font-size: 1rem; transition: transform .3s var(--ease), background .3s, color .3s, border-color .3s;
}
.card--link:hover::after { background: var(--accent); border-color: var(--accent); color: var(--ink); transform: rotate(-45deg); }
.section--dark .card--link::after { border-color: rgba(255, 255, 255, .2); color: var(--on-dark); }
.card--link > p:last-child { margin-bottom: 0; color: var(--muted); font-size: 1rem; }
.section--dark .card--link > p:last-child { color: var(--on-dark-muted); }
.card__num { font: italic 600 1.15rem/1 var(--font-display); color: var(--accent-ink); margin: 0 0 2.2rem !important; display: flex; align-items: center; gap: .6rem; }
.card__num::after { content: ""; width: 28px; height: 1px; background: currentColor; opacity: .5; }
.card--media::after { top: auto; bottom: clamp(1.25rem, 2.5vw, 1.9rem); }
.card--media > .image:first-child { aspect-ratio: 16 / 10; overflow: hidden; }
.card--media > .image:first-child img { height: 100%; object-fit: cover; border-radius: 0; transition: transform .7s var(--ease); }
.card--media:hover > .image:first-child img { transform: scale(1.05); }
.card--media h3 { margin-top: .4rem; }
.card--media > p:last-child { padding-right: 3rem; }

/* Cabecera grande: texto a la izquierda, imagen nítida a la derecha fundida con el fondo */
.hero {
  --hero-pad-x: max(var(--gutter), (100% - var(--wrap)) / 2);
  position: relative; isolation: isolate; overflow: hidden;
  display: flex; flex-direction: column; justify-content: center;
  min-height: min(78vh, 720px);
  background: var(--dark); color: var(--on-dark);
  padding: clamp(4.5rem, 8vw, 6.5rem) var(--hero-pad-x) clamp(4rem, 7vw, 6rem);
}
.hero[style*="hero-image"]::before {
  content: ""; position: absolute; z-index: -2; top: 0; right: 0; bottom: 0; width: 58%;
  background: var(--hero-image) center / cover no-repeat;
  -webkit-mask-image: linear-gradient(to right, transparent 0%, rgba(0, 0, 0, .55) 22%, #000 48%);
          mask-image: linear-gradient(to right, transparent 0%, rgba(0, 0, 0, .55) 22%, #000 48%);
}
.hero::after {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background:
    url("../img/pattern-dark.svg") 0 0 / 72px repeat,
    radial-gradient(640px 380px at 0% 100%, color-mix(in srgb, var(--brand) 11%, transparent), transparent 70%),
    linear-gradient(to top, color-mix(in srgb, var(--dark) 70%, transparent), transparent 35%);
  -webkit-mask-image: linear-gradient(to right, #000 30%, transparent 70%);
          mask-image: linear-gradient(to right, #000 30%, transparent 70%);
}
.hero > * { max-width: min(36rem, 100%); position: relative; }
.hero > .buttons { max-width: none; }
.hero h1 { color: #fff; margin: .15em 0 .4em; max-width: 15ch; font-size: clamp(2.6rem, 1.7rem + 3.4vw, 4.6rem); line-height: 1.02; }
.hero h1 strong { font-weight: inherit; }
.hero--long-title h1 { font-size: clamp(2.3rem, 1.6rem + 2.6vw, 3.7rem); max-width: 19ch; }
.hero--long-lead .lead { font-size: 1.08rem; }
.hero h2, .hero h3 { color: #fff; }
.hero p { color: color-mix(in srgb, var(--on-dark) 86%, transparent); }
.hero .lead { color: var(--on-dark); font-size: clamp(1.12rem, 1rem + .45vw, 1.32rem); }
.hero .eyebrow { color: var(--brand); }
.hero a:not(.btn) { color: var(--brand); }
.hero .breadcrumbs { margin: 0 0 1.75rem; color: var(--on-dark-muted); }
.hero .breadcrumbs a { color: var(--on-dark-muted); }
.hero .breadcrumbs a:hover { color: #fff; }
.hero .btn { background: var(--brand); border-color: var(--brand); color: var(--dark); }
.hero .btn:hover { background: #fff; border-color: #fff; color: var(--dark); }
.hero .btn--outline { background: transparent; color: var(--on-dark); border-color: color-mix(in srgb, var(--on-dark) 45%, transparent); }
.hero .btn--outline:hover { background: var(--on-dark); color: var(--dark); border-color: var(--on-dark); }
.hero .btn:not(.btn--outline)::after, .footer-contact .btn::after { content: "→"; transition: transform .25s var(--ease); }
.hero .btn:not(.btn--outline):hover::after, .footer-contact .btn:hover::after { transform: translateX(4px); }

/* Portada: cabecera clara con la foto sobre la pared crema */
.hero--home { background: var(--paper); color: var(--ink); min-height: min(86vh, 780px); }
.hero--home[style*="hero-image"]::before {
  width: 66%; background-position: 72% 28%;
  -webkit-mask-image: linear-gradient(to right, transparent 0%, rgba(0, 0, 0, .7) 26%, #000 46%);
          mask-image: linear-gradient(to right, transparent 0%, rgba(0, 0, 0, .7) 26%, #000 46%);
}
.hero--home::after {
  background:
    radial-gradient(520px 380px at 4% 96%, color-mix(in srgb, var(--brand) 16%, transparent), transparent 70%),
    linear-gradient(to top, var(--paper), transparent 18%);
  -webkit-mask-image: none; mask-image: none;
}
.hero--home h1 { color: var(--ink); max-width: 13ch; }
.hero--home p, .hero--home .lead { color: var(--ink-2); }
.hero--home .lead { max-width: 34rem; }
.hero--home .eyebrow { color: var(--accent-ink); }
.hero--home .btn { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.hero--home .btn:hover { background: var(--accent); border-color: var(--accent); color: var(--ink); }
.hero--home .btn--outline { background: color-mix(in srgb, var(--paper) 70%, transparent); color: var(--ink); border-color: var(--ink); }
.hero--home .btn--outline:hover { background: var(--ink); color: var(--paper); }

@media (max-width: 900px) {
  .hero { min-height: 0; padding-top: 2.5rem; }
  .hero[style*="hero-image"] { padding-top: 0; }
  .hero[style*="hero-image"]::before {
    position: relative; order: -1; display: block; width: auto; height: auto; aspect-ratio: 4 / 3;
    margin: 0 calc(-1 * var(--hero-pad-x)) -3.5rem;
    -webkit-mask-image: linear-gradient(to bottom, #000 55%, transparent 100%);
            mask-image: linear-gradient(to bottom, #000 55%, transparent 100%);
  }
  .hero--home[style*="hero-image"]::before { aspect-ratio: 1 / 1; background-position: 74% 18%; }
  .hero::after { -webkit-mask-image: none; mask-image: none; }
  .hero h1 { max-width: none; }
}

/* Cinta de servicios en movimiento */
.marquee-wrap { overflow: hidden; background: var(--ink); color: var(--paper); border-block: 1px solid var(--ink); }
.marquee { list-style: none; margin: 0 !important; padding: 1.05rem 0; display: flex; width: max-content !important; max-width: none !important; }
.marquee li { margin: 0; display: flex; align-items: center; white-space: nowrap; font: italic 600 clamp(1.25rem, 1rem + .8vw, 1.6rem)/1 var(--font-display); letter-spacing: .01em; }
.marquee li::after { content: "✦"; font: normal .8rem/1 var(--font-body); color: var(--brand); margin: 0 1.6rem; }
.js .marquee.is-animated { animation: marquee var(--marquee-time, 45s) linear infinite; }
.marquee-wrap:hover .marquee { animation-play-state: paused; }
@keyframes marquee { to { transform: translateX(-50%); } }
.content--landing > .marquee:not(.is-animated) { width: auto !important; overflow-x: auto; background: var(--ink); color: var(--paper); padding-inline: var(--gutter); }

.grid { display: grid; gap: clamp(1rem, 2vw, 1.6rem); margin: 2.5rem 0; }
.grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 1000px) { .grid--3, .grid--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 720px) { .grid--2, .grid--3, .grid--4 { grid-template-columns: 1fr; } }
.grid__item { min-width: 0; }
.grid > .grid__item:has(> .image:only-child) { align-self: center; }

.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: clamp(1.5rem, 3vw, 2.3rem); min-width: 0;
  transition: transform .35s var(--ease), box-shadow .35s var(--ease), border-color .35s;
}
.grid > .card:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: var(--line-strong); }
.card h3 { margin-top: .2em; }
.card .buttons { margin-top: 1.25rem; }
.card > .image:first-child { margin: calc(-1 * clamp(1.5rem, 3vw, 2.3rem)) calc(-1 * clamp(1.5rem, 3vw, 2.3rem)) 1.5rem; border-radius: var(--radius) var(--radius) 0 0; }
.section--alt .card { background: var(--surface); }
.hero .card { background: rgba(255, 255, 255, .06); border-color: rgba(255, 255, 255, .12); color: var(--on-dark); }

.columns { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(1.5rem, 5vw, 4.5rem); margin: 2rem 0; align-items: start; }
.columns--2-1 { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); }
.columns--1-2 { grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); }
@media (max-width: 820px) { .columns, .columns--2-1, .columns--1-2 { grid-template-columns: 1fr; } }

.image { margin: 2rem 0; }
.image img { border-radius: 14px; width: 100%; }
.image figcaption, figcaption { font-size: .88rem; color: var(--muted); margin-top: .6rem; text-align: center; }
.aligncenter { margin-inline: auto; text-align: center; }
.alignleft { float: left; margin: .3rem 1.5rem 1rem 0; max-width: 45%; }
.alignright { float: right; margin: .3rem 0 1rem 1.5rem; max-width: 45%; }

.link-list { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: .5rem; margin: 1.5rem 0; }
.link-list li { margin: 0; }
.link-list a {
  display: inline-flex; align-items: center; gap: .4rem; padding: .45rem .95rem; border-radius: 999px;
  border: 1px solid var(--line-strong); background: var(--paper); color: var(--ink-2); text-decoration: none; font-size: .93rem; font-weight: 500;
  transition: background .2s, border-color .2s, color .2s;
}
.link-list a::after { content: "→"; opacity: .45; transition: transform .2s, opacity .2s; }
.link-list a:hover { border-color: var(--accent); background: var(--accent-soft); color: var(--ink); }
.link-list a:hover::after { transform: translateX(2px); opacity: 1; }

blockquote {
  margin: 2.2rem 0; padding: .2rem 0 .2rem 1.6rem; border-left: 3px solid var(--accent);
  font-family: var(--font-display); font-size: 1.5rem; line-height: 1.4; font-style: italic; color: var(--ink-2);
}
blockquote p:last-child { margin-bottom: 0; }
blockquote cite { display: block; margin-top: .6rem; font: normal .9rem var(--font-body); color: var(--muted); }
.pullquote, .cita-turquesa {
  border: 0; padding: 2rem 2.2rem; border-radius: var(--radius); background: var(--accent-soft);
  font-size: 1.35rem; font-style: normal; color: var(--ink);
}
.pullquote p, .cita-turquesa p { font-family: var(--font-body); font-size: 1.08rem; line-height: 1.7; }

.accordion { margin: 2rem 0; border-top: 1px solid var(--line); }
.accordion__item { border-bottom: 1px solid var(--line); }
.accordion__item summary {
  list-style: none; cursor: pointer; padding: 1.25rem 3rem 1.25rem 0; position: relative;
  font: 600 1.32rem/1.3 var(--font-display); color: var(--ink);
}
.accordion__item summary::-webkit-details-marker { display: none; }
.accordion__item summary::after {
  content: ""; position: absolute; right: .35rem; top: 50%; width: 22px; height: 22px; margin-top: -11px;
  background:
    linear-gradient(var(--ink), var(--ink)) center / 12px 1.5px no-repeat,
    linear-gradient(var(--ink), var(--ink)) center / 1.5px 12px no-repeat;
  border: 1px solid var(--line-strong); border-radius: 50%; transition: transform .3s var(--ease), background-color .3s;
}
.accordion__item[open] summary::after { transform: rotate(45deg); background-color: var(--accent-soft); }
.accordion__item summary:hover { color: var(--accent-ink); }
.accordion__panel { padding: 0 0 1.4rem; color: var(--ink-2); }

.table-wrap { overflow-x: auto; margin: 2rem 0; border: 1px solid var(--line); border-radius: var(--radius-sm); }
table { width: 100%; border-collapse: collapse; font-size: .98rem; margin: 0; }
th, td { text-align: left; padding: .8rem 1rem; border-bottom: 1px solid var(--line); }
th { background: var(--paper-2); font-weight: 600; }
tr:last-child td { border-bottom: 0; }
pre { background: var(--dark); color: var(--on-dark); padding: 1.2rem 1.4rem; border-radius: var(--radius-sm); overflow-x: auto; font-size: .92rem; }
code { font-family: ui-monospace, "Cascadia Code", Menlo, monospace; font-size: .9em; }
:not(pre) > code { background: var(--paper-2); padding: .12em .4em; border-radius: 5px; }

/* ---------------------------------------------------------------- Texto largo */

.prose { font-size: 1.15rem; line-height: 1.78; }
.prose h2 { font-size: clamp(1.9rem, 1.5rem + 1.4vw, 2.5rem); margin-top: 2.2em; }
.prose h3 { font-size: clamp(1.45rem, 1.3rem + .6vw, 1.75rem); margin-top: 1.9em; }
.post-layout .prose > p:first-child { font-size: 1.24rem; line-height: 1.7; color: var(--ink); }
.post-layout .prose > p:first-child::first-letter { float: left; font: 600 4.1em/.8 var(--font-display); color: var(--accent-ink); margin: .07em .12em 0 0; }
.prose img { border-radius: 14px; }
.prose a { color: var(--accent-ink); }
.prose .section, .prose .hero { padding: 2rem 0; background: none; color: inherit; }
.content--narrow h2 { font-size: 1.75rem; }
.content--narrow h3 { font-size: 1.35rem; }

/* ---------------------------------------------------------------- Blog */

.blog-intro { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: clamp(2rem, 5vw, 5rem); align-items: start; }
.blog-intro h1 { margin-top: .2em; }
.blog-intro__text { columns: 1; color: var(--ink-2); }
.blog-intro__text p:first-child { margin-top: .4rem; }
@media (max-width: 900px) { .blog-intro { grid-template-columns: 1fr; } }

.archive-bar { display: flex; flex-wrap: wrap; gap: 1rem; justify-content: space-between; align-items: center; padding: 1.5rem 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); margin-bottom: 2.5rem; }
.chips { display: flex; flex-wrap: wrap; gap: .45rem; }
.chip {
  display: inline-flex; align-items: center; gap: .35rem; padding: .38rem .85rem; border-radius: 999px;
  border: 1px solid var(--line-strong); color: var(--ink-2); text-decoration: none; font-size: .88rem; font-weight: 500; background: var(--surface);
}
.chip:hover, .chip.is-active { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.chip small { opacity: .6; }
.search-form { display: flex; align-items: center; gap: .4rem; background: var(--surface); border: 1px solid var(--line-strong); border-radius: 999px; padding: .25rem .3rem .25rem 1rem; min-width: min(100%, 300px); }
.search-form input { border: 0; background: transparent; font: inherit; font-size: .95rem; flex: 1; min-width: 0; padding: .4rem 0; color: var(--ink); }
.search-form input:focus { outline: none; }
.search-form:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.search-form button { border: 0; background: var(--ink); color: var(--paper); width: 36px; height: 36px; border-radius: 50%; cursor: pointer; display: grid; place-items: center; }

.post-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); gap: clamp(1.25rem, 2.5vw, 2rem); margin: 2rem 0; }
.post-grid--1 { grid-template-columns: minmax(0, 560px); }
.post-card { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; transition: transform .35s var(--ease), box-shadow .35s var(--ease); position: relative; }
.post-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.post-card__media { aspect-ratio: 16 / 10; background: var(--paper-2); overflow: hidden; }
.post-card__media img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--ease); }
.post-card:hover .post-card__media img { transform: scale(1.04); }
.post-card__media--empty { display: grid; place-items: center; background: linear-gradient(135deg, var(--paper-2), color-mix(in srgb, var(--brand) 18%, var(--paper-2))); }
.post-card__media--empty span { font: italic 600 3rem var(--font-display); color: var(--ink-2); opacity: .35; }
.post-card__body { padding: 1.4rem 1.5rem 1.6rem; display: flex; flex-direction: column; gap: .7rem; flex: 1; }
.post-card__cat { font: 600 .74rem/1 var(--font-body); letter-spacing: .14em; text-transform: uppercase; color: var(--accent-ink); text-decoration: none; position: relative; z-index: 2; }
.post-card__title { font-size: 1.6rem; line-height: 1.15; margin: 0; }
.post-card__title a { color: var(--ink); text-decoration: none; }
.post-card__title a::after { content: ""; position: absolute; inset: 0; z-index: 1; }
.post-card__excerpt { color: var(--muted); font-size: .98rem; line-height: 1.6; margin: 0; }
.post-card__meta { margin-top: auto; font-size: .85rem; color: var(--muted); display: flex; gap: .5rem; flex-wrap: wrap; padding-top: .5rem; }
.post-card--featured { grid-column: 1 / -1; display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); }
.post-card--featured .post-card__media { aspect-ratio: auto; min-height: 340px; }
.post-card--featured .post-card__body { padding: clamp(1.75rem, 3vw, 3rem); justify-content: center; }
.post-card--featured .post-card__title { font-size: clamp(2rem, 1.6rem + 1.5vw, 2.8rem); }
@media (max-width: 760px) { .post-card--featured { grid-template-columns: 1fr; } .post-card--featured .post-card__media { min-height: 0; aspect-ratio: 16 / 10; } }

.pagination { display: flex; flex-wrap: wrap; gap: .4rem; justify-content: center; margin: 3rem 0 1rem; }
.pagination a, .pagination span { min-width: 44px; height: 44px; padding: 0 .9rem; display: inline-grid; place-items: center; border-radius: 999px; border: 1px solid var(--line-strong); text-decoration: none; color: var(--ink); font-weight: 500; }
.pagination .is-current { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.pagination a:hover { border-color: var(--ink); }

/* ---------------------------------------------------------------- Entrada individual */

.post-head { padding: clamp(3rem, 6vw, 5rem) 0 2.5rem; text-align: center; }
.post-head .breadcrumbs { justify-content: center; }
.post-head h1 { margin: .3em auto .35em; max-width: 20ch; font-size: clamp(2.5rem, 1.9rem + 3vw, 4.2rem); }
.post-head .lead { max-width: 58ch; margin-inline: auto; }
.post-cats { display: flex; gap: .4rem; justify-content: center; flex-wrap: wrap; margin-top: 1.4rem; }
.post-meta { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: .6rem 1.1rem; color: var(--muted); font-size: .95rem; margin-top: 1.5rem; }
.post-meta img { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; }
.post-meta a { color: var(--ink); text-decoration: none; font-weight: 500; }
.post-meta .dot { opacity: .4; }
.post-cover { width: min(100% - 2 * var(--gutter), 1080px); margin: 0 auto clamp(2.5rem, 5vw, 4rem); }
.post-cover img { width: 100%; border-radius: var(--radius); aspect-ratio: 16 / 9; object-fit: cover; box-shadow: var(--shadow); }

.post-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, var(--prose)) minmax(0, 1fr); gap: 2.5rem; width: min(100% - 2 * var(--gutter), 1240px); margin-inline: auto; }
.post-layout > .prose { grid-column: 2; min-width: 0; }
.toc { grid-column: 3; align-self: start; position: sticky; top: calc(var(--header-h) + 1.5rem); font-size: .9rem; max-width: 250px; }
.toc__title { font: 600 .74rem var(--font-body); letter-spacing: .16em; text-transform: uppercase; color: var(--muted); margin-bottom: .8rem; }
.toc ol { list-style: none; padding: 0; margin: 0; border-left: 1px solid var(--line); }
.toc li { margin: 0; }
.toc a { display: block; padding: .35rem 0 .35rem 1rem; margin-left: -1px; border-left: 2px solid transparent; color: var(--muted); text-decoration: none; line-height: 1.4; }
.toc a:hover { color: var(--ink); }
.toc a.is-active { border-left-color: var(--accent); color: var(--ink); }
@media (max-width: 1180px) { .post-layout { grid-template-columns: minmax(0, var(--prose)); justify-content: center; } .post-layout > .prose { grid-column: 1; } .toc { display: none; } }

.post-foot { width: min(100% - 2 * var(--gutter), var(--prose)); margin: 3rem auto 0; }
.post-tags { display: flex; flex-wrap: wrap; gap: .45rem; align-items: center; }
.share { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; margin: 2rem 0; padding: 1.25rem 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.share__label { font-weight: 600; margin-right: .4rem; font-size: .95rem; }
.share a, .share button { width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; border: 1px solid var(--line-strong); background: var(--surface); color: var(--ink); cursor: pointer; transition: background .2s, color .2s, border-color .2s; }
.share a:hover, .share button:hover { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.share svg { width: 18px; height: 18px; }
.author-box { display: grid; grid-template-columns: 84px minmax(0, 1fr); gap: 1.4rem; align-items: start; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.6rem; margin: 2rem 0; }
.author-box img { width: 84px; height: 84px; border-radius: 50%; object-fit: cover; background: var(--paper-2); }
.author-box h3 { margin: 0 0 .3rem; font-size: 1.5rem; }
.author-box p { margin: 0 0 .5rem; color: var(--ink-2); font-size: 1rem; }
.author-box__label { font: 600 .72rem var(--font-body); letter-spacing: .14em; text-transform: uppercase; color: var(--accent-ink); }
.post-nav { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin: 2rem 0; }
.post-nav a { display: block; padding: 1.2rem 1.4rem; border: 1px solid var(--line); border-radius: var(--radius-sm); text-decoration: none; color: var(--ink); background: var(--surface); transition: border-color .2s; }
.post-nav a:hover { border-color: var(--ink); }
.post-nav small { display: block; color: var(--muted); margin-bottom: .3rem; }
.post-nav strong { font: 600 1.2rem/1.25 var(--font-display); }
.post-nav .next { text-align: right; grid-column: 2; }
@media (max-width: 640px) { .post-nav { grid-template-columns: 1fr; } .post-nav .next { grid-column: 1; } }
.related { background: var(--paper-2); padding: clamp(3rem, 6vw, 5rem) 0; margin-top: 4rem; }
.related h2 { margin-top: 0; }

/* ---------------------------------------------------------------- Comentarios */

.comments { width: min(100% - 2 * var(--gutter), var(--prose)); margin: 4rem auto; }
.comments h2 { font-size: 2rem; }
.comment-list, .comment-list ol { list-style: none; padding: 0; margin: 0; }
.comment-list ol { margin-left: clamp(1rem, 4vw, 3rem); border-left: 2px solid var(--line); padding-left: clamp(1rem, 3vw, 1.5rem); }
.comment { margin: 0 0 1.5rem; }
.comment__box { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 1.2rem 1.4rem; }
.comment__head { display: flex; align-items: center; gap: .8rem; margin-bottom: .6rem; }
.comment__avatar { width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; background: var(--paper-2); color: var(--ink-2); font-weight: 600; font-size: .9rem; overflow: hidden; flex-shrink: 0; }
.comment__avatar img { width: 100%; height: 100%; object-fit: cover; }
.comment__author { font-weight: 600; }
.comment__author.is-staff::after { content: "Autora"; margin-left: .5rem; font-size: .7rem; letter-spacing: .08em; text-transform: uppercase; background: var(--accent-soft); color: var(--accent-ink); padding: .15rem .5rem; border-radius: 999px; vertical-align: middle; }
.comment__date { font-size: .82rem; color: var(--muted); }
.comment__text { font-size: 1.02rem; }
.comment__text p:last-child { margin-bottom: 0; }
.comment__reply { font-size: .88rem; font-weight: 600; background: none; border: 0; color: var(--accent-ink); cursor: pointer; padding: .4rem 0 0; }
.notice { padding: 1rem 1.25rem; border-radius: var(--radius-sm); margin: 1.5rem 0; font-size: 1rem; }
.notice--ok { background: var(--accent-soft); color: var(--ink); border: 1px solid color-mix(in srgb, var(--brand) 45%, transparent); }
.notice--error { background: #fdecea; color: #7a1f1a; border: 1px solid #f3c2bd; }

/* ---------------------------------------------------------------- Formularios */

.form { display: grid; gap: 1.1rem; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1.1rem; }
@media (max-width: 640px) { .form-row { grid-template-columns: 1fr; } }
.field label { display: block; font-weight: 600; font-size: .95rem; margin-bottom: .4rem; }
.field .req { color: var(--accent-ink); }
.field input, .field select, .field textarea {
  width: 100%; font: inherit; font-size: 1rem; color: var(--ink);
  background: var(--surface); border: 1px solid var(--line-strong); border-radius: 12px; padding: .85rem 1rem;
  transition: border-color .2s, box-shadow .2s;
}
.field textarea { min-height: 150px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.field--error input, .field--error select, .field--error textarea { border-color: #c0392b; }
.field__error { color: #b03a2e; font-size: .88rem; margin-top: .35rem; }
.check { display: flex; gap: .65rem; align-items: flex-start; font-size: .95rem; color: var(--ink-2); }
.check input { width: 18px; height: 18px; margin-top: .25rem; accent-color: var(--ink); flex-shrink: 0; }
.hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; }
.contact-box { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: clamp(1.5rem, 4vw, 2.5rem); margin: 2.5rem 0; box-shadow: var(--shadow); }
.contact-box h3 { margin-top: 0; }

/* ---------------------------------------------------------------- Pie */

.site-footer { background: var(--dark); color: var(--on-dark-muted); margin-top: 0; position: relative; overflow: hidden; }
.site-footer a { color: var(--on-dark); text-decoration: none; }
.site-footer a:hover { color: var(--brand); }
.footer-cta { padding: clamp(4rem, 8vw, 6.5rem) 0 clamp(3rem, 6vw, 4.5rem); display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: clamp(2rem, 5vw, 5rem); align-items: end; border-bottom: 1px solid rgba(255, 255, 255, .1); }
.footer-cta h2 { color: #fff; margin: 0 0 1rem; font-size: clamp(2.4rem, 1.8rem + 3vw, 4rem); max-width: 14ch; }
.footer-cta p { font-size: 1.1rem; max-width: 52ch; margin: 0; color: var(--on-dark-muted); }
.footer-contact { list-style: none; padding: 0; margin: 0; display: grid; gap: .75rem; }
.footer-contact li { margin: 0; display: flex; align-items: center; gap: .85rem; font-size: 1.05rem; }
.footer-contact svg { width: 20px; height: 20px; color: var(--brand); flex-shrink: 0; }
.footer-contact .btn { margin-top: 1rem; background: var(--brand); border-color: var(--brand); color: var(--dark); }
.footer-contact .btn:hover { background: #fff; border-color: #fff; color: var(--dark); }
.footer-cols { display: grid; grid-template-columns: minmax(0, 1.4fr) repeat(2, minmax(0, 1fr)); gap: 2.5rem; padding: 3.5rem 0; }
.footer-brand { display: flex; flex-direction: column; gap: 1rem; max-width: 34ch; }
.footer-brand__logo { display: flex; align-items: center; gap: .8rem; }
.footer-brand__logo img { width: 52px; height: 52px; border-radius: 14px; }
.footer-brand__logo img.footer-brand__wordmark { width: auto; height: 46px; border-radius: 0; }
.footer-brand__logo span { font: 600 1.7rem/1 var(--font-display); color: #fff; }
.footer-brand p { margin: 0; font-size: .98rem; }
.footer-col h3 { font: 600 .78rem var(--font-body); letter-spacing: .16em; text-transform: uppercase; color: var(--on-dark-muted); margin: 0 0 1rem; }
.footer-col ul { list-style: none; padding: 0; margin: 0; display: grid; gap: .55rem; }
.footer-col li { margin: 0; }
.footer-col a { font-size: 1rem; }
.social { display: flex; gap: .5rem; flex-wrap: wrap; }
.social a { width: 40px; height: 40px; border-radius: 50%; border: 1px solid rgba(255, 255, 255, .18); display: grid; place-items: center; }
.social a:hover { border-color: var(--brand); }
.social svg { width: 18px; height: 18px; }
.footer-bottom { display: flex; flex-wrap: wrap; gap: 1rem; justify-content: space-between; align-items: center; padding: 1.5rem 0 2rem; border-top: 1px solid rgba(255, 255, 255, .1); font-size: .9rem; }
.footer-bottom ul { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: .4rem 1.4rem; }
.footer-bottom li { margin: 0; }
.footer-bottom a { color: var(--on-dark-muted); }
@media (max-width: 900px) { .footer-cta { grid-template-columns: 1fr; align-items: start; } .footer-cols { grid-template-columns: 1fr 1fr; } .footer-brand { grid-column: 1 / -1; } }
@media (max-width: 520px) { .footer-cols { grid-template-columns: 1fr; } }

/* ---------------------------------------------------------------- 404 y vacío */

.empty-state { text-align: center; padding: clamp(4rem, 10vw, 8rem) 0; }
.empty-state h1 { margin: .2em auto .4em; }
.empty-state .search-form { margin: 2rem auto; max-width: 440px; }
.empty-state__code { font: italic 600 clamp(5rem, 15vw, 9rem)/1 var(--font-display); color: var(--accent); }

/* ---------------------------------------------------------------- Barra de administración (sesión iniciada) */

.admin-pill { position: fixed; left: 1rem; bottom: 1rem; z-index: 80; display: flex; gap: .25rem; background: var(--ink); border-radius: 999px; padding: .3rem; box-shadow: 0 10px 30px -10px rgba(0, 0, 0, .5); font: 500 .85rem var(--font-body); }
.admin-pill a { color: var(--paper); text-decoration: none; padding: .45rem .9rem; border-radius: 999px; display: inline-flex; gap: .4rem; align-items: center; white-space: nowrap; }
.admin-pill svg { width: 16px; height: 16px; }
.admin-pill a:hover { background: rgba(255, 255, 255, .12); color: #fff; }
.admin-pill .is-primary { background: var(--brand); color: var(--ink); }
.admin-pill .is-primary:hover { background: #fff; color: var(--ink); }
.preview-banner { position: sticky; top: 0; z-index: 90; background: #f2c94c; color: #3d2f00; text-align: center; padding: .55rem 1rem; font-size: .9rem; font-weight: 600; }

/* ---------------------------------------------------------------- Animaciones */

@media (prefers-reduced-motion: no-preference) {
  .js .reveal { opacity: 0; transform: translateY(18px); transition: opacity .8s var(--ease), transform .8s var(--ease); }
  .js .reveal.is-visible { opacity: 1; transform: none; }
  .hero > * { animation: rise .9s var(--ease) both; }
  .hero > :nth-child(2) { animation-delay: .08s; }
  .hero > :nth-child(3) { animation-delay: .16s; }
  .hero > :nth-child(n+4) { animation-delay: .24s; }
}
@keyframes rise { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; } }

@media print {
  .site-header, .site-footer, .share, .comments, .related, .admin-pill, .toc { display: none !important; }
  body { background: #fff; font-size: 12pt; }
}

/* Editor visual (TinyMCE): mismo aspecto que la web */
body.editor-body { background: var(--paper); padding: 1.5rem 2rem; max-width: 980px; margin: 0 auto; }
body.editor-body .section, body.editor-body .hero { padding: 2rem; margin: 0 -2rem 1rem; border-radius: 12px; outline: 1px dashed var(--line-strong); }
body.editor-body .hero > * { animation: none; }
