/*
 * InnClocky — typefaces, tokens and base elements.
 *
 * The material of this application is the hour: elapsed, spent, remaining,
 * over. So the type system has two voices. Mulish, a humanist geometric in the
 * Avenir line, carries the language; IBM Plex Mono carries every number, every
 * timestamp and every audited value, so a column of durations reads as a ledger
 * and not as prose that happens to contain digits.
 *
 * The palette is Innobing's: a navy deep enough to read as black, the corporate
 * blue for anything you can act on, the olive green for anything that is
 * running or within budget. Everything else is paper, canvas and hairline.
 *
 * Loaded before layout.css and components.css. Every colour, size and space in
 * the application comes from a custom property declared here.
 */

/* --- Mulish --------------------------------------------------------------- */
/* Self-hosted so nothing is fetched from a CDN at runtime. One variable file  */
/* per subset covers 200 to 1000; latin-ext only downloads if a page needs it. */

@font-face {
  font-family: "Mulish";
  font-style: normal;
  font-weight: 200 1000;
  font-display: swap;
  src: url("/assets/mulish-latin-1e9598fb.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
    U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193,
    U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "Mulish";
  font-style: normal;
  font-weight: 200 1000;
  font-display: swap;
  src: url("/assets/mulish-latin-ext-1de0b930.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF,
    U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020,
    U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* --- IBM Plex Mono -------------------------------------------------------- */
/* Two weights, latin only: this face never sets a sentence, only figures.     */

@font-face {
  font-family: "IBM Plex Mono";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/assets/plex-mono-400-latin-d13bb5b4.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
    U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193,
    U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "IBM Plex Mono";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("/assets/plex-mono-600-latin-0fdd541f.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
    U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193,
    U+2212, U+2215, U+FEFF, U+FFFD;
}

/* --- Tokens --------------------------------------------------------------- */

:root {
  /* Ink. Black with a blue cast, so text and the navy belong to one family. */
  --ink: #0f151c;
  --ink-2: #3d4753;
  --ink-soft: #5f6a76;
  --line: #e4e8e3;
  --line-strong: #ccd3cb;

  /* Surfaces. The canvas is a green-grey, a degree off neutral. */
  --paper: #ffffff;
  --canvas: #f4f6f3;
  --raise: #fafbf8;

  /* Innobing. Blue is what you can act on, green is what is running. */
  --navy: #001b3a;
  --blue: #003571;
  --blue-lift: #1466be;
  --blue-wash: #eaf0f7;
  --green: #62800a;
  --green-lift: #7fa414;
  --green-wash: #eff3e2;
  /* Green dark enough to read as text on the wash. */
  --green-ink: #4c6407;
  --alert: #a12b1f;
  --alert-wash: #f8ece9;

  /* On the navy rail, where the ink tokens cannot reach. */
  --on-navy: #ffffff;
  --on-navy-soft: #9fb2c8;
  --on-navy-line: rgba(255, 255, 255, 0.1);
  --on-navy-hover: rgba(255, 255, 255, 0.06);
  --on-navy-active: rgba(255, 255, 255, 0.1);

  /* 4px grid. Nothing in the application uses a value outside this scale. */
  --s1: 4px;
  --s2: 8px;
  --s3: 12px;
  --s4: 16px;
  --s5: 20px;
  --s6: 24px;
  --s8: 32px;
  --s10: 40px;
  --s12: 48px;
  --s16: 64px;

  --r-sm: 6px;
  --r: 10px;
  --r-lg: 14px;
  --r-full: 999px;
  --border: 1px solid var(--line);

  --font: "Mulish", "Avenir Next", Avenir, -apple-system, "Segoe UI", sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;

  --text-micro: 11px;
  --text-fine: 12px;
  --text-dense: 13px;
  --text-body: 15px;
  --text-lead: 17px;
  --text-heading: 21px;
  --text-title: 27px;
  --text-counter: 52px;

  /* Shadows are for things that genuinely float. Panels get a border. */
  --shadow-sm: 0 1px 2px rgba(15, 21, 28, 0.05);
  --shadow: 0 1px 3px rgba(15, 21, 28, 0.06), 0 10px 28px -14px rgba(15, 21, 28, 0.2);

  --rail: 244px;
  --page-max: 1240px;
}

/* --- Base ----------------------------------------------------------------- */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--canvas);
  color: var(--ink);
  font-family: var(--font);
  font-size: var(--text-body);
  font-weight: 450;
  line-height: 1.5;
  min-width: 320px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1,
h2,
h3 {
  margin: 0;
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

h1 {
  font-size: var(--text-title);
}

h2 {
  font-size: var(--text-heading);
}

h3 {
  font-size: var(--text-lead);
  letter-spacing: -0.01em;
}

p {
  margin: 0 0 var(--s3);
}

a {
  color: var(--blue);
  font-weight: 600;
  text-decoration: none;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
}

a:hover {
  color: var(--blue-lift);
  text-decoration: underline;
}

/* One focus treatment, everywhere, always visible. */
:focus-visible {
  outline: 2px solid var(--blue-lift);
  outline-offset: 2px;
  border-radius: 3px;
}

/* Every figure in the application is set in the mono. Durations line up in
   columns, and a timestamp never gets mistaken for a sentence. */
.tabular {
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
  font-size: 0.94em;
  letter-spacing: -0.01em;
}

/* The label voice: section eyebrows, table heads, stat captions. */
.micro {
  font-size: var(--text-micro);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: var(--ink-soft);
}

.muted {
  color: var(--ink-soft);
}

.dense {
  font-size: var(--text-dense);
}

.nowrap {
  white-space: nowrap;
}

.right {
  text-align: right;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
