/* port-proyectos — crema #FBF8F4. Chips de filtro, rejilla de 3 columnas con maquetas (navegador + celular) que recorren
   la captura al pasar el cursor, tarjetas tipográficas (tinta / naranja / lima) y ventana de detalle (<dialog>).
   Celular: los chips se deslizan y la rejilla es carrusel con snap. */

.port-pr { padding: clamp(72px, 8vw, 128px) 0; background: #FBF8F4; color: #121011; scroll-margin-top: 80px; }
.port-pr__in { max-width: 1320px; margin: 0 auto; padding: 0 var(--m); }

.port-pr__cab { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 16px 48px; }
.port-pr__ceja { margin-bottom: 14px; color: #C8410F; font-size: 14px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; }
.port-pr__cab h2 { max-width: 16ch; font-size: clamp(32px, 4vw, 58px); text-wrap: balance; }
.port-pr__intro { max-width: 36ch; color: #4A4547; font-size: 16.5px; line-height: 1.55; }

/* ── Chips ── */
.port-pr__barra { position: sticky; top: 76px; z-index: 5; display: flex; align-items: center; justify-content: space-between; gap: 16px; margin: clamp(28px, 3vw, 44px) calc(var(--m) * -1) 0; padding: 12px var(--m); background: rgba(251, 248, 244, .94); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
.port-pr__chips { display: flex; gap: 8px; min-width: 0; overflow-x: auto; scrollbar-width: none; }
.port-pr__chips::-webkit-scrollbar { display: none; }
.port-pr__chip { flex: none; display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 16px; border: 0; border-radius: 999px; background: #fff; box-shadow: inset 0 0 0 1px #E2D9CE; color: #121011; font: 600 15px/1 var(--f); cursor: pointer; transition: background-color .25s, color .25s, box-shadow .25s; }
.port-pr__chip span { display: grid; place-items: center; min-width: 24px; height: 24px; padding: 0 6px; border-radius: 999px; background: #F4F1EC; color: #4A4547; font-size: 12.5px; transition: inherit; }
.port-pr__chip:hover { box-shadow: inset 0 0 0 1.5px #121011; }
/* Seleccionado: tinta con texto blanco; al pasar el cursor sigue contrastando (no se vuelve blanco sobre blanco) */
.port-pr__chip[aria-pressed="true"], .port-pr__chip[aria-pressed="true"]:hover { background: #121011; color: #fff; box-shadow: none; }
.port-pr__chip[aria-pressed="true"] span { background: #FF5B23; color: #121011; }
.port-pr__chip:focus-visible { outline: 3px solid #C8410F; outline-offset: 2px; }
.port-pr__estado { flex: none; color: #4A4547; font-size: 14px; font-weight: 600; }

/* ── Rejilla ── */
.port-pr__rejilla { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); grid-auto-flow: dense; gap: clamp(16px, 1.6vw, 24px); margin: 24px 0 0; padding: 0; list-style: none; }
/* Con captura: 3 por fila; tipográficas (sin captura): 4 por fila, más bajas */
.port-pr__item { grid-column: span 4; min-width: 0; animation: portpr-entra .5s var(--ease) both; }
.port-pr__item[hidden] { display: none; }
@keyframes portpr-entra { from { opacity: 0; transform: translate3d(0, 14px, 0) scale(.98); } }
.port-pr__card { position: relative; display: flex; flex-direction: column; height: 100%; overflow: hidden; border-radius: 26px; background: #fff; box-shadow: inset 0 0 0 1px #E9E1D7; transition: transform .45s var(--ease), box-shadow .45s; }
.port-pr__card:hover, .port-pr__card:focus-within { transform: translateY(-6px); box-shadow: inset 0 0 0 1.5px #121011, 0 30px 50px -32px rgba(18, 16, 17, .5); }

.port-pr__vista { position: relative; aspect-ratio: 4 / 3; overflow: hidden; background: #F4F1EC; }
/* Navegador con la captura de escritorio */
.port-pr__nav { position: absolute; left: 7%; right: 7%; top: 9%; z-index: 1; display: flex; align-items: center; gap: 5px; height: 26px; padding: 0 10px; border-radius: 12px 12px 0 0; background: #121011; }
.port-pr__nav i { width: 7px; height: 7px; border-radius: 50%; background: rgba(255, 255, 255, .28); }
.port-pr__nav i:first-child { background: #FF5B23; }
.port-pr__nav span { margin-left: 8px; overflow: hidden; color: rgba(255, 255, 255, .7); font-size: 11px; white-space: nowrap; text-overflow: ellipsis; }
.port-pr__pantalla { position: absolute; left: 7%; right: 7%; top: calc(9% + 26px); bottom: -2px; overflow: hidden; background: #fff; box-shadow: 0 20px 40px -24px rgba(18, 16, 17, .5); }
.port-pr__pantalla img, .port-pr__cel img { width: 100%; height: auto; transition: transform 1.2s var(--ease); }
/* Captura que se recorre al pasar el cursor (de arriba abajo, lento) */
.port-pr__card:hover .port-pr__pantalla img { transform: translateY(calc(-100% + var(--alto, 220px))); transition: transform 7s cubic-bezier(.45, 0, .55, 1); }
.port-pr__cel { position: absolute; right: 4%; bottom: 6%; z-index: 2; width: 24%; aspect-ratio: 9 / 19; padding: 4px; border-radius: 16px; background: #121011; box-shadow: 0 18px 30px -14px rgba(18, 16, 17, .6); transition: transform .6s var(--ease); }
.port-pr__cel > div { width: 100%; height: 100%; overflow: hidden; border-radius: 12px; background: #fff; }
.port-pr__card:hover .port-pr__cel { transform: translateY(-6px) rotate(-2deg); }
.port-pr__card:hover .port-pr__cel img { transform: translateY(calc(-100% + var(--alto-c, 140px))); transition: transform 7s cubic-bezier(.45, 0, .55, 1) .3s; }

/* Hoja (cotizador: PDF real que genera el sistema) */
.port-pr__item--doc .port-pr__vista { background: #121011; }
.port-pr__hoja { position: absolute; left: 50%; top: 12%; z-index: 1; width: 46%; aspect-ratio: 1131 / 1600; overflow: hidden; border-radius: 6px; background: #fff; box-shadow: 0 30px 40px -20px #000; transform: translateX(-50%) rotate(-4deg); transition: transform .6s var(--ease); }
.port-pr__hoja img { width: 100%; height: 100%; object-fit: cover; }
.port-pr__hoja.is-atras { z-index: 0; background: #FF5B23; transform: translateX(-40%) rotate(6deg); }
.port-pr__card:hover .port-pr__hoja { transform: translateX(-50%) rotate(-1deg) translateY(-8px); }
.port-pr__card:hover .port-pr__hoja.is-atras { transform: translateX(-34%) rotate(10deg); }

/* Tipográficas (sin captura) */
.port-pr__item--tipo { grid-column: span 3; }
.port-pr__item--tipo .port-pr__vista { display: grid; align-content: end; padding: 22px; }
.port-pr__item--tipo.is-tinta .port-pr__vista { background: #121011; color: #fff; }
.port-pr__item--tipo.is-naranja .port-pr__vista { background: #FF5B23; color: #121011; }
.port-pr__item--tipo.is-lima .port-pr__vista { background: #D2FB8C; color: #121011; }
.port-pr__mono { position: absolute; right: -2%; top: -14%; font: 400 italic clamp(180px, 18vw, 260px)/1 'Instrument Serif', Georgia, serif; opacity: .14; transition: transform .8s var(--ease); }
.port-pr__card:hover .port-pr__mono { transform: translate3d(-10px, 10px, 0) rotate(-6deg); }
.port-pr__grande { position: relative; max-width: 10ch; font-family: 'Marko Display', var(--f); font-weight: 800; font-size: clamp(30px, 2.8vw, 42px); line-height: .98; text-transform: lowercase; }
.port-pr__item--tipo.is-tinta .port-pr__grande { color: #fff; }

.port-pr__txt { display: flex; flex-direction: column; flex: 1; padding: 20px 22px 22px; }
.port-pr__sello { align-self: flex-start; margin-bottom: 8px; padding: 4px 10px; border-radius: 999px; background: #121011; color: var(--lima); font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.port-pr__txt h3 { font-size: 20px; line-height: 1.2; }
.port-pr__giro { margin-top: 6px; color: #4A4547; font-size: 15px; line-height: 1.45; }
.port-pr__tags { display: flex; flex-wrap: wrap; gap: 6px; margin: auto 0 0; padding: 14px 0 0; list-style: none; }
.port-pr__tags li { padding: 4px 10px; border-radius: 999px; background: #F4F1EC; color: #4A4547; font-size: 12.5px; font-weight: 600; }

/* El botón cubre toda la tarjeta; la pastilla «Ver proyecto» aparece al pasar el cursor */
.port-pr__abrir { position: absolute; inset: 0; z-index: 3; width: 100%; padding: 0; border: 0; border-radius: inherit; background: none; cursor: pointer; }
.port-pr__abrir:focus-visible { outline: 3px solid #C8410F; outline-offset: -3px; }
.port-pr__ver { position: absolute; left: 16px; top: 16px; display: inline-flex; align-items: center; gap: 8px; padding: 9px 14px; border-radius: 999px; background: #121011; color: #fff; font: 600 13.5px/1 var(--f); opacity: 0; transform: translate3d(0, -6px, 0); transition: opacity .3s, transform .3s var(--ease); }
.port-pr__item--tipo.is-tinta .port-pr__ver, .port-pr__item--doc .port-pr__ver { background: #FBF8F4; color: #121011; }
.port-pr__card:hover .port-pr__ver, .port-pr__abrir:focus-visible .port-pr__ver { opacity: 1; transform: none; }

.port-pr__puntos { display: none; }

/* ── Ventana de detalle ── */
.port-pr__modal { width: min(1120px, calc(100vw - 32px)); max-width: none; max-height: min(760px, calc(100dvh - 32px)); padding: 0; border: 0; border-radius: 30px; background: #FBF8F4; color: #121011; overflow: hidden; box-shadow: 0 40px 100px -30px rgba(0, 0, 0, .7); }
.port-pr__modal::backdrop { background: rgba(18, 16, 17, .78); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.port-pr__modal[open] { animation: portpr-abre .45s var(--ease); }
@keyframes portpr-abre { from { opacity: 0; transform: translate3d(0, 24px, 0) scale(.97); } }
.port-pr__m { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); height: min(760px, calc(100dvh - 32px)); }
.port-pr__m-vista { position: relative; min-height: 0; overflow: hidden; background: #121011; }
.port-pr__m-scroll { position: absolute; inset: 0; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: #FF5B23 #201A17; }
.port-pr__m-scroll:focus-visible { outline: 3px solid #FF5B23; outline-offset: -3px; }
.port-pr__m-scroll > img { width: 100%; height: auto; }
.port-pr__m-cel { position: absolute; right: 5%; bottom: 5%; z-index: 1; width: 24%; max-width: 170px; padding: 5px; border-radius: 22px; background: #121011; box-shadow: 0 24px 40px -18px #000, inset 0 0 0 1px rgba(255, 255, 255, .12); pointer-events: none; }
.port-pr__m-cel > div { aspect-ratio: 9 / 19; overflow: hidden; border-radius: 17px; background: #fff; }
.port-pr__m-cel img { width: 100%; height: auto; animation: portpr-cel 22s cubic-bezier(.45, 0, .55, 1) 1s infinite alternate; }
@keyframes portpr-cel { to { transform: translateY(calc(-100% + var(--alto-c, 300px))); } }
.port-pr__m-doc { display: grid; place-items: center; min-height: 100%; padding: 32px; }
.port-pr__m-doc img { width: min(100%, 440px); height: auto; border-radius: 8px; box-shadow: 0 30px 60px -24px #000; }
.port-pr__m-tipo { position: relative; display: grid; align-content: end; min-height: 100%; padding: 36px; overflow: hidden; }
.port-pr__m-tipo b { position: relative; max-width: 10ch; font-family: 'Marko Display', var(--f); font-weight: 800; font-size: clamp(44px, 5vw, 76px); line-height: .95; text-transform: lowercase; }
.port-pr__m-tipo i { position: absolute; right: -4%; top: -10%; font: 400 italic clamp(260px, 30vw, 420px)/1 'Instrument Serif', Georgia, serif; opacity: .14; }
.port-pr__m-tipo.is-tinta { background: #121011; color: #fff; }
.port-pr__m-tipo.is-naranja { background: #FF5B23; color: #121011; }
.port-pr__m-tipo.is-lima { background: #D2FB8C; color: #121011; }

.port-pr__m-info { display: flex; flex-direction: column; min-height: 0; padding: clamp(24px, 3vw, 40px); overflow-y: auto; }
.port-pr__m-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.port-pr__m-k { color: #C8410F; font-size: 13px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; }
.port-pr__m-x { flex: none; display: grid; place-items: center; width: 44px; height: 44px; border: 0; border-radius: 50%; background: #F4F1EC; color: #121011; cursor: pointer; transition: background-color .25s, color .25s; }
.port-pr__m-x:hover { background: #121011; color: #fff; }
.port-pr__m-info h3 { margin-top: 14px; font-size: clamp(28px, 2.8vw, 40px); line-height: 1.05; }
.port-pr__m-g { margin-top: 10px; color: #2A2622; font-size: 17px; font-weight: 600; line-height: 1.45; }
.port-pr__m-d { margin-top: 6px; color: #4A4547; font-size: 16px; line-height: 1.5; }
.port-pr__m-d:empty { display: none; }
.port-pr__m-h { margin-top: 26px; color: #4A4547; font-size: 13px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; }
.port-pr__m-lista { display: grid; gap: 8px; margin: 12px 0 0; padding: 0; list-style: none; }
.port-pr__m-lista li { display: flex; align-items: center; gap: 10px; font-size: 16px; font-weight: 500; }
.port-pr__m-lista li::before { content: ""; flex: none; width: 20px; height: 20px; border-radius: 50%; background: #D2FB8C url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6 12.5l4 4 8-9' fill='none' stroke='%23121011' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 14px no-repeat; }
.port-pr__m-acc { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; margin-top: 28px; }
.port-pr__m-visita[hidden] { display: none; }
.port-pr__m-visita:hover { background: #121011; }
.port-pr__m-wa { display: inline-flex; align-items: center; min-height: 44px; color: #121011; font-weight: 700; text-decoration: none; border-bottom: 2px solid #FF5B23; }
.port-pr__m-wa:hover { color: #C8410F; }
.port-pr__m-nav { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: auto; padding-top: 24px; border-top: 1px solid #E9E1D7; color: #4A4547; font-size: 14px; }
.port-pr__m-nav button { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 14px; border: 0; border-radius: 999px; background: none; color: #121011; font: 600 15px/1 var(--f); cursor: pointer; transition: background-color .25s, color .25s; }
.port-pr__m-nav button:hover { background: #121011; color: #fff; }
.port-pr__modal :focus-visible { outline: 3px solid #C8410F; outline-offset: 2px; }
html.port-pr-abierto { overflow: hidden; }

/* ── Tablet ── */
@media (max-width: 1024px) {
	.port-pr__item { grid-column: span 6; }
	.port-pr__item--tipo { grid-column: span 3; }
	/* El producto propio va a lo ancho: así las filas de 2 y de 4 cierran parejas */
	.port-pr__item--doc { grid-column: 1 / -1; }
	.port-pr__item--doc .port-pr__vista { aspect-ratio: 21 / 8; }
	.port-pr__item--doc .port-pr__hoja { top: 10%; width: 22%; }
	.port-pr__item--tipo .port-pr__txt { flex: none; }
	.port-pr__item--tipo .port-pr__vista { flex: 1 1 auto; aspect-ratio: auto; min-height: 170px; } /* llena el alto de la fila */
	.port-pr__grande { font-size: clamp(22px, 2.6vw, 30px); }
	.port-pr__mono { font-size: 150px; }
}
@media (max-width: 860px) {
	.port-pr__item--tipo { grid-column: span 6; }
	.port-pr__item--tipo .port-pr__vista { aspect-ratio: 4 / 3; }
}
@media (max-width: 860px) {
	.port-pr__m { grid-template-columns: minmax(0, 1fr); grid-template-rows: 44% minmax(0, 1fr); }
	.port-pr__m-cel { width: 20%; }
}

/* ── Celular: chips deslizables, rejilla en carrusel con snap y puntos; ventana a pantalla completa ── */
@media (max-width: 600px) {
	.port-pr { padding: 56px 0; }
	.port-pr__cab h2 { font-size: clamp(28px, 8.4vw, 38px); }
	.port-pr__intro { font-size: 15px; }
	.port-pr__barra { top: 64px; flex-direction: column; align-items: stretch; gap: 6px; padding: 10px 0 10px var(--m); }
	.port-pr__chips { padding-right: var(--m); }
	.port-pr__chip { min-height: 44px; padding: 0 14px; font-size: 14px; }
	.port-pr__estado { font-size: 13px; }
	.port-pr__rejilla { display: flex; gap: 12px; margin: 12px calc(var(--m) * -1) 0; padding: 0 var(--m) 4px; overflow-x: auto; scroll-snap-type: x mandatory; scroll-padding: 0 var(--m); scrollbar-width: none; overscroll-behavior-x: contain; }
	.port-pr__rejilla::-webkit-scrollbar { display: none; }
	.port-pr__item { flex: 0 0 84%; scroll-snap-align: start; }
	.port-pr__item--doc .port-pr__vista { aspect-ratio: 4 / 3; }
	.port-pr__item--doc .port-pr__hoja { top: 12%; width: 46%; }
	.port-pr__card:hover, .port-pr__card:focus-within { transform: none; }
	.port-pr__ver { opacity: 1; transform: none; left: 12px; top: 12px; padding: 8px 12px; font-size: 12.5px; }
	.port-pr__txt { padding: 16px 18px 18px; }
	.port-pr__txt h3 { font-size: 18px; }
	.port-pr__giro { font-size: 14px; }
	.port-pr__puntos { display: flex; justify-content: center; gap: 6px; margin-top: 16px; }
	.port-pr__puntos i { width: 6px; height: 6px; border-radius: 3px; background: #D5CBBF; transition: width .3s var(--ease), background-color .3s; }
	.port-pr__puntos i.is-on { width: 22px; background: #121011; }

	.port-pr__modal { width: 100vw; max-height: 100dvh; height: 100dvh; margin: 0; border-radius: 0; }
	.port-pr__m { height: 100dvh; grid-template-rows: 40% minmax(0, 1fr); }
	.port-pr__m-info { padding: 18px var(--m) 16px; }
	.port-pr__m-info h3 { margin-top: 8px; font-size: 28px; }
	.port-pr__m-g { font-size: 16px; }
	.port-pr__m-h { margin-top: 18px; }
	.port-pr__m-acc { margin-top: 20px; }
	.port-pr__m-visita { flex: 1 1 100%; }
	.port-pr__m-nav { padding-top: 14px; }
}

@media (prefers-reduced-motion: reduce) {
	.port-pr__item, .port-pr__modal[open], .port-pr__m-cel img { animation: none; }
	.port-pr__card, .port-pr__card *, .port-pr__card:hover * { transition: none !important; }
	.port-pr__card:hover .port-pr__pantalla img, .port-pr__card:hover .port-pr__cel img { transform: none; }
}
.port-pr h2 .chispa { color: #C8410F; } /* AA sobre crema */
