/* ============================================
   NHIT Design System — base.css
   ============================================ */

:root {
  /* Type scale (fluid) */
  --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.95rem + 0.25vw, 1.125rem);
  --text-lg: clamp(1.125rem, 1rem + 0.75vw, 1.5rem);
  --text-xl: clamp(1.5rem, 1.2rem + 1.25vw, 2.25rem);
  --text-2xl: clamp(2rem, 1.2rem + 2.5vw, 3.5rem);
  --text-3xl: clamp(2.5rem, 1rem + 4vw, 5rem);
  --text-hero: clamp(2.5rem, 1.2rem + 3.6vw, 4.5rem);

  /* Spacing (4px system) */
  --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;

  /* NHIT PALETTE — Trust-first, editorial, community-centered */
  /* LIGHT MODE */
  --color-bg: #f7f6f2;              /* warm ivory — softer than pure white */
  --color-surface: #ffffff;
  --color-surface-2: #fbfaf6;
  --color-surface-offset: #efece5;
  --color-divider: #e2ded4;
  --color-border: #d4cfc2;

  --color-text: #0b1f3b;             /* NHIT navy — used as text on light bg */
  --color-text-muted: #4a5768;
  --color-text-faint: #8a94a3;
  --color-text-inverse: #f7f6f2;

  --color-navy: #0b1f3b;             /* Signature dark surface */
  --color-navy-2: #142a4a;
  --color-navy-3: #1c3560;

  --color-primary: #0d7a80;          /* Deeper teal than reference — more editorial */
  --color-primary-hover: #095d62;
  --color-primary-active: #084a4e;
  --color-primary-highlight: #19c2c2; /* Brighter teal for accents on dark */
  --color-primary-tint: #d7ece9;

  --color-accent: #d95a2b;           /* Warmer, more muted orange — less "candy" */
  --color-accent-hover: #b64720;
  --color-accent-tint: #f5dbc9;

  --color-gold: #c9a24b;              /* Editorial gold accent for pull-quotes */

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

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

  /* Shadows — subtle, warm */
  --shadow-sm: 0 1px 2px rgba(11, 31, 59, 0.06);
  --shadow-md: 0 4px 16px rgba(11, 31, 59, 0.08);
  --shadow-lg: 0 20px 48px rgba(11, 31, 59, 0.14);

  /* Content widths */
  --content-narrow: 680px;
  --content-default: 1080px;
  --content-wide: 1240px;

  /* Fonts */
  --font-display: 'Boska', 'Instrument Serif', Georgia, serif;
  --font-body: 'Satoshi', 'Inter', -apple-system, BlinkMacSystemFont, 'Helvetica Neue', sans-serif;
}

/* DARK MODE */
[data-theme='dark'] {
  --color-bg: #0a1a30;
  --color-surface: #0f2340;
  --color-surface-2: #142a4a;
  --color-surface-offset: #1c3560;
  --color-divider: #1c3560;
  --color-border: #294a7a;

  --color-text: #eef2f8;
  --color-text-muted: #a8b5c8;
  --color-text-faint: #6a7a92;
  --color-text-inverse: #0b1f3b;

  --color-primary: #19c2c2;
  --color-primary-hover: #3ad3d3;
  --color-primary-highlight: #55e0e0;
  --color-primary-tint: #0d3a3a;

  --color-accent: #ff8a4c;
  --color-accent-hover: #ffa676;
  --color-accent-tint: #4a2a1a;

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.5);
  --shadow-lg: 0 20px 48px rgba(0, 0, 0, 0.6);
}

/* ============================================
   Reset + base
   ============================================ */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  -webkit-text-size-adjust: none;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  scroll-behavior: smooth;
  scroll-padding-top: 96px;
}

body {
  min-height: 100dvh;
  line-height: 1.6;
  font-family: var(--font-body);
  font-size: var(--text-base);
  font-weight: 400;
  color: var(--color-text);
  background-color: var(--color-bg);
  overflow-x: hidden;
}

img,
picture,
video,
canvas,
svg {
  display: block;
  max-width: 100%;
  height: auto;
}

ul[role='list'],
ol[role='list'] {
  list-style: none;
}

input,
button,
textarea,
select {
  font: inherit;
  color: inherit;
}

h1, h2, h3, h4, h5, h6 {
  text-wrap: balance;
  line-height: 1.1;
  font-family: var(--font-display);
  font-weight: 500;
  letter-spacing: -0.02em;
  color: var(--color-text);
}

p, li, figcaption {
  text-wrap: pretty;
}

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

::selection {
  background: var(--color-primary);
  color: white;
}

:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 3px;
  border-radius: var(--radius-sm);
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

button {
  cursor: pointer;
  background: none;
  border: none;
}

a, button, [role='button'], input, textarea, select {
  transition:
    color var(--transition-interactive),
    background var(--transition-interactive),
    border-color var(--transition-interactive),
    box-shadow var(--transition-interactive),
    transform var(--transition-interactive);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}
