/* Self-hosted brand fonts (latin subset). The CSP only allows 'self', so Google Fonts cannot be used. Hindi falls through to the Devanagari fonts in the stacks below. */
@font-face { font-family: "Playfair Display"; font-style: normal; font-weight: 500; font-display: swap; src: url("/assets/fonts/playfair-display-latin-500-normal.woff2") format("woff2"); }
@font-face { font-family: "Playfair Display"; font-style: normal; font-weight: 600; font-display: swap; src: url("/assets/fonts/playfair-display-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "Playfair Display"; font-style: italic; font-weight: 400; font-display: swap; src: url("/assets/fonts/playfair-display-latin-400-italic.woff2") format("woff2"); }
@font-face { font-family: "Poppins"; font-style: normal; font-weight: 400; font-display: swap; src: url("/assets/fonts/poppins-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Poppins"; font-style: normal; font-weight: 500; font-display: swap; src: url("/assets/fonts/poppins-latin-500-normal.woff2") format("woff2"); }
@font-face { font-family: "Poppins"; font-style: normal; font-weight: 600; font-display: swap; src: url("/assets/fonts/poppins-latin-600-normal.woff2") format("woff2"); }

/*
 * Design tokens - Phase 0 baseline.
 * These are DEFAULTS. From Phase 2 the admin Theme Manager overrides the --color-* and
 * font tokens from the database by emitting a :root block after this file.
 * Colour values below are the Grace Community Fellowship brand (navy, orange, ivory taken from the logo).
 * Body text on --color-surface must keep at least 4.5:1 contrast (WCAG AA).
 */
:root {
  /* Brand (GCF logo palette; primary stays admin-configurable) */
  --color-primary: #112b5c;
  --color-primary-contrast: #ffffff;
  --color-accent: #f79307;          /* logo orange: use for fills, rules and icons, never as text on light surfaces */
  --color-accent-contrast: #112b5c; /* navy text on orange fills */
  --color-gold: #b88a45;            /* decorative rules only */
  --color-gold-text: #7a5a1f;       /* gold that is readable as text on ivory/white */
  --color-sand: #efe7d8;
  --color-heading: var(--color-primary);
  --color-on-brand: #f5f3ee;        /* text on navy surfaces */
  --color-on-brand-muted: #c3cde0;
  --color-brand-deep: #0b2048;      /* footer, deepest navy */
  --color-highlight: #ffc36c;       /* light orange for links/labels on navy */

  /* Neutrals */
  --color-text: #263247;
  --color-text-muted: #5a6578;
  --color-surface: #ffffff;
  --color-surface-alt: #f5f3ee;
  --color-border: #e1ddd3;

  /* Status */
  --color-success: #1b7f3b;
  --color-warning: #a06100;
  --color-danger: #b3261e;
  --color-info: #1f5fa8;

  /* Typography. Devanagari-capable fallbacks keep Hindi readable before web fonts load. */
  --font-body: "Poppins", system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", "Noto Sans Devanagari", "Nirmala UI", Mangal, sans-serif;
  --font-heading: "Playfair Display", Georgia, "Noto Serif", "Noto Serif Devanagari", "Noto Sans Devanagari", "Nirmala UI", Mangal, serif;
  --font-size-base: 1rem;
  --line-height-base: 1.6;
  --line-height-hindi: 1.8;
  --font-size-sm: 0.875rem;
  --font-size-lg: 1.125rem;
  --font-size-xl: 1.5rem;
  --font-size-2xl: 2rem;

  /* Spacing scale (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 and depth */
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --shadow-sm: 0 1px 2px rgba(17, 43, 92, 0.06);
  --shadow-md: 0 4px 12px rgba(17, 43, 92, 0.12);

  /* Layout. Media queries cannot use variables; breakpoints are 480 / 768 / 1024 / 1280 px. */
  --container-max: 72rem;
  --tap-target-min: 44px;

  /* Focus */
  --focus-ring: 0 0 0 2px var(--color-surface), 0 0 0 4px var(--color-primary);
}

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

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

body {
  font-family: var(--font-body);
  font-size: var(--font-size-base);
  line-height: var(--line-height-base);
  color: var(--color-text);
  background: var(--color-surface);
}

/* Hindi needs more vertical room for matras. */
:lang(hi) { line-height: var(--line-height-hindi); }

h1, h2, h3, h4 { font-family: var(--font-heading); line-height: 1.25; color: var(--color-heading); }

a { color: var(--color-primary); }

:focus-visible { outline: none; box-shadow: var(--focus-ring); border-radius: var(--radius-sm); }

img, video { max-width: 100%; height: auto; }

/* Respect reduced motion everywhere (seasonal effects in Phase 12 also honour this). */
@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;
  }
}
