/*
 * Design tokens — Elscott Medical
 *
 * Single source of truth for colour, typography, spacing, radii, motion.
 * Sourced from Elscott_Design_System_v0.1.md (2026-05-06, BU-S).
 *
 * Naming convention:
 *   --c-*       colour
 *   --type-*    typography (family, size, weight, leading, tracking)
 *   --space-*   spacing scale (multiples of 8 with curated stops)
 *   --max-*     max-widths / container constraints
 *   --grid-*    grid system (columns, gutters)
 *   --radius-*  corner radius
 *   --shadow-*  shadows (rarely used — design system §5.2 forbids drop shadows)
 *   --motion-*  duration and easing
 *
 * If you reach for a value that isn't here, ask whether a token is missing
 * (add it here first, then use it) or whether the value is genuinely a one-off
 * (a comment in the component CSS should say why).
 */

:root {

	/* ---------------------------------------------------------------------
	 * Colour — design system §3
	 * ------------------------------------------------------------------- */

	/* Primary palette */
	--c-navy:                #0a1339;   /* Primary brand. Headings, primary text. */
	--c-bronze:              #d6a45b;   /* Accent only. Punctuation, never field. Max 4 uses per page (§3.3). */
	--c-off-white:           #f8f5ee;   /* Default page ground. */

	/* Secondary palette */
	--c-deep-teal-navy:      #193a4a;   /* Preferred dark ground (over pure navy). */
	--c-muted-teal:          #587675;   /* Single accent — quote rules, fine borders. Max once per page. */
	--c-cool-grey-blue:      #8293b0;   /* Secondary text, fine rules, micro-type. */
	--c-light-cool-grey:     #c7ced4;   /* Surface tints, dividers, one section ground. */
	--c-warm-cream:          #f3ebdc;   /* Alternative section ground. */
	--c-white:               #ffffff;   /* Secondary surface, cards. */

	/* Semantic aliases — prefer these in component CSS so semantic shifts
	 * (e.g. "primary text moves from navy to deep teal-navy") can happen
	 * in one place. */
	--c-text-primary:        var(--c-navy);
	--c-text-secondary:      var(--c-cool-grey-blue);
	--c-text-inverse:        var(--c-off-white);
	--c-bg-page:             var(--c-off-white);
	--c-bg-alt-section:      var(--c-warm-cream);
	--c-bg-alt-section-cool: var(--c-light-cool-grey);
	--c-bg-dark-band:        var(--c-deep-teal-navy);
	--c-rule-fine:           var(--c-cool-grey-blue);
	--c-rule-accent:         var(--c-bronze);
	--c-focus-ring:          var(--c-bronze);

	/* CTA colour pairs (verified WCAG AA in §3.4) */
	--c-cta-primary-bg:      var(--c-bronze);
	--c-cta-primary-fg:      var(--c-deep-teal-navy);
	--c-cta-secondary-fg:    var(--c-navy);     /* Text + arrow on light ground */
	--c-cta-on-dark-fg:      var(--c-off-white);


	/* ---------------------------------------------------------------------
	 * Typography — design system §2
	 * ------------------------------------------------------------------- */

	/* Families. Falls back to system serif/sans if web fonts haven't loaded;
	 * Uncode handles the actual @font-face declarations. */
	--type-display-family:  "Crimson Pro", "Crimson Text", Cambria, Georgia, "Times New Roman", serif;
	--type-body-family:     "Titillium Web", "Helvetica Neue", Arial, system-ui, sans-serif;

	/* Weights — locked per §2.1. */
	--type-weight-light:     300;
	--type-weight-regular:   400;
	--type-weight-semibold:  600;

	/* Sizes — desktop, with mobile counterparts via media query at bottom of file.
	 * Values in rem so the user's browser font-size preference is respected;
	 * conversion assumes 1rem = 16px (the default). */
	--type-display-size:           7.0rem;    /* 112px */
	--type-display-leading:        1.05;
	--type-display-tracking:       -0.015em;

	--type-section-primary-size:   4.0rem;    /* 64px */
	--type-section-primary-leading:1.10;
	--type-section-primary-tracking:-0.010em;

	--type-section-secondary-size: 2.5rem;    /* 40px */
	--type-section-secondary-leading:1.15;
	--type-section-secondary-tracking:-0.005em;

	--type-section-tertiary-size:  1.375rem;  /* 22px */
	--type-section-tertiary-leading:1.30;
	--type-section-tertiary-tracking:0;

	--type-lede-size:              1.375rem;  /* 22px */
	--type-lede-leading:           1.50;
	--type-lede-tracking:          0;

	--type-body-size:              1.0625rem; /* 17px */
	--type-body-leading:           1.60;
	--type-body-tracking:          0;

	--type-micro-size:             0.8125rem; /* 13px */
	--type-micro-leading:          1.40;
	--type-micro-tracking:         0.01em;

	--type-eyebrow-size:           0.875rem;  /* 14px */
	--type-eyebrow-leading:        1.40;
	--type-eyebrow-tracking:       0.06em;

	/* Measure constraints (§2.4) — editorial 60–75ch max */
	--measure-body-max:      72ch;
	--measure-display-max:   24ch;


	/* ---------------------------------------------------------------------
	 * Spacing — design system §6.2 (8 / 16 / 24 / 32 / 48 / 64 / 96 / 128 / 192)
	 *
	 * Use the named stops only. Arbitrary gaps are out-of-system.
	 * ------------------------------------------------------------------- */

	--space-8:    0.5rem;     /* 8px  */
	--space-16:   1rem;       /* 16px */
	--space-24:   1.5rem;     /* 24px */
	--space-32:   2rem;       /* 32px */
	--space-48:   3rem;       /* 48px */
	--space-64:   4rem;       /* 64px */
	--space-96:   6rem;       /* 96px */
	--space-128:  8rem;       /* 128px */
	--space-192:  12rem;      /* 192px */

	/* Section padding helpers (per §6.2 — 96px desktop min, 48px mobile min;
	 * hero 128px min desktop). */
	--section-padding-y:           var(--space-96);
	--section-padding-y-hero:      var(--space-128);


	/* ---------------------------------------------------------------------
	 * Grid + container — design system §6.3
	 * ------------------------------------------------------------------- */

	--max-content-width:    80rem;       /* 1280px */
	--grid-columns:         12;
	--grid-gutter:          var(--space-24);

	/* Editorial body measure (§6.3 — 8 cols max ≈ 640px) */
	--measure-editorial:    40rem;       /* 640px — keeps body copy within 60-75 char target */


	/* ---------------------------------------------------------------------
	 * Radii — design system §5.1
	 * ------------------------------------------------------------------- */

	--radius-card:    0.375rem;    /* 6px — within 4-8px spec */
	--radius-button:  0.5rem;      /* 8px */
	--radius-input:   0.375rem;    /* 6px */


	/* ---------------------------------------------------------------------
	 * Shadows — §5.2 forbids drop shadows.
	 * Tokens here exist only for the rare case (overlay, modal scrim).
	 * ------------------------------------------------------------------- */

	--shadow-none:         none;
	--shadow-scrim:        0 0 0 100vmax rgba(10, 19, 57, 0.55);


	/* ---------------------------------------------------------------------
	 * Motion — §8 reduced-motion aware. Keep durations short and curves calm.
	 * ------------------------------------------------------------------- */

	--motion-fast:    120ms;
	--motion-base:    200ms;
	--motion-slow:    320ms;

	--motion-ease-out:    cubic-bezier(0.16, 1, 0.3, 1);
	--motion-ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);


	/* ---------------------------------------------------------------------
	 * Z-index scale — small, intentional
	 * ------------------------------------------------------------------- */

	--z-skip-link:   100;
	--z-header:       50;
	--z-dropdown:     40;
	--z-modal:       200;
	--z-toast:       300;
}


/* -------------------------------------------------------------------------
 * Mobile type scale — design system §2.2 (mobile column)
 *
 * Re-binds the same tokens to smaller values at narrower viewports.
 * Breakpoint chosen at 768px (typical tablet portrait) per Uncode's
 * defaults; refine if Uncode's actual grid breakpoint differs.
 * ------------------------------------------------------------------- */

@media (max-width: 47.9375rem) {  /* < 768px */
	:root {
		--type-display-size:           3.5rem;    /* 56px */
		--type-section-primary-size:   2.5rem;    /* 40px */
		--type-section-secondary-size: 1.75rem;   /* 28px */
		--type-section-tertiary-size:  1.25rem;   /* 20px */
		--type-lede-size:              1.125rem;  /* 18px */
		--type-body-size:              1rem;      /* 16px (mobile minimum, §8) */
		--type-micro-size:             0.75rem;   /* 12px */
		--type-eyebrow-size:           0.8125rem; /* 13px */

		--section-padding-y:           var(--space-48);
		--section-padding-y-hero:      var(--space-64);
	}
}
