/**
 * 01-variables.css - Global Design System Tokens
 * Aligned with Blocksy theme custom properties
 */

:root,
body {
  /* ==========================================================================
     Blocksy Palette Slots (Exact Alignment)
     ========================================================================== */
  --theme-palette-color-1: #0F766E !important; /* Clinical Primary Teal */
  --theme-palette-color-2: #115E59 !important; /* Clinical Dark Teal / Hover */
  --theme-button-background-initial-color: #0F766E !important;
  --theme-button-background-hover-color: #115E59 !important;
  --theme-palette-color-3: #3F3F46; /* Body Text (Deep Zinc) */
  --theme-palette-color-4: #18181B; /* Headings (Charcoal / Near Black) */
  --theme-palette-color-5: #E4E4E7; /* Hairline Border / Subtle Divider */
  --theme-palette-color-6: #F4F4F5; /* Light Surface / Neutral Fill */
  --theme-palette-color-7: #FAF9F6; /* Base Canvas (Warm Alabaster) */
  --theme-palette-color-8: #FFFFFF; /* Pure White Elevated Surface */

  /* ==========================================================================
     Custom Brand Tokens
     ========================================================================== */
  --dsc-teal-light: #F0FDFA;
  --dsc-teal-border: rgba(15, 118, 110, 0.25);
  --dsc-teal-focus-ring: rgba(15, 118, 110, 0.18);

  --text-primary: var(--theme-palette-color-4);
  --text-body: var(--theme-palette-color-3);
  --text-muted: #52525B;
  --text-subtle: #71717A;
  --text-light: #A1A1AA;

  --bg-canvas: var(--theme-palette-color-7);
  --bg-surface: var(--theme-palette-color-8);
  --border-hairline: 1px solid var(--theme-palette-color-5);
  --border-radius-sm: 6px;
  --border-radius-md: 10px;
  --border-radius-lg: 16px;
  --border-radius-full: 9999px;

  /* Subtle elevations (no harsh, dirty shadows) */
  --shadow-subtle: 0 1px 3px rgba(24, 24, 27, 0.04), 0 1px 2px rgba(24, 24, 27, 0.02);
  --shadow-card: 0 4px 6px -1px rgba(24, 24, 27, 0.04), 0 2px 4px -2px rgba(24, 24, 27, 0.02);
  --shadow-hover: 0 12px 24px -6px rgba(24, 24, 27, 0.08), 0 4px 8px -4px rgba(24, 24, 27, 0.04);
  --shadow-book-spine: 4px 8px 20px rgba(0, 0, 0, 0.12);

  /* ==========================================================================
     Format Badges
     ========================================================================== */
  --badge-ebook-bg: #F0FDFA;
  --badge-ebook-text: #0F766E;
  --badge-ebook-border: rgba(15, 118, 110, 0.22);

  --badge-physical-bg: #F4F4F5;
  --badge-physical-text: #27272A;
  --badge-physical-border: #E4E4E7;

  --badge-combo-bg: #FEF3C7;
  --badge-combo-text: #92400E;
  --badge-combo-border: rgba(217, 119, 6, 0.28);

  /* ==========================================================================
     Typography
     ========================================================================== */
  --font-editorial: 'Newsreader', Georgia, 'Times New Roman', serif;
  --font-ui: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;

  /* Fluid Clamps */
  --fs-hero: clamp(2.15rem, 4.5vw + 0.8rem, 3.4rem);
  --fs-h1: clamp(1.85rem, 3.8vw + 0.6rem, 2.75rem);
  --fs-h2: clamp(1.45rem, 2.8vw + 0.5rem, 2.15rem);
  --fs-h3: clamp(1.15rem, 1.8vw + 0.4rem, 1.45rem);
  --fs-h4: 1.125rem;
  --fs-body: 1rem;
  --fs-body-sm: 0.875rem;
  --fs-caption: 0.75rem;

  --lh-tight: 1.15;
  --lh-heading: 1.28;
  --lh-body: 1.62;

  /* Mobile Touch Target Standards */
  --min-tap-target: 44px;
}

/* Base Body & Canvas Reset */
body {
  background-color: var(--bg-canvas) !important;
  color: var(--text-body);
  font-family: var(--font-ui);
  line-height: var(--lh-body);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Headings Typography */
h1, h2, h3, .h1, .h2, .h3,
.entry-title, .product_title {
  color: var(--text-primary);
  font-family: var(--font-editorial);
  font-feature-settings: 'lnum' 1, 'kern' 1;
  font-weight: 500;
  line-height: var(--lh-heading);
  letter-spacing: -0.015em;
}

h1, .entry-title, .product_title {
  font-size: var(--fs-h1);
}

h2 {
  font-size: var(--fs-h2);
}

h3 {
  font-size: var(--fs-h3);
}

/* UI Elements & Meta */
nav, button, input, select, textarea, .button,
.price, .sku, .posted_in, .tagged_as,
.woocommerce-Price-amount, .added_to_cart {
  font-family: var(--font-ui) !important;
}

/* Selection */
::selection {
  background-color: var(--dsc-teal-light);
  color: var(--theme-palette-color-1);
}
