/* ==================================================
   Encore — estilos propios de la plantilla (hero: academia de artes escénicas en siete capítulos)
   Barra, botones, secciones comunes, similares, CTA y WhatsApp vienen de themes/_kit/am-kit.css
   Capas del escenario: lienzo (video) < sombras de lectura < grano < textos e interfaz
   ec.js actualiza: --foot-h, data-ch (capítulo activo) y la visibilidad de cada capítulo
   ================================================== */

.ec-hero {
	--cream: #ecd5b0;
	--sand: #b9a17c;
	--txt: rgba(236, 226, 210, .82);
	--night: #060504;
	--foot-h: 92px;
	position: relative;
	z-index: 1;
	display: flex;
	flex-direction: column;
	height: 100vh;
	height: 100svh;
	min-height: 640px;
	overflow: hidden;
	color: var(--cream);
	background: var(--night);
}
.ec-stage { position: relative; flex: 1 1 auto; min-height: 0; overflow: hidden; }
.ec-cv { position: absolute; inset: 0; display: block; width: 100%; height: 100%; }

/* Sombras para leer los textos sin tapar la escena */
.ec-shade {
	position: absolute;
	inset: 0;
	pointer-events: none;
	background:
		linear-gradient(90deg, rgba(6, 5, 4, .78) 0%, rgba(6, 5, 4, .35) 38%, rgba(6, 5, 4, 0) 62%),
		linear-gradient(0deg, rgba(6, 5, 4, .85) 0%, rgba(6, 5, 4, 0) 46%),
		linear-gradient(180deg, rgba(6, 5, 4, .7) 0%, rgba(6, 5, 4, 0) 26%),
		radial-gradient(120% 90% at 60% 45%, rgba(6, 5, 4, 0) 55%, rgba(6, 5, 4, .45) 100%);
}
/* Grano de película */
.ec-grain {
	position: absolute;
	inset: -50%;
	pointer-events: none;
	opacity: .09;
	mix-blend-mode: overlay;
	background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='180' height='180'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
	animation: ec-grain .9s steps(4) infinite;
}
@keyframes ec-grain { 0% { transform: translate(0, 0); } 25% { transform: translate(-6%, 4%); } 50% { transform: translate(5%, -3%); } 75% { transform: translate(-3%, -5%); } 100% { transform: translate(0, 0); } }

/* ---------- Marca de la academia y menú (dentro de la escena) ---------- */
/* el escenario empieza bajo la barra fija: si la barra se esconde al bajar, no queda una franja vacía */
.ec-top { position: absolute; z-index: 4; left: var(--gutter); right: var(--gutter); top: calc(68px + 26px); display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; }
.ec-brand { margin: 0; font-family: 'Archivo', var(--mb-display); line-height: 1.05; color: var(--cream); }
.ec-brand span { display: block; font-size: 11px; font-weight: 500; letter-spacing: .14em; text-transform: uppercase; color: var(--sand); }
.ec-brand b { display: block; margin-top: 3px; font-size: 19px; font-weight: 700; letter-spacing: -.01em; }
.ec-nav { display: flex; gap: 26px; }
.ec-page .ec-nav a { position: relative; font-family: 'Archivo', var(--mb-display); font-size: 13px; font-weight: 500; letter-spacing: .02em; text-decoration: none; color: var(--txt); }
.ec-page .ec-nav a::after { content: ''; position: absolute; left: 0; right: 0; bottom: -4px; height: 1px; background: var(--cream); transform: scaleX(0); transform-origin: 0 50%; transition: transform .35s var(--ease, ease); }
.ec-page .ec-nav a:hover { color: var(--cream); }
.ec-page .ec-nav a:hover::after { transform: scaleX(1); }

/* ---------- Capítulos ---------- */
.ec-chapters { position: absolute; z-index: 3; left: calc(var(--gutter) + 200px); right: calc(var(--gutter) + 120px); bottom: 56px; }
.ec-chapter { position: absolute; left: 0; bottom: 0; max-width: 780px; visibility: hidden; opacity: 0; }
.ec-eb { display: flex; align-items: center; gap: 14px; margin: 0 0 18px; font-family: var(--mb-mono); font-size: 11px; font-weight: 700; letter-spacing: .32em; text-transform: uppercase; color: var(--sand); }
.ec-eb::before { content: ''; width: 34px; height: 1px; background: currentColor; }
.ec-page .ec-h {
	margin: 0;
	font-family: 'Archivo', var(--mb-display);
	font-size: clamp(42px, 5vw, 92px);
	font-weight: 600;
	line-height: .98;
	letter-spacing: -.03em;
	text-align: left;
	text-transform: none;
	color: var(--cream);
}
.ec-l { display: block; overflow: hidden; padding-bottom: .06em; margin-bottom: -.06em; }
.ec-l > span { display: inline-block; }
.ec-body { max-width: 46ch; margin: 22px 0 0; font-size: 16px; line-height: 1.6; color: var(--txt); }
.ec-page .ec-cta {
	display: inline-flex;
	align-items: center;
	gap: 12px;
	margin-top: 26px;
	padding: 13px 20px;
	font-family: var(--mb-mono);
	font-size: 11px;
	font-weight: 700;
	letter-spacing: .22em;
	text-transform: uppercase;
	text-decoration: none;
	color: var(--cream);
	border: 1px solid rgba(236, 213, 176, .55);
	transition: color .25s, background-color .25s, border-color .25s;
}
.ec-page .ec-cta:hover { color: var(--night); background: var(--cream); border-color: var(--cream); }

/* ---------- Disciplinas (menú vertical, abajo a la izquierda) ---------- */
.ec-arts { position: absolute; z-index: 4; left: var(--gutter); bottom: 56px; display: flex; flex-direction: column; gap: 2px; margin: 0; padding: 0; list-style: none; }
.ak-page .ec-art {
	position: relative;
	display: flex;
	align-items: baseline;
	gap: 10px;
	width: auto;
	min-height: 0;
	margin: 0;
	padding: 6px 0 6px 16px;
	font-family: 'Archivo', var(--mb-display);
	font-size: 14px;
	font-weight: 500;
	letter-spacing: 0;
	text-align: left;
	text-transform: none;
	color: rgba(236, 226, 210, .45);
	background: none;
	border: 0;
	cursor: pointer;
	transition: color .3s;
}
.ec-art b { font-family: var(--mb-mono); font-size: 10px; font-weight: 700; letter-spacing: .1em; color: rgba(185, 161, 124, .7); }
.ec-art::before { content: ''; position: absolute; left: 0; top: 50%; width: 6px; height: 1px; background: currentColor; transition: width .35s var(--ease, ease), left .35s var(--ease, ease), background-color .3s; }
.ak-page .ec-art:hover { color: var(--cream); }
.ak-page .ec-art.is-on { color: var(--cream); }
.ec-art.is-on::before { left: -14px; width: 24px; background: var(--cream); }
.ec-art:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ---------- Riel de progreso (derecha) ---------- */
.ec-rail { position: absolute; z-index: 4; right: var(--gutter); top: 50%; display: flex; flex-direction: column; align-items: center; gap: 12px; font-family: var(--mb-mono); font-size: 11px; letter-spacing: .1em; color: var(--sand); transform: translateY(-50%); }
.ec-rail__n { font-weight: 700; color: var(--cream); }
.ec-rail__bar { position: relative; display: block; width: 1px; height: 150px; background: rgba(236, 213, 176, .2); }
.ec-rail__bar i { position: absolute; left: 0; top: 0; width: 1px; height: 100%; background: var(--cream); transform: scaleY(0); transform-origin: 50% 0; }

/* ---------- Indicador de scroll ---------- */
.ec-scroll { position: absolute; z-index: 4; right: var(--gutter); bottom: 56px; display: flex; align-items: center; gap: 12px; margin: 0; font-family: var(--mb-mono); font-size: 10px; letter-spacing: .26em; text-transform: uppercase; color: var(--sand); pointer-events: none; }
.ec-mouse { position: relative; width: 18px; height: 28px; border: 1px solid rgba(236, 213, 176, .6); border-radius: 10px; }
.ec-mouse::after { content: ''; position: absolute; left: 50%; top: 6px; width: 2px; height: 6px; margin-left: -1px; border-radius: 1px; background: var(--cream); animation: ec-wheel 1.6s ease-in-out infinite; }
@keyframes ec-wheel { 0% { opacity: 0; transform: translateY(-2px); } 30% { opacity: 1; } 100% { opacity: 0; transform: translateY(8px); } }
.ec-status { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Pie del hero ---------- */
.ec-foot {
	position: relative;
	z-index: 6;
	flex: 0 0 auto;
	display: grid;
	grid-template-columns: minmax(260px, 1fr) auto auto;
	gap: 14px clamp(20px, 3vw, 44px);
	align-items: center;
	/* a la derecha queda libre el lugar del botón flotante de WhatsApp */
	padding: 14px calc(var(--gutter) + 140px) 16px var(--gutter);
	background: #0a0908;
	border-top: 3px solid var(--accent);
}
.ec-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); }
.ec-foot__lead { max-width: 60ch; margin: 0; font-size: clamp(14px, 1.1vw, 17px); line-height: 1.5; color: rgba(245, 245, 240, .86); }
.ec-ctrl { display: flex; align-items: center; gap: 10px; }
.ec-count { margin: 0 6px 0 0; font-family: var(--mb-mono); font-size: 14px; color: rgba(245, 245, 240, .7); white-space: nowrap; }
.ec-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) {
	.ec-foot { grid-template-columns: minmax(0, 1fr) auto; }
	.ec-foot .ak-actions { grid-column: 1 / -1; }
}
@media (max-height: 820px) and (min-width: 1001px) {
	.ec-page .ec-h { font-size: clamp(38px, 4.4vw, 76px); }
	.ec-body { margin-top: 16px; font-size: 15px; }
	.ec-chapters, .ec-arts, .ec-scroll { bottom: 36px; }
}

/* ---------- Tablet y móvil ---------- */
@media (max-width: 1000px) {
	.ec-hero { height: auto; min-height: 0; }
	.ec-stage { flex: none; height: 100vh; height: 100svh; min-height: 560px; }
	.ec-chapters { left: var(--gutter); right: var(--gutter); bottom: 120px; }
	.ec-arts { left: 0; right: 0; bottom: 18px; flex-direction: row; gap: 4px; padding: 0 var(--gutter); overflow-x: auto; scrollbar-width: none; }
	.ec-arts::-webkit-scrollbar { display: none; }
	.ak-page .ec-art { flex: none; padding: 8px 12px; font-size: 13px; border: 1px solid rgba(236, 213, 176, .2); }
	.ec-art::before { display: none; }
	.ak-page .ec-art.is-on { border-color: var(--cream); background: rgba(236, 213, 176, .1); }
	.ec-rail, .ec-scroll { display: none; }
	.ec-nav { gap: 16px; }
}
@media (max-width: 700px) {
	.ec-top { top: calc(60px + 18px); }
	.ec-nav { display: none; }
	.ec-brand b { font-size: 16px; }
	.ec-chapters { bottom: 76px; }
	.ec-page .ec-h { font-size: clamp(34px, 10vw, 56px); }
	.ec-body { font-size: 14px; margin-top: 14px; }
	.ec-eb { margin-bottom: 12px; font-size: 10px; letter-spacing: .24em; }
	.ec-page .ec-cta { margin-top: 18px; }
	.ec-shade { background: linear-gradient(0deg, rgba(6, 5, 4, .92) 0%, rgba(6, 5, 4, .5) 42%, rgba(6, 5, 4, 0) 70%), linear-gradient(180deg, rgba(6, 5, 4, .6) 0%, rgba(6, 5, 4, 0) 22%); }
	.ec-foot { grid-template-columns: 1fr; padding: 14px var(--gutter) 88px; }
	.ec-ctrl { order: -1; }
	.ec-foot .ak-actions .ak-btn { flex: 1 1 auto; }
}

/* ---------- Movimiento reducido ---------- */
@media (prefers-reduced-motion: reduce) {
	.ec-grain, .ec-mouse::after { animation: none; }
}
