/* Formulaite design tokens.
   One cream palette, one brand green, one action colour. Every sheet reads
   from these; nothing else declares a raw colour, font or spacing value.
   Values that also exist in the legacy styles.css keep the same numbers so
   pages still on that sheet do not shift. */
:root {
  /* Surfaces */
  --color-bg: #F7F3EC;          /* page */
  --color-bg-band: #F0EBE3;     /* alternating band */
  --color-surface: #FFFDF8;     /* cards, nav */
  --color-bg-dark: #1A1814;     /* footer, dark panels */
  --color-border: #E5DFD4;
  --hairline: rgba(13, 77, 63, 0.14);
  --hairline-strong: rgba(13, 77, 63, 0.26);

  /* Ink */
  --color-text: #1E1C18;
  --color-text-muted: #4A453E;
  --color-text-soft: #76706A;
  --color-text-light: #E8E4DC;  /* on dark */
  --color-text-light-muted: #B8B2A8;

  /* Brand */
  --color-primary: #0D4D3F;     /* deep green: structure, links, eyebrows */
  --color-primary-light: #2F7656;
  --color-primary-tint: rgba(13, 77, 63, 0.06);
  --color-primary-tint-strong: rgba(13, 77, 63, 0.12);
  --color-on-primary: #F2F7F4;

  /* Action (primary CTA only) */
  --color-action: #6B3A2E;
  --color-action-hover: #5A3026;
  --color-action-ink: #FFFDF8;

  /* Accent (sparingly: highlights, badges) */
  --color-accent: #C9A227;
  --color-accent-tint: rgba(201, 162, 39, 0.14);
  --color-accent-text: #8A6A14;   /* gold as text on cream; the accent itself is too light to read */

  /* Legacy aliases still referenced by styles.css */
  --color-warm-bg: var(--color-bg);
  --color-bg-light: var(--color-bg);
  --color-trust: var(--color-primary);
  --color-trust-hover: #0B3D32;
  --color-gold-bright: #e6bd57;

  /* Type */
  --font-display: 'Newsreader', Georgia, 'Times New Roman', serif;
  --font-body: 'Manrope', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --mono: 'Manrope', ui-monospace, 'SF Mono', Menlo, monospace;

  --type-display-size: clamp(44px, 6vw, 76px);
  --type-display-leading: 1.02;
  --type-display-spacing: -0.025em;
  --type-h1-size: clamp(40px, 5vw, 60px);
  --type-h1-weight: 600;
  --type-h1-spacing: -0.02em;
  --type-h1-leading: 1.06;
  --type-h2-size: clamp(28px, 3.4vw, 40px);
  --type-h2-weight: 600;
  --type-h2-spacing: -0.015em;
  --type-h2-leading: 1.12;
  --type-h3-size: clamp(21px, 2vw, 24px);
  --type-h3-weight: 600;
  --type-h3-spacing: 0;
  --type-h3-leading: 1.25;
  --type-lede-size: clamp(18px, 1.6vw, 21px);
  --type-body-size: 17px;
  --type-body-weight: 400;
  --type-body-spacing: 0;
  --type-body-leading: 1.65;
  --type-small-size: 14px;
  --type-small-weight: 400;
  --type-small-leading: 1.5;
  --type-eyebrow-size: 12px;
  --type-eyebrow-weight: 600;
  --type-eyebrow-spacing: 0.14em;
  --type-eyebrow-leading: 1.2;
  --type-mono-size: 13px;
  --type-mono-weight: 500;
  --type-mono-leading: 1.4;

  /* Space (8pt) */
  --space-1: 8px;
  --space-2: 16px;
  --space-3: 24px;
  --space-4: 40px;
  --space-5: 64px;
  --space-6: 96px;
  --space-7: 128px;
  --section-padding: clamp(64px, 9vw, 128px);

  /* Layout */
  --container-max: 1200px;
  --container-narrow: 760px;
  --container-wide: 1360px;
  --gutter: clamp(16px, 4vw, 32px);
  --layout-max: min(1680px, calc(100vw - clamp(32px, 5vw, 80px)));
  --layout-gutter: clamp(24px, 4vw, 48px);
  --nav-height: 60px;
  --nav-offset: 12px;

  /* Shape */
  --radius-sm: 16px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-card: 20px;
  --radius-input: 16px;
  --radius-pill: 999px;

  /* Elevation */
  --shadow-sm: 0 1px 3px rgba(30, 28, 24, 0.06);
  --shadow-md: 0 4px 20px rgba(30, 28, 24, 0.08);
  --shadow-lg: 0 10px 40px rgba(30, 28, 24, 0.1);
  --card-shadow: 0 4px 20px rgba(30, 28, 24, 0.06);
  --card-shadow-hover: 0 10px 32px rgba(30, 28, 24, 0.1);
  --nav-shadow: 0 8px 30px rgba(30, 28, 24, 0.08);

  /* Motion */
  --transition: 0.28s ease;
  --transition-fast: 0.18s ease;
}

/* Context colours for generated pages. Inline palette hexes in the ingredient,
   formulation, landing and blog pages were mapped to these variables, so a
   dark container only has to redefine them (see directory.css, landing.css). */
:root {
  --c-green: var(--color-primary);        /* was emerald / blue text and accents */
  --c-plum: var(--color-action);          /* was violet accents */
  --c-amber: var(--color-accent);         /* was amber accents */
  --c-light: var(--color-text-muted);     /* was pale green/blue/violet text (light-on-dark) */
  --c-tint: var(--color-primary-tint);    /* was pale tint backgrounds and borders */
}
