/* =============================================
   RESET & BASE VARIABLES
   ============================================= */

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  /* --- Color Palette --- */
  --bg-base:        #0A0A0A;
  --bg-surface:     #111111;
  --bg-elevated:    #171717;
  --bg-panel:       #1C1C1C;

  /* --- Warm Accent --- */
  --accent:         #E8823A;
  --accent-warm:    #C96A20;
  --accent-glow:    rgba(232, 130, 58, 0.25);
  --accent-subtle:  rgba(232, 130, 58, 0.08);

  /* --- Glass System --- */
  --glass-primary:     rgba(20, 20, 22, 0.72);
  --glass-secondary:   rgba(28, 28, 32, 0.55);
  --glass-floating:    rgba(255, 255, 255, 0.07);
  --glass-active:      rgba(232, 130, 58, 0.12);

  /* --- Glass Borders --- */
  --border-subtle:     rgba(255, 255, 255, 0.06);
  --border-light:      rgba(255, 255, 255, 0.10);
  --border-medium:     rgba(255, 255, 255, 0.14);
  --border-bright:     rgba(255, 255, 255, 0.20);
  --border-accent:     rgba(232, 130, 58, 0.30);

  /* --- Blur Values --- */
  --blur-sm:   blur(8px);
  --blur-md:   blur(16px);
  --blur-lg:   blur(24px);
  --blur-xl:   blur(40px);
  --blur-2xl:  blur(60px);

  /* --- Text --- */
  --text-primary:   #F5F5F7;
  --text-secondary: rgba(245, 245, 247, 0.70);
  --text-tertiary:  rgba(245, 245, 247, 0.42);
  --text-accent:    #E8823A;

  /* --- Typography --- */
  --font-sans:  'Inter', 'SF Pro Display', -apple-system, sans-serif;
  --font-mono:  'JetBrains Mono', 'Fira Code', monospace;

  /* --- Spacing Scale --- */
  --space-1:  4px;
  --space-2:  8px;
  --space-3:  12px;
  --space-4:  16px;
  --space-5:  20px;
  --space-6:  24px;
  --space-8:  32px;
  --space-10: 40px;
  --space-12: 48px;
  --space-16: 64px;
  --space-20: 80px;
  --space-24: 96px;
  --space-32: 128px;

  /* --- Radius --- */
  --radius-sm:  8px;
  --radius-md:  12px;
  --radius-lg:  16px;
  --radius-xl:  20px;
  --radius-2xl: 28px;
  --radius-3xl: 36px;
  --radius-full: 9999px;

  /* --- Transitions --- */
  --ease-out:   cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in:    cubic-bezier(0.4, 0, 1, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --duration-fast:   150ms;
  --duration-normal: 250ms;
  --duration-slow:   400ms;

  /* --- Shadows --- */
  --shadow-glass: 
    0 2px 4px rgba(0, 0, 0, 0.3),
    0 8px 24px rgba(0, 0, 0, 0.4),
    0 24px 48px rgba(0, 0, 0, 0.25),
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    inset 0 -1px 0 rgba(0, 0, 0, 0.3);

  --shadow-float:
    0 4px 12px rgba(0, 0, 0, 0.4),
    0 16px 40px rgba(0, 0, 0, 0.5),
    0 40px 80px rgba(0, 0, 0, 0.3);

  --shadow-card:
    0 1px 3px rgba(0, 0, 0, 0.3),
    0 4px 12px rgba(0, 0, 0, 0.3),
    0 12px 24px rgba(0, 0, 0, 0.2);

  --shadow-accent-glow:
    0 0 20px rgba(232, 130, 58, 0.15),
    0 0 60px rgba(232, 130, 58, 0.08);

  /* --- Z-index layers --- */
  --z-base:    0;
  --z-card:    10;
  --z-panel:   20;
  --z-nav:     100;
  --z-overlay: 200;
  --z-modal:   300;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg-base);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
  min-height: 100vh;
}

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

img {
  max-width: 100%;
  display: block;
}

button {
  cursor: pointer;
  border: none;
  background: none;
  font-family: inherit;
  color: inherit;
}

ul, ol {
  list-style: none;
}

/* --- Scrollbar Styling --- */
::-webkit-scrollbar {
  width: 4px;
}
::-webkit-scrollbar-track {
  background: var(--bg-base);
}
::-webkit-scrollbar-thumb {
  background: rgba(255,255,255,0.12);
  border-radius: var(--radius-full);
}
::-webkit-scrollbar-thumb:hover {
  background: rgba(255,255,255,0.20);
}

/* --- Focus Styles (Accessibility) --- */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: var(--radius-sm);
}

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