/* 
 * 1. Variables
 * Theme: Modern, Vibrant, Dark Mode (Magenta/Purple/Black)
 */
:root {
  /* Colors */
  --color-primary: #e6007a;       /* Vibrant Magenta */
  --color-primary-hover: #c20066;
  --color-secondary: #7c3aed;     /* Electric Purple */
  --color-background: #0a0a0a;    /* Deep Black */
  --color-surface: #171717;       /* Dark Gray Surface */
  --color-surface-hover: #262626;
  --color-text-main: #ffffff;
  --color-text-muted: #a3a3a3;
  --color-border: #404040;

  --color-success: #10b981;
  --color-warning: #f59e0b;
  --color-danger: #ef4444;

  /* Typography */
  --font-sans: 'Inter', system-ui, -apple-system, sans-serif;
  --font-display: 'Syne', 'Inter', sans-serif;
  
  --size-text-xs: 0.75rem;
  --size-text-sm: 0.875rem;
  --size-text-base: 1rem;
  --size-text-lg: 1.125rem;
  --size-text-xl: 1.25rem;
  --size-text-2xl: 1.5rem;
  --size-text-3xl: 2rem;
  --size-text-4xl: 3rem;

  --line-height-tight: 1.1;
  --line-height-base: 1.5;
  --line-height-relaxed: 1.75;

  /* Spacing Scale */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-12: 3rem;
  --space-16: 4rem;
  --space-24: 6rem;

  /* UI Elements */
  --radius-sm: 0.25rem;
  --radius-md: 0.5rem;
  --radius-lg: 1rem;
  --radius-full: 9999px;

  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.5);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.5);
  --shadow-glow: 0 0 15px rgba(230, 0, 122, 0.3); /* Magenta Glow */

  --transition-fast: 150ms ease;
  --transition-normal: 300ms ease;
}

/* 
 * 2. Reset / Normalize
 */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

img, picture, video, canvas, svg {
  display: block;
  max-width: 100%;
  height: auto;
}

input, button, textarea, select {
  font: inherit;
}

/* 
 * 3. Base Styles
 */
body {
  font-family: var(--font-sans);
  background-color: var(--color-background);
  color: var(--color-text-main);
  line-height: var(--line-height-base);
  font-size: var(--size-text-base);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: var(--line-height-tight);
  margin-bottom: var(--space-4);
  letter-spacing: -0.02em;
}

h1 { font-size: clamp(2.5rem, 5vw, 4.5rem); }
h2 { font-size: clamp(2rem, 4vw, 3rem); }
h3 { font-size: 1.75rem; }
h4 { font-size: 1.5rem; }

p {
  margin-bottom: var(--space-4);
  color: var(--color-text-muted);
}

a {
  color: var(--color-text-main);
  text-decoration: none;
  transition: color var(--transition-fast);
}

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

/* 
 * 4. Utilities
 */
.container {
  width: 100%;
  max-width: 1280px;
  margin-inline: auto;
  padding-inline: var(--space-4);
}

/* Flex/Grid Helpers */
.d-flex {
  display: flex;
}
.flex-col {
  flex-direction: column;
}
.items-center {
  align-items: center;
}
.justify-between {
  justify-content: space-between;
}
.gap-4 {
  gap: var(--space-4);
}

.d-grid {
  display: grid;
}

/* Screen Reader Only */
.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;
}

/* Text Gradient Utility (Magenta to Purple) */
.text-gradient {
  background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* 
 * 5. Basic Components
 */

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-3) var(--space-6);
  font-weight: 600;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--transition-normal);
  border: 1px solid transparent;
  font-size: var(--size-text-sm);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.btn-primary {
  background-color: var(--color-primary);
  color: #fff!important;
  box-shadow: var(--shadow-glow);
}

.btn-primary:hover {
  background-color: var(--color-primary-hover);
  transform: translateY(-2px);
}

.btn-outline {
  background: transparent;
  border-color: var(--color-border);
  color: var(--color-text-main);
}

.btn-outline:hover {
  border-color: var(--color-primary);
  color: var(--color-primary);
}

.btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* Inputs */
.input, .textarea {
  display: block;
  width: 100%;
  padding: var(--space-3);
  background-color: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  color: var(--color-text-main);
  transition: border-color var(--transition-fast);
}

.input:focus, .textarea:focus {
  outline: none;
  border-color: var(--color-secondary);
  box-shadow: 0 0 0 2px rgba(124, 58, 237, 0.2);
}

/* Cards */
.card {
  background-color: var(--color-surface);
  border-radius: var(--radius-md);
  padding: var(--space-6);
  border: 1px solid var(--color-border);
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition-normal), border-color var(--transition-normal);
}

.card:hover {
  transform: translateY(-4px);
  border-color: var(--color-secondary);
  box-shadow: var(--shadow-glow);
}

/* 
 * 6. Accessibility
 */
:focus-visible {
  outline: 2px solid var(--color-secondary);
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}