/*
  Tabernacle public-site design tokens.
  Source: PRODUCT.md and DESIGN.md. Keep this file boring and stable:
  it is the contract between legacy page CSS and new component work.
*/

:root {
  /* Color primitives */
  --t-color-ink-950: #020617;
  --t-color-ink-900: #0f172a;
  --t-color-ink-850: #132a4a;
  --t-color-ink-800: #1e293b;
  --t-color-ink-700: #334155;
  --t-color-ink-600: #475569;
  --t-color-ink-500: #64748b;
  --t-color-ink-300: #cbd5e1;
  --t-color-ink-200: #e2e8f0;
  --t-color-ink-100: #f1f5f9;
  --t-color-ink-050: #f8fafc;

  --t-color-paper: #ffffff;
  --t-color-paper-soft: #f7f7f7;

  --t-color-blue-700: #1d4ed8;
  --t-color-blue-600: #2563eb;
  --t-color-blue-500: #2b70e4;
  --t-color-blue-100: #dbeafe;
  --t-color-blue-050: #eff6ff;

  --t-color-sky-500: #0ea5e9;
  --t-color-green-500: #00cc6d;
  --t-color-green-600: #16a34a;
  --t-color-coral-500: #e84e38;
  --t-color-gold-500: #f7d101;
  --t-color-red-700: #b91c1c;
  --t-color-red-050: #fef2f2;

  /* Semantic color roles */
  --t-color-bg: var(--t-color-ink-050);
  --t-color-bg-soft: var(--t-color-paper-soft);
  --t-color-surface: var(--t-color-paper);
  --t-color-surface-muted: var(--t-color-ink-100);
  --t-color-text: var(--t-color-ink-900);
  --t-color-text-soft: var(--t-color-ink-600);
  --t-color-text-muted: var(--t-color-ink-500);
  --t-color-border: var(--t-color-ink-200);
  --t-color-border-strong: var(--t-color-ink-300);
  --t-color-action: var(--t-color-blue-600);
  --t-color-action-hover: var(--t-color-blue-700);
  --t-color-action-soft: var(--t-color-blue-050);
  --t-color-focus: var(--t-color-blue-600);
  --t-color-accent: var(--t-color-sky-500);
  --t-color-success: var(--t-color-green-500);
  --t-color-warning: var(--t-color-gold-500);
  --t-color-danger: var(--t-color-red-700);

  /* Legacy aliases used by existing public CSS */
  --navy: var(--t-color-ink-900);
  --teal: var(--t-color-accent);
  --text: var(--t-color-text);
  --muted: var(--t-color-text-muted);
  --bg-light: var(--t-color-bg-soft);
  --white: var(--t-color-surface);

  /* Typography */
  --t-font-display: "Poppins", "Mulish", system-ui, sans-serif;
  --t-font-body: "Mulish", system-ui, -apple-system, "Segoe UI", sans-serif;
  --t-font-ui: "Mulish", system-ui, -apple-system, "Segoe UI", sans-serif;

  --t-font-size-2xs: 0.75rem;
  --t-font-size-xs: 0.8125rem;
  --t-font-size-sm: 0.875rem;
  --t-font-size-base: 1rem;
  --t-font-size-md: 1.0625rem;
  --t-font-size-lg: 1.125rem;
  --t-font-size-xl: 1.25rem;
  --t-font-size-2xl: 1.625rem;
  --t-font-size-3xl: 2.25rem;
  --t-font-size-display: clamp(2rem, 5vw, 3.25rem);
  --t-font-size-hero: clamp(2.25rem, 5.5vw, 4rem);

  --t-font-weight-regular: 400;
  --t-font-weight-medium: 500;
  --t-font-weight-semibold: 600;
  --t-font-weight-bold: 700;
  --t-font-weight-extrabold: 800;

  --t-line-height-tight: 1.15;
  --t-line-height-title: 1.3;
  --t-line-height-body: 1.6;
  --t-line-height-longform: 1.75;
  --t-letter-spacing-label: 0.08em;

  /* Spacing */
  --t-space-0: 0;
  --t-space-1: 0.25rem;
  --t-space-2: 0.5rem;
  --t-space-3: 0.75rem;
  --t-space-4: 1rem;
  --t-space-5: 1.25rem;
  --t-space-6: 1.5rem;
  --t-space-8: 2rem;
  --t-space-10: 2.5rem;
  --t-space-12: 3rem;
  --t-space-16: 4rem;
  --t-space-20: 5rem;
  --t-space-section: clamp(3.5rem, 7vw, 5rem);
  --t-container: 1140px;
  --t-container-wide: 1250px;
  --t-gutter: 4%;

  /* Radius */
  --t-radius-xs: 0.25rem;
  --t-radius-sm: 0.5rem;
  --t-radius-md: 0.625rem;
  --t-radius-lg: 0.75rem;
  --t-radius-xl: 1rem;
  --t-radius-2xl: 1.25rem;
  --t-radius-pill: 999px;

  /* Shadows */
  --t-shadow-xs: 0 1px 2px rgba(15, 23, 42, 0.04);
  --t-shadow-sm: 0 4px 16px rgba(15, 23, 42, 0.06);
  --t-shadow-card: 0 4px 24px rgba(15, 23, 42, 0.06);
  --t-shadow-card-hover: 0 12px 40px rgba(15, 23, 42, 0.10);
  --t-shadow-dropdown: 0 8px 32px rgba(15, 23, 42, 0.10);
  --t-shadow-modal: 0 8px 40px rgba(15, 23, 42, 0.14);
  --t-shadow-focus: 0 0 0 3px rgba(37, 99, 235, 0.16);
  --t-shadow-action: 0 8px 24px rgba(37, 99, 235, 0.28);

  /* Motion */
  --t-ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --t-ease-standard: cubic-bezier(0.2, 0, 0, 1);
  --t-duration-fast: 150ms;
  --t-duration-standard: 180ms;
  --t-duration-slow: 240ms;
  --ease-out-strong: var(--t-ease-out);
  --ease-in-out-strong: cubic-bezier(0.77, 0, 0.175, 1);

  /* Component tokens */
  --t-button-height: 44px;
  --t-button-height-lg: 50px;
  --t-button-padding-x: 1.75rem;
  --t-button-radius: var(--t-radius-md);
  --t-button-font-size: var(--t-font-size-base);
  --t-button-font-weight: var(--t-font-weight-medium);

  --t-card-bg: var(--t-color-surface);
  --t-card-border: 1px solid var(--t-color-border);
  --t-card-radius: var(--t-radius-xl);
  --t-card-padding: var(--t-space-6);
  --t-card-shadow: var(--t-shadow-card);

  --t-field-height: 44px;
  --t-field-padding-x: 0.75rem;
  --t-field-radius: var(--t-radius-sm);
  --t-field-border: 1px solid var(--t-color-border);
  --t-field-bg: var(--t-color-surface);
  --t-field-focus-border: var(--t-color-focus);
  --t-field-focus-shadow: var(--t-shadow-focus);
}

@media (prefers-reduced-motion: reduce) {
  :root {
    --t-duration-fast: 1ms;
    --t-duration-standard: 1ms;
    --t-duration-slow: 1ms;
  }
}
