/* base.css — reset + design tokens
   The Nuhome Team / LoansByJB preview site
   Brand: Nuhome teal #02878C, charcoal #14181A, white. */

*,
*::before,
*::after { box-sizing: border-box; }

* { margin: 0; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

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

body {
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  line-height: 1.6;
}

img, picture, video, canvas, svg { display: block; max-width: 100%; height: auto; }
input, button, textarea, select { font: inherit; color: inherit; }
p, h1, h2, h3, h4, h5, h6 { overflow-wrap: break-word; }
h1, h2, h3, h4 { line-height: 1.12; text-wrap: balance; }
p { text-wrap: pretty; }
ul, ol { padding-inline-start: 1.25rem; }

a { color: inherit; }

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

:root {
  /* Type scale */
  --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);

  /* Spacing */
  --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;

  /* Radius */
  --radius-sm: 0.375rem;
  --radius-md: 0.625rem;
  --radius-lg: 1rem;
  --radius-pill: 999px;

  /* Fonts */
  --font-display: 'Sora', 'Segoe UI', system-ui, sans-serif;
  --font-body: 'Inter', system-ui, -apple-system, sans-serif;

  --container: 78rem;
  --prose: 68ch;

  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);

  /* Fixed brand tokens (identical in both themes) */
  --brand-teal: #02878c;
  --brand-teal-bright: #0aa3a9;
  --brand-ink: #14181a;
  --brand-ink-2: #1d2326;
}

:root,
[data-theme='light'] {
  --color-bg: #ffffff;
  --color-surface: #f5f7f7;
  --color-surface-2: #ecf1f1;
  --color-border: #d9e0e0;
  --color-divider: #e7ecec;

  --color-text: #14181a;
  --color-text-muted: #56605f;
  --color-text-inverse: #ffffff;

  --color-primary: #026e73;
  --color-primary-hover: #015b5f;
  --color-primary-soft: #e2f1f1;

  --color-dark-bg: var(--brand-ink);
  --color-dark-surface: #202729;
  --color-dark-border: rgba(255, 255, 255, 0.14);
  --color-dark-text: #f2f6f6;
  --color-dark-muted: #a9b6b6;

  --shadow-sm: 0 1px 2px rgba(20, 24, 26, 0.06), 0 2px 8px rgba(20, 24, 26, 0.05);
  --shadow-md: 0 8px 28px rgba(20, 24, 26, 0.1);
}

[data-theme='dark'] {
  --color-bg: #101416;
  --color-surface: #171d1f;
  --color-surface-2: #1e2528;
  --color-border: rgba(255, 255, 255, 0.14);
  --color-divider: rgba(255, 255, 255, 0.09);

  --color-text: #eef3f3;
  --color-text-muted: #a5b2b2;
  --color-text-inverse: #101416;

  --color-primary: #35b8bd;
  --color-primary-hover: #57cbcf;
  --color-primary-soft: rgba(53, 184, 189, 0.14);

  --color-dark-bg: #0b0e10;
  --color-dark-surface: #161b1d;
  --color-dark-border: rgba(255, 255, 255, 0.12);
  --color-dark-text: #eef3f3;
  --color-dark-muted: #a5b2b2;

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.5);
  --shadow-md: 0 10px 34px rgba(0, 0, 0, 0.55);
}
