/**
 * TINGLE DIGITAL - Design System Variables
 * Sistema de design fluido e moderno
 * Light Theme - Nova Paleta 2025
 *
 * @version 2.0.0
 */

:root {
  /* ============================================
   * CORES PRIMÁRIAS - NOVA PALETA TINGLE
   * Baseada no novo logo
   * ============================================ */

  /* Cores do Logo */
  --tingle-brown: #321E0C;
  --tingle-coral: #FF704C;
  --tingle-magenta: #E53B58;
  --tingle-amber: #FDB013;
  --tingle-green: #8DAA39;
  --tingle-turquoise: #02B0B5;
  --tingle-beige: #E4D8CD;

  /* Variações das cores principais */
  --tingle-coral-light: #FF9A7D;
  --tingle-coral-dark: #E55A35;

  --tingle-magenta-light: #F06B7F;
  --tingle-magenta-dark: #C22845;

  --tingle-amber-light: #FFCF5C;
  --tingle-amber-dark: #D99600;

  --tingle-green-light: #A8C45A;
  --tingle-green-dark: #6D8A25;

  --tingle-turquoise-light: #40D4D8;
  --tingle-turquoise-dark: #018A8E;

  /* ============================================
   * CORES LIGHT THEME (PADRÃO)
   * ============================================ */
  --light-primary: #FFFFFF;
  --light-secondary: #F8F9FA;
  --light-tertiary: #F0F2F5;
  --light-accent: #E4D8CD;
  --light-surface: #FFFFFF;
  --light-border: rgba(50, 30, 12, 0.1);

  /* ============================================
   * CORES DARK THEME (OPCIONAL)
   * ============================================ */
  --dark-primary: #1A1A2E;
  --dark-secondary: #16213E;
  --dark-accent: #0F3460;
  --dark-surface: #232340;
  --dark-border: rgba(255, 255, 255, 0.1);

  /* ============================================
   * CORES DE TEXTO (LIGHT THEME DEFAULT)
   * ============================================ */
  --text-primary: #321E0C;
  --text-secondary: rgba(50, 30, 12, 0.7);
  --text-tertiary: rgba(50, 30, 12, 0.5);
  --text-muted: rgba(50, 30, 12, 0.4);
  --text-inverse: #FFFFFF;

  /* ============================================
   * GRADIENTES - NOVA PALETA
   * ============================================ */
  --gradient-tingle: linear-gradient(
    135deg,
    #E53B58 0%,
    #FF704C 25%,
    #FDB013 50%,
    #8DAA39 75%,
    #02B0B5 100%
  );

  --gradient-warm: linear-gradient(
    135deg,
    #E53B58 0%,
    #FF704C 50%,
    #FDB013 100%
  );

  --gradient-cool: linear-gradient(
    135deg,
    #8DAA39 0%,
    #02B0B5 100%
  );

  --gradient-coral-amber: linear-gradient(
    135deg,
    #FF704C 0%,
    #FDB013 100%
  );

  --gradient-magenta-coral: linear-gradient(
    135deg,
    #E53B58 0%,
    #FF704C 100%
  );

  --gradient-green-turquoise: linear-gradient(
    135deg,
    #8DAA39 0%,
    #02B0B5 100%
  );

  --gradient-mesh-light:
    radial-gradient(at 40% 20%, rgba(229, 59, 88, 0.15) 0px, transparent 50%),
    radial-gradient(at 80% 0%, rgba(255, 112, 76, 0.12) 0px, transparent 50%),
    radial-gradient(at 0% 50%, rgba(253, 176, 19, 0.1) 0px, transparent 50%),
    radial-gradient(at 80% 50%, rgba(141, 170, 57, 0.1) 0px, transparent 50%),
    radial-gradient(at 0% 100%, rgba(2, 176, 181, 0.12) 0px, transparent 50%),
    radial-gradient(at 80% 100%, rgba(228, 216, 205, 0.15) 0px, transparent 50%);

  /* Legacy gradient names for compatibility */
  --gradient-aurora: var(--gradient-tingle);
  --gradient-purple-cyan: var(--gradient-cool);
  --gradient-ocean: var(--gradient-green-turquoise);
  --gradient-sunset: var(--gradient-warm);

  /* ============================================
   * GLASSMORPHISM - LIGHT THEME
   * ============================================ */
  --glass-bg: rgba(255, 255, 255, 0.7);
  --glass-bg-light: rgba(255, 255, 255, 0.85);
  --glass-bg-strong: rgba(255, 255, 255, 0.95);
  --glass-border: rgba(50, 30, 12, 0.08);
  --glass-border-light: rgba(50, 30, 12, 0.05);
  --glass-blur: blur(20px);
  --glass-blur-strong: blur(40px);

  /* ============================================
   * TIPOGRAFIA - FONT FAMILIES
   * ============================================ */
  --font-display: 'Space Grotesk', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-heading: 'Manrope', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-body: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', monospace;

  /* ============================================
   * TIPOGRAFIA - TAMANHOS FLUIDOS
   * Usa clamp() para responsividade automática
   * ============================================ */
  --text-xs: clamp(0.75rem, 0.7rem + 0.25vw, 0.875rem);
  --text-sm: clamp(0.875rem, 0.8rem + 0.35vw, 1rem);
  --text-base: clamp(1rem, 0.9rem + 0.5vw, 1.125rem);
  --text-lg: clamp(1.125rem, 1rem + 0.6vw, 1.25rem);
  --text-xl: clamp(1.25rem, 1.1rem + 0.75vw, 1.5rem);
  --text-2xl: clamp(1.5rem, 1.2rem + 1.5vw, 2rem);
  --text-3xl: clamp(1.875rem, 1.5rem + 2vw, 2.5rem);
  --text-4xl: clamp(2.25rem, 1.75rem + 2.5vw, 3.5rem);
  --text-5xl: clamp(3rem, 2rem + 4vw, 5rem);
  --text-hero: clamp(3.5rem, 2.5rem + 5vw, 7rem);

  /* ============================================
   * TIPOGRAFIA - LINE HEIGHTS
   * ============================================ */
  --leading-none: 1;
  --leading-tight: 1.1;
  --leading-snug: 1.25;
  --leading-normal: 1.5;
  --leading-relaxed: 1.625;
  --leading-loose: 2;

  /* ============================================
   * TIPOGRAFIA - LETTER SPACING
   * ============================================ */
  --tracking-tighter: -0.05em;
  --tracking-tight: -0.025em;
  --tracking-normal: 0;
  --tracking-wide: 0.025em;
  --tracking-wider: 0.05em;
  --tracking-widest: 0.1em;

  /* ============================================
   * TIPOGRAFIA - FONT WEIGHTS
   * ============================================ */
  --font-light: 300;
  --font-regular: 400;
  --font-medium: 500;
  --font-semibold: 600;
  --font-bold: 700;
  --font-extrabold: 800;

  /* ============================================
   * ESPAÇAMENTO
   * Base: 4px (0.25rem)
   * ============================================ */
  --space-0: 0;
  --space-1: 0.25rem;   /* 4px */
  --space-2: 0.5rem;    /* 8px */
  --space-3: 0.75rem;   /* 12px */
  --space-4: 1rem;      /* 16px */
  --space-5: 1.25rem;   /* 20px */
  --space-6: 1.5rem;    /* 24px */
  --space-8: 2rem;      /* 32px */
  --space-10: 2.5rem;   /* 40px */
  --space-12: 3rem;     /* 48px */
  --space-16: 4rem;     /* 64px */
  --space-20: 5rem;     /* 80px */
  --space-24: 6rem;     /* 96px */
  --space-32: 8rem;     /* 128px */
  --space-40: 10rem;    /* 160px */
  --space-48: 12rem;    /* 192px */
  --space-64: 16rem;    /* 256px */

  /* ============================================
   * BREAKPOINTS (para referência em JS)
   * ============================================ */
  --bp-xs: 480px;
  --bp-sm: 640px;
  --bp-md: 768px;
  --bp-lg: 1024px;
  --bp-xl: 1280px;
  --bp-2xl: 1536px;

  /* ============================================
   * CONTAINERS
   * ============================================ */
  --container-xs: 480px;
  --container-sm: 640px;
  --container-md: 768px;
  --container-lg: 1024px;
  --container-xl: 1280px;
  --container-2xl: 1440px;
  --container-full: 100%;

  /* ============================================
   * BORDER RADIUS
   * ============================================ */
  --radius-none: 0;
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;
  --radius-2xl: 24px;
  --radius-3xl: 32px;
  --radius-full: 9999px;

  /* ============================================
   * SOMBRAS - LIGHT THEME
   * ============================================ */
  --shadow-sm: 0 1px 2px 0 rgba(50, 30, 12, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(50, 30, 12, 0.08), 0 2px 4px -1px rgba(50, 30, 12, 0.04);
  --shadow-lg: 0 10px 15px -3px rgba(50, 30, 12, 0.08), 0 4px 6px -2px rgba(50, 30, 12, 0.04);
  --shadow-xl: 0 20px 25px -5px rgba(50, 30, 12, 0.1), 0 10px 10px -5px rgba(50, 30, 12, 0.04);
  --shadow-2xl: 0 25px 50px -12px rgba(50, 30, 12, 0.2);
  --shadow-inner: inset 0 2px 4px 0 rgba(50, 30, 12, 0.04);

  /* Sombras coloridas - Nova Paleta */
  --shadow-coral: 0 10px 40px -10px rgba(255, 112, 76, 0.4);
  --shadow-magenta: 0 10px 40px -10px rgba(229, 59, 88, 0.4);
  --shadow-amber: 0 10px 40px -10px rgba(253, 176, 19, 0.4);
  --shadow-green: 0 10px 40px -10px rgba(141, 170, 57, 0.4);
  --shadow-turquoise: 0 10px 40px -10px rgba(2, 176, 181, 0.4);

  /* Legacy shadow names */
  --shadow-purple: var(--shadow-magenta);
  --shadow-cyan: var(--shadow-turquoise);

  /* ============================================
   * ANIMAÇÕES - DURAÇÃO
   * ============================================ */
  --duration-instant: 0ms;
  --duration-fast: 150ms;
  --duration-normal: 300ms;
  --duration-slow: 500ms;
  --duration-slower: 700ms;
  --duration-slowest: 1000ms;

  /* ============================================
   * ANIMAÇÕES - EASING
   * ============================================ */
  --ease-linear: linear;
  --ease-in: cubic-bezier(0.4, 0, 1, 1);
  --ease-out: cubic-bezier(0, 0, 0.2, 1);
  --ease-in-out: cubic-bezier(0.4, 0, 0.2, 1);
  --ease-bounce: cubic-bezier(0.68, -0.55, 0.265, 1.55);
  --ease-smooth: cubic-bezier(0.4, 0, 0.2, 1);
  --ease-snap: cubic-bezier(0.77, 0, 0.175, 1);
  --ease-elastic: cubic-bezier(0.68, -0.6, 0.32, 1.6);

  /* ============================================
   * Z-INDEX SCALE
   * ============================================ */
  --z-behind: -1;
  --z-base: 0;
  --z-dropdown: 100;
  --z-sticky: 200;
  --z-fixed: 300;
  --z-modal-backdrop: 400;
  --z-modal: 500;
  --z-popover: 600;
  --z-tooltip: 700;
  --z-cursor: 9999;

  /* ============================================
   * TRANSIÇÕES PADRÃO
   * ============================================ */
  --transition-colors: color var(--duration-normal) var(--ease-smooth),
                       background-color var(--duration-normal) var(--ease-smooth),
                       border-color var(--duration-normal) var(--ease-smooth);
  --transition-transform: transform var(--duration-normal) var(--ease-smooth);
  --transition-opacity: opacity var(--duration-normal) var(--ease-smooth);
  --transition-shadow: box-shadow var(--duration-normal) var(--ease-smooth);
  --transition-all: all var(--duration-normal) var(--ease-smooth);
}

/* ============================================
 * MEDIA QUERY: REDUCED MOTION
 * Respeita preferência do usuário
 * ============================================ */
@media (prefers-reduced-motion: reduce) {
  :root {
    --duration-instant: 0ms;
    --duration-fast: 0ms;
    --duration-normal: 0ms;
    --duration-slow: 0ms;
    --duration-slower: 0ms;
    --duration-slowest: 0ms;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ============================================
 * DARK MODE (opcional - classe no body)
 * ============================================ */
body.dark-mode,
body.tingle-dark-theme {
  --text-primary: #FFFFFF;
  --text-secondary: rgba(255, 255, 255, 0.7);
  --text-tertiary: rgba(255, 255, 255, 0.5);
  --text-muted: rgba(255, 255, 255, 0.4);
  --text-inverse: #321E0C;

  --glass-bg: rgba(26, 26, 46, 0.7);
  --glass-bg-light: rgba(26, 26, 46, 0.85);
  --glass-bg-strong: rgba(26, 26, 46, 0.95);
  --glass-border: rgba(255, 255, 255, 0.1);
  --glass-border-light: rgba(255, 255, 255, 0.05);

  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.2);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.3), 0 2px 4px -1px rgba(0, 0, 0, 0.2);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.3), 0 4px 6px -2px rgba(0, 0, 0, 0.2);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.4), 0 10px 10px -5px rgba(0, 0, 0, 0.2);
  --shadow-2xl: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}
