/* ==========================================================================
   CarlosPF · estilos del tema
   Colores, tipografías y tamaños base: theme.json. Aquí: componentes.
   ========================================================================== */

:root {
	--cpf-bg: var(--wp--preset--color--bg, #0b0f13);
	--cpf-bg2: var(--wp--preset--color--bg-2, #11171d);
	--cpf-bg3: var(--wp--preset--color--bg-3, #161e26);
	--cpf-ink: var(--wp--preset--color--ink, #e8edf2);
	--cpf-muted: var(--wp--preset--color--muted, #8693a0);
	--cpf-line: var(--wp--preset--color--line, #22303b);
	--cpf-accent: var(--wp--preset--color--accent, #6ee7d2);
	--cpf-accent2: var(--wp--preset--color--accent-2, #a5b4ff);
	--cpf-warn: var(--wp--preset--color--warn, #ffd166);
	--cpf-pink: var(--wp--preset--color--pink, #ff6b9d);
	--cpf-mono: var(--wp--preset--font-family--mono, ui-monospace, monospace);
	--cpf-sans: var(--wp--preset--font-family--sans, system-ui, sans-serif);
	--cpf-wrap: 1200px;
}
html { scroll-behavior: smooth; }
body { -webkit-font-smoothing: antialiased; overflow-x: hidden; }
::selection { background: var(--cpf-accent); color: var(--cpf-bg); }
:where(.wp-site-blocks) > * { margin-block-start: 0; }
.screen-reader-text { border: 0; clip: rect(1px,1px,1px,1px); clip-path: inset(50%); height: 1px; margin: -1px; overflow: hidden; padding: 0; position: absolute !important; width: 1px; word-wrap: normal !important; }
:focus-visible { outline: 2px solid var(--cpf-accent); outline-offset: 3px; }

/* ---------- Utilidades ---------- */
.cpf-wrap { max-width: var(--cpf-wrap); margin-inline: auto !important; padding-inline: 24px; position: relative; box-sizing: border-box; width: 100%; }
.cpf-kicker { font-family: var(--cpf-mono); font-size: 13px; color: var(--cpf-accent); letter-spacing: .02em; margin: 0 0 12px !important; }
.cpf-muted { color: var(--cpf-muted); }
.cpf-kbd, kbd { font: 500 11px var(--cpf-mono); border: 1px solid var(--cpf-line); border-bottom-width: 2px; border-radius: 4px; padding: 1px 6px; color: var(--cpf-muted); background: transparent; }
.cpf-section { padding-block: 110px; border-bottom: 1px solid var(--cpf-line); position: relative; }
.cpf-section-head { max-width: 760px; margin-bottom: 52px !important; }
.cpf-section-head h2 { margin: 0 !important; }
.cpf-section-head p:not(.cpf-kicker) { color: var(--cpf-muted); margin-top: 16px !important; }
.cpf-reveal { opacity: 0; transform: translateY(24px); transition: opacity .8s, transform .8s; }
.cpf-reveal.in { opacity: 1; transform: none; }

/* Botones */
.wp-block-button__link { transition: box-shadow .2s, background .2s, border-color .2s; }
.wp-block-button:not(.is-style-outline) .wp-block-button__link:hover { box-shadow: 0 0 28px 2px rgba(110,231,210,.35); color: #06100e; }
.wp-block-button.is-style-outline .wp-block-button__link,
.cpf-btn-ghost { border: 1px solid var(--cpf-line) !important; background: var(--cpf-bg2) !important; color: var(--cpf-ink) !important; padding: 13px 20px; border-radius: 6px; }
.wp-block-button.is-style-outline .wp-block-button__link:hover, .cpf-btn-ghost:hover { border-color: var(--cpf-accent) !important; }
.cpf-btn-ghost { font: 500 12px var(--cpf-mono); cursor: pointer; padding: 8px 12px; }

/* ---------- Cabecera ---------- */
.cpf-header { position: sticky; top: 0; z-index: 20; background: rgba(11,15,19,.8); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-bottom: 1px solid var(--cpf-line); }
.admin-bar .cpf-header { top: var(--wp-admin--admin-bar--height, 32px); }
.cpf-header-inner { display: flex; justify-content: space-between; align-items: center; min-height: 64px; gap: 24px; }
.cpf-logo { font: 500 15px var(--cpf-mono); margin: 0 !important; }
.cpf-logo a { text-decoration: none; color: var(--cpf-ink); }
.cpf-logo a::before { content: "~/"; color: var(--cpf-accent); }
.cpf-header .wp-block-navigation { font-size: 15px; color: var(--cpf-muted); gap: 26px; }
.cpf-header .wp-block-navigation a { text-decoration: none; }
.cpf-header .wp-block-navigation a:hover, .cpf-header .wp-block-navigation .current-menu-item > a, .cpf-header .wp-block-navigation a[aria-current="page"] { color: var(--cpf-ink); }
.cpf-header-tools { display: flex; align-items: center; gap: 22px; }
.cpf-header-inner > *, .cpf-header-tools > * { margin: 0 !important; }
.cpf-header-tools a { text-decoration: none; }
.wp-block-navigation__responsive-container.is-menu-open { background: var(--cpf-bg) !important; color: var(--cpf-ink) !important; }

/* ---------- Hero ---------- */
.cpf-hero { position: relative; overflow: hidden; border-bottom: 1px solid var(--cpf-line); }
.cpf-net { position: absolute; inset: 0; width: 100%; height: 100%; opacity: .55; }
.cpf-hero::after { content: ""; position: absolute; inset: 0; pointer-events: none; background: radial-gradient(ellipse at 30% 40%, transparent 0, var(--cpf-bg) 75%); }
.cpf-hero-grid { display: grid !important; grid-template-columns: 1.25fr .75fr; gap: 56px; align-items: center; padding-block: 88px 96px; z-index: 2; }
.cpf-hero-grid > * { min-width: 0; margin: 0 !important; }
.cpf-prompt { font: 400 15px var(--cpf-mono); color: var(--cpf-muted); margin: 0 !important; }
.cpf-prompt strong, .cpf-prompt b { color: var(--cpf-accent); font-weight: 500; }
.cpf-glitch { position: relative; display: inline-block; margin: 16px 0 10px !important; }
.cpf-glitch::before, .cpf-glitch::after { content: attr(data-text); position: absolute; inset: 0; opacity: 0; pointer-events: none; }
.cpf-glitch:hover::before { opacity: .8; color: var(--cpf-pink); animation: cpf-g1 .35s steps(2) infinite; transform: translate(-3px,0); }
.cpf-glitch:hover::after { opacity: .8; color: var(--cpf-accent); animation: cpf-g2 .3s steps(2) infinite; transform: translate(3px,0); }
@keyframes cpf-g1 { 0% { clip-path: inset(10% 0 60% 0); } 50% { clip-path: inset(55% 0 20% 0); } 100% { clip-path: inset(30% 0 45% 0); } }
@keyframes cpf-g2 { 0% { clip-path: inset(65% 0 5% 0); } 50% { clip-path: inset(5% 0 75% 0); } 100% { clip-path: inset(40% 0 35% 0); } }
.cpf-roles { font: 500 clamp(18px, 2.2vw, 24px) var(--cpf-mono); color: var(--cpf-accent2); min-height: 1.6em; margin: 0 0 22px !important; }
.cpf-caret::after { content: "▋"; animation: cpf-blink 1s steps(1) infinite; margin-left: 2px; }
@keyframes cpf-blink { 50% { opacity: 0; } }
.cpf-lead { max-width: 600px; color: #b5c0cb; font-size: 18px; margin: 0 0 34px !important; }
.cpf-chips { list-style: none; padding: 0 !important; display: flex; flex-wrap: wrap; gap: 8px; margin: 34px 0 0 !important; }
.cpf-chips li { font: 400 12px var(--cpf-mono); border: 1px solid var(--cpf-line); background: rgba(17,23,29,.8); padding: 6px 10px; border-radius: 4px; color: var(--cpf-muted); margin: 0; }
.cpf-chips li::before { content: "● "; color: var(--cpf-accent); }

/* Retrato ASCII */
.cpf-portrait { position: relative; border: 1px solid var(--cpf-line); background: var(--cpf-bg2); border-radius: 12px; padding: 10px; margin: 0; box-shadow: 0 30px 80px -40px rgba(110,231,210,.35); }
.cpf-tabs { display: flex; gap: 6px; padding: 2px 2px 10px; }
.cpf-tabs button { font: 500 12px var(--cpf-mono); background: transparent; color: var(--cpf-muted); border: 1px solid transparent; border-radius: 4px; padding: 4px 8px; cursor: pointer; }
.cpf-tabs button[aria-pressed="true"] { color: var(--cpf-accent); border-color: var(--cpf-line); background: var(--cpf-bg); }
.cpf-dots { margin-left: auto; display: flex; gap: 6px; align-items: center; }
.cpf-dots i { width: 10px; height: 10px; border-radius: 50%; background: var(--cpf-line); }
.cpf-frame { position: relative; aspect-ratio: 4 / 5; border-radius: 6px; overflow: hidden; background: #05080a; }
.cpf-frame img, .cpf-frame canvas { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: opacity .6s; }
.cpf-frame img { opacity: 0; filter: saturate(.9) contrast(1.05); }
.cpf-frame::after { content: ""; position: absolute; inset: 0; pointer-events: none; background: repeating-linear-gradient(0deg, rgba(0,0,0,.18) 0 1px, transparent 1px 3px); mix-blend-mode: multiply; }
.cpf-portrait.photo .cpf-frame img { opacity: 1; }
.cpf-portrait.photo .cpf-frame canvas { opacity: 0; }
.cpf-meta { display: flex; justify-content: space-between; font: 400 12px var(--cpf-mono); color: var(--cpf-muted); padding: 10px 4px 2px; }

/* ---------- Tarjetas ---------- */
.cpf-cards { display: grid !important; grid-template-columns: repeat(3, 1fr); gap: 20px; perspective: 900px; }
.cpf-cards > * { margin: 0 !important; min-width: 0; }
.cpf-card { --rx: 0deg; --ry: 0deg; --mx: 50%; --my: 50%; position: relative; background: var(--cpf-bg2); border: 1px solid var(--cpf-line); border-radius: 12px; padding: 32px; display: flex; flex-direction: column; gap: 14px; transform: rotateX(var(--rx)) rotateY(var(--ry)); transition: transform .15s, border-color .2s; overflow: hidden; min-height: 280px; }
.cpf-card::before { content: ""; position: absolute; inset: 0; background: radial-gradient(360px circle at var(--mx) var(--my), rgba(110,231,210,.14), transparent 45%); opacity: 0; transition: opacity .3s; pointer-events: none; }
.cpf-card:hover { border-color: #2c8f80; }
.cpf-card:hover::before { opacity: 1; }
.cpf-card > * { position: relative; margin: 0 !important; }
.cpf-card h3 { font-size: 26px; }
.cpf-card p { color: var(--cpf-muted); font-size: 16px; }
.cpf-card .cpf-ico { font: 700 22px var(--cpf-mono); color: var(--cpf-accent2); }
.cpf-card .cpf-more { margin-top: auto !important; font: 400 13px var(--cpf-mono); }
.cpf-card .cpf-more a { text-decoration: none; color: var(--cpf-accent); position: static; }
.cpf-card .cpf-more a::after { content: ""; position: absolute; inset: 0; } /* toda la tarjeta es enlace */

.cpf-stats { display: grid !important; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 56px !important; }
.cpf-stats > * { margin: 0 !important; }
.cpf-stat { border: 1px dashed var(--cpf-line); border-radius: 10px; padding: 22px 24px; }
.cpf-stat > * { margin: 0 !important; }
.cpf-stat-num { font: 700 clamp(40px, 5vw, 60px)/1 var(--cpf-sans); letter-spacing: -.03em; }
.cpf-stat p:not(.cpf-stat-num) { color: var(--cpf-muted); font-size: 15px; }

/* ---------- Ciudad isométrica ---------- */
@property --bh { syntax: "<length>"; inherits: true; initial-value: 0px; }
.cpf-city { position: relative; height: 620px; overflow: visible; }
.cpf-city-scene { position: absolute; left: 50%; top: 50%; margin: -500px 0 0 -500px; width: 1000px; height: 1000px; transform-style: preserve-3d; transform: rotateX(58deg) rotateZ(-45deg) scale3d(.72,.72,.72); }
.cpf-ground { position: absolute; left: -30px; top: -30px; width: 1060px; height: 1060px; overflow: hidden; border: 1px solid var(--cpf-line);
	background: linear-gradient(rgba(110,231,210,.07) 1px, transparent 1px) 0 0 / 40px 40px, linear-gradient(90deg, rgba(110,231,210,.07) 1px, transparent 1px) 0 0 / 40px 40px, linear-gradient(to bottom right, #0d1318 0 64%, #130f1c 64% 100%); box-shadow: 0 0 80px rgba(110,231,210,.06); }
.cpf-river { position: absolute; left: calc(690px - 800px); top: calc(690px - 85px); width: 1600px; height: 170px; transform: rotate(-45deg); background: linear-gradient(#123049, #0e2638); border-block: 2px solid rgba(165,180,255,.35); }
.cpf-river::after { content: ""; position: absolute; inset: 0; background: repeating-linear-gradient(0deg, transparent 0 12px, rgba(165,180,255,.3) 12px 14px, transparent 14px 25px, rgba(110,231,210,.18) 25px 26px);
	-webkit-mask: repeating-linear-gradient(90deg, #000 0 90px, transparent 90px 150px); mask: repeating-linear-gradient(90deg, #000 0 90px, transparent 90px 150px); animation: cpf-flow 5s linear infinite; }
@keyframes cpf-flow { to { -webkit-mask-position: -300px 0; mask-position: -300px 0; } }
.cpf-seg, .cpf-ramp { position: absolute; height: 56px; background: linear-gradient(90deg, rgba(255,209,102,.55) 0 18px, transparent 18px 36px) 0 50% / 36px 2px repeat-x, #151d25; border-block: 1px solid #22303b; }
.cpf-seg { transform-origin: 50% 50%; }
.cpf-ramp { transform-origin: 0 50%; margin-top: -28px; }
.cpf-bridge { position: absolute; inset: 0; transform-style: preserve-3d; cursor: pointer; pointer-events: none; }
.cpf-bridge > * { pointer-events: auto; }
.cpf-bridge .cpf-seg, .cpf-bridge .cpf-ramp { background-color: #1b2430; border-color: #a5b4ff; }
.cpf-deck { transform-style: preserve-3d; }
.cpf-deck .side { position: absolute; left: 0; top: 100%; width: 100%; height: var(--dz); transform-origin: top; transform: rotateX(-90deg);
	background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 160 36' preserveAspectRatio='none'%3E%3Cg fill='none' stroke='%23a5b4ff' stroke-width='1.6'%3E%3Cpath d='M0 3H160M0 1H160'/%3E%3Cpath d='M4 36Q29 4 54 36M55 36Q80 4 105 36M106 36Q131 4 156 36'/%3E%3Ccircle cx='11' cy='11' r='4'/%3E%3Ccircle cx='21' cy='8' r='3.5'/%3E%3Ccircle cx='37' cy='8' r='3.5'/%3E%3Ccircle cx='47' cy='11' r='4'/%3E%3Ccircle cx='62' cy='11' r='4'/%3E%3Ccircle cx='72' cy='8' r='3.5'/%3E%3Ccircle cx='88' cy='8' r='3.5'/%3E%3Ccircle cx='98' cy='11' r='4'/%3E%3Ccircle cx='113' cy='11' r='4'/%3E%3Ccircle cx='123' cy='8' r='3.5'/%3E%3Ccircle cx='139' cy='8' r='3.5'/%3E%3Ccircle cx='149' cy='11' r='4'/%3E%3Cpath d='M54 36V22M105 36V22' stroke-width='3'/%3E%3C/g%3E%3C/svg%3E") center / 100% 100% no-repeat; }
.cpf-deck .side.b { top: 0; opacity: .35; }
.cpf-bridge.sel .cpf-seg, .cpf-bridge.sel .cpf-ramp, .cpf-bridge:hover .cpf-seg, .cpf-bridge:hover .cpf-ramp { background-color: #2a3350; box-shadow: 0 0 30px rgba(165,180,255,.45); }
.cpf-sign { position: absolute; left: 50%; top: 50%; transform: translate(-50%,-50%); font: 700 12px var(--cpf-mono); color: #05080a; background: #a5b4ff; padding: 3px 6px; border-radius: 2px; white-space: nowrap; }
.cpf-packet { position: absolute; left: 0; top: 0; width: 10px; height: 10px; margin: -5px 0 0 -5px; border-radius: 2px; background: var(--cpf-accent); box-shadow: 0 0 14px 4px rgba(110,231,210,.6); animation: cpf-drive 9s linear infinite; }
.cpf-packet.p2 { background: var(--cpf-accent2); box-shadow: 0 0 14px 4px rgba(165,180,255,.6); animation-delay: -4.5s; }
@keyframes cpf-drive {
	0% { left: -10px; top: -10px; transform: translateZ(3px); }
	58.8% { left: 590px; top: 590px; transform: translateZ(3px); }
	60.8% { left: 610px; top: 610px; transform: translateZ(var(--pz)); }
	70.6% { left: 710px; top: 710px; transform: translateZ(var(--pz)); }
	72.5% { left: 730px; top: 730px; transform: translateZ(3px); }
	100% { left: 1010px; top: 1010px; transform: translateZ(3px); } }
.cpf-bld { --w: 80px; --d: 80px; --H: 100px; --c: var(--cpf-accent); --bh: 0px; position: absolute; width: var(--w); height: var(--d); transform-style: preserve-3d; cursor: pointer; transition: --bh 1.1s cubic-bezier(.2,.9,.25,1); }
.cpf-city.in .cpf-bld { --bh: var(--H); }
.cpf-bld > div { position: absolute; --fl: color-mix(in srgb, var(--c) 22%, #0b1015); --win: color-mix(in srgb, var(--c) 55%, #0b1015); }
.cpf-bld .t { inset: 0; transform: translateZ(var(--bh)); transform-style: preserve-3d; background: color-mix(in srgb, var(--c) 30%, #141c23); border: 1px solid color-mix(in srgb, var(--c) 70%, transparent); display: grid; place-items: center; font: 700 11px var(--cpf-mono); color: color-mix(in srgb, var(--c) 45%, #fff); text-align: center; padding: 4px; transition: background .3s; }
.cpf-bld .f { left: 0; top: 100%; width: 100%; height: var(--bh); transform-origin: top; transform: rotateX(90deg); border: 1px solid color-mix(in srgb, var(--c) 40%, transparent);
	background: repeating-linear-gradient(0deg, var(--fl) 0 7px, transparent 7px 16px), repeating-linear-gradient(90deg, var(--fl) 0 7px, var(--win) 7px 13px); }
.cpf-bld .l { left: 0; top: 0; width: var(--bh); height: 100%; transform-origin: left; transform: rotateY(-90deg); border: 1px solid color-mix(in srgb, var(--c) 30%, transparent);
	--fl: color-mix(in srgb, var(--c) 12%, #070a0d); --win: color-mix(in srgb, var(--c) 32%, #070a0d);
	background: repeating-linear-gradient(90deg, var(--fl) 0 7px, transparent 7px 16px), repeating-linear-gradient(0deg, var(--fl) 0 7px, var(--win) 7px 13px); }
.cpf-bld .f span { position: absolute; left: 6px; top: 4px; transform: scaleY(-1); font: 700 11px/1 var(--cpf-mono); color: #05080a; background: var(--c); padding: 3px 5px; border-radius: 2px; white-space: nowrap; }
.cpf-bld.sel .t, .cpf-bld:hover .t { background: color-mix(in srgb, var(--c) 70%, #141c23); color: #05080a; }
.cpf-bld.sel .t { box-shadow: 0 0 0 2px var(--c), 0 0 40px 6px color-mix(in srgb, var(--c) 55%, transparent); }
.cpf-bld.sel .f, .cpf-bld.sel .l { border-color: var(--c); }
.cpf-bld.ghost .t, .cpf-bld.ghost .f, .cpf-bld.ghost .l { background: rgba(255,255,255,.015); border: 1px dashed color-mix(in srgb, var(--c) 70%, transparent); }
.cpf-bld.ghost .t { animation: cpf-ghost 2.4s ease-in-out infinite; font-size: 16px; }
.cpf-bld.ghost.sel .t, .cpf-bld.ghost:hover .t { background: color-mix(in srgb, var(--c) 25%, transparent); color: var(--c); }
@keyframes cpf-ghost { 50% { opacity: .45; } }
.cpf-ant { position: absolute; left: 50%; top: 50%; width: 3px; height: 56px; margin-left: -1px; background: linear-gradient(var(--cpf-accent), #2c8f80); transform-origin: top; transform: rotateX(90deg); }
.cpf-ant::after { content: ""; position: absolute; left: -5px; bottom: -6px; width: 13px; height: 13px; border-radius: 50%; background: var(--cpf-pink); box-shadow: 0 0 16px 6px rgba(255,107,157,.7); animation: cpf-beacon 1.4s ease-in-out infinite; }
@keyframes cpf-beacon { 50% { opacity: .25; box-shadow: 0 0 4px 1px rgba(255,107,157,.4); } }
.cpf-launch { position: absolute; left: 50%; top: 50%; width: 24px; height: 200px; margin-left: -12px; transform-origin: top; transform: rotateX(90deg); transform-style: preserve-3d; }
.cpf-rocket { position: absolute; left: 0; top: 0; width: 24px; height: 44px; transform: scaleY(-1); animation: cpf-liftoff 4.5s cubic-bezier(.5,0,.8,.4) infinite; }
@keyframes cpf-liftoff { 0%, 18% { top: 0; opacity: 1; } 85% { top: 170px; opacity: 1; } 100% { top: 200px; opacity: 0; } }
.cpf-city-foot { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; align-items: start; margin-top: 8px; }
.cpf-info { border: 1px solid var(--cpf-line); background: var(--cpf-bg2); border-radius: 12px; padding: 24px 26px; min-height: 230px; display: flex; flex-direction: column; gap: 8px; }
.cpf-info > * { margin: 0; }
.cpf-info-y { font: 400 13px var(--cpf-mono); color: var(--cpf-accent); }
.cpf-info h3 { font-size: 28px; }
.cpf-info-r { color: #b5c0cb; }
.cpf-info-u { font: 400 13px var(--cpf-mono); text-decoration: none; color: var(--cpf-accent2) !important; }
.cpf-info-u:hover { text-decoration: underline; }
.cpf-tour { margin-top: auto; padding-top: 12px; }
.cpf-stops { display: flex; flex-wrap: wrap; gap: 8px; align-content: flex-start; }
.cpf-stops button { font: 500 13px var(--cpf-mono); background: var(--cpf-bg2); color: var(--cpf-muted); border: 1px solid var(--cpf-line); border-radius: 6px; padding: 8px 12px; cursor: pointer; transition: .2s; }
.cpf-stops button b { color: var(--c); font-weight: 500; margin-right: 6px; }
.cpf-stops button:hover, .cpf-stops button[aria-selected="true"] { color: var(--cpf-ink); border-color: var(--c); background: color-mix(in srgb, var(--c) 10%, var(--cpf-bg2)); }

/* ---------- Ecosistema ---------- */
.cpf-eco { height: 440px; display: grid; place-items: center; position: relative; }
.cpf-eco-scene { position: relative; width: 480px; height: 480px; transform: rotateX(58deg) rotateZ(-45deg); transform-style: preserve-3d; }
.cpf-tile { --s: 120px; --h: 16px; --c: var(--cpf-accent2); position: absolute; width: var(--s); height: var(--s); transform-style: preserve-3d; transform: translateZ(0); transition: transform .35s cubic-bezier(.2,.9,.25,1.3); text-decoration: none; color: var(--cpf-ink); }
.cpf-tile > div { position: absolute; }
.cpf-tile .t { inset: 0; transform: translateZ(var(--h)); background: var(--cpf-bg3); border: 1px solid color-mix(in srgb, var(--c) 55%, transparent); display: grid; place-items: center; font: 700 14px var(--cpf-sans); text-align: center; padding: 10px; transition: background .3s; }
.cpf-tile .t img { max-width: 86%; max-height: 62%; object-fit: contain; filter: brightness(0) invert(1); }
.cpf-tile .t img.color { filter: none; }
.cpf-tile .f { left: 0; top: 100%; width: 100%; height: var(--h); transform-origin: top; transform: rotateX(90deg); background: color-mix(in srgb, var(--c) 20%, #0a0e12); }
.cpf-tile .l { left: 0; top: 0; width: var(--h); height: 100%; transform-origin: left; transform: rotateY(-90deg); background: color-mix(in srgb, var(--c) 10%, #070a0d); }
.cpf-tile:hover, .cpf-tile:focus-visible { transform: translateZ(34px); }
.cpf-tile:hover .t { background: color-mix(in srgb, var(--c) 30%, var(--cpf-bg3)); }
.cpf-eco-note { text-align: center; color: var(--cpf-muted); font: 400 12px var(--cpf-mono); margin-top: -10px; }

/* ---------- Terminal ---------- */
.cpf-split { display: grid !important; grid-template-columns: 1fr 1fr; gap: 40px; align-items: start; }
.cpf-split > * { margin: 0 !important; min-width: 0; }
.cpf-term { border: 1px solid var(--cpf-line); border-radius: 12px; background: #070a0d; overflow: hidden; box-shadow: 0 30px 80px -50px rgba(165,180,255,.4); }
.cpf-term-bar { display: flex; align-items: center; gap: 8px; padding: 12px 16px; border-bottom: 1px solid var(--cpf-line); background: var(--cpf-bg2); font: 400 12px var(--cpf-mono); color: var(--cpf-muted); }
.cpf-term-bar i { width: 11px; height: 11px; border-radius: 50%; background: #ff5f57; }
.cpf-term-bar i:nth-child(2) { background: #febc2e; }
.cpf-term-bar i:nth-child(3) { background: #28c840; }
.cpf-term-bar span { margin-left: 10px; }
.cpf-term-out { height: 330px; overflow: auto; padding: 18px 20px 6px; font: 400 14px/1.75 var(--cpf-mono); color: #b9c5d0; white-space: pre-wrap; }
.cpf-term-out .c { color: var(--cpf-accent); }
.cpf-term-out .e { color: var(--cpf-pink); }
.cpf-term-out .h { color: var(--cpf-accent2); }
.cpf-term-out .w { color: var(--cpf-warn); }
.cpf-term-form { display: flex; gap: 10px; padding: 10px 20px 18px; font: 400 14px var(--cpf-mono); align-items: center; }
.cpf-term-form label { color: var(--cpf-accent); white-space: nowrap; }
.cpf-term-form input { flex: 1; min-width: 0; background: transparent; border: 0; outline: 0; color: var(--cpf-ink); font: inherit; caret-color: var(--cpf-accent); }

/* ---------- Vídeo ---------- */
.cpf-video { position: relative; aspect-ratio: 16 / 9; border-radius: 12px; border: 1px solid var(--cpf-line); overflow: hidden; background: #000; cursor: pointer; }
.cpf-video img { width: 100%; height: 100%; object-fit: cover; filter: saturate(.8) brightness(.8); transition: .3s; }
.cpf-video:hover img { filter: none; }
.cpf-video::after { content: ""; position: absolute; inset: 0; background: repeating-linear-gradient(0deg, rgba(0,0,0,.25) 0 1px, transparent 1px 3px); pointer-events: none; }
.cpf-play-btn { position: absolute; left: 50%; top: 50%; transform: translate(-50%,-50%); z-index: 2; font: 500 14px var(--cpf-mono); background: var(--cpf-accent); color: #06100e; padding: 12px 18px; border-radius: 6px; }
.cpf-video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* ---------- Blog estilo git log ---------- */
.cpf-gitlog { border: 1px solid var(--cpf-line); border-radius: 12px; overflow: hidden; }
.cpf-gitlog .wp-block-post-template { margin: 0; padding: 0; list-style: none; }
.cpf-gitlog .wp-block-post { margin: 0 !important; }
.cpf-commit { display: grid !important; grid-template-columns: 90px 120px 1fr auto; gap: 18px; align-items: center; padding: 18px 22px; border-bottom: 1px solid var(--cpf-line); font: 400 14px var(--cpf-mono); background: var(--cpf-bg2); position: relative; transition: background .2s; }
.cpf-gitlog li:last-child .cpf-commit { border-bottom: 0; }
.cpf-commit:hover { background: var(--cpf-bg3); }
.cpf-commit > * { margin: 0 !important; }
.cpf-sha { color: var(--cpf-warn); }
.cpf-commit .wp-block-post-date { color: var(--cpf-muted); font-size: 14px; }
.cpf-commit .wp-block-post-title { font: 500 17px var(--cpf-sans); letter-spacing: 0; }
.cpf-commit .wp-block-post-title a { color: var(--cpf-ink); text-decoration: none; }
.cpf-commit .wp-block-post-title a::after { content: ""; position: absolute; inset: 0; }
.cpf-badge { font-size: 11px; border: 1px solid var(--cpf-line); padding: 2px 8px; border-radius: 999px; color: var(--cpf-accent2); }
.cpf-gitlog-foot { margin-top: 20px !important; }
.wp-block-query-pagination { font: 400 14px var(--cpf-mono); margin-top: 28px !important; gap: 12px; }
.wp-block-query-pagination a { text-decoration: none; }

/* ---------- CTA y pie ---------- */
.cpf-cta { padding-block: 130px; text-align: center; border-bottom: 1px solid var(--cpf-line); }
.cpf-cta .wp-block-buttons { justify-content: center; }
.cpf-cta h2 { font-size: clamp(34px, 5vw, 64px) !important; max-width: 880px; margin: 14px auto 30px !important; }
.cpf-footer { padding-block: 28px; font: 400 13px var(--cpf-mono); color: var(--cpf-muted); }
.cpf-footer-inner { display: flex !important; justify-content: space-between; flex-wrap: wrap; gap: 12px; }
.cpf-footer p { margin: 0 !important; }
.cpf-footer a { color: var(--cpf-muted); text-decoration: none; }
.cpf-footer a:hover { color: var(--cpf-ink); }

/* ---------- Páginas y entradas ---------- */
.cpf-page-head { padding-block: 88px 40px; border-bottom: 1px solid var(--cpf-line); }
.cpf-page-head h1 { font-size: clamp(40px, 6vw, 72px) !important; margin: 0 !important; }
.cpf-page-head .cpf-meta-line { font: 400 13px var(--cpf-mono); color: var(--cpf-muted); margin-top: 18px !important; gap: 8px 18px; align-items: baseline; }
.cpf-meta-line > * { margin: 0 !important; font: inherit !important; }
.cpf-meta-line .wp-block-post-terms a { color: var(--cpf-accent2); text-decoration: none; }
.cpf-meta-line .wp-block-post-terms a::before { content: "#"; }
.cpf-content { padding-block: 56px 96px; }
.cpf-content > .wp-block-post-content > * + * { margin-block-start: 1.25rem; }
.cpf-content h2 { font-size: clamp(26px, 3vw, 36px); margin-top: 3rem !important; }
.cpf-content img { border-radius: 8px; height: auto; }
.cpf-archive-notice { font: 400 13px var(--cpf-mono); color: var(--cpf-warn); border: 1px dashed rgba(255,209,102,.4); border-radius: 8px; padding: 10px 14px; margin-block: 0 28px !important; }
.cpf-post-nav { font: 400 14px var(--cpf-mono); border-top: 1px solid var(--cpf-line); padding-top: 24px; margin-top: 56px !important; }
.cpf-post-nav a { text-decoration: none; }
.cpf-404 code { color: var(--cpf-pink); background: transparent; }
.wp-block-search__input { background: var(--cpf-bg2); color: var(--cpf-ink); border: 1px solid var(--cpf-line); border-radius: 6px; font-family: var(--cpf-mono); }
.wp-block-search__button { margin-left: 8px; }

/* Formulario (Jetpack) */
.wp-block-jetpack-contact-form input, .wp-block-jetpack-contact-form textarea, .wp-block-jetpack-contact-form select,
.contact-form input[type="text"], .contact-form input[type="email"], .contact-form textarea, .contact-form select { background: var(--cpf-bg2) !important; color: var(--cpf-ink) !important; border: 1px solid var(--cpf-line) !important; border-radius: 6px !important; font-family: var(--cpf-sans); }
.wp-block-jetpack-contact-form input:focus, .wp-block-jetpack-contact-form textarea:focus { border-color: var(--cpf-accent) !important; outline: none; }

/* ---------- Arranque y easter egg ---------- */
.cpf-boot-screen { display: none; }
html.cpf-boot .cpf-boot-screen { display: block; position: fixed; inset: 0; z-index: 100; background: #05080a; color: var(--cpf-accent); font: 400 14px/1.7 var(--cpf-mono); padding: 8vh 8vw; transition: opacity .5s, visibility .5s; }
html.cpf-boot .cpf-boot-screen.done { opacity: 0; visibility: hidden; }
html.cpf-boot body { overflow: hidden; }
.cpf-boot-skip { position: absolute; right: 24px; bottom: 20px; color: var(--cpf-muted); font-size: 12px; }
.cpf-boot-log .cur::after { content: "▋"; animation: cpf-blink 1s steps(1) infinite; margin-left: 2px; }
.cpf-zx { position: fixed; inset: 0; z-index: 90; pointer-events: none; opacity: 0; transition: opacity .3s; background: repeating-linear-gradient(0deg, #d70000 0 6px, #00d7d7 6px 12px, #d7d700 12px 16px, #0000d7 16px 22px); }
.cpf-zx::before { content: ""; position: absolute; inset: 7vh 7vw; background: #cdcdcd; }
.cpf-zx-scr { position: absolute; inset: 7vh 7vw; display: grid; place-items: center; font: 700 clamp(18px, 3vw, 34px)/1.6 var(--cpf-mono); color: #000; text-align: center; }
body.cpf-zx-on .cpf-zx { opacity: 1; animation: cpf-zxroll .12s steps(3) infinite; }
@keyframes cpf-zxroll { to { background-position: 0 22px; } }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
	.cpf-header .wp-block-navigation__responsive-container-open { color: var(--cpf-ink); }
	.cpf-hero-grid, .cpf-split { grid-template-columns: 1fr; }
	.cpf-portrait { max-width: 380px; }
	.cpf-cards, .cpf-stats { grid-template-columns: 1fr; }
	.cpf-city { height: 330px; overflow: hidden; margin-inline: -24px; }
	.cpf-city-scene { transform: rotateX(58deg) rotateZ(-45deg) scale3d(.27,.27,.27); }
	.cpf-city-foot { grid-template-columns: 1fr; }
	.cpf-city-foot > * { min-width: 0; }
	.cpf-info { min-height: 0; }
	.cpf-eco { height: 360px; }
	.cpf-eco-scene { transform: rotateX(58deg) rotateZ(-45deg) scale3d(.68,.68,.68); }
	.cpf-commit { grid-template-columns: auto 1fr; gap: 4px 14px; }
	.cpf-commit .wp-block-post-title { grid-column: 1 / -1; }
	.cpf-section { padding-block: 76px; }
}

/* ---------- Movimiento reducido y modo captura (?shot) ---------- */
html.cpf-shot *, html.cpf-shot *::before, html.cpf-shot *::after { animation: none !important; transition: none !important; }
html.cpf-shot .cpf-reveal { opacity: 1; transform: none; }
html.cpf-shot .cpf-bld { --bh: var(--H); }
@media (prefers-reduced-motion: reduce) {
	*, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
	.cpf-reveal { opacity: 1; transform: none; }
	.cpf-bld { --bh: var(--H); }
}

/* ---------- Páginas interiores ---------- */
.cpf-page-lead { max-width: 760px; margin-top: 22px !important; }
.cpf-panel { background: var(--cpf-bg2); border: 1px solid var(--cpf-line); border-radius: 12px; padding: 28px 30px; }
.cpf-panel > * { margin: 0 0 14px !important; }
.cpf-panel > *:last-child { margin-bottom: 0 !important; }
.cpf-panel h3 { font-size: 24px; }
.cpf-panel .cpf-kicker { margin-bottom: 10px !important; }
.cpf-panel .cpf-kicker:not(:first-child) { margin-top: 26px !important; }
.cpf-prose p { color: #c3ccd5; font-size: 18px; margin: 0 0 18px !important; }
.cpf-prose strong { color: var(--cpf-ink); }
.cpf-stack { display: flex !important; flex-direction: column; gap: 20px; }
.cpf-stack > * { margin: 0 !important; }
.cpf-narrow { max-width: 760px; margin: 48px auto 0 !important; }
.cpf-gap-top { margin-top: 40px !important; }
.cpf-split-contact { grid-template-columns: .8fr 1.2fr; }
.cpf-list { padding-left: 0 !important; list-style: none; display: grid; gap: 10px; }
.cpf-list li { position: relative; padding-left: 22px; color: #c3ccd5; }
.cpf-list li::before { content: "›"; position: absolute; left: 4px; color: var(--cpf-accent); font-family: var(--cpf-mono); }
.cpf-list strong { color: var(--cpf-ink); }
.cpf-list-plain li::before { content: "▸"; }
.cpf-steps { counter-reset: cpf-step; }
.cpf-steps li { counter-increment: cpf-step; padding-left: 34px; }
.cpf-steps li::before { content: counter(cpf-step, decimal-leading-zero); left: 0; font-size: 13px; top: 3px; color: var(--cpf-accent2); }
.cpf-tags { list-style: none; padding: 0 !important; display: flex; flex-wrap: wrap; gap: 8px; }
.cpf-tags li { font: 400 13px var(--cpf-mono); border: 1px solid var(--cpf-line); background: var(--cpf-bg); border-radius: 4px; padding: 6px 10px; color: #c3ccd5; margin: 0; }
.cpf-caption { font-size: 14px; color: var(--cpf-muted); margin-top: 12px !important; }
.cpf-caption strong { color: var(--cpf-ink); }
.cpf-legal { font-size: 12px; color: var(--cpf-muted); margin-top: 18px !important; line-height: 1.55; }
.cpf-legal a { color: var(--cpf-accent2); }

/* Formulario de contacto (Jetpack) */
.cpf-form { gap: 16px !important; }
.cpf-form label, .cpf-form .grunion-field-label { font: 500 13px var(--cpf-mono) !important; color: var(--cpf-muted) !important; margin-bottom: 6px !important; }
.cpf-form input:not([type="checkbox"]):not([type="submit"]), .cpf-form textarea, .cpf-form select { width: 100%; background: var(--cpf-bg) !important; color: var(--cpf-ink) !important; border: 1px solid var(--cpf-line) !important; border-radius: 6px !important; padding: 12px 14px !important; font: 400 16px var(--cpf-sans) !important; }
.cpf-form textarea { min-height: 160px; }
.cpf-form input:focus, .cpf-form textarea:focus, .cpf-form select:focus { border-color: var(--cpf-accent) !important; outline: none; box-shadow: 0 0 0 3px rgba(110,231,210,.15); }
.cpf-form .wp-block-button__link, .cpf-form button[type="submit"], .cpf-form input[type="submit"] { background: var(--cpf-accent) !important; color: #06100e !important; border: 0 !important; border-radius: 6px !important; padding: 13px 22px !important; font: 500 15px var(--cpf-sans) !important; cursor: pointer; }
.cpf-form .grunion-field-consent-wrap label, .cpf-form .consent { font: 400 13px var(--cpf-sans) !important; color: #b5c0cb !important; text-transform: none; }

@media (max-width: 900px) {
	.cpf-split-contact { grid-template-columns: 1fr; }
	.cpf-panel { padding: 22px; }
}

.cpf-form ::placeholder { color: #5b6672 !important; opacity: 1; }
.cpf-form input[type="submit"], .cpf-form button[type="submit"] { width: auto !important; }
.cpf-form .wp-block-jetpack-button { margin-top: 6px; }
.cpf-page-head + .cpf-section { padding-top: 64px; }
.cpf-footer-inner a + a { margin-left: 4px; }

form:has(.cpf-form) button[type="submit"] { background: var(--cpf-accent) !important; color: #06100e !important; border: 0 !important; border-radius: 6px !important; padding: 13px 22px !important; font: 500 15px var(--cpf-sans) !important; cursor: pointer; width: auto !important; margin-top: 8px; transition: box-shadow .2s; }
form:has(.cpf-form) button[type="submit"]:hover { box-shadow: 0 0 28px 2px rgba(110,231,210,.35); }

.cpf-h3, .cpf-panel h2.cpf-h3 { font-size: 24px !important; }
.cpf-commit .wp-block-post-title { font-size: 17px !important; }
