/* ==================================================
   Inés Varela — estilos propios de la plantilla (hero: portafolio de directora y fotógrafa)
   Barra, botones, secciones comunes, similares, CTA y WhatsApp vienen de themes/_kit/am-kit.css
   Capas: videos < sombra < franjas de cine (obturador) < visor < nombre, proyecto e índice.
   ================================================== */

.iv-hero {
	--paper: #f2efe9;
	--red: #ff3b30;
	--disp: 'Syne', 'Archivo', sans-serif;
	--serif: 'Instrument Serif', Georgia, serif;
	--mono: 'JetBrains Mono', 'Space Mono', monospace;
	position: relative;
	z-index: 1;
	display: flex;
	flex-direction: column;
	height: 100vh;
	height: 100svh;
	min-height: 640px;
	padding-top: 68px;
	overflow: hidden;
	background: #050505;
	color: var(--paper);
}
.iv-stage { position: relative; flex: 1 1 auto; min-height: 0; overflow: hidden; overflow: clip; outline: none; }

/* ---------- Escenas ---------- */
.iv-slides, .iv-slide, .iv-shade { position: absolute; inset: 0; }
.iv-slide { visibility: hidden; }
.iv-slide.is-on { visibility: visible; }
.iv-slide video { width: 100%; height: 100%; object-fit: cover; object-position: var(--pos, 50% 50%); }
.iv-shade { z-index: 2; pointer-events: none; background: linear-gradient(180deg, rgba(5, 5, 5, .55), transparent 28%, transparent 60%, rgba(5, 5, 5, .7)), radial-gradient(120% 90% at 50% 50%, transparent 55%, rgba(0, 0, 0, .5)); }
/* franjas de cine: también son el obturador de la transición */
.iv-bar { position: absolute; z-index: 3; left: 0; right: 0; height: var(--bh, 7%); background: #050505; pointer-events: none; }
.iv-bar--t { top: 0; }
.iv-bar--b { bottom: 0; }

/* ---------- Visor ---------- */
.iv-vf { position: absolute; z-index: 4; inset: calc(var(--bh, 7%) + 18px) clamp(18px, 3vw, 44px); pointer-events: none; font: 500 11px/1 var(--mono); letter-spacing: .14em; color: rgba(242, 239, 233, .8); }
.iv-vf__c { position: absolute; width: 22px; height: 22px; border: 1.5px solid rgba(242, 239, 233, .7); }
.iv-vf__c--tl { left: 0; top: 0; border-right: 0; border-bottom: 0; }
.iv-vf__c--tr { right: 0; top: 0; border-left: 0; border-bottom: 0; }
.iv-vf__c--bl { left: 0; bottom: 0; border-right: 0; border-top: 0; }
.iv-vf__c--br { right: 0; bottom: 0; border-left: 0; border-top: 0; }
.iv-rec { position: absolute; left: 34px; top: 4px; display: flex; align-items: center; gap: 8px; }
.iv-rec i { width: 9px; height: 9px; border-radius: 50%; background: var(--red); box-shadow: 0 0 10px var(--red); animation: iv-blink 1.1s steps(2) infinite; }
@keyframes iv-blink { 50% { opacity: .15; } }
.iv-tc { position: absolute; right: 34px; top: 4px; font-variant-numeric: tabular-nums; }
.iv-meta { position: absolute; right: 34px; bottom: 4px; color: rgba(242, 239, 233, .55); }
.iv-cross { position: absolute; left: 50%; top: 50%; width: 30px; height: 30px; margin: -15px 0 0 -15px; opacity: .45; background: linear-gradient(var(--paper), var(--paper)) 50% 0 / 1px 100% no-repeat, linear-gradient(var(--paper), var(--paper)) 0 50% / 100% 1px no-repeat; }

/* ---------- Cabecera ---------- */
.iv-top { position: absolute; z-index: 6; left: clamp(18px, 3vw, 44px); right: clamp(18px, 3vw, 44px); top: calc(var(--bh, 7%) + 44px); display: flex; align-items: center; justify-content: space-between; }
.iv-mono { display: flex; align-items: center; justify-content: center; width: 52px; height: 52px; margin-left: 30px; font: 400 30px/1 var(--serif); color: var(--paper); text-decoration: none; border: 1px solid rgba(242, 239, 233, .6); border-radius: 50%; letter-spacing: -.04em; transition: background-color .3s, color .3s; }
.iv-mono span + span { font-style: italic; margin-left: 1px; }
.iv-mono:hover { background: var(--paper); color: #050505; }
.iv-menu { display: flex; gap: clamp(16px, 2.4vw, 40px); margin-right: 30px; }
.iv-menu a { font: 500 14px/1 var(--disp); letter-spacing: .02em; text-transform: lowercase; color: var(--paper); text-decoration: none; position: relative; padding: 4px 0; }
.iv-menu a::before { content: "("; opacity: 0; margin-right: 2px; transition: opacity .25s; }
.iv-menu a::after { content: ")"; opacity: 0; margin-left: 2px; transition: opacity .25s; }
.iv-menu a:hover::before, .iv-menu a:hover::after, .iv-menu a:focus-visible::before, .iv-menu a:focus-visible::after { opacity: 1; }

/* ---------- Nombre gigante ---------- */
.iv-name { position: absolute; z-index: 5; left: clamp(18px, 3vw, 44px); right: clamp(18px, 3vw, 44px); top: 50%; transform: translateY(-58%); display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 1.6vw; pointer-events: none; mix-blend-mode: difference; }
.iv-name p { margin: 0; }
.iv-name__a, .iv-name__b { font: 800 clamp(56px, min(7.3vw, 19vh), 190px)/.82 var(--disp); letter-spacing: -.05em; text-transform: uppercase; color: var(--paper); }
.iv-name__a span, .iv-name__b span { display: inline-block; }
.iv-name__role { justify-self: center; display: grid; justify-items: center; gap: 6px; text-align: center; font: italic 400 clamp(22px, 2vw, 32px)/1 var(--serif); color: var(--paper); }
.iv-name__role small { white-space: nowrap; font: 500 11px/1 var(--mono); font-style: normal; letter-spacing: .2em; text-transform: uppercase; opacity: .8; }

/* ---------- Proyecto ---------- */
.iv-proj { position: absolute; z-index: 6; left: calc(clamp(18px, 3vw, 44px) + 30px); bottom: calc(var(--bh, 7%) + 40px); max-width: 52vw; }
.iv-proj__n { display: flex; align-items: baseline; gap: 4px; margin: 0 0 6px; font: 500 12px/1 var(--mono); letter-spacing: .14em; color: rgba(242, 239, 233, .7); }
.iv-proj__n b { font-weight: 500; color: var(--paper); }
.iv-proj__t { margin: 0; text-align: left; font: italic 400 clamp(38px, min(4.6vw, 8vh), 76px)/1 var(--serif); letter-spacing: -.01em; color: var(--paper); text-shadow: 0 4px 30px rgba(0, 0, 0, .5); }
.iv-l { display: block; overflow: hidden; padding-bottom: .08em; }
.iv-l > span { display: block; }
.iv-proj__k { margin: 6px 0 0; font: 500 12px/1 var(--mono); letter-spacing: .16em; text-transform: uppercase; color: rgba(242, 239, 233, .75); }
.iv-proj__go { display: inline-flex; align-items: center; gap: 12px; margin-top: 18px; padding: 10px 10px 10px 20px; font: 600 13px/1 var(--disp); letter-spacing: .04em; color: #050505; text-decoration: none; background: var(--paper); border-radius: 40px; transition: background-color .3s; }
.iv-proj__go svg { width: 28px; height: 28px; padding: 7px; color: var(--paper); background: #050505; border-radius: 50%; transition: transform .3s; }
.iv-proj__go:hover { background: #fff; }
.iv-proj__go:hover svg { transform: scale(1.12); }

/* ---------- Índice de proyectos ---------- */
.iv-index { position: absolute; z-index: 6; right: calc(clamp(18px, 3vw, 44px) + 30px); bottom: calc(var(--bh, 7%) + 40px); display: grid; gap: 2px; margin: 0; padding: 0; list-style: none; text-align: right; }
.iv-hero .iv-index button { position: relative; display: flex; align-items: center; justify-content: flex-end; gap: 10px; width: 100%; margin: 0; padding: 3px 0; font: 500 12px/1.2 var(--mono); letter-spacing: .08em; color: rgba(242, 239, 233, .5); background: none; border: 0; cursor: pointer; transition: color .3s; }
.iv-index button b { font-weight: 500; }
.iv-index button i { width: 18px; height: 1px; background: currentColor; transition: width .4s cubic-bezier(.2, .8, .2, 1); }
.iv-index button em { position: absolute; right: 0; bottom: 0; height: 1px; width: 52px; background: var(--paper); transform: scaleX(var(--p, 0)); transform-origin: right; font-style: normal; }
.iv-hero .iv-index button:hover, .iv-hero .iv-index button[aria-selected="true"] { color: var(--paper); }
.iv-index button[aria-selected="true"] i { width: 52px; }
/* vista previa al pasar el cursor por el índice */
.iv-peek { position: absolute; z-index: 7; width: 220px; aspect-ratio: 16 / 9; overflow: hidden; border-radius: 6px; box-shadow: 0 20px 50px rgba(0, 0, 0, .55); pointer-events: none; opacity: 0; transform: scale(.85); transition: opacity .25s, transform .35s cubic-bezier(.2, .8, .2, 1); }
.iv-peek.is-on { opacity: 1; transform: scale(1); }
.iv-peek img { width: 100%; height: 100%; object-fit: cover; }
.iv-mono:focus-visible, .iv-menu a:focus-visible, .iv-proj__go:focus-visible, .iv-index button:focus-visible { outline: 2px solid var(--paper); outline-offset: 4px; }
.iv-status { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Pie del hero (igual en todas las plantillas) ---------- */
.iv-foot {
	position: relative;
	z-index: 8;
	flex: 0 0 auto;
	display: grid;
	grid-template-columns: minmax(260px, 1fr) auto auto;
	gap: 14px clamp(20px, 3vw, 44px);
	align-items: center;
	padding: 14px calc(var(--gutter) + 140px) 16px var(--gutter);
	background: #0a0a0a;
	border-top: 3px solid var(--accent);
}
.iv-foot__meta { margin: 0 0 4px; font-family: var(--mb-mono); font-size: 12px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--accent); }
.iv-foot__lead { max-width: 60ch; margin: 0; font-size: clamp(14px, 1.1vw, 17px); line-height: 1.5; color: rgba(245, 245, 240, .86); }
.iv-ctrl { display: flex; align-items: center; gap: 10px; }
.iv-count { margin: 0 6px 0 0; font-family: var(--mb-mono); font-size: 14px; color: rgba(245, 245, 240, .7); white-space: nowrap; }
.iv-idx { display: inline-block; font-family: var(--mb-display); font-weight: 900; font-size: 34px; line-height: 1; letter-spacing: -.02em; vertical-align: -5px; color: var(--accent); }
@media (max-width: 1180px) {
	.iv-foot { grid-template-columns: minmax(0, 1fr) auto; }
	.iv-foot .ak-actions { grid-column: 1 / -1; }
}
@media (max-height: 800px) and (min-width: 1001px) {
	.iv-hero { --bh: 5%; }
	.iv-index { gap: 0; }
	.iv-hero .iv-index button { padding: 2px 0; font-size: 11px; }
}

/* ---------- Tablet y móvil ---------- */
@media (max-width: 1000px) {
	.iv-hero { height: auto; min-height: 0; --bh: 4%; }
	.iv-stage { flex: none; height: calc(100svh - 68px); min-height: 600px; }
	.iv-menu { display: none; }
	.iv-mono { margin-left: 14px; }
	.iv-name { grid-template-columns: 1fr; justify-items: center; gap: 10px; top: 42%; text-align: center; }
	.iv-name__a, .iv-name__b { font-size: clamp(48px, 13.4vw, 120px); }
	.iv-name__role small { white-space: normal; }
	.iv-proj { left: 30px; right: 30px; max-width: none; bottom: calc(var(--bh) + 64px); }
	.iv-index { left: 30px; right: 30px; bottom: calc(var(--bh) + 28px); display: flex; justify-content: space-between; }
	.iv-hero .iv-index button { justify-content: center; padding: 6px 0; }
	.iv-index button i, .iv-index button span { display: none; }
	.iv-index button em { left: 0; width: 100%; }
	.iv-meta { display: none; }
}
@media (max-width: 700px) {
	.iv-hero { padding-top: 60px; }
	.iv-stage { height: calc(100svh - 60px); min-height: 580px; }
	.iv-proj__go { margin-top: 12px; }
	.iv-foot { grid-template-columns: 1fr; padding: 14px var(--gutter) 88px; }
	.iv-ctrl { order: -1; }
	.iv-foot .ak-actions .ak-btn { flex: 1 1 auto; }
}

@media (prefers-reduced-motion: reduce) {
	.iv-rec i { animation: none; }
}
