/* css/variables.css */

/* Modern CSS Reset */
*, *::before, *::after {
  box-sizing: border-box;
}

* {
  margin: 0;
  padding: 0;
}

body {
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

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

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

p, h1, h2, h3, h4, h5, h6 {
  overflow-wrap: break-word;
}

/* Rounded, Playful Fonts from Google Fonts - Fredoka for playful headers, Nunito/Quicksand for body */
@import url('https://fonts.googleapis.com/css2?family=Fredoka:wght@400;500;600;700&family=Quicksand:wght@400;500;600;700&family=Inter:wght@300;400;500;600;700&display=swap');

:root {
  /* Juguetería Mágica - Light Mode (Default) */
  --bg-primary: hsl(45, 100%, 97%);       /* Amarillo vainilla pastel */
  --bg-secondary: hsl(45, 80%, 92%);     /* Crema suave */
  --bg-tertiary: hsl(45, 60%, 86%);      /* Crema intermedio */
  --text-primary: hsl(210, 50%, 15%);     /* Azul marino infantil */
  --text-secondary: hsl(210, 30%, 30%);   /* Azul marino suave */
  --text-muted: hsl(210, 20%, 45%);       /* Azul marino apagado */
  
  --color-accent: hsl(25, 95%, 60%);      /* Naranja melocotón alegre */
  --color-accent-hover: hsl(25, 100%, 65%);
  --color-accent-light: hsla(25, 95%, 60%, 0.15);
  
  --color-secondary: hsl(200, 85%, 50%);  /* Celeste cielo */
  --color-secondary-hover: hsl(200, 95%, 58%);
  --color-secondary-light: hsla(200, 85%, 50%, 0.15);

  --font-title: 'Fredoka', system-ui, -apple-system, sans-serif;
  --font-body: 'Quicksand', 'Inter', system-ui, -apple-system, sans-serif;

  /* Global variables (Playful rounded corners, Transitions, Spacing) */
  --color-success: hsl(120, 70%, 40%);
  --color-error: hsl(0, 80%, 55%);
  --border-color: hsl(45, 50%, 82%);
  --shadow-color: rgba(180, 150, 100, 0.1);

  --space-2xs: 0.25rem;
  --space-xs: 0.5rem;
  --space-sm: 0.75rem;
  --space-md: 1rem;
  --space-lg: 1.5rem;
  --space-xl: 2rem;
  --space-2xl: 3rem;
  --space-3xl: 4rem;

  /* Playful rounded corners */
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --radius-xl: 32px;
  --radius-round: 50%;

  --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-normal: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 0.5s cubic-bezier(0.4, 0, 0.2, 1);

  --max-width-content: 1200px;
  --header-height: 80px;
}

/* Juguetería Mágica - Dark Mode */
[data-theme="dark"] {
  --bg-primary: hsl(220, 40%, 10%);       /* Azul noche estrellado */
  --bg-secondary: hsl(220, 35%, 14%);     /* Azul noche intermedio */
  --bg-tertiary: hsl(220, 25%, 18%);      /* Azul noche claro */
  --text-primary: hsl(45, 30%, 90%);      /* Crema suave */
  --text-secondary: hsl(45, 20%, 75%);    /* Crema apagado */
  --text-muted: hsl(220, 15%, 55%);
  
  --color-accent: hsl(25, 90%, 65%);      /* Naranja cálido brillante */
  --color-accent-hover: hsl(25, 95%, 72%);
  --color-accent-light: hsla(25, 90%, 65%, 0.15);
  
  --color-secondary: hsl(200, 75%, 65%);  /* Celeste claro */
  --color-secondary-hover: hsl(200, 85%, 72%);
  --color-secondary-light: hsla(200, 75%, 65%, 0.15);

  --border-color: hsl(220, 20%, 22%);
  --shadow-color: rgba(0, 0, 0, 0.4);
}

/* Focus States for Accessibility (WCAG 2.1 AA) */
:focus-visible {
  outline: 3px solid var(--color-secondary);
  outline-offset: 4px;
}

/* Accessibility: Reduce Motion Preferences */
@media (prefers-reduced-motion: reduce) {
  *, ::before, ::after {
    animation-delay: -1ms !important;
    animation-duration: 1ms !important;
    animation-iteration-count: 1 !important;
    background-attachment: initial !important;
    scroll-behavior: auto !important;
    transition-duration: 0s !important;
    transition-delay: 0s !important;
  }
}
