@tailwind base;
@tailwind components;
@tailwind utilities;

/* FONT DEFINITIONS */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/fonts/inter/Inter.woff2') format('woff2');
}

:root {
  --background: #0a0f08;
  --card: #1a2418;
  --foreground: #f5f5f1;
  --primary-cta: #8b9d6f;
  --secondary-cta: #ffffff;
  --accent: #d4af37;
  --background-accent: #2a3f2a;

  /* Core spacing and sizing */
  --radius: 0.5rem;
  --space-unit: 1rem;
  --content-max-width: 1200px;

  /* Theme-responsive colors */
  --text-primary: var(--foreground);
  --text-secondary: color-mix(in srgb, var(--foreground) 70%, transparent);
  --text-muted: color-mix(in srgb, var(--foreground) 50%, transparent);
  
  /* Interactive states */
  --hover-overlay: color-mix(in srgb, var(--foreground) 5%, transparent);
  --focus-ring: var(--primary-cta);
  
  /* Borders and dividers */
  --border-subtle: color-mix(in srgb, var(--foreground) 10%, transparent);
  --border-medium: color-mix(in srgb, var(--foreground) 20%, transparent);
  
  /* Shadows and depth */
  --shadow-subtle: 0 1px 3px color-mix(in srgb, var(--background) 50%, transparent);
  --shadow-medium: 0 4px 12px color-mix(in srgb, var(--background) 30%, transparent);
}

/* Dark theme adjustments (if needed) */
@media (prefers-color-scheme: dark) {
  :root {
    /* Dark theme already applied in default values */
  }
}

/* Base styles */
* {
  border-color: var(--border-subtle);
}

body {
  color: var(--text-primary);
  background: var(--background);
  font-feature-settings: "rlig" 1, "calt" 1;
}

/* Utility classes for theme integration */
.bg-theme-background {
  background-color: var(--background);
}

.bg-theme-card {
  background-color: var(--card);
}

.text-theme-primary {
  color: var(--text-primary);
}

.text-theme-secondary {
  color: var(--text-secondary);
}

.text-theme-muted {
  color: var(--text-muted);
}

.border-theme {
  border-color: var(--border-subtle);
}

.shadow-theme {
  box-shadow: var(--shadow-medium);
}

/* Focus states */
.focus-theme:focus {
  outline: 2px solid var(--focus-ring);
  outline-offset: 2px;
}

/* Animation and transition defaults */
.transition-theme {
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Responsive typography scale */
.text-responsive-sm {
  font-size: clamp(0.875rem, 0.8rem + 0.4vw, 1rem);
}

.text-responsive-base {
  font-size: clamp(1rem, 0.9rem + 0.5vw, 1.125rem);
}

.text-responsive-lg {
  font-size: clamp(1.125rem, 1rem + 0.625vw, 1.375rem);
}

.text-responsive-xl {
  font-size: clamp(1.25rem, 1.1rem + 0.75vw, 1.75rem);
}

.text-responsive-2xl {
  font-size: clamp(1.5rem, 1.3rem + 1vw, 2.25rem);
}

/* Content width utilities */
.content-width-sm {
  max-width: 65ch;
}

.content-width-md {
  max-width: 75ch;
}

.content-width-lg {
  max-width: 85ch;
}

/* Accessibility improvements */
@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;
  }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
  :root {
    --border-subtle: var(--foreground);
    --text-secondary: var(--foreground);
  }
}
