/*
 * Cedarras design tokens.
 *
 * Raw values are layered under semantic names so a future dark mode can
 * redefine the semantic layer without touching component CSS. Light mode
 * only for now. Loaded by both the Rails HAML views and the Vite/React
 * app -- see shared-styles/README.md.
 */

@font-face {
  font-family: "Inter";
  src: url("/assets/fonts/Inter-Variable-496a588b.woff2") format("woff2-variations"), url("/assets/fonts/Inter-Variable-496a588b.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Fraunces";
  src: url("/assets/fonts/Fraunces-Variable-2b4cdb3a.woff2") format("woff2-variations"), url("/assets/fonts/Fraunces-Variable-2b4cdb3a.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  /* ---- Raw palette ---- */
  --cedar-green-700: #084d21;
  --cedar-green-600: #0c6b2e;
  --cedar-green-100: #e8f2eb;

  --stream-teal-600: #1f6f6b;
  --stream-teal-100: #e3eeed;

  --cedar-bark-600: #8a5a3b;
  --cedar-bark-100: #f2e9e2;

  --gray-050: #fafaf7;
  --gray-100: #f1f1ec;
  --gray-200: #e3e3db;
  --gray-300: #cbcbc0;
  --gray-400: #a3a397;
  --gray-500: #7c7c70;
  --gray-600: #5c5c52;
  --gray-700: #3f4038;
  --gray-900: #1c211e;

  --amber-600: #b7791f;
  --amber-100: #faf0dc;

  --red-600: #b42318;
  --red-100: #fbe7e5;

  /* ---- Semantic: brand ---- */
  --color-primary: var(--cedar-green-600);
  --color-primary-hover: var(--cedar-green-700);
  --color-primary-tint: var(--cedar-green-100);
  --color-secondary: var(--stream-teal-600);
  --color-secondary-tint: var(--stream-teal-100);
  --color-accent: var(--cedar-bark-600);
  --color-accent-tint: var(--cedar-bark-100);

  /* ---- Semantic: surfaces & text ---- */
  --color-page-bg: var(--gray-050);
  --color-surface: #ffffff;
  --color-surface-sunken: var(--gray-100);
  --color-border: var(--gray-200);
  --color-border-strong: var(--gray-300);
  --color-text: var(--gray-900);
  --color-text-muted: var(--gray-600);
  --color-text-on-primary: #ffffff;
  --color-focus-ring: var(--cedar-green-600);

  /* ---- Semantic: feedback ---- */
  --color-success: var(--cedar-green-600);
  --color-success-tint: var(--cedar-green-100);
  --color-warning: var(--amber-600);
  --color-warning-tint: var(--amber-100);
  --color-error: var(--red-600);
  --color-error-tint: var(--red-100);
  --color-info: var(--stream-teal-600);
  --color-info-tint: var(--stream-teal-100);

  /* ---- Typography ---- */
  --font-body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-heading: "Fraunces", Georgia, "Times New Roman", serif;

  --font-size-base: 1rem; /* 16px */
  --font-size-sm: 0.8rem;
  --font-size-lg: 1.25rem;
  --font-size-xl: 1.563rem;
  --font-size-2xl: 1.953rem;
  --font-size-3xl: 2.441rem;
  --line-height-body: 1.5;
  --line-height-heading: 1.2;

  /* ---- Spacing (4px base) ---- */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.5rem;
  --space-6: 2rem;
  --space-8: 3rem;

  /* ---- Shape & elevation ---- */
  --radius-default: 6px;
  --radius-pill: 999px;
  --shadow-sm: 0 1px 2px rgba(28, 33, 30, 0.06);
  --shadow-md: 0 4px 12px rgba(28, 33, 30, 0.08);
}
