/* ==========================================================================
   HG Proyectos — estilos
   Hereda los tokens del tema HG Tech si existen y trae valores propios si no.
   Mobile-first · 700px (tablet) · 1024px (escritorio)
   ========================================================================== */

/* -------------------------------------------------------------------------
   1. Tokens
   ------------------------------------------------------------------------- */
.hgp,
.hgp-page,
.editor-styles-wrapper {
	--hgp-bg: var(--bg, #0B1220);
	--hgp-bg-deep: var(--bg-deep, #070C17);
	--hgp-surface: var(--surface, #151F32);
	--hgp-surface-2: var(--surface-2, #1B2740);
	--hgp-accent: var(--accent, #38BDF8);
	--hgp-a2: var(--accent-2, #818CF8);
	--hgp-text: var(--text, #F1F5F9);
	--hgp-soft: var(--text-soft, #CBD5E1);
	--hgp-muted: var(--muted, #94A3B8);
	--hgp-muted-2: var(--muted-2, #64748B);
	--hgp-border: var(--border, rgba(148, 163, 184, 0.12));
	--hgp-border-2: var(--border-strong, rgba(148, 163, 184, 0.24));
	--hgp-sans: var(--font-sans, "DM Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif);
	--hgp-serif: var(--font-serif, Lora, Georgia, serif);
	--hgp-mono: var(--font-mono, "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace);
	--hgp-container: var(--container, 1120px);
	--hgp-gutter: var(--gutter, clamp(1rem, 4vw, 2rem));
	--hgp-header: var(--header-h, 0px);
	--hgp-radius: 20px;
	--hgp-ease: cubic-bezier(0.22, 1, 0.36, 1);
	--hgp-section: clamp(3.5rem, 8vw, 6.5rem);
}

/* El acento puede venir del color de cada proyecto (--hgp-c). */
.hgp,
.hgp-card,
.hgp-project,
.editor-styles-wrapper {
	--hgp-a: var(--hgp-c, var(--hgp-accent));
	--hgp-a-soft: color-mix(in srgb, var(--hgp-a) 14%, transparent);
	--hgp-a-glow: color-mix(in srgb, var(--hgp-a) 38%, transparent);
}

.hgp {
	position: relative;
	color: var(--hgp-text);
	font-family: var(--hgp-sans);
}

.hgp *,
.hgp *::before,
.hgp *::after {
	box-sizing: border-box;
}

.hgp img {
	max-width: 100%;
	height: auto;
	display: block;
}

.hgp-wrap {
	position: relative;
	width: 100%;
	max-width: calc(var(--hgp-container) + var(--hgp-gutter) * 2);
	margin-inline: auto;
	padding-inline: var(--hgp-gutter);
}

.hgp-wrap--narrow {
	max-width: calc(760px + var(--hgp-gutter) * 2);
}

.hgp-icon {
	flex-shrink: 0;
}

.hgp .screen-reader-text {
	position: absolute !important;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
}

/* -------------------------------------------------------------------------
   2. Tipografía y cabeceras
   ------------------------------------------------------------------------- */
.hgp-eyebrow {
	display: inline-flex;
	align-items: center;
	gap: 0.55rem;
	margin: 0 0 1rem;
	color: var(--hgp-a);
	font-family: var(--hgp-mono);
	font-size: 0.75rem;
	font-weight: 500;
	letter-spacing: 0.16em;
	text-transform: uppercase;
}

.hgp-eyebrow::before {
	content: "//";
	opacity: 0.55;
	letter-spacing: 0;
}

.hgp-eyebrow__sep {
	opacity: 0.5;
}

.hgp-heading {
	max-width: 720px;
	margin-bottom: clamp(2rem, 4vw, 3rem);
}

.hgp-heading--center {
	margin-inline: auto;
	text-align: center;
}

.hgp-heading__title,
.hgp-ahero__title,
.hgp-phero__title,
.hgp-card__title,
.hgp .hgp-block h3 {
	font-family: var(--hgp-sans);
	font-weight: 650;
	letter-spacing: -0.03em;
	color: var(--hgp-text);
}

.hgp-heading__title {
	margin: 0 0 0.75rem;
	font-size: clamp(1.9rem, 4.2vw, 2.85rem);
	line-height: 1.08;
}

.hgp-heading__text {
	margin: 0;
	color: var(--hgp-muted);
	font-size: 1.05rem;
	line-height: 1.7;
}

.hgp-grad {
	background: linear-gradient(110deg, var(--hgp-a) 0%, var(--hgp-a2) 55%, var(--hgp-a) 100%);
	background-size: 200% auto;
	-webkit-background-clip: text;
	background-clip: text;
	color: transparent;
	font-family: var(--hgp-serif);
	font-style: italic;
	font-weight: 500;
	letter-spacing: -0.01em;
	padding-right: 0.06em;
	animation: hgp-shift 8s linear infinite;
}

@keyframes hgp-shift {
	to { background-position: 200% center; }
}

/* -------------------------------------------------------------------------
   3. Botones, enlaces, chips
   ------------------------------------------------------------------------- */
.hgp-actions {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.75rem;
}

.hgp-actions--center {
	justify-content: center;
}

.hgp-btn {
	position: relative;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 0.55rem;
	min-height: 46px;
	padding: 0.65rem 1.2rem;
	border: 1px solid transparent;
	border-radius: 12px;
	font-family: var(--hgp-sans);
	font-size: 0.95rem;
	font-weight: 600;
	line-height: 1.2;
	text-decoration: none;
	white-space: nowrap;
	cursor: pointer;
	transition: transform 0.25s var(--hgp-ease), background-color 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease, color 0.25s ease;
}

.hgp-btn--lg {
	min-height: 54px;
	padding: 0.85rem 1.45rem;
	font-size: 1rem;
}

.hgp-btn--primary {
	background: var(--hgp-a);
	color: #04121F;
	box-shadow: 0 10px 30px -12px var(--hgp-a-glow), inset 0 1px 0 rgba(255, 255, 255, 0.35);
}

.hgp-btn--primary:hover {
	color: #04121F;
	transform: translateY(-2px);
	box-shadow: 0 18px 40px -14px var(--hgp-a-glow), inset 0 1px 0 rgba(255, 255, 255, 0.35);
	filter: brightness(1.08);
}

.hgp-btn--ghost {
	background: rgba(21, 31, 50, 0.7);
	border-color: var(--hgp-border-2);
	color: var(--hgp-text);
	-webkit-backdrop-filter: blur(10px);
	backdrop-filter: blur(10px);
}

.hgp-btn--ghost:hover {
	border-color: var(--hgp-a);
	color: var(--hgp-text);
	transform: translateY(-2px);
}

.hgp-btn .hgp-icon--arrow-up-right,
.hgp-btn .hgp-icon--arrow-right {
	transition: transform 0.25s var(--hgp-ease);
}

.hgp-btn:hover .hgp-icon--arrow-up-right {
	transform: translate(2px, -2px);
}

.hgp-btn:hover .hgp-icon--arrow-right {
	transform: translateX(3px);
}

/* Botón de Google Play */
.hgp-play {
	display: inline-flex;
	align-items: center;
	gap: 0.7rem;
	min-height: 54px;
	padding: 0.5rem 1.15rem 0.5rem 0.95rem;
	background: #000;
	border: 1px solid rgba(255, 255, 255, 0.22);
	border-radius: 12px;
	color: #fff;
	text-decoration: none;
	transition: transform 0.25s var(--hgp-ease), border-color 0.25s ease, box-shadow 0.25s ease;
}

.hgp-play:hover {
	color: #fff;
	border-color: rgba(255, 255, 255, 0.5);
	transform: translateY(-2px);
	box-shadow: 0 14px 34px -16px rgba(52, 211, 153, 0.6);
}

.hgp-play__logo {
	width: 22px;
	height: 24px;
}

.hgp-play__text {
	display: flex;
	flex-direction: column;
	line-height: 1.1;
	text-align: left;
}

.hgp-play__text small {
	font-size: 0.625rem;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	opacity: 0.8;
}

.hgp-play__text strong {
	font-size: 1.05rem;
	font-weight: 600;
	letter-spacing: -0.01em;
}

.hgp-link {
	display: inline-flex;
	align-items: center;
	gap: 0.4rem;
	color: var(--hgp-soft);
	font-weight: 500;
	text-decoration: none;
	white-space: nowrap;
}

.hgp-link:hover {
	color: var(--hgp-a);
}

.hgp-link .hgp-icon {
	transition: transform 0.25s var(--hgp-ease);
}

.hgp-link:hover .hgp-icon {
	transform: translateX(4px);
}

.hgp-chips {
	display: flex;
	flex-wrap: wrap;
	gap: 0.45rem;
	margin: 0;
	padding: 0;
	list-style: none;
}

.hgp-chips a,
.hgp-chips span,
.hgp-stack__chips li {
	display: inline-flex;
	padding: 0.28rem 0.7rem;
	background: rgba(148, 163, 184, 0.07);
	border: 1px solid var(--hgp-border);
	border-radius: 999px;
	color: var(--hgp-soft);
	font-family: var(--hgp-mono);
	font-size: 0.75rem;
	text-decoration: none;
	transition: border-color 0.2s ease, color 0.2s ease;
}

.hgp-chips a:hover {
	border-color: var(--hgp-a);
	color: var(--hgp-a);
}

.hgp-iconbox {
	position: relative;
	display: inline-grid;
	place-items: center;
	width: 48px;
	height: 48px;
	border: 1px solid color-mix(in srgb, var(--hgp-a) 35%, transparent);
	border-radius: 14px;
	background: linear-gradient(145deg, var(--hgp-a-soft), rgba(129, 140, 248, 0.08));
	color: var(--hgp-a);
	box-shadow: 0 0 0 6px rgba(56, 189, 248, 0.03), 0 10px 30px -12px var(--hgp-a-glow);
}

.hgp-round {
	display: grid;
	place-items: center;
	width: 44px;
	height: 44px;
	padding: 0;
	background: var(--hgp-surface);
	border: 1px solid var(--hgp-border-2);
	border-radius: 50%;
	color: var(--hgp-text);
	cursor: pointer;
	transition: all 0.25s var(--hgp-ease);
}

.hgp-round:hover {
	background: var(--hgp-a);
	border-color: var(--hgp-a);
	color: #04121F;
}

/* -------------------------------------------------------------------------
   4. Fondos tecnológicos
   ------------------------------------------------------------------------- */
.hgp-bg {
	position: absolute;
	inset: 0;
	z-index: 0;
	overflow: hidden;
	pointer-events: none;
}

.hgp-bg + .hgp-wrap {
	z-index: 1;
}

.hgp-bg__grid {
	position: absolute;
	inset: 0;
	background-image:
		linear-gradient(to right, rgba(148, 163, 184, 0.06) 1px, transparent 1px),
		linear-gradient(to bottom, rgba(148, 163, 184, 0.06) 1px, transparent 1px);
	background-size: 56px 56px;
	-webkit-mask-image: radial-gradient(ellipse 80% 70% at 50% 0%, #000 30%, transparent 75%);
	mask-image: radial-gradient(ellipse 80% 70% at 50% 0%, #000 30%, transparent 75%);
}

.hgp-bg__glow {
	position: absolute;
	top: -20%;
	left: -10%;
	width: 60%;
	height: 80%;
	background: radial-gradient(closest-side, color-mix(in srgb, var(--hgp-a) 26%, transparent), transparent);
	filter: blur(20px);
	animation: hgp-float 18s ease-in-out infinite alternate;
}

.hgp-bg__glow--2 {
	top: 0;
	right: -15%;
	left: auto;
	width: 50%;
	background: radial-gradient(closest-side, rgba(129, 140, 248, 0.18), transparent);
	animation-duration: 22s;
	animation-direction: alternate-reverse;
}

.hgp-bg__scan {
	position: absolute;
	inset-inline: 0;
	top: 0;
	height: 120px;
	background: linear-gradient(180deg, transparent, color-mix(in srgb, var(--hgp-a) 7%, transparent), transparent);
	animation: hgp-scan 7s linear infinite;
}

.hgp-bg__image {
	position: absolute;
	inset: -40px;
	background-size: cover;
	background-position: center;
	filter: blur(60px) saturate(1.4);
	opacity: 0.22;
	-webkit-mask-image: linear-gradient(180deg, #000 30%, transparent 95%);
	mask-image: linear-gradient(180deg, #000 30%, transparent 95%);
}

@keyframes hgp-float {
	to { transform: translate(8%, 10%) scale(1.1); }
}

@keyframes hgp-scan {
	from { transform: translateY(-120px); }
	to { transform: translateY(900px); }
}

/* -------------------------------------------------------------------------
   5. Animaciones de entrada
   ------------------------------------------------------------------------- */
.hgp-js .hgp [data-hgp-reveal] {
	opacity: 0;
	transform: translateY(26px);
	transition: opacity 0.8s var(--hgp-ease), transform 0.8s var(--hgp-ease);
	transition-delay: var(--hgp-d, 0s);
}

.hgp-js .hgp [data-hgp-reveal].is-in {
	opacity: 1;
	transform: none;
}

/* Las tarjetas mantienen su transición de hover tras aparecer. */
.hgp-js .hgp .hgp-card[data-hgp-reveal].is-in {
	transition: opacity 0.8s var(--hgp-ease), transform 0.5s var(--hgp-ease), border-color 0.3s ease, box-shadow 0.5s var(--hgp-ease);
	transition-delay: var(--hgp-d, 0s), 0s, 0s, 0s;
}

/* -------------------------------------------------------------------------
   6. Tarjeta de proyecto
   ------------------------------------------------------------------------- */
[data-hgp-spot] {
	--mx: 50%;
	--my: 50%;
}

.hgp-card {
	position: relative;
	display: flex;
	flex-direction: column;
	min-width: 0;
	overflow: hidden;
	background: linear-gradient(180deg, rgba(23, 34, 55, 0.92), rgba(14, 22, 38, 0.95));
	border: 1px solid var(--hgp-border);
	border-radius: var(--hgp-radius);
	box-shadow: 0 1px 0 rgba(255, 255, 255, 0.04) inset, 0 24px 50px -30px rgba(0, 0, 0, 0.8);
	isolation: isolate;
	transition: transform 0.5s var(--hgp-ease), border-color 0.3s ease, box-shadow 0.5s var(--hgp-ease);
}

/* Brillo que sigue al cursor */
.hgp-card::before {
	content: "";
	position: absolute;
	inset: 0;
	z-index: 2;
	border-radius: inherit;
	background: radial-gradient(380px circle at var(--mx) var(--my), color-mix(in srgb, var(--hgp-a) 12%, transparent), transparent 45%);
	opacity: 0;
	transition: opacity 0.4s ease;
	pointer-events: none;
}

/* Borde degradado al pasar el ratón */
.hgp-card::after {
	content: "";
	position: absolute;
	inset: 0;
	z-index: 3;
	padding: 1px;
	border-radius: inherit;
	background: linear-gradient(140deg, var(--hgp-a), transparent 35%, transparent 65%, var(--hgp-a2));
	-webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
	-webkit-mask-composite: xor;
	mask-composite: exclude;
	opacity: 0;
	transition: opacity 0.4s ease;
	pointer-events: none;
}

.hgp-card:hover {
	transform: translateY(-6px);
	border-color: transparent;
	box-shadow: 0 1px 0 rgba(255, 255, 255, 0.04) inset, 0 40px 70px -35px rgba(0, 0, 0, 0.9), 0 0 50px -20px var(--hgp-a-glow);
}

.hgp-card:hover::before,
.hgp-card:hover::after,
.hgp-card:focus-within::after {
	opacity: 1;
}

.hgp-card__media {
	position: relative;
	aspect-ratio: 16 / 10;
	overflow: hidden;
	background:
		radial-gradient(circle at 30% 20%, var(--hgp-a-soft), transparent 60%),
		var(--hgp-surface-2);
}

.hgp-card__img,
.hgp-card__media img {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	transform: scale(1.01);
	transition: transform 1s var(--hgp-ease), filter 0.6s ease;
	filter: saturate(0.92);
}

.hgp-card:hover .hgp-card__media img {
	transform: scale(1.07);
	filter: saturate(1.08);
}

.hgp-card__placeholder {
	position: absolute;
	inset: 0;
	display: grid;
	place-items: center;
	color: color-mix(in srgb, var(--hgp-a) 60%, transparent);
	background-image:
		linear-gradient(to right, rgba(148, 163, 184, 0.07) 1px, transparent 1px),
		linear-gradient(to bottom, rgba(148, 163, 184, 0.07) 1px, transparent 1px);
	background-size: 24px 24px;
}

.hgp-card__shade {
	position: absolute;
	inset: 0;
	background: linear-gradient(180deg, rgba(7, 12, 23, 0.35) 0%, transparent 30%, transparent 60%, rgba(11, 18, 32, 0.75) 100%);
}

.hgp-card__index {
	position: absolute;
	top: 0.85rem;
	left: 0.85rem;
	padding: 0.2rem 0.55rem;
	background: rgba(7, 12, 23, 0.6);
	border: 1px solid rgba(255, 255, 255, 0.1);
	border-radius: 8px;
	color: var(--hgp-soft);
	font-family: var(--hgp-mono);
	font-size: 0.7rem;
	letter-spacing: 0.08em;
	-webkit-backdrop-filter: blur(8px);
	backdrop-filter: blur(8px);
}

.hgp-card__badges {
	position: absolute;
	top: 0.85rem;
	right: 0.85rem;
	display: flex;
	gap: 0.35rem;
}

.hgp-card__badge {
	display: grid;
	place-items: center;
	width: 28px;
	height: 28px;
	background: rgba(7, 12, 23, 0.6);
	border: 1px solid rgba(255, 255, 255, 0.1);
	border-radius: 8px;
	color: var(--hgp-a);
	-webkit-backdrop-filter: blur(8px);
	backdrop-filter: blur(8px);
}

.hgp-card__body {
	position: relative;
	z-index: 1;
	display: flex;
	flex: 1;
	flex-direction: column;
	padding: 1.25rem 1.35rem 1.35rem;
}

.hgp-card__meta {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.6rem;
	margin: 0 0 0.55rem;
	font-family: var(--hgp-mono);
	font-size: 0.7rem;
	letter-spacing: 0.1em;
	text-transform: uppercase;
}

.hgp-card__cat {
	color: var(--hgp-a);
}

.hgp-card__year {
	color: var(--hgp-muted-2);
}

.hgp-card__cat + .hgp-card__year::before {
	content: "·";
	margin-right: 0.6rem;
}

.hgp-card__title {
	margin: 0 0 0.5rem;
	font-size: 1.25rem;
	line-height: 1.25;
}

.hgp-card__link {
	color: var(--hgp-text);
	text-decoration: none;
}

.hgp-card__link:hover {
	color: var(--hgp-text);
}

/* Toda la tarjeta es clicable */
.hgp-card__link::after {
	content: "";
	position: absolute;
	inset: 0;
	z-index: 4;
}

.hgp-card__link:focus-visible {
	outline: none;
}

.hgp-card__text {
	display: -webkit-box;
	flex: 1;
	margin: 0 0 1rem;
	overflow: hidden;
	color: var(--hgp-muted);
	font-size: 0.93rem;
	line-height: 1.6;
	-webkit-line-clamp: 3;
	-webkit-box-orient: vertical;
}

.hgp-card__foot {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
	margin-top: auto;
	padding-top: 0.9rem;
	border-top: 1px dashed var(--hgp-border-2);
}

.hgp-card__tech {
	display: flex;
	flex-wrap: wrap;
	gap: 0.3rem 0.75rem;
	min-width: 0;
	margin: 0;
	padding: 0;
	list-style: none;
	color: var(--hgp-muted);
	font-family: var(--hgp-mono);
	font-size: 0.72rem;
}

.hgp-card__tech li::before {
	content: "#";
	margin-right: 1px;
	color: var(--hgp-a);
	opacity: 0.7;
}

.hgp-card__go {
	display: grid;
	place-items: center;
	flex-shrink: 0;
	width: 36px;
	height: 36px;
	margin-left: auto;
	border: 1px solid var(--hgp-border-2);
	border-radius: 50%;
	color: var(--hgp-soft);
	transition: all 0.4s var(--hgp-ease);
}

.hgp-card:hover .hgp-card__go {
	background: var(--hgp-a);
	border-color: var(--hgp-a);
	color: #04121F;
	transform: rotate(45deg);
	box-shadow: 0 0 24px -4px var(--hgp-a-glow);
}

/* Tarjeta grande */
.hgp-card--large .hgp-card__title {
	font-size: clamp(1.4rem, 2.6vw, 1.9rem);
}

.hgp-card--large .hgp-card__text {
	font-size: 1rem;
	-webkit-line-clamp: 4;
}

.hgp-card.is-featured .hgp-card__index::after {
	content: " ★";
	color: #FBBF24;
}

/* -------------------------------------------------------------------------
   7. Sección "Últimos proyectos"
   ------------------------------------------------------------------------- */
.hgp-latest {
	padding-block: var(--hgp-section);
	overflow: hidden;
}

.hgp-latest .hgp-bg__grid {
	-webkit-mask-image: radial-gradient(ellipse 60% 50% at 80% 10%, #000 20%, transparent 70%);
	mask-image: radial-gradient(ellipse 60% 50% at 80% 10%, #000 20%, transparent 70%);
}

.hgp-latest .hgp-bg__glow {
	top: 10%;
	right: -20%;
	left: auto;
	opacity: 0.6;
}

.hgp-latest__grid {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	gap: 1.25rem;
}

@media (min-width: 700px) {
	.hgp-latest__grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	/* Tablet: la tarjeta grande y la última "huérfana" ocupan toda la fila. */
	.hgp-latest--bento .hgp-card--large,
	.hgp-latest--n1 .hgp-card,
	.hgp-latest--grid .hgp-card:last-child:nth-child(odd),
	.hgp-latest--bento .hgp-card:last-child:nth-child(even) {
		grid-column: 1 / -1;
	}
}

@media (min-width: 1024px) {
	.hgp-latest__grid {
		gap: 1.5rem;
	}

	/* Rejilla uniforme */
	.hgp-latest--grid .hgp-latest__grid {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}

	.hgp-latest--grid.hgp-latest--n4 .hgp-latest__grid,
	.hgp-latest--grid.hgp-latest--n8 .hgp-latest__grid {
		grid-template-columns: repeat(4, minmax(0, 1fr));
	}

	.hgp-latest--grid .hgp-card:last-child:nth-child(odd),
	.hgp-latest--bento .hgp-card:last-child:nth-child(even) {
		grid-column: auto;
	}

	/* Bento: tarjeta grande + tarjetas compactas */
	.hgp-latest--bento .hgp-latest__grid {
		grid-template-columns: repeat(4, minmax(0, 1fr));
		grid-auto-flow: dense;
	}

	.hgp-latest--bento.hgp-latest--n3 .hgp-latest__grid,
	.hgp-latest--bento.hgp-latest--n6 .hgp-latest__grid {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}

	.hgp-latest--bento.hgp-latest--n2 .hgp-latest__grid {
		grid-template-columns: 1.4fr 1fr;
	}

	.hgp-latest--bento .hgp-card--large {
		grid-column: span 2;
		grid-row: span 2;
	}

	.hgp-latest--bento.hgp-latest--n2 .hgp-card--large {
		grid-column: auto;
		grid-row: auto;
	}

	.hgp-latest--bento.hgp-latest--n1 .hgp-card--large {
		grid-column: 1 / -1;
	}

	.hgp-latest--bento .hgp-card--large .hgp-card__media {
		flex: 1;
		aspect-ratio: auto;
		min-height: 300px;
	}

	.hgp-latest--bento .hgp-card--normal .hgp-card__media {
		aspect-ratio: 16 / 8.5;
	}

	.hgp-latest--bento .hgp-card--normal .hgp-card__text {
		-webkit-line-clamp: 2;
	}

	/* Con 4 proyectos la última tarjeta es horizontal y ocupa dos columnas. */
	.hgp-latest--bento.hgp-latest--n4 .hgp-card:nth-child(4) {
		grid-column: span 2;
		flex-direction: row;
	}

	.hgp-latest--bento.hgp-latest--n4 .hgp-card:nth-child(4) .hgp-card__media {
		flex: 0 0 46%;
		aspect-ratio: auto;
	}
}

.hgp-latest__more {
	display: flex;
	align-items: center;
	gap: 1.5rem;
	margin-top: clamp(2rem, 5vw, 3.5rem);
}

.hgp-latest__more::before,
.hgp-latest__more::after {
	content: "";
	flex: 1;
	height: 1px;
	background: linear-gradient(90deg, transparent, var(--hgp-border-2));
}

.hgp-latest__more::after {
	background: linear-gradient(270deg, transparent, var(--hgp-border-2));
}

/* Botón "Ver más" con borde animado */
.hgp-more {
	position: relative;
	display: inline-flex;
	align-items: center;
	gap: 0.9rem;
	padding: 0.55rem 0.55rem 0.55rem 1.5rem;
	overflow: hidden;
	border-radius: 999px;
	color: var(--hgp-text);
	font-weight: 600;
	text-decoration: none;
	white-space: nowrap;
	isolation: isolate;
	box-shadow: 0 20px 50px -25px var(--hgp-a-glow);
	transition: transform 0.35s var(--hgp-ease), box-shadow 0.35s ease;
}

.hgp-more::before {
	content: "";
	position: absolute;
	top: 50%;
	left: 50%;
	z-index: -2;
	width: 200%;
	aspect-ratio: 1;
	background: conic-gradient(from 0deg, transparent 0 62%, var(--hgp-a) 80%, var(--hgp-a2) 92%, transparent 100%);
	transform: translate(-50%, -50%);
	animation: hgp-spin 4.5s linear infinite;
}

.hgp-more::after {
	content: "";
	position: absolute;
	inset: 1px;
	z-index: -1;
	border-radius: inherit;
	background: linear-gradient(180deg, #172338, #0E1626);
}

.hgp-more:hover {
	color: var(--hgp-text);
	transform: translateY(-2px);
	box-shadow: 0 26px 60px -22px var(--hgp-a-glow);
}

.hgp-more__count {
	color: var(--hgp-muted);
	font-family: var(--hgp-mono);
	font-size: 0.75rem;
	font-weight: 400;
}

.hgp-more__icon {
	display: grid;
	place-items: center;
	width: 40px;
	height: 40px;
	border-radius: 50%;
	background: var(--hgp-a);
	color: #04121F;
	transition: transform 0.35s var(--hgp-ease);
}

.hgp-more:hover .hgp-more__icon {
	transform: translateX(3px) rotate(-45deg);
}

@keyframes hgp-spin {
	to { transform: translate(-50%, -50%) rotate(360deg); }
}

@media (max-width: 520px) {
	.hgp-latest__more::before,
	.hgp-latest__more::after {
		display: none;
	}

	.hgp-latest__more {
		justify-content: center;
	}

	.hgp-more__count {
		display: none;
	}
}

/* -------------------------------------------------------------------------
   8. Página de proyectos (archivo)
   ------------------------------------------------------------------------- */
.hgp-ahero,
.hgp-phero {
	position: relative;
	isolation: isolate;
	overflow: hidden;
	margin-top: calc(var(--hgp-header) * -1);
	padding: calc(var(--hgp-header) + clamp(3rem, 9vw, 6.5rem)) 0 clamp(2.5rem, 6vw, 4rem);
}

.hgp-ahero__title {
	max-width: 16ch;
	margin: 0 0 1.25rem;
	font-size: clamp(2.6rem, 7.5vw, 5.2rem);
	line-height: 1.02;
	letter-spacing: -0.045em;
}

.hgp-ahero__text {
	max-width: 58ch;
	margin: 0;
	color: var(--hgp-muted);
	font-size: clamp(1.05rem, 1.8vw, 1.2rem);
	line-height: 1.7;
}

.hgp-ahero__stats {
	display: flex;
	flex-wrap: wrap;
	gap: 0;
	margin: clamp(2rem, 4vw, 2.75rem) 0 0;
	padding: 0;
}

.hgp-ahero__stats > div {
	padding: 0.25rem clamp(1.25rem, 3vw, 2.25rem);
	border-left: 1px solid var(--hgp-border-2);
}

.hgp-ahero__stats > div:first-child {
	padding-left: 0;
	border-left: 0;
}

.hgp-ahero__stats dt {
	font-size: clamp(1.8rem, 3.5vw, 2.4rem);
	font-weight: 650;
	letter-spacing: -0.03em;
	line-height: 1.1;
}

.hgp-ahero__stats dd {
	margin: 0.2rem 0 0;
	color: var(--hgp-muted);
	font-family: var(--hgp-mono);
	font-size: 0.72rem;
	letter-spacing: 0.12em;
	text-transform: uppercase;
}

.hgp-archive__body {
	padding-bottom: var(--hgp-section);
}

/* Barra de filtros */
.hgp-toolbar {
	position: sticky;
	top: calc(var(--hgp-header) + 0.75rem);
	z-index: 20;
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 0.75rem 1rem;
	margin-bottom: 1rem;
	padding: 0.5rem;
	background: rgba(11, 18, 32, 0.72);
	border: 1px solid var(--hgp-border);
	border-radius: 18px;
	-webkit-backdrop-filter: blur(16px) saturate(150%);
	backdrop-filter: blur(16px) saturate(150%);
	box-shadow: 0 20px 40px -30px rgba(0, 0, 0, 0.9);
}

.hgp-filters {
	display: flex;
	gap: 0.35rem;
	min-width: 0;
	max-width: 100%;
	overflow-x: auto;
	scrollbar-width: none;
	-webkit-overflow-scrolling: touch;
}

.hgp-filters::-webkit-scrollbar {
	display: none;
}

.hgp-filter {
	position: relative;
	display: inline-flex;
	align-items: center;
	gap: 0.35rem;
	min-height: 40px;
	padding: 0.4rem 0.95rem;
	border: 1px solid transparent;
	border-radius: 12px;
	color: var(--hgp-muted);
	font-size: 0.9rem;
	font-weight: 500;
	text-decoration: none;
	white-space: nowrap;
	transition: color 0.25s ease, background-color 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.hgp-filter sup {
	top: 0;
	color: var(--hgp-muted-2);
	font-family: var(--hgp-mono);
	font-size: 0.66rem;
	line-height: 1;
	vertical-align: super;
}

.hgp-filter:hover {
	color: var(--hgp-text);
	background: rgba(148, 163, 184, 0.06);
}

.hgp-filter.is-active {
	background: var(--hgp-a-soft);
	border-color: color-mix(in srgb, var(--hgp-a) 45%, transparent);
	color: var(--hgp-a);
	box-shadow: 0 0 24px -10px var(--hgp-a-glow), inset 0 0 12px -6px var(--hgp-a-glow);
}

.hgp-filter.is-active sup {
	color: inherit;
}

.hgp-search {
	position: relative;
	display: flex;
	align-items: center;
	flex: 1 1 220px;
	max-width: 320px;
	margin-left: auto;
}

.hgp-search .hgp-icon {
	position: absolute;
	left: 0.9rem;
	color: var(--hgp-muted);
	pointer-events: none;
}

.hgp-search input {
	width: 100%;
	min-height: 40px;
	padding: 0.5rem 2.5rem 0.5rem 2.45rem;
	background: rgba(7, 12, 23, 0.6);
	border: 1px solid var(--hgp-border);
	border-radius: 12px;
	color: var(--hgp-text);
	font: inherit;
	font-size: 0.9rem;
	transition: border-color 0.2s ease, box-shadow 0.2s ease;
	-webkit-appearance: none;
	appearance: none;
}

.hgp-search input::placeholder {
	color: var(--hgp-muted-2);
}

.hgp-search input:focus {
	outline: none;
	border-color: var(--hgp-a);
	box-shadow: 0 0 0 3px var(--hgp-a-soft);
}

.hgp-search kbd {
	position: absolute;
	right: 0.6rem;
	padding: 0.05rem 0.45rem;
	border: 1px solid var(--hgp-border-2);
	border-radius: 6px;
	color: var(--hgp-muted);
	font-family: var(--hgp-mono);
	font-size: 0.7rem;
	pointer-events: none;
}

.hgp-search input:focus + kbd,
.hgp-search input:not(:placeholder-shown) + kbd {
	opacity: 0;
}

@media (max-width: 699px) {
	.hgp-toolbar {
		position: relative;
		top: auto;
	}

	.hgp-search {
		max-width: none;
		margin-left: 0;
	}

	.hgp-search kbd {
		display: none;
	}
}

.hgp-results {
	display: flex;
	align-items: center;
	gap: 0.45rem;
	margin: 0 0 1.5rem 0.25rem;
	color: var(--hgp-muted);
	font-family: var(--hgp-mono);
	font-size: 0.78rem;
}

.hgp-results [data-hgp-results] {
	color: var(--hgp-text);
}

.hgp-results__prompt {
	color: var(--hgp-a);
}

.hgp-results__cursor,
.hgp-terminal__caret {
	display: inline-block;
	width: 0.55em;
	height: 1.1em;
	background: var(--hgp-a);
	vertical-align: text-bottom;
	animation: hgp-blink 1.1s steps(1) infinite;
}

@keyframes hgp-blink {
	50% { opacity: 0; }
}

.hgp-portfolio__grid,
.hgp-related__grid {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	grid-auto-flow: dense;
	gap: 1.25rem;
}

@media (min-width: 700px) {
	.hgp-portfolio__grid,
	.hgp-related__grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.hgp-portfolio__grid .hgp-card--large {
		grid-column: span 2;
	}
}

@media (min-width: 1024px) {
	.hgp-portfolio__grid,
	.hgp-related__grid {
		grid-template-columns: repeat(3, minmax(0, 1fr));
		gap: 1.5rem;
	}

	.hgp-portfolio__grid .hgp-card--large {
		flex-direction: row;
	}

	.hgp-portfolio__grid .hgp-card--large .hgp-card__media {
		flex: 0 0 58%;
		aspect-ratio: auto;
		min-height: 340px;
	}

	.hgp-portfolio__grid .hgp-card--large .hgp-card__body {
		justify-content: center;
		padding: 2rem;
	}
}

.hgp-card.is-filtered-out {
	display: none;
}

.hgp-card.is-entering {
	animation: hgp-enter 0.55s var(--hgp-ease) both;
}

@keyframes hgp-enter {
	from {
		opacity: 0;
		transform: translateY(16px) scale(0.97);
	}
}

.hgp-empty {
	display: none;
	flex-direction: column;
	align-items: center;
	gap: 0.75rem;
	padding: 4rem 1rem;
	border: 1px dashed var(--hgp-border-2);
	border-radius: var(--hgp-radius);
	color: var(--hgp-muted);
	text-align: center;
}

.hgp-empty.is-visible,
.hgp-empty:not([hidden]) {
	display: flex;
}

.hgp-empty p {
	margin: 0;
}

/* -------------------------------------------------------------------------
   9. Página de proyecto: cabecera
   ------------------------------------------------------------------------- */
.hgp-crumbs {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.6rem;
	margin-bottom: clamp(1.5rem, 4vw, 2.5rem);
	color: var(--hgp-muted-2);
	font-family: var(--hgp-mono);
	font-size: 0.78rem;
}

.hgp-crumbs a {
	display: inline-flex;
	align-items: center;
	gap: 0.4rem;
	color: var(--hgp-muted);
	text-decoration: none;
}

.hgp-crumbs a:hover {
	color: var(--hgp-a);
}

.hgp-phero__grid {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	gap: clamp(2.5rem, 6vw, 4rem);
	align-items: center;
}

@media (min-width: 1000px) {
	.hgp-phero__grid {
		grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
	}
}

.hgp-phero__tags {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.75rem;
	margin: 0 0 1.25rem;
}

.hgp-phero__year {
	color: var(--hgp-muted);
	font-family: var(--hgp-mono);
	font-size: 0.8rem;
}

.hgp-status {
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
	padding: 0.3rem 0.75rem;
	background: rgba(52, 211, 153, 0.1);
	border: 1px solid rgba(52, 211, 153, 0.35);
	border-radius: 999px;
	color: #6EE7B7;
	font-family: var(--hgp-mono);
	font-size: 0.72rem;
	letter-spacing: 0.06em;
	text-transform: uppercase;
}

.hgp-status__dot {
	position: relative;
	width: 7px;
	height: 7px;
	border-radius: 50%;
	background: currentColor;
	box-shadow: 0 0 10px currentColor;
}

.hgp-status__dot::after {
	content: "";
	position: absolute;
	inset: -4px;
	border: 1px solid currentColor;
	border-radius: 50%;
	animation: hgp-ping 1.8s var(--hgp-ease) infinite;
}

@keyframes hgp-ping {
	from { transform: scale(0.6); opacity: 1; }
	to { transform: scale(1.8); opacity: 0; }
}

.hgp-status--beta {
	background: rgba(251, 191, 36, 0.1);
	border-color: rgba(251, 191, 36, 0.35);
	color: #FCD34D;
}

.hgp-status--dev {
	background: var(--hgp-a-soft);
	border-color: color-mix(in srgb, var(--hgp-a) 40%, transparent);
	color: var(--hgp-a);
}

.hgp-status--archived {
	background: rgba(148, 163, 184, 0.08);
	border-color: var(--hgp-border-2);
	color: var(--hgp-muted);
}

.hgp-status--archived .hgp-status__dot::after {
	display: none;
}

.hgp-phero__title {
	margin: 0 0 1.25rem;
	font-size: clamp(2.5rem, 6.5vw, 4.6rem);
	line-height: 1.02;
	letter-spacing: -0.045em;
	text-wrap: balance;
}

.hgp-phero__lead {
	max-width: 54ch;
	margin: 0 0 2rem;
	color: var(--hgp-soft);
	font-size: clamp(1.08rem, 1.9vw, 1.25rem);
	line-height: 1.65;
}

.hgp-phero__facts {
	display: flex;
	flex-wrap: wrap;
	gap: 1.25rem 2.25rem;
	margin: 2.25rem 0 0;
	padding: 1.25rem 0 0;
	border-top: 1px dashed var(--hgp-border-2);
}

.hgp-phero__facts dt {
	display: flex;
	align-items: center;
	gap: 0.4rem;
	margin-bottom: 0.25rem;
	color: var(--hgp-muted-2);
	font-family: var(--hgp-mono);
	font-size: 0.7rem;
	letter-spacing: 0.12em;
	text-transform: uppercase;
}

.hgp-phero__facts dd {
	margin: 0;
	color: var(--hgp-text);
	font-weight: 500;
}

.hgp-phero__media {
	position: relative;
	transition: transform 0.4s var(--hgp-ease);
	transform-style: preserve-3d;
}

.hgp-phero__media > a {
	display: block;
	position: relative;
	z-index: 1;
}

.hgp-phero__halo {
	position: absolute;
	inset: 8% 6% -6%;
	z-index: 0;
	border-radius: 30px;
	background: linear-gradient(135deg, var(--hgp-a), var(--hgp-a2));
	filter: blur(60px);
	opacity: 0.35;
}

.hgp-phero__art .hgp-frame__screen {
	display: grid;
	place-items: center;
	aspect-ratio: 16 / 10;
	background:
		radial-gradient(circle at 50% 40%, var(--hgp-a-soft), transparent 60%),
		linear-gradient(to right, rgba(148, 163, 184, 0.07) 1px, transparent 1px) 0 0 / 28px 28px,
		linear-gradient(to bottom, rgba(148, 163, 184, 0.07) 1px, transparent 1px) 0 0 / 28px 28px,
		var(--hgp-bg-deep);
}

.hgp-phero__art-icon {
	color: var(--hgp-a);
	filter: drop-shadow(0 0 24px var(--hgp-a-glow));
}

/* Marcos: navegador y móvil */
.hgp-frame {
	position: relative;
	overflow: hidden;
}

.hgp-frame--none {
	border-radius: var(--hgp-radius);
	border: 1px solid var(--hgp-border);
}

.hgp-frame--browser {
	background: #0E1626;
	border: 1px solid var(--hgp-border-2);
	border-radius: 16px;
	box-shadow: 0 1px 0 rgba(255, 255, 255, 0.06) inset, 0 40px 80px -40px rgba(0, 0, 0, 0.9);
}

.hgp-frame__bar {
	display: flex;
	align-items: center;
	gap: 6px;
	height: 36px;
	padding: 0 14px;
	background: linear-gradient(180deg, #19243A, #131C2E);
	border-bottom: 1px solid var(--hgp-border);
}

.hgp-frame__bar i,
.hgp-terminal__bar i,
.hgp-code__dots i {
	width: 10px;
	height: 10px;
	border-radius: 50%;
	background: #F87171;
	opacity: 0.85;
}

.hgp-frame__bar i:nth-child(2),
.hgp-terminal__bar i:nth-child(2),
.hgp-code__dots i:nth-child(2) {
	background: #FBBF24;
}

.hgp-frame__bar i:nth-child(3),
.hgp-terminal__bar i:nth-child(3),
.hgp-code__dots i:nth-child(3) {
	background: #34D399;
}

.hgp-frame__bar span {
	display: inline-flex;
	align-items: center;
	gap: 0.35rem;
	max-width: 60%;
	margin: 0 auto;
	padding: 0.15rem 0.85rem;
	overflow: hidden;
	background: rgba(7, 12, 23, 0.6);
	border-radius: 7px;
	color: var(--hgp-muted);
	font-family: var(--hgp-mono);
	font-size: 0.68rem;
	white-space: nowrap;
	text-overflow: ellipsis;
	transform: translateX(-18px);
}

.hgp-frame__screen img,
.hgp-frame--none img {
	width: 100%;
	height: auto;
	display: block;
}

.hgp-frame--phone {
	width: 100%;
	max-width: 290px;
	margin-inline: auto;
	padding: 10px;
	background: linear-gradient(145deg, #243149, #0B111D);
	border: 1px solid rgba(255, 255, 255, 0.12);
	border-radius: 44px;
	box-shadow: 0 0 0 2px #05080F inset, 0 50px 90px -40px rgba(0, 0, 0, 0.95), 0 0 60px -30px var(--hgp-a-glow);
}

.hgp-frame--phone .hgp-frame__screen {
	position: relative;
	overflow: hidden;
	aspect-ratio: 9 / 19.5;
	border-radius: 34px;
	background: #000;
}

.hgp-frame--phone .hgp-frame__screen img,
.hgp-frame--phone .hgp-frame__screen .hgp-video img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.hgp-frame__notch {
	position: absolute;
	top: 20px;
	left: 50%;
	z-index: 2;
	width: 90px;
	height: 24px;
	border-radius: 999px;
	background: #000;
	transform: translateX(-50%);
}

/* -------------------------------------------------------------------------
   10. Visor multimedia (foto principal + fotos + vídeos)
   ------------------------------------------------------------------------- */
.hgp-viewer-section {
	padding-block: clamp(2rem, 5vw, 3.5rem);
}

.hgp-viewer__stage {
	position: relative;
	aspect-ratio: 16 / 9;
	overflow: hidden;
	background: var(--hgp-bg-deep);
	border: 1px solid var(--hgp-border-2);
	border-radius: 22px;
	box-shadow: 0 40px 80px -45px rgba(0, 0, 0, 0.9);
	touch-action: pan-y;
}

.hgp-viewer__slide {
	position: absolute;
	inset: 0;
	margin: 0;
	opacity: 0;
	visibility: hidden;
	transform: scale(1.03);
	transition: opacity 0.6s var(--hgp-ease), transform 0.8s var(--hgp-ease), visibility 0.6s;
}

.hgp-viewer__slide.is-active {
	opacity: 1;
	visibility: visible;
	transform: none;
}

.hgp-viewer__slide > a,
.hgp-viewer__slide > .hgp-video {
	display: block;
	width: 100%;
	height: 100%;
}

.hgp-viewer__slide img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.hgp-viewer__slide figcaption {
	position: absolute;
	left: 1rem;
	bottom: 1rem;
	max-width: calc(100% - 9rem);
	padding: 0.4rem 0.8rem;
	background: rgba(7, 12, 23, 0.7);
	border-radius: 10px;
	color: var(--hgp-soft);
	font-size: 0.85rem;
	-webkit-backdrop-filter: blur(8px);
	backdrop-filter: blur(8px);
	pointer-events: none;
}

.hgp-viewer__zoom,
.hgp-gallery__zoom {
	position: absolute;
	top: 1rem;
	right: 1rem;
	display: grid;
	place-items: center;
	width: 40px;
	height: 40px;
	background: rgba(7, 12, 23, 0.65);
	border: 1px solid rgba(255, 255, 255, 0.12);
	border-radius: 12px;
	color: #fff;
	opacity: 0;
	transform: scale(0.85);
	transition: all 0.3s var(--hgp-ease);
	-webkit-backdrop-filter: blur(8px);
	backdrop-filter: blur(8px);
}

.hgp-viewer__slide a:hover .hgp-viewer__zoom,
.hgp-gallery__item a:hover .hgp-gallery__zoom {
	opacity: 1;
	transform: none;
}

.hgp-viewer__nav {
	position: absolute;
	top: 50%;
	z-index: 3;
	display: grid;
	place-items: center;
	width: 48px;
	height: 48px;
	padding: 0;
	background: rgba(7, 12, 23, 0.6);
	border: 1px solid rgba(255, 255, 255, 0.14);
	border-radius: 50%;
	color: #fff;
	cursor: pointer;
	transform: translateY(-50%);
	transition: background-color 0.25s ease, border-color 0.25s ease, transform 0.25s var(--hgp-ease);
	-webkit-backdrop-filter: blur(10px);
	backdrop-filter: blur(10px);
}

.hgp-viewer__nav:hover {
	background: var(--hgp-a);
	border-color: var(--hgp-a);
	color: #04121F;
}

.hgp-viewer__nav--prev {
	left: 1rem;
}

.hgp-viewer__nav--next {
	right: 1rem;
}

.hgp-viewer__counter {
	position: absolute;
	right: 1rem;
	bottom: 1rem;
	z-index: 3;
	padding: 0.3rem 0.7rem;
	background: rgba(7, 12, 23, 0.7);
	border: 1px solid rgba(255, 255, 255, 0.1);
	border-radius: 999px;
	color: var(--hgp-soft);
	font-family: var(--hgp-mono);
	font-size: 0.75rem;
	-webkit-backdrop-filter: blur(8px);
	backdrop-filter: blur(8px);
}

.hgp-viewer__thumbs {
	display: flex;
	gap: 0.6rem;
	margin-top: 0.85rem;
	padding: 0.25rem 0.1rem 0.5rem;
	overflow-x: auto;
	scrollbar-width: thin;
	scrollbar-color: var(--hgp-border-2) transparent;
}

.hgp-viewer__thumb {
	position: relative;
	flex: 0 0 auto;
	width: 104px;
	aspect-ratio: 16 / 10;
	padding: 0;
	overflow: hidden;
	background: var(--hgp-surface-2);
	border: 1px solid var(--hgp-border);
	border-radius: 12px;
	cursor: pointer;
	opacity: 0.55;
	transition: opacity 0.25s ease, border-color 0.25s ease, transform 0.25s var(--hgp-ease);
}

.hgp-viewer__thumb img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.hgp-viewer__thumb:hover {
	opacity: 0.9;
}

.hgp-viewer__thumb.is-active {
	opacity: 1;
	border-color: var(--hgp-a);
	box-shadow: 0 0 0 1px var(--hgp-a), 0 0 20px -6px var(--hgp-a-glow);
}

.hgp-viewer__thumb-play {
	position: absolute;
	inset: 0;
	display: grid;
	place-items: center;
	background: rgba(7, 12, 23, 0.45);
	color: #fff;
}

@media (max-width: 699px) {
	.hgp-viewer__nav {
		width: 38px;
		height: 38px;
	}

	.hgp-viewer__nav--prev {
		left: 0.5rem;
	}

	.hgp-viewer__nav--next {
		right: 0.5rem;
	}

	.hgp-viewer__thumb {
		width: 76px;
	}
}

/* Fachada de vídeo */
.hgp-video {
	position: relative;
	display: block;
	width: 100%;
	height: 100%;
	min-height: 100%;
	padding: 0;
	overflow: hidden;
	background: var(--hgp-bg-deep);
	border: 0;
	color: #fff;
	cursor: pointer;
	aspect-ratio: 16 / 9;
}

.hgp-viewer__slide .hgp-video {
	aspect-ratio: auto;
}

.hgp-video img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 0.8s var(--hgp-ease), filter 0.5s ease;
	filter: brightness(0.75);
}

.hgp-video:hover img {
	transform: scale(1.04);
	filter: brightness(0.6);
}

.hgp-video__bg {
	position: absolute;
	inset: 0;
	background:
		radial-gradient(circle at 50% 50%, var(--hgp-a-soft), transparent 60%),
		linear-gradient(to right, rgba(148, 163, 184, 0.07) 1px, transparent 1px) 0 0 / 32px 32px,
		linear-gradient(to bottom, rgba(148, 163, 184, 0.07) 1px, transparent 1px) 0 0 / 32px 32px;
}

.hgp-video__play {
	position: absolute;
	top: 50%;
	left: 50%;
	display: grid;
	place-items: center;
	width: 78px;
	height: 78px;
	padding-left: 4px;
	border-radius: 50%;
	background: var(--hgp-a);
	color: #04121F;
	box-shadow: 0 0 0 10px color-mix(in srgb, var(--hgp-a) 20%, transparent), 0 20px 50px -10px var(--hgp-a-glow);
	transform: translate(-50%, -50%);
	transition: transform 0.35s var(--hgp-ease);
}

.hgp-video__play::after {
	content: "";
	position: absolute;
	inset: -10px;
	border: 1px solid var(--hgp-a);
	border-radius: 50%;
	animation: hgp-ping 2.2s var(--hgp-ease) infinite;
}

.hgp-video:hover .hgp-video__play {
	transform: translate(-50%, -50%) scale(1.08);
}

.hgp-video__label {
	position: absolute;
	left: 1rem;
	top: 1rem;
	padding: 0.25rem 0.6rem;
	background: rgba(7, 12, 23, 0.65);
	border-radius: 8px;
	font-family: var(--hgp-mono);
	font-size: 0.7rem;
	letter-spacing: 0.08em;
	text-transform: uppercase;
}

.hgp-video-embed,
.hgp-video-embed iframe,
.hgp-video-embed video {
	display: block;
	width: 100%;
	height: 100%;
	border: 0;
	background: #000;
}

.hgp-video-embed {
	aspect-ratio: 16 / 9;
}

.hgp-viewer__slide .hgp-video-embed,
.hgp-frame--phone .hgp-video-embed {
	aspect-ratio: auto;
}

.hgp-frame--phone .hgp-video {
	aspect-ratio: auto;
	height: 100%;
}

/* -------------------------------------------------------------------------
   11. Sobre el proyecto + ficha técnica
   ------------------------------------------------------------------------- */
.hgp-about {
	padding-block: clamp(2.5rem, 6vw, 4.5rem);
}

.hgp-about__grid {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	gap: clamp(2rem, 5vw, 4rem);
	align-items: start;
}

@media (min-width: 1000px) {
	.hgp-about__grid {
		grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr);
	}

	.hgp-about__grid--solo {
		grid-template-columns: minmax(0, 1fr);
		max-width: 560px;
	}

	.hgp-sheet {
		position: sticky;
		top: calc(var(--hgp-header) + 1.5rem);
	}
}

.hgp-prose {
	color: var(--hgp-soft);
	font-size: 1.08rem;
	line-height: 1.8;
}

.hgp-prose > *:first-child {
	margin-top: 0;
}

.hgp-sheet {
	position: relative;
	padding: 1.5rem;
	overflow: hidden;
	background: linear-gradient(180deg, rgba(23, 34, 55, 0.85), rgba(14, 22, 38, 0.85));
	border: 1px solid var(--hgp-border);
	border-radius: var(--hgp-radius);
	-webkit-backdrop-filter: blur(12px);
	backdrop-filter: blur(12px);
}

.hgp-sheet::before,
.hgp-feature::before,
.hgp-case__step::before,
.hgp-timeline__card::before,
.hgp-quote::before,
.hgp-cta::before,
.hgp-pnav__link::before {
	content: "";
	position: absolute;
	inset: 0;
	border-radius: inherit;
	background: radial-gradient(360px circle at var(--mx) var(--my), color-mix(in srgb, var(--hgp-a) 10%, transparent), transparent 45%);
	opacity: 0;
	transition: opacity 0.4s ease;
	pointer-events: none;
}

.hgp-sheet:hover::before,
.hgp-feature:hover::before,
.hgp-case__step:hover::before,
.hgp-timeline__card:hover::before,
.hgp-quote:hover::before,
.hgp-cta:hover::before,
.hgp-pnav__link:hover::before {
	opacity: 1;
}

.hgp-sheet__title {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	margin: 0 0 1rem;
	padding-bottom: 0.9rem;
	border-bottom: 1px solid var(--hgp-border);
	color: var(--hgp-a);
	font-family: var(--hgp-mono);
	font-size: 0.8rem;
}

.hgp-sheet__list {
	margin: 0 0 1.25rem;
}

.hgp-sheet__list > div {
	display: flex;
	justify-content: space-between;
	gap: 1rem;
	padding: 0.6rem 0;
	border-bottom: 1px dashed var(--hgp-border);
	font-size: 0.92rem;
}

.hgp-sheet__list dt {
	color: var(--hgp-muted);
	font-family: var(--hgp-mono);
	font-size: 0.75rem;
	letter-spacing: 0.06em;
	text-transform: uppercase;
}

.hgp-sheet__list dd {
	margin: 0;
	color: var(--hgp-text);
	text-align: right;
}

.hgp-sheet__list a {
	color: var(--hgp-a);
	text-decoration: none;
}

.hgp-sheet__label {
	margin: 0 0 0.6rem;
	color: var(--hgp-muted);
	font-family: var(--hgp-mono);
	font-size: 0.72rem;
	letter-spacing: 0.12em;
	text-transform: uppercase;
}

.hgp-sheet__links {
	display: grid;
	gap: 0.5rem;
	margin-top: 1.25rem;
	padding-top: 1.25rem;
	border-top: 1px solid var(--hgp-border);
}

.hgp-sheet__links a {
	position: relative;
	display: flex;
	align-items: center;
	gap: 0.55rem;
	padding: 0.65rem 0.85rem;
	background: rgba(7, 12, 23, 0.45);
	border: 1px solid var(--hgp-border);
	border-radius: 12px;
	color: var(--hgp-soft);
	font-size: 0.9rem;
	text-decoration: none;
	transition: border-color 0.2s ease, color 0.2s ease;
}

.hgp-sheet__links a .hgp-icon:last-child {
	margin-left: auto;
}

.hgp-sheet__links a:hover {
	border-color: var(--hgp-a);
	color: var(--hgp-a);
}

/* -------------------------------------------------------------------------
   12. Contenido y bloques
   ------------------------------------------------------------------------- */
.hgp-content > .hgp-wrap--narrow {
	padding-block: clamp(1.5rem, 4vw, 2.5rem);
}

.hgp-block {
	padding-block: var(--hgp-section);
}

.hgp-content > .hgp-block + .hgp-block {
	padding-top: calc(var(--hgp-section) * 0.4);
}

.hgp-editor-notice {
	display: flex;
	align-items: center;
	gap: 0.6rem;
	margin: 1rem 0;
	padding: 1rem 1.25rem;
	background: rgba(56, 189, 248, 0.08);
	border: 1px dashed rgba(56, 189, 248, 0.5);
	border-radius: 12px;
	color: #7DD3FC;
	font-family: var(--hgp-mono, monospace);
	font-size: 0.85rem;
}

/* Galería */
.hgp-gallery {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 1rem;
}

@media (min-width: 900px) {
	.hgp-gallery {
		grid-template-columns: repeat(var(--cols, 3), minmax(0, 1fr));
	}
}

.hgp-gallery--masonry .hgp-gallery {
	display: block;
	columns: 2;
	column-gap: 1rem;
}

@media (min-width: 900px) {
	.hgp-gallery--masonry .hgp-gallery {
		columns: var(--cols, 3);
	}
}

.hgp-gallery--masonry .hgp-gallery__item {
	margin-bottom: 1rem;
	break-inside: avoid;
}

.hgp-gallery__item {
	position: relative;
	margin: 0;
}

.hgp-gallery__item a {
	position: relative;
	display: block;
	overflow: hidden;
	border: 1px solid var(--hgp-border);
	border-radius: 16px;
	background: var(--hgp-surface-2);
}

.hgp-gallery__item img {
	width: 100%;
	transition: transform 0.9s var(--hgp-ease), filter 0.5s ease;
}

.hgp-gallery--grid .hgp-gallery__item img {
	aspect-ratio: 16 / 10;
	height: 100%;
	object-fit: cover;
}

.hgp-gallery__item a:hover img {
	transform: scale(1.05);
}

.hgp-gallery__item figcaption {
	margin-top: 0.5rem;
	color: var(--hgp-muted);
	font-size: 0.85rem;
}

/* Carrusel */
.hgp-carousel__track {
	display: flex;
	gap: 1rem;
	margin-inline: calc(var(--hgp-gutter) * -1);
	padding-inline: var(--hgp-gutter);
	overflow-x: auto;
	scroll-snap-type: x mandatory;
	scroll-padding-inline: var(--hgp-gutter);
	scrollbar-width: none;
	overscroll-behavior-x: contain;
}

.hgp-carousel__track::-webkit-scrollbar {
	display: none;
}

.hgp-carousel .hgp-gallery__item {
	flex: 0 0 min(82%, 680px);
	scroll-snap-align: start;
}

.hgp-carousel .hgp-gallery__item img {
	aspect-ratio: 16 / 10;
	height: 100%;
	object-fit: cover;
}

.hgp-carousel__controls {
	display: flex;
	align-items: center;
	gap: 1rem;
	margin-top: 1.25rem;
}

.hgp-carousel__progress {
	position: relative;
	flex: 1;
	height: 2px;
	overflow: hidden;
	background: var(--hgp-border-2);
	border-radius: 2px;
}

.hgp-carousel__progress span {
	position: absolute;
	inset: 0 auto 0 0;
	width: var(--p, 20%);
	background: linear-gradient(90deg, var(--hgp-a), var(--hgp-a2));
	box-shadow: 0 0 12px var(--hgp-a-glow);
	transition: width 0.3s ease;
}

/* Vídeo destacado */
.hgp-video-block__media {
	max-width: 980px;
	margin-inline: auto;
}

.hgp-video-block--phone .hgp-video-block__media {
	max-width: 320px;
}

.hgp-video-block__media .hgp-frame--phone .hgp-frame__screen {
	aspect-ratio: 9 / 19.5;
}

/* Texto + imagen */
.hgp-split {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	gap: clamp(2rem, 5vw, 4.5rem);
	align-items: center;
}

@media (min-width: 900px) {
	.hgp-split {
		grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
	}

	.hgp-split--img-left .hgp-split__media {
		order: -1;
	}

	.hgp-split--img-left .hgp-split {
		grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
	}

	.hgp-split--no-img .hgp-split {
		grid-template-columns: minmax(0, 1fr);
		max-width: 760px;
	}
}

.hgp-split__body {
	color: var(--hgp-soft);
	font-size: 1.05rem;
	line-height: 1.75;
}

.hgp-split__body a {
	color: var(--hgp-a);
}

.hgp-split__media {
	position: relative;
	transition: transform 0.4s var(--hgp-ease);
}

.hgp-split__media::before {
	content: "";
	position: absolute;
	inset: 12% 10%;
	border-radius: 30px;
	background: linear-gradient(135deg, var(--hgp-a), var(--hgp-a2));
	filter: blur(70px);
	opacity: 0.22;
}

.hgp-split__media a {
	position: relative;
	display: block;
}

.hgp-checks {
	display: grid;
	gap: 0.7rem;
	margin: 1.5rem 0 0;
	padding: 0;
	list-style: none;
}

.hgp-checks li {
	display: flex;
	align-items: flex-start;
	gap: 0.75rem;
	color: var(--hgp-soft);
}

.hgp-checks .hgp-icon {
	flex-shrink: 0;
	width: 24px;
	height: 24px;
	margin-top: 1px;
	padding: 4px;
	border-radius: 8px;
	background: var(--hgp-a-soft);
	color: var(--hgp-a);
}

/* Reto · Solución · Resultado */
.hgp-case {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	gap: 1.25rem;
	margin: 0;
	padding: 0;
	list-style: none;
	counter-reset: none;
}

@media (min-width: 900px) {
	.hgp-case {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}
}

.hgp-case__step,
.hgp-feature,
.hgp-timeline__card {
	position: relative;
	padding: 1.75rem;
	overflow: hidden;
	background: linear-gradient(180deg, rgba(23, 34, 55, 0.75), rgba(14, 22, 38, 0.75));
	border: 1px solid var(--hgp-border);
	border-radius: var(--hgp-radius);
	transition: border-color 0.3s ease, transform 0.4s var(--hgp-ease);
}

.hgp-case__step:hover,
.hgp-feature:hover,
.hgp-timeline__card:hover {
	border-color: color-mix(in srgb, var(--hgp-a) 35%, transparent);
}

.hgp-case__num {
	position: absolute;
	top: 0.75rem;
	right: 1.25rem;
	color: transparent;
	font-family: var(--hgp-mono);
	font-size: 3.4rem;
	font-weight: 700;
	line-height: 1;
	-webkit-text-stroke: 1px var(--hgp-border-2);
}

.hgp-case__step h3,
.hgp-feature h3,
.hgp-timeline__card h3 {
	margin: 1.15rem 0 0.5rem;
	font-size: 1.15rem;
	line-height: 1.3;
}

.hgp-case__step p,
.hgp-feature p,
.hgp-timeline__card p {
	margin: 0;
	color: var(--hgp-muted);
	font-size: 0.95rem;
	line-height: 1.65;
}

.hgp-case__step--result {
	border-color: color-mix(in srgb, var(--hgp-a) 30%, transparent);
	background: linear-gradient(180deg, color-mix(in srgb, var(--hgp-a) 9%, rgba(23, 34, 55, 0.75)), rgba(14, 22, 38, 0.75));
}

/* Características */
.hgp-features {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	gap: 1.25rem;
}

@media (min-width: 700px) {
	.hgp-features {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (min-width: 1024px) {
	.hgp-features {
		grid-template-columns: repeat(var(--cols, 3), minmax(0, 1fr));
	}
}

.hgp-feature:hover {
	transform: translateY(-4px);
}

.hgp-feature:hover .hgp-iconbox {
	background: var(--hgp-a);
	color: #04121F;
}

.hgp-feature .hgp-iconbox {
	transition: background-color 0.3s ease, color 0.3s ease;
}

/* Métricas */
.hgp-b-stats .hgp-wrap::before {
	content: "";
	position: absolute;
	inset: -20% 20%;
	z-index: -1;
	background: radial-gradient(closest-side, var(--hgp-a-soft), transparent);
	filter: blur(30px);
}

.hgp-stats {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	margin: 0;
	overflow: hidden;
	border: 1px solid var(--hgp-border);
	border-radius: var(--hgp-radius);
	background: linear-gradient(180deg, rgba(23, 34, 55, 0.6), rgba(14, 22, 38, 0.6));
}

@media (min-width: 900px) {
	.hgp-stats--n3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
	.hgp-stats--n4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

.hgp-stats--n1 {
	grid-template-columns: minmax(0, 1fr);
}

.hgp-stat {
	padding: clamp(1.5rem, 4vw, 2.5rem) 1.25rem;
	border-right: 1px solid var(--hgp-border);
	border-bottom: 1px solid var(--hgp-border);
	text-align: center;
}

.hgp-stat__value {
	margin: 0 0 0.35rem;
	background: linear-gradient(180deg, #fff 20%, color-mix(in srgb, var(--hgp-a) 70%, #fff));
	-webkit-background-clip: text;
	background-clip: text;
	color: transparent;
	font-size: clamp(2.2rem, 5vw, 3.4rem);
	font-weight: 700;
	letter-spacing: -0.04em;
	line-height: 1;
	font-variant-numeric: tabular-nums;
}

.hgp-stat__label {
	margin: 0;
	color: var(--hgp-text);
	font-weight: 500;
}

.hgp-stat__detail {
	margin: 0.35rem 0 0;
	color: var(--hgp-muted-2);
	font-family: var(--hgp-mono);
	font-size: 0.72rem;
}

/* Mockups de dispositivos */
.hgp-devices {
	display: flex;
	justify-content: center;
	align-items: center;
	gap: clamp(0.75rem, 3vw, 2rem);
	padding-block: 1rem 2rem;
}

.hgp-devices__item {
	display: block;
	flex: 0 1 290px;
	min-width: 0;
	animation: hgp-bob 7s ease-in-out infinite;
	animation-delay: calc(var(--i) * -2.3s);
}

.hgp-devices--browser .hgp-devices__item {
	flex-basis: 560px;
}

.hgp-devices--n3.hgp-devices--phone .hgp-devices__item:nth-child(1),
.hgp-devices--n3.hgp-devices--phone .hgp-devices__item:nth-child(3) {
	transform: scale(0.88);
	opacity: 0.85;
}

.hgp-devices--n3.hgp-devices--browser .hgp-devices {
	flex-wrap: wrap;
}

@keyframes hgp-bob {
	50% { translate: 0 -12px; }
}

@media (max-width: 699px) {
	.hgp-devices--phone .hgp-devices {
		justify-content: flex-start;
		margin-inline: calc(var(--hgp-gutter) * -1);
		padding-inline: var(--hgp-gutter);
		overflow-x: auto;
		scroll-snap-type: x mandatory;
	}

	.hgp-devices--phone .hgp-devices__item {
		flex: 0 0 68%;
		scroll-snap-align: center;
	}

	.hgp-devices--browser .hgp-devices {
		flex-direction: column;
	}
}

/* Línea de tiempo */
.hgp-timeline {
	position: relative;
	max-width: 960px;
	margin: 0 auto;
	padding: 0;
	list-style: none;
}

.hgp-timeline::before {
	content: "";
	position: absolute;
	top: 0;
	bottom: 0;
	left: 11px;
	width: 2px;
	background: linear-gradient(180deg, var(--hgp-a), var(--hgp-a2) 60%, transparent);
	opacity: 0.5;
}

.hgp-timeline__item {
	position: relative;
	padding: 0 0 1.5rem 2.75rem;
}

.hgp-timeline__node {
	position: absolute;
	top: 1.9rem;
	left: 4px;
	width: 16px;
	height: 16px;
	border: 2px solid var(--hgp-a);
	border-radius: 50%;
	background: var(--hgp-bg);
	box-shadow: 0 0 0 5px var(--hgp-a-soft), 0 0 20px var(--hgp-a-glow);
}

.hgp-timeline__date {
	margin: 0 !important;
	color: var(--hgp-a) !important;
	font-family: var(--hgp-mono);
	font-size: 0.75rem !important;
	letter-spacing: 0.1em;
	text-transform: uppercase;
}

.hgp-timeline__card h3 {
	margin-top: 0.5rem;
}

@media (min-width: 900px) {
	.hgp-timeline::before {
		left: 50%;
		transform: translateX(-50%);
	}

	.hgp-timeline__item {
		width: 50%;
		padding: 0 3rem 2rem 0;
	}

	.hgp-timeline__item:nth-child(even) {
		margin-left: 50%;
		padding: 0 0 2rem 3rem;
	}

	.hgp-timeline__node {
		left: auto;
		right: -8px;
	}

	.hgp-timeline__item:nth-child(even) .hgp-timeline__node {
		right: auto;
		left: -8px;
	}

	.hgp-timeline__item:nth-child(odd) .hgp-timeline__card {
		text-align: right;
	}
}

/* Stack tecnológico */
.hgp-stack {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	gap: clamp(2rem, 5vw, 4rem);
	align-items: center;
}

@media (min-width: 900px) {
	.hgp-stack {
		grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
	}
}

.hgp-stack .hgp-heading {
	margin-bottom: 1.5rem;
}

.hgp-stack__chips {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
	margin: 0;
	padding: 0;
	list-style: none;
}

.hgp-stack__chips li {
	padding: 0.4rem 0.85rem;
	font-size: 0.8rem;
}

.hgp-terminal,
.hgp-code {
	overflow: hidden;
	background: #080D19;
	border: 1px solid var(--hgp-border-2);
	border-radius: 16px;
	box-shadow: 0 40px 80px -40px rgba(0, 0, 0, 0.95), 0 0 60px -40px var(--hgp-a-glow);
}

.hgp-terminal__bar,
.hgp-code__bar {
	display: flex;
	align-items: center;
	gap: 6px;
	min-height: 38px;
	padding: 0 14px;
	background: #111A2C;
	border-bottom: 1px solid var(--hgp-border);
	color: var(--hgp-muted);
	font-family: var(--hgp-mono);
	font-size: 0.72rem;
}

.hgp-terminal__bar span {
	margin-left: auto;
	margin-right: auto;
	transform: translateX(-18px);
}

.hgp-terminal__body,
.hgp-code__body {
	margin: 0;
	padding: 1.25rem 1.4rem;
	overflow-x: auto;
	background: transparent;
	border: 0;
	color: var(--hgp-soft);
	font-family: var(--hgp-mono);
	font-size: 0.85rem;
	line-height: 1.75;
	white-space: pre;
	tab-size: 2;
}

.hgp-terminal .t-c { color: var(--hgp-a); }
.hgp-terminal .t-k { color: #C4B5FD; }
.hgp-terminal .t-s { color: #86EFAC; }
.hgp-terminal .t-p { color: var(--hgp-muted); }

/* Código */
.hgp-code__dots {
	display: flex;
	gap: 6px;
	margin-right: 0.75rem;
}

.hgp-code__file {
	display: inline-flex;
	align-items: center;
	gap: 0.4rem;
	align-self: stretch;
	padding: 0 0.85rem;
	background: #080D19;
	border-inline: 1px solid var(--hgp-border);
	color: var(--hgp-text);
}

.hgp-code__lang {
	margin-left: auto;
	color: var(--hgp-a);
}

.hgp-code__copy {
	display: grid;
	place-items: center;
	width: 30px;
	height: 30px;
	margin-left: 0.5rem;
	padding: 0;
	background: transparent;
	border: 1px solid var(--hgp-border-2);
	border-radius: 8px;
	color: var(--hgp-muted);
	cursor: pointer;
	transition: all 0.2s ease;
}

.hgp-code__copy:hover {
	border-color: var(--hgp-a);
	color: var(--hgp-a);
}

.hgp-code__copy .hgp-icon--check,
.hgp-code__copy.is-copied .hgp-icon--copy {
	display: none;
}

.hgp-code__copy.is-copied .hgp-icon--check {
	display: block;
	color: #34D399;
}

.hgp-code__body code {
	display: block;
	padding: 0;
	background: none;
	border: 0;
	color: inherit;
	font: inherit;
	counter-reset: hgp-line;
}

.hgp-code__line {
	display: block;
	min-height: 1.75em;
}

.hgp-code__line::before {
	counter-increment: hgp-line;
	content: counter(hgp-line);
	display: inline-block;
	width: 2.2em;
	margin-right: 1.2em;
	color: var(--hgp-muted-2);
	text-align: right;
	opacity: 0.6;
	user-select: none;
}

/* Testimonio */
.hgp-quote {
	position: relative;
	max-width: 880px;
	margin: 0 auto;
	padding: clamp(2rem, 5vw, 3.5rem);
	overflow: hidden;
	background: linear-gradient(160deg, rgba(23, 34, 55, 0.85), rgba(14, 22, 38, 0.85));
	border: 1px solid var(--hgp-border);
	border-radius: 26px;
	text-align: center;
}

.hgp-quote__mark {
	display: inline-flex;
	margin-bottom: 1rem;
	color: var(--hgp-a);
	filter: drop-shadow(0 0 18px var(--hgp-a-glow));
}

.hgp-quote blockquote {
	margin: 0;
	padding: 0;
	border: 0;
	background: none;
}

.hgp-quote blockquote p {
	margin: 0;
	color: var(--hgp-text);
	font-family: var(--hgp-serif);
	font-size: clamp(1.3rem, 2.8vw, 1.85rem);
	font-style: italic;
	line-height: 1.5;
}

.hgp-quote figcaption {
	display: inline-flex;
	align-items: center;
	gap: 0.85rem;
	margin-top: 1.75rem;
	text-align: left;
}

.hgp-quote__avatar {
	width: 52px;
	height: 52px;
	border: 2px solid var(--hgp-a);
	border-radius: 50%;
	object-fit: cover;
}

.hgp-quote figcaption strong {
	display: block;
	color: var(--hgp-text);
}

.hgp-quote figcaption small {
	color: var(--hgp-muted);
	font-family: var(--hgp-mono);
	font-size: 0.75rem;
}

/* Llamada a la acción */
.hgp-cta {
	position: relative;
	padding: clamp(2.5rem, 7vw, 5rem) clamp(1.5rem, 5vw, 4rem);
	overflow: hidden;
	border-radius: 28px;
	background:
		linear-gradient(180deg, rgba(23, 34, 55, 0.92), rgba(11, 18, 32, 0.92)) padding-box,
		linear-gradient(135deg, var(--hgp-a), transparent 40%, transparent 60%, var(--hgp-a2)) border-box;
	border: 1px solid transparent;
	isolation: isolate;
}

.hgp-cta__glow {
	position: absolute;
	top: -60%;
	left: 50%;
	z-index: -1;
	width: 80%;
	height: 120%;
	background: radial-gradient(closest-side, var(--hgp-a-glow), transparent);
	filter: blur(40px);
	opacity: 0.5;
	transform: translateX(-50%);
}

.hgp-cta .hgp-heading {
	margin-bottom: 2rem;
}

/* -------------------------------------------------------------------------
   13. Navegación entre proyectos y relacionados
   ------------------------------------------------------------------------- */
.hgp-pnav {
	padding-block: clamp(2rem, 5vw, 3rem);
	border-top: 1px solid var(--hgp-border);
}

.hgp-pnav__grid {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	gap: 1rem;
}

@media (min-width: 700px) {
	.hgp-pnav__grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

.hgp-pnav__link {
	position: relative;
	display: flex;
	align-items: center;
	gap: 1rem;
	padding: 1rem;
	overflow: hidden;
	background: rgba(21, 31, 50, 0.6);
	border: 1px solid var(--hgp-border);
	border-radius: 18px;
	color: var(--hgp-text);
	text-decoration: none;
	transition: border-color 0.3s ease, transform 0.3s var(--hgp-ease);
}

.hgp-pnav__link:hover {
	border-color: color-mix(in srgb, var(--hgp-a) 40%, transparent);
	color: var(--hgp-text);
	transform: translateY(-2px);
}

.hgp-pnav__link--next {
	flex-direction: row-reverse;
	text-align: right;
}

.hgp-pnav__link img {
	width: 72px;
	height: 72px;
	border-radius: 12px;
	object-fit: cover;
}

.hgp-pnav__link small {
	display: block;
	margin-bottom: 0.2rem;
	color: var(--hgp-muted);
	font-family: var(--hgp-mono);
	font-size: 0.72rem;
	letter-spacing: 0.08em;
	text-transform: uppercase;
}

.hgp-pnav__link strong {
	font-size: 1.05rem;
	font-weight: 600;
}

.hgp-related {
	padding-block: clamp(2.5rem, 6vw, 4.5rem) var(--hgp-section);
}

.hgp-related__head {
	display: flex;
	flex-wrap: wrap;
	align-items: flex-end;
	justify-content: space-between;
	gap: 1rem 2rem;
	margin-bottom: clamp(2rem, 4vw, 3rem);
}

.hgp-related__head .hgp-heading {
	margin-bottom: 0;
}

/* -------------------------------------------------------------------------
   14. Visor a pantalla completa (lightbox)
   ------------------------------------------------------------------------- */
.hgp-lightbox {
	position: fixed;
	inset: 0;
	z-index: 100000;
	display: grid;
	place-items: center;
	padding: clamp(3.5rem, 6vw, 5rem) clamp(0.5rem, 5vw, 5rem);
	background: rgba(4, 7, 14, 0.9);
	opacity: 0;
	visibility: hidden;
	transition: opacity 0.35s ease, visibility 0.35s;
	-webkit-backdrop-filter: blur(14px);
	backdrop-filter: blur(14px);
	font-family: var(--hgp-sans, system-ui, sans-serif);
}

.hgp-lightbox.is-open {
	opacity: 1;
	visibility: visible;
}

.hgp-lightbox__figure {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 0.85rem;
	max-width: 100%;
	max-height: 100%;
	margin: 0;
}

.hgp-lightbox__figure img {
	max-width: min(100%, 1600px);
	max-height: calc(100vh - 10rem);
	width: auto;
	height: auto;
	border-radius: 12px;
	box-shadow: 0 40px 100px -30px rgba(0, 0, 0, 0.9);
	animation: hgp-zoom 0.4s var(--hgp-ease, ease);
}

@keyframes hgp-zoom {
	from { opacity: 0; transform: scale(0.96); }
}

.hgp-lightbox__figure figcaption {
	color: #CBD5E1;
	font-size: 0.9rem;
	text-align: center;
}

.hgp-lightbox__btn {
	position: absolute;
	display: grid;
	place-items: center;
	width: 48px;
	height: 48px;
	padding: 0;
	background: rgba(21, 31, 50, 0.75);
	border: 1px solid rgba(148, 163, 184, 0.25);
	border-radius: 50%;
	color: #fff;
	cursor: pointer;
	transition: background-color 0.2s ease, border-color 0.2s ease;
}

.hgp-lightbox__btn:hover {
	background: #38BDF8;
	border-color: #38BDF8;
	color: #04121F;
}

.hgp-lightbox__close {
	top: 1rem;
	right: 1rem;
}

.hgp-lightbox__prev {
	left: 1rem;
	top: 50%;
	transform: translateY(-50%);
}

.hgp-lightbox__next {
	right: 1rem;
	top: 50%;
	transform: translateY(-50%);
}

.hgp-lightbox__count {
	position: absolute;
	top: 1.6rem;
	left: 1.5rem;
	color: #94A3B8;
	font-family: "JetBrains Mono", ui-monospace, monospace;
	font-size: 0.8rem;
}

.hgp-lightbox.is-single .hgp-lightbox__prev,
.hgp-lightbox.is-single .hgp-lightbox__next,
.hgp-lightbox.is-single .hgp-lightbox__count {
	display: none;
}

html.hgp-lock,
html.hgp-lock body {
	overflow: hidden;
}

/* -------------------------------------------------------------------------
   15. Editor de bloques
   ------------------------------------------------------------------------- */
.hgp-ssr {
	position: relative;
	background: #0B1220;
	color: #F1F5F9;
	border-radius: 4px;
}

.hgp-ssr .hgp-block {
	padding-block: 2.5rem;
}

/* En el editor los bloques se ven a su ancho real, no al de lectura. */
.editor-styles-wrapper .hgp-ssr,
.editor-styles-wrapper .is-layout-constrained > .hgp-ssr {
	max-width: calc(var(--hgp-container) + var(--hgp-gutter) * 2) !important;
}

.editor-styles-wrapper .hgp .hgp-heading__title,
.editor-styles-wrapper .hgp h3 {
	font-family: var(--hgp-sans) !important;
	font-weight: 650;
}

.hgp-stat__value {
	white-space: nowrap;
}

.hgp-ssr a,
.hgp-ssr button {
	pointer-events: none;
}

.hgp-ssr__empty {
	padding: 1.5rem;
	border: 1px dashed rgba(56, 189, 248, 0.5);
	border-radius: 12px;
	color: #7DD3FC;
	font-family: monospace;
	text-align: center;
}

/* -------------------------------------------------------------------------
   16. Accesibilidad: movimiento reducido
   ------------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
	.hgp *,
	.hgp *::before,
	.hgp *::after {
		animation-duration: 0.01ms !important;
		animation-iteration-count: 1 !important;
		transition-duration: 0.01ms !important;
	}

	.hgp-js .hgp [data-hgp-reveal] {
		opacity: 1;
		transform: none;
	}
}
