/* ============================================
   BASE.CSS — Design Tokens, Reset, Typography
   Home Clarity Report — Premium Redesign
   ============================================ */

:root {
  /* Brand Colors */
  --navy:          #0C1830;
  --navy-light:    #1A2F5A;
  --navy-dark:     #060E1C;
  --amber:         #B87A2A;
  --amber-hover:   #9C6820;
  --amber-light:   #CE9448;
  --amber-glow:    rgba(184,122,42,0.18);
  --cream:         #F5F0E8;
  --cream-warm:    #EBE6DC;
  --white:         #FFFFFF;
  --border:        rgba(12,24,48,0.10);
  --border-strong: rgba(12,24,48,0.18);

  /* Text */
  --text-primary:  #0C1830;
  --text-body:     #3D4A5C;
  --text-muted:    #7A8499;
  --text-faint:    #A8B0C0;

  /* Surfaces */
  --bg:            var(--cream);
  --surface:       #FFFFFF;
  --surface-alt:   #EDE9E0;
  --surface-dark:  #0C1830;

  /* Shadows */
  --shadow-xs:  0 1px 3px rgba(12,24,48,0.06);
  --shadow-sm:  0 2px 8px rgba(12,24,48,0.08);
  --shadow-md:  0 6px 20px rgba(12,24,48,0.10);
  --shadow-lg:  0 16px 48px rgba(12,24,48,0.14);
  --shadow-xl:  0 32px 80px rgba(12,24,48,0.18);
  --glow-amber: 0 8px 32px rgba(184,122,42,0.20);

  /* Typography */
  --font-display: 'Playfair Display', Georgia, serif;
  --font-body:    'Switzer', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono:    'IBM Plex Mono', 'SF Mono', monospace;

  /* Spacing */
  --space-1:  4px;
  --space-2:  8px;
  --space-3:  12px;
  --space-4:  16px;
  --space-5:  20px;
  --space-6:  24px;
  --space-8:  32px;
  --space-10: 40px;
  --space-12: 48px;
  --space-16: 64px;
  --space-20: 80px;
  --space-24: 96px;
  --space-32: 128px;

  /* Layout */
  --content-narrow:  640px;
  --content-default: 900px;
  --content-wide:    1200px;
  --nav-height:      72px;

  /* Radius */
  --radius-sm:  4px;
  --radius-md:  8px;
  --radius-lg:  14px;
  --radius-xl:  20px;
  --radius-2xl: 28px;
  --radius-full: 9999px;

  /* Transitions */
  --ease-out:           cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out:        cubic-bezier(0.4, 0, 0.2, 1);
  --transition-fast:    140ms cubic-bezier(0.16, 1, 0.3, 1);
  --transition-base:    200ms cubic-bezier(0.16, 1, 0.3, 1);
  --transition-slow:    320ms cubic-bezier(0.16, 1, 0.3, 1);
}

/* Dark mode */
[data-theme="dark"] {
  --navy:       #E8E4DC;
  --cream:      #111318;
  --cream-warm: #181C22;
  --white:      #1C2030;
  --border:     rgba(232,228,220,0.10);
  --border-strong: rgba(232,228,220,0.18);
  --text-primary: #E8E4DC;
  --text-body:    #BDC4CF;
  --text-muted:   #8090A8;
  --bg:           #111318;
  --surface:      #1C2030;
  --surface-alt:  #222838;
  --shadow-sm:  0 2px 8px rgba(0,0,0,0.3);
  --shadow-md:  0 6px 20px rgba(0,0,0,0.4);
  --shadow-lg:  0 16px 48px rgba(0,0,0,0.5);
}

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

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  scroll-padding-top: var(--nav-height);
}

body {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  color: var(--text-body);
  background: var(--bg);
  overflow-x: hidden;
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }
ul, ol { list-style: none; }

/* Typography */
h1, h2, h3, h4 {
  font-family: var(--font-display);
  color: var(--text-primary);
  line-height: 1.15;
  font-weight: 700;
}

h1 { font-size: clamp(2.6rem, 5.5vw, 4.2rem); letter-spacing: -0.025em; }
h2 { font-size: clamp(2rem, 4vw, 3rem);        letter-spacing: -0.015em; }
h3 { font-size: clamp(1.2rem, 2.5vw, 1.6rem);  letter-spacing: -0.01em; }
h4 { font-size: 1.125rem; }

p { max-width: 68ch; }

.mono {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums lining-nums;
}

::selection { background: var(--amber); color: #fff; }

::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--text-faint); border-radius: 3px; }

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