/* =====================================================================
   SUPERVIVENCIA · SHARED
   Variables, paleta, tipografía base. Cargado en ambas plantillas.
   ===================================================================== */

:root {
	/* Paleta "Burnt" (default) — tierra quemada, musgo, hueso, ocre */
	--bg-deep:        #0a0c0e;
	--bg:             #14171a;
	--bg-soft:        #1c2024;
	--moss:           #4a5440;
	--moss-dim:       #2a3028;
	--rust:           #c25a1f;
	--rust-deep:      #8a3a15;
	--ochre:          #9a9285;
	--ochre-dim:      #5e5950;
	--bone:           #d4cdbf;
	--bone-dim:       #807a70;
	--blood:          #6a2018;
	--warning:        #d96828;
	--ink:            #050608;
	--concrete:       #4a4d52;
	--concrete-light: #7a7d83;

	/* Intensidad de efectos (fijas) */
	--particles-intensity: 1;
	--grain-intensity:     1;
	--flicker-intensity:   1;
	--speed:               1;
}

*,
*::before,
*::after {
	box-sizing: border-box;
	margin: 0;
	padding: 0;
}

html,
body {
	background: var(--ink);
	color: var(--bone);
	font-family: 'Special Elite', 'Courier New', monospace;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
	text-rendering: optimizeLegibility;
}

/* Selección de texto en la paleta */
::selection {
	background: rgba(194, 90, 31, 0.4);
	color: var(--bone);
}

/* ---------- TIPOGRAFÍA ---------- */
.display {
	font-family: 'Cinzel', 'Times New Roman', serif;
	font-weight: 700;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	line-height: 0.95;
}

.mono {
	font-family: 'Special Elite', 'Courier New', monospace;
}

.serif {
	font-family: 'IM Fell English', 'Times New Roman', serif;
	font-style: italic;
}

.accent {
	color: var(--rust);
}

.muted {
	color: var(--ochre-dim);
}

/* ---------- ANIMACIONES BASE ---------- */
.reveal {
	animation: reveal calc(1.4s / var(--speed)) cubic-bezier(0.2, 0.7, 0.2, 1) forwards;
	animation-fill-mode: forwards;
}

@keyframes reveal {
	0% {
		opacity: 0;
		filter: blur(14px);
		transform: translateY(18px);
		letter-spacing: 0.18em;
	}
	60% {
		opacity: 1;
	}
	100% {
		opacity: 1;
		filter: blur(0);
		transform: translateY(0);
		letter-spacing: 0.01em;
	}
}

.reveal-soft {
	animation: reveal-soft calc(1.1s / var(--speed)) ease-out forwards;
	animation-fill-mode: forwards;
}

@keyframes reveal-soft {
	0% {
		opacity: 0;
		transform: translateY(12px);
	}
	100% {
		opacity: 1;
		transform: translateY(0);
	}
}

@media (prefers-reduced-motion: reduce) {
	.reveal, .reveal-soft {
		animation: none !important;
		opacity: 1 !important;
		filter: none !important;
		transform: none !important;
		letter-spacing: normal !important;
	}
}

.d1 { animation-delay: 0.2s; }
.d2 { animation-delay: 0.5s; }
.d3 { animation-delay: 0.8s; }
.d4 { animation-delay: 1.1s; }
.d5 { animation-delay: 1.4s; }
.d6 { animation-delay: 1.7s; }
.d7 { animation-delay: 2.0s; }

/* ---------- FLICKER ---------- */
.flicker {
	animation: flicker calc(7s / var(--speed)) infinite;
}

@keyframes flicker {
	0%, 100% { opacity: 1; }
	3%       { opacity: calc(0.4 * (1 - var(--flicker-intensity) * 0.6) + 0.4); }
	6%       { opacity: 1; }
	7%       { opacity: 0.7; }
	8%       { opacity: 1; }
	60%      { opacity: 1; }
	61%      { opacity: 0.3; }
	62%      { opacity: 1; }
}

/* ---------- PARTÍCULAS (canvas fixed) ---------- */
#particles-canvas {
	position: fixed;
	inset: 0;
	pointer-events: none;
	z-index: 49;
	opacity: var(--particles-intensity);
}

/* ---------- TAG (con punto pulsante) ---------- */
.tag {
	display: inline-flex;
	align-items: center;
	gap: 12px;
	font-family: 'Special Elite', monospace;
	letter-spacing: 0.25em;
	text-transform: uppercase;
	color: var(--ochre);
}

.tag::before {
	content: "";
	display: inline-block;
	width: 10px;
	height: 10px;
	background: var(--warning);
	border-radius: 50%;
	box-shadow: 0 0 12px var(--warning);
	animation: pulse calc(1.5s / var(--speed)) ease-in-out infinite;
}

@keyframes pulse {
	0%, 100% { opacity: 1; transform: scale(1); }
	50%      { opacity: 0.4; transform: scale(0.8); }
}

/* ---------- SOURCE LINE ---------- */
.source {
	font-family: 'Special Elite', monospace;
	color: var(--bone-dim);
	letter-spacing: 0.15em;
	text-transform: uppercase;
	opacity: 0.7;
	border-top: 1px solid rgba(154, 146, 133, 0.2);
	padding-top: 12px;
	margin-top: 24px;
}
