/* ==========================================================================
   MindMonks — Design Tokens
   Palette derived directly from the approved logo:
     deep teal   #013628  (the "Mind" wordmark + emblem outline)
     olive green #636D00  (the monk figure, "Monks" wordmark, brain)
     purple      #5D0073  (halo arc, tagline dots, accent brain half)
   Everything below is a soft, therapeutic expansion of those three.
   ========================================================================== */

:root {
  /* ---- Brand source colours (do not alter — matched to logo) ---- */
  --mm-brand-teal: #013628;
  --mm-brand-olive: #636d00;
  --mm-brand-purple: #5d0073;

  /* ---- Teal scale (structure + authority) ---- */
  --mm-teal-900: #01251c;
  --mm-teal-800: #013628;
  --mm-teal-700: #084636;
  --mm-teal-600: #0d5946;
  --mm-teal-500: #157059;
  --mm-teal-300: #7fae9e;
  --mm-teal-200: #b9d5c9;
  --mm-teal-100: #dceae3;
  --mm-teal-050: #eff5f2;

  /* ---- Olive scale (grounding + calm) ---- */
  --mm-olive-800: #4a5200;
  --mm-olive-700: #636d00;
  --mm-olive-600: #77821a;
  --mm-olive-500: #8d9738;
  --mm-olive-300: #bcc189;
  --mm-olive-200: #d9dcbb;
  --mm-olive-100: #ebedd8;
  --mm-olive-050: #f5f6ec;

  /* ---- Purple scale (premium emphasis, used sparingly) ---- */
  --mm-purple-800: #46005a;
  --mm-purple-700: #5d0073;
  --mm-purple-600: #74258a;
  --mm-purple-400: #a071b0;
  --mm-purple-200: #ddc9e4;
  --mm-purple-100: #eee3f2;
  --mm-purple-050: #f7f1f9;

  /* ---- Neutrals: warm, paper-like, never clinical white ---- */
  --mm-neutral-000: #ffffff;
  --mm-neutral-025: #fdfcf8;
  --mm-neutral-050: #faf8f2;
  --mm-neutral-100: #f4f2e9;
  --mm-neutral-200: #e7e5da;
  --mm-neutral-300: #d5d3c7;
  --mm-neutral-500: #8d9089;
  --mm-neutral-700: #545a55;
  --mm-neutral-800: #333a35;
  --mm-neutral-900: #1b2420;

  /* ======================================================================
     Semantic tokens — always use these in components, never raw scales
     ====================================================================== */
  --mm-background: var(--mm-neutral-050);
  --mm-background-alt: var(--mm-neutral-100);
  --mm-surface: var(--mm-neutral-000);
  --mm-surface-muted: var(--mm-teal-050);
  --mm-surface-olive: var(--mm-olive-050);
  --mm-surface-purple: var(--mm-purple-050);
  --mm-surface-inverse: var(--mm-teal-800);

  --mm-primary: var(--mm-teal-800);
  --mm-primary-hover: var(--mm-teal-600);
  --mm-primary-soft: var(--mm-teal-100);
  --mm-on-primary: #ffffff;

  --mm-secondary: var(--mm-olive-700);
  --mm-secondary-hover: var(--mm-olive-800);
  --mm-secondary-soft: var(--mm-olive-100);
  --mm-on-secondary: #ffffff;

  --mm-accent: var(--mm-purple-700);
  --mm-accent-hover: var(--mm-purple-800);
  --mm-accent-soft: var(--mm-purple-100);
  --mm-on-accent: #ffffff;

  --mm-border: var(--mm-neutral-200);
  --mm-border-strong: var(--mm-neutral-300);
  --mm-border-primary: var(--mm-teal-200);

  --mm-text-primary: var(--mm-neutral-900);
  --mm-text-secondary: var(--mm-neutral-700);
  --mm-text-muted: var(--mm-neutral-500);
  --mm-text-on-dark: #eef3f0;
  --mm-text-on-dark-muted: #b6c8c0;
  --mm-link: var(--mm-teal-600);
  --mm-link-hover: var(--mm-olive-700);

  --mm-success: #2c7a5b;
  --mm-success-soft: #e4f1eb;
  --mm-success-border: #bcdccd;
  --mm-warning: #9a6b12;
  --mm-warning-soft: #fbf1de;
  --mm-warning-border: #e7d3ad;
  --mm-warning-text: #6d4c0d;
  --mm-error: #9d2f2f;
  --mm-error-soft: #fbeaea;
  --mm-error-border: #e5c3c3;
  --mm-info-soft: var(--mm-teal-050);

  /* Pure white, named — used for text and fills that sit on brand colour.
     Referring to the token rather than #fff keeps a future theme change to
     one line, and makes it searchable. */
  --mm-white: #ffffff;
  --mm-black: #000000;
  --mm-code-text: #e6efe9;

  --mm-overlay: rgba(1, 37, 28, 0.52);
  --mm-overlay-soft: rgba(1, 37, 28, 0.14);

  /* ---- Translucent surfaces: frosted bars, and fills over dark ground ---- */
  --mm-surface-frosted: rgba(250, 248, 242, 0.88);
  --mm-surface-frosted-strong: rgba(250, 248, 242, 0.94);
  --mm-on-dark-fill: rgba(255, 255, 255, 0.1);
  --mm-on-dark-fill-hover: rgba(255, 255, 255, 0.18);
  --mm-on-dark-fill-soft: rgba(255, 255, 255, 0.06);
  --mm-on-dark-border: rgba(255, 255, 255, 0.35);
  --mm-on-dark-border-soft: rgba(255, 255, 255, 0.14);
  --mm-on-dark-rule: rgba(255, 255, 255, 0.12);
  --mm-on-dark-plate: rgba(255, 255, 255, 0.94);
  --mm-on-dark-muted-text: rgba(238, 243, 240, 0.62);

  /* ---- Ambient light used by the hero and the CTA band ---- */
  --mm-glow-teal: rgba(21, 112, 89, 0.2);
  --mm-glow-teal-out: rgba(21, 112, 89, 0);
  --mm-glow-olive: rgba(141, 151, 56, 0.22);
  --mm-glow-olive-out: rgba(141, 151, 56, 0);
  --mm-glow-olive-strong: rgba(141, 151, 56, 0.28);
  --mm-glow-purple: rgba(116, 37, 138, 0.12);
  --mm-glow-purple-out: rgba(116, 37, 138, 0);

  /* ---- Elevation: soft, diffuse, never harsh ---- */
  --mm-shadow-xs: 0 1px 2px rgba(1, 37, 28, 0.05);
  --mm-shadow-sm: 0 2px 8px rgba(1, 37, 28, 0.05), 0 1px 2px rgba(1, 37, 28, 0.04);
  --mm-shadow-md: 0 8px 24px -8px rgba(1, 37, 28, 0.12), 0 2px 6px rgba(1, 37, 28, 0.04);
  --mm-shadow-lg: 0 24px 56px -24px rgba(1, 37, 28, 0.22), 0 4px 12px rgba(1, 37, 28, 0.05);
  --mm-shadow-focus: 0 0 0 3px rgba(13, 89, 70, 0.28);

  /* ---- Radii ---- */
  --mm-radius-xs: 6px;
  --mm-radius-sm: 10px;
  --mm-radius-md: 16px;
  --mm-radius-lg: 24px;
  --mm-radius-xl: 32px;
  --mm-radius-pill: 999px;

  /* ======================================================================
     Typography — fluid, readable, editorial
     ====================================================================== */
  --mm-font-heading: "Fraunces", "Iowan Old Style", "Palatino Linotype", Palatino,
    "Times New Roman", Georgia, serif;
  --mm-font-body: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI",
    Roboto, "Helvetica Neue", Arial, sans-serif;

  --mm-text-2xs: clamp(0.72rem, 0.7rem + 0.1vw, 0.78rem);
  --mm-text-xs: clamp(0.79rem, 0.76rem + 0.14vw, 0.86rem);
  --mm-text-sm: clamp(0.88rem, 0.85rem + 0.16vw, 0.95rem);
  --mm-text-base: clamp(1rem, 0.97rem + 0.18vw, 1.09rem);
  --mm-text-md: clamp(1.06rem, 1rem + 0.3vw, 1.2rem);
  --mm-text-lg: clamp(1.18rem, 1.08rem + 0.48vw, 1.4rem);
  --mm-text-xl: clamp(1.34rem, 1.18rem + 0.75vw, 1.72rem);
  --mm-text-2xl: clamp(1.55rem, 1.3rem + 1.15vw, 2.15rem);
  --mm-text-3xl: clamp(1.8rem, 1.4rem + 1.85vw, 2.85rem);
  --mm-text-4xl: clamp(2.1rem, 1.5rem + 2.7vw, 3.6rem);
  --mm-text-hero: clamp(2.25rem, 1.5rem + 3.4vw, 4.4rem);

  --mm-leading-tight: 1.12;
  --mm-leading-snug: 1.28;
  --mm-leading-normal: 1.55;
  --mm-leading-relaxed: 1.72;

  --mm-tracking-tight: -0.02em;
  --mm-tracking-normal: 0;
  --mm-tracking-wide: 0.04em;
  --mm-tracking-wider: 0.14em;

  --mm-weight-regular: 400;
  --mm-weight-medium: 500;
  --mm-weight-semibold: 600;
  --mm-weight-bold: 700;

  /* Comfortable reading measures */
  --mm-measure: 68ch;
  --mm-measure-narrow: 56ch;
  --mm-measure-wide: 78ch;

  /* ======================================================================
     Space + layout rhythm — fluid, consistent site-wide
     ====================================================================== */
  --mm-space-3xs: clamp(0.25rem, 0.24rem + 0.05vw, 0.3rem);
  --mm-space-2xs: clamp(0.5rem, 0.47rem + 0.15vw, 0.6rem);
  --mm-space-xs: clamp(0.75rem, 0.7rem + 0.25vw, 0.9rem);
  --mm-space-sm: clamp(1rem, 0.92rem + 0.4vw, 1.25rem);
  --mm-space-md: clamp(1.5rem, 1.35rem + 0.75vw, 2rem);
  --mm-space-lg: clamp(2rem, 1.7rem + 1.5vw, 3rem);
  --mm-space-xl: clamp(2.75rem, 2.2rem + 2.75vw, 4.5rem);
  --mm-space-2xl: clamp(3.5rem, 2.6rem + 4.5vw, 6.5rem);
  --mm-space-3xl: clamp(4.5rem, 3rem + 7vw, 9rem);

  /* Vertical rhythm for full-page sections */
  --mm-section-y: clamp(3.25rem, 2.2rem + 5.2vw, 7rem);
  --mm-section-y-tight: clamp(2.25rem, 1.7rem + 2.8vw, 4rem);

  /* Horizontal gutter — grows gently, never crushes 320px */
  --mm-gutter: clamp(1rem, 0.55rem + 2.25vw, 2.5rem);

  /* Container widths */
  --mm-container: 1200px;
  --mm-container-wide: 1440px;
  --mm-container-narrow: 880px;
  --mm-container-text: 720px;

  /* ---- Motion: slow, breathing, therapeutic ---- */
  --mm-ease-calm: cubic-bezier(0.22, 0.61, 0.36, 1);
  --mm-ease-soft: cubic-bezier(0.4, 0, 0.2, 1);
  --mm-duration-fast: 180ms;
  --mm-duration-base: 320ms;
  --mm-duration-slow: 620ms;
  --mm-duration-reveal: 900ms;

  /* ---- Component sizing ---- */
  --mm-tap-target: 44px;
  --mm-header-height: clamp(64px, 60px + 1.2vw, 84px);
  --mm-sticky-cta-height: 64px;

  /* Safe areas (iOS home indicator, notches) */
  --mm-safe-top: env(safe-area-inset-top, 0px);
  --mm-safe-right: env(safe-area-inset-right, 0px);
  --mm-safe-bottom: env(safe-area-inset-bottom, 0px);
  --mm-safe-left: env(safe-area-inset-left, 0px);

  --mm-z-base: 1;
  --mm-z-sticky: 60;
  --mm-z-header: 80;
  --mm-z-drawer: 90;
  --mm-z-modal: 100;
  --mm-z-toast: 120;
}
