/* ==================================================
   Alma Vieja — estilos propios de la plantilla (hero: estudio de tatuajes en seis escenas)
   Barra, botones, secciones comunes, similares, CTA y WhatsApp vienen de themes/_kit/am-kit.css
   Capas: videos < sombra y grano < textos e interfaz. La escena nueva entra con una mancha de tinta (máscara SVG).
   ================================================== */

.av-hero {
	--bone: #ece3d3;
	--blood: #b3261e;
	--goth: 'UnifrakturMaguntia', serif;
	--serif: 'Playfair Display', Georgia, serif;
	--sans: 'Inter', 'Open Sans', sans-serif;
	position: relative;
	z-index: 1;
	display: flex;
	flex-direction: column;
	height: 100vh;
	height: 100svh;
	min-height: 640px;
	padding-top: 68px;
	overflow: hidden;
	background: #0b0a09;
	color: var(--bone);
}
.av-stage { position: relative; flex: 1 1 auto; min-height: 0; overflow: hidden; overflow: clip; outline: none; }

/* ---------- Escenas ---------- */
.av-slides, .av-slide, .av-shade, .av-grain { position: absolute; inset: 0; }
.av-slide { visibility: hidden; }
.av-slide.is-on, .av-slide.is-in { visibility: visible; }
.av-slide.is-in {
	z-index: 2;
	-webkit-mask-image: var(--blot); mask-image: var(--blot);
	-webkit-mask-repeat: no-repeat; mask-repeat: no-repeat;
	-webkit-mask-position: var(--mx, 60%) var(--my, 50%); mask-position: var(--mx, 60%) var(--my, 50%);
	-webkit-mask-size: var(--ms, 0%); mask-size: var(--ms, 0%);
}
.av-slide video, .av-slide img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: var(--pos, 50% 50%); }
.av-shade { z-index: 3; pointer-events: none; background: linear-gradient(90deg, rgba(8, 7, 6, .88) 0%, rgba(8, 7, 6, .55) 38%, rgba(8, 7, 6, .1) 70%), linear-gradient(180deg, rgba(8, 7, 6, .55), transparent 25%, transparent 70%, rgba(8, 7, 6, .75)); }
.av-grain { z-index: 3; pointer-events: none; opacity: .16; mix-blend-mode: overlay; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='240' height='240' filter='url(%23n)'/%3E%3C/svg%3E"); animation: av-grain 1s steps(4) infinite; }
@keyframes av-grain { 0% { transform: translate(0, 0); } 25% { transform: translate(-3%, 2%); } 50% { transform: translate(2%, -3%); } 75% { transform: translate(-2%, -2%); } }

/* ---------- Cabecera ---------- */
.av-top { position: absolute; z-index: 5; left: clamp(20px, 4.4vw, 70px); right: clamp(20px, 4.4vw, 70px); top: clamp(18px, 4.4vh, 46px); display: flex; align-items: center; gap: 24px; }
.av-brand { display: flex; align-items: center; gap: 12px; color: var(--bone); text-decoration: none; }
.av-brand svg { width: 30px; height: auto; color: var(--blood); }
.av-brand span { display: grid; line-height: 1; }
.av-brand b { font: 400 clamp(26px, 2.3vw, 36px)/1 var(--goth); }
.av-brand small { margin-top: 3px; font: 600 11px/1 var(--sans); letter-spacing: .32em; text-transform: uppercase; color: rgba(236, 227, 211, .6); }
.av-motto { margin: 0 0 0 auto; font: italic 500 clamp(14px, 1.15vw, 18px)/1 var(--serif); color: rgba(236, 227, 211, .75); }
.av-motto::before { content: ""; display: inline-block; width: 34px; height: 1px; margin: 0 12px 4px 0; background: var(--blood); vertical-align: middle; }
.av-soc { display: flex; gap: 14px; }
.av-soc a { display: grid; place-items: center; width: 34px; height: 34px; color: var(--bone); border: 1px solid rgba(236, 227, 211, .3); border-radius: 50%; transition: color .25s, border-color .25s, background-color .25s; }
.av-soc a:hover { color: #0b0a09; background: var(--bone); border-color: var(--bone); }
.av-soc svg { width: 16px; height: 16px; }

/* ---------- Textos ---------- */
.av-copy { position: absolute; z-index: 4; left: clamp(20px, 7vw, 120px); top: 50%; transform: translateY(-46%); max-width: min(760px, 62vw); }
.av-accent { margin: 0 0 -.12em .1em; font: 400 clamp(40px, min(5vw, 8vh), 84px)/1 var(--goth); color: var(--blood); text-shadow: 0 2px 20px rgba(0, 0, 0, .6); }
.av-accent span { display: inline-block; }
.av-title { margin: 0; text-align: left; font: 900 clamp(64px, min(10.5vw, 17vh), 190px)/.9 var(--serif); letter-spacing: -.02em; text-transform: uppercase; }
/* la palabra se dibuja como esténcil (contorno) y se llena de tinta */
.av-title__in {
	display: inline-block;
	color: transparent;
	-webkit-text-stroke: 1.5px var(--bone);
	background: linear-gradient(var(--bone), var(--bone)) 0 100% / 100% var(--fill, 100%) no-repeat;
	-webkit-background-clip: text;
	background-clip: text;
	padding-bottom: .04em;
}
.av-desc { max-width: 36ch; margin: clamp(14px, 2.6vh, 26px) 0 0; font: 400 clamp(15px, 1.25vw, 19px)/1.55 var(--sans); color: rgba(236, 227, 211, .82); }
.av-cta { display: inline-flex; align-items: center; gap: 14px; margin-top: clamp(18px, 3.2vh, 32px); padding: 16px 26px; font: 600 13px/1 var(--sans); letter-spacing: .22em; text-transform: uppercase; color: var(--bone); text-decoration: none; border: 1px solid rgba(236, 227, 211, .55); position: relative; overflow: hidden; transition: color .35s, border-color .35s; }
.av-cta::before { content: ""; position: absolute; inset: 0; background: var(--blood); transform: scaleX(0); transform-origin: right; transition: transform .45s cubic-bezier(.7, 0, .2, 1); z-index: -1; }
.av-cta:hover { border-color: var(--blood); color: #fff; }
.av-cta:hover::before { transform: scaleX(1); transform-origin: left; }
.av-cta svg { width: 20px; height: 20px; transition: transform .3s; }
.av-cta:hover svg { transform: translateX(5px); }
.av-cta, .av-copy { isolation: isolate; }

/* ---------- Sello ---------- */
.av-stamp { position: absolute; z-index: 4; right: clamp(24px, 7vw, 120px); top: 50%; width: clamp(110px, 10vw, 160px); margin-top: calc(clamp(110px, 10vw, 160px) / -2); color: rgba(236, 227, 211, .75); pointer-events: none; }
.av-stamp svg { display: block; width: 100%; height: auto; animation: av-spin 26s linear infinite; }
.av-stamp text { fill: currentColor; font: 600 12px/1 var(--sans); letter-spacing: .3em; text-transform: uppercase; }
.av-stamp .av-stamp__av { font: 400 40px/1 var(--goth); letter-spacing: 0; fill: var(--blood); }
@keyframes av-spin { to { transform: rotate(360deg); } }

/* ---------- Navegación ---------- */
.av-nav { position: absolute; z-index: 5; right: clamp(20px, 4.4vw, 70px); bottom: clamp(22px, 5vh, 52px); display: flex; align-items: center; gap: 18px; }
.av-hero .av-arrow { width: 54px; height: 54px; margin: 0; display: grid; place-items: center; color: var(--bone); background: transparent; border: 1px solid rgba(236, 227, 211, .4); border-radius: 50%; cursor: pointer; transition: background-color .3s, color .3s, border-color .3s; }
.av-hero .av-arrow:hover, .av-hero .av-arrow:focus-visible { color: #0b0a09; background: var(--bone); border-color: var(--bone); }
.av-arrow svg { width: 22px; height: 22px; }
.av-num { display: flex; align-items: baseline; margin: 0; font-family: var(--serif); }
.av-num b { font-size: 40px; font-weight: 900; font-style: italic; }
.av-num span { font-size: 16px; color: rgba(236, 227, 211, .55); }
.av-ticks { position: absolute; z-index: 5; left: clamp(20px, 7vw, 120px); bottom: clamp(30px, 6vh, 60px); display: flex; gap: 10px; margin: 0; padding: 0; list-style: none; }
.av-ticks button { position: relative; width: 46px; height: 18px; padding: 0; margin: 0; background: none; border: 0; cursor: pointer; }
.av-ticks button::before { content: ""; position: absolute; left: 0; right: 0; top: 50%; height: 2px; background: rgba(236, 227, 211, .25); }
.av-ticks i { position: absolute; left: 0; right: 0; top: 50%; height: 2px; background: var(--blood); transform: scaleX(var(--p, 0)); transform-origin: left; }
.av-ticks button[aria-selected="true"]::before { background: rgba(236, 227, 211, .5); }
.av-cta:focus-visible, .av-ticks button:focus-visible, .av-soc a:focus-visible, .av-brand:focus-visible { outline: 2px solid var(--bone); outline-offset: 4px; }
.av-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) ---------- */
.av-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);
}
.av-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); }
.av-foot__lead { max-width: 60ch; margin: 0; font-size: clamp(14px, 1.1vw, 17px); line-height: 1.5; color: rgba(245, 245, 240, .86); }
.av-ctrl { display: flex; align-items: center; gap: 10px; }
.av-count { margin: 0 6px 0 0; font-family: var(--mb-mono); font-size: 14px; color: rgba(245, 245, 240, .7); white-space: nowrap; }
.av-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) {
	.av-foot { grid-template-columns: minmax(0, 1fr) auto; }
	.av-foot .ak-actions { grid-column: 1 / -1; }
	.av-stamp { display: none; }
}
@media (max-height: 760px) and (min-width: 1001px) {
	.av-desc { margin-top: 10px; }
	.av-cta { margin-top: 14px; padding: 13px 22px; }
}

/* ---------- Tablet y móvil ---------- */
@media (max-width: 1000px) {
	.av-hero { height: auto; min-height: 0; }
	.av-stage { flex: none; height: calc(100svh - 68px); min-height: 600px; }
	.av-shade { background: linear-gradient(180deg, rgba(8, 7, 6, .6), rgba(8, 7, 6, .15) 30%, rgba(8, 7, 6, .55) 55%, rgba(8, 7, 6, .92)); }
	.av-motto { display: none; }
	.av-soc { margin-left: auto; }
	.av-copy { left: 20px; right: 20px; top: auto; bottom: 120px; transform: none; max-width: none; }
	.av-title { font-size: clamp(54px, 15vw, 110px); }
	.av-desc { font-size: 15px; }
	.av-nav { right: 20px; bottom: 26px; gap: 10px; }
	.av-hero .av-arrow { width: 46px; height: 46px; }
	.av-num b { font-size: 30px; }
	.av-ticks { left: 20px; bottom: 40px; gap: 6px; }
	.av-ticks button { width: 24px; }
}
@media (max-width: 700px) {
	.av-hero { padding-top: 60px; }
	.av-stage { height: calc(100svh - 60px); min-height: 580px; }
	.av-copy { bottom: 150px; }
	.av-cta { padding: 13px 18px; letter-spacing: .14em; }
	.av-ticks { bottom: 96px; }
	.av-nav { left: 20px; right: auto; }
	.av-foot { grid-template-columns: 1fr; padding: 14px var(--gutter) 88px; }
	.av-ctrl { order: -1; }
	.av-foot .ak-actions .ak-btn { flex: 1 1 auto; }
}

@media (prefers-reduced-motion: reduce) {
	.av-grain, .av-stamp svg { animation: none; }
}
