/* =============================================================================
   Los Caseros — Design Tokens (color, type, space, radius, shadow, motion)
   Fuente de verdad: /modelo/.../colors_and_type.css
   NO editar valores a mano sin actualizar docs/02-design-tokens.md.

   Las webfonts (Montserrat + Pangolin) se encolan desde functions.php
   (handle 'loscaseros-fonts'), por eso aquí se omite el @import.
   ============================================================================= */

:root {
  /* ============ Brand Color Tokens ============ */

  /* Primary — verdes (greens). The brand lives here. */
  --lc-green-900: #0E3A05;   /* deepest, used sparingly for headings on cream */
  --lc-green-800: #1E5B0C;   /* PRIMARY — leaves, logo, primary buttons */
  --lc-green-700: #00753A;   /* secondary green — accents, links, "ecomarket" wordmark */
  --lc-green-500: #4B9A3E;   /* fresher, lighter — hover tints, success */
  --lc-green-200: #C8E0B5;   /* tint backgrounds, chips */
  --lc-green-100: #E6F1DA;   /* subtle surface tint */

  /* Earth — marrones (browns). The basket, grounding tones. */
  --lc-brown-900: #3C2603;
  --lc-brown-700: #664100;   /* support brown — body accents */
  --lc-brown-500: #9B6D2E;
  --lc-brown-300: #D8B388;   /* light brown / beige — basket weave, dividers */
  --lc-brown-100: #F1E2C7;   /* warm tint */

  /* Surface — cremas (cream backgrounds). Soft, warm whites. */
  --lc-cream-50:  #FFFDF8;   /* paper white */
  --lc-cream-100: #FBF6EC;   /* default page background */
  --lc-cream-200: #F3EBD9;   /* card / panel surface */
  --lc-cream-300: #E8DCC2;   /* hover / pressed surface */

  /* Ink — text colors, warm-leaning */
  --lc-ink-900: #1B1A12;     /* primary body text — warm near-black */
  --lc-ink-700: #3A3528;
  --lc-ink-500: #6B6452;     /* secondary text */
  --lc-ink-300: #A39E8B;     /* placeholder, disabled */

  /* Semantic — feedback */
  --lc-success: #00753A;     /* same as green-700 */
  --lc-warning: #C8861D;
  --lc-danger:  #B5391C;     /* "Out of stock" / errors — warm red, not pure */
  --lc-sale:    #B5391C;     /* "¡Oferta!" badges */
  --lc-info:    #1E5B0C;

  /* ============ Semantic surface tokens ============ */
  --lc-bg:           var(--lc-cream-100);
  --lc-bg-elevated:  var(--lc-cream-50);
  --lc-surface:      var(--lc-cream-50);
  --lc-surface-alt:  var(--lc-cream-200);
  --lc-border:       #E5D9BD;          /* warm hairline */
  --lc-border-strong:#C9B98F;
  --lc-divider:      #EBE0C5;

  --lc-fg-primary:   var(--lc-ink-900);
  --lc-fg-secondary: var(--lc-ink-500);
  --lc-fg-tertiary:  var(--lc-ink-300);
  --lc-fg-on-green:  var(--lc-cream-50);
  --lc-fg-brand:     var(--lc-green-800);
  --lc-fg-link:      var(--lc-green-700);

  /* ============ Typography ============ */
  --lc-font-display: 'Pangolin', 'Caveat Brush', 'Patrick Hand', system-ui, sans-serif;
  --lc-font-body:    'Montserrat', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --lc-font-mono:    ui-monospace, 'JetBrains Mono', SFMono-Regular, Menlo, monospace;

  /* Modular type scale — 1.250 (major third), body 16px */
  --lc-text-xs:   0.75rem;   /* 12px — micro-copy, captions */
  --lc-text-sm:   0.875rem;  /* 14px — small UI */
  --lc-text-base: 1rem;      /* 16px — body */
  --lc-text-md:   1.125rem;  /* 18px — lead body */
  --lc-text-lg:   1.375rem;  /* 22px — sub-heads */
  --lc-text-xl:   1.75rem;   /* 28px — h3 */
  --lc-text-2xl:  2.25rem;   /* 36px — h2 */
  --lc-text-3xl:  3rem;      /* 48px — h1 */
  --lc-text-4xl:  4.25rem;   /* 68px — display */

  /* Weights */
  --lc-w-light: 300;
  --lc-w-regular: 400;
  --lc-w-medium: 500;
  --lc-w-semibold: 600;
  --lc-w-bold: 700;
  --lc-w-extrabold: 800;

  /* Line heights */
  --lc-lh-tight:   1.1;
  --lc-lh-snug:    1.25;
  --lc-lh-normal:  1.5;
  --lc-lh-relaxed: 1.65;

  /* Letter spacing */
  --lc-tracking-tight:  -0.02em;
  --lc-tracking-normal: 0;
  --lc-tracking-wide:   0.04em;
  --lc-tracking-wider:  0.12em;    /* eyebrow / category labels */

  /* ============ Spacing (8px base) ============ */
  --lc-space-1:  4px;
  --lc-space-2:  8px;
  --lc-space-3:  12px;
  --lc-space-4:  16px;
  --lc-space-5:  20px;
  --lc-space-6:  24px;
  --lc-space-8:  32px;
  --lc-space-10: 40px;
  --lc-space-12: 48px;
  --lc-space-16: 64px;
  --lc-space-20: 80px;
  --lc-space-24: 96px;

  /* ============ Radii — generous, organic ============ */
  --lc-radius-xs:    4px;
  --lc-radius-sm:    8px;
  --lc-radius-md:    14px;   /* default card */
  --lc-radius-lg:    20px;   /* hero panels */
  --lc-radius-xl:    28px;
  --lc-radius-pill:  999px;  /* buttons, chips, badges */
  --lc-radius-blob:  60% 40% 55% 45% / 50% 60% 40% 50%;  /* organic blob shapes */

  /* ============ Shadows — soft, warm-tinted ============ */
  --lc-shadow-xs: 0 1px 2px rgba(60, 38, 3, 0.06);
  --lc-shadow-sm: 0 2px 6px rgba(60, 38, 3, 0.07);
  --lc-shadow-md: 0 6px 18px rgba(60, 38, 3, 0.08), 0 2px 4px rgba(60, 38, 3, 0.05);
  --lc-shadow-lg: 0 14px 36px rgba(60, 38, 3, 0.10), 0 4px 10px rgba(60, 38, 3, 0.05);
  --lc-shadow-xl: 0 24px 60px rgba(60, 38, 3, 0.14);
  --lc-shadow-inset: inset 0 2px 4px rgba(60, 38, 3, 0.08);
  --lc-shadow-focus: 0 0 0 4px rgba(30, 91, 12, 0.18);

  /* ============ Motion ============ */
  --lc-ease:         cubic-bezier(0.22, 0.61, 0.36, 1);   /* gentle out */
  --lc-ease-organic: cubic-bezier(0.34, 1.30, 0.64, 1);   /* slight overshoot, "growing" */
  --lc-dur-fast:    140ms;
  --lc-dur-base:    240ms;
  --lc-dur-slow:    420ms;
  --lc-dur-slower:  720ms;
}

/* =============================================================================
   Semantic element styles
   Apply by giving a wrapper class="lc-typography" — keeps tokens isolated
   so they don't override host pages unintentionally.
   ============================================================================= */
.lc-typography,
.lc-typography * {
  font-family: var(--lc-font-body);
  color: var(--lc-fg-primary);
}

.lc-typography {
  font-size: var(--lc-text-base);
  line-height: var(--lc-lh-relaxed);
  text-wrap: pretty;
}

.lc-typography h1,
.lc-typography .lc-h1 {
  font-family: var(--lc-font-display);
  font-weight: var(--lc-w-regular);
  font-size: var(--lc-text-3xl);
  line-height: var(--lc-lh-tight);
  letter-spacing: var(--lc-tracking-tight);
  color: var(--lc-green-800);
  margin: 0 0 var(--lc-space-4);
}

.lc-typography .lc-display {
  font-family: var(--lc-font-display);
  font-weight: var(--lc-w-regular);
  font-size: var(--lc-text-4xl);
  line-height: 0.95;
  letter-spacing: var(--lc-tracking-tight);
  color: var(--lc-green-800);
}

.lc-typography h2,
.lc-typography .lc-h2 {
  font-family: var(--lc-font-body);
  font-weight: var(--lc-w-bold);
  font-size: var(--lc-text-2xl);
  line-height: var(--lc-lh-snug);
  letter-spacing: var(--lc-tracking-tight);
  color: var(--lc-green-800);
  margin: 0 0 var(--lc-space-3);
}

.lc-typography h3,
.lc-typography .lc-h3 {
  font-family: var(--lc-font-body);
  font-weight: var(--lc-w-semibold);
  font-size: var(--lc-text-xl);
  line-height: var(--lc-lh-snug);
  color: var(--lc-ink-900);
  margin: 0 0 var(--lc-space-3);
}

.lc-typography h4,
.lc-typography .lc-h4 {
  font-family: var(--lc-font-body);
  font-weight: var(--lc-w-semibold);
  font-size: var(--lc-text-lg);
  line-height: var(--lc-lh-snug);
  color: var(--lc-ink-900);
  margin: 0 0 var(--lc-space-2);
}

.lc-typography p,
.lc-typography .lc-body {
  font-size: var(--lc-text-base);
  line-height: var(--lc-lh-relaxed);
  color: var(--lc-ink-700);
  margin: 0 0 var(--lc-space-3);
}

.lc-typography .lc-lead {
  font-size: var(--lc-text-md);
  line-height: var(--lc-lh-relaxed);
  color: var(--lc-ink-700);
}

.lc-typography .lc-eyebrow {
  font-family: var(--lc-font-body);
  font-weight: var(--lc-w-semibold);
  font-size: var(--lc-text-xs);
  text-transform: uppercase;
  letter-spacing: var(--lc-tracking-wider);
  color: var(--lc-green-700);
}

.lc-typography .lc-caption,
.lc-typography small {
  font-size: var(--lc-text-sm);
  color: var(--lc-ink-500);
}

.lc-typography a {
  color: var(--lc-fg-link);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  transition: color var(--lc-dur-fast) var(--lc-ease);
}
.lc-typography a:hover { color: var(--lc-green-800); }

.lc-typography code,
.lc-typography .lc-mono {
  font-family: var(--lc-font-mono);
  font-size: 0.9em;
  background: var(--lc-cream-200);
  padding: 0.1em 0.4em;
  border-radius: var(--lc-radius-xs);
}

/* Price treatment — common in product cards */
.lc-typography .lc-price {
  font-family: var(--lc-font-body);
  font-weight: var(--lc-w-bold);
  color: var(--lc-green-800);
  font-size: var(--lc-text-md);
}
.lc-typography .lc-price-old {
  text-decoration: line-through;
  color: var(--lc-ink-300);
  font-weight: var(--lc-w-medium);
  margin-right: var(--lc-space-2);
}
