@layer reset, base, components, modules, utilities;

:root {
  /* Colors — Arena das Figurinhas palette */
  --color-primary: #1B6B3A;
  --color-primary-hover: #155A30;
  --color-primary-light: #E4F0E8;
  --color-primary-selected: #F0F7F2;
  --color-primary-dark: #0E4D28;

  --color-navy: #0D1B3E;
  --color-navy-dark: #070F24;
  --color-navy-light: #E8EBF3;

  --color-accent: #C8941A;
  --color-accent-hover: #A67A12;
  --color-accent-light: #FBF0D4;
  --color-accent-border: #D4A22B;
  --color-accent-text: #7A5A0A;
  --color-accent-text-dark: #412402;

  --color-info: #185FA5;
  --color-info-light: #E6F1FB;
  --color-info-border: #85B7EB;

  --color-danger: #E24B4A;
  --color-danger-light: #FCEBEB;

  --color-success: #3B6D11;
  --color-success-light: #EAF3DE;
  --color-success-border: #97C459;

  --color-star: #993556;
  --color-star-light: #FBEAF0;

  --color-ink: #2C2C2A;
  --color-ink-secondary: #888780;
  --color-ink-border: #D3D1C7;
  --color-ink-badge: #B4B2A9;

  --color-canvas: #FFFFFF;
  --color-canvas-alt: #f8f7f2;
  --color-warning-bg: #FAEEDA;

  /* Sticker category tones */
  --color-category-player: #6B5A3E;
  --color-category-profile: #7A5A6B;

  /* On-dark surface overlays (hero, navbar, vendor banner) */
  --on-dark-text: oklch(100% 0 0 / 0.85);
  --on-dark-text-muted: oklch(100% 0 0 / 0.7);
  --on-dark-hover: oklch(100% 0 0 / 0.15);
  --on-dark-bg-subtle: oklch(100% 0 0 / 0.1);
  --on-dark-bg: oklch(100% 0 0 / 0.2);
  --on-dark-border: oklch(100% 0 0 / 0.3);
  --on-dark-decoration: oklch(100% 0 0 / 0.05);

  /* Functional overlays */
  --color-overlay: oklch(0% 0 0 / 0.4);
  --color-focus-ring: oklch(45% 0.12 150 / 0.15);

  /* Spacing scale */
  --space-xs: 0.25rem;
  --space-sm: 0.5rem;
  --space-md: 1rem;
  --space-lg: 1.5rem;
  --space-xl: 2rem;
  --space-2xl: 3rem;
  --space-3xl: 4rem;
  --inline-space: 1ch;
  --block-space: 1rem;

  /* Typography */
  --font-family: "Nunito", system-ui, -apple-system, sans-serif;
  --font-display: "Big Shoulders Display", "Nunito", system-ui, sans-serif;
  --text-caption: 0.625rem;     /* 10px */
  --text-xs: 0.75rem;           /* 12px */
  --text-small: 0.875rem;       /* 14px */
  --text-normal: 1rem;          /* 16px */
  --text-large: 1.125rem;       /* 18px */
  --text-xlarge: 1.25rem;       /* 20px */
  --text-xxlarge: 1.875rem;     /* 30px */
  --text-hero: clamp(1.25rem, 4vw, 1.875rem);
  --leading-tight: 1.2;
  --leading-normal: 1.5;
  --leading-relaxed: 1.65;

  /* Layout */
  --main-padding: clamp(1rem, 4vw, 1.5rem);
  --max-width: 80rem;    /* 1280px */
  --content-width: 56rem;
  --narrow-width: 40rem; /* max-w-2xl for forms */
  --checkout-width: 56rem; /* max-w-4xl */

  /* Z-index scale */
  --z-popup: 10;
  --z-nav: 30;
  --z-floating: 40;
  --z-tooltip: 50;
  --z-bottom-nav: 45;

  /* Border radius */
  --radius-sm: 0.25rem;   /* 4px — badges */
  --radius-md: 0.5rem;    /* 8px — inputs */
  --radius-lg: 0.75rem;   /* 12px — cards, big buttons */
  --radius-xl: 1rem;      /* 16px — modals */
  --radius-pill: 9999px;

  /* Shadows — minimal, only for floating elements */
  --shadow-xs: 0 1px 2px oklch(0% 0 0 / 0.04);
  --shadow-sm: 0 1px 3px oklch(0% 0 0 / 0.06);
  --shadow-md: 0 4px 12px oklch(0% 0 0 / 0.08);
  --shadow-lg: 0 8px 24px oklch(0% 0 0 / 0.1);
  --shadow-xl: 0 16px 40px oklch(0% 0 0 / 0.14);

  /* Transitions */
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --duration-fast: 150ms;
  --duration-normal: 200ms;
  --duration-slow: 300ms;

  /* Component sizing */
  --navbar-height: 3.5rem;
  --size-sticker-number: 2.25rem;
  --size-sticker-number-lg: 2.5rem;
  --size-qr-code: 240px;
}

@media (prefers-reduced-motion: reduce) {
  :root {
    --duration-fast: 0ms;
    --duration-normal: 0ms;
    --duration-slow: 0ms;
    --ease-spring: ease;
  }

  *, *::before, *::after {
    animation-duration: 0ms !important;
    animation-iteration-count: 1 !important;
  }
}
