/* ========================================================================
   Solomon Advising — Design Tokens
   Version 1.0 · April 2026
   ========================================================================
   This file is the single source of truth for all design values.
   Imported by every page via <link rel="stylesheet" href="/css/tokens.css">.
   Changes here propagate everywhere. See design-system.md for rationale.
   ========================================================================
*/

:root {
  /* --- SURFACES --- */
  --cream:  #FAF7F2;
  --white:  #FFFFFF;
  --dark:   #1F2937;
  --darker: #0F1419;

  /* --- TEXT --- */
  --text-dark:       #1F2937;  /* 13.74:1 on cream — AAA */
  --text-body:       #4B5563;  /*  7.07:1 on cream — AAA */
  --text-muted:      #6B7280;  /*  4.52:1 on cream — AA  */
  --text-very-muted: #9CA3AF;  /*  2.38:1 — DECORATIVE ONLY */

  /* --- ACCENT --- */
  --orange:      #D85A30;  /* 3.62:1 on cream — large text / UI only */
  --orange-deep: #B8481F;  /* Hover state, passes AA for smaller text */
  --peach:       #F0997B;
  --peach-dark:  #4A1B0C;  /* 6.57:1 on peach */

  /* --- BORDERS --- */
  --border-light:  rgba(0, 0, 0, 0.06);
  --border-med:    rgba(0, 0, 0, 0.08);
  --border-strong: rgba(0, 0, 0, 0.12);

  /* --- TYPOGRAPHY --- */
  --font-serif: 'Fraunces', Georgia, serif;
  --font-sans:  'Alegreya Sans', -apple-system, BlinkMacSystemFont, sans-serif;

  /* --- SPACING SCALE (base 4px) --- */
  --space-1:  4px;
  --space-2:  8px;
  --space-3:  12px;
  --space-4:  16px;
  --space-5:  20px;
  --space-6:  24px;
  --space-8:  32px;
  --space-12: 48px;
  --space-14: 56px;
  --space-18: 72px;
  --space-22: 88px;
  --space-26: 104px;

  /* --- RADII --- */
  --radius-sm: 4px;
  --radius-md: 8px;

  /* --- ELEVATION --- */
  --shadow-card: 0 1px 2px rgba(0, 0, 0, 0.03);

  /* --- MOTION --- */
  --ease-out: cubic-bezier(0.4, 0, 0.2, 1);
  --duration-fast: 150ms;

  /* --- CONTAINER WIDTHS --- */
  --container-narrow: 720px;
  --container:        960px;
  --container-wide:   1100px;
  --container-hero:   1280px;
}

/* ========================================================================
   GLOBAL RESET & BASE
   ======================================================================== */

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

html {
  scroll-behavior: smooth;
  /* Accommodate sticky nav height so focused elements aren't obscured — WCAG 2.4.11 */
  scroll-padding-top: 80px;
}

body {
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.7;
  font-weight: 400;
  color: var(--text-dark);
  background: var(--cream);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

a {
  color: inherit;
  text-decoration: none;
  transition: color var(--duration-fast) var(--ease-out);
}

img, svg, video {
  max-width: 100%;
  display: block;
}

button {
  font: inherit;
  cursor: pointer;
  border: none;
  background: none;
  color: inherit;
}

/* Respect reduced motion preference — WCAG 2.3.3 */
@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;
  }
}

/* ========================================================================
   TYPOGRAPHY SCALE
   ======================================================================== */

h1 {
  font-family: var(--font-serif);
  font-size: 56px;
  line-height: 1.03;
  letter-spacing: -0.03em;
  font-weight: 500;
  color: var(--text-dark);
}

h2 {
  font-family: var(--font-serif);
  font-size: 38px;
  line-height: 1.1;
  letter-spacing: -0.02em;
  font-weight: 500;
  color: var(--text-dark);
}

h3 {
  font-family: var(--font-serif);
  font-size: 22px;
  line-height: 1.2;
  letter-spacing: -0.01em;
  font-weight: 500;
  color: var(--text-dark);
}

p {
  font-size: 16px;
  line-height: 1.7;
  color: var(--text-body);
}

/* Utility typography classes — use sparingly */
.serif       { font-family: var(--font-serif); font-weight: 500; letter-spacing: -0.02em; }
.italic      { font-family: var(--font-serif); font-style: italic; font-weight: 400; color: var(--text-muted); }
.body-text   { font-size: 16px; line-height: 1.7; color: var(--text-body); }
.small-text  { font-size: 14px; line-height: 1.65; color: var(--text-body); }
.caption     { font-size: 12px; line-height: 1.5; color: var(--text-muted); }
.metadata    { font-size: 11px; line-height: 1.4; color: var(--text-muted); }
.eyebrow {
  font-size: 10px;
  letter-spacing: 0.2em;
  color: var(--orange);
  text-transform: uppercase;
  font-weight: 500;
}
.micro-label {
  font-size: 9px;
  letter-spacing: 0.15em;
  color: var(--text-muted);
  text-transform: uppercase;
  font-weight: 500;
}

/* ========================================================================
   LAYOUT CONTAINERS
   ======================================================================== */

.container        { max-width: var(--container); margin: 0 auto; }
.container-narrow { max-width: var(--container-narrow); margin: 0 auto; }
.container-wide   { max-width: var(--container-wide); margin: 0 auto; }
.container-hero   { max-width: var(--container-hero); margin: 0 auto; }

.section          { padding: var(--space-22) var(--space-8); }
.section-sm       { padding: 56px var(--space-8); }
.bg-cream         { background: var(--cream); }
.bg-white         { background: var(--white); }
.bg-dark          { background: var(--dark); color: white; }

/* ========================================================================
   SHARED INTERACTIVE PATTERNS
   ======================================================================== */

/* CTAs */
.btn-orange {
  background: var(--orange);
  color: white;
  padding: 13px 22px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: background var(--duration-fast) var(--ease-out);
}
.btn-orange:hover { background: var(--orange-deep); }

.btn-dark {
  background: var(--dark);
  color: white;
  padding: 9px 18px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 500;
  transition: background var(--duration-fast) var(--ease-out);
}
.btn-dark:hover { background: #111827; }

.link-underline {
  color: var(--text-dark);
  font-size: 14px;
  font-weight: 500;
  border-bottom: 1px solid var(--text-dark);
  padding-bottom: 2px;
  transition: color var(--duration-fast) var(--ease-out), border-color var(--duration-fast) var(--ease-out);
}
.link-underline:hover { color: var(--orange); border-bottom-color: var(--orange); }

/* Focus indicators — WCAG 2.4.7 & 2.4.13 */
:focus {
  outline: none;
}
:focus-visible {
  outline: 2px solid var(--orange);
  outline-offset: 3px;
  border-radius: 2px;
}

/* Skip link — WCAG 2.4.1 */
.skip-link {
  position: absolute;
  top: -40px;
  left: 8px;
  background: var(--dark);
  color: white;
  padding: 10px 16px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 500;
  z-index: 100;
  transition: top var(--duration-fast) var(--ease-out);
}
.skip-link:focus {
  top: 8px;
}

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

/* ========================================================================
   RESPONSIVE — Mobile breakpoint at 960px
   Mobile-first principle: base styles target mobile, media queries enhance for desktop.
   For this site, desktop is the "default design" and we narrow to mobile below 960px.
   ======================================================================== */

@media (max-width: 960px) {
  h1 { font-size: 40px; }
  h2 { font-size: 30px; }
  h3 { font-size: 20px; }

  .section { padding: 64px 24px; }
}

@media (max-width: 480px) {
  h1 { font-size: 34px; }
  h2 { font-size: 26px; }

  .section { padding: 56px 20px; }
}
