/* theme: base */
/*
 * Base theme design tokens. Child themes override any of these in their own tokens.css;
 * Branding settings (primary/accent colours) override the theme at the end.
 * Colours: text pairs meet WCAG AA (4.5:1) on --gn-color-bg.
 */
:root {
    --gn-color-bg: #ffffff;
    --gn-color-surface: #f5f5f4;
    --gn-color-text: #1c1917;
    --gn-color-muted: #57534e;
    --gn-color-headline: var(--gn-color-text);
    --gn-color-border: #e7e5e4;
    --gn-color-primary: #1f2937;
    --gn-color-on-primary: #ffffff;
    --gn-color-accent: #b91c1c;
    --gn-color-on-accent: #ffffff;
    --gn-color-breaking: #b91c1c;
    --gn-color-on-breaking: #ffffff;

    /* The device's own interface font: nothing to download, so the first paint is the final one.
       A theme or customer that wants a brand font declares it in "fonts" and names it here. */
    --gn-font-sans: ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    --gn-font-serif: ui-serif, Georgia, 'Times New Roman', serif;
    --gn-font-display: var(--gn-font-sans); /* headlines */
    --gn-font-body: var(--gn-font-sans);    /* running text */

    --gn-text-headline: clamp(1.75rem, 1.2rem + 2.2vw, 2.75rem);
    --gn-leading-tight: 1.15;
    --gn-text-body: 1.125rem;   /* running text: 18px reads well on a phone */
    --gn-text-lead: 1.25rem;
    --gn-text-small: 0.875rem;
    --gn-leading-body: 1.7;
    --gn-text-scale: 1;         /* the reader's text-size choice on articles (set by article-tools.js) */

    --gn-color-link: var(--gn-color-accent);

    /* Layout: the page width, the width of a comfortable line of text, and the space around them. */
    --gn-container: 72rem;
    --gn-measure: 44rem;
    --gn-gutter: clamp(1rem, 4vw, 2rem);
    --gn-space-block: 1.25rem;
    --gn-space-section: clamp(1.25rem, 3vw, 2.5rem);

    --gn-radius-sm: 0.25rem;
    --gn-radius-md: 0.5rem;
    --gn-radius-lg: 0.75rem;

    --gn-shadow-card: 0 1px 2px rgb(0 0 0 / 0.06), 0 1px 3px rgb(0 0 0 / 0.1);
    --gn-shadow-raised: 0 0.25rem 1rem rgb(0 0 0 / 0.35); /* a control floating over an image (the play button) */
}

/* Dark mode is P2 (spec §5): values are ready, activated by data-color-scheme="dark" on <html>. */
:root[data-color-scheme='dark'] {
    --gn-color-bg: #0c0a09;
    --gn-color-surface: #1c1917;
    --gn-color-text: #f5f5f4;
    --gn-color-muted: #a8a29e;
    --gn-color-border: #292524;
    --gn-color-primary: #e5e7eb;
    --gn-color-on-primary: #111827;
    --gn-color-accent: #f87171;
    --gn-color-on-accent: #111827;
}

/* customer: surseexterne */
/*
 * Surse Externe: brand tokens from the identity sheet "B · Cadrul" (October 2026).
 * Primary (#15294b, deep navy, 14.5:1 on white) and accent (#a3521a, copper, 5.6:1 on white)
 * come from Branding settings (customer.json); these are the rest.
 */
:root {
    --gn-color-text: #14171c;
    --gn-color-headline: #15294b;
    --gn-color-muted: #4a505a;
    --gn-color-breaking: #a3521a;        /* the copper square of the mark: the one place the accent appears */
    --gn-color-on-breaking: #ffffff;

    --gn-font-display: 'Schibsted Grotesk', 'Helvetica Neue', Arial, sans-serif;   /* headlines and the wordmark */
    --gn-font-body: system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;     /* articles: the system font, for speed */
}

:root[data-color-scheme='dark'] {
    --gn-color-bg: #0f1417;              /* the dark surface of the identity sheet */
}

/* branding settings */
:root {
    --gn-color-primary: #15294b;
    --gn-color-on-primary: #ffffff;
    --gn-color-accent: #a3521a;
    --gn-color-on-accent: #ffffff;
}
