/* ==========================================================================
   Love Collide — Design System
   Ashley & Renee | ashleyandrenee.love
   ========================================================================== */

/* --------------------------------------------------------------------------
   Color Palette
   -------------------------------------------------------------------------- */
:root {
  /* Primary */
  --color-rose: #e8475f;
  --color-rose-light: #f06b7e;
  --color-rose-dark: #c93a50;
  --color-burgundy: #8b2252;
  --color-burgundy-light: #a63068;
  --color-burgundy-dark: #6e1a41;

  /* Accent */
  --color-gold: #d4a574;
  --color-gold-light: #e0be96;
  --color-gold-dark: #b8895a;
  --color-pink: #f5c6d0;
  --color-pink-light: #f9dbe2;
  --color-pink-dark: #e8a3b2;

  /* Neutrals / Backgrounds */
  --color-midnight: #0a0a1a;
  --color-charcoal: #1a1a2e;
  --color-slate: #2a2a3e;
  --color-muted: #6b6b8d;

  /* Text */
  --color-text-primary: #f5f0ee;
  --color-text-secondary: #d4c8c4;
  --color-text-muted: rgba(245, 240, 238, 0.5);
  --color-text-accent: var(--color-gold);

  /* Semantic aliases */
  --color-bg-deep: var(--color-midnight);
  --color-bg-surface: var(--color-charcoal);
  --color-bg-elevated: var(--color-slate);
  --color-accent-primary: var(--color-rose);
  --color-accent-secondary: var(--color-burgundy);
  --color-accent-gold: var(--color-gold);

  /* --------------------------------------------------------------------------
     Typography
     -------------------------------------------------------------------------- */
  --font-serif: 'Playfair Display', 'Cormorant Garamond', Georgia, serif;
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-script: 'Dancing Script', 'Great Vibes', 'Sacramento', cursive;
  --font-display: 'Cinzel', 'Playfair Display', serif;
  --font-handwritten: 'Satisfy', 'Pacifico', cursive;

  /* Font Sizes (fluid) */
  --text-xs: clamp(0.7rem, 0.65rem + 0.25vw, 0.8rem);
  --text-sm: clamp(0.8rem, 0.75rem + 0.25vw, 0.9rem);
  --text-base: clamp(0.9rem, 0.85rem + 0.25vw, 1rem);
  --text-md: clamp(1rem, 0.9rem + 0.5vw, 1.2rem);
  --text-lg: clamp(1.15rem, 1rem + 0.75vw, 1.5rem);
  --text-xl: clamp(1.4rem, 1.1rem + 1.5vw, 2rem);
  --text-2xl: clamp(1.8rem, 1.3rem + 2.5vw, 3rem);
  --text-3xl: clamp(2.4rem, 1.5rem + 4.5vw, 4.5rem);
  --text-4xl: clamp(3rem, 2rem + 5vw, 6rem);

  /* Line Heights */
  --leading-tight: 1.15;
  --leading-snug: 1.3;
  --leading-normal: 1.5;
  --leading-relaxed: 1.7;

  /* Letter Spacing */
  --tracking-tight: -0.02em;
  --tracking-normal: 0;
  --tracking-wide: 0.05em;
  --tracking-wider: 0.1em;
  --tracking-widest: 0.2em;

  /* Font Weights */
  --weight-light: 300;
  --weight-regular: 400;
  --weight-medium: 500;
  --weight-semibold: 600;
  --weight-bold: 700;

  /* --------------------------------------------------------------------------
     Spacing Scale
     -------------------------------------------------------------------------- */
  --space-xs: 0.25rem;    /* 4px */
  --space-sm: 0.5rem;     /* 8px */
  --space-md: 1rem;       /* 16px */
  --space-lg: 1.5rem;     /* 24px */
  --space-xl: 2rem;       /* 32px */
  --space-2xl: 3rem;      /* 48px */
  --space-3xl: 4rem;      /* 64px */
  --space-4xl: 6rem;      /* 96px */

  /* --------------------------------------------------------------------------
     Shadows
     -------------------------------------------------------------------------- */
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.5);
  --shadow-xl: 0 16px 48px rgba(0, 0, 0, 0.6);
  --shadow-glow-rose: 0 0 20px rgba(232, 71, 95, 0.4);
  --shadow-glow-gold: 0 0 20px rgba(212, 165, 116, 0.4);
  --shadow-glow-pink: 0 0 20px rgba(245, 198, 208, 0.3);

  /* --------------------------------------------------------------------------
     Border Radius
     -------------------------------------------------------------------------- */
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;
  --radius-2xl: 24px;
  --radius-full: 9999px;

  /* --------------------------------------------------------------------------
     Transitions
     -------------------------------------------------------------------------- */
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --ease-in-out: cubic-bezier(0.4, 0, 0.2, 1);
  --ease-spring: cubic-bezier(0.175, 0.885, 0.32, 1.275);
  --duration-fast: 150ms;
  --duration-normal: 300ms;
  --duration-slow: 500ms;
  --duration-slower: 800ms;

  /* --------------------------------------------------------------------------
     Z-Index Scale
     -------------------------------------------------------------------------- */
  --z-canvas: 0;
  --z-content: 10;
  --z-overlay: 20;
  --z-controls: 30;
  --z-modal: 40;
  --z-toast: 50;
}

/* --------------------------------------------------------------------------
   Base Reset & Global Styles
   -------------------------------------------------------------------------- */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

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

body {
  font-family: var(--font-sans);
  font-size: var(--text-base);
  line-height: var(--leading-normal);
  color: var(--color-text-primary);
  background-color: var(--color-bg-deep);
  overflow: hidden;
  width: 100vw;
  height: 100vh;
  position: relative;
}

/* Prevent text selection on interactive elements */
canvas,
.no-select {
  -webkit-user-select: none;
  user-select: none;
}

/* Prevent overscroll bounce on iOS */
html, body {
  overscroll-behavior: none;
  touch-action: none;
}

/* --------------------------------------------------------------------------
   Scrollbar (for any scrollable overlay/modal)
   -------------------------------------------------------------------------- */
::-webkit-scrollbar {
  width: 6px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: var(--color-muted);
  border-radius: var(--radius-full);
}

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

.font-serif {
  font-family: var(--font-serif);
}

.font-script {
  font-family: var(--font-script);
}

.font-display {
  font-family: var(--font-display);
}

.text-gold {
  color: var(--color-accent-gold);
}

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

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

@keyframes fadeOut {
  from { opacity: 1; }
  to { opacity: 0; }
}

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

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.6; }
}

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

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

@keyframes heartbeat {
  0%, 100% { transform: scale(1); }
  15% { transform: scale(1.15); }
  30% { transform: scale(1); }
  45% { transform: scale(1.1); }
}

@keyframes glow {
  0%, 100% { box-shadow: var(--shadow-glow-rose); }
  50% { box-shadow: 0 0 40px rgba(232, 71, 95, 0.6); }
}

.animate-fade-in { animation: fadeIn var(--duration-normal) var(--ease-out) forwards; }
.animate-slide-up { animation: slideUp var(--duration-slow) var(--ease-out) forwards; }
.animate-pulse { animation: pulse 2s var(--ease-in-out) infinite; }
.animate-float { animation: float 3s var(--ease-in-out) infinite; }
.animate-heartbeat { animation: heartbeat 1.5s var(--ease-in-out) infinite; }

/* --------------------------------------------------------------------------
   Media Queries (breakpoint tokens)
   -------------------------------------------------------------------------- */
/* Mobile-first: base styles are mobile.
   Use these for progressive enhancement: */
/* @media (min-width: 640px)  — sm  */
/* @media (min-width: 768px)  — md  */
/* @media (min-width: 1024px) — lg  */
/* @media (min-width: 1280px) — xl  */

/* Reduce motion for accessibility */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
