/* Taxline design tokens. The only file with colour, type, spacing, radius,
   motion and line-geometry values. style.css uses these variables only.

   To change the brand:
   1. Colours: edit the six values in "1. Brand palette". Both themes are
      derived from them in "2. Semantic tokens".
   2. Logo: the approved PNGs are in assets/brand/ and their paths are set
      once in build.py (LOGO). The mark is drawn through a CSS mask filled
      with --brand-mark, which may only be Obsidian or White (brand rules).
   3. Typefaces: edit "3. Type" and the Google Fonts link in build.py.

   Dark is the default theme. <html data-theme="light"> switches to light. */

/* ---------- 1. Brand palette (raw values; not used directly by components) ---------- */
:root {
  --brand-petrol: #0b5563;        /* primary; the Peppol line */
  --brand-petrol-bright: #4fb3c0; /* the petrol line on a dark ground */
  --brand-saffron: #d9a95a;       /* the logo's dot; the Tax Authority line */
  --brand-saffron-deep: #8a5a12;  /* saffron dark enough for text on light */
  --brand-obsidian: #242729;      /* the mark colour (approved brand concept) */
  --brand-ink: var(--brand-obsidian); /* text on light, base of the dark surfaces */
  --brand-paper: #f6f8f7;         /* limestone white */
  --brand-white: #ffffff;         /* the reverse mark colour */
  --brand-ok: #157f4a;
}

/* ---------- 2. Semantic tokens: dark (default) ---------- */
:root {
  --surface: var(--brand-ink);
  --surface-raised: color-mix(in oklab, var(--brand-ink) 88%, var(--brand-petrol-bright));
  --surface-sunken: color-mix(in oklab, var(--brand-ink) 80%, black);
  --surface-band: color-mix(in oklab, var(--brand-ink) 70%, var(--brand-petrol));
  --ink: color-mix(in oklab, var(--brand-paper) 94%, var(--brand-petrol-bright));
  --ink-mute: color-mix(in oklab, var(--brand-paper) 66%, var(--brand-ink));
  --ink-faint: color-mix(in oklab, var(--brand-paper) 60%, var(--brand-ink));
  --rule: color-mix(in oklab, var(--brand-paper) 16%, var(--brand-ink));
  --rule-strong: color-mix(in oklab, var(--brand-paper) 30%, var(--brand-ink));
  --accent: var(--brand-petrol-bright);
  --accent-ink: var(--brand-ink);           /* text on --accent */
  --accent-hover: color-mix(in oklab, var(--brand-petrol-bright) 80%, var(--brand-paper));
  --accent-text: var(--brand-petrol-bright); /* links */
  --line-main: var(--brand-petrol-bright);
  --line-branch: var(--brand-saffron);
  --line-quiet: color-mix(in oklab, var(--brand-petrol-bright) 28%, var(--brand-ink));
  --branch-text: var(--brand-saffron);
  --stop-fill: var(--brand-ink);
  --hub-ring: var(--ink);
  --placeholder-bg: color-mix(in oklab, var(--brand-saffron) 22%, var(--brand-ink));
  --placeholder-ink: var(--brand-saffron);
  --band-bg: var(--brand-petrol);
  --band-ink: var(--brand-white);
  --band-mute: color-mix(in oklab, var(--brand-white) 78%, var(--brand-petrol));
  --band-rule: var(--brand-saffron);
  --logo-ink: var(--ink-mute);
  --focus: var(--brand-saffron);
  --shadow: none;
  --brand-mark: var(--brand-white);           /* reverse mark on dark */
  --photo-tint: var(--brand-petrol);          /* photos are re-tinted with the brand */
  --photo-blend: luminosity;
  --photo-opacity: .9;
  --photo-shade: color-mix(in oklab, var(--brand-ink) 88%, transparent);
  --panel: color-mix(in oklab, var(--brand-ink) 86%, var(--brand-petrol-bright));
  --panel-ink: var(--ink);
  color-scheme: dark;
}

/* ---------- 2b. Semantic tokens: light ---------- */
:root[data-theme="light"] {
  --surface: var(--brand-white);
  --surface-raised: var(--brand-white);
  --surface-sunken: var(--brand-paper);
  --surface-band: color-mix(in oklab, var(--brand-paper) 92%, var(--brand-petrol));
  --ink: var(--brand-ink);
  --ink-mute: color-mix(in oklab, var(--brand-ink) 74%, var(--brand-white));
  --ink-faint: color-mix(in oklab, var(--brand-ink) 70%, var(--brand-white));
  --rule: color-mix(in oklab, var(--brand-petrol) 18%, var(--brand-white));
  --rule-strong: color-mix(in oklab, var(--brand-petrol) 40%, var(--brand-white));
  --accent: var(--brand-petrol);
  --accent-ink: var(--brand-white);
  --accent-hover: color-mix(in oklab, var(--brand-petrol) 80%, var(--brand-ink));
  --accent-text: var(--brand-petrol);
  --line-main: var(--brand-petrol);
  --line-branch: var(--brand-saffron);
  --line-quiet: color-mix(in oklab, var(--brand-petrol) 18%, var(--brand-white));
  --branch-text: var(--brand-saffron-deep);
  --stop-fill: var(--brand-white);
  --hub-ring: var(--brand-ink);
  --placeholder-bg: color-mix(in oklab, var(--brand-saffron) 22%, var(--brand-white));
  --placeholder-ink: var(--brand-saffron-deep);
  --band-bg: color-mix(in oklab, var(--brand-petrol) 75%, var(--brand-ink));
  --band-ink: var(--brand-white);
  --band-mute: color-mix(in oklab, var(--brand-white) 80%, var(--brand-petrol));
  --band-rule: var(--brand-saffron);
  --logo-ink: var(--ink-mute);
  --focus: var(--brand-petrol);
  --brand-mark: var(--brand-obsidian);
  --photo-tint: var(--brand-petrol);
  --photo-blend: luminosity;
  --photo-opacity: .85;
  --photo-shade: color-mix(in oklab, var(--brand-ink) 78%, transparent);
  --panel: var(--brand-ink);                  /* the invoice widget stays dark in both themes */
  --panel-ink: color-mix(in oklab, var(--brand-paper) 94%, var(--brand-petrol-bright));
  color-scheme: light;
}

/* ---------- 3. Type ---------- */
:root {
  --font-latin: "IBM Plex Sans", "IBM Plex Sans Arabic", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-display: "IBM Plex Sans Condensed", "IBM Plex Sans", "IBM Plex Sans Arabic", system-ui, sans-serif;
  --font-arabic: "IBM Plex Sans Arabic", "IBM Plex Sans", "Geeza Pro", Tahoma, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;
  --font-body: var(--font-latin);
  --font-head: var(--font-display);
  --font-twin: var(--font-arabic);      /* the other-language twin of a heading */

  --fs-xs: .8125rem; --fs-sm: .875rem; --fs-md: 1.0625rem; --fs-lg: 1.1875rem;
  --fs-h3: 1.1875rem;
  --fs-h2: clamp(1.9rem, 1.2rem + 2.4vw, 3rem);
  --fs-h1: clamp(2.5rem, 1.3rem + 4.6vw, 4.9rem);
  --fs-page: clamp(2.1rem, 1.3rem + 3vw, 3.6rem);
  --fs-twin: clamp(1.05rem, .9rem + .6vw, 1.4rem);
  --fs-numeral: clamp(4.5rem, 3rem + 5vw, 8rem);
  --lh: 1.6; --lh-head: 1.02; --lh-twin: 1.5;
  --track-head: -.012em;
  --weight-head: 600;
}
[dir="rtl"] {
  --font-body: var(--font-arabic);
  --font-head: var(--font-arabic);
  --font-twin: var(--font-display);
  --fs-md: 1.125rem; --fs-lg: 1.25rem; --fs-h3: 1.25rem;
  --fs-h2: clamp(1.7rem, 1.15rem + 2vw, 2.6rem);
  --fs-h1: clamp(2.1rem, 1.2rem + 3.6vw, 4rem);
  --fs-page: clamp(1.9rem, 1.2rem + 2.6vw, 3.1rem);
  --lh: 1.85; --lh-head: 1.4; --lh-twin: 1.25;
  --track-head: 0;
  --weight-head: 700;
}

/* ---------- 4. Space, size, radius, shadow ---------- */
:root {
  --space-1: 4px; --space-2: 8px; --space-3: 12px; --space-4: 16px; --space-5: 24px;
  --space-6: 32px; --space-7: 48px; --space-8: 64px; --space-9: 96px;
  --section-pad: clamp(64px, 9vw, 128px);
  --wrap: 1240px;
  --gutter: clamp(16px, 4vw, 48px);
  --radius-0: 0; --radius-1: 3px; --radius-pill: 999px;
  --control-h: 50px;
  --logo-h: 42px;          /* header lockup height; never below 16px */
  --logo-clear: calc(var(--logo-h) * .23); /* about a quarter of the mark width */
  --icon: 24px;           /* icon grid: 24 x 24, 1.75 stroke, round caps */
  --icon-stroke: 1.75;
}

/* ---------- 5. Line geometry (the route map, steps, contents list) ---------- */
:root {
  --line: 6px;                         /* thickness of every line */
  --stop: 22px;                        /* stop diameter */
  --stop-r: calc(var(--stop) / 2);     /* stop radius: lines join stop centres */
  --stop-border: 5px;
  --hub: 34px;                         /* interchange diameter */
  --track-h: 34px;                     /* height of a track row; line sits at its centre */
  --branch-drop: 92px;                 /* vertical distance between the two tracks */
  --branch-radius: 34px;               /* the curve where the branch turns */
  --label-gap: 18px;                   /* between a track and its labels */
  --col-pad: 28px;                     /* breathing room at the end of each column */
  --rail: 34px;                        /* mobile: width of each vertical rail column */
  --line-thin: 3px;                    /* feeder lines into the hub */
  --pulse: 13px;                       /* the dot that travels along a line */
  /* integration hub: three source groups, one spine, one junction */
  --hub-head: 28px;                    /* group name row; feeders join at its centre */
  --hub-y: calc(var(--hub-head) / 2);
  --hub-gap: 28px;                     /* between groups */
  --hub-tile-h: 48px;
  --hub-logo: 28px;                    /* logo height in a tile; wide wordmarks get 2x */
  --hub-node: 12px;                    /* small stop where a group's line starts */
  --hub-feed: 44px;                    /* the bracket that gathers the three groups */
  --hub-link: 44px;                    /* the one thick line into Taxline */
  --hub-core: 136px;                   /* the Taxline junction */
  --hub-core-h: 60px;
  --hub-out: 48px;
  --hub-drop: 78px;                    /* branch to the Tax Authority */
  --illo: 64px;                        /* illustration size; same stroke style as icons */
  --illo-stroke: 2;
  --tilt: 1.4deg;                      /* inactive onboarding slips */
  --lift: -6px;
}

/* ---------- 6. Motion ---------- */
:root {
  --ease: cubic-bezier(.6, .05, .3, 1);
  --ease-out: cubic-bezier(.2, .7, .3, 1);
  --dur-1: 160ms;   /* hover, focus, colour */
  --dur-2: 320ms;   /* disclosure, small reveals */
  --dur-3: 900ms;   /* drawing a line */
  --stagger: 220ms; /* between stops on the route map */
  --dur-pulse: 1100ms; /* a pulse travelling one line */
  --dur-cycle: 2600ms; /* time on each source in the hub, each step in demos */
}
@media (prefers-reduced-motion: reduce) {
  :root { --dur-1: 0ms; --dur-2: 0ms; --dur-3: 0ms; --stagger: 0ms; --dur-pulse: 0ms; }
}
