/* ============================================
   BASE STYLES - Premium Music E-commerce
   Cinematic • Artisanal • Sophisticated
   ============================================ */

/* ----------------------------------------
   1. VARIABLES
   ---------------------------------------- */
:root {
  /* Brand Palette: Deep Navy, Warm Wood, Silver, Vibrant Red */
  --color-navy: #0f172a;
  --color-navy-light: #1e293b;
  --color-navy-dark: #020617;
  --color-wood: #92400e;
  --color-wood-light: #d4a373;
  --color-wood-dark: #78350f;
  --color-silver: #e2e8f0;
  --color-silver-light: #f1f5f9;
  --color-silver-dark: #94a3b8;
  --color-red: #dc2626;
  --color-red-dark: #991b1b;
  --color-white: #ffffff;
  --color-cream: #fafaf9;
  
  /* Semantic Colors */
  --color-background: var(--color-cream);
  --color-surface: var(--color-white);
  --color-text: var(--color-navy);
  --color-text-secondary: var(--color-silver-dark);
  --color-primary: var(--color-navy);
  --color-accent: var(--color-red);
  --color-success: #15803d;
  --color-warning: #b45309;
  --color-danger: var(--color-red);
  --color-border: var(--color-silver);
  
  /* Typography - Bold & Cinematic */
  --font-family-base: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --font-family-heading: var(--font-family-base);
  
  --text-xs: 0.75rem;
  --text-sm: 0.875rem;
  --text-base: 1rem;
  --text-lg: 1.125rem;
  --text-xl: 1.25rem;
  --text-2xl: 1.5rem;
  --text-3xl: 1.875rem;
  --text-4xl: 2.25rem;
  --text-5xl: 3rem;
  --text-6xl: 3.75rem;
  
  --leading-tight: 1.2;
  --leading-snug: 1.375;
  --leading-normal: 1.5;
  --leading-relaxed: 1.65;
  
  --weight-normal: 400;
  --weight-medium: 500;
  --weight-semibold: 600;
  --weight-bold: 700;
  --weight-black: 900;
  
  /* Spacing Scale (0-96px) */
  --space-0: 0;
  --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;
  
  /* Border Radius */
  --radius-sm: 0.25rem;
  --radius-md: 0.375rem;
  --radius-lg: 0.5rem;
  --radius-xl: 0.75rem;
  --radius-2xl: 1rem;
  --radius-full: 9999px;
  
  /* Shadows - Sophisticated Depth */
  --shadow-sm: 0 1px 2px 0 rgb(15 23 42 / 0.05);
  --shadow-md: 0 4px 6px -1px rgb(15 23 42 / 0.1), 0 2px 4px -2px rgb(15 23 42 / 0.1);
  --shadow-lg: 0 10px 15px -3px rgb(15 23 42 / 0.1), 0 4px 6px -4px rgb(15 23 42 / 0.1);
  --shadow-xl: 0 20px 25px -5px rgb(15 23 42 / 0.1), 0 8px 10px -6px rgb(15 23 42 / 0.1);
  --shadow-2xl: 0 25px 50px -12px rgb(15 23 42 / 0.25);
  --shadow-inner: inset 0 2px 4px 0 rgb(15 23 42 / 0.05);
  --shadow-glow: 0 0 20px rgb(220 38 38 / 0.3);
  
  /* Transitions - Smooth & Premium */
  --duration-fast: 150ms;
  --duration-normal: 250ms;
  --duration-slow: 350ms;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
  
  /* Layout */
  --container-max: 1280px;
  --container-padding: var(--space-4);
}

/* ----------------------------------------
   2. RESET & NORMALIZE
   ---------------------------------------- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  -webkit-text-size-adjust: 100%;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  scroll-behavior: smooth;
}

@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;
  }
}

body {
  min-height: 100vh;
  font-family: var(--font-family-base);
  font-size: var(--text-base);
  line-height: var(--leading-normal);
  color: var(--color-text);
  background-color: var(--color-background);
}

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

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

button {
  cursor: pointer;
  background: none;
  border: none;
}

a {
  text-decoration: none;
  color: inherit;
}

ul, ol {
  list-style: none;
}

/* ----------------------------------------
   3. BASE STYLES
   ---------------------------------------- */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-family-heading);
  font-weight: var(--weight-bold);
  line-height: var(--leading-tight);
  color: var(--color-navy);
  letter-spacing: -0.025em;
}

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

@media (max-width: 768px) {
  h1 { font-size: var(--text-4xl); }
  h2 { font-size: var(--text-3xl); }
  h3 { font-size: var(--text-2xl); }
}

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

p:last-child {
  margin-bottom: 0;
}

a {
  color: var(--color-navy);
  transition: color var(--duration-fast) var(--ease-out);
}

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

/* ----------------------------------------
   4. UTILITIES
   ---------------------------------------- */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--container-padding);
  padding-right: var(--container-padding);
}

.flex {
  display: flex;
}

.flex-col {
  flex-direction: column;
}

.items-center {
  align-items: center;
}

.justify-center {
  justify-content: center;
}

.justify-between {
  justify-content: space-between;
}

.grid {
  display: grid;
}

.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;
}

/* ----------------------------------------
   5. COMPONENTS
   ---------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-6);
  font-size: var(--text-sm);
  font-weight: var(--weight-semibold);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-radius: var(--radius-md);
  transition: all var(--duration-normal) var(--ease-out);
  border: 1px solid transparent;
}

.btn:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgb(220 38 38 / 0.2);
}

.btn--primary {
  background-color: var(--color-navy);
  color: var(--color-white);
}

.btn--primary:hover {
  background-color: var(--color-navy-light);
  transform: translateY(-1px);
  box-shadow: var(--shadow-lg);
}

.btn--accent {
  background-color: var(--color-accent);
  color: var(--color-white)!important;
}

.btn--accent:hover {
  background-color: var(--color-red-dark);
  transform: translateY(-1px);
  box-shadow: var(--shadow-lg), var(--shadow-glow);
}

.btn--outline {
  background-color: var(--color-white);
  border-color: var(--color-navy);
  color: var(--color-navy);
}

.btn--outline:hover {
  background-color: var(--color-navy);
  color: var(--color-white);
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

.input {
  width: 100%;
  padding: var(--space-3) var(--space-4);
  font-size: var(--text-base);
  line-height: var(--leading-normal);
  color: var(--color-text);
  background-color: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  transition: all var(--duration-fast) var(--ease-out);
}

.input:hover {
  border-color: var(--color-silver-dark);
}

.input:focus {
  outline: none;
  border-color: var(--color-navy);
  box-shadow: 0 0 0 3px rgb(15 23 42 / 0.1);
}

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

.card {
  background-color: var(--color-surface);
  border-radius: var(--radius-xl);
  padding: var(--space-6);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--color-silver-light);
  transition: all var(--duration-normal) var(--ease-out);
}

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

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

@media (prefers-reduced-motion: reduce) {
  .btn, .card, .input {
    transition: none;
  }
  
  .btn:hover, .card:hover {
    transform: none;
  }
}