/**
 * OrganicsFood Design Tokens — Organic Biophilic 3.1
 * Fraunces (heading) + Raleway (body)
 * ARMONIZAT cu Shoptimizer Customizer: #15803D primary, #f26621 accent
 * Auditat UI/UX Pro Max: contrast AA, focus ring, touch targets
 * @version 3.1.0
 */

/* =====================================================
   FONT-FACE DECLARATIONS — Self-hosted
   ===================================================== */

@font-face {
  font-family: 'Fraunces';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url('../fonts/fraunces-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: 'Fraunces';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url('../fonts/fraunces-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: 'Raleway';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url('../fonts/raleway-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: 'Raleway';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url('../fonts/raleway-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* =====================================================
   CSS CUSTOM PROPERTIES — Design Tokens
   ARMONIZAT cu Shoptimizer Customizer (DB theme_mods):
   - shoptimizer_navigation_bg_color: #15803D
   - shoptimizer_woocommerce_button_bg: #15803D
   - shoptimizer_color_general_links: #f26621
   ===================================================== */

:root {
  /* ---------- CULORI PRIMARE — #15803D familia ----------
     Shoptimizer green: #15803D (HSL 160°, 83%, 28%)
     Derivate pe aceeasi nuanta teal-emerald
  */
  --color-primary: #15803D;
  --color-primary-dark: #166534;
  --color-primary-light: #DCFCE7;
  --color-primary-50: #F0FDF4;
  --color-primary-rgb: 21, 128, 61;

  /* ---------- CULORI SECUNDARE — #f26621 familia ----------
     Shoptimizer orange: #f26621 (link-uri, hover, accent)
  */
  --color-secondary: #f26621;
  --color-secondary-dark: #D9551A;
  --color-secondary-light: #FFF4ED;
  --color-secondary-rgb: 242, 102, 33;

  /* ---------- CULORI ACCENT ---------- */
  --color-accent: #8B5E3C;
  --color-accent-light: #A47B5C;
  --color-cream: #FDF8F0;
  --color-cream-dark: #F5EDE0;
  --color-cream-rgb: 253, 248, 240;

  /* ---------- NEUTRALS ----------
     Contrast verificat WCAG AA pe #FFFFFF:
     --color-text: #1A2B25 → 12.8:1 ✅
     --color-text-secondary: #4A5D56 → 5.7:1 ✅
     --color-text-muted: #5F6F68 → 4.6:1 ✅
     Neutrals cu undertone teal pt armonizare cu #15803D
  */
  --color-white: #FFFFFF;
  --color-text: #1A2B25;
  --color-text-secondary: #4A5D56;
  --color-text-muted: #5F6F68;
  --color-border: #CCDDD6;
  --color-border-light: #E4EEE9;
  --color-bg-alt: #F5FAF8;

  /* ---------- FUNCTIONALE ---------- */
  --color-badge-sale: #DC2626;
  --color-badge-new: #16A34A;
  --color-star: #F59E0B;
  --color-success: #16A34A;
  --color-error: #DC2626;
  --color-warning: #F59E0B;
  --color-info: #3B82F6;

  /* ---------- FOCUS / ACCESSIBILITY ---------- */
  --color-focus-ring: rgba(21, 128, 61, 0.4);
  --focus-ring-width: 3px;
  --focus-ring-offset: 2px;

  /* ---------- TIPOGRAFIE ---------- */
  --font-heading: 'Fraunces', Georgia, 'Times New Roman', serif;
  --font-body: 'Raleway', 'Segoe UI', system-ui, -apple-system, sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', monospace;

  /* ---------- FONT SIZES (Type Scale — Major Third 1.25) ---------- */
  --text-xs: 0.75rem;    /* 12px */
  --text-sm: 0.875rem;   /* 14px */
  --text-base: 1rem;     /* 16px — minimum body */
  --text-lg: 1.125rem;   /* 18px */
  --text-xl: 1.25rem;    /* 20px */
  --text-2xl: 1.5rem;    /* 24px */
  --text-3xl: 1.875rem;  /* 30px */
  --text-4xl: 2.25rem;   /* 36px */
  --text-5xl: clamp(2.25rem, 5vw, 3.5rem); /* 36-56px responsive */

  /* ---------- FONT WEIGHTS ---------- */
  --weight-light: 300;
  --weight-normal: 400;
  --weight-medium: 500;
  --weight-semibold: 600;
  --weight-bold: 700;

  /* ---------- LINE HEIGHTS ---------- */
  --leading-tight: 1.2;
  --leading-snug: 1.35;
  --leading-normal: 1.6;
  --leading-relaxed: 1.75;

  /* ---------- SPACING (4px base / 8dp rhythm) ---------- */
  --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 */

  /* ---------- BORDER RADIUS (Organic Biophilic: 16-24px) ---------- */
  --radius-sm: 0.5rem;    /* 8px */
  --radius-md: 0.75rem;   /* 12px */
  --radius-lg: 1rem;      /* 16px — card default */
  --radius-xl: 1.5rem;    /* 24px */
  --radius-2xl: 2rem;     /* 32px */
  --radius-full: 9999px;

  /* ---------- SHADOWS (teal-tinted, natural) ---------- */
  --shadow-xs: 0 1px 2px rgba(26, 43, 37, 0.04);
  --shadow-sm: 0 1px 3px rgba(26, 43, 37, 0.06), 0 1px 2px rgba(26, 43, 37, 0.04);
  --shadow-md: 0 4px 12px rgba(26, 43, 37, 0.08);
  --shadow-lg: 0 10px 30px rgba(26, 43, 37, 0.10);
  --shadow-xl: 0 20px 40px rgba(26, 43, 37, 0.14);
  --shadow-card: 0 2px 8px rgba(26, 43, 37, 0.06);
  --shadow-card-hover: 0 12px 36px rgba(26, 43, 37, 0.14);
  --shadow-button: 0 2px 8px rgba(21, 128, 61, 0.20);
  --shadow-button-hover: 0 4px 16px rgba(21, 128, 61, 0.30);

  /* ---------- TRANSITIONS ----------
     UX Rule: micro-interactions 150-300ms, complex 300-400ms
  */
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-in-out: cubic-bezier(0.4, 0, 0.2, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --duration-fast: 150ms;
  --duration-normal: 250ms;
  --duration-slow: 350ms;
  --duration-slower: 500ms;

  /* ---------- LAYOUT ---------- */
  --container-max: 1439px;
  --container-narrow: 900px;
  --container-wide: 1440px;
  --header-height: 72px;
  --header-height-mobile: 60px;
  --announcement-height: 40px;

  /* ---------- TOUCH TARGETS (44px min iOS, 48px Material) ---------- */
  --touch-min: 44px;
  --touch-comfortable: 48px;

  /* ---------- Z-INDEX SCALE ---------- */
  --z-below: -1;
  --z-base: 0;
  --z-raised: 10;
  --z-dropdown: 20;
  --z-sticky: 40;
  --z-overlay: 50;
  --z-modal: 60;
  --z-popover: 70;
  --z-toast: 80;
  --z-max: 100;
}

/* =====================================================
   REDUCED MOTION — Accessibility
   ===================================================== */

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

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