/* Import Google Fonts for all available fonts */
@import url('https://fonts.googleapis.com/css2?family=Anton:wght@400&family=Azeret+Mono:wght@400;500;700&family=Courier+Prime:wght@400;700&family=DM+Mono:wght@400;500&family=DM+Sans:wght@400;500;700&family=Fondamento:wght@400&family=Fraunces:wght@300;400;700&family=Gentium+Plus:wght@400;700&family=Inter:wght@300;400;500;600;700&family=JetBrains+Mono:wght@400;500;700&family=Roboto:wght@300;400;500;700&family=Space+Mono:wght@400;700&display=swap');

/* Utility classes */
.hidden {
  display: none !important;
}

/* Note: Bagnard is a custom font that may need to be loaded separately */
/* For now, we'll use a fallback to a similar serif font */

:root {
  /* Canonical design variables - set by templates */
  /* These will be overridden by BaseLayout with actual dynamic values */
  --bodyFont: 'Inter';
  --headerFont: 'Inter';
  --backgroundColor: #000000;
  --foregroundColor: #ffffff;
  --accentColor: #00ff04;
  
  /* RGB component extraction for internal calculations */
  /* These will be set by BaseLayout JavaScript */
  --color-accent-r: 0;
  --color-accent-g: 255;
  --color-accent-b: 4;
  --color-foreground-r: 255;
  --color-foreground-g: 255;
  --color-foreground-b: 255;
  --color-background-r: 0;
  --color-background-g: 0;
  --color-background-b: 0;
  
  /* Legacy compatibility - derived from canonical variables */
  --color-background: var(--backgroundColor);
  --color-foreground: var(--foregroundColor);
  --color-accent: var(--accentColor);
  --font-body: var(--bodyFont), sans-serif;
  --font-heading: var(--headerFont), sans-serif;
  
  /* RGB component variables - these will be set by JavaScript */
  --color-background-r: 15;
  --color-background-g: 15;
  --color-background-b: 15;
  --color-foreground-r: 255;
  --color-foreground-g: 255;
  --color-foreground-b: 255;
  --color-accent-r: 0;
  --color-accent-g: 255;
  --color-accent-b: 4;
  
  /* RGB format variables for Tailwind compatibility */
  --background: var(--color-background-r), var(--color-background-g), var(--color-background-b);
  --foreground: var(--color-foreground-r), var(--color-foreground-g), var(--color-foreground-b);
  --accent: var(--color-accent-r), var(--color-accent-g), var(--color-accent-b);
  --background-rgb: var(--background);
  --foreground-rgb: var(--foreground);
  --accent-rgb: var(--accent);
  
  /* Legacy RGB variables for backward compatibility */
  --backgroundColorRgb: var(--background);
  --foregroundColorRgb: var(--foreground);
  --accentColorRgb: var(--accent);
  
  /* Derived opacity variants using color-mix() */
  --color-accent-muted: color-mix(in srgb, var(--accentColor) 50%, transparent);
  --color-accent-subtle: color-mix(in srgb, var(--accentColor) 70%, transparent);
  --color-accent-subliminal: color-mix(in srgb, var(--accentColor) 10%, transparent);
  
  --color-foreground-muted: color-mix(in srgb, var(--foregroundColor) 70%, transparent);
  --color-foreground-subtle: color-mix(in srgb, var(--foregroundColor) 50%, transparent);
  --color-foreground-subliminal: color-mix(in srgb, var(--foregroundColor) 10%, transparent);
  
  --color-background-muted: color-mix(in srgb, var(--backgroundColor) 70%, transparent);
  --color-background-subtle: color-mix(in srgb, var(--backgroundColor) 50%, transparent);
  --color-background-subliminal: color-mix(in srgb, var(--backgroundColor) 10%, transparent);
  --shadow-sm: 0 4px 6px rgba(0, 0, 0, 0.1);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.15);
  --shadow-lg: 0 15px 35px rgba(0, 0, 0, 0.2);
  --border-radius-sm: 8px;
  --border-radius-md: 12px;
  --border-radius-lg: 16px;
  --transition-fast: 0.2s ease;
  --transition-normal: 0.3s ease;
  --transition-slow: 0.5s ease;
}

/* Global Reset */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* Base Typography */
body {
  font-family: var(--font-body);
  background-color: var(--color-background);
  color: var(--color-foreground);
  line-height: 1.6;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 600;
  line-height: 1.2; 
  letter-spacing: -0.02em;
}

a {
  color: var(--color-accent-muted);
  text-decoration: none;
  transition: color 0.3s ease;
}

a:hover {
  color: var(--color-accent);
}

/* Global Layout Utilities */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.section {
  padding: 80px 0;
}

/* Global Button Base */
.btn {
  display: inline-block;
  padding: 12px 24px;
  background: linear-gradient(135deg, var(--color-accent), var(--color-accent));
  color: var(--color-background);
  border: none;
  border-radius: var(--border-radius-sm);
  cursor: pointer;
  font-weight: 500;
  transition: all var(--transition-normal);
  text-decoration: none;
  position: relative;
  overflow: hidden;
  z-index: 1;
}

.btn:hover {
  background: linear-gradient(135deg, var(--color-accent-subtle), var(--color-accent-subtle));
  transform: translateY(-2px);
  box-shadow: var(--shadow-md), 0 0 15px var(--color-background);
  color: var(--color-background);
}

/* Global Image Fallback */
.fallback-container {
  position: relative;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--color-background);
}

/* Global No Content */
.no-content {
  text-align: center;
  color: var(--color-foreground);
  padding: 2rem;
  opacity: 0.7;
}

.no-content p {
  margin: 0;
  font-size: 1rem;
}
