/* Doomsun Design System - Core Variables and Utilities */

:root {
  /* Colors */
  --color-bg-primary: #000000;
  --color-bg-secondary: #0A0A0A;
  --color-bg-tertiary: #141414;
  --color-bg-card: #1A1A1A;

  /* Doomsun Brand Colors - Custom palette */
  --color-doomsun-red: #F68777;
  --color-doomsun-blue: #74A9EE;
  --color-doomsun-green: #C6F0C2;
  --color-doomsun-yellow: #FFF874;
  --color-doomsun-dark: #000000;

  /* Daylight Product Colors */
  --color-daylight-cyan: #74A9EE;
  --color-daylight-teal: #5A8FD4;
  --color-daylight-blue: #74A9EE;

  /* NOVA Platform Colors */
  --color-nova-yellow: #FFF874;
  --color-nova-gold: #FFE55A;
  --color-nova-light: #FFFAA0;

  /* Legacy accent colors for transitions */
  --color-accent-coral: #FF6B6B;
  --color-accent-pink: #FF8787;
  --color-accent-cyan: #4ECDC4;
  --color-accent-teal: #45B7D1;
  --color-accent-purple: #6C63FF;

  --color-text-primary: #FFFFFF;
  --color-text-secondary: #B0B0B0;
  --color-text-muted: #808080;

  /* Gradients */
  --gradient-radial-burst: radial-gradient(circle at center, rgba(255, 107, 107, 0.3), rgba(255, 135, 135, 0.1), transparent);
  --gradient-data-flow: linear-gradient(135deg, #4ECDC4, #45B7D1, #6C63FF);
  --gradient-subtle-glow: radial-gradient(ellipse at top, rgba(255, 107, 107, 0.05), transparent);
  --gradient-hero: linear-gradient(180deg, rgba(0,0,0,0) 0%, rgba(0,0,0,0.8) 50%, #000000 100%);

  /* Brand Gradients */
  --gradient-doomsun: linear-gradient(135deg, #EC443A, #FF6B3A);
  --gradient-daylight: linear-gradient(135deg, #4ECDC4, #45B7D1, #3498DB);
  --gradient-nova: linear-gradient(135deg, #FFE66D, #FFD23F);
  --gradient-nova-glow: radial-gradient(circle at center, rgba(255, 230, 109, 0.3), rgba(255, 210, 63, 0.1), transparent);

  /* Typography */
  --font-display: 'Montserrat', Arial, sans-serif;
  --font-body: 'Roboto', Arial, sans-serif;
  --font-mono: 'Consolas', 'SF Mono', monospace;

  /* Type Scale */
  --text-xs: clamp(0.75rem, 1.5vw, 0.875rem);
  --text-sm: clamp(0.875rem, 2vw, 1rem);
  --text-base: clamp(1rem, 2.5vw, 1.125rem);
  --text-lg: clamp(1.125rem, 3vw, 1.25rem);
  --text-xl: clamp(1.25rem, 3.5vw, 1.5rem);
  --text-2xl: clamp(1.5rem, 4vw, 1.875rem);
  --text-3xl: clamp(1.875rem, 5vw, 2.25rem);
  --text-4xl: clamp(2.25rem, 6vw, 3rem);
  --text-5xl: clamp(3rem, 8vw, 3.75rem);
  --text-6xl: clamp(3.75rem, 10vw, 4.5rem);

  /* Spacing */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.25rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;
  --space-16: 4rem;
  --space-20: 5rem;
  --space-24: 6rem;
  --space-32: 8rem;

  /* Effects */
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.12);
  --shadow-md: 0 4px 6px rgba(0,0,0,0.2);
  --shadow-lg: 0 10px 40px rgba(0,0,0,0.3);
  --shadow-xl: 0 20px 60px rgba(0,0,0,0.5);
  --shadow-glow: 0 0 40px rgba(255, 107, 107, 0.3);

  --blur-sm: 4px;
  --blur-md: 12px;
  --blur-lg: 24px;
  --blur-xl: 40px;

  /* Animation */
  --transition-fast: 150ms ease;
  --transition-base: 250ms ease;
  --transition-slow: 350ms ease;
  --transition-spring: 500ms cubic-bezier(0.68, -0.55, 0.265, 1.55);

  /* Layout */
  --max-width: 1440px;
  --header-height: 70px;
  --section-padding: clamp(3rem, 10vw, 8rem);
}

/* Dark mode is default */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  overflow-x: hidden;
}

body {
  background-color: var(--color-bg-primary);
  color: var(--color-text-primary);
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin: 0;
}

h1 { font-size: var(--text-6xl); }
h2 { font-size: var(--text-5xl); }
h3 { font-size: var(--text-4xl); }
h4 { font-size: var(--text-3xl); }
h5 { font-size: var(--text-2xl); }
h6 { font-size: var(--text-xl); }

p {
  margin: 0;
  color: var(--color-text-secondary);
}

/* Container */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--space-6);
}

@media (min-width: 768px) {
  .container {
    padding: 0 var(--space-8);
  }
}

/* Section */
.section {
  padding: var(--section-padding) 0;
  position: relative;
}

/* Grid System */
.grid {
  display: grid;
  gap: var(--space-6);
}

.grid-cols-1 { grid-template-columns: repeat(1, 1fr); }
.grid-cols-2 { grid-template-columns: repeat(2, 1fr); }
.grid-cols-3 { grid-template-columns: repeat(3, 1fr); }
.grid-cols-4 { grid-template-columns: repeat(4, 1fr); }

@media (max-width: 768px) {
  .grid-cols-2,
  .grid-cols-3,
  .grid-cols-4 {
    grid-template-columns: 1fr;
  }
}

@media (min-width: 768px) and (max-width: 1024px) {
  .grid-cols-3,
  .grid-cols-4 {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Flexbox Utilities */
.flex { display: flex; }
.flex-col { flex-direction: column; }
.flex-row { flex-direction: row; }
.items-center { align-items: center; }
.items-start { align-items: flex-start; }
.items-end { align-items: flex-end; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.justify-around { justify-content: space-around; }
.flex-wrap { flex-wrap: wrap; }
.gap-1 { gap: var(--space-1); }
.gap-2 { gap: var(--space-2); }
.gap-3 { gap: var(--space-3); }
.gap-4 { gap: var(--space-4); }
.gap-6 { gap: var(--space-6); }
.gap-8 { gap: var(--space-8); }

/* Text Utilities */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }
.text-muted { color: var(--color-text-muted); }
.text-secondary { color: var(--color-text-secondary); }
.text-gradient {
  background: var(--gradient-data-flow);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.text-gradient-doomsun {
  background: var(--gradient-doomsun);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.text-gradient-daylight {
  background: var(--gradient-daylight);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.text-gradient-nova {
  background: var(--gradient-nova);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Animations */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeInScale {
  from {
    opacity: 0;
    transform: scale(0.95);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes glowPulse {
  0%, 100% {
    box-shadow: 0 0 20px rgba(255, 107, 107, 0.5);
  }
  50% {
    box-shadow: 0 0 40px rgba(255, 107, 107, 0.8);
  }
}

@keyframes float {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-10px);
  }
}

@keyframes shimmer {
  0% {
    background-position: -1000px 0;
  }
  100% {
    background-position: 1000px 0;
  }
}

.animate-fadeIn {
  animation: fadeIn var(--transition-slow) ease forwards;
}

.animate-fadeInUp {
  animation: fadeInUp var(--transition-slow) ease forwards;
}

.animate-fadeInScale {
  animation: fadeInScale var(--transition-slow) ease forwards;
}

.animate-float {
  animation: float 3s ease-in-out infinite;
}

.animate-pulse {
  animation: glowPulse 2s ease-in-out infinite;
}

/* Glass Morphism */
.glass {
  background: rgba(255, 255, 255, 0.03);
  backdrop-filter: blur(var(--blur-md));
  -webkit-backdrop-filter: blur(var(--blur-md));
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.glass-dark {
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(var(--blur-lg));
  -webkit-backdrop-filter: blur(var(--blur-lg));
  border: 1px solid rgba(255, 255, 255, 0.05);
}

/* Glow Effects */
.glow {
  position: relative;
  overflow: hidden;
}

.glow::before {
  content: '';
  position: absolute;
  top: -2px;
  left: -2px;
  right: -2px;
  bottom: -2px;
  background: var(--gradient-data-flow);
  border-radius: inherit;
  opacity: 0;
  transition: opacity var(--transition-base);
  z-index: -1;
}

.glow:hover::before {
  opacity: 1;
}

/* Button Styles */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-3) var(--space-6);
  font-family: var(--font-display);
  font-size: var(--text-base);
  font-weight: 600;
  text-decoration: none;
  border: none;
  border-radius: 2px;
  cursor: pointer;
  transition: all var(--transition-base);
  position: relative;
  overflow: hidden;
}

.btn-primary {
  background: var(--gradient-data-flow);
  color: white;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 30px rgba(108, 99, 255, 0.3);
}

.btn-doomsun {
  background: var(--gradient-doomsun);
  color: white;
}

.btn-doomsun:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 30px rgba(236, 68, 58, 0.3);
}

.btn-daylight {
  background: var(--gradient-daylight);
  color: white;
}

.btn-daylight:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 30px rgba(78, 205, 196, 0.3);
}

.btn-nova {
  background: var(--gradient-nova);
  color: #000000;
}

.btn-nova:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 30px rgba(255, 230, 109, 0.3);
}

.btn-secondary {
  background: transparent;
  color: var(--color-text-primary);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.3);
}

.btn-large {
  padding: var(--space-4) var(--space-8);
  font-size: var(--text-lg);
}

/* Card Component */
.card {
  background: var(--color-bg-card);
  border-radius: 4px;
  padding: var(--space-8);
  position: relative;
  overflow: hidden;
  transition: all var(--transition-base);
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-xl);
}

.card-glass {
  background: rgba(255, 255, 255, 0.03);
  backdrop-filter: blur(var(--blur-md));
  -webkit-backdrop-filter: blur(var(--blur-md));
  border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Loading States */
.skeleton {
  background: linear-gradient(
    90deg,
    rgba(255, 255, 255, 0.05) 25%,
    rgba(255, 255, 255, 0.1) 50%,
    rgba(255, 255, 255, 0.05) 75%
  );
  background-size: 1000px 100%;
  animation: shimmer 2s infinite;
}

/* Responsive Utilities */
@media (max-width: 768px) {
  .hide-mobile { display: none !important; }
}

@media (min-width: 769px) {
  .hide-desktop { display: none !important; }
}

/* Accessibility */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

/* Focus Styles */
*:focus-visible {
  outline: 2px solid var(--color-accent-cyan);
  outline-offset: 2px;
}

/* Reduced Motion */
@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;
  }
}