/* port-hero — hero de /portafolio/. Fondo «muro de proyectos»: columnas de capturas móviles reales en perspectiva que se
   deslizan sin fin. Velo tinta (nunca a blanco) del lado del texto. Solo transform; .is-pausado congela fuera de pantalla. */

body:not(.home) main.port-pag { padding-top: 0; }

.port-h { --tel: clamp(150px, 13vw, 200px); --gap: clamp(14px, 1.4vw, 22px); position: relative; isolation: isolate; overflow: hidden; background: #121011; color: #fff; }
.port-h__in { display: grid; align-items: center; max-width: 1320px; min-height: min(92svh, 820px); margin: 0 auto; padding: clamp(48px, 6vw, 88px) var(--m) clamp(56px, 6vw, 96px); }
body:has(.mh--home) .port-h__in { padding-top: calc(112px + clamp(28px, 4vw, 64px)); }

/* ── Muro ── */
.port-h__fondo { position: absolute; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; }
.port-h__muro { position: absolute; left: 46%; top: 50%; display: flex; gap: var(--gap); height: 170%; transform: translate(0, -50%) perspective(1600px) rotateX(14deg) rotateY(-16deg) rotateZ(-9deg); transform-origin: 0 50%; }
.port-h__col { width: var(--tel); overflow: hidden; }
.port-h__col:nth-child(even) { margin-top: calc(var(--tel) * -.9); }
.port-h__pista { display: flex; flex-direction: column; gap: var(--gap); animation: porth-sube calc(46s + var(--c) * 7s) linear infinite; will-change: transform; }
.port-h__col:nth-child(even) .port-h__pista { animation-direction: reverse; }
@keyframes porth-sube { to { transform: translate3d(0, calc(-50% - var(--gap) / 2), 0); } }
.port-h__tel { display: block; aspect-ratio: 9 / 18.5; overflow: hidden; border-radius: calc(var(--tel) * .14); background: #201A17; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .1), 0 30px 50px -24px #000; padding: 5px; }
.port-h__tel img { width: 100%; height: 100%; object-fit: cover; object-position: top; border-radius: calc(var(--tel) * .11); }
/* Velo tinta: sólido bajo el texto, se abre hacia el muro; arriba para la cabecera y abajo para el filo */
.port-h__velo { position: absolute; inset: 0; background: linear-gradient(90deg, #121011 0, #121011 38%, rgba(18, 16, 17, .55) 58%, rgba(18, 16, 17, .1) 80%), linear-gradient(180deg, rgba(18, 16, 17, .8) 0, rgba(18, 16, 17, 0) 200px), linear-gradient(0deg, #121011 0, rgba(18, 16, 17, 0) 180px); }
.port-h::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1px; background: linear-gradient(90deg, transparent, #FF5B23 30%, #D2FB8C 70%, transparent); }

/* ── Texto ── */
.port-h__txt { position: relative; z-index: 2; max-width: 620px; min-width: 0; }
.port-h__txt > * { animation: porth-entra .9s var(--ease) both; }
.port-h__txt > :nth-child(2) { animation-delay: .08s; }
.port-h__txt > :nth-child(3) { animation-delay: .16s; }
.port-h__txt > :nth-child(4) { animation-delay: .24s; }
.port-h__txt > :nth-child(5) { animation-delay: .32s; }
@keyframes porth-entra { from { opacity: 0; transform: translate3d(0, 18px, 0); } }

.port-h__ceja { display: inline-flex; align-items: center; gap: 10px; margin: 0 0 22px; padding: 7px 14px 7px 12px; border-radius: 999px; background: rgba(251, 248, 244, .05); box-shadow: inset 0 0 0 1px rgba(251, 248, 244, .12); color: rgba(255, 255, 255, .84); font-size: 12.5px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; }
.port-h__ceja::before { content: ""; width: 7px; height: 7px; border-radius: 2px; background: #FF5B23; box-shadow: 0 0 12px rgba(255, 91, 35, .9); }
.port-h h1 { max-width: 12ch; font-family: 'Marko Display', var(--f) !important; font-weight: 800 !important; font-size: clamp(44px, 5.8vw, 92px); line-height: 1 !important; letter-spacing: .004em !important; word-spacing: -.06em; text-transform: lowercase; color: #fff; text-wrap: balance; }
.port-h h1 .chispa { color: var(--lima); }
.port-h__lead { max-width: 40ch; margin-top: 22px; color: rgba(255, 255, 255, .76); font-size: clamp(16px, 1.35vw, 20px); line-height: 1.55; }
.port-h__acc { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
.port-h__cta { min-height: 56px; box-shadow: 0 14px 34px -14px rgba(255, 91, 35, .8); }
.port-h__sec { display: inline-flex; align-items: center; justify-content: center; min-height: 56px; padding: 0 26px; border-radius: 999px; box-shadow: inset 0 0 0 1.5px var(--lima); color: #fff; font-weight: 600; text-decoration: none; white-space: nowrap; transition: background-color .3s, color .3s, transform .3s var(--ease); }
.port-h__sec:hover { background: var(--lima); color: #121011; transform: translateY(-3px); }
.port-h a:focus-visible { outline: 2px solid var(--lima); outline-offset: 4px; }

.port-h__cifras { display: grid; grid-template-columns: repeat(3, minmax(0, max-content)); gap: 14px clamp(22px, 3.4vw, 48px); margin: 44px 0 0; padding-top: 26px; border-top: 1px solid rgba(255, 255, 255, .1); }
.port-h__cifras div { min-width: 0; }
.port-h__cifras dt { font-family: 'Marko Display', var(--f); font-weight: 800; font-size: clamp(30px, 2.8vw, 42px); line-height: 1; color: #fff; }
.port-h__cifras div:first-child dt { color: #FF5B23; }
.port-h__cifras dd { margin: 8px 0 0; color: rgba(255, 255, 255, .62); font-size: 14px; line-height: 1.35; }

.port-h.is-pausado *, .port-h.is-pausado *::before, .port-h.is-pausado *::after { animation-play-state: paused !important; }

/* ── Tablet: el muro baja detrás, más tenue ── */
@media (max-width: 960px) {
	.port-h__in { min-height: 0; padding-bottom: 400px; }
	.port-h__muro { left: 6%; top: auto; bottom: -140px; height: 480px; transform: perspective(1400px) rotateX(24deg) rotateZ(-10deg); transform-origin: 50% 100%; }
	.port-h__velo { background: linear-gradient(180deg, #121011 0, #121011 46%, rgba(18, 16, 17, .4) 72%, rgba(18, 16, 17, .1)), linear-gradient(0deg, #121011 0, rgba(18, 16, 17, 0) 90px); }
}

/* ── Celular: franja de capturas al pie, compacta ── */
@media (max-width: 600px) {
	.port-h { --tel: 112px; --gap: 10px; }
	body:has(.mh--home) .port-h__in { padding-top: calc(96px + 24px); }
	.port-h__in { padding-bottom: 262px; }
	.port-h__ceja { margin-bottom: 16px; font-size: 12px; }
	.port-h h1 { font-size: clamp(38px, 11vw, 52px); }
	.port-h__lead { margin-top: 16px; font-size: 16px; }
	.port-h__acc { margin-top: 24px; }
	.port-h__cta, .port-h__sec { flex: 1 1 100%; }
	.port-h__cifras { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-top: 28px; padding-top: 20px; }
	.port-h__cifras dt { font-size: 28px; }
	.port-h__cifras dd { font-size: 12px; }
	.port-h__muro { left: -4%; bottom: -60px; height: 330px; }
	.port-h__col:nth-child(even) { margin-top: -60px; }
}

@media (prefers-reduced-motion: reduce) {
	.port-h *, .port-h *::before, .port-h *::after { animation: none !important; }
}
