/*! © 2026 Kerb3r0ps · www.kerb3r0ps.com */
/* Home (www.kerb3r0ps.com/). Hoja propia: landing.css sigue sirviendo a las páginas 403 y 404.
   Lenguaje de Kerb3r0ps: la limpieza y el orden de los sistemas de producto (paneles, aire, pocas sombras) con el ADN
   de la primera versión de la web: Unbounded en titulares, hueso y gris cálido, botón hueso que se vacía al pasar
   el ratón; las herramientas, en neutro.
   Radios: píldora para botones, 24px para paneles, 12px para piezas pequeñas. */
@font-face { font-family: "Unbounded"; font-weight: 200 900; font-display: swap; src: url("/assets/fonts/unbounded.woff2") format("woff2"); }
@font-face { font-family: "Instrument Sans"; font-weight: 400 700; font-display: swap; src: url("/assets/fonts/instrument-sans.woff2") format("woff2"); }

:root {
  /* negro puro solo porque la ilustración de Cerbero está sobre negro: así se integra sin recuadro */
  --bg: #000;
  --tile: #0F0F11;
  --tile-2: #161618;
  --line: rgba(242, 240, 235, .1);
  --fg: #F2F0EB;
  --fg-2: #9C9CA6;
  --fg-3: #6B6B75;
  --def: #3D8BFF; --atk: #FF2A2A; --int: #F8BE38;
  --logo: url("/assets/img/logo-k.png");
  --logo-lg: url("/assets/img/cerbero.webp");
  --sans: "Instrument Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --display: "Unbounded", "Arial Black", system-ui, sans-serif;
  --ease: cubic-bezier(.16, 1, .3, 1);
  --gutter: clamp(1.25rem, 5vw, 3rem);
  --z-head: 40; --z-cookie: 60; --z-intro: 100;
  /* la portada entra cuando la carga empieza a fundirse */
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; scroll-padding-top: 3.25rem; -webkit-text-size-adjust: 100%; text-size-adjust: 100%; -webkit-tap-highlight-color: transparent; }
body { background: var(--bg); color: var(--fg); font-family: var(--sans); font-size: 1.0625rem; line-height: 1.47; letter-spacing: -.01em; -webkit-font-smoothing: antialiased; overflow-x: hidden; }
::selection { background: var(--fg); color: #000; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--fg); outline-offset: 3px; border-radius: 8px; }
.wrap { width: min(70rem, 100% - 2 * var(--gutter)); margin-inline: auto; }
.def { --c: var(--def); } .atk { --c: var(--atk); } .int { --c: var(--int); }
* { scrollbar-width: thin; scrollbar-color: #2C2C2E var(--bg); }

/* cero tachado: que nunca se lea como una O */
.z { position: relative; display: inline-block; }
.z::after { content: ""; position: absolute; left: 50%; top: 51%; width: .1em; height: .62em; background: currentColor; transform: translate(-50%, -50%) rotate(30deg); }

.skip { position: fixed; left: 1rem; top: -4rem; z-index: calc(var(--z-intro) + 1); padding: .6rem 1rem; border-radius: 12px; background: var(--fg); color: #000; font-weight: 600; text-decoration: none; transition: top .3s var(--ease); }
.skip:focus { top: 1rem; }

/* ───────── Carga (carga.js) ─────────
   salto al hiperespacio → las estelas se indexan en el /k → la marca se descifra → el negro se abre a la portada.
   Si el script no llega a ejecutarse, la animación de seguridad retira la capa igualmente. */
html { --d0: 3.05s; }
html.no-intro { --d0: .05s; }
.intro { position: fixed; inset: 0; z-index: var(--z-intro); display: grid; place-items: center; background: #000; cursor: pointer; overflow: hidden;
  animation: introOut .6s var(--ease) 5s forwards; transition: background-color .9s cubic-bezier(.65, 0, .35, 1); }
html:not(.js) .intro { display: none; }
@keyframes introOut { to { opacity: 0; visibility: hidden; } }
.intro-cv { position: absolute; inset: 0; width: 100%; height: 100%; }
.intro-c { position: relative; display: grid; justify-items: center; gap: 1.5rem; transition: opacity .7s var(--ease), transform .9s var(--ease), filter .7s var(--ease); }
.intro-logo { width: clamp(6.5rem, 22vmin, 9.5rem); height: clamp(6.5rem, 22vmin, 9.5rem); border-radius: 26%; box-shadow: inset 0 0 0 1px rgba(242, 240, 235, .22); background: #000 var(--logo) center / 135% no-repeat; opacity: 0; transition: opacity .5s ease, box-shadow 1.2s ease; }
.intro.fijo .intro-logo { opacity: 1; box-shadow: inset 0 0 0 1px rgba(242, 240, 235, .3), 0 0 60px -10px rgba(242, 240, 235, .25); }
.intro-name { font-family: var(--display); font-weight: 600; font-size: clamp(1.5rem, 3.6vw, 2.1rem); letter-spacing: -.01em; white-space: nowrap; min-height: 1.2em; }
.intro-name .ch { display: inline-block; min-width: .62em; text-align: center; opacity: 0; transition: opacity .25s, color .25s; }
.intro-name .ch.on { opacity: 1; }
.intro-name .ch.cif { color: var(--fg-2); }
.intro-name .ch.cif.z::after { opacity: 0; }
.intro-st { display: flex; align-items: center; gap: .8rem; height: 1rem; opacity: 0; transition: opacity .4s; }
.intro.marca .intro-st { opacity: 1; }
.intro-bar { position: relative; width: 6rem; height: 1px; background: rgba(255, 255, 255, .14); overflow: hidden; }
.intro-bar::after { content: ""; position: absolute; inset: 0; background: var(--fg); transform: scaleX(var(--p, 0)); transform-origin: left; }
.intro-tx { min-width: 9.5em; font: 500 .72rem/1 var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--fg-2); }
/* salida: la marca se aleja y el negro se vuelve transparente mientras las partículas salen disparadas */
.intro.fuera { background-color: transparent; pointer-events: none; }
.intro.fuera .intro-c { opacity: 0; transform: scale(1.18); filter: blur(10px); }
html.no-intro .intro, .intro.skip { display: none; }

/* ───────── Botones ───────── */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .3rem; border-radius: 999px; text-decoration: none; white-space: nowrap; cursor: pointer; font: 600 1rem var(--sans); letter-spacing: -.01em; border: 1px solid var(--fg); transition: background .25s, color .25s, transform .2s var(--ease); }
.btn.primary { padding: .78rem 1.5rem; background: var(--fg); color: #000; }
.btn.primary:hover { background: transparent; color: var(--fg); }
.btn.primary.sm { padding: .6rem 1.2rem; font-size: .92rem; }
.btn:active { transform: scale(.95); }

/* ───────── Portada ───────── */
.hero { overflow: clip; min-height: calc(100vh - 3.25rem); min-height: calc(100dvh - 3.25rem); display: flex; flex-direction: column; padding-top: clamp(2.5rem, 8vh, 4.5rem); text-align: center; }
.hero-txt { display: flex; flex-direction: column; align-items: center; }
.hero h1 { max-width: 22ch; font-family: var(--display); font-weight: 600; font-size: clamp(2.1rem, 4.6vw, 4rem); line-height: 1.12; letter-spacing: -.035em; text-wrap: balance; }
.hero-lead { max-width: 34rem; margin-top: 1.2rem; font-size: clamp(1.06rem, 1.5vw, 1.3rem); line-height: 1.45; color: var(--fg-2); text-wrap: balance; }
.hero-lead .z::after { background: var(--fg-2); }
.hero-cta { display: flex; justify-content: center; gap: 1rem; margin-top: 1.8rem; }
.h-in { animation: hin 1.2s var(--ease) both; animation-delay: calc(var(--d0) + var(--i, 0) * .1s); }
@keyframes hin { from { opacity: 0; transform: translateY(18px); } }
.beast.h-in { animation-name: beastIn; animation-duration: 1.8s; }
/* tras la carga, Cerbero no sube: aparece justo donde se posan las partículas del /k (carga.js) */
html:not(.no-intro) .beast.h-in { animation-name: beastFade; animation-duration: .8s; animation-timing-function: ease; animation-delay: calc(var(--d0) + .7s); }
@keyframes beastFade { from { opacity: 0; } }
@keyframes beastIn { from { opacity: 0; transform: translateY(28px); } }

/* Cerbero, intacto y quieto: ocupa el espacio que queda bajo el mensaje, siempre entero */
.beast { flex: 1; min-height: min(40rem, 92vw); position: relative; margin-top: clamp(1rem, 3vh, 2.5rem); }
.beast-in { position: absolute; left: 50%; bottom: 0; translate: -50% 0; height: min(100%, calc(100vw - 2rem), 46rem); aspect-ratio: 1; }
.cerb { position: absolute; inset: 0; background: var(--logo-lg) center / contain no-repeat; }
.parpado { position: absolute; inset: 0; pointer-events: none; opacity: 0; background: var(--logo-lg) center / contain no-repeat; filter: brightness(1.9) saturate(1.4) drop-shadow(0 0 6px currentColor); mix-blend-mode: screen; animation: parpadeo 7.3s 3s infinite; }
.parpado.def { color: var(--def); }
.parpado.atk { color: var(--atk); animation-duration: 6.1s; animation-delay: 5.4s; }
.parpado.int { color: var(--int); animation-duration: 8.2s; animation-delay: 7.1s; }
.p1 { -webkit-mask-image: radial-gradient(1.6% 1.6% at 12.28% 47.96%, #000 55%, transparent); mask-image: radial-gradient(1.6% 1.6% at 12.28% 47.96%, #000 55%, transparent); }
.p2 { -webkit-mask-image: radial-gradient(3.2% 2.3% at 21.82% 45.64%, #000 55%, transparent); mask-image: radial-gradient(3.2% 2.3% at 21.82% 45.64%, #000 55%, transparent); }
.p3 { -webkit-mask-image: radial-gradient(3.2% 2.3% at 46.1% 40.7%, #000 55%, transparent); mask-image: radial-gradient(3.2% 2.3% at 46.1% 40.7%, #000 55%, transparent); }
.p4 { -webkit-mask-image: radial-gradient(3.1% 2.3% at 61.3% 41.2%, #000 55%, transparent); mask-image: radial-gradient(3.1% 2.3% at 61.3% 41.2%, #000 55%, transparent); }
.p5 { -webkit-mask-image: radial-gradient(2.9% 2.1% at 80.2% 47.1%, #000 55%, transparent); mask-image: radial-gradient(2.9% 2.1% at 80.2% 47.1%, #000 55%, transparent); }
.p6 { -webkit-mask-image: radial-gradient(1.2% 1.2% at 88% 49.06%, #000 55%, transparent); mask-image: radial-gradient(1.2% 1.2% at 88% 49.06%, #000 55%, transparent); }
@keyframes parpadeo { 0%, 88%, 100% { opacity: 0; } 89.5% { opacity: .85; } 90.5% { opacity: .2; } 91.8% { opacity: .9; } 93% { opacity: .35; } 95% { opacity: .7; } 97.5% { opacity: 0; } }

.beast-in { z-index: 1; min-width: 0; }

/* holograma 3D (cerbero3d.js): cuando arranca sustituye a la imagen fija, que queda como respaldo */
.cerb3d { position: absolute; left: 50%; top: 50%; translate: -50% -50%; max-width: none; pointer-events: none; }
.beast-in { contain: layout; }
.beast-in.gl .cerb, .beast-in.gl .parpado { opacity: 0; animation: none; transition: opacity .6s; }

/* ───────── Encuadre de Cerbero y fondo de ciberespacio ───────── */
.beast { --t0: calc(var(--d0) + 2.4s); }
.hud { position: absolute; inset: 0; z-index: 2; pointer-events: none; }
.hud-c { position: absolute; width: 22px; height: 22px; border: 0 solid rgba(242, 240, 235, .32); opacity: 0; animation: hudIn .8s var(--ease) forwards var(--t0); }
.hud-c.tl { top: 2%; left: 2%; border-width: 1px 0 0 1px; } .hud-c.tr { top: 2%; right: 2%; border-width: 1px 1px 0 0; }
.hud-c.bl { bottom: 2%; left: 2%; border-width: 0 0 1px 1px; } .hud-c.br { bottom: 2%; right: 2%; border-width: 0 1px 1px 0; }
@keyframes hudIn { from { opacity: 0; transform: scale(1.4); } to { opacity: 1; transform: none; } }
@keyframes cosmosIn { to { opacity: 1; } }
/* estrellas, constelaciones y estrellas fugaces (cosmos.js); se apagan donde está el texto para no restarle lectura */
.hero { position: relative; }
.hero > .wrap, .hero > .beast { position: relative; z-index: 1; }
.cosmos { position: absolute; inset: 0; z-index: 0; width: 100%; height: 100%; pointer-events: none; opacity: 0; animation: cosmosIn 2.4s ease forwards calc(var(--d0) - .45s);
  -webkit-mask-image: radial-gradient(ellipse 46% 30% at 50% 24%, transparent 30%, #000 100%); mask-image: radial-gradient(ellipse 46% 30% at 50% 24%, transparent 30%, #000 100%); }

/* ───────── Revelado al entrar en pantalla ───────── */
/* orden de entrada (--i) de la portada y de cada sección; con clase porque la CSP no admite style en línea */
.i1 { --i: 1; } .i2 { --i: 2; } .i3 { --i: 3; }
.js [data-r] { opacity: 0; transform: translateY(24px); transition: opacity 1s var(--ease), transform 1.1s var(--ease); transition-delay: calc(var(--i, 0) * .08s); }
.js [data-r].in { opacity: 1; transform: none; }

/* ───────── Secciones ───────── */
section.project, section.tools, section.cta { padding-block: clamp(5.5rem, 12vw, 9rem); }
h2 { font-family: var(--display); font-weight: 600; font-size: clamp(1.8rem, 3.8vw, 3.1rem); line-height: 1.12; letter-spacing: -.035em; text-wrap: balance; }
.sec-lead { margin-top: 1.1rem; max-width: 36rem; font-size: clamp(1.06rem, 1.4vw, 1.25rem); line-height: 1.45; color: var(--fg-2); text-wrap: pretty; }

/* Proyecto: la idea a la izquierda, los tres verbos a la derecha */
.project { background: var(--tile); }
.project-grid { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: clamp(2.5rem, 7vw, 7rem); align-items: start; }
.project-say h2 { max-width: 28ch; font-size: clamp(1.45rem, 2.25vw, 1.95rem); line-height: 1.18; }
.pillars { display: grid; gap: 2.2rem; padding-top: .6rem; }
.pillars dt { font-family: var(--display); font-weight: 600; font-size: 1.15rem; letter-spacing: -.02em; }
.pillars dd { margin-top: .35rem; color: var(--fg-2); max-width: 30rem; }

/* Herramientas: una grande y el resto de dos en dos (crece igual con más herramientas) */
.sec-head { text-align: center; display: flex; flex-direction: column; align-items: center; margin-bottom: clamp(2.5rem, 5vw, 4rem); }
.sec-head h2 { max-width: 18ch; }
.tiles-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.tile { display: flex; flex-direction: column; gap: 2rem; min-width: 0; padding: clamp(2rem, 4vw, 3.5rem) clamp(1.5rem, 3.5vw, 3rem) clamp(1.5rem, 3vw, 2.5rem); border-radius: 24px; background: var(--tile-2); overflow: hidden; }
.tile.wide { grid-column: 1 / -1; }
.tile-head { display: flex; flex-direction: column; align-items: center; text-align: center; }
.tile-n { font-family: var(--display); font-weight: 600; font-size: clamp(1.9rem, 3.6vw, 3rem); line-height: 1.08; letter-spacing: -.04em; }
.tile-d { margin-top: .7rem; max-width: 30rem; color: var(--fg-2); font-size: clamp(1rem, 1.3vw, 1.15rem); text-wrap: balance; }
.tile-cta { display: flex; flex-direction: column; align-items: center; gap: .7rem; margin-top: 1.5rem; }
.viz { position: relative; flex: 1; min-height: 16rem; border-radius: 12px; }

/* CertMAP: una casilla por certificación, agrupadas por área (los colores son los de cada área en el mapa) */
.viz-cert { min-height: 0; display: flex; flex-direction: column; align-items: center; }
.mosaic { --s: 12px; width: 100%; display: grid; grid-template-columns: repeat(auto-fill, minmax(var(--s), 1fr)); grid-auto-rows: var(--s); gap: calc(var(--s) * .3); }
.mosaic i { border-radius: 2.5px; background: var(--tc); opacity: 0; transform: scale(.4); transition: opacity .8s, transform .9s var(--ease), box-shadow .5s; transition-delay: calc(var(--k) * 1.8ms); }
.tile.in .mosaic i { opacity: .72; transform: none; }
.mosaic i.on { opacity: 1 !important; transform: scale(1.5) !important; transition-delay: 0s !important; position: relative; z-index: 1; box-shadow: 0 0 0 2px var(--tile-2), 0 0 0 3px var(--fg); }
.pick { display: flex; align-items: baseline; justify-content: center; gap: .6rem; max-width: 100%; min-height: 1.5em; margin-top: 1.4rem; font-size: .9rem; color: var(--fg-2); transition: opacity .3s; }
.pick b { color: var(--fg); font-family: var(--display); font-weight: 600; letter-spacing: -.01em; white-space: nowrap; }
.pick span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pick.swap { opacity: 0; }

/* ReCON: eventos de los próximos doce meses y los tres siguientes */
.viz-recon { display: flex; flex-direction: column; gap: 1.6rem; }
.months { display: grid; grid-template-columns: repeat(12, 1fr); gap: .4rem; height: 7.5rem; }
.months div { display: grid; grid-template-rows: 1fr auto; gap: .45rem; }
.months i { align-self: end; height: var(--h); min-height: 3px; border-radius: 4px; background: rgba(255, 255, 255, .16); transform: scaleY(0); transform-origin: bottom; transition: transform 1s var(--ease) calc(.2s + var(--k) * 45ms); }
.tile.in .months i { transform: scaleY(1); }
.months .now i { background: var(--fg); }
.months span { font-family: var(--mono); font-size: .66rem; color: var(--fg-3); text-align: center; text-transform: uppercase; }
.months .now span { color: var(--fg); }
.next-list { list-style: none; display: grid; gap: .2rem; }
.next-list li { display: grid; grid-template-columns: 3.4rem minmax(0, 1fr); align-items: center; gap: .9rem; padding: .7rem .9rem; border-radius: 12px; background: rgba(255, 255, 255, .04); }
.next-list .d { display: grid; justify-items: center; line-height: 1.05; }
.next-list .d b { font-family: var(--display); font-weight: 600; font-size: 1.15rem; font-variant-numeric: tabular-nums; }
.next-list .d small { font-family: var(--mono); font-size: .64rem; color: var(--fg-2); text-transform: uppercase; letter-spacing: .06em; }
.next-list li > span:last-child { min-width: 0; }
.next-list .n { display: block; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.next-list .w { display: block; font-size: .85rem; color: var(--fg-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.next-list .live { color: var(--fg); font-weight: 600; }

/* Atlas OSINT: los datos de partida, unidos por las herramientas que admiten ambos */
.viz-osint { display: grid; place-items: center; }
.graph { width: 100%; max-width: 30rem; height: auto; overflow: visible; }
.graph .e { fill: none; stroke: #fff; stroke-opacity: var(--o); stroke-width: var(--w); stroke-dasharray: 1000; stroke-dashoffset: 1000; transition: stroke-dashoffset 2s var(--ease); }
.tile.in .graph .e { stroke-dashoffset: 0; }
.graph .f { fill: none; stroke: var(--fg); stroke-width: 1.8; stroke-linecap: round; stroke-dasharray: 10 600; stroke-dashoffset: 10; opacity: 0; transition: opacity .6s 1.6s; animation: flow 3.6s cubic-bezier(.65, 0, .35, 1) infinite var(--d, 0s); }
.tile.in .graph .f { opacity: 1; }
@keyframes flow { to { stroke-dashoffset: -400; } }
.graph .nd circle { fill: var(--tile-2); stroke: var(--fg-2); stroke-width: 1.4; }
.graph .nd text { fill: var(--fg-2); font: 400 13px var(--sans); }

/* ───────── Contacto ───────── */
.cta { text-align: center; background: var(--tile); }
.cta .wrap { display: flex; flex-direction: column; align-items: center; }
.cta .sec-lead { max-width: 38rem; }
.big-mail { margin-top: 2.2rem; font-family: var(--display); font-weight: 500; font-size: clamp(1.25rem, 3vw, 2.2rem); letter-spacing: -.035em; color: var(--fg); text-decoration: underline; text-decoration-thickness: 1px; text-decoration-color: var(--fg-3); text-underline-offset: .22em; transition: text-decoration-color .25s; }
.big-mail:hover { text-decoration-color: var(--fg); }
.social { display: flex; gap: 1.8rem; margin-top: 1.6rem; }
.social a { color: var(--fg-2); text-decoration: none; transition: color .2s; }
.social a:hover { color: var(--fg); }

/* ───────── Pie ───────── */
footer { border-top: 1px solid var(--line); background: var(--tile); }
.foot .sn-brand { color: var(--fg); }
.foot { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 1.2rem 2.5rem; padding-block: 2rem calc(2rem + env(safe-area-inset-bottom, 0px)); font-size: .8rem; color: var(--fg-3); }
.foot-tools { display: flex; flex-wrap: wrap; gap: .4rem 1.6rem; justify-self: center; }
.foot-tools a { color: var(--fg-2); text-decoration: none; }
.foot-tools a:hover { color: var(--fg); }
.foot-legal { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem 1.6rem; }
.legal { display: flex; flex-wrap: wrap; gap: .3rem 1.2rem; }
.legal button { background: none; border: 0; padding: 0; cursor: pointer; font: inherit; color: var(--fg-2); }
.legal button:hover { color: var(--fg); }

/* ───────── Textos legales y aviso de cookies ───────── */
dialog.doc { margin: auto; width: min(44rem, 100% - 2rem); max-height: min(85vh, 46rem); padding: 0; border: 1px solid var(--line); border-radius: 24px; background: var(--tile-2); color: var(--fg); }
dialog.doc[open] { animation: dlg .45s var(--ease); }
@keyframes dlg { from { opacity: 0; transform: translateY(12px) scale(.98); } }
dialog.doc::backdrop { background: rgba(0, 0, 0, .6); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); }
dialog.doc header { position: sticky; top: 0; display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 1.1rem 1.5rem; background: rgba(22, 22, 24, .9); -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px); border-bottom: 1px solid var(--line); }
dialog.doc h2 { font-size: 1.15rem; letter-spacing: -.02em; }
dialog.doc .x { border: 0; border-radius: 999px; padding: .5rem 1rem; background: rgba(255, 255, 255, .08); color: var(--fg); font: 400 .9rem var(--sans); cursor: pointer; }
dialog.doc .x:hover { background: rgba(255, 255, 255, .14); }
dialog.doc .body { padding: 1.3rem 1.5rem 2rem; font-size: 1rem; color: var(--fg-2); }
dialog.doc h3 { font-size: 1.02rem; font-weight: 600; color: var(--fg); margin: 1.5rem 0 .4rem; }
dialog.doc h3:first-child { margin-top: 0; }
dialog.doc p + p { margin-top: .6rem; }
dialog.doc ul { margin: .4rem 0 0 1.2rem; }
dialog.doc a { color: var(--fg); }
dialog.doc mark { background: rgba(248, 190, 56, .16); color: var(--int); padding: 0 .25em; border-radius: 4px; }
.cookie {
  position: fixed; left: 50%; bottom: calc(1rem + env(safe-area-inset-bottom, 0px)); z-index: var(--z-cookie); translate: -50% 0;
  width: min(40rem, 100% - 2rem); display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .8rem 1.5rem;
  padding: .9rem .9rem .9rem 1.3rem; border-radius: 18px; font-size: .85rem; color: var(--fg-2);
  background: rgba(29, 29, 31, .82); -webkit-backdrop-filter: saturate(180%) blur(24px); backdrop-filter: saturate(180%) blur(24px);
  border: 1px solid var(--line); animation: up .8s var(--ease) both calc(var(--d0) + 1.2s);
}
@keyframes up { from { opacity: 0; transform: translateY(16px); } }
.cookie[hidden] { display: none; }
.cookie p { flex: 1 1 18rem; }
.cookie div { display: flex; gap: .5rem; }
.cookie button { cursor: pointer; border: 0; border-radius: 999px; padding: .5rem 1rem; background: rgba(255, 255, 255, .08); color: var(--fg); font: 400 .85rem var(--sans); transition: background .2s, transform .2s var(--ease); }
.cookie button:hover { background: rgba(255, 255, 255, .14); }
.cookie button:active { transform: scale(.95); }
.cookie button.ok { background: var(--fg); color: #000; }

/* ───────── Pantallas ───────── */
@media (max-width: 900px) {
  .project-grid { grid-template-columns: 1fr; }
  .tiles-grid { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .foot { grid-template-columns: 1fr; justify-items: start; }
  .foot-tools { justify-self: start; }
  .cookie { padding: .9rem; }
  dialog.doc { width: calc(100% - 1rem); max-height: 88dvh; }
  dialog.doc header, dialog.doc .body { padding-inline: 1.1rem; }
}
@media (pointer: coarse) {
  .legal button, .foot-tools a { padding-block: .5rem; }
  .cookie button, dialog.doc .x { min-height: 44px; }
}
@media (orientation: landscape) and (max-height: 520px) {
  .hero { min-height: 0; }
  .beast { flex: none; height: 70vh; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .intro { display: none; }
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; animation-delay: 0s !important; transition-duration: .001ms !important; transition-delay: 0s !important; }
  .parpado, .graph .f { animation: none; }
}

/* ── Grimorio en portada: la banda del buscador, entre el hero y el proyecto ── */
.buscador { padding-block: clamp(3.5rem, 8vw, 6rem); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
  background:
    radial-gradient(60rem 30rem at 18% -10%, rgba(61, 139, 255, .10), transparent 60%),
    radial-gradient(50rem 28rem at 92% 120%, rgba(255, 42, 42, .10), transparent 60%),
    var(--tile); }
.buscador-in { max-width: 48rem; }
.buscador .eyebrow { display: inline-flex; align-items: center; gap: .55rem; color: var(--fg-2); font-size: .82rem; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; margin-bottom: 1rem; }
.buscador .eyebrow::before { content: ""; width: .5rem; height: .5rem; background: var(--atk); transform: rotate(45deg); }
.buscador-h { font-family: var(--display); font-weight: 700; font-size: clamp(1.9rem, 5.2vw, 3.3rem); line-height: 1.05; letter-spacing: -.035em; text-wrap: balance; }
.buscador-lead { margin-top: 1rem; max-width: 40rem; color: var(--fg-2); font-size: clamp(1.03rem, 1.4vw, 1.2rem); line-height: 1.5; }
.buscador-bar { position: relative; display: flex; align-items: center; gap: .6rem; margin-top: 1.8rem; }
.buscador-lupa { position: absolute; left: 1.1rem; top: 50%; transform: translateY(-50%); width: 1.3rem; height: 1.3rem; color: var(--fg-2); pointer-events: none; }
.buscador-campo { flex: 1 1 auto; min-width: 0; font: 400 1.1rem var(--sans); color: var(--fg); background: var(--bg); border: 1px solid var(--line); border-radius: 1rem; padding: 1rem 1.1rem 1rem 3.2rem; transition: border-color .2s, box-shadow .2s; }
.buscador-campo::placeholder { color: var(--fg-2); }
.buscador-campo::-webkit-search-cancel-button { -webkit-appearance: none; appearance: none; }
.buscador-campo:focus { outline: none; border-color: var(--fg); box-shadow: 0 0 0 4px rgba(242, 240, 235, .08); }
.buscador-go { flex: none; padding-inline: 1.6rem; align-self: stretch; }
.buscador-sug { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem .55rem; margin-top: 1.1rem; color: var(--fg-2); font-size: .9rem; }
.buscador-sug a { color: var(--fg-2); text-decoration: none; padding: .32rem .8rem; border: 1px solid var(--line); border-radius: 999px; transition: color .15s, border-color .15s; }
.buscador-sug a:hover { color: var(--fg); border-color: var(--fg-2); }

@media (max-width: 560px) {
  .buscador-bar { flex-direction: column; align-items: stretch; }
  .buscador-campo { font-size: 16px; }
  .buscador-go { align-self: auto; justify-content: center; }
}
