/* ============================================================
   D.O.S.E Design System — Design Tokens
   Modern, Minimal, Calm, Premium
   ============================================================ */

:root {
  /* ── Brand Colors ── */
  --primary: #1A5653;
  --primary-light: #2D7D6B;
  --primary-dark: #0E3B39;
  --primary-50: #E8F5F3;
  --primary-100: #C5E8E3;
  --primary-200: #9ED8D0;
  --primary-300: #6DC4B8;
  --primary-400: #3DAE9F;
  --primary-500: #1A5653;
  --primary-600: #164A47;
  --primary-700: #123D3B;
  --primary-800: #0E302F;
  --primary-900: #0A2423;

  /* ── D.O.S.E Hormone Colors ── */
  --dopamine: #EC9D27;
  --dopamine-light: #FFF3E0;
  --dopamine-bg: rgba(236, 157, 39, 0.08);
  --oxytocin: #E91E63;
  --oxytocin-light: #FCE4EC;
  --oxytocin-bg: rgba(233, 30, 99, 0.08);
  --serotonin: #009688;
  --serotonin-light: #E0F2F1;
  --serotonin-bg: rgba(0, 150, 136, 0.08);
  --endorphins: #6A1B9A;
  --endorphins-light: #F3E5F5;
  --endorphins-bg: rgba(106, 27, 154, 0.08);

  /* ── Neutrals ── */
  --bg: #FAFAF8;
  --bg-alt: #F5F3F0;
  --surface: #FFFFFF;
  --surface-hover: #F9F9F7;
  --surface-active: #F0EFEC;
  --text: #1A1A1A;
  --text-secondary: #6B7280;
  --text-tertiary: #9CA3AF;
  --text-inverse: #FFFFFF;
  --border: #E5E7EB;
  --border-light: #F0F0EE;
  --divider: #F3F4F6;

  /* ── Semantic Colors ── */
  --success: #10B981;
  --success-light: #ECFDF5;
  --warning: #F59E0B;
  --warning-light: #FFFBEB;
  --error: #EF4444;
  --error-light: #FEF2F2;
  --info: #3B82F6;
  --info-light: #EFF6FF;

  /* ── Typography ── */
  /* Plus Jakarta Sans = closest free alternative to GILROY (paid commercial font) */
  --font-display: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-heading: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-body: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;

  --text-xs: 0.6875rem;    /* 11px */
  --text-sm: 0.75rem;      /* 12px */
  --text-base: 0.8125rem;  /* 13px */
  --text-md: 0.875rem;     /* 14px */
  --text-lg: 1rem;         /* 16px */
  --text-xl: 1.125rem;     /* 18px */
  --text-2xl: 1.375rem;    /* 22px */
  --text-3xl: 1.75rem;     /* 28px */
  --text-4xl: 2.25rem;     /* 36px */
  --text-5xl: 3rem;        /* 48px */

  --weight-normal: 400;
  --weight-medium: 500;
  --weight-semibold: 600;
  --weight-bold: 700;

  --leading-tight: 1.2;
  --leading-normal: 1.5;
  --leading-relaxed: 1.65;

  --tracking-tight: -0.02em;
  --tracking-normal: 0;
  --tracking-wide: 0.02em;
  --tracking-wider: 0.05em;

  /* ── Spacing ── */
  --space-0: 0;
  --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 ── */
  --radius-xs: 4px;
  --radius-sm: 6px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;
  --radius-2xl: 20px;
  --radius-3xl: 24px;
  --radius-full: 9999px;

  /* ── Shadows ── */
  --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.04);
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.06), 0 1px 2px rgba(0, 0, 0, 0.04);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.06), 0 2px 4px -1px rgba(0, 0, 0, 0.04);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.06), 0 4px 6px -2px rgba(0, 0, 0, 0.03);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.08), 0 10px 10px -5px rgba(0, 0, 0, 0.03);
  --shadow-2xl: 0 25px 50px -12px rgba(0, 0, 0, 0.15);
  --shadow-glow: 0 0 20px rgba(26, 86, 83, 0.12);
  --shadow-card: 0 1px 3px rgba(0, 0, 0, 0.04), 0 0 0 1px rgba(0, 0, 0, 0.02);

  /* ── Transitions ── */
  --ease-default: cubic-bezier(0.4, 0, 0.2, 1);
  --ease-in: cubic-bezier(0.4, 0, 1, 1);
  --ease-out: cubic-bezier(0, 0, 0.2, 1);
  --ease-bounce: cubic-bezier(0.34, 1.56, 0.64, 1);
  --duration-fast: 150ms;
  --duration-normal: 250ms;
  --duration-slow: 350ms;

  /* ── Z-Index Scale ── */
  --z-base: 0;
  --z-dropdown: 10;
  --z-sticky: 20;
  --z-overlay: 30;
  --z-modal: 40;
  --z-toast: 50;
  --z-tooltip: 60;

  /* ── Layout ── */
  --phone-width: 375px;
  --phone-height: 812px;
  --header-height: 56px;
  --tab-bar-height: 56px;
  --status-bar-height: 44px;
  --safe-area-bottom: 34px;
  --landing-max-width: 1200px;
}

/* ── Dark Mode ── */
[data-theme="dark"] {
  --bg: #0F1419;
  --bg-alt: #1A1F25;
  --surface: #1E252D;
  --surface-hover: #252D36;
  --surface-active: #2C3540;
  --text: #F0F2F5;
  --text-secondary: #9CA3AF;
  --text-tertiary: #6B7280;
  --border: #2C3540;
  --border-light: #252D36;
  --divider: #1E252D;
  --shadow-card: 0 1px 3px rgba(0, 0, 0, 0.2), 0 0 0 1px rgba(255, 255, 255, 0.03);
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.3);
  --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.3);
}

/* ── Base Reset ── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

body {
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: var(--leading-normal);
  color: var(--text);
  background-color: var(--bg);
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: var(--weight-semibold);
  line-height: var(--leading-tight);
  letter-spacing: var(--tracking-tight);
}

button {
  cursor: pointer;
  border: none;
  background: none;
  font-family: var(--font-body);
  font-size: inherit;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  text-decoration: none;
  color: inherit;
}

input, textarea, select {
  font-family: var(--font-body);
  font-size: var(--text-md);
}
