/* tokens.css — Designer. Alpina Treuhand: SWISS PRECISION. Calm, exact, trustworthy.
   Palette: warm off-white paper, graphite ink, dark alpine-slate bands, ONE glacier-blue accent #0b5fa5.
   Swiss red (#c8102e) is a rare highlight and the error colour only. All text pairs AA (see notes).
   Type: system Helvetica-style sans, tight and large for display; monospace tabular figures for CHF, VAT, invoices.
   Texture: hairline ledger rules and a faint grid from CSS gradients only. No images.
   Motion: one easing, 400-900 ms, 60 ms stagger; transform/opacity/filter only; reduced motion shows everything. */
:root {
  /* palette */
  --bg: #faf9f6;
  --surface: #ffffff;
  --surface-2: #f0eee8;
  --text: #1b1f24;            /* graphite */
  --text-muted: #565d66;
  --line: #dcd8cd;            /* hairlines (decor) */
  --field-line: #6b7480;      /* form field borders, >= 3:1 on --bg, --surface and --surface-2 */
  --dark: #17222e;            /* alpine-slate band */
  --dark-2: #20303f;
  --on-dark: #f5f4f0;
  --on-dark-muted: #b4bfcb;
  --accent: #0b5fa5;          /* glacier blue */
  --accent-strong: #08487d;
  --accent-soft: #e1edf8;
  --accent-on-dark: #7fc0f5;
  --on-accent: #ffffff;
  --swiss-red: #c8102e;       /* rare highlight (a small cross, a key figure), never body text */
  --success: #17653f;
  --danger: #b00020;
  --warn-bg: #fdf1c9;
  --warn-text: #4d3a00;
  --focus: #0b4fd1;
  --focus-on-dark: #ffd24a;
  /* supporting tints for sample charts and status chips (use with a text label) */
  --sun: #f2c14e; --sun-ink: #6b4d00;
  --ocean: #2f7fc1; --ocean-ink: #0b5fa5;
  --palm: #2e8b57; --palm-ink: #17653f;
  --violet: #6a5acd; --violet-ink: #4a3ca8;

  /* type */
  --font-sans: "Helvetica Neue", Helvetica, Arial, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-display: "Helvetica Neue", Helvetica, Arial, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  --fs-xs: .8125rem;
  --fs-sm: .9375rem;
  --fs-base: 1.0625rem;
  --fs-lg: clamp(1.2rem, 1rem + .8vw, 1.5rem);
  --fs-step: clamp(1.5rem, 1.05rem + 1.8vw, 2.6rem);
  --fs-h2: clamp(2rem, 1.1rem + 3.8vw, 4.5rem);
  --fs-h1: clamp(2.6rem, 1.2rem + 6.6vw, 7rem);
  --fs-giant: clamp(5rem, 2rem + 16vw, 16rem);
  --lh-tight: 1;
  --lh-snug: 1.18;
  --lh-body: 1.6;
  --track-display: -.04em;
  --track-h2: -.03em;
  --track-label: .12em;
  --measure: 65ch;

  /* spacing, shape, depth: square-ish, hairline borders, soft quiet shadow */
  --space-1: .25rem; --space-2: .5rem; --space-3: .75rem; --space-4: 1rem;
  --space-5: 1.5rem; --space-6: 2rem; --space-7: 3rem; --space-8: 4.5rem;
  --section: clamp(5rem, 12vw, 10rem);
  --gutter: clamp(1.25rem, 5vw, 4rem);
  --radius-sm: .25rem; --radius: .5rem; --radius-lg: .75rem; --radius-pill: 999px;
  --border: 1px solid var(--line);
  --rule: 1px solid var(--line);
  --shadow-sm: 0 1px 2px rgba(23, 34, 46, .06);
  --shadow: 0 1px 2px rgba(23, 34, 46, .05), 0 10px 30px rgba(23, 34, 46, .07);
  --shadow-lg: 0 24px 60px rgba(23, 34, 46, .14);
  --glow: radial-gradient(55% 60% at 50% 35%, rgba(11, 95, 165, .14), transparent 70%);
  --gradient-text: linear-gradient(100deg, #08487d 0%, #0b5fa5 60%, #2f7fc1 100%);
  --gradient-text-dark: linear-gradient(100deg, #7fc0f5 0%, #ffffff 60%, #7fc0f5 100%);

  /* CSS-only accents */
  --ledger: repeating-linear-gradient(180deg, transparent 0 2.2rem, rgba(27, 31, 36, .07) 2.2rem calc(2.2rem + 1px));
  --grid: linear-gradient(rgba(27, 31, 36, .05) 1px, transparent 1px) 0 0 / 2.5rem 2.5rem,
          linear-gradient(90deg, rgba(27, 31, 36, .05) 1px, transparent 1px) 0 0 / 2.5rem 2.5rem;
  --grid-dark: linear-gradient(rgba(255, 255, 255, .06) 1px, transparent 1px) 0 0 / 2.5rem 2.5rem,
               linear-gradient(90deg, rgba(255, 255, 255, .06) 1px, transparent 1px) 0 0 / 2.5rem 2.5rem;

  /* motion */
  --ease: cubic-bezier(.2, .7, .2, 1);
  --dur-fast: 400ms;
  --dur: 600ms;
  --dur-slow: 900ms;
  --stagger: 60ms;
  --rise: 1rem;
  --blur-in: 4px;
}

@media (prefers-reduced-motion: reduce) {
  :root { --dur-fast: 0ms; --dur: 0ms; --dur-slow: 0ms; --stagger: 0ms; --rise: 0; --blur-in: 0; }
}

/* ---- vocabulary any page can use (all visible without JS) ---- */
.text-gradient {
  background: var(--gradient-text);
  background-size: 200% 100%;
  -webkit-background-clip: text; background-clip: text;
  color: transparent; -webkit-text-fill-color: transparent;
}
.band--dark .text-gradient { background-image: var(--gradient-text-dark); }
.glow { background-image: var(--glow); }
.grid { background-image: var(--grid); }
.band--dark.grid, .band--dark .grid { background-image: var(--grid-dark); }
.ledger { background-image: var(--ledger); }
.label, .eyebrow {
  font-family: var(--font-mono); font-size: var(--fs-xs); letter-spacing: var(--track-label);
  text-transform: uppercase; color: var(--text-muted);
}
.band--dark .label, .band--dark .eyebrow { color: var(--on-dark-muted); }
.num, .mono, .chf { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }
.chf { text-align: right; white-space: nowrap; }
.swiss-cross {                         /* tiny Swiss-red cross, CSS only */
  display: inline-block; width: 1em; height: 1em; background:
    linear-gradient(var(--on-accent), var(--on-accent)) center / 60% 18% no-repeat,
    linear-gradient(var(--on-accent), var(--on-accent)) center / 18% 60% no-repeat, var(--swiss-red);
  border-radius: 2px; vertical-align: -.12em;
}

/* keyboard focus stays visible on the dark bands and footer */
.band--dark, .site-footer { --focus: var(--focus-on-dark); }
