/* ============================================================
   ASD Studios — estilos
   Base: ASD Design System (aura/asd-design-system.md) + detalles de
   AOWeb/ARGENTUM (viñeta, scrollbar Atrium) + la página original
   (Eurostile, título con línea, video de fondo).
   Paleta: muestreada de la grabación de Ionias Call (/games):
     niebla de hormigón · sombra grafito · cian de maná · coral de vida · fuego
   ============================================================ */

@font-face {
	font-family: 'Eurostile';
	src: url('../fonts/Eurostile.ttf') format('truetype');
	font-display: swap;
}

:root {
	--font-brand: 'Eurostile', 'Space Grotesk', 'Segoe UI', sans-serif;
	--font-display: 'Space Grotesk', 'Segoe UI', sans-serif;
	--font-body: 'Inter', 'Segoe UI', sans-serif;
	--font-mono: 'JetBrains Mono', ui-monospace, monospace;

	--r-sm: 6px;
	--r-md: 8px;
	--r-lg: 12px;
	--r-xl: 18px;
	--r-pill: 999px;

	--ease-out: cubic-bezier(0.22, 1, 0.36, 1);
	--t-in: 220ms;
	--t-out: 180ms;
	--t-state: 240ms;

	--maxw: 1180px;
	--gutter: clamp(20px, 5vw, 48px);

	/* Acento firma re-tintado: cian de la barra de maná (#24e7f9 → h 186). */
	--accent-h: 186;
	--accent-s: 78%;

	/* Colores del HUD de Ionias Call, medidos en los frames del video. */
	--hud-hp: #f0857d; /* barra de vida   #fa8f89 */
	--hud-mp: #2fdcf0; /* barra de maná   #24e7f9 */
	--hud-fire: #e9925f; /* ícono de fuego  #f2a16c / #d2744d */
	--hud-ice: #bfe6ee; /* filo de la espada #a6d3e8 */
	--legacy-orange: #f08c00; /* línea de títulos del sitio original */
}

/* ---------- DARK (default): sombra grafito ---------- */
:root,
[data-theme='dark'] {
	color-scheme: dark;
	--bg: #08090b;
	--bg-1: #0e0f12;
	--bg-2: #15161a;
	--surface: rgba(218, 217, 207, 0.025);
	--surface-2: rgba(218, 217, 207, 0.045);
	--border: rgba(218, 217, 207, 0.09);
	--border-strong: rgba(218, 217, 207, 0.17);
	--border-accent: hsla(var(--accent-h), 80%, 60%, 0.42);

	--text: #dad9cf; /* niebla de hormigón del video */
	--text-muted: #a19f97;
	--text-faint: #6c6a64;

	--accent: hsl(var(--accent-h), var(--accent-s), 62%);
	--accent-bright: hsl(var(--accent-h), 88%, 66%);
	--accent-deep: hsl(var(--accent-h), 70%, 44%);
	--accent-soft: hsla(var(--accent-h), var(--accent-s), 60%, 0.14);
	--accent-faint: hsla(var(--accent-h), var(--accent-s), 60%, 0.07);
	--on-accent: #041316;

	--ember: var(--hud-hp);
	--ember-soft: rgba(240, 133, 125, 0.12);

	--card-grad: linear-gradient(180deg, rgba(22, 23, 27, 0.78), rgba(10, 11, 14, 0.78));
	--shadow-card: 0 14px 40px rgba(0, 0, 0, 0.55), 0 0 0 1px rgba(0, 0, 0, 0.5);
	--shadow-soft: 0 6px 24px rgba(0, 0, 0, 0.4);
	--shadow-hard: 0 18px 40px rgba(0, 0, 0, 0.5);
	--glass: rgba(8, 9, 11, 0.66);
	--grid-line: rgba(218, 217, 207, 0.05);

	--key-top: #d7d6cd;
	--key-side: #9e9c94;
	--key-legend: #23221f;
	--key-shadow: rgba(0, 0, 0, 0.6);

	--grad-bg:
		radial-gradient(1100px 560px at 12% -6%, hsla(var(--accent-h), 80%, 55%, 0.08), transparent 60%),
		radial-gradient(900px 520px at 92% 8%, rgba(240, 133, 125, 0.05), transparent 55%),
		linear-gradient(180deg, #090a0c, #060708);
	--vignette: radial-gradient(ellipse at center, transparent 0%, rgba(0, 0, 0, 0.28) 62%, rgba(0, 0, 0, 0.62) 100%);
}

/* ---------- LIGHT: el nivel en gris (whitebox) ---------- */
[data-theme='light'] {
	color-scheme: light;
	--bg: #d8d7cf; /* suelo del nivel #d5d5ce */
	--bg-1: #e3e2db;
	--bg-2: #cecdc5;
	--surface: rgba(30, 28, 24, 0.025);
	--surface-2: rgba(30, 28, 24, 0.045);
	--border: rgba(30, 28, 24, 0.12);
	--border-strong: rgba(30, 28, 24, 0.22);
	--border-accent: hsla(var(--accent-h), 80%, 30%, 0.5);

	--text: #1c1b18;
	--text-muted: #55534d;
	--text-faint: #807d76;

	--accent: hsl(var(--accent-h), 80%, 30%);
	--accent-bright: hsl(var(--accent-h), 78%, 38%);
	--accent-deep: hsl(var(--accent-h), 82%, 26%);
	--accent-soft: hsla(var(--accent-h), 80%, 34%, 0.12);
	--accent-faint: hsla(var(--accent-h), 80%, 34%, 0.06);
	--on-accent: #f1fbfc;

	--ember: #c4544b;
	--ember-soft: rgba(196, 84, 75, 0.12);

	--card-grad: linear-gradient(180deg, #e6e5de, #dcdbd3);
	/* sombra dura y diagonal, como las cajas del nivel */
	--shadow-card: 14px 18px 0 rgba(48, 46, 42, 0.16), 0 0 0 1px rgba(30, 28, 24, 0.05);
	--shadow-soft: 6px 8px 0 rgba(48, 46, 42, 0.12);
	--shadow-hard: 22px 28px 0 rgba(48, 46, 42, 0.18);
	--glass: rgba(216, 215, 207, 0.78);
	--grid-line: rgba(30, 28, 24, 0.07);

	--key-top: #ecebe4;
	--key-side: #b3b1a9;
	--key-legend: #2a2926;
	--key-shadow: rgba(48, 46, 42, 0.35);

	--grad-bg:
		radial-gradient(1100px 560px at 12% -8%, hsla(var(--accent-h), 70%, 60%, 0.14), transparent 60%),
		radial-gradient(900px 520px at 92% 4%, rgba(233, 146, 95, 0.1), transparent 55%),
		linear-gradient(180deg, #dcdbd3, #d2d1c9);
	--vignette: radial-gradient(ellipse at center, transparent 0%, rgba(60, 58, 52, 0.06) 62%, rgba(60, 58, 52, 0.18) 100%);
}

/* ---------- base ---------- */
*,
*::before,
*::after {
	box-sizing: border-box;
}
html {
	scroll-behavior: smooth;
	scroll-padding-top: 76px;
}
body {
	margin: 0;
	background: var(--bg);
	background-image: var(--grad-bg);
	background-attachment: fixed;
	color: var(--text);
	font-family: var(--font-body);
	font-size: 16px;
	line-height: 1.6;
	-webkit-font-smoothing: antialiased;
	overflow-x: hidden;
	transition:
		background-color var(--t-state) var(--ease-out),
		color var(--t-state) var(--ease-out);
}
/* viñeta app-wide (AOWeb #209) */
body::before {
	content: '';
	position: fixed;
	inset: 0;
	background: var(--vignette);
	pointer-events: none;
	z-index: 0;
}
img,
video {
	max-width: 100%;
	display: block;
}
a {
	color: inherit;
	text-decoration: none;
}
button {
	font: inherit;
	color: inherit;
	cursor: pointer;
}
:focus-visible {
	outline: 2px solid var(--accent);
	outline-offset: 3px;
	border-radius: var(--r-md);
}
::selection {
	background: var(--accent-soft);
	color: var(--text);
}

/* scrollbar Atrium (ARGENTUM), en cian */
* {
	scrollbar-width: thin;
	scrollbar-color: hsla(var(--accent-h), 70%, 50%, 0.35) transparent;
}
::-webkit-scrollbar {
	width: 6px;
	height: 6px;
}
::-webkit-scrollbar-track,
::-webkit-scrollbar-corner {
	background: transparent;
}
::-webkit-scrollbar-thumb {
	background: hsla(var(--accent-h), 70%, 50%, 0.3);
	border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
	background: hsla(var(--accent-h), 80%, 60%, 0.65);
}
::-webkit-scrollbar-button {
	display: none;
}

.wrap {
	position: relative;
	z-index: 1;
	width: 100%;
	max-width: var(--maxw);
	margin: 0 auto;
	padding: 0 var(--gutter);
}

/* ---------- tipografía ---------- */
h1,
h2,
h3,
h4 {
	font-family: var(--font-display);
	font-weight: 600;
	line-height: 1.08;
	letter-spacing: -0.02em;
	color: var(--text);
	margin: 0;
}
p {
	margin: 0;
}
.brand-type {
	font-family: var(--font-brand);
	font-weight: 400;
	letter-spacing: 0.02em;
	text-transform: uppercase;
}
.display {
	font-size: clamp(2.8rem, 7.4vw, 5.6rem);
	line-height: 0.98;
}
.eyebrow {
	font-family: var(--font-mono);
	font-size: 0.74rem;
	letter-spacing: 0.22em;
	text-transform: uppercase;
	color: var(--accent);
	font-weight: 500;
}
.lead {
	font-size: clamp(1.05rem, 1.7vw, 1.22rem);
	color: var(--text-muted);
	line-height: 1.6;
}
.gradient-text {
	background: linear-gradient(120deg, var(--text) 35%, var(--hud-ice) 70%, var(--accent-bright) 115%);
	-webkit-background-clip: text;
	background-clip: text;
	-webkit-text-fill-color: transparent;
}
[data-theme='light'] .gradient-text {
	background: linear-gradient(120deg, var(--text) 40%, var(--accent-deep) 110%);
	-webkit-background-clip: text;
	background-clip: text;
}
.muted {
	color: var(--text-muted);
}
.mono {
	font-family: var(--font-mono);
}

/* título de sección con línea (homenaje al .title-border original) */
.section-head {
	display: flex;
	flex-direction: column;
	gap: 14px;
	margin-bottom: 40px;
	max-width: 720px;
}
.section-title {
	font-size: clamp(1.9rem, 3.6vw, 2.6rem);
	position: relative;
	display: inline-block;
	padding-bottom: 14px;
	align-self: flex-start;
}
.section-title::after {
	content: '';
	position: absolute;
	left: 0;
	bottom: 0;
	width: 56px;
	height: 2px;
	border-radius: 2px;
	background: linear-gradient(90deg, var(--ember), var(--hud-fire));
	opacity: 0.85;
}

/* ---------- frames con rol ---------- */
.frame {
	position: relative;
	background: var(--card-grad);
	border: 1px solid var(--border);
	border-radius: var(--r-lg);
	box-shadow: var(--shadow-card);
	transition:
		border-color var(--t-state) var(--ease-out),
		box-shadow var(--t-state) var(--ease-out),
		transform var(--t-state) var(--ease-out);
}
.frame-atrium {
	position: relative;
	overflow: hidden;
	background: var(--card-grad);
	border: 1px solid var(--border);
	border-radius: var(--r-xl);
	box-shadow:
		var(--shadow-card),
		0 0 30px var(--accent-faint);
}
.frame-atrium::before {
	content: '';
	position: absolute;
	top: -1px;
	left: 24px;
	right: 24px;
	height: 1px;
	background: linear-gradient(90deg, transparent, var(--accent), transparent);
	opacity: 0.7;
	z-index: 1;
}
.slate {
	background: var(--surface-2);
	border: 1px solid var(--border);
	border-radius: var(--r-sm);
	box-shadow: var(--shadow-soft);
}
.hover-lift:hover {
	border-color: var(--border-accent);
	transform: translateY(-3px);
	box-shadow:
		var(--shadow-card),
		0 0 28px var(--accent-faint);
}

/* ---------- botones / chips ---------- */
.btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 9px;
	font-family: var(--font-display);
	font-weight: 500;
	font-size: 0.95rem;
	letter-spacing: -0.01em;
	padding: 12px 22px;
	border-radius: var(--r-pill);
	border: 1px solid transparent;
	background: none;
	transition: all var(--t-out) var(--ease-out);
	white-space: nowrap;
}
.btn:active {
	transform: translateY(1px);
}
.btn-primary {
	background: linear-gradient(180deg, var(--accent-bright), var(--accent-deep));
	color: var(--on-accent);
	box-shadow:
		0 6px 18px var(--accent-soft),
		inset 0 1px 0 rgba(255, 255, 255, 0.25);
}
.btn-primary:hover {
	filter: brightness(1.06);
	transform: translateY(-1px);
}
.btn-ghost {
	background: var(--surface);
	color: var(--text);
	border-color: var(--border-strong);
}
.btn-ghost:hover {
	background: var(--surface-2);
	border-color: var(--border-accent);
}
.btn-lg {
	padding: 15px 30px;
	font-size: 1.02rem;
}
.btn svg {
	width: 17px;
	height: 17px;
	flex: none;
}
.chip {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	font-family: var(--font-mono);
	font-size: 0.72rem;
	letter-spacing: 0.04em;
	padding: 6px 13px;
	border-radius: var(--r-pill);
	border: 1px solid var(--border);
	background: var(--surface);
	color: var(--text-muted);
}
.dot {
	width: 7px;
	height: 7px;
	border-radius: 50%;
	background: var(--accent);
	box-shadow: 0 0 10px var(--accent);
	flex: none;
}
.dot.ember {
	background: var(--ember);
	box-shadow: 0 0 10px var(--ember);
}
.pulse {
	animation: livePulse 2.4s var(--ease-out) infinite;
}

/* ---------- header ---------- */
.site-header {
	position: sticky;
	top: 0;
	z-index: 50;
	background: var(--glass);
	backdrop-filter: blur(14px) saturate(1.2);
	-webkit-backdrop-filter: blur(14px) saturate(1.2);
	border-bottom: 1px solid var(--border);
}
.site-header .wrap {
	display: flex;
	align-items: center;
	gap: 20px;
	height: 64px;
}
.logo {
	display: flex;
	align-items: center;
	gap: 12px;
	flex: none;
}
/* logo como máscara: toma el color del tema */
.logo-mark {
	display: block;
	height: 38px;
	aspect-ratio: 640 / 263;
	background: var(--text);
	-webkit-mask: url('../img/asd-logo-mask.png') center / contain no-repeat;
	mask: url('../img/asd-logo-mask.png') center / contain no-repeat;
	transition: background-color var(--t-out) var(--ease-out);
}
.logo:hover .logo-mark {
	background: var(--accent);
}
.logo-mark-lg {
	height: 46px;
}
.nav {
	display: flex;
	gap: 4px;
	margin-left: auto;
}
.nav a {
	font-size: 0.9rem;
	color: var(--text-muted);
	padding: 8px 12px;
	border-radius: var(--r-md);
	transition:
		color var(--t-out) var(--ease-out),
		background var(--t-out) var(--ease-out);
}
.nav a:hover,
.nav a.active {
	color: var(--text);
	background: var(--surface-2);
}
.nav a.active {
	box-shadow: inset 0 -1px 0 var(--accent);
}
.header-tools {
	display: flex;
	gap: 8px;
	align-items: center;
}
.icon-btn {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	height: 36px;
	padding: 0 12px;
	border-radius: var(--r-pill);
	border: 1px solid var(--border);
	background: var(--surface);
	color: var(--text-muted);
	font-family: var(--font-mono);
	font-size: 0.72rem;
	letter-spacing: 0.04em;
	transition: all var(--t-out) var(--ease-out);
}
.icon-btn:hover {
	color: var(--text);
	border-color: var(--border-accent);
}
.icon-btn svg {
	width: 16px;
	height: 16px;
}
.icon-btn[aria-pressed='true'] {
	color: var(--accent);
	border-color: var(--border-accent);
	background: var(--accent-faint);
}
.icon-btn[aria-pressed='true'] .sound-state::after {
	content: 'on';
}
.sound-state::after {
	content: 'off';
}
.theme-btn .i-sun {
	display: none;
}
[data-theme='light'] .theme-btn .i-sun {
	display: block;
}
[data-theme='light'] .theme-btn .i-moon {
	display: none;
}

/* ---------- hero ---------- */
.hero {
	position: relative;
	min-height: min(calc(100svh - 64px), 940px);
	display: flex;
	align-items: center;
	padding: 72px 0 96px;
	overflow: hidden;
	isolation: isolate;
}
.hero-video {
	position: absolute;
	inset: 0;
	z-index: -2;
}
.hero-video video {
	width: 100%;
	height: 100%;
	object-fit: cover;
	filter: grayscale(0.8) contrast(1.05) brightness(0.9);
	opacity: 0.34;
}
[data-theme='light'] .hero-video video {
	filter: grayscale(1) contrast(0.9) brightness(1.3);
	opacity: 0.22;
}
.hero-video::after {
	content: '';
	position: absolute;
	inset: 0;
	background:
		radial-gradient(800px 420px at 18% 30%, hsla(var(--accent-h), 85%, 55%, 0.1), transparent 65%),
		radial-gradient(700px 420px at 85% 80%, rgba(240, 133, 125, 0.08), transparent 65%),
		linear-gradient(180deg, transparent 40%, var(--bg) 100%),
		linear-gradient(90deg, var(--bg) 0%, transparent 55%);
}
/* suelo del nivel: grilla de whitebox */
.floor-grid::before {
	content: '';
	position: absolute;
	inset: 0;
	z-index: -1;
	background-image:
		linear-gradient(var(--grid-line) 1px, transparent 1px),
		linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
	background-size: 48px 48px;
	-webkit-mask-image: radial-gradient(ellipse 75% 65% at 50% 45%, #000 25%, transparent 78%);
	mask-image: radial-gradient(ellipse 75% 65% at 50% 45%, #000 25%, transparent 78%);
	pointer-events: none;
}
.hero-grid {
	display: grid;
	grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
	gap: clamp(32px, 6vw, 80px);
	align-items: center;
}
.hero-copy {
	display: flex;
	flex-direction: column;
	gap: 24px;
}
.typed {
	font-family: var(--font-mono);
	font-size: clamp(1rem, 1.9vw, 1.25rem);
	color: var(--text);
	min-height: 1.6em;
	display: flex;
	align-items: center;
	gap: 2px;
}
.typed .prompt {
	color: var(--accent);
	margin-right: 10px;
}
.caret {
	display: inline-block;
	width: 0.6ch;
	height: 1.15em;
	background: var(--accent);
	box-shadow: 0 0 10px var(--accent-soft);
	animation: blink 1.05s steps(1) infinite;
	margin-left: 2px;
}
.hero-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
	margin-top: 6px;
}

/* ---------- keycaps A S D ---------- */
.keyboard {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 22px;
	padding: 40px 28px 30px;
}
.keys {
	display: flex;
	gap: clamp(10px, 2vw, 18px);
	perspective: 900px;
}
.key {
	--press: 0;
	position: relative;
	width: clamp(78px, 9.5vw, 112px);
	aspect-ratio: 1;
	border: 0;
	padding: 0;
	background: none;
	border-radius: var(--r-lg);
	transform: translateY(calc(var(--press) * 7px));
	transition: transform 70ms var(--ease-out);
	-webkit-tap-highlight-color: transparent;
}
/* cuerpo / lado de la tecla */
.key::before {
	content: '';
	position: absolute;
	inset: 0;
	border-radius: var(--r-lg);
	background: linear-gradient(180deg, var(--key-side), color-mix(in srgb, var(--key-side) 70%, #000));
	transform: translateY(calc((1 - var(--press)) * 9px + 2px));
	box-shadow:
		0 calc((1 - var(--press)) * 18px + 6px) calc((1 - var(--press)) * 22px + 10px) var(--key-shadow),
		0 0 calc(var(--glow, 0) * 34px) hsla(var(--accent-h), 90%, 60%, calc(var(--glow, 0) * 0.55));
	transition:
		transform 70ms var(--ease-out),
		box-shadow 160ms var(--ease-out);
}
/* tapa */
.key .cap {
	position: absolute;
	inset: 0;
	border-radius: var(--r-lg);
	background:
		radial-gradient(120% 90% at 50% 18%, rgba(255, 255, 255, 0.35), transparent 60%),
		linear-gradient(180deg, var(--key-top), color-mix(in srgb, var(--key-top) 88%, #000));
	box-shadow:
		inset 0 -6px 10px rgba(0, 0, 0, 0.14),
		inset 0 2px 0 rgba(255, 255, 255, 0.5);
	display: grid;
	place-items: center;
}
.key .legend {
	font-family: var(--font-brand);
	font-size: clamp(1.7rem, 3vw, 2.5rem);
	color: var(--key-legend);
	text-shadow: 0 1px 0 rgba(255, 255, 255, 0.35);
	transition:
		color 120ms var(--ease-out),
		text-shadow 160ms var(--ease-out);
	translate: 0 -4px;
}
.key .sub {
	position: absolute;
	right: 12px;
	bottom: 10px;
	font-family: var(--font-mono);
	font-size: 0.6rem;
	letter-spacing: 0.08em;
	color: color-mix(in srgb, var(--key-legend) 55%, transparent);
}
.key.is-down {
	--press: 1;
	--glow: 1;
}
.key.is-down .legend {
	color: var(--accent-deep);
	text-shadow: 0 0 14px hsla(var(--accent-h), 90%, 60%, 0.65);
}
.key:hover {
	--glow: 0.45;
}
.key:focus-visible {
	outline-offset: 10px;
}
.keyboard-hint {
	font-family: var(--font-mono);
	font-size: 0.72rem;
	letter-spacing: 0.08em;
	color: var(--text-faint);
	text-align: center;
}
.keyboard-hint b {
	color: var(--text-muted);
	font-weight: 500;
}
.key-meter {
	display: flex;
	gap: 18px;
	font-family: var(--font-mono);
	font-size: 0.72rem;
	color: var(--text-muted);
}
.key-meter span b {
	color: var(--text);
	font-weight: 500;
}

/* ---------- secciones ---------- */
.section {
	position: relative;
	padding: clamp(80px, 11vw, 132px) 0;
}
.divider-glow {
	height: 1px;
	background: linear-gradient(90deg, transparent, var(--border-accent), transparent);
	position: relative;
	z-index: 1;
}

/* ---------- juego: Ionias Call ---------- */
.game {
	display: grid;
	grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
	gap: 0;
}
.game-media {
	position: relative;
	background: #0b0c0e;
	border-right: 1px solid var(--border);
	min-height: 100%;
}
.game-media video {
	width: 100%;
	height: 100%;
	max-height: 640px;
	object-fit: cover;
}
.media-controls {
	position: absolute;
	left: 14px;
	right: 14px;
	top: 14px;
	display: flex;
	gap: 8px;
	flex-wrap: wrap;
}
.media-controls .icon-btn {
	background: rgba(8, 9, 11, 0.7);
	color: #dad9cf;
	border-color: rgba(218, 217, 207, 0.18);
	backdrop-filter: blur(8px);
}
.media-controls .icon-btn[aria-pressed='true'] {
	color: var(--hud-mp);
	border-color: rgba(47, 220, 240, 0.5);
}
.game-body {
	padding: clamp(28px, 4vw, 48px);
	display: flex;
	flex-direction: column;
	gap: 22px;
}
.game-title {
	font-family: var(--font-brand);
	font-weight: 400;
	font-size: clamp(2.2rem, 4.6vw, 3.4rem);
	letter-spacing: 0.01em;
	text-transform: uppercase;
	line-height: 1;
}
.chips {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

/* HUD replicado del video */
.hud {
	padding: 18px;
	display: flex;
	flex-direction: column;
	gap: 14px;
}
.hud-cast {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 6px;
	height: 30px;
	margin-bottom: -4px;
	opacity: 0.35;
	transition: opacity var(--t-out) var(--ease-out);
}
.hud-cast.on {
	opacity: 1;
}
.hud-cast .label {
	font-family: var(--font-display);
	font-size: 0.8rem;
	color: var(--text);
}
.hud-cast .track,
.hud-cast .fill,
.bar .track,
.bar .fill {
	display: block;
}
.hud-cast .track {
	width: 70%;
	height: 3px;
	background: var(--border-strong);
	border-radius: 2px;
	overflow: hidden;
}
.hud-cast .fill {
	height: 100%;
	width: 0;
	background: var(--hud-mp);
	box-shadow: 0 0 10px var(--hud-mp);
}
.bar {
	display: grid;
	grid-template-columns: 56px 1fr;
	align-items: center;
	gap: 12px;
	font-family: var(--font-mono);
	font-size: 0.78rem;
	color: var(--text);
}
.bar .track {
	height: 5px;
	border-radius: 3px;
	background: var(--border);
	overflow: hidden;
}
.bar .fill {
	height: 100%;
	border-radius: 3px;
	transition: width 420ms var(--ease-out);
}
.bar.hp .fill {
	background: var(--hud-hp);
	box-shadow: 0 0 10px rgba(240, 133, 125, 0.45);
}
.bar.mp .fill {
	background: var(--hud-mp);
	box-shadow: 0 0 10px rgba(47, 220, 240, 0.45);
}
.skills {
	display: flex;
	gap: 8px;
	align-items: center;
	flex-wrap: wrap;
}
.skill {
	position: relative;
	width: 48px;
	height: 48px;
	padding: 0;
	border-radius: var(--r-sm);
	border: 1px solid var(--border-strong);
	overflow: hidden;
	background: #111;
	transition:
		transform var(--t-out) var(--ease-out),
		border-color var(--t-out) var(--ease-out),
		box-shadow var(--t-out) var(--ease-out);
}
.skill img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	image-rendering: auto;
}
.skill:hover {
	transform: translateY(-2px);
	border-color: var(--border-accent);
}
.skill.ready {
	box-shadow: 0 0 0 1px var(--hud-mp), 0 0 16px rgba(47, 220, 240, 0.35);
}
.skill .cd {
	position: absolute;
	inset: 0;
	background: rgba(6, 7, 9, 0.7);
	transform-origin: bottom;
	transform: scaleY(0);
}
.skill .kbd {
	position: absolute;
	left: 3px;
	top: 2px;
	font-family: var(--font-mono);
	font-size: 0.6rem;
	color: #eceae2;
	text-shadow: 0 1px 2px #000;
}
.skill-slots {
	flex: 1;
	min-width: 60px;
	height: 48px;
	border-radius: var(--r-sm);
	border: 1px dashed var(--border);
}
.cast-row {
	display: flex;
	gap: 12px;
	align-items: center;
	flex-wrap: wrap;
}
.flash {
	position: absolute;
	inset: 0;
	pointer-events: none;
	background: radial-gradient(circle at 50% 55%, rgba(191, 230, 238, 0.55), transparent 60%);
	opacity: 0;
}
.flash.go {
	animation: flash 520ms var(--ease-out);
}

/* ---------- equipo ---------- */
.team {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 20px;
}
.member {
	padding: 22px;
	display: flex;
	flex-direction: column;
	gap: 18px;
}
.member .avatar {
	aspect-ratio: 1;
	width: 100%;
	border-radius: var(--r-md);
	overflow: hidden;
	border: 1px solid var(--border);
	background: var(--bg-2);
}
.member .avatar img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	filter: grayscale(0.85) contrast(1.05);
	transition:
		filter var(--t-state) var(--ease-out),
		transform 600ms var(--ease-out);
}
.member:hover .avatar img {
	filter: none;
	transform: scale(1.04);
}
.member h3 {
	font-size: 1.3rem;
}
.member .meta {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
}

/* ---------- stack ---------- */
.stack {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	overflow: hidden;
}
.stack-item {
	display: grid;
	grid-template-columns: 34px 1fr auto;
	align-items: center;
	gap: 14px;
	padding: 16px 20px;
	border-bottom: 1px solid var(--border);
	transition: background var(--t-out) var(--ease-out);
}
.stack-item:nth-child(odd) {
	border-right: 1px solid var(--border);
}
.stack-item:nth-last-child(-n + 2) {
	border-bottom: 0;
}
.stack-item:hover {
	background: var(--surface-2);
}
.stack-item .glyph {
	width: 34px;
	height: 34px;
	border-radius: var(--r-sm);
	display: grid;
	place-items: center;
	font-family: var(--font-mono);
	font-size: 0.7rem;
	color: var(--accent);
	background: var(--accent-faint);
	border: 1px solid var(--border);
}
.stack-item .name {
	font-family: var(--font-display);
	font-weight: 500;
}
.stack-item .what {
	font-size: 0.86rem;
	color: var(--text-muted);
}
.stack-item .tag {
	font-family: var(--font-mono);
	font-size: 0.68rem;
	color: var(--text-faint);
}
.stack-item .arrow {
	color: var(--text-faint);
	transition:
		color var(--t-out) var(--ease-out),
		transform var(--t-out) var(--ease-out);
}
.stack-item:hover .arrow {
	color: var(--accent);
	transform: translate(2px, -2px);
}

/* ---------- contacto ---------- */
.contact {
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
	gap: clamp(24px, 4vw, 48px);
	padding: clamp(28px, 4vw, 48px);
	align-items: center;
}
.contact iframe {
	width: 100%;
	height: 420px;
	border: 1px solid var(--border);
	border-radius: var(--r-lg);
	background: var(--bg-1);
}

/* ---------- footer ---------- */
.site-footer {
	position: relative;
	z-index: 1;
	border-top: 1px solid var(--border);
	padding: 36px 0 44px;
}
.site-footer .wrap {
	display: flex;
	flex-wrap: wrap;
	gap: 18px 32px;
	align-items: center;
	justify-content: space-between;
}
.site-footer .nav {
	margin-left: 0;
}
.fine {
	font-family: var(--font-mono);
	font-size: 0.72rem;
	color: var(--text-faint);
	letter-spacing: 0.02em;
}

/* ---------- animaciones ---------- */
@keyframes livePulse {
	0%,
	100% {
		opacity: 1;
		box-shadow: 0 0 8px var(--accent);
	}
	50% {
		opacity: 0.55;
		box-shadow: 0 0 14px var(--accent);
	}
}
@keyframes blink {
	0%,
	50% {
		opacity: 1;
	}
	50.01%,
	100% {
		opacity: 0;
	}
}
@keyframes flash {
	0% {
		opacity: 0;
	}
	25% {
		opacity: 1;
	}
	100% {
		opacity: 0;
	}
}
.reveal {
	opacity: 0;
	transform: translateY(22px);
	transition:
		opacity 0.7s var(--ease-out),
		transform 0.7s var(--ease-out);
}
.reveal.in {
	opacity: 1;
	transform: none;
}
@media (prefers-reduced-motion: reduce) {
	*,
	*::before,
	*::after {
		animation-duration: 0.01ms !important;
		animation-iteration-count: 1 !important;
		transition-duration: 0.01ms !important;
		scroll-behavior: auto !important;
	}
	.reveal {
		opacity: 1;
		transform: none;
	}
}

/* ---------- responsive ---------- */
@media (max-width: 980px) {
	.hero-grid,
	.game,
	.contact {
		grid-template-columns: 1fr;
	}
	.game-media {
		border-right: 0;
		border-bottom: 1px solid var(--border);
	}
	.game-media video {
		max-height: 520px;
	}
	.team {
		grid-template-columns: repeat(3, minmax(0, 1fr));
		gap: 14px;
	}
}
@media (max-width: 760px) {
	.site-header .wrap {
		height: auto;
		flex-wrap: wrap;
		padding-top: 10px;
		padding-bottom: 10px;
		row-gap: 6px;
	}
	.site-header .nav {
		order: 3;
		width: 100%;
		margin-left: 0;
		overflow-x: auto;
	}
	.header-tools {
		margin-left: auto;
	}
	.team {
		grid-template-columns: 1fr;
	}
	.member {
		flex-direction: row;
		align-items: center;
	}
	.member .avatar {
		width: 88px;
		flex: none;
	}
	.stack {
		grid-template-columns: 1fr;
	}
	.stack-item:nth-child(odd) {
		border-right: 0;
	}
	.stack-item:nth-last-child(2) {
		border-bottom: 1px solid var(--border);
	}
	.hero {
		padding-top: 48px;
	}
	.skill-slots {
		display: none;
	}
}
