/*
Theme Name: UG26 Un golpe de altura
Description: Tema propio de ungolpedealtura.es: plano de arquitecto con la torre interactiva de Tower Heist.
Version: 1.0.0
Requires PHP: 8.1
Text Domain: ug26
*/

:root {
	--bp: #0a2240;
	--bp-2: #0e2c52;
	--bp-3: #133a69;
	--ln: #7fb2f0;
	--ln-2: rgba(127, 178, 240, .16);
	--tx: #eaf2ff;
	--tx-2: #a9c0de;
	--gold: #e8b84a;
	--red: #ef5350;
	--r: 4px;
	--mono: ui-monospace, "Cascadia Mono", "SFMono-Regular", Consolas, "Liberation Mono", monospace;
	--cond: "Bahnschrift", "DIN Alternate", "Roboto Condensed", "Arial Narrow", system-ui, sans-serif;
	--sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
	color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 76px; -webkit-text-size-adjust: 100%; }
body {
	margin: 0;
	background-color: var(--bp);
	background-image:
		linear-gradient(var(--ln-2) 1px, transparent 1px),
		linear-gradient(90deg, var(--ln-2) 1px, transparent 1px),
		linear-gradient(rgba(127, 178, 240, .06) 1px, transparent 1px),
		linear-gradient(90deg, rgba(127, 178, 240, .06) 1px, transparent 1px);
	background-size: 96px 96px, 96px 96px, 24px 24px, 24px 24px;
	background-position: -1px -1px;
	color: var(--tx);
	font: 400 1.0625rem/1.65 var(--sans);
	text-rendering: optimizeLegibility;
}
img, svg { max-width: 100%; height: auto; display: block; }
a { color: var(--ln); text-underline-offset: .2em; text-decoration-thickness: 1px; }
a:hover { color: var(--gold); }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; border-radius: 2px; }
.mono { font-family: var(--mono); letter-spacing: .04em; }
.wrap { width: min(1180px, 100% - 32px); margin-inline: auto; }
.lectura { max-width: 760px; }
.skip { position: absolute; left: -999px; top: 8px; z-index: 99; background: var(--gold); color: var(--bp); padding: 8px 14px; }
.skip:focus { left: 8px; }
h1, h2, h3 { font-family: var(--cond); font-weight: 700; line-height: 1.1; letter-spacing: .01em; margin: 0 0 .5em; text-wrap: balance; }
h2 { font-size: clamp(1.6rem, 1.2rem + 1.6vw, 2.4rem); }
h3 { font-size: 1.2rem; }
p { margin: 0 0 1.1em; }
.eyebrow { font-size: .75rem; text-transform: uppercase; color: var(--gold); margin: 0 0 .7em; }

/* ---------- Cabecera ---------- */
.top { position: sticky; top: 0; z-index: 30; background: rgba(10, 34, 64, .86); backdrop-filter: blur(10px) saturate(140%); -webkit-backdrop-filter: blur(10px) saturate(140%); border-bottom: 1px solid var(--ln-2); }
.top-in { display: flex; align-items: center; gap: 24px; min-height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--tx); text-decoration: none; }
.brand-mark { width: 32px; color: var(--ln); flex: none; }
.brand-txt { font: 700 1.15rem/1.05 var(--cond); text-transform: uppercase; letter-spacing: .06em; }
.brand-txt small { display: block; font-size: .62rem; font-weight: 400; color: var(--tx-2); text-transform: none; letter-spacing: .05em; margin-top: 3px; }
.nav { margin-left: auto; }
.nav ul { list-style: none; display: flex; gap: 4px; margin: 0; padding: 0; }
.nav a { display: block; padding: 8px 12px; color: var(--tx-2); text-decoration: none; font-size: .9rem; border: 1px solid transparent; border-radius: var(--r); }
.nav a:hover { color: var(--tx); border-color: var(--ln-2); }
.nav-toggle { display: none; margin-left: auto; background: none; border: 1px solid var(--ln); color: var(--tx); padding: 7px 12px; border-radius: var(--r); font-size: .8rem; cursor: pointer; }

/* ---------- Portada: plano ---------- */
.hero { padding: 40px 0 56px; border-bottom: 1px solid var(--ln-2); }
.hero-g { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: 48px; align-items: start; }
.cajetin { display: inline-flex; flex-wrap: wrap; border: 1px solid var(--ln); font-size: .7rem; text-transform: uppercase; color: var(--tx-2); margin: 0 0 22px; }
.cajetin span { padding: 5px 10px; }
.cajetin span + span { border-left: 1px solid var(--ln); }
.hero h1 { font-size: clamp(2.8rem, 1.6rem + 5vw, 5.6rem); text-transform: uppercase; letter-spacing: .02em; margin-bottom: .25em; background: linear-gradient(180deg, #fff 30%, #b9d4f6); -webkit-background-clip: text; background-clip: text; color: transparent; }
.sub { font-size: 1.2rem; color: var(--tx-2); max-width: 36ch; }
.sub em { color: var(--tx); }
.sellos { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; padding: 0; margin: 0 0 28px; font-size: .78rem; }
.sellos li { border: 1px dashed var(--ln); padding: 4px 10px; border-radius: 99px; color: var(--tx); }

.inquilino { position: relative; background: linear-gradient(160deg, rgba(19, 58, 105, .9), rgba(10, 34, 64, .92)); border: 1px solid var(--ln); border-radius: var(--r); padding: 22px 24px 18px; box-shadow: 0 0 0 6px rgba(127, 178, 240, .05), 0 24px 60px -30px #000; }
.inquilino::before, .inquilino::after { content: ""; position: absolute; width: 14px; height: 14px; border: 2px solid var(--gold); }
.inquilino::before { top: -5px; left: -5px; border-right: 0; border-bottom: 0; }
.inquilino::after { bottom: -5px; right: -5px; border-left: 0; border-top: 0; }
.pl-n { font-size: .78rem; text-transform: uppercase; color: var(--ln); margin: 0 0 4px; }
.pl-p h2 { font-size: clamp(1.6rem, 1.3rem + 1vw, 2.1rem); margin-bottom: .45em; }
.pl-p h2 span { font-weight: 400; color: var(--tx-2); font-size: .65em; }
.pl-p dl { margin: 0; display: grid; gap: 10px; }
.pl-p dt { font: .7rem var(--mono); text-transform: uppercase; color: var(--gold); letter-spacing: .06em; }
.pl-p dd { margin: 2px 0 0; }
.js .pl-p:not([hidden]) { animation: entra .35s ease-out; }
html:not(.js) .pl-p[hidden] { display: block; border-top: 1px solid var(--ln-2); padding-top: 14px; margin-top: 14px; }
.completo { margin: 14px 0 0; font-size: .82rem; color: var(--gold); }
@keyframes entra { from { opacity: 0; transform: translateY(6px); } }

.torre { position: relative; color: var(--ln); max-width: 520px; width: 100%; margin-inline: auto; }
.torre-svg { width: 100%; overflow: visible; }
.cota-t { font: 9px var(--mono); fill: var(--tx-2); letter-spacing: .12em; }
.cuerpo { filter: drop-shadow(0 0 6px rgba(127, 178, 240, .35)); }
.ferrari { stroke: var(--red); transition: stroke .6s; }
body.giro .ferrari { stroke: var(--gold); filter: drop-shadow(0 0 6px var(--gold)); }
.z rect { fill: transparent; transition: fill .25s; cursor: pointer; }
.z .guia { stroke: var(--ln); stroke-width: 1; stroke-dasharray: 2 3; opacity: .6; }
.z:hover rect { fill: rgba(127, 178, 240, .1); }
.z.on rect { fill: rgba(232, 184, 74, .16); stroke: var(--gold); stroke-width: 1.2; }
.z.on .guia { stroke: var(--gold); opacity: 1; stroke-dasharray: none; }
.pisos { position: absolute; inset: 0 auto 0 0; width: 32%; }
.pisos button { position: absolute; left: 0; right: 0; transform: translateY(-50%); display: block; text-align: right; background: none; border: 0; border-right: 2px solid transparent; padding: 3px 8px 3px 0; color: var(--tx); font: 600 .9rem/1.15 var(--cond); cursor: pointer; transition: color .2s, border-color .2s; }
.pisos button span { display: block; font-size: .6rem; font-weight: 400; color: var(--tx-2); text-transform: uppercase; }
.pisos button:hover { color: var(--gold); }
.pisos button[aria-selected="true"] { color: var(--gold); border-right-color: var(--gold); }
.pisos button.visto:not([aria-selected="true"])::after { content: " ✓"; color: var(--ln); font-size: .75em; }

/* ---------- Secciones ---------- */
.sec { padding: 72px 0; border-bottom: 1px solid var(--ln-2); }
.ficha { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); border-top: 1px solid var(--ln); border-left: 1px solid var(--ln); margin: 28px 0 0; }
.ficha div { border-right: 1px solid var(--ln); border-bottom: 1px solid var(--ln); padding: 12px 16px; background: rgba(10, 34, 64, .55); }
.ficha dt { font-size: .68rem; text-transform: uppercase; color: var(--tx-2); }
.ficha dd { margin: 3px 0 0; font-weight: 600; }

.lectura p { font-size: 1.1rem; }
.precinto { margin-top: 28px; border: 1px dashed var(--red); border-radius: var(--r); background: rgba(239, 83, 80, .06); }
.precinto summary { cursor: pointer; padding: 14px 18px; font-weight: 600; list-style: none; display: flex; gap: 12px; align-items: center; }
.precinto summary::-webkit-details-marker { display: none; }
.precinto summary .mono { font-size: .65rem; text-transform: uppercase; color: var(--bp); background: var(--red); padding: 3px 8px; border-radius: 2px; transform: rotate(-3deg); }
.precinto[open] summary .mono { background: var(--gold); }
.precinto > div { padding: 0 18px 4px; }

.video { position: relative; aspect-ratio: 16 / 9; max-width: 960px; margin-top: 24px; border: 1px solid var(--ln); border-radius: var(--r); overflow: hidden; background: radial-gradient(circle at 50% 45%, var(--bp-3), var(--bp) 70%); }
.video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.video-play { position: absolute; inset: 0; width: 100%; display: grid; place-content: center; justify-items: center; gap: 10px; background: none; border: 0; color: var(--tx); cursor: pointer; font: 700 clamp(1.1rem, .9rem + 1vw, 1.6rem) var(--cond); text-transform: uppercase; letter-spacing: .04em; }
.video-play svg { width: clamp(56px, 10vw, 88px); color: var(--gold); transition: transform .25s; }
.video-play:hover svg { transform: scale(1.08); }
.video-play small { font-size: .7rem; font-weight: 400; color: var(--tx-2); text-transform: none; }

.curios { list-style: none; padding: 0; margin: 28px 0 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 20px; }
.curios li { position: relative; border: 1px solid var(--ln-2); border-left: 2px solid var(--ln); padding: 20px 20px 14px; background: rgba(10, 34, 64, .6); border-radius: 0 var(--r) var(--r) 0; transition: border-color .25s, transform .25s; }
.curios li:hover { border-left-color: var(--gold); transform: translateY(-2px); }
.curios .num { position: absolute; top: -11px; right: 14px; background: var(--bp); border: 1px solid var(--ln); color: var(--gold); font-size: .7rem; padding: 2px 8px; border-radius: 99px; }
.curios p { color: var(--tx-2); margin: 0; font-size: .98rem; }

.cifras { list-style: none; padding: 0; margin: 28px 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.cifras li { border: 1px solid var(--ln); padding: 18px; display: grid; gap: 4px; border-radius: var(--r); }
.cifras strong { font: 700 clamp(2rem, 1.4rem + 2vw, 3rem)/1 var(--cond); color: var(--gold); }
.cifras span { font-size: .72rem; text-transform: uppercase; }
.cifras small { color: var(--tx-2); font-size: .85rem; }
.nota-t { color: var(--tx-2); max-width: 70ch; }

.faq { border-bottom: 1px solid var(--ln-2); }
.faq summary { cursor: pointer; padding: 16px 32px 16px 0; font-weight: 600; position: relative; list-style: none; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 4px; top: 12px; font: 1.4rem var(--mono); color: var(--gold); transition: transform .2s; }
.faq[open] summary::after { transform: rotate(45deg); }
.faq p { color: var(--tx-2); }

.notas { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 20px; margin-top: 24px; }
.nota { border: 1px solid var(--ln-2); padding: 20px; border-radius: var(--r); background: rgba(10, 34, 64, .6); transition: border-color .25s; }
.nota:hover { border-color: var(--ln); }
.nota-m { display: flex; flex-wrap: wrap; gap: 10px; font-size: .7rem; text-transform: uppercase; color: var(--tx-2); margin-bottom: 8px; }
.nota-m span::before { content: "·"; margin-right: 10px; }
.nota h3 a { color: var(--tx); text-decoration: none; }
.nota h3 a:hover { color: var(--gold); }
.nota p { color: var(--tx-2); margin: 0; font-size: .95rem; }

.fuentes { padding: 40px 0; }
.fuentes h2 { font-size: .8rem; text-transform: uppercase; color: var(--tx-2); font-weight: 400; }
.fuentes ul { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 8px 20px; font-size: .9rem; }

/* ---------- Artículos y archivos ---------- */
.crumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; padding: 0; margin: 24px 0 0; font-size: .72rem; color: var(--tx-2); }
.crumbs li + li::before { content: "/"; margin-right: 6px; opacity: .6; }
.crumbs a { color: var(--tx-2); }
.art, .arch, .err { padding-bottom: 72px; }
.art-h { padding: 28px 0 8px; border-bottom: 1px solid var(--ln); margin-bottom: 28px; }
.art-h h1, .arch-h h1, .err h1 { font-size: clamp(2rem, 1.4rem + 2.6vw, 3.2rem); }
.art-m { font-size: .75rem; color: var(--tx-2); text-transform: uppercase; }
.art-img img { border: 1px solid var(--ln); border-radius: var(--r); margin-bottom: 28px; }
.prosa { font-size: 1.1rem; }
.prosa p:empty, .prosa p:has(> br:only-child) { display: none; }
.prosa strong { color: #fff; }
.prosa h2 { font-size: 1.6rem; margin-top: 1.6em; }
.prosa blockquote { margin: 1.4em 0; padding: 4px 0 4px 20px; border-left: 2px solid var(--gold); color: var(--tx-2); }
.prosa img { border-radius: var(--r); }
.prosa iframe { max-width: 100%; }
.volver { margin: 40px 0; padding: 20px 22px; border: 1px dashed var(--ln); border-radius: var(--r); }
.volver p:last-child { margin: 0; }
.rel h2 { font-size: 1.5rem; }
.arch-h { padding: 28px 0 0; }
.arch-d { color: var(--tx-2); }
.pag { display: flex; gap: 8px; margin-top: 32px; }
.pag a, .pag span { padding: 6px 12px; border: 1px solid var(--ln-2); border-radius: var(--r); text-decoration: none; }
.err { padding-top: 72px; }

/* ---------- Pie ---------- */
.foot { padding: 56px 0 28px; background: rgba(6, 22, 43, .75); border-top: 1px solid var(--ln); }
.foot-g { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 40px; }
.foot h2 { font-size: 1rem; text-transform: uppercase; letter-spacing: .08em; }
.foot p, .foot li { color: var(--tx-2); font-size: .92rem; }
.foot ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; }
.foot a { color: var(--tx-2); }
.foot a:hover { color: var(--gold); }
.foot-b { margin-top: 40px; padding-top: 18px; border-top: 1px solid var(--ln-2); font-size: .7rem; color: var(--tx-2); }

/* ---------- Responsive ---------- */
@media (max-width: 980px) {
	.hero-txt { display: contents; }
	.cajetin, .hero h1, .sub, .sellos { order: 0; }
	.torre { order: 1; }
	.inquilino { order: 2; }
	.hero-g { display: flex; flex-direction: column; align-items: stretch; gap: 28px; }
	.sellos { margin-bottom: 0; }
	.cifras { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.foot-g { grid-template-columns: 1fr 1fr; }
	.foot-g > div:first-child { grid-column: 1 / -1; }
}
@media (max-width: 760px) {
	.nav-toggle { display: block; }
	.nav { position: absolute; top: 100%; left: 0; right: 0; background: var(--bp-2); border-bottom: 1px solid var(--ln); display: none; }
	.nav.open { display: block; }
	.nav ul { flex-direction: column; padding: 8px 16px 16px; }
	.nav a { padding: 12px 4px; border-bottom: 1px solid var(--ln-2); border-radius: 0; }
	.sec { padding: 52px 0; }
	.hero { padding-top: 28px; }
	.pisos { width: 34%; }
	.pisos button { font-size: .74rem; padding-right: 6px; }
	.pisos button span { font-size: .52rem; }
	.curios, .notas { grid-template-columns: 1fr; }
	.foot-g { grid-template-columns: 1fr; }
}
@media (max-width: 400px) {
	.cifras { grid-template-columns: 1fr 1fr; gap: 10px; }
	.cifras li { padding: 14px; }
}
html:not(.js) .nav-toggle { display: none; }
html:not(.js) .nav { display: block; position: static; }

@media (prefers-reduced-motion: reduce) {
	html { scroll-behavior: auto; }
	*, *::before, *::after { animation: none !important; transition: none !important; }
}
@media print {
	body { background: #fff; color: #000; }
	.top, .foot, .video, .torre { display: none; }
}

/* Las secciones de lectura de portada se alinean a la izquierda como el resto; solo se limita el ancho del texto. */
.sec .lectura { max-width: none; }
.sec .lectura > * { max-width: 760px; }
@media (max-width: 760px) {
	.ficha { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.ficha div { padding: 10px 12px; }
	.ficha dd { font-size: .95rem; }
}
