/**
 * Design Tokens - Osona 2024
 * Sistema de variables CSS per mantenir consistència i escalabilitat
 */

:root {
  /* === COLORS === */
  --color-primary: #007cba;
  --color-primary-light: #0099d4;
  --color-primary-dark: #005a8b;
  
  --color-secondary: #666;
  --color-accent: #f39c12;
  
  /* Text colors */
  --color-text: #333;
  --color-text-light: #666;
  --color-text-muted: #999;
  --color-text-inverse: #fff;
  
  /* Background colors */
  --color-background: #fff;
  --color-background-light: #f8f9fa;
  --color-background-dark: #333;
  --color-background-overlay: rgba(0, 0, 0, 0.5);
  
  /* Border colors */
  --color-border: #eee;
  --color-border-light: #f0f0f0;
  --color-border-dark: #ddd;
  
  /* === TYPOGRAPHY === */
  --font-family-base: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  --font-family-heading: var(--font-family-base);
  --font-family-mono: "SF Mono", Monaco, "Cascadia Code", "Roboto Mono", Consolas, "Courier New", monospace;
  
  /* Font sizes - Mobile first */
  --font-size-xs: 0.75rem;    /* 12px */
  --font-size-sm: 0.875rem;   /* 14px */
  --font-size-base: 1rem;     /* 16px */
  --font-size-lg: 1.125rem;   /* 18px */
  --font-size-xl: 1.25rem;    /* 20px */
  --font-size-2xl: 1.5rem;    /* 24px */
  --font-size-3xl: 1.875rem;  /* 30px */
  --font-size-4xl: 2.25rem;   /* 36px */
  --font-size-5xl: 3rem;      /* 48px */
  --font-size-hero: 3.5rem;   /* 56px */
  
  /* Font weights */
  --font-weight-light: 300;
  --font-weight-normal: 400;
  --font-weight-medium: 500;
  --font-weight-semibold: 600;
  --font-weight-bold: 700;
  
  /* Line heights */
  --line-height-tight: 1.25;
  --line-height-normal: 1.5;
  --line-height-relaxed: 1.75;
  
  /* === SPACING === */
  --spacing-0: 0;
  --spacing-1: 0.25rem;   /* 4px */
  --spacing-2: 0.5rem;    /* 8px */
  --spacing-3: 0.75rem;   /* 12px */
  --spacing-4: 1rem;      /* 16px */
  --spacing-5: 1.25rem;   /* 20px */
  --spacing-6: 1.5rem;    /* 24px */
  --spacing-8: 2rem;      /* 32px */
  --spacing-10: 2.5rem;   /* 40px */
  --spacing-12: 3rem;     /* 48px */
  --spacing-16: 4rem;     /* 64px */
  --spacing-20: 5rem;     /* 80px */
  --spacing-24: 6rem;     /* 96px */
  
  /* === LAYOUT === */
  --container-max-width: 1920px;
  --container-padding: var(--spacing-10);
  /* Scroll-padding top used to compensate WP admin bar when logged-in */
  --osona-scroll-padding-top: 0px;
  
  /* Grid & Flexbox gaps */
  --gap-xs: var(--spacing-2);
  --gap-sm: var(--spacing-4);
  --gap-md: var(--spacing-6);
  --gap-lg: var(--spacing-8);
  --gap-xl: var(--spacing-12);
  
  /* === BORDERS === */
  --border-width: 1px;
  --border-width-thick: 2px;
  --border-radius-none: 0;
  --border-radius-sm: 0.125rem;
  --border-radius-base: 0.25rem;
  --border-radius-md: 0.375rem;
  --border-radius-lg: 0.5rem;
  --border-radius-xl: 0.75rem;
  --border-radius-full: 9999px;
  
  /* === SHADOWS === */
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-base: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  
  /* === TRANSITIONS === */
  --transition-fast: 150ms ease-in-out;
  --transition-base: 250ms ease-in-out;
  --transition-slow: 350ms ease-in-out;
  
  /* === Z-INDEX === */
  --z-negative: -1;
  --z-0: 0;
  --z-10: 10;
  --z-20: 20;
  --z-30: 30;
  --z-40: 40;
  --z-50: 50;
  --z-header: 100;
  --z-dropdown: 200;
  --z-overlay: 300;
  --z-modal: 400;
  --z-tooltip: 500;
  
  /* === BREAKPOINTS (for media queries) === */
  --breakpoint-sm: 640px;
  --breakpoint-md: 768px;
  --breakpoint-lg: 1024px;
  --breakpoint-xl: 1280px;
  --breakpoint-2xl: 1536px;
}

/* === FONT-FACE: GORDITA (local assets) === */
@font-face {
  font-family: 'Gordita';
  src: url('../../fonts/Gordita/Gordita-Black.woff2') format('woff2'),
    url('../../fonts/Gordita/Gordita-Black.woff') format('woff'),
    url('../../fonts/Gordita/Gordita-Black.ttf') format('truetype');
  font-weight: 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Gordita';
  src: url('../../fonts/Gordita/Gordita-Regular.woff2') format('woff2'),
    url('../../fonts/Gordita/Gordita-Regular.woff') format('woff'),
    url('../../fonts/Gordita/Gordita-Regular.ttf') format('truetype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Gordita';
  src: url('../../fonts/Gordita/Gordita-Medium.woff2') format('woff2'),
    url('../../fonts/Gordita/Gordita-Medium.woff') format('woff'),
    url('../../fonts/Gordita/Gordita-Medium.ttf') format('truetype');
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

/* === RESPONSIVE FONT SIZES === */
@media (min-width: 768px) {
  :root {
    --font-size-hero: 4rem;     /* 64px en tablet+ */
    --font-size-5xl: 3.5rem;   /* 56px en tablet+ */
    --font-size-4xl: 2.5rem;   /* 40px en tablet+ */
  }
}

@media (min-width: 1024px) {
  :root {
    --font-size-hero: 5rem;     /* 80px en desktop */
    --font-size-5xl: 4rem;     /* 64px en desktop */
    --container-padding: var(--spacing-6);
  }
}

/* === UTILITY FOR REDUCED MOTION === */
@media (prefers-reduced-motion: reduce) {
  :root {
    --transition-fast: 0ms;
    --transition-base: 0ms;
    --transition-slow: 0ms;
  }
}

/* Ensure the scroll-snap / anchor positioning accounts for the admin bar when present.
   JS will set --osona-scroll-padding-top to the admin bar height (if any). */
html {
  scroll-padding-top: var(--osona-scroll-padding-top);
}