/*
 * Portada del tema hijo. Todo cuelga de .crd-landing (clase del body en la portada) o de .crd-motion
 * (la pone landing.js cuando la escena está activa), así que el resto del sitio no cambia.
 * No cambia alturas ni estilos de las secciones.
 */

/* ---------- Escena: detrás del contenido; las gotitas del hero van delante de la ilustración ---------- */
.crd-motion-svg { position: fixed; inset: 0; overflow: visible; pointer-events: none; display: block; }
#crd-stage { z-index: 0; }
#crd-drops-back { z-index: 1; }
.crd-motion .crd-landing main { position: relative; z-index: 10; }
#crd-drops-top { z-index: 15; }
.crd-motion .crd-landing main + div { position: relative; z-index: 12; }

/* Copias del texto recortadas con la forma de las gotas: mismo texto, color de contraste de la paleta. */
.crd-ink { position: absolute !important; inset: 0 !important; margin: 0 !important; pointer-events: none; user-select: none; }
.crd-ink, .crd-ink * { color: var(--crd-ink) !important; -webkit-text-fill-color: var(--crd-ink) !important; }
.crd-ink-1 { --crd-ink: #04304A; }
.crd-ink-2 { --crd-ink: #F9F7F2; }
[data-theme="dark"] .crd-ink-1, [data-theme="dark"] .crd-ink-2 { --crd-ink: #E3F7F8; }

/* ---------- Cabecera fija: se compacta al bajar y marca la sección en pantalla ---------- */
.crd-landing > header { position: fixed; pointer-events: none; }
.crd-landing > header a, .crd-landing > header button, .crd-landing > header nav { pointer-events: auto; }
.crd-landing > header > div { transition: padding .45s cubic-bezier(.22,1,.36,1); }
.crd-landing > header > div > a:first-child { border-radius: 999px; transition: background-color .35s, box-shadow .35s, padding .45s cubic-bezier(.22,1,.36,1); }
.crd-landing > header > div > a:first-child svg { transition: width .45s cubic-bezier(.22,1,.36,1), height .45s cubic-bezier(.22,1,.36,1); }
.crd-landing > header.is-scrolled > div { padding-top: 10px; padding-bottom: 10px; }
.crd-landing > header.is-scrolled > div > a:first-child { padding: 4px 16px 4px 6px; background: color-mix(in srgb, var(--surface) 86%, transparent); box-shadow: var(--shadow-soft); backdrop-filter: blur(12px); }
.crd-landing > header.is-scrolled > div > a:first-child svg { width: 40px; height: 40px; }
.crd-landing > header nav ul a { position: relative; padding: 6px 0; }
.crd-landing > header nav ul a[aria-current] { color: var(--ink); font-weight: 600; }
.crd-landing > header nav ul a[aria-current]::after { content: ""; position: absolute; left: 50%; bottom: 0; width: 18px; height: 3px; margin-left: -9px; border-radius: 3px; background: var(--accent); }

/* Con la barra de administración de WordPress, la cabecera fija baja con ella. */
.admin-bar.crd-landing > header { top: 32px; }
@media (max-width: 782px) { .admin-bar.crd-landing > header { top: 46px; } }
@media (max-width: 600px) { .admin-bar.crd-landing > header { top: 0; } }

@media (prefers-reduced-motion: reduce) {
  .crd-landing > header > div, .crd-landing > header > div > a:first-child, .crd-landing > header > div > a:first-child svg { transition: none; }
}
