/*
Theme Name: Nubimancy Dual Reality
Theme URI: https://github.com/Nubimancy/wordpress-customs
Author: Nubimancy Team
Author URI: https://nubimancy.com
Description: A dual-mode WordPress block theme that seamlessly switches between fantasy "In-Lore" presentation and professional "Meta" content modes. Perfect for educational content that blends storytelling with technical expertise.
Version: 0.1.0
Requires at least: 6.4
Tested up to: 6.7
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: nubimancy-dual-reality
Tags: block-theme, dual-mode, education, fantasy, custom-colors, custom-menu, editor-style, full-site-editing, rtl-language-support, sticky-post, threaded-comments, translation-ready, wide-blocks

Nubimancy Dual Reality WordPress Theme, (C) 2025 Nubimancy Team
Nubimancy Dual Reality is distributed under the terms of the GNU GPL.
*/

/* 
 * Base styles are defined in theme.json
 * This file contains CSS that cannot be defined in theme.json
 */

/* Import Google Fonts for both modes */
@import url('https://fonts.googleapis.com/css2?family=Cinzel:wght@400;600;700&family=Merriweather:ital,wght@0,300;0,400;0,700;1,300;1,400&family=Inter:wght@300;400;500;600;700&family=Fira+Code:wght@400;500&display=swap');

/* Import Homebrewery-compatible D&D fonts for In-Lore mode */
/* Attribution: Font styling inspired by Homebrewery (https://github.com/naturalcrit/homebrewery) - MIT License */
@import url('https://fonts.googleapis.com/css2?family=Libre+Baskerville:ital,wght@0,400;0,700;1,400&family=Crimson+Text:ital,wght@0,400;0,600;0,700;1,400&display=swap');

/* Root CSS Variables for Mode Switching */
:root {
	/* Default (Meta Mode) Colors */
	--nubi-bg-primary: #FFFFFF;
	--nubi-bg-secondary: #F3F4F6;
	--nubi-text-primary: #111827;
	--nubi-text-secondary: #6B7280;
	--nubi-accent-primary: #2563EB;
	--nubi-accent-secondary: #10B981;
	
	/* Default (Meta Mode) Fonts */
	--nubi-font-heading: "Inter", "Open Sans", system-ui, -apple-system, sans-serif;
	--nubi-font-body: "Inter", "Open Sans", system-ui, -apple-system, sans-serif;
	--nubi-font-code: "Fira Code", "Consolas", "Monaco", monospace;
}

/* In-Lore Mode Override */
body.content-mode-in-lore {
	/* In-Lore Colors */
	--nubi-bg-primary: #FEF3C7;
	--nubi-bg-secondary: #F8FAFC;
	--nubi-text-primary: #1E293B;
	--nubi-text-secondary: #475569;
	--nubi-accent-primary: #6B46C1;
	--nubi-accent-secondary: #3B82F6;
	
	/* In-Lore Fonts */
	--nubi-font-heading: "Cinzel", "Spectral", Georgia, serif;
	--nubi-font-body: "Merriweather", "Lora", Georgia, serif;
	
	/* Apply background */
	background-color: var(--nubi-bg-primary);
	color: var(--nubi-text-primary);
}

/* Apply mode-specific typography */
body.content-mode-in-lore h1,
body.content-mode-in-lore h2,
body.content-mode-in-lore h3,
body.content-mode-in-lore h4,
body.content-mode-in-lore h5,
body.content-mode-in-lore h6 {
	font-family: var(--nubi-font-heading);
}

body.content-mode-in-lore p,
body.content-mode-in-lore li,
body.content-mode-in-lore blockquote {
	font-family: var(--nubi-font-body);
}

body.content-mode-meta h1,
body.content-mode-meta h2,
body.content-mode-meta h3,
body.content-mode-meta h4,
body.content-mode-meta h5,
body.content-mode-meta h6,
body.content-mode-meta p,
body.content-mode-meta li,
body.content-mode-meta blockquote {
	font-family: var(--nubi-font-heading);
}

/* Code blocks always use monospace */
code,
pre,
.wp-block-code {
	font-family: var(--nubi-font-code) !important;
}

/* Link colors based on mode */
body.content-mode-in-lore a {
	color: var(--nubi-accent-primary);
}

body.content-mode-in-lore a:hover {
	color: var(--nubi-accent-secondary);
}

body.content-mode-meta a {
	color: var(--nubi-accent-primary);
}

body.content-mode-meta a:hover {
	color: #1D4ED8;
}

/* In-Lore Mode: Decorative Elements */
body.content-mode-in-lore {
	/* Add subtle texture (placeholder for future background image) */
	position: relative;
}

body.content-mode-in-lore::before {
	content: '';
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	opacity: 0.03;
	z-index: -1;
	pointer-events: none;
	/* Future: background-image: url('assets/images/textures/parchment.png'); */
}

/* Mode Indicator Styling */
.mode-indicator {
	position: fixed;
	bottom: 20px;
	right: 20px;
	padding: 8px 16px;
	border-radius: 20px;
	font-size: 0.75rem;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.05em;
	z-index: 1000;
	box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
	transition: all 0.3s ease;
}

body.content-mode-in-lore .mode-indicator {
	background: linear-gradient(135deg, #6B46C1 0%, #3B82F6 100%);
	color: #FFFFFF;
}

body.content-mode-meta .mode-indicator {
	background: linear-gradient(135deg, #2563EB 0%, #10B981 100%);
	color: #FFFFFF;
}

.mode-indicator::before {
	content: '🏰 ';
}

body.content-mode-meta .mode-indicator::before {
	content: '🔧 ';
}

/* Responsive adjustments */
@media (max-width: 768px) {
	.mode-indicator {
		bottom: 10px;
		right: 10px;
		font-size: 0.65rem;
		padding: 6px 12px;
	}
}

/* Accessibility: Ensure sufficient contrast */
@media (prefers-contrast: high) {
	body.content-mode-in-lore {
		--nubi-bg-primary: #FFFBEB;
		--nubi-text-primary: #000000;
	}
}

/* Print styles */
@media print {
	.mode-indicator {
		display: none;
	}
	
	body.content-mode-in-lore::before {
		display: none;
	}
}
