/* RELAYKIT tokens: the single source of truth. Re-skin here first.
   Family: paper terminal. Mono-led identity: IBM Plex Mono carries display,
   labels, and code; IBM Plex Sans carries body copy only. */

@font-face {
  font-family: "IBM Plex Mono";
  src: url("../fonts/plex-mono-400.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "IBM Plex Mono";
  src: url("../fonts/plex-mono-600.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "IBM Plex Sans";
  src: url("../fonts/plex-sans-var.woff2") format("woff2");
  font-weight: 100 700;
  font-style: normal;
  font-display: swap;
}

:root {
  /* primitives */
  --paper: #f4f1ea;        /* warm paper ground */
  --paper-2: #ece8de;
  --paper-3: #e2ddd0;
  --carbon: #1a1d1a;       /* carbon ink / terminal ground */
  --carbon-2: #232723;
  --carbon-3: #2d322d;
  --white: #ffffff;
  --phosphor-deep: #0e6b3c;    /* deep green: AA on paper at label sizes */
  --phosphor-bright: #2bd97e;  /* bright green: for carbon surfaces */

  /* semantic (paper theme is the default) */
  --bg: var(--paper);
  --bg-2: var(--paper-2);
  --fg: var(--carbon);
  --muted: #5b6058;
  --line: rgba(26, 29, 26, 0.16);
  --line-strong: rgba(26, 29, 26, 0.55);
  --accent: var(--phosphor-deep);
  --accent-raw: var(--phosphor-bright);
  --term-bg: var(--carbon);
  --term-fg: #d7dcd4;
  --focus: var(--phosphor-deep);

  /* type: mono-led scale. Mono display wants tighter bounds than a
     grotesque; density reads engineered, not shouty. */
  --font-mono: "IBM Plex Mono", "SF Mono", Menlo, monospace;
  --font-sans: "IBM Plex Sans", "Helvetica Neue", Arial, sans-serif;
  --t-display: clamp(1.9rem, 4.6vw, 3.9rem);
  --t-h1: clamp(1.8rem, 4.2vw, 3.4rem);
  --t-h2: clamp(1.4rem, 2.8vw, 2.25rem);
  --t-h3: clamp(1.1rem, 1.8vw, 1.4rem);
  --t-lead: clamp(1.05rem, 1.5vw, 1.3rem);
  --t-body: 1.0625rem;
  --t-small: 0.875rem;
  --t-mono: 0.75rem;
  --t-code: 0.8125rem;
  --lh-tight: 1.08;
  --lh-heading: 1.16;
  --lh-body: 1.6;
  --lh-code: 1.7;
  --track-mono: 0.12em;

  /* space */
  --s-1: 0.25rem;
  --s-2: 0.5rem;
  --s-3: 0.75rem;
  --s-4: 1rem;
  --s-5: 1.5rem;
  --s-6: 2rem;
  --s-7: 3rem;
  --s-8: 4rem;
  --s-9: 6rem;
  --section-pad: clamp(4.5rem, 11vh, 8.5rem);
  --gutter: clamp(1rem, 2.5vw, 1.5rem);
  --edge: clamp(1.25rem, 4vw, 3.5rem);
  --measure: 40rem;
  --max-w: 78rem;

  /* shape + depth */
  --r-1: 4px;
  --r-2: 8px;
  --r-pill: 999px;
  --shadow-term: 0 1px 2px rgba(26, 29, 26, 0.08), 0 12px 32px rgba(26, 29, 26, 0.12);

  /* motion */
  --dur-1: 150ms;
  --dur-2: 320ms;
  --dur-3: 600ms;
  --dur-4: 900ms;
  --ease-out: cubic-bezier(0.19, 1, 0.22, 1);
  --ease-inout: cubic-bezier(0.83, 0, 0.17, 1);

  /* layers */
  --z-header: 40;
  --z-menu: 50;
  --z-skip: 60;
}

/* carbon theme: any wrapper with data-theme="carbon" flips the semantic set */
[data-theme="carbon"] {
  --bg: var(--carbon);
  --bg-2: var(--carbon-2);
  --fg: #e9ece6;
  --muted: #a2a89e;
  --line: rgba(233, 236, 230, 0.16);
  --line-strong: rgba(233, 236, 230, 0.55);
  --accent: var(--phosphor-bright);
  --focus: var(--phosphor-bright);
}
