/* variables.css
 * Tokens visuales de Spooktrace.
 *
 * Base: tema "libre" del sistema de referencia, adaptado a paleta morada.
 * Caracteristicas conservadas: radios grandes, sombras con brillo del acento,
 * tipografia display monoespaciada, letter-spacing negativo y gradiente radial.
 *
 * El modo se declara en <html data-mode="dark|light">. El tema es unico:
 * "spooktrace". Los tres modos de preferencia son dark, light y system;
 * el modo system se resuelve a dark o light antes de pintar.
 */

:root {
	/* Tipografia */
	--font-display: 'Space Mono', ui-monospace, 'SFMono-Regular', monospace;
	--font-body: 'Nunito Sans', -apple-system, 'Segoe UI', system-ui, sans-serif;

	/* Radios: grandes, caracteristica del tema libre */
	--radius: 14px;
	--radius-lg: 20px;
	--radius-xl: 28px;
	--radius-pill: 999px;

	/* Retícula */
	--container: 1200px;
	--header-height: 72px;
	--sidebar-width: 244px;
	--sidebar-collapsed-width: 60px;

	/* Tipografia display */
	--letter-disp: -0.02em;
	--wt-disp: 700;

	/* Espaciado */
	--space-1: 4px;
	--space-2: 8px;
	--space-3: 12px;
	--space-4: 16px;
	--space-5: 24px;
	--space-6: 32px;
	--space-7: 48px;
	--space-8: 64px;
	--space-9: 96px;

	/* Transiciones */
	--ease: cubic-bezier(0.22, 1, 0.36, 1);
	--t-fast: 0.16s var(--ease);
	--t-base: 0.28s var(--ease);
	--t-slow: 0.5s var(--ease);

	/* Escala tipografica */
	--fs-xs: 12px;
	--fs-sm: 13.5px;
	--fs-base: 15.5px;
	--fs-lg: 18px;
	--fs-xl: 22px;
	--fs-2xl: 28px;
	--fs-3xl: clamp(1.6rem, 3.2vw, 2.4rem);
	--fs-4xl: clamp(2rem, 4.6vw, 3.6rem);

	color-scheme: dark;
}

/* ---------- Modo oscuro ---------- */

[data-mode='dark'] {
	--bg: #0a0714;
	--bg-elevated: #100b1e;
	--surface: #16102a;
	--surface-2: #1e1638;
	--surface-3: #261b47;

	--border: #2e2350;
	--border-strong: #3f3170;

	--accent: #a78bfa;
	--accent-strong: #c4b5fd;
	--accent-deep: #7c3aed;
	--accent-2: #e879f9;

	--accent-glow: rgba(167, 139, 250, 0.18);
	--accent-2-glow: rgba(232, 121, 249, 0.12);

	--text: #ede9fe;
	--text-2: #a99fc4;
	--text-3: #6b6191;
	--text-inverse: #1a1030;

	--success: #34d399;
	--success-bg: rgba(52, 211, 153, 0.12);
	--warning: #fbbf24;
	--warning-bg: rgba(251, 191, 36, 0.12);
	--danger: #f87171;
	--danger-bg: rgba(248, 113, 113, 0.12);
	--info: #60a5fa;
	--info-bg: rgba(96, 165, 250, 0.12);

	--shadow-card: 0 8px 32px rgba(124, 58, 237, 0.1), 0 0 0 1px var(--border);
	--shadow-card-hover: 0 14px 44px rgba(124, 58, 237, 0.2), 0 0 0 1px var(--border-strong);
	--shadow-btn: 0 4px 22px rgba(167, 139, 250, 0.3);
	--shadow-soft: 0 2px 12px rgba(0, 0, 0, 0.4);

	--gradient-hero: radial-gradient(ellipse at 72% 22%, #241650 0%, #0a0714 66%);
	--gradient-panel: linear-gradient(160deg, var(--surface) 0%, var(--bg-elevated) 100%);
	--modal-overlay: rgba(6, 4, 14, 0.86);

	color-scheme: dark;
}

/* ---------- Modo claro ---------- */

[data-mode='light'] {
	--bg: #f8f6fe;
	--bg-elevated: #ffffff;
	--surface: #ffffff;
	--surface-2: #f1ecfd;
	--surface-3: #e7dffb;

	--border: #ddd3f5;
	--border-strong: #c3b4ee;

	--accent: #6d28d9;
	--accent-strong: #5b21b6;
	--accent-deep: #4c1d95;
	--accent-2: #a21caf;

	--accent-glow: rgba(109, 40, 217, 0.12);
	--accent-2-glow: rgba(162, 28, 175, 0.1);

	--text: #1a1030;
	--text-2: #574e75;
	--text-3: #948cb0;
	--text-inverse: #ffffff;

	--success: #047857;
	--success-bg: rgba(4, 120, 87, 0.1);
	--warning: #b45309;
	--warning-bg: rgba(180, 83, 9, 0.1);
	--danger: #b91c1c;
	--danger-bg: rgba(185, 28, 28, 0.09);
	--info: #1d4ed8;
	--info-bg: rgba(29, 78, 216, 0.09);

	--shadow-card: 0 6px 28px rgba(76, 29, 149, 0.08), 0 0 0 1px var(--border);
	--shadow-card-hover: 0 12px 38px rgba(76, 29, 149, 0.16), 0 0 0 1px var(--border-strong);
	--shadow-btn: 0 4px 20px rgba(109, 40, 217, 0.26);
	--shadow-soft: 0 2px 10px rgba(76, 29, 149, 0.08);

	--gradient-hero: radial-gradient(ellipse at 68% 24%, #ece3fd 0%, #f8f6fe 68%);
	--gradient-panel: linear-gradient(160deg, #ffffff 0%, var(--surface-2) 100%);
	--modal-overlay: rgba(26, 16, 48, 0.5);

	color-scheme: light;
}
