/* style.css — Health Intent Partners Design System */

/* ============================================================
   TYPE SCALE — fluid with clamp()
   ============================================================ */
:root {
  --text-xs:   clamp(0.75rem,  0.7rem  + 0.25vw, 0.875rem);
  --text-sm:   clamp(0.875rem, 0.8rem  + 0.35vw, 1rem);
  --text-base: clamp(1rem,     0.9rem  + 0.5vw,  1.125rem);
  --text-lg:   clamp(1.125rem, 0.95rem + 0.85vw, 1.5rem);
  --text-xl:   clamp(1.5rem,   1rem    + 1.5vw,  2.25rem);
  --text-2xl:  clamp(2rem,     1.2rem  + 2.5vw,  3.5rem);
  --text-3xl:  clamp(2.5rem,   1rem    + 4vw,    5rem);
  --text-hero: clamp(3rem,     0.5rem  + 7vw,    8rem);
}

/* ============================================================
   4px SPACING SYSTEM
   ============================================================ */
:root {
  --space-1:  0.25rem;
  --space-2:  0.5rem;
  --space-3:  0.75rem;
  --space-4:  1rem;
  --space-5:  1.25rem;
  --space-6:  1.5rem;
  --space-8:  2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;
  --space-16: 4rem;
  --space-20: 5rem;
  --space-24: 6rem;
  --space-32: 8rem;
}

/* ============================================================
   FONT FAMILIES — Archivo Black (display) + Inter (body)
   ============================================================ */
:root {
  --font-display: 'Archivo Black', 'Inter', system-ui, sans-serif;
  --font-body: 'Inter', system-ui, sans-serif;
}

/* ============================================================
   COLOR PALETTE — Health Intent Partners Official Brand
   Primary: UVA Blue (#232D4B), Accent: Teal (#2BA6A3)
   ============================================================ */
:root, [data-theme="light"] {
  /* Surfaces — clean paper white foundation */
  --color-bg:             #F5F5F5;
  --color-surface:        #FAFAFA;
  --color-surface-2:      #FFFFFF;
  --color-surface-offset: #EEEEEE;
  --color-surface-offset-2: #E5E5E5;
  --color-surface-dynamic: #DCDCDC;
  --color-divider:        #D0D0D0;
  --color-border:         #C4C4C4;

  /* Text — Ink Black based */
  --color-text:           #0B0B0D;
  --color-text-muted:     #42444B;
  --color-text-faint:     #6B7280;
  --color-text-inverse:   #FFFFFF;

  /* Primary — UVA Blue */
  --color-primary:        #232D4B;
  --color-primary-hover:  #1a2238;
  --color-primary-active: #111728;
  --color-primary-highlight: #dde0e8;

  /* Accent — Teal */
  --color-accent:         #2BA6A3;
  --color-accent-hover:   #228a88;
  --color-accent-highlight: #d4edec;

  /* Meadow */
  --color-success:        #2E7D32;
  --color-success-hover:  #256428;
  --color-success-active: #1b4a1e;
  --color-success-highlight: #d4e6d5;

  /* Amber */
  --color-warning:        #B58900;
  --color-warning-hover:  #906d00;
  --color-warning-active: #6b5100;
  --color-warning-highlight: #e8dfcc;

  /* Error */
  --color-error:          #a12c3b;
  --color-error-hover:    #7d1e2e;
  --color-error-active:   #561720;
  --color-error-highlight: #e0cecc;

  /* Steel */
  --color-steel:          #6B7280;

  /* Radius */
  --radius-sm: 0.375rem;
  --radius-md: 0.5rem;
  --radius-lg: 0.75rem;
  --radius-xl: 1rem;
  --radius-full: 9999px;

  /* Transitions */
  --transition-interactive: 180ms cubic-bezier(0.16, 1, 0.3, 1);

  /* Shadows — neutral tone */
  --shadow-sm: 0 1px 2px oklch(0.2 0 0 / 0.06);
  --shadow-md: 0 4px 12px oklch(0.2 0 0 / 0.08);
  --shadow-lg: 0 12px 32px oklch(0.2 0 0 / 0.12);

  /* Content widths */
  --content-narrow: 640px;
  --content-default: 960px;
  --content-wide: 1200px;
  --content-full: 100%;
}

/* ============================================================
   DARK MODE
   ============================================================ */
[data-theme="dark"] {
  --color-bg:             #0F1118;
  --color-surface:        #161822;
  --color-surface-2:      #1C1F2B;
  --color-surface-offset: #131520;
  --color-surface-offset-2: #1E2130;
  --color-surface-dynamic: #252838;
  --color-divider:        #2A2D3D;
  --color-border:         #353848;

  --color-text:           #D8DAE0;
  --color-text-muted:     #8E92A0;
  --color-text-faint:     #5A5E6E;
  --color-text-inverse:   #0B0B0D;

  /* UVA Blue lightened for dark mode readability */
  --color-primary:        #7B8BBF;
  --color-primary-hover:  #5D6FA8;
  --color-primary-active: #4A5C94;
  --color-primary-highlight: #1E2238;

  /* Teal accent in dark mode */
  --color-accent:         #4DC8C5;
  --color-accent-hover:   #38B0AD;
  --color-accent-highlight: #1A3030;

  --color-error:          #d86b78;
  --color-error-hover:    #c24a59;
  --color-error-active:   #a53142;
  --color-error-highlight: #3a2828;

  --color-success:        #5daa6d;
  --color-success-hover:  #4d8f55;
  --color-success-active: #387040;
  --color-success-highlight: #253530;

  --color-warning:        #D4A828;
  --color-warning-hover:  #B89020;
  --color-warning-active: #8a6820;
  --color-warning-highlight: #353020;

  --shadow-sm: 0 1px 2px oklch(0 0 0 / 0.2);
  --shadow-md: 0 4px 12px oklch(0 0 0 / 0.3);
  --shadow-lg: 0 12px 32px oklch(0 0 0 / 0.4);
}

/* System preference fallback */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) {
    --color-bg:             #0F1118;
    --color-surface:        #161822;
    --color-surface-2:      #1C1F2B;
    --color-surface-offset: #131520;
    --color-surface-offset-2: #1E2130;
    --color-surface-dynamic: #252838;
    --color-divider:        #2A2D3D;
    --color-border:         #353848;
    --color-text:           #D8DAE0;
    --color-text-muted:     #8E92A0;
    --color-text-faint:     #5A5E6E;
    --color-text-inverse:   #0B0B0D;
    --color-primary:        #7B8BBF;
    --color-primary-hover:  #5D6FA8;
    --color-primary-active: #4A5C94;
    --color-primary-highlight: #1E2238;
    --color-accent:         #4DC8C5;
    --color-accent-hover:   #38B0AD;
    --color-accent-highlight: #1A3030;
    --color-error:          #d86b78;
    --color-success:        #5daa6d;
    --color-warning:        #D4A828;
    --shadow-sm: 0 1px 2px oklch(0 0 0 / 0.2);
    --shadow-md: 0 4px 12px oklch(0 0 0 / 0.3);
    --shadow-lg: 0 12px 32px oklch(0 0 0 / 0.4);
  }
}
