/* Koox brand tokens v1 — mirrors tokens.json (the source of truth).
   Load Archivo once per page:
   <link rel="preconnect" href="https://fonts.googleapis.com">
   <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
   <link href="https://fonts.googleapis.com/css2?family=Archivo:wdth,wght@62..125,100..900&display=swap" rel="stylesheet">
   (For production we self-host the variable font from the site; the licence allows it.) */

@property --kx-c1 { syntax: "<color>"; inherits: true; initial-value: #3a342f; }
@property --kx-c2 { syntax: "<color>"; inherits: true; initial-value: #5c524a; }
@property --kx-c3 { syntax: "<color>"; inherits: true; initial-value: #24211f; }

:root {
  color-scheme: dark;

  /* colour */
  --kx-stage: #0a0a0b;
  --kx-surface: #141416;
  --kx-raised: #1c1c1f;
  --kx-line: #26262a;
  --kx-bone: #f2eee6;
  --kx-mute: #9c978f;
  --kx-red: #d7263d;
  --kx-red-soft: rgba(215, 38, 61, .16);
  --kx-red-text: #ff8d98;

  /* matte */
  --kx-grain: .16;
  --kx-vignette: .62;
  --kx-mood-ms: 1600ms;

  /* type */
  --kx-font: "Archivo", system-ui, sans-serif;
  --kx-display-weight: 900;
  --kx-display-stretch: 125%;
  --kx-display-tracking: -.025em;
  --kx-text-stretch: 68%;
  --kx-size-hero: clamp(40px, 7vw, 96px);
  --kx-size-h1: clamp(34px, 4.6vw, 56px);
  --kx-size-h2: clamp(28px, 3.4vw, 42px);
  --kx-size-h3: clamp(22px, 2.2vw, 28px);
  --kx-size-lede: clamp(18px, 1.4vw, 20px);
  --kx-size-body: 16px;
  --kx-size-caption: 17px;
  --kx-size-small: 14px;
  --kx-size-label: 13px;

  /* space, radius */
  --kx-s1: 4px; --kx-s2: 8px; --kx-s3: 12px; --kx-s4: 16px; --kx-s5: 24px;
  --kx-s6: 32px; --kx-s7: 48px; --kx-s8: 64px; --kx-s9: 96px; --kx-s10: 128px;
  --kx-r-sm: 8px; --kx-r-md: 14px; --kx-r-lg: 18px; --kx-r-pill: 999px; --kx-r-icon: 28px;
  --kx-tap: 44px;

  /* motion */
  --kx-spring: cubic-bezier(.34, 1.56, .64, 1);
  --kx-glide: cubic-bezier(.7, 0, .2, 1);
  --kx-out: cubic-bezier(.2, .7, .2, 1);
  --kx-t-press: 80ms; --kx-t-tap: 500ms; --kx-t-pop: 700ms; --kx-t-lift: 600ms;
  --kx-t-aperture: 900ms; --kx-t-intro: 2000ms;
}

/* moods (Smoke is the platform default) */
:root, [data-mood="smoke"] { --kx-c1: #3a342f; --kx-c2: #5c524a; --kx-c3: #24211f; }
[data-mood="ember"]        { --kx-c1: #5a2622; --kx-c2: #8a4630; --kx-c3: #3a2a26; }
[data-mood="tide"]         { --kx-c1: #173a46; --kx-c2: #2f5a6e; --kx-c3: #1d2a33; }
:root, [data-mood] { transition: --kx-c1 var(--kx-mood-ms) ease, --kx-c2 var(--kx-mood-ms) ease, --kx-c3 var(--kx-mood-ms) ease; }

/* type roles */
.kx-hero, .kx-h1, .kx-h2, .kx-h3 {
  font-family: var(--kx-font); font-weight: var(--kx-display-weight);
  font-stretch: var(--kx-display-stretch); letter-spacing: var(--kx-display-tracking);
  line-height: .95; text-wrap: balance; margin: 0;
}
.kx-hero { font-size: var(--kx-size-hero); }
.kx-h1 { font-size: var(--kx-size-h1); line-height: 1; }
.kx-h2 { font-size: var(--kx-size-h2); line-height: 1; }
.kx-h3 { font-size: var(--kx-size-h3); line-height: 1.02; letter-spacing: -.02em; }
.kx-text { font-family: var(--kx-font); font-stretch: var(--kx-text-stretch); font-size: var(--kx-size-body); line-height: 1.55; }
.kx-lede { font-family: var(--kx-font); font-stretch: var(--kx-text-stretch); font-size: var(--kx-size-lede); line-height: 1.4; }
.kx-label { font-family: var(--kx-font); font-stretch: var(--kx-text-stretch); font-weight: 600; font-size: var(--kx-size-label); letter-spacing: .04em; }
.kx-caps { font-family: var(--kx-font); font-stretch: var(--kx-text-stretch); font-weight: 500; font-size: var(--kx-size-label); letter-spacing: .18em; text-transform: uppercase; }

@media (prefers-reduced-motion: reduce) {
  :root { --kx-mood-ms: 0ms; }
}
