/* =========================================================================
   UP BRANDS — main.css
   Paleta web:   #99ff0c (neón) · #232822 (fondo) · #b3d08b (salvia) · #d8e4d8 (claro)
   Tipografía:   Prompt 900 (display/H1) · Maven Pro (cuerpo) · Jaldi (citas)
   ========================================================================= */

:root {
	--neon:   #99ff0c;
	--dark:   #232822;
	--darker: #1b201a;
	--sage:   #b3d08b;
	--light:  #d8e4d8;

	--font-display: 'Prompt', sans-serif;      /* peso 900 */
	--font-body:    'Maven Pro', sans-serif;
	--font-quote:   'Jaldi', sans-serif;

	/* Escala tipográfica sugerida (fluida) */
	--fs-hero: clamp(2.72rem, 8.8vw, 8.8rem);      /* H1 hero (-20%) */
	--fs-h1:   clamp(2.6rem, 7vw, 6rem);        /* H1 páginas / display */
	--fs-h2:   clamp(1.9rem, 4vw, 3.2rem);      /* H2 secciones */
	--fs-h3:   clamp(1.25rem, 2.2vw, 1.6rem);   /* H3 cards */
	--fs-quote:clamp(1.15rem, 1.9vw, 1.5rem);   /* Citas (Jaldi) */
	--fs-body: clamp(1rem, 1.1vw, 1.125rem);    /* Cuerpo */
	--fs-small:.875rem;

	--container: 1360px;
	--gutter: clamp(20px, 4vw, 64px);
	--section: clamp(72px, 10vw, 160px);
}

/* ---------- Reset básico ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; overflow-x: clip; }
body {
	margin: 0;
	overflow-x: clip;
	background: var(--dark);
	color: var(--light);
	font-family: var(--font-body);
	font-size: var(--fs-body);
	line-height: 1.65;
	-webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 900; line-height: 1.02; margin: 0 0 .5em; text-transform: uppercase; letter-spacing: -.01em; overflow-wrap: normal; word-break: normal; hyphens: none; }
h1 { font-size: var(--fs-h1); }
h2 { font-size: var(--fs-h2); }
h3 { font-size: var(--fs-h3); }
p  { margin: 0 0 1em; }

.screen-reader-text { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.skip-link:focus { position: fixed; top: 8px; left: 8px; width: auto; height: auto; clip: auto; background: var(--neon); color: var(--dark); padding: 10px 16px; z-index: 999; font-weight: 700; }

/* Utilidades */
.upb-display { color: #fff; font-size: var(--fs-h1); }
.upb-display--split { color: var(--neon); line-height: .9; }
.upb-quote { font-family: var(--font-quote); font-size: var(--fs-quote); color: var(--sage); line-height: 1.5; max-width: 60ch; }
.upb-kicker { font-family: var(--font-display); font-weight: 800; text-transform: uppercase; letter-spacing: .18em; color: var(--neon); font-size: var(--fs-small); margin-bottom: .8em; }
.upb-empty { color: var(--sage); font-family: var(--font-quote); font-size: var(--fs-quote); padding: 40px var(--gutter); }
.upb-tag { display: inline-block; font-size: .78rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; border: 1px solid var(--neon); color: var(--neon); padding: 4px 12px; border-radius: 999px; }
.upb-tag.is-active, .upb-tag:hover { background: var(--neon); color: var(--dark); }
.upb-tag--muted { border-color: var(--sage); color: var(--sage); }

/* ---------- Botón pill ---------- */
.upb-btn {
	display: inline-flex; align-items: center; gap: 10px;
	background: var(--neon); color: var(--dark);
	font-family: var(--font-display); font-weight: 800; text-transform: uppercase;
	font-size: .95rem; letter-spacing: .04em;
	padding: 14px 28px; border-radius: 999px;
	transition: transform .2s ease, background .2s ease, color .2s ease;
}
.upb-btn:hover { transform: translateY(-2px); }
.upb-btn--ghost { background: transparent; color: var(--neon); border: 2px solid var(--neon); }
.upb-btn--ghost:hover { background: var(--neon); color: var(--dark); }
.upb-btn--invert:hover { background: var(--dark); color: var(--neon); }
.upb-btn--small { padding: 10px 20px; font-size: .82rem; }

/* =========================================================================
   HEADER
   ========================================================================= */
.upb-header {
	position: sticky; top: 0; z-index: 100;
	background: rgba(35, 40, 34, .92);
	backdrop-filter: blur(10px);
	border-bottom: 1px solid rgba(153, 255, 12, .12);
	display: flex; align-items: stretch;
}
.upb-header__inner {
	flex: 1 1 auto; min-width: 0;
	max-width: var(--container); margin: 0 auto;
	padding: 14px var(--gutter);
	display: flex; align-items: center; gap: 24px;
}
.upb-header__brand { flex: 0 0 auto; }
.upb-logo { display: inline-flex; align-items: center; gap: 10px; }
.upb-logo__mark {
	display: grid; place-items: center;
	width: 46px; height: 34px;
	background: var(--neon); color: var(--dark);
	font-family: var(--font-display); font-weight: 900; font-size: 1rem;
	clip-path: polygon(0 0, 100% 0, 100% 78%, 62% 78%, 48% 100%, 48% 78%, 0 78%); /* burbuja de diálogo */
}
.upb-logo__text { font-family: var(--font-display); font-weight: 900; color: var(--neon); font-size: 1.15rem; letter-spacing: .02em; display: flex; flex-direction: column; line-height: 1; }
.upb-logo__text small { font-family: var(--font-body); font-weight: 600; font-size: .5rem; letter-spacing: .18em; color: var(--sage); margin-top: 3px; }
.custom-logo-link { display: inline-flex; align-items: center; }
.custom-logo { height: 44px; width: auto; max-width: 260px; display: block; }

.upb-nav { flex: 1 1 auto; display: flex; align-items: center; justify-content: center; }
.upb-nav__list { list-style: none; display: flex; gap: 26px; margin: 0; padding: 0; }
.upb-nav__list a {
	font-weight: 600; font-size: .92rem; text-transform: uppercase; letter-spacing: .06em;
	color: var(--neon); padding: 6px 0; position: relative;
}
.upb-nav__list a::after { content: ''; position: absolute; left: 0; bottom: 0; width: 0; height: 2px; background: var(--neon); transition: width .25s ease; }
.upb-nav__list a:hover::after, .upb-nav__list .current-menu-item a::after { width: 100%; }

/* Botón CTA de la cabecera: bloque a todo el alto, pegado al borde derecho,
   con el fondo prolongándose 20px por debajo de la cabecera (ver captura). */
.upb-header__cta {
	position: relative;
	flex: 0 0 auto;
	display: inline-flex; align-items: center; justify-content: center; gap: 10px;
	background: var(--neon); color: var(--dark);
	font-family: var(--font-display); font-weight: 800; text-transform: uppercase;
	font-size: .95rem; letter-spacing: .04em;
	padding: 0 clamp(22px, 3vw, 46px);
	transition: background .2s ease, color .2s ease;
}
.upb-header__cta::after {
	content: '';
	position: absolute; left: 0; right: 0; top: 100%;
	height: 20px;
	background-color: var(--neon);
	transition: background-color .2s ease;
}
.upb-header__cta:hover { background: #fff; }
.upb-header__cta:hover::after { background-color: #fff; }

.upb-burger { display: none; background: none; border: 0; cursor: pointer; padding: 8px; flex: 0 0 auto; }
.upb-burger span { display: block; width: 26px; height: 3px; background: var(--neon); margin: 5px 0; transition: transform .25s, opacity .25s; }
.upb-burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.upb-burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.upb-burger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

/* =========================================================================
   HOME · 1 — HERO
   ========================================================================= */
.upb-hero {
	position: relative;
	overflow: hidden;
	background: #fefefe;
	color: #000;
	height: 900px;
	display: flex;
	align-items: flex-start;
}
.upb-hero__media {
	position: absolute;
	right: 0; bottom: 129px;
	width: 1188.98px;
	max-width: 100%;
	aspect-ratio: 1486.22 / 675.27;
	-webkit-mask-image: url('https://upbrands.ec/wp-content/uploads/2026/07/MascaraHero_Video.svg');
	-webkit-mask-size: 100% 100%;
	-webkit-mask-repeat: no-repeat;
	-webkit-mask-position: center;
	mask-image: url('https://upbrands.ec/wp-content/uploads/2026/07/MascaraHero_Video.svg');
	mask-size: 100% 100%;
	mask-repeat: no-repeat;
	mask-position: center;
	background: #000;
	z-index: 1;
}
/* La máscara solo reserva "muesca" de aire para el título; en resoluciones
   intermedias (por debajo de HD/FHD pero por encima del breakpoint móvil)
   el bloque de video se encogía menos rápido que el texto y su borde
   izquierdo terminaba invadiendo el subtítulo y la flecha. Reservamos un
   carril fijo para la copy en ese rango para que el video nunca los toque. */
@media (min-width: 821px) and (max-width: 1429px) {
	.upb-hero__media { width: min(1188.98px, calc(100% - 240px)); }
}
/* El subtítulo ("No pause button. / Still moving.") es un bloque de ancho
   completo sin límite propio, así que a ciertos anchos su texto se extendía
   por debajo del video. Le damos un carril de ancho seguro (equivalente al
   que ya reserva .upb-hero__media) para que el texto haga wrap solo cuando
   de verdad no cabe, en vez de montarse sobre el video. */
@media (min-width: 821px) {
	.upb-hero__sub {
		max-width: calc(max(100vw - 1188.98px, 240px) - var(--gutter) - max(0px, (100vw - var(--container)) / 2) - 15px);
	}
}
.upb-hero__bottom-bar {
	position: absolute;
	left: 0; right: 0; bottom: 0;
	height: 130px;
	background: var(--dark);
	z-index: 3;
}
.upb-hero__video-wrap { position: absolute; inset: 0; overflow: hidden; }
.upb-hero__video {
	position: absolute; top: 50%; left: 50%;
	width: 177.78vh; height: 100%;
	min-width: 100%; min-height: 56.25vw;
	transform: translate(-50%, -50%);
	pointer-events: none; border: 0;
}
.upb-hero__copy {
	position: relative; z-index: 2;
	max-width: var(--container); margin: 0 auto; width: 100%;
	padding: clamp(50px, 7vw, 110px) var(--gutter) clamp(200px, 26vw, 340px);
}
.upb-hero__title {
	font-size: var(--fs-hero);
	color: #000;
	line-height: .92;
	margin: -20px 0 .5em;
}
.upb-hero__row { display: block; }
.upb-hero__row--1 { position: relative; top: -0.33em; }
.upb-hero__row--2 { position: relative; top: -0.25em; }
.upb-hero__word--sm { font-size: .28em; letter-spacing: .04em; vertical-align: bottom; margin-left: calc(.15em - 15px); position: relative; top: -5px; }
.upb-hero__sub {
	font-family: var(--font-display); font-weight: 800; text-transform: uppercase;
	font-size: clamp(1.1rem, 2vw, 1.6rem); color: #000; line-height: 1.35;
	margin: .3em 0 1.4em;
}
.upb-hero__arrow { display: inline-flex; width: clamp(89.6px, 8.4vw, 123.2px); height: clamp(89.6px, 8.4vw, 123.2px); }
.upb-hero__arrow img { width: 100%; height: 100%; display: block; }

/* ---------- Hero: typewriter ---------- */
.upb-type-ch { opacity: 0; }
.upb-type-ch.is-visible { opacity: 1; }
.upb-hero__title.is-typing::after {
	content: '';
	display: inline-block;
	width: .045em; height: .78em;
	background: #000;
	margin-left: .06em;
	vertical-align: -.05em;
	animation: upb-caret .8s steps(1) infinite;
}
@keyframes upb-caret { 50% { opacity: 0; } }

/* ---------- Hero: animación de entrada escalonada (después del typewriter) ---------- */
.upb-hero__sub,
.upb-hero__media,
.upb-hero__bottom-bar {
	opacity: 0;
	transform: translateY(10px);
}
.upb-hero__arrow {
	clip-path: inset(0 100% 0 0);
}
.upb-hero.is-revealed .upb-hero__sub {
	animation: upb-hero-in .8s ease-out forwards;
	animation-delay: .05s;
}
.upb-hero.is-revealed .upb-hero__arrow {
	animation: upb-card-wipe 3s cubic-bezier(.65, 0, .35, 1) forwards;
	animation-delay: .2s;
}
.upb-hero.is-revealed .upb-hero__media {
	animation: upb-hero-media-in 1s ease-out forwards;
	animation-delay: .12s;
}
.upb-hero.is-revealed .upb-hero__bottom-bar {
	animation: upb-hero-in .8s ease-out forwards;
	animation-delay: .38s;
}
@keyframes upb-hero-in {
	from { opacity: 0; transform: translateY(10px); }
	to { opacity: 1; transform: translateY(0); }
}
@keyframes upb-hero-media-in {
	from { opacity: 0; transform: translateY(10px) scale(.99); }
	to { opacity: 1; transform: translateY(0) scale(1); }
}
/* =========================================================================
   HOME · 2 — EVERYTHING (manifiesto + stats)
   ========================================================================= */
.upb-everything {
	background: #fefefe;
	color: var(--dark);
	min-height: 680px;
	display: flex; align-items: center;
}
.upb-everything__inner {
	max-width: var(--container); margin: 0 auto; width: 100%;
	padding: clamp(50px, 6vw, 90px) var(--gutter);
	display: flex; flex-direction: column;
	gap: clamp(50px, 7vw, 100px);
}
.upb-everything__row {
	width: 100%;
	display: flex; align-items: center; gap: clamp(20px, 3vw, 48px);
}
.upb-everything__row:last-child { transform: translateY(-10%); }
.upb-everything__card {
	flex: 0 0 auto;
	width: min(248px, 24vw);
	min-height: 300px;
	background: #dddddd;
	padding: 30px 26px;
	display: flex; flex-direction: column; gap: 22px;
	clip-path: inset(0 100% 0 0);
}
.upb-everything__card.is-revealed {
	animation: upb-card-wipe .9s cubic-bezier(.65, 0, .35, 1) forwards;
}
@keyframes upb-card-wipe {
	from { clip-path: inset(0 100% 0 0); }
	to { clip-path: inset(0 0 0 0); }
}
.upb-everything__arrow-icon svg { width: 52px; height: 52px; color: var(--dark); }
.upb-everything__quote { font-family: var(--font-quote); font-size: .95rem; line-height: 1.55; color: var(--dark); margin: 0; flex: 1 1 auto; }
.upb-everything__sub-h { font-family: var(--font-display); font-weight: 900; text-transform: uppercase; font-size: 1.4rem; line-height: 1.15; color: var(--dark); margin: 0; }
.upb-everything__connector {
	flex: 1 1 auto; display: flex; align-items: center; justify-content: flex-start; color: var(--dark); min-width: 40px;
	margin-left: calc(10px - clamp(20px, 3vw, 48px));
	clip-path: inset(0 100% 0 0);
}
.upb-everything__connector.is-revealed {
	animation: upb-card-wipe .9s cubic-bezier(.65, 0, .35, 1) forwards;
}
.upb-everything__connector svg { width: 100%; max-width: 240px; height: 48px; }
.upb-everything__big {
	flex: 0 0 auto;
	font-family: var(--font-display); font-weight: 900; text-transform: uppercase;
	font-size: clamp(2.31rem, 4.84vw, 4.84rem); line-height: 1.02; color: var(--dark); margin: 0;
	opacity: 0;
}
.upb-everything__big.is-typing,
.upb-everything__big.is-typed {
	opacity: 1;
}
.upb-everything__big.is-typing::after {
	content: '';
	display: inline-block;
	width: .045em; height: .78em;
	background: var(--dark);
	margin-left: .06em;
	vertical-align: -.05em;
	animation: upb-caret .8s steps(1) infinite;
}

/* ---------- Tarjeta gris: entrada escalonada de sus elementos internos ---------- */
.upb-everything__arrow-icon,
.upb-everything__quote,
.upb-everything__sub-h {
	opacity: 0;
	transform: translateY(16px);
}
.upb-everything__card.is-revealed .upb-everything__arrow-icon {
	animation: upb-hero-in .6s ease-out forwards;
	animation-delay: .05s;
}
.upb-everything__card.is-revealed .upb-everything__quote {
	animation: upb-hero-in .6s ease-out forwards;
	animation-delay: .2s;
}
.upb-everything__card.is-revealed .upb-everything__sub-h {
	animation: upb-hero-in .6s ease-out forwards;
	animation-delay: .35s;
}

.upb-everything__intro { flex: 0 0 auto; width: min(420px, 34vw); display: flex; flex-direction: column; gap: 18px; }
.upb-everything__intro p { margin: 0; font-size: 1rem; line-height: 1.55; color: var(--dark); }
.upb-everything__cta { background: #97ff15; color: var(--dark); align-self: flex-start; }
.upb-everything__cta:hover { background: var(--dark); color: #97ff15; }

.upb-everything__circles { flex: 1 1 auto; display: flex; justify-content: center; }
.upb-circle {
	position: relative;
	width: clamp(240px, 22vw, 360px); height: clamp(240px, 22vw, 360px);
	border-radius: 50%; border: 1.5px solid var(--dark);
	background: none;
	display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center;
}
.upb-circle--overlap { margin-left: clamp(-70px, -7vw, -36px); z-index: 1; }
.upb-stat__num { display: block; font-family: var(--font-display); font-weight: 900; font-size: clamp(2.6rem, 6vw, 5.4rem); color: var(--dark); line-height: 1; }
.upb-stat__label { display: block; margin-top: 10px; color: var(--dark); font-weight: 500; line-height: 1.3; }

/* =========================================================================
   HOME · 3 — FOTO FIJA (parallax)
   ========================================================================= */
.upb-fixed-photo {
	position: relative;
	overflow: hidden;
	height: 600px;
	background-color: var(--dark);
	background-size: cover;
	background-position: center;
	background-repeat: no-repeat;
	background-attachment: fixed;
}
.upb-fixed-photo::after {
	content: '';
	position: absolute;
	top: -50%; left: -50%;
	width: 200%; height: 200%;
	background-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0naHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmcnIHdpZHRoPScyMjAnIGhlaWdodD0nMjIwJz48ZmlsdGVyIGlkPSduJz48ZmVUdXJidWxlbmNlIHR5cGU9J2ZyYWN0YWxOb2lzZScgYmFzZUZyZXF1ZW5jeT0nMC44NScgbnVtT2N0YXZlcz0nMicgc3RpdGNoVGlsZXM9J3N0aXRjaCcvPjxmZUNvbG9yTWF0cml4IHR5cGU9J21hdHJpeCcgdmFsdWVzPScwIDAgMCAwIDAgIDAgMCAwIDAgMCAgMCAwIDAgMCAwICAwIDAgMCAwLjYgMCcvPjwvZmlsdGVyPjxyZWN0IHdpZHRoPScxMDAlJyBoZWlnaHQ9JzEwMCUnIGZpbHRlcj0ndXJsKCNuKScvPjwvc3ZnPgo=");
	background-repeat: repeat;
	background-size: 220px 220px;
	opacity: .35;
	mix-blend-mode: overlay;
	pointer-events: none;
	will-change: transform, opacity;
	animation: upb-grain .3s steps(1, end) infinite;
}
@keyframes upb-grain {
	0%   { transform: translate(0, 0) scale(1.3); opacity: .25; }
	9%   { transform: translate(-15%, 20%) scale(1.35); opacity: .5; }
	18%  { transform: translate(20%, -12%) scale(1.3); opacity: .3; }
	27%  { transform: translate(-25%, -20%) scale(1.4); opacity: .55; }
	36%  { transform: translate(15%, 25%) scale(1.3); opacity: .28; }
	45%  { transform: translate(-20%, 12%) scale(1.35); opacity: .5; }
	54%  { transform: translate(25%, -25%) scale(1.3); opacity: .32; }
	63%  { transform: translate(-12%, -15%) scale(1.4); opacity: .55; }
	72%  { transform: translate(18%, 18%) scale(1.3); opacity: .28; }
	81%  { transform: translate(-18%, -18%) scale(1.35); opacity: .48; }
	90%  { transform: translate(12%, 15%) scale(1.3); opacity: .3; }
	100% { transform: translate(0, 0) scale(1.3); opacity: .25; }
}
@media (prefers-reduced-motion: reduce) {
	.upb-fixed-photo::after { animation: none; }
}
@media (max-width: 820px) {
	/* background-attachment: fixed no funciona bien en la mayoría de navegadores móviles */
	.upb-fixed-photo { background-attachment: scroll; }
}

/* =========================================================================
   HOME · 4 — SERVICIOS
   ========================================================================= */
.upb-section-head {
	display: flex; align-items: flex-end; justify-content: space-between; gap: 32px; flex-wrap: wrap;
	margin-bottom: clamp(36px, 5vw, 64px);
}
.upb-section-head h2 { max-width: 22ch; color: #fff; margin: 0; font-size: var(--fs-h2); }

.upb-services { background: #fefefe; }
.upb-services__inner { max-width: var(--container); margin: 0 auto; padding: clamp(50px, 6vw, 90px) var(--gutter); }
.upb-services .upb-section-head h2 { color: var(--dark); font-weight: 700; text-transform: none; letter-spacing: 0; }
.upb-services .upb-section-head h2 strong { font-weight: 800; }
.upb-services__heading { opacity: 0; }
.upb-services__heading.is-typing,
.upb-services__heading.is-typed { opacity: 1; }
.upb-services__heading.is-typing::after {
	content: '';
	display: inline-block;
	width: .07em; height: .78em;
	background: var(--dark);
	margin-left: .06em;
	vertical-align: -.05em;
	animation: upb-caret .8s steps(1) infinite;
}

.upb-services__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(16px, 2vw, 24px); }
.upb-service {
	background: #181818;
	border: 1px solid rgba(255, 255, 255, .08);
	padding: clamp(24px, 2.5vw, 34px);
	display: flex; flex-direction: column; gap: 20px;
	min-height: 385px;
}
.upb-service__num { font-family: var(--font-body); font-weight: 500; font-size: 1rem; color: #fff; }
.upb-service__icon { display: block; }
.upb-service__icon img { width: 40px; height: 40px; display: block; }
.upb-service h3 { color: #fff; font-size: 1.15rem; text-transform: none; letter-spacing: 0; margin: 0; }
.upb-service p { color: rgba(255, 255, 255, .78); font-size: .92rem; line-height: 1.55; margin: 0; }

/* =========================================================================
   HOME · 5 — PORTAFOLIO
   ========================================================================= */
.upb-portfolio { padding: var(--section) 0; border-top: 1px solid rgba(216, 228, 216, .12); }
.upb-portfolio__inner { max-width: var(--container); margin: 0 auto; padding: 0 var(--gutter); }
.upb-portfolio__head {
	display: grid; grid-template-columns: auto 1fr; gap: clamp(32px, 6vw, 96px); align-items: center;
}
.upb-portfolio__title-group { display: flex; align-items: center; gap: clamp(16px, 2vw, 32px); }
.upb-portfolio__heading { opacity: 0; }
.upb-portfolio__heading.is-typing,
.upb-portfolio__heading.is-typed { opacity: 1; }
.upb-portfolio__heading.is-typing::after {
	content: '';
	display: inline-block;
	width: .05em; height: .78em;
	background: var(--neon);
	margin-left: .06em;
	vertical-align: -.05em;
	animation: upb-caret .8s steps(1) infinite;
}
.upb-portfolio__connector {
	color: #99ff0c;
	clip-path: inset(0 100% 0 0);
}
.upb-portfolio__connector.is-revealed {
	animation: upb-card-wipe .9s cubic-bezier(.65, 0, .35, 1) forwards;
}
.upb-portfolio__connector svg { width: clamp(150px, 15vw, 270px); height: 78px; display: block; }
.upb-portfolio__head .upb-quote {
	width: 60%;
	margin-left: auto;
	text-align: right;
}
.upb-portfolio__grid {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 10px;
	width: 100%;
	margin: clamp(36px, 5vw, 56px) 0;
}
.upb-portfolio__item { display: block; position: relative; overflow: hidden; aspect-ratio: 1 / 1; }
.upb-portfolio__item img {
	width: 100%; height: 100%; object-fit: cover; display: block;
	transition: transform .4s ease;
}
.upb-portfolio__item:hover img { transform: scale(1.04); }
.upb-portfolio__more { margin-top: clamp(36px, 5vw, 56px); text-align: center; }

.upb-card-proyecto__media { margin: 0; overflow: hidden; border-radius: 8px; }
.upb-card-proyecto__media img { width: 100%; transition: transform .4s ease; }
.upb-card-proyecto:hover .upb-card-proyecto__media img { transform: scale(1.03); }
.upb-card-proyecto__body { padding: 18px 4px 0; }
.upb-card-proyecto__meta { display: flex; gap: 8px; margin-bottom: 10px; flex-wrap: wrap; }
.upb-card-proyecto h3 { color: #fff; margin-bottom: .3em; }
.upb-card-proyecto__cats { color: var(--sage); font-size: var(--fs-small); }

/* =========================================================================
   HOME · 6 — CLIENTES
   ========================================================================= */
.upb-clients { background: #fefefe; }
.upb-clients__inner { max-width: var(--container); margin: 0 auto; padding: var(--section) var(--gutter) calc(var(--section) / 2); }
.upb-clients h2 {
	color: var(--dark); text-align: center; margin-bottom: clamp(36px, 5vw, 64px);
	font-weight: 400; text-transform: none; letter-spacing: 0;
}
.upb-clients h2 strong { font-weight: 800; }

.upb-clients__heading { opacity: 0; }
.upb-clients__heading.is-typing,
.upb-clients__heading.is-typed { opacity: 1; }
.upb-clients__heading.is-typing::after {
	content: '';
	display: inline-block;
	width: .05em; height: .78em;
	background: var(--dark);
	margin-left: .06em;
	vertical-align: -.05em;
	animation: upb-caret .8s steps(1) infinite;
}

.upb-clients__grid {
	display: grid; grid-template-columns: repeat(8, 1fr);
	border-top: 1px solid rgba(0, 0, 0, .14);
	border-left: 1px solid rgba(0, 0, 0, .14);
}
.upb-clients__logo {
	display: flex; align-items: center; justify-content: center;
	aspect-ratio: 1 / 1;
	background: #fefefe;
	border-right: 1px solid rgba(0, 0, 0, .14);
	border-bottom: 1px solid rgba(0, 0, 0, .14);
	padding: 18px;
	transition: background .2s ease;
}
.upb-clients__logo:hover { background: rgba(0, 0, 0, .03); }
.upb-clients__logo img {
	max-width: 100%; max-height: 100%; width: auto; height: auto;
	filter: grayscale(1);
	mix-blend-mode: multiply;
	opacity: 0;
	transform: scale(.8);
	transition: transform .5s cubic-bezier(.34, 1.56, .64, 1), opacity .4s ease;
	transition-delay: calc(var(--i, 0) * 18ms);
}
.upb-clients__grid.is-revealed .upb-clients__logo img {
	opacity: .82;
	transform: scale(1);
}
.upb-clients__logo:hover img {
	transform: scale(1.12) !important;
	opacity: 1 !important;
	transition-delay: 0s !important;
}
@media (prefers-reduced-motion: reduce) {
	.upb-clients__logo img { opacity: .82; transform: scale(1); transition-delay: 0s; }
}

/* =========================================================================
   HOME · 7 — EQUIPO (filas)
   ========================================================================= */
.upb-team { background: #fefefe; }
.upb-team__inner { max-width: var(--container); margin: 0 auto; padding: calc(var(--section) / 2) var(--gutter) var(--section); }
.upb-team .upb-section-head h2 { color: var(--dark); font-weight: 400; text-transform: none; letter-spacing: 0; }
.upb-team__heading { opacity: 0; }
.upb-team__heading.is-typing,
.upb-team__heading.is-typed { opacity: 1; }
.upb-team__heading.is-typing::after {
	content: '';
	display: inline-block;
	width: .05em; height: .78em;
	background: var(--dark);
	margin-left: .06em;
	vertical-align: -.05em;
	animation: upb-caret .8s steps(1) infinite;
}
.upb-team .upb-empty { color: rgba(0, 0, 0, .5); }
.upb-team__rows { border-top: 1px solid rgba(0, 0, 0, .14); }
.upb-team__row {
	display: grid; grid-template-columns: 90px 1.4fr 1fr auto; align-items: center; gap: clamp(16px, 3vw, 40px);
	padding: 22px 0; border-bottom: 1px solid rgba(0, 0, 0, .14);
	will-change: transform;
}
/* Especificidad reforzada (.upb-team__rows + .upb-team__row) para que este
   transition/transform ganen siempre sobre los de .upb-reveal.is-visible
   (mismo elemento, agregados por el JS de scroll), que si no los pisan por
   completo y la fila se queda inmóvil en el hover. */
.upb-team__rows .upb-team__row {
	transition: transform .35s ease-in-out;
}
.upb-team__rows .upb-team__row:hover { transform: translateX(14px); }
.upb-team__thumb { width: 90px; height: 90px; overflow: hidden; border-radius: 8px; }
.upb-team__thumb img { width: 100%; height: 100%; object-fit: cover; filter: grayscale(1); transition: filter .35s ease-in-out, transform .35s ease-in-out; }
.upb-team__row:hover .upb-team__thumb img { filter: grayscale(0); transform: scale(1.06); }
.upb-team__name { font-family: var(--font-display); font-weight: 900; text-transform: uppercase; font-size: clamp(1.3rem, 2.6vw, 2rem); color: var(--dark); }
.upb-team__role { color: rgba(0, 0, 0, .55); font-weight: 600; transition: color .35s ease-in-out; }
.upb-team__row:hover .upb-team__role { color: rgba(0, 0, 0, .8); }
.upb-team__more { color: var(--dark); font-weight: 700; text-transform: uppercase; letter-spacing: .06em; font-size: .85rem; white-space: nowrap; transition: color .35s ease-in-out; }
.upb-team__more em { font-style: normal; transition: transform .35s ease-in-out; display: inline-block; }
.upb-team__row:hover .upb-team__more { color: var(--neon); }
.upb-team__row:hover .upb-team__more em { transform: translateX(6px); }

/* =========================================================================
   MARQUEE
   ========================================================================= */
.upb-marquee { overflow: hidden; border-top: 1px solid rgba(153,255,12,.25); border-bottom: 1px solid rgba(153,255,12,.25); padding: 18px 0; background: var(--darker); }
.upb-marquee__track { display: flex; width: max-content; animation: upb-scroll 28s linear infinite; will-change: transform; }
.upb-marquee__seg {
	display: flex; align-items: center; gap: 36px; white-space: nowrap;
	flex-shrink: 0;
	padding-right: 36px; /* espacio de unión con la siguiente copia, autocontenido */
}
.upb-marquee__item { font-family: var(--font-display); font-weight: 900; text-transform: uppercase; font-size: clamp(1.2rem, 2.4vw, 2rem); color: var(--neon); }
.upb-marquee__dot { display: inline-flex; }
.upb-marquee__dot img { width: 18px; height: 18px; display: block; }
@keyframes upb-scroll { from { transform: translateX(0); } to { transform: translateX(var(--marquee-distance, -50%)); } }
@media (prefers-reduced-motion: reduce) { .upb-marquee__track { animation: none; } }

/* =========================================================================
   HOME · 9 — CTAs CIERRE
   ========================================================================= */
.upb-closing { max-width: var(--container); margin: 0 auto; padding: var(--section) var(--gutter); }
.upb-closing__heading { opacity: 0; }
.upb-closing__heading.is-typing,
.upb-closing__heading.is-typed { opacity: 1; }
.upb-closing__heading.is-typing::after {
	content: '';
	display: inline-block;
	width: .05em; height: .78em;
	background: #fff;
	margin-left: .06em;
	vertical-align: -.05em;
	animation: upb-caret .8s steps(1) infinite;
}
.upb-closing__grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.upb-closing__card {
	display: flex; flex-direction: column; justify-content: space-between; gap: 40px;
	min-height: 220px; padding: 24px; border-radius: 10px;
	background-color: var(--darker); border: 1px solid rgba(216,228,216,.14);
	font-family: var(--font-display); font-weight: 800; text-transform: uppercase; font-size: 1.1rem; color: #fff;
}
/* Especificidad reforzada (.upb-closing__grid + .upb-closing__card) para que
   esta transición gane siempre sobre la de .upb-reveal (mismo elemento,
   agregada por el JS de scroll), que si no la pisa por completo. */
.upb-closing__grid .upb-closing__card {
	transition: opacity .5s ease, background-color .5s ease, color .5s ease, transform .5s ease;
}
.upb-closing__icon {
	align-self: center;
	width: 55px; height: 55px;
	background-color: #fff;
	-webkit-mask-size: contain; mask-size: contain;
	-webkit-mask-repeat: no-repeat; mask-repeat: no-repeat;
	-webkit-mask-position: center; mask-position: center;
	transition: background-color .5s ease;
}
.upb-closing__card em { font-style: normal; font-size: 1.6rem; align-self: flex-end; }
.upb-closing__card:hover { background-color: var(--neon); color: var(--dark); transform: translateY(-4px); }
.upb-closing__card:hover .upb-closing__icon { background-color: var(--dark); }

/* =========================================================================
   FOOTER (propuesto)
   ========================================================================= */
.upb-footer { background: var(--darker); border-top: 2px solid var(--neon); }
.upb-footer__cta { text-align: center; padding: var(--section) var(--gutter) clamp(48px, 6vw, 90px); }
.upb-footer__kicker { font-family: var(--font-quote); color: var(--sage); font-size: var(--fs-quote); margin-bottom: .3em; }
.upb-footer__big {
	font-family: var(--font-display); font-weight: 900; text-transform: uppercase;
	font-size: clamp(2.6rem, 8vw, 7rem); line-height: .95; color: var(--neon); display: inline-block;
	transition: letter-spacing .3s ease;
}
.upb-footer__big:hover { letter-spacing: .02em; }

.upb-footer__grid {
	max-width: var(--container); margin: 0 auto;
	display: grid; grid-template-columns: 1.4fr 1fr 1.2fr 1fr; gap: clamp(28px, 4vw, 64px);
	padding: 0 var(--gutter) clamp(48px, 6vw, 80px);
}
.upb-footer__col h4 { color: var(--neon); font-size: 1rem; letter-spacing: .1em; margin-bottom: 1em; }
.upb-footer__col p, .upb-footer__col address { color: var(--light); opacity: .85; font-style: normal; line-height: 1.8; }
.upb-footer__col a:hover { color: var(--neon); }
.upb-footer__menu { list-style: none; margin: 0; padding: 0; }
.upb-footer__menu li { margin-bottom: 10px; }
.upb-footer__menu a { font-weight: 600; text-transform: uppercase; font-size: .9rem; letter-spacing: .05em; }
.upb-footer__socials { display: flex; flex-direction: column; gap: 10px; }
.upb-footer__socials a { font-weight: 600; text-transform: uppercase; font-size: .9rem; letter-spacing: .05em; }
.upb-logo--footer { margin-bottom: 18px; display: inline-flex; }

.upb-footer__legal {
	border-top: 1px solid rgba(216,228,216,.14);
	display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap;
	max-width: var(--container); margin: 0 auto;
	padding: 22px var(--gutter);
	font-size: .78rem; letter-spacing: .1em; text-transform: uppercase; color: var(--sage);
}

/* =========================================================================
   ARCHIVOS (blog / proyectos / equipo) y grids
   ========================================================================= */
.upb-archive-hero { max-width: var(--container); margin: 0 auto; padding: clamp(56px, 8vw, 110px) var(--gutter) clamp(30px, 4vw, 56px); }
.upb-archive-hero .upb-display { color: var(--neon); }
.upb-archive-hero__head {
	display: flex;
	align-items: flex-end;
	justify-content: space-between;
	gap: clamp(24px, 4vw, 64px);
	flex-wrap: wrap;
}
.upb-archive-hero__head .upb-quote {
	width: 48%;
	max-width: 48ch;
	margin-left: auto;
	text-align: right;
}
.upb-archive-hero__title.is-typing::after {
	content: '';
	display: inline-block;
	width: .045em; height: .78em;
	background: var(--neon);
	margin-left: .06em;
	vertical-align: -.05em;
	animation: upb-caret .8s steps(1) infinite;
}
.upb-archive { max-width: var(--container); margin: 0 auto; padding: 0 var(--gutter) var(--section); }
.upb-filter { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 24px; }

.upb-grid { display: grid; gap: clamp(24px, 3vw, 44px); }
.upb-grid--2 { grid-template-columns: repeat(2, 1fr); }
.upb-grid--3 { grid-template-columns: repeat(3, 1fr); }
.upb-grid--4 { grid-template-columns: repeat(4, 1fr); }

/* Cards blog */
.upb-card-post { background: var(--darker); border-radius: 10px; overflow: hidden; border: 1px solid rgba(216,228,216,.1); transition: transform .25s, border-color .25s; }
.upb-card-post:hover { transform: translateY(-4px); border-color: var(--neon); }
.upb-card-post__media { margin: 0; }
.upb-card-post__media img { width: 100%; filter: grayscale(1); transition: filter .3s; }
.upb-card-post:hover .upb-card-post__media img { filter: grayscale(0); }
.upb-card-post__body { padding: 20px; }
.upb-card-post__meta { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.upb-card-post__meta a { font-size: .78rem; color: var(--sage); text-transform: uppercase; letter-spacing: .06em; }
.upb-card-post h3 { color: #fff; font-size: 1.25rem; }
.upb-card-post p { color: var(--light); opacity: .8; font-size: .95rem; }
.upb-card-post__more { color: var(--neon); font-weight: 700; text-transform: uppercase; font-size: .82rem; letter-spacing: .06em; }

/* Cards equipo */
.upb-card-equipo { text-align: left; }
.upb-card-equipo__media { margin: 0 0 14px; overflow: hidden; border-radius: 10px; aspect-ratio: 600 / 720; }
.upb-card-equipo__media img { width: 100%; height: 100%; object-fit: cover; filter: grayscale(1); transition: transform .35s, filter .35s; }
.upb-card-equipo:hover .upb-card-equipo__media img { transform: scale(1.04); filter: grayscale(0); }
.upb-card-equipo h3 { color: #fff; margin-bottom: .2em; }
.upb-card-equipo__role { color: var(--sage); font-weight: 600; margin-bottom: .6em; }

.upb-socials { display: flex; gap: 8px; flex-wrap: wrap; }
.upb-social {
	display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%;
	border: 1.5px solid var(--neon); color: var(--neon); font-weight: 800; font-size: .75rem;
	transition: background .2s, color .2s;
}
.upb-social:hover { background: var(--neon); color: var(--dark); }

/* =========================================================================
   SINGLES (blog / página / proyecto / persona)
   ========================================================================= */
.upb-single, .upb-project, .upb-person { max-width: var(--container); margin: 0 auto; padding: clamp(48px, 7vw, 96px) var(--gutter) var(--section); }
.upb-single { color: var(--dark); }
.upb-single__hero h1 { color: #fff; max-width: 20ch; }
.upb-single__meta { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 20px; }
.upb-single__meta a { font-size: .78rem; color: var(--sage); text-transform: uppercase; letter-spacing: .06em; }
.upb-single__cover { margin: clamp(28px, 4vw, 48px) 0; border-radius: 10px; overflow: hidden; }
.upb-single__cover img { width: 100%; }

/* Prosa de contenido */
.upb-prose { max-width: 760px; }
.upb-prose h2, .upb-prose h3 { color: var(--neon); margin-top: 1.6em; }
.upb-prose a { color: var(--neon); text-decoration: underline; text-underline-offset: 3px; }
.upb-prose blockquote {
	font-family: var(--font-quote); font-size: var(--fs-quote); color: var(--sage);
	border-left: 4px solid var(--neon); margin: 1.6em 0; padding: .4em 0 .4em 1.2em;
}
.upb-prose img { border-radius: 8px; }
/* Si a una imagen (p.ej. un SVG exportado sin width/height propios) le
   faltan esos atributos, el navegador no tiene de dónde sacar un tamaño
   y la termina pintando en 0x0. Esto le da un ancho de respaldo solo en
   ese caso; las imágenes normales (con width/height) no se ven afectadas. */
.upb-prose img:not([width]) { width: 100%; height: auto; }
.upb-prose ul li::marker { color: var(--neon); }
.upb-prose .wp-block-gallery, .upb-prose .wp-block-image { max-width: none; }

.upb-single__tags a { margin-right: 8px; font-size: .78rem; color: var(--sage); }
.upb-postnav { display: flex; justify-content: space-between; align-items: center; gap: 20px; flex-wrap: wrap; margin-top: clamp(40px, 6vw, 72px); padding-top: 24px; border-top: 1px solid rgba(216,228,216,.14); }
.upb-postnav a { font-family: var(--font-display); font-weight: 800; text-transform: uppercase; font-size: .9rem; color: var(--light); }
.upb-postnav a:hover { color: var(--neon); }
.upb-postnav__all { color: var(--neon) !important; }

/* =========================================================================
   BLOG (entradas) — sección clara: fondo blanco, texto oscuro.
   Todo lo de abajo va escopado bajo .upb-single-page para no tocar
   Proyecto/Equipo (que se quedan en el tema oscuro).
   ========================================================================= */
.upb-single-page { background: #fff; }

.upb-single-page .upb-single__hero h1 { color: var(--dark); }
.upb-single-page .upb-single__meta a { color: var(--dark); opacity: .55; }
.upb-single-page .upb-single__meta .upb-tag { border-color: var(--dark); color: var(--dark); }
.upb-single-page .upb-quote { color: var(--dark); opacity: .72; }

.upb-single-page .upb-prose h2,
.upb-single-page .upb-prose h3 { color: var(--dark); }
.upb-single-page .upb-prose a { color: var(--dark); text-decoration-color: var(--sage); }
.upb-single-page .upb-prose a:hover { color: var(--sage); }
.upb-single-page .upb-prose blockquote { color: var(--dark); opacity: .82; border-left-color: var(--sage); }
.upb-single-page .upb-prose ul li::marker { color: var(--sage); }

.upb-single-page .upb-single__tags a { color: var(--dark); opacity: .55; }
.upb-single-page .upb-single__tags a:hover { opacity: 1; color: var(--sage); }
.upb-single-page .upb-postnav { border-top-color: rgba(35, 40, 34, .14); }
.upb-single-page .upb-postnav a { color: var(--dark); }
.upb-single-page .upb-postnav a:hover { color: var(--sage); }

.upb-single-page .upb-single__meta .upb-tag:hover { background: var(--sage); border-color: var(--sage); color: var(--dark); }

.upb-single-page .pagination .page-numbers { border-color: rgba(35, 40, 34, .22); color: var(--dark); }
.upb-single-page .pagination .page-numbers.current,
.upb-single-page .pagination .page-numbers:hover { background: var(--sage); border-color: var(--sage); color: var(--dark); }

/* ---------- Lista de comentarios ---------- */
.upb-comments {
	max-width: var(--container); margin: 0 auto;
	padding: clamp(28px, 4vw, 48px) var(--gutter) var(--section);
	border-top: 1px solid rgba(35, 40, 34, .12);
}
.upb-comments h2 { margin-bottom: 1em; }
.upb-comments__list,
.upb-comments__list ol { list-style: none; margin: 0; padding: 0; }
.upb-comments__list { display: flex; flex-direction: column; gap: 28px; margin-bottom: 44px; }
.upb-comments__list ol { margin-top: 24px; padding-left: clamp(24px, 4vw, 48px); display: flex; flex-direction: column; gap: 24px; }
.upb-comments .comment-body { border-bottom: 1px solid rgba(35, 40, 34, .1); padding-bottom: 24px; }
.upb-comments .comment-author.vcard { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; }
.upb-comments .comment-author .avatar { border-radius: 50%; display: block; }
.upb-comments .comment-author .fn { font-style: normal; font-family: var(--font-display); font-weight: 800; text-transform: uppercase; font-size: .82rem; letter-spacing: .03em; }
.upb-comments .comment-author .fn a { color: var(--dark); }
.upb-comments .comment-author .says { display: none; }
.upb-comments .comment-meta { margin-bottom: 12px; }
.upb-comments .comment-meta a { font-size: .74rem; color: var(--dark); opacity: .5; text-transform: uppercase; letter-spacing: .05em; }
.upb-comments .comment-body > p { color: var(--dark); margin: 0 0 10px; }
.upb-comments .reply { margin-top: 8px; }
.upb-comments .comment-reply-link { font-family: var(--font-display); font-weight: 800; text-transform: uppercase; font-size: .72rem; letter-spacing: .08em; color: var(--dark); text-decoration: underline; text-decoration-color: var(--sage); text-underline-offset: 3px; }
.upb-comments .comment-reply-link:hover { color: var(--sage); }

/* ---------- Formulario de comentarios (mismo estilo que el de contacto) ---------- */
.comment-reply-title { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.comment-reply-title small a { font-size: .7rem; text-transform: uppercase; letter-spacing: .06em; color: var(--dark); opacity: .55; }
.upb-comment-form { display: flex; flex-direction: column; gap: 20px; max-width: 560px; margin-top: 24px; }
.upb-comment-form .comment-notes,
.upb-comment-form .required-field-message { color: var(--dark); opacity: .6; font-size: .85rem; margin: 0; }
.upb-comment-form p { display: flex; flex-direction: column; gap: 8px; margin: 0; }
.upb-comment-form label {
	font-family: var(--font-display); font-weight: 800; text-transform: uppercase;
	font-size: .74rem; letter-spacing: .1em; color: var(--dark); opacity: .62;
}
.upb-comment-form input[type="text"],
.upb-comment-form input[type="email"],
.upb-comment-form input[type="url"],
.upb-comment-form textarea {
	width: 100%; box-sizing: border-box;
	background: transparent;
	border: 0; border-bottom: 1.5px solid rgba(35, 40, 34, .25);
	padding: 10px 2px;
	color: var(--dark);
	font-family: var(--font-body);
	font-size: 1rem;
	border-radius: 0;
	transition: border-color .2s ease;
}
.upb-comment-form input::placeholder,
.upb-comment-form textarea::placeholder { color: rgba(35, 40, 34, .4); }
.upb-comment-form input:focus,
.upb-comment-form textarea:focus { outline: none; border-color: var(--sage); }
.upb-comment-form textarea { resize: vertical; min-height: 96px; }
.upb-comment-form p.comment-form-cookies-consent {
	flex-direction: row; align-items: flex-start; gap: 8px;
}
.upb-comment-form p.comment-form-cookies-consent label {
	text-transform: none; font-weight: 500; font-size: .85rem; letter-spacing: 0; opacity: .8;
}
.upb-comment-form input#wp-comment-cookies-consent { width: auto; margin-top: 3px; accent-color: var(--sage); }
.upb-comment-form p.form-submit { margin-top: 4px; }
.upb-comment-form input[type="submit"] { align-self: flex-start; cursor: pointer; border: 0; }

/* ---------- Listado del blog (home.php) ---------- */
.upb-single-page .upb-kicker { color: var(--dark); opacity: .6; }
.upb-single-page .upb-archive-hero .upb-display { color: var(--dark); }
.upb-single-page .upb-empty { color: var(--dark); opacity: .6; }
.upb-single-page .upb-card-post { background: #f6f6f4; border-color: rgba(35, 40, 34, .08); }
.upb-single-page .upb-card-post:hover { border-color: var(--sage); }
.upb-single-page .upb-card-post h3 { color: var(--dark); }
.upb-single-page .upb-card-post p { color: var(--dark); opacity: .7; }
.upb-single-page .upb-card-post__meta a { color: var(--dark); opacity: .55; }
.upb-single-page .upb-card-post__meta .upb-tag { border-color: var(--dark); color: var(--dark); }
.upb-single-page .upb-card-post__meta .upb-tag:hover { background: var(--sage); border-color: var(--sage); color: var(--dark); }
.upb-single-page .upb-card-post__more { color: var(--dark); }

/* Proyecto */
.upb-project__hero { position: relative; }
.upb-project__cover { margin: 0; border-radius: 10px; overflow: hidden; }
.upb-project__cover img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }

/* =========================================================================
   REPRODUCTOR DE VIDEO DE MARCA (YouTube / Vimeo)
   Portada con play propio; el iframe se inyecta al hacer clic (main.js).
   Usado en el hero del proyecto (con imagen destacada como portada) y en
   el shortcode [upb_video] para cualquier otro contenido.
   ========================================================================= */
.upb-video {
	position: relative;
	width: 100%;
	aspect-ratio: 16 / 9;
	background: #000;
	border-radius: 10px;
	overflow: hidden;
}
.upb-project__cover .upb-video { border-radius: 0; }
.upb-video__poster {
	position: absolute; inset: 0;
	display: flex; align-items: center; justify-content: center;
	cursor: pointer;
	background: #101410;
	border: 0; padding: 0;
	width: 100%;
}
.upb-video__poster img {
	position: absolute; inset: 0;
	width: 100%; height: 100%;
	object-fit: cover;
	filter: grayscale(.4);
	transition: filter .4s ease, transform .5s ease;
}
.upb-video__poster::after {
	content: '';
	position: absolute; inset: 0;
	background: linear-gradient(180deg, rgba(10,12,10,.08), rgba(10,12,10,.5));
	pointer-events: none;
}
.upb-video:hover .upb-video__poster img { filter: grayscale(0); transform: scale(1.03); }
.upb-video__play {
	position: relative; z-index: 2;
	display: grid; place-items: center;
	width: clamp(60px, 7vw, 88px); height: clamp(60px, 7vw, 88px);
	border-radius: 50%;
	background: var(--neon);
	color: var(--dark);
	border: 0;
	cursor: pointer;
	box-shadow: 0 10px 34px rgba(0,0,0,.4);
	transition: transform .25s ease;
}
.upb-video__play svg { margin-left: 3px; }
.upb-video__poster:hover .upb-video__play { transform: scale(1.08); }
.upb-video__frame { position: absolute; inset: 0; display: none; }
.upb-video__frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.upb-video.is-playing .upb-video__poster { display: none; }
.upb-video.is-playing .upb-video__frame { display: block; }
.upb-video noscript { display: block; position: absolute; inset: 0; }
.upb-video noscript iframe { width: 100%; height: 100%; border: 0; }
.upb-project__title {
	position: relative; margin-top: -0.55em; color: var(--neon);
	font-size: clamp(2.4rem, 7vw, 6rem); text-shadow: 0 4px 30px rgba(27,32,26,.8);
	max-width: 16ch;
}
.upb-project__sheet {
	display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 18px;
	margin: clamp(30px, 4vw, 48px) 0; padding: 24px; background: var(--darker); border-radius: 10px; border: 1px solid rgba(216,228,216,.12);
}
.upb-sheet-item span { display: block; font-size: .72rem; text-transform: uppercase; letter-spacing: .14em; color: var(--sage); margin-bottom: 6px; }
.upb-sheet-item strong { color: #fff; font-weight: 700; }
.upb-sheet-item a { color: var(--neon); }
.upb-project__socials { display: flex; align-items: center; gap: 14px; }
.upb-project__socials a { color: var(--light); display: inline-flex; transition: color .25s ease-in-out, transform .25s ease-in-out; }
.upb-project__socials a:hover { color: var(--neon); transform: translateY(-2px); }
.upb-project__socials svg { display: block; width: 22px; height: 22px; }
.upb-project__intro { margin-bottom: clamp(28px, 4vw, 44px); }
.upb-project__content { max-width: 980px; }

/* Layout de proyecto: contenido + sidebar (buscador + proyectos al azar) */
.upb-project-layout {
	display: grid;
	grid-template-columns: minmax(0, 1fr) 300px;
	gap: clamp(32px, 5vw, 64px);
	align-items: start;
}
.upb-project-layout__sidebar {
	position: sticky;
	top: 110px;
	display: flex;
	flex-direction: column;
	gap: 40px;
}
.upb-sidebar-related__heading {
	font-family: var(--font-display); font-weight: 800; text-transform: uppercase;
	letter-spacing: .06em; color: #fff; font-size: .95rem; margin: 0 0 18px;
}
.upb-sidebar-related__list { display: flex; flex-direction: column; gap: 16px; }
.upb-sidebar-card { display: flex; align-items: center; gap: 12px; }
.upb-sidebar-card__thumb { flex: 0 0 76px; width: 76px; height: 56px; border-radius: 6px; overflow: hidden; }
.upb-sidebar-card__thumb img {
	width: 100%; height: 100%; object-fit: cover; filter: grayscale(1);
	transition: filter .3s ease-in-out, transform .3s ease-in-out;
}
.upb-sidebar-card:hover .upb-sidebar-card__thumb img { filter: grayscale(0); transform: scale(1.06); }
.upb-sidebar-card__title {
	font-family: var(--font-display); font-weight: 700; font-size: .85rem; line-height: 1.3;
	color: var(--light); transition: color .25s ease-in-out;
}
.upb-sidebar-card:hover .upb-sidebar-card__title { color: var(--neon); }

@media (max-width: 900px) {
	.upb-project-layout { grid-template-columns: 1fr; }
	.upb-project-layout__sidebar { position: static; }
}

/* Galería del proyecto: grid editorial (piezas destacadas cada 6) */
.upb-gallery {
	display: grid; grid-template-columns: repeat(4, 1fr); grid-auto-rows: 200px; gap: 14px;
	margin: clamp(40px, 6vw, 72px) 0;
}
.upb-gallery__item {
	position: relative; display: block; width: 100%; height: 100%; padding: 0; border: 0;
	border-radius: 10px; overflow: hidden; background: var(--darker); cursor: zoom-in;
}
.upb-gallery__item:nth-child(6n+1),
.upb-gallery__item:nth-child(6n+4) { grid-column: span 2; grid-row: span 2; }
.upb-gallery__item img {
	width: 100%; height: 100%; object-fit: cover; display: block; filter: grayscale(.25);
	transition: transform .6s ease-in-out, filter .35s ease-in-out;
}
.upb-gallery__item:hover img { transform: scale(1.06); filter: grayscale(0); }
.upb-gallery__item::after {
	content: ''; position: absolute; inset: 0;
	background: linear-gradient(180deg, transparent 45%, rgba(0,0,0,.55) 100%);
	opacity: 0; transition: opacity .35s ease-in-out;
}
.upb-gallery__item:hover::after { opacity: 1; }
.upb-gallery__icon {
	position: absolute; right: 14px; bottom: 14px; width: 40px; height: 40px; border-radius: 50%;
	background: var(--neon); color: var(--dark); display: flex; align-items: center; justify-content: center;
	opacity: 0; transform: translateY(10px) scale(.9);
	transition: opacity .35s ease-in-out, transform .35s ease-in-out;
}
.upb-gallery__item:hover .upb-gallery__icon { opacity: 1; transform: translateY(0) scale(1); }

@media (max-width: 900px) {
	.upb-gallery { grid-template-columns: repeat(2, 1fr); grid-auto-rows: 180px; }
	.upb-gallery__item:nth-child(6n+1),
	.upb-gallery__item:nth-child(6n+4) { grid-row: span 1; }
}
@media (max-width: 560px) {
	.upb-gallery { grid-template-columns: 1fr; grid-auto-rows: 220px; gap: 12px; }
	.upb-gallery__item:nth-child(6n+1),
	.upb-gallery__item:nth-child(6n+4) { grid-column: span 1; }
}

/* Lightbox de la galería */
.upb-lightbox {
	position: fixed; inset: 0; z-index: 1100; display: flex; align-items: center; justify-content: center;
	padding: 40px; opacity: 0; visibility: hidden; transition: opacity .3s ease-in-out, visibility .3s ease-in-out;
}
.upb-lightbox.is-open { opacity: 1; visibility: visible; }
.upb-lightbox__overlay { position: absolute; inset: 0; background: rgba(15,18,14,.92); backdrop-filter: blur(4px); }
.upb-lightbox__figure {
	position: relative; max-width: min(1100px, 92vw); max-height: 82vh; margin: 0;
	display: flex; flex-direction: column; align-items: center; gap: 14px;
	transform: scale(.97); transition: transform .3s ease-in-out;
}
.upb-lightbox.is-open .upb-lightbox__figure { transform: scale(1); }
.upb-lightbox__img {
	max-width: 100%; max-height: 72vh; object-fit: contain; border-radius: 6px; display: block;
	opacity: 0; transition: opacity .3s ease-in-out;
}
.upb-lightbox__img.is-loaded { opacity: 1; }
.upb-lightbox__caption { color: var(--light); font-family: var(--font-body); font-size: .95rem; text-align: center; min-height: 1.4em; }
.upb-lightbox__counter {
	position: absolute; top: -34px; left: 0; color: var(--sage); font-family: var(--font-display);
	font-size: .8rem; letter-spacing: .08em; text-transform: uppercase;
}
.upb-lightbox__close, .upb-lightbox__nav {
	position: absolute; border-radius: 50%; background: transparent; border: 1.5px solid rgba(216,228,216,.3);
	color: var(--light); display: flex; align-items: center; justify-content: center; cursor: pointer;
	transition: border-color .25s ease-in-out, color .25s ease-in-out;
}
.upb-lightbox__close:hover, .upb-lightbox__nav:hover { border-color: var(--neon); color: var(--neon); }
.upb-lightbox__close { top: 24px; right: 24px; width: 44px; height: 44px; font-size: 22px; }
.upb-lightbox__nav { top: 50%; transform: translateY(-50%); width: 52px; height: 52px; }
.upb-lightbox__nav--prev { left: 24px; }
.upb-lightbox__nav--next { right: 24px; }

@media (max-width: 640px) {
	.upb-lightbox { padding: 16px; }
	.upb-lightbox__nav { width: 42px; height: 42px; }
	.upb-lightbox__nav--prev { left: 8px; }
	.upb-lightbox__nav--next { right: 8px; }
	.upb-lightbox__close { top: 12px; right: 12px; }
}

/* Persona */
.upb-person__layout { display: grid; grid-template-columns: minmax(280px, 420px) 1fr; gap: clamp(32px, 5vw, 80px); align-items: start; }
.upb-person__photo { margin: 0; border-radius: 10px; overflow: hidden; aspect-ratio: 600 / 720; }
.upb-person__photo img { width: 100%; height: 100%; object-fit: cover; filter: grayscale(1); transition: filter .4s; }
.upb-person__photo:hover img { filter: grayscale(0); }
.upb-person__info h1 { color: #fff; }
.upb-person__role { font-family: var(--font-display); font-weight: 800; text-transform: uppercase; color: var(--neon); font-size: 1.1rem; margin-bottom: 1.2em; }
.upb-person__bio { margin-top: clamp(36px, 5vw, 60px); }

/* =========================================================================
   404
   ========================================================================= */
.upb-404 { max-width: var(--container); margin: 0 auto; padding: clamp(64px, 10vw, 140px) var(--gutter); text-align: center; }
.upb-404__num { font-size: clamp(6rem, 22vw, 18rem); color: var(--neon); line-height: .9; margin: 0; }
.upb-404__num span { color: transparent; -webkit-text-stroke: 3px var(--neon); }
.upb-404 h2 { color: #fff; margin-top: .4em; }
.upb-404 p { color: var(--sage); font-family: var(--font-quote); font-size: var(--fs-quote); max-width: 50ch; margin: 0 auto 2em; }
.upb-404__actions { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; margin-bottom: 40px; }
.upb-404__search { max-width: 460px; margin: 0 auto; }

/* Buscador */
.upb-search { display: flex; border: 2px solid var(--neon); border-radius: 999px; overflow: hidden; }
.upb-search input { flex: 1; background: transparent; border: 0; color: var(--light); padding: 12px 20px; font-family: var(--font-body); font-size: 1rem; outline: none; }
.upb-search button { background: var(--neon); color: var(--dark); border: 0; padding: 0 22px; font-size: 1.2rem; cursor: pointer; }

/* Paginación */
.pagination { margin-top: clamp(36px, 5vw, 56px); }
.pagination .nav-links { display: flex; gap: 10px; justify-content: center; }
.pagination .page-numbers {
	display: grid; place-items: center; min-width: 44px; height: 44px; border-radius: 50%;
	border: 1.5px solid var(--sage); color: var(--light); font-weight: 700;
}
.pagination .page-numbers.current, .pagination .page-numbers:hover { background: var(--neon); border-color: var(--neon); color: var(--dark); }

/* Reveal on scroll */
.upb-reveal { opacity: 0; transform: translateY(28px); transition: opacity .7s ease, transform .7s ease; }
.upb-reveal.is-visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .upb-reveal { opacity: 1; transform: none; transition: none; } }

/* =========================================================================
   RESPONSIVE
   ========================================================================= */
@media (max-width: 1080px) {
	.upb-services__grid { grid-template-columns: repeat(2, 1fr); }
	.upb-clients__grid { grid-template-columns: repeat(4, 1fr); }
	.upb-closing__grid { grid-template-columns: repeat(2, 1fr); }
	.upb-grid--4 { grid-template-columns: repeat(3, 1fr); }
	.upb-footer__grid { grid-template-columns: 1fr 1fr; }
	.upb-header__cta span { display: none; }
}

@media (max-width: 820px) {
	.upb-burger { display: block; }
	.custom-logo { height: 32px; max-width: 170px; }
	.upb-header__cta { padding: 0 18px; }
	.upb-nav {
		position: fixed; left: 0; right: 0; top: 63px;
		height: calc(100vh - 63px); height: calc(100dvh - 63px);
		background: var(--darker);
		flex-direction: column; justify-content: center; gap: 34px;
		transform: translateX(100%); transition: transform .3s ease;
	}
	.upb-nav.is-open { transform: none; }
	.upb-nav__list { flex-direction: column; align-items: center; gap: 26px; }
	.upb-nav__list a { font-size: 1.3rem; font-family: var(--font-display); font-weight: 800; }

	.upb-person__layout { grid-template-columns: 1fr; }
	.upb-services__grid { grid-template-columns: 1fr; }
	.upb-everything__row { flex-wrap: wrap; }
	.upb-everything__row:last-child { transform: none; }
	.upb-everything__connector { display: none; }
	.upb-everything__card, .upb-everything__intro { width: 100%; }
	.upb-portfolio__head { grid-template-columns: 1fr; align-items: start; }
	.upb-portfolio__connector { display: none; }
	.upb-portfolio__head .upb-quote { width: 100%; margin-left: 0; text-align: left; }
	.upb-archive-hero__head { flex-direction: column; align-items: flex-start; }
	.upb-archive-hero__head .upb-quote { width: 100%; max-width: none; margin-left: 0; text-align: left; }
	.upb-portfolio__grid { grid-template-columns: repeat(2, 1fr); }
	.upb-grid--3, .upb-grid--2 { grid-template-columns: 1fr; }
	.upb-grid--4 { grid-template-columns: repeat(2, 1fr); }
	.upb-team__row { grid-template-columns: 64px 1fr auto; }
	.upb-team__role { display: none; }
	.upb-team__thumb { width: 64px; height: 64px; }
	.upb-hero__copy { padding-bottom: clamp(160px, 40vw, 260px); }
	.upb-hero { height: 720px; }
}

@media (max-width: 560px) {
	.upb-clients__grid { grid-template-columns: repeat(2, 1fr); }
	.upb-closing__grid, .upb-grid--4, .upb-footer__grid { grid-template-columns: 1fr; }
	.upb-everything__circles { flex-direction: column; align-items: center; }
	.upb-circle--overlap { margin-left: 0; margin-top: -50px; }
	.upb-team__more em { display: none; }
}

/* =========================================================================
   CONTACTO
   ========================================================================= */
.upb-contact {
	background: var(--dark);
	display: flex;
	flex-wrap: wrap;
	align-items: stretch;
	min-height: clamp(680px, 88vh, 980px);
}

.upb-contact__col {
	flex: 1 1 480px;
	max-width: 640px;
	display: flex;
	flex-direction: column;
	justify-content: center;
	gap: 30px;
	padding: clamp(64px, 9vw, 120px) clamp(20px, 4vw, 56px) clamp(48px, 6vw, 80px)
		calc(max(0px, (100vw - var(--container)) / 2) + var(--gutter));
}

.upb-contact__title { color: #fff; margin: 0; }
.upb-contact__title.is-typing::after {
	content: '';
	display: inline-block;
	width: .045em; height: .78em;
	background: #fff;
	margin-left: .06em;
	vertical-align: -.05em;
	animation: upb-caret .8s steps(1) infinite;
}

.upb-contact__form { display: flex; flex-direction: column; gap: 22px; }
.upb-contact__row { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }

.upb-field { display: flex; flex-direction: column; gap: 8px; }
.upb-field span {
	font-family: var(--font-display); font-weight: 800; text-transform: uppercase;
	font-size: .74rem; letter-spacing: .1em; color: var(--sage);
}
.upb-field input,
.upb-field select,
.upb-field textarea {
	background: transparent;
	border: 0;
	border-bottom: 1.5px solid rgba(216, 228, 216, .3);
	padding: 10px 2px;
	color: var(--light);
	font-family: var(--font-body);
	font-size: 1rem;
	border-radius: 0;
	transition: border-color .2s ease;
}
.upb-field input::placeholder,
.upb-field textarea::placeholder { color: rgba(216, 228, 216, .4); }
.upb-field input:focus,
.upb-field select:focus,
.upb-field textarea:focus { outline: none; border-color: var(--neon); }
.upb-field textarea { resize: vertical; min-height: 96px; }
.upb-field select {
	appearance: none;
	-webkit-appearance: none;
	background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path d='M6 9l6 6 6-6' fill='none' stroke='%2399ff0c' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/></svg>");
	background-repeat: no-repeat;
	background-position: right 2px center;
	background-size: 16px;
	padding-right: 22px;
}
.upb-field select option { background: var(--dark); color: var(--light); }

.upb-contact__submit { align-self: flex-start; margin-top: 4px; cursor: pointer; border: 0; }

.upb-contact__socials { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.upb-contact__socials a { color: var(--sage); display: inline-flex; transition: color .2s ease, transform .2s ease; }
.upb-contact__socials a:hover { color: var(--neon); transform: translateY(-2px); }
.upb-contact__socials svg { display: block; }

.upb-contact__media {
	flex: 1 1 420px;
	position: relative;
	display: flex;
	align-items: flex-end;
	justify-content: flex-end;
	overflow: hidden;
	opacity: 0;
	transform: translateX(140px);
}
.upb-contact.is-revealed .upb-contact__media {
	animation: upb-contact-media-in 1s ease-out forwards;
	animation-delay: .15s;
}
@keyframes upb-contact-media-in {
	from { opacity: 0; transform: translateX(140px); }
	to { opacity: 1; transform: translateX(0); }
}
.upb-contact__media img {
	height: 100%;
	width: auto;
	max-width: none;
	object-fit: contain;
	object-position: bottom right;
	display: block;
}

@media (max-width: 1080px) {
	.upb-contact__media img { object-position: bottom center; }
}

@media (max-width: 820px) {
	.upb-contact { flex-direction: column; min-height: auto; }
	.upb-contact__col { max-width: none; padding-right: var(--gutter); }
	.upb-contact__media { width: 100%; height: clamp(280px, 60vw, 420px); justify-content: center; }
	.upb-contact__media img { height: 100%; object-position: bottom center; }
}

@media (max-width: 560px) {
	.upb-contact__row { grid-template-columns: 1fr; }
}

.upb-contact__submit[disabled] { opacity: .55; cursor: not-allowed; transform: none; }

/* =========================================================================
   MODAL DE NOTIFICACIONES (formulario de contacto)
   ========================================================================= */
.upb-modal {
	position: fixed;
	inset: 0;
	z-index: 1000;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 20px;
	opacity: 0;
	visibility: hidden;
	transition: opacity .25s ease, visibility .25s ease;
}
.upb-modal.is-open { opacity: 1; visibility: visible; }
.upb-modal__overlay {
	position: absolute;
	inset: 0;
	background: rgba(15, 18, 14, .78);
	backdrop-filter: blur(3px);
}
.upb-modal__box {
	position: relative;
	width: 100%;
	max-width: 420px;
	background: var(--darker);
	border: 1px solid rgba(153, 255, 12, .25);
	border-radius: 14px;
	box-shadow: 0 30px 80px rgba(0, 0, 0, .5);
	padding: 40px 32px 32px;
	text-align: center;
	transform: translateY(16px) scale(.98);
	transition: transform .25s ease;
}
.upb-modal.is-open .upb-modal__box { transform: translateY(0) scale(1); }
.upb-modal__close {
	position: absolute;
	top: 14px; right: 14px;
	width: 32px; height: 32px;
	display: flex; align-items: center; justify-content: center;
	background: transparent; border: 0; cursor: pointer;
	color: var(--sage);
	font-size: 22px; line-height: 1;
	transition: color .2s ease;
}
.upb-modal__close:hover { color: var(--neon); }
.upb-modal__icon {
	width: 56px; height: 56px;
	margin: 0 auto 18px;
	border-radius: 50%;
	display: flex; align-items: center; justify-content: center;
}
.upb-modal__icon svg { width: 26px; height: 26px; display: block; }
.upb-modal.is-success .upb-modal__icon { background: rgba(153, 255, 12, .15); color: var(--neon); }
.upb-modal.is-error .upb-modal__icon { background: rgba(255, 92, 92, .15); color: #ff5c5c; }
.upb-modal__title {
	font-family: var(--font-display); font-weight: 800; text-transform: uppercase;
	letter-spacing: .04em; color: #fff; font-size: 1.15rem; margin: 0 0 10px;
}
.upb-modal__message { color: var(--light); font-size: .95rem; line-height: 1.6; margin: 0 0 26px; }
.upb-modal__ok { border-width: 2px; }
