/* ============================================================
   FOA Academy Platform — Design Tokens
   Version: 1.1.0 (mirrors FOA Design System v2.1, October 2026)
   1.1.0 adds the control sizes (section 3.1). Nothing else changed.
   Owner:   Marketing & Member Success, Farm Owners Academy
   ============================================================
   Drop into the root stylesheet. Every component on the FOA
   Academy platform must consume these tokens, never hard-coded
   hex values, pixel sizes, or spacings.

   All tokens are overridable at runtime via the admin settings
   panel. Any new token added here must also be exposed there.
   ============================================================ */

:root {

  /* ---------- 1.1 Burnt Orange — Primary Brand ---------- */
  --color-orange-50:  #FDF6EC;
  --color-orange-100: #FAEBD4;
  --color-orange-200: #F5D7A8;
  --color-orange-300: #EEC47C;
  --color-orange-400: #E8B258;
  --color-orange-500: #E09B3B;  /* ★ BASE */
  --color-orange-600: #C88220;
  --color-orange-700: #A86A18;
  --color-orange-800: #875412;
  --color-orange-900: #5C380A;

  /* ---------- 1.2 Charcoal / Grey — Primary Neutral ---------- */
  --color-grey-50:  #F7F7F7;
  --color-grey-100: #EFEFEF;
  --color-grey-200: #DCDCDC;
  --color-grey-300: #B3B4B7;
  --color-grey-400: #8A8A8D;
  --color-grey-500: #6A6A6A;
  --color-grey-600: #505050;
  --color-grey-700: #3A3A3A;
  --color-grey-800: #2A2A2A;  /* ★ BASE */
  --color-grey-900: #141414;

  /* ---------- 1.3 Tomato Red — Alerts, Errors, Destructive ---------- */
  --color-red-50:  #FEF0EF;
  --color-red-100: #FDD8D5;
  --color-red-200: #F9A9A3;
  --color-red-300: #F47F78;
  --color-red-400: #ED5F58;
  --color-red-500: #E0493B;   /* ★ BASE */
  --color-red-600: #C03020;
  --color-red-700: #9E2016;
  --color-red-800: #7A180F;
  --color-red-900: #540F0A;

  /* ---------- 1.4 Navy Blue — Secondary Accent ---------- */
  --color-navy-50:  #EBF0F7;
  --color-navy-100: #CCE0F0;
  --color-navy-200: #99BBDD;
  --color-navy-300: #6699CC;
  --color-navy-400: #3D77AA;
  --color-navy-500: #003366;   /* ★ BASE */
  --color-navy-600: #002A52;
  --color-navy-700: #00213F;
  --color-navy-800: #00182E;
  --color-navy-900: #000F1C;

  /* ---------- 1.5 Success Green — Completion only ---------- */
  --color-success:       #2D7A4F;
  --color-success-light: #D4EDDF;
  --color-success-text:  #1A5C38;

  /* ---------- Borders ---------- */
  --color-border: #E2E0DC;


  /* ============================================================
     2. TYPOGRAPHY
     DM Sans only. Max weight available: 700 (no 900/Black).
     ============================================================ */

  --font-base:          'DM Sans', system-ui, -apple-system, sans-serif;
  --font-heading:       var(--font-base); /* used at weight 700 */
  --font-heading-sub:   var(--font-base); /* used at weight 700 */
  --font-heading-light: var(--font-base); /* used at weight 500 */
  --font-body:          var(--font-base); /* used at weight 400 */
  --font-ui:            var(--font-base); /* used at weight 500 */

  /* Type scale */
  --text-xs:   12px;   --lh-xs:   1.5;
  --text-sm:   14px;   --lh-sm:   1.6;
  --text-base: 17px;   --lh-base: 1.8;   /* 17px MIN for lesson body */
  --text-md:   20px;   --lh-md:   1.5;
  --text-lg:   24px;   --lh-lg:   1.4;
  --text-xl:   30px;   --lh-xl:   1.3;
  --text-2xl:  38px;   --lh-2xl:  1.2;
  --text-3xl:  48px;   --lh-3xl:  1.15;

  /* Weights */
  --weight-regular: 400;
  --weight-medium:  500;
  --weight-bold:    700;   /* heaviest weight available in DM Sans */


  /* ============================================================
     3. SPACING SCALE — 4px increments
     Never use arbitrary pixel values.
     ============================================================ */

  --space-1:  4px;
  --space-2:  8px;
  --space-3:  12px;
  --space-4:  16px;
  --space-6:  24px;
  --space-8:  32px;
  --space-12: 48px;
  --space-16: 64px;
  --space-24: 96px;


  /* ============================================================
     LAYOUT CONSTRAINTS
     ============================================================ */

  --max-line-width: 680px;  /* lesson body text cap */
  --touch-target:   44px;   /* mobile minimum */
  --focus-ring:     2px solid var(--color-orange-700);


  /* ============================================================
     CONTROL SIZES (v2.1) - every button, text box and drop-down
     uses one of two heights. Use height, not min-height, with
     horizontal padding only. Small = dense lists/tables only.
     ============================================================ */

  --control-h:        44px;
  --control-h-sm:     36px;
  --control-radius:   6px;
  --control-pad-x:    var(--space-4);
  --control-pad-x-sm: var(--space-3);


  /* ============================================================
     SEMANTIC ALIASES — use these in components when possible
     ============================================================ */

  --text-primary:    var(--color-grey-800);
  --text-secondary:  var(--color-grey-500);
  --text-muted:      var(--color-grey-400);
  --text-on-orange:  var(--color-orange-800);
  --link:            var(--color-navy-500);
  --link-hover:      var(--color-navy-700);

  --surface-page:    var(--color-grey-50);
  --surface-card:    #FFFFFF;
  --surface-dark:    var(--color-grey-800);

  --action-primary:          var(--color-orange-500);
  --action-primary-hover:    var(--color-orange-600);
  --action-primary-pressed:  var(--color-orange-700);
  --action-primary-disabled: var(--color-orange-200);

  --action-destructive:       var(--color-red-500);
  --action-destructive-hover: var(--color-red-600);

  --state-error-bg:   var(--color-red-50);
  --state-error-fg:   var(--color-red-700);
  --state-info-bg:    var(--color-navy-50);
  --state-info-fg:    var(--color-navy-700);
  --state-success-bg: var(--color-success-light);
  --state-success-fg: var(--color-success-text);
}


/* ============================================================
   BASELINE
   ============================================================ */

html {
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: var(--lh-base);
  color: var(--text-primary);
  background: var(--surface-page);
}

/* Visible focus ring on every interactive element.
   Never suppress without a visible replacement. */
:focus-visible {
  outline: var(--focus-ring);
  outline-offset: 2px;
}
