:root {
  /* Storybook Color Palette - Warm & Adventurous */
  --color-parchment: #FFF8E7;          /* Warm paper background */
  --color-parchment-dark: #F5EDD6;     /* Aged paper */
  --color-ink: #2C1810;                /* Deep brown text */
  --color-ink-light: #6B5344;          /* Lighter brown */

  /* Jewel Tones - No purple gradients! */
  --color-sapphire: #1E40AF;           /* Deep blue */
  --color-ruby: #DC2626;               /* Rich red */
  --color-emerald: #059669;            /* Vibrant green */
  --color-amber: #D97706;              /* Warm orange */
  --color-topaz: #7C3AED;              /* Deep violet */

  /* Character Colors */
  --color-mira: #EC4899;               /* Bright pink */
  --color-finn: #0EA5E9;               /* Sky blue */

  /* Backgrounds */
  --color-white: #FFFFFF;
  --color-cream: #FFFBF5;

  /* Status Colors */
  --color-success: var(--color-emerald);
  --color-warning: var(--color-amber);
  --color-danger: var(--color-ruby);

  /* Gradients - Vibrant & Varied */
  --gradient-adventure: linear-gradient(135deg, #F59E0B 0%, #DC2626 50%, #7C3AED 100%);
  --gradient-mira: linear-gradient(135deg, #EC4899 0%, #8B5CF6 100%);
  --gradient-finn: linear-gradient(135deg, #0EA5E9 0%, #3B82F6 100%);
  --gradient-storybook: linear-gradient(180deg, var(--color-parchment) 0%, var(--color-parchment-dark) 100%);

  /* Typography - Distinctive & Playful */
  --font-display: 'Fredoka', 'Quicksand', 'Comic Sans MS', cursive;
  --font-body: 'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-accent: 'Caveat', cursive;

  /* Font Sizes - Mobile First */
  --font-size-xs: clamp(0.75rem, 2vw, 0.875rem);
  --font-size-sm: clamp(0.875rem, 2.5vw, 1rem);
  --font-size-base: clamp(1rem, 3vw, 1.125rem);
  --font-size-lg: clamp(1.125rem, 3.5vw, 1.25rem);
  --font-size-xl: clamp(1.25rem, 4vw, 1.5rem);
  --font-size-2xl: clamp(1.5rem, 5vw, 2rem);
  --font-size-3xl: clamp(2rem, 6vw, 2.5rem);
  --font-size-4xl: clamp(2.5rem, 7vw, 3.5rem);
  --font-size-5xl: clamp(3rem, 10vw, 5rem);

  --font-weight-normal: 400;
  --font-weight-medium: 500;
  --font-weight-semibold: 600;
  --font-weight-bold: 700;

  --line-height-tight: 1.1;
  --line-height-snug: 1.3;
  --line-height-normal: 1.5;
  --line-height-relaxed: 1.7;

  /* Spacing - 4px base grid */
  --space-xs: 0.5rem;          /* 8px */
  --space-sm: 0.75rem;         /* 12px */
  --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 */

  /* Border Radius - Organic shapes */
  --radius-sm: 0.5rem;
  --radius-md: 1rem;
  --radius-lg: 1.5rem;
  --radius-xl: 2rem;
  --radius-2xl: 2.5rem;
  --radius-full: 9999px;

  /* Shadows - Layered depth */
  --shadow-sm: 0 2px 4px rgba(44, 24, 16, 0.08);
  --shadow-md: 0 4px 12px rgba(44, 24, 16, 0.12);
  --shadow-lg: 0 8px 24px rgba(44, 24, 16, 0.16);
  --shadow-xl: 0 16px 48px rgba(44, 24, 16, 0.2);
  --shadow-2xl: 0 24px 64px rgba(44, 24, 16, 0.24);
  --shadow-inner: inset 0 2px 4px rgba(44, 24, 16, 0.08);

  /* Special Effects */
  --shadow-storybook:
    0 2px 4px rgba(44, 24, 16, 0.1),
    0 4px 8px rgba(44, 24, 16, 0.08),
    0 8px 16px rgba(44, 24, 16, 0.06),
    inset 0 1px 0 rgba(255, 255, 255, 0.5);

  /* Transitions - Smooth & Natural */
  --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-base: 300ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 500ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-bounce: 600ms cubic-bezier(0.68, -0.55, 0.265, 1.55);

  /* Z-index Scale */
  --z-base: 1;
  --z-dropdown: 10;
  --z-sticky: 100;
  --z-fixed: 200;
  --z-modal-backdrop: 999;
  --z-modal: 1000;
  --z-toast: 2000;

  /* Layout */
  --container-max-width: 1400px;
  --container-padding: var(--space-md);
  --content-max-width: 800px;

  /* Audio Player */
  --player-height: 0px; /* Hidden - using modal instead */

  /* Modal */
  --modal-max-width: 500px;

  /* Decorative Elements */
  --pattern-dots: radial-gradient(circle, var(--color-amber) 1px, transparent 1px);
  --pattern-lines: repeating-linear-gradient(45deg, transparent, transparent 10px, rgba(44, 24, 16, 0.03) 10px, rgba(44, 24, 16, 0.03) 20px);

  /* Texture Overlay */
  --texture-paper: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='400' height='400'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' /%3E%3CfeColorMatrix values='0 0 0 0 0, 0 0 0 0 0, 0 0 0 0 0, 0 0 0 0.02 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
}

/* Import Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Fredoka:wght@400;500;600;700&family=DM+Sans:wght@400;500;600;700&family=Caveat:wght@700&display=swap');

/* Print Styles */
@media print {
  :root {
    --color-parchment: white;
    --shadow-sm: none;
    --shadow-md: none;
    --shadow-lg: none;
  }
}
