/* ============================================================
   TalkMoney Community — Design Tokens
   Palette: Cream background, TalkMoney Blue primary, Gold accent
   Feel: professional African digital business community
   ============================================================ */

:root {
  /* Color */
  --color-bg: #FAF6EC;
  --color-bg-elevated: #FFFFFF;
  --color-blue: #0B3D66;
  --color-blue-deep: #082A47;
  --color-gold: #C79A3D;
  --color-gold-soft: #E8D5A3;
  --color-gold-text: #8A6512; /* WCAG AA-compliant variant for gold TEXT on light backgrounds — the
                                   base --color-gold only passes contrast on dark backgrounds (buttons,
                                   header) or when used as a background itself; at 12px/bold it fails
                                   AA (2.4–2.6:1) against cream/white. This passes at 4.9–5.3:1. */
  --color-ink: #1E2A32;
  --color-ink-muted: #5B6B74;
  --color-border: #E4DCC8;
  --color-success: #2E7D4F;
  --color-danger: #B4463A;

  /* Type */
  --font-display: "Fraunces", Georgia, "Times New Roman", serif;
  --font-body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, monospace;

  --text-xs: 0.75rem;
  --text-sm: 0.875rem;
  --text-base: 1rem;
  --text-lg: 1.125rem;
  --text-xl: 1.375rem;
  --text-2xl: 1.75rem;
  --text-3xl: 2.25rem;

  /* Spacing scale */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 24px;
  --space-6: 32px;
  --space-8: 48px;

  /* Radius & shadow — restrained, not rounded-everything */
  --radius-sm: 4px;
  --radius-md: 8px;
  --shadow-card: 0 1px 2px rgba(30, 42, 50, 0.06), 0 1px 1px rgba(30, 42, 50, 0.04);

  --max-width: 1120px;
}

* {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  background: var(--color-bg);
  color: var(--color-ink);
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  color: var(--color-blue-deep);
  line-height: 1.2;
  margin: 0 0 var(--space-3);
}

h1 { font-size: var(--text-3xl); }
h2 { font-size: var(--text-2xl); }
h3 { font-size: var(--text-xl); }

p { margin: 0 0 var(--space-3); }

a {
  color: var(--color-blue);
  text-decoration: none;
}
a:hover { text-decoration: underline; }

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

button, input, textarea, select {
  font-family: inherit;
  font-size: inherit;
}

/* Visible keyboard focus — accessibility floor, not optional.
   Layered for browser compatibility: older Safari (<15.4) doesn't recognize
   :focus-visible, and CSS drops an entire rule when its selector is invalid —
   so a :focus-visible-only rule would leave those users with NO focus
   indicator at all, not a degraded one. The plain :focus rule below is the
   fallback those browsers actually see; :focus:not(:focus-visible) then
   removes it for mouse users on browsers that DO support :focus-visible,
   and the final rule re-applies it specifically for keyboard focus there. */
:focus {
  outline: 2px solid var(--color-gold);
  outline-offset: 2px;
}
:focus:not(:focus-visible) {
  outline: none;
}
:focus-visible {
  outline: 2px solid var(--color-gold);
  outline-offset: 2px;
}

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

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--space-4);
}

.skip-link {
  position: absolute;
  top: -100px;
  left: var(--space-3);
  z-index: 100;
  background: var(--color-blue-deep);
  color: #fff;
  padding: var(--space-2) var(--space-4);
  border-radius: var(--radius-sm);
  font-weight: 600;
  transition: top 120ms ease;
}
.skip-link:focus {
  top: var(--space-3);
}
