/**
 * @file theme.css
 * OBL design tokens – overrides Mercury's src/theme.css.
 *
 * Mercury loads this file instead of its own when it sits next to index.php.
 * Colours are taken from the Exarchate emblem (OBL_2_EN.svg):
 *   shield green #00682c, gold cross #f8d013, secondary greens
 *   #358759 / #50976f / #71ab8a and olive #5e9022 / #a0ab1b.
 *
 * Two layers:
 *   1. --obl-*  brand palette used by obl_components / obl_schedule CSS.
 *   2. Mercury's shadcn-style tokens (--primary, --background, …) mapped onto
 *      the brand palette so Mercury/Canvas components follow the theme.
 */

:root {
  /* ---------------------------------------------------------------
   * 1. Brand palette
   * ------------------------------------------------------------- */

  /* Greens – from the emblem shield. */
  --obl-green-950: #072a16;
  --obl-green-900: #0b3d20;
  --obl-green-800: #004f22;
  --obl-green-700: #00682c; /* Primary – emblem shield. */
  --obl-green-600: #358759;
  --obl-green-500: #50976f;
  --obl-green-300: #71ab8a;
  --obl-green-100: #e3efe6;
  --obl-green-50: #f1f7f2;

  /* Olive – from the emblem accents. */
  --obl-olive-600: #5e9022;
  --obl-olive-400: #a0ab1b;

  /* Gold – from the emblem cross. */
  --obl-gold-500: #f8d013; /* Decorative / on dark green only. */
  --obl-gold-400: #fadc4f;
  --obl-gold-200: #fcebaa;
  --obl-gold-100: #fdf5d3;
  --obl-gold-700: #8a6d00; /* Gold text on light backgrounds (AA). */

  /* Neutrals – warm ivory and green-tinted ink. */
  --obl-ivory: #fbf9f3;
  --obl-parchment: #f3eedf;
  --obl-surface: #ffffff;
  --obl-ink: #1c2a22;
  --obl-ink-soft: #33443a;
  --obl-muted: #56645b;
  --obl-line: #e4ddc8;
  --obl-line-soft: rgb(28 42 34 / 10%);

  /* Typography. */
  --obl-font-heading: "EB Garamond", "Iowan Old Style", Georgia, "Times New Roman", serif;
  --obl-font-body: "Inter", "Segoe UI", system-ui, -apple-system, Arial, sans-serif;

  /* Layout. */
  --obl-container: 90rem;
  /* Nearly square corners throughout (crisp, matches the cross pattern). */
  --obl-radius-sm: 2px;
  --obl-radius: 2px;
  --obl-radius-lg: 2px;

  /* Height of the cross-pattern strips (dividers, green band edges). */
  --obl-pattern-strip: 1.75rem;

  /* Elevation – soft, green-tinted shadows. */
  --obl-shadow-sm: 0 1px 2px rgb(11 61 32 / 6%), 0 2px 6px rgb(11 61 32 / 5%);
  --obl-shadow: 0 2px 4px rgb(11 61 32 / 5%), 0 10px 28px rgb(11 61 32 / 9%);
  --obl-shadow-lg: 0 4px 8px rgb(11 61 32 / 6%), 0 20px 48px rgb(11 61 32 / 14%);

  /* Motion. */
  --obl-ease: cubic-bezier(0.22, 0.61, 0.36, 1);

  /* Gold hairline used under the header and in dividers. */
  --obl-gold-rule: linear-gradient(
    90deg,
    transparent,
    var(--obl-gold-500) 15%,
    var(--obl-gold-400) 50%,
    var(--obl-gold-500) 85%,
    transparent
  );

  /* ---------------------------------------------------------------
   * 2. Mercury tokens
   * ------------------------------------------------------------- */

  --background: var(--obl-ivory);
  --foreground: var(--obl-ink);
  --card: var(--obl-surface);
  --card-foreground: var(--obl-ink);
  --primary: var(--obl-green-700);
  --primary-foreground: #ffffff;
  --secondary: var(--obl-parchment);
  --secondary-foreground: var(--obl-green-900);
  --muted: var(--obl-parchment);
  --muted-foreground: var(--obl-muted);
  --accent: var(--obl-gold-100);
  --accent-foreground: var(--obl-green-900);
  --destructive: #b42318;
  --destructive-foreground: #ffffff;
  --border: var(--obl-line);
  --input: var(--obl-line);
  --font-sans: var(--obl-font-heading);
  --font-serif: var(--obl-font-heading);
  --font-mono: "Fira Mono", "Menlo", "Consolas", "Liberation Mono", monospace;
  --font-body: var(--obl-font-body);
  --radius: 2px;
  --shadow-x: 0;
  --shadow-y: 1px;
  --shadow-blur: 3px;
  --shadow-spread: 0px;
  --shadow-opacity: 0.08;
  --shadow-color: var(--obl-green-900);
  --shadow-2xs: 0 1px 2px rgb(11 61 32 / 5%);
  --shadow-xs: 0 1px 3px rgb(11 61 32 / 6%);
  --shadow-sm: var(--obl-shadow-sm);
  --shadow: var(--obl-shadow-sm);
  --shadow-md: var(--obl-shadow);
  --shadow-lg: var(--obl-shadow);
  --shadow-xl: var(--obl-shadow-lg);
  --shadow-2xl: var(--obl-shadow-lg);
  --tracking-normal: 0em;
  --spacing: 0.25rem;

  /* Set navbar height for hero billboard overlay */
  --navbar-height: calc(var(--spacing) * 15);

  @media (min-width: 768px) {
    --navbar-height: calc(var(--spacing) * 18);
  }
}

/* Mercury sections set to the "dark" colour scheme: deep Exarchate green. */
.dark {
  --background: var(--obl-green-900);
  --foreground: #ffffff;
  --card: var(--obl-green-800);
  --card-foreground: #ffffff;
  --primary: var(--obl-gold-500);
  --primary-foreground: var(--obl-green-950);
  --secondary: var(--obl-green-800);
  --secondary-foreground: #ffffff;
  --muted: var(--obl-green-800);
  --muted-foreground: #c9d8cd;
  --accent: var(--obl-gold-500);
  --accent-foreground: var(--obl-green-950);
  --destructive: #f97066;
  --destructive-foreground: #ffffff;
  --border: rgb(255 255 255 / 16%);
  --input: rgb(255 255 255 / 16%);
}
