/* ==========================================================================
   BG Theme 2.5 · portada 4.0 «Suelta tu servidor»
   El héroe es la herramienta. Plano, líneas finas, un acento por sección.
   Usa los tokens de theme.css (--ink, --panel, --line, --gold, --cian, --orange, --exc, --rar-*…).
   ========================================================================== */
.bgt-home code { font-family: var(--f-mono); color: var(--cian); background: none; padding: 0; font-size: .92em; }
.h2-gold { background: var(--oro-g); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* ---------- Piezas comunes ---------- */
.h2-bar { display: flex; align-items: center; gap: 7px; font: 600 12px var(--f-mono); color: var(--dim); }
.h2-bar i { width: 9px; height: 9px; border-radius: 50%; background: var(--line-hi); }
.h2-bar span { margin-left: 8px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.h2-sec { padding-block: clamp(64px, 9vw, 112px) 0; }
.h4-head { display: grid; gap: 6px; max-width: 64ch; margin-bottom: clamp(30px, 4.5vw, 48px); }
.h4-head h2 { font: 600 clamp(28px, 3.8vw, 44px)/1.08 var(--f-display); margin: 10px 0 0; text-wrap: balance; }
.h4-head .bgt-lead { margin: 10px 0 0; }
.h4-more { font: 600 12.5px var(--f-mono); color: var(--cian) !important; text-decoration: none !important; }
.h4-more:hover { text-decoration: underline !important; }

/* ---------- Héroe ---------- */
.h4-hero { position: relative; overflow: hidden; padding-block: clamp(48px, 8vw, 100px) clamp(40px, 6vw, 72px); }
.h4-hero__bg { position: absolute; inset: 0; pointer-events: none;
	background:
		radial-gradient(55% 50% at 78% 8%, #f2a33a1c, transparent 70%),
		radial-gradient(40% 40% at 8% 92%, #34d1e012, transparent 70%); }
.h4-hero__bg::before { content: ""; position: absolute; inset: 0;
	background-image: linear-gradient(#ffffff07 1px, transparent 1px), linear-gradient(90deg, #ffffff07 1px, transparent 1px); background-size: 46px 46px;
	-webkit-mask-image: radial-gradient(70% 60% at 70% 20%, #000, transparent 75%); mask-image: radial-gradient(70% 60% at 70% 20%, #000, transparent 75%); }
.h4-hero__in { position: relative; z-index: 1; display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: clamp(32px, 5vw, 64px); align-items: center; }
.h4-hero h1 { font: 700 clamp(38px, 5.4vw, 64px)/1.04 var(--f-display); letter-spacing: -.01em; margin: 16px 0 0; text-wrap: balance; }
.h4-hero .bgt-lead { margin: 20px 0 0; font-size: clamp(16px, 1.6vw, 18.5px); max-width: 34em; }
.h4-pts { list-style: none; margin: 22px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px 20px; font: 500 13px var(--f-mono); color: var(--mute); }
.h4-pts li::before { content: "✓ "; color: var(--exc); }

.h4-scan { border: 1px solid var(--line-hi); border-radius: 14px; background: var(--panel); padding: 16px; display: flex; flex-direction: column; box-shadow: 0 40px 90px -50px #000; min-width: 0; }
.h2-zone { margin-top: 14px; border: 1.5px dashed var(--line-hi); border-radius: 11px; display: grid; place-items: center; text-align: center; padding: 26px 18px; cursor: pointer; transition: border-color .2s, background .2s; }
.h2-zone:hover, .h2-zone.is-over { border-color: var(--orange); background: #f2a33a0a; }
.h2-zone__ico { width: 70px; height: 50px; display: block; margin: 0 auto 12px; }
.h2-zone h2 { font: 600 21px/1.2 var(--f-display); margin: 0; text-wrap: balance; }
.h2-zone p { margin: 6px 0 0; color: var(--mute); font-size: 13.5px; }
.h2-typing { font: 500 13px var(--f-mono); color: var(--gold); min-height: 22px; margin-top: 12px; }
.h2-typing::after { content: "▌"; color: var(--cian); margin-left: 2px; animation: h2-blink 1s steps(1) infinite; }
@keyframes h2-blink { 50% { opacity: 0; } }
.h4-acts { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.h2-samples { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 12px; }
.h2-samples span { font-size: 12.5px; color: var(--dim); }
.h2-samples button { border: 1px solid var(--line); background: none; border-radius: 6px; padding: 5px 9px; font: 500 12px var(--f-mono); color: var(--mute); cursor: pointer; transition: border-color .2s, color .2s; }
.h2-samples button:hover { border-color: var(--cian); color: var(--text); }

/* Resultado de un archivo */
.h2-res { margin-top: 14px; border: 1px solid var(--line-hi); border-radius: 11px; padding: 14px; background: var(--ink); display: grid; gap: 12px; animation: h2-up .3s ease; }
@keyframes h2-up { from { opacity: 0; transform: translateY(8px); } }
.h2-res__h { display: flex; align-items: center; gap: 12px; }
.h2-res__ok { width: 34px; height: 34px; flex: none; border-radius: 9px; display: grid; place-items: center; font-weight: 700; background: #5fe08a1a; color: var(--exc); }
.h2-res__ok.q { background: #f2a33a1a; color: var(--orange); }
.h2-res__h b { display: block; font-size: 15px; }
.h2-res__h small { color: var(--mute); font-size: 13px; word-break: break-all; }
.h2-res__st { display: grid; gap: 4px; font: 500 12.5px var(--f-mono); color: var(--mute); }
.h2-res__st div::before { content: "✓  "; color: var(--exc); }
.h2-res .bgt-btn { justify-self: start; }

/* Resultado de una carpeta o del ejemplo */
.h4-res { margin-top: 14px; display: grid; gap: 12px; animation: h2-up .3s ease; }
.h4-log { font: 500 12.5px/1.85 var(--f-mono); color: #aeb7c7; background: var(--ink); border: 1px solid var(--line); border-radius: 9px; padding: 11px 13px; min-height: 60px; overflow-wrap: anywhere; }
.h4-log .k { color: var(--cian); } .h4-log .g { color: var(--exc); } .h4-log .o { color: var(--gold); } .h4-log .w { color: var(--hot); } .h4-log .d { color: var(--dim); }
.h4-sum { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 16px; align-items: center; }
.h4-sum:has(.h4-ring[hidden]) { grid-template-columns: minmax(0, 1fr); }
.h4-ring { position: relative; width: 96px; height: 96px; }
.h4-ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.h4-ring b { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; font: 700 28px/1 var(--f-display); }
.h4-ring b small { display: block; font: 500 10.5px var(--f-mono); color: var(--dim); margin-top: 3px; }
.h4-cats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.h4-cat { display: block; background: var(--panel-2); border: 1px solid var(--line); border-radius: 8px; padding: 9px 11px; text-decoration: none !important; color: var(--text) !important; transition: border-color .2s; }
a.h4-cat:hover { border-color: var(--orange); }
.h4-cat b { display: block; font: 600 21px/1.1 var(--f-display); font-variant-numeric: tabular-nums; }
.h4-cat small { color: var(--mute); font-size: 12px; }
.h4-next { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 11px 12px; border-radius: 9px; border: 1px solid #5a3d12; background: #1d1509; font-size: 13.5px; color: var(--mute); }
.h4-next > span { flex: 1 1 220px; }
.h4-next b { color: var(--text); font-weight: 600; }

/* Cinta de formatos */
.h2-strip { border-block: 1px solid var(--line); overflow: hidden; padding-block: 13px; }
.h2-strip__t { display: flex; gap: 44px; width: max-content; animation: h2-slide 50s linear infinite; font: 600 12.5px var(--f-mono); color: var(--dim); white-space: nowrap; }
.h2-strip__t span::before { content: "◆"; color: var(--orange); margin-right: 12px; font-size: 8px; vertical-align: 2px; }
@keyframes h2-slide { to { transform: translateX(-50%); } }

/* ---------- BG Studio ---------- */
.h4-studio { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 20px; align-items: start; }
.h4-win { border: 1px solid var(--line-hi); border-radius: 14px; background: var(--panel); padding: 16px; min-width: 0; }
.h4-shop { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 20px; align-items: start; margin-top: 14px; }
.h4-inv { --c: 27px; position: relative; display: grid; grid-template-columns: repeat(8, var(--c)); grid-template-rows: repeat(15, var(--c));
	background: linear-gradient(var(--line) 1px, transparent 1px) 0 0 / var(--c) var(--c), linear-gradient(90deg, var(--line) 1px, transparent 1px) 0 0 / var(--c) var(--c), #080b12;
	border: 1px solid var(--line-hi); }
.h4-it { margin: 1px; padding: 0; border: 1px solid #ffffff14; border-radius: 3px; background: radial-gradient(circle at 50% 40%, #1d2638, #0e131d); display: grid; place-items: center; cursor: pointer; overflow: hidden; font: 600 10px var(--f-mono); color: var(--mute); }
.h4-it.is-exc { background: radial-gradient(circle at 50% 40%, #173323, #0e131d); border-color: #5fe08a33; }
.h4-it img { max-width: 92%; max-height: 92%; image-rendering: auto; }
.h4-it:hover, .h4-it:focus-visible { outline: 1.5px solid var(--gold); outline-offset: 0; z-index: 2; border-radius: 3px; }
.h4-tip { position: absolute; z-index: 5; width: 230px; background: #05070bf2; border: 1px solid #5a4a2a; padding: 10px 12px; text-align: center; font: 12px/1.55 var(--f-body); pointer-events: none; box-shadow: 0 10px 30px #000a; }
.h4-tip .n { font-weight: 700; font-size: 13px; color: var(--rar-normal); }
.h4-tip .n.exc { color: var(--rar-exc); }
.h4-tip .dm { color: var(--dim); font: 11px var(--f-mono); margin-bottom: 4px; }
.h4-tip .op { color: var(--rar-opt); }
.h4-tip .pr { color: var(--rar-lv); margin-top: 4px; }
.h4-shop__side { display: grid; gap: 12px; min-width: 0; }
.h4-fmt { display: flex; gap: 6px; flex-wrap: wrap; }
.h4-fmt button { font: 500 12px var(--f-mono); padding: 6px 10px; border: 1px solid var(--line-hi); border-radius: 5px; color: var(--mute); background: none; cursor: pointer; }
.h4-fmt button[aria-pressed="true"] { border-color: var(--cian); color: var(--cian); background: #0b2226; }
.h4-file { margin: 0; background: var(--ink); border: 1px solid var(--line); border-radius: 8px; font: 12px/1.7 var(--f-mono); color: #aeb7c7; padding: 12px 14px; overflow-x: auto; white-space: pre; }
.h4-file .c { color: var(--dim); } .h4-file .e { color: var(--gold); }
.h4-note { margin: 0; color: var(--dim); font-size: 12.5px; }
.h4-eds { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; align-content: start; }
.h4-ed { display: flex; flex-direction: column; gap: 4px; padding: 16px; background: var(--ink); text-decoration: none !important; color: var(--text) !important; min-width: 0; transition: background .2s; }
.h4-ed:hover { background: var(--panel); }
.h4-ed b { font: 600 15px/1.2 var(--f-display); }
.h4-ed small { color: var(--mute); font-size: 12.5px; line-height: 1.45; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.h4-eds__cta { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 10px; padding: 16px; background: var(--panel); }
html.is-app .h4-eds__cta [data-pwa] { display: none !important; }

/* ---------- Escalera de planes ---------- */
.h4-ladder { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.h4-step { display: flex; flex-direction: column; gap: 14px; padding: 26px 22px; background: var(--ink); border-right: 1px solid var(--line); min-width: 0; }
.h4-step:last-child { border-right: 0; }
.h4-step--pro { background: linear-gradient(180deg, #1d150a, var(--ink) 65%); }
.h4-step__rule { margin: 0; font: 500 13.5px/1.45 var(--f-mono); color: var(--text); min-height: 2.9em; }
.h4-step--pro .h4-step__rule { color: var(--gold); }
.h4-step--guard .h4-step__rule { color: var(--guard); }
.h4-step--srv .h4-step__rule { color: var(--mute); }
.h4-price { font: 700 32px/1.05 var(--f-display); }
.h4-price small { font: 500 13px var(--f-body); color: var(--mute); -webkit-text-fill-color: var(--mute); }
.h4-price--s { font-size: 22px; }
.h4-step ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; color: var(--mute); font-size: 14px; }
.h4-step li::before { content: "›  "; color: var(--dim); }
.h4-step .bgt-btn { margin-top: auto; }

/* ---------- Modo puerta ---------- */
.h4-gate { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 28px; align-items: start; }
.h4-gate__btns { display: grid; gap: 8px; }
.h4-gate__btns button { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; text-align: left; padding: 13px 15px; border: 1px solid var(--line); border-radius: 10px; background: var(--panel); color: var(--text); font: 500 15px var(--f-body); cursor: pointer; transition: border-color .2s, background .2s; }
.h4-gate__btns button:hover { border-color: var(--line-hi); }
.h4-gate__btns button[aria-pressed="true"] { border-color: var(--guard); background: #0d1d24; }
.h4-gate__btns small { font: 12px var(--f-mono); color: var(--dim); white-space: nowrap; }
.h4-flow { border: 1px solid var(--line); border-radius: 14px; background: var(--panel); padding: 20px; display: grid; gap: 14px; min-width: 0; }
.h4-flow svg { width: 100%; height: auto; display: block; }
.h4-flow .l { font: 600 13px var(--f-body); fill: var(--text); }
.h4-flow .s { font: 11px var(--f-mono); fill: var(--mute); }
.h4-flow .x { font: 700 17px var(--f-display); fill: var(--hot); }
.h4-verdict { display: flex; gap: 12px; align-items: baseline; flex-wrap: wrap; padding: 12px 14px; border-radius: 9px; background: var(--ink); border: 1px solid var(--line); font-size: 14.5px; color: var(--mute); }
.h4-verdict b { font: 700 16px var(--f-display); white-space: nowrap; }
.h4-verdict b.ok { color: var(--exc); } .h4-verdict b.no { color: var(--hot); }
.h4-verdict span { flex: 1 1 260px; }

/* ---------- Para tus jugadores ---------- */
.h4-prods { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.h4-prod { display: flex; flex-direction: column; gap: 10px; padding: 24px; border: 1px solid var(--line); border-radius: 14px; text-decoration: none !important; color: var(--text) !important; transition: border-color .2s; }
.h4-prod:hover { border-color: var(--line-hi); }
.h4-prod h3 { font: 600 21px/1.1 var(--f-display); margin: 0; }
.h4-prod p { margin: 0; color: var(--mute); font-size: 14px; flex: 1; }

/* ---------- Servidor de prueba ---------- */
.h-srv { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.h-sv { border: 1px solid var(--line); border-radius: 14px; padding: 22px; display: flex; flex-direction: column; gap: 12px; background: none; }
.h-sv__h { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.h-sv h3 { font: 600 20px/1 var(--f-display); margin: 0; }
.h-sv__st { font: 600 11.5px var(--f-mono); color: var(--dim); white-space: nowrap; }
.h-sv__st.on { color: var(--exc); } .h-sv__st.off { color: var(--hot); }
.h-sv__n b { font: 700 36px/1 var(--f-display); font-variant-numeric: tabular-nums; }
.h-sv__n small { font-size: 12.5px; color: var(--mute); margin-left: 8px; }
.h-sv p { margin: 0; color: var(--mute); font-size: 13px; }
.h-sv__tags { display: flex; gap: 6px; flex-wrap: wrap; }
.h-sv__tags span { font: 500 11px/1 var(--f-mono); border: 1px solid var(--line); border-radius: 6px; padding: 5px 8px; color: var(--mute); }
.h-sv__btns { display: flex; gap: 8px; flex-wrap: wrap; margin-top: auto; }

/* ---------- Lo último + quién hay detrás ---------- */
.h4-trust { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 20px; align-items: start; }
.h4-chg { border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.h4-chg a { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 14px; align-items: baseline; padding: 14px 18px; border-bottom: 1px solid var(--line); text-decoration: none !important; color: var(--text) !important; transition: background .2s; }
.h4-chg a:last-child { border-bottom: 0; }
.h4-chg a:hover { background: #ffffff05; }
.h4-chg small { display: block; font: 600 10px var(--f-mono); color: var(--dim); letter-spacing: .1em; text-transform: uppercase; }
.h4-chg b { font: 600 16px/1.2 var(--f-display); }
.h4-chg em { display: block; font-style: normal; font-size: 13px; color: var(--mute); margin-top: 2px; }
.h4-chg code { font: 600 12.5px var(--f-mono); color: var(--orange) !important; white-space: nowrap; }
.h4-who { border: 1px solid var(--line-hi); border-radius: 14px; padding: 26px; display: grid; gap: 14px; background: linear-gradient(140deg, #f2a33a0d, transparent 60%); }
.h4-who__q { margin: 0; font: 600 24px/1.25 var(--f-display); text-wrap: balance; }
.h4-who p { margin: 0; color: var(--mute); }

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
	.h4-hero__in, .h4-studio, .h4-trust, .h4-gate { grid-template-columns: minmax(0, 1fr); }
	.h4-ladder { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.h4-step:nth-child(2) { border-right: 0; }
	.h4-step:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
	.h-srv { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 760px) {
	.h4-prods { grid-template-columns: minmax(0, 1fr); }
	.h4-shop { grid-template-columns: minmax(0, 1fr); }
	.h4-inv { --c: min(27px, calc((100vw - 80px) / 8)); justify-self: center; }
	.h4-eds { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 600px) {
	.h4-ladder { grid-template-columns: minmax(0, 1fr); }
	.h4-step { border-right: 0; border-bottom: 1px solid var(--line); }
	.h4-step:last-child { border-bottom: 0; }
	.h4-step__rule { min-height: 0; }
	.h4-cats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.h4-sum { grid-template-columns: minmax(0, 1fr); justify-items: center; }
	.h4-cats { width: 100%; }
	.h4-gate__btns small { display: none; }
}
@media (prefers-reduced-motion: reduce) { .h2-strip__t, .h2-typing::after { animation: none; } }
