/*
 * GAMANDE design tokens.
 *
 * A documented token system, not recovered brand assets. The real design handoff is an
 * outstanding operating input; until it arrives these are deliberate proposals, and every
 * value below is meant to be replaced wholesale rather than edited piecemeal.
 *
 * Nothing outside this file may declare a raw colour, spacing value or radius. A stylesheet
 * test enforces that: the moment a component invents its own grey, the palette stops being
 * a palette and becomes a suggestion.
 */

:root {
    /* ---- Surfaces -------------------------------------------------------------------
     * Warm, but grey-stone rather than cream. Cream reads domestic; this product is a
     * clinic, and the surfaces should feel like daylight on plaster.
     */
    --gm-surface: #f4f2ef;
    --gm-surface-raised: #ffffff;
    --gm-surface-sunken: #eae7e2;
    --gm-surface-inverse: #1e2422;

    /* ---- Ink ------------------------------------------------------------------------
     * A near-black carrying the same green-grey cast as the primary, so text and actions
     * belong to one family rather than two.
     */
    --gm-ink: #1e2422;
    --gm-ink-muted: #5a635f;
    --gm-ink-faint: #858d89;
    --gm-ink-inverse: #f4f2ef;

    /* ---- Primary --------------------------------------------------------------------
     * Deep petrol teal, borrowed from Georgian cloisonné enamel. Restrained enough to sit
     * under long-form legal text without shouting, saturated enough to carry a focus ring.
     */
    --gm-primary: #17565b;
    --gm-primary-strong: #0e3f43;
    --gm-primary-soft: #dfeae9;
    --gm-primary-ink: #ffffff;

    /* ---- Status ---------------------------------------------------------------------
     * Each of these is always paired with an icon or a shape in the markup. Hue alone is
     * not a signal: roughly one in twelve men has a colour vision deficiency, and a status
     * chip that only differs by colour tells them nothing.
     */
    --gm-success: #2e6b46;
    --gm-success-soft: #e2eee7;
    --gm-caution: #8a5a12;
    --gm-caution-soft: #f6ecd9;
    --gm-danger: #9b3131;
    --gm-danger-soft: #f6e3e3;
    --gm-info: #17565b;
    --gm-info-soft: #dfeae9;

    /* ---- Borders --------------------------------------------------------------------- */
    --gm-border: #ddd8d2;
    --gm-border-strong: #b9b2aa;

    /* ---- Type -----------------------------------------------------------------------
     * Georgian first, deliberately. The stack names faces that actually carry მხედრული
     * before any Latin-only face, because a Latin face selected first would leave Georgian
     * to an arbitrary system fallback with mismatched metrics.
     *
     * No external font service. Fetching a webfont from a third party announces every
     * visitor of a mental-health platform to that third party, and a blocked or slow CDN
     * would leave the sign-in page unreadable. A self-hosted face is an operating input.
     */
    --gm-font-sans:
        "Noto Sans Georgian", "BPG Arial", "Segoe UI", "Helvetica Neue", "DejaVu Sans",
        system-ui, -apple-system, sans-serif;

    /* Monospace is reserved for values a person may need to compare character by character —
     * an agreement content hash, a correlation id. It is not a decorative label face. */
    --gm-font-mono: "Cascadia Mono", "SF Mono", "DejaVu Sans Mono", ui-monospace, monospace;

    /* A major-third scale (1.25) from a 16px base. */
    --gm-text-xs: 0.75rem;
    --gm-text-sm: 0.875rem;
    --gm-text-base: 1rem;
    --gm-text-lg: 1.25rem;
    --gm-text-xl: 1.5625rem;
    --gm-text-2xl: 1.953rem;
    --gm-text-3xl: 2.441rem;

    /* Set for Georgian. Its ascenders and descenders are longer than Latin's, so leading
     * that looks generous in English looks cramped in ქართული. */
    --gm-leading-tight: 1.3;
    --gm-leading-normal: 1.65;
    --gm-leading-loose: 1.8;

    --gm-weight-regular: 400;
    --gm-weight-medium: 500;
    --gm-weight-bold: 700;

    /* Reading measure. Under 80 characters, per Elements of Typographic Style. */
    --gm-measure: 66ch;

    /* ---- Space ----------------------------------------------------------------------
     * A 4px base, doubling loosely. Named by size rather than by purpose so a component
     * cannot quietly redefine what "section spacing" means.
     */
    --gm-space-1: 0.25rem;
    --gm-space-2: 0.5rem;
    --gm-space-3: 0.75rem;
    --gm-space-4: 1rem;
    --gm-space-5: 1.5rem;
    --gm-space-6: 2rem;
    --gm-space-7: 3rem;
    --gm-space-8: 4rem;

    /* ---- Radius ---------------------------------------------------------------------
     * Varied by role rather than one value everywhere. A control and a page-level panel are
     * different kinds of object and should not share a corner.
     */
    --gm-radius-control: 6px;
    --gm-radius-panel: 12px;
    --gm-radius-pill: 999px;

    /* ---- Elevation ------------------------------------------------------------------
     * Used sparingly. Structure comes from borders and surface changes; a shadow under
     * every card is decoration that stops meaning "this floats".
     */
    --gm-shadow-raised: 0 1px 2px rgba(30, 36, 34, 0.06), 0 4px 12px rgba(30, 36, 34, 0.04);

    /* ---- Focus ----------------------------------------------------------------------
     * Always visible, never removed. Keyboard operation is a requirement of this product,
     * and an invisible focus ring makes every screen unusable without a mouse.
     */
    --gm-focus-ring: 3px;
    --gm-focus-offset: 2px;
    --gm-focus-colour: #17565b;

    /* ---- Targets --------------------------------------------------------------------- */
    --gm-target-min: 44px;

    /* ---- Motion ---------------------------------------------------------------------
     * Short, and only in response to something a person did. Nothing on this product
     * animates on its own.
     */
    --gm-motion-fast: 120ms;
    --gm-motion-normal: 200ms;
    --gm-motion-ease: cubic-bezier(0.2, 0, 0.2, 1);
}

@media (prefers-reduced-motion: reduce) {
    :root {
        --gm-motion-fast: 1ms;
        --gm-motion-normal: 1ms;
    }
}
