/* munch design system (Figma: "Crunch · Design system", node 225:2).
   Shared by the landing page and the dashboard: fonts, colour tokens, focus, and the Button component.
   Page layout lives in each page's own stylesheet. */

/* ---------- Fonts (self-hosted, OFL; see fonts/LICENSE-*.txt) ---------- */
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url("fonts/inter-latin-wght-normal.woff2") format("woff2-variations");
  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: "Inter";
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url("fonts/inter-latin-ext-wght-normal.woff2") format("woff2-variations");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, 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;
}
@font-face {
  font-family: "Newsreader";
  font-style: normal;
  font-display: swap;
  font-weight: 200 800;
  src: url("fonts/newsreader-latin-opsz-normal.woff2") format("woff2-variations");
  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: "Newsreader";
  font-style: normal;
  font-display: swap;
  font-weight: 200 800;
  src: url("fonts/newsreader-latin-ext-opsz-normal.woff2") format("woff2-variations");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, 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;
}
@font-face {
  font-family: "Geist";
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url("fonts/geist-latin-wght-normal.woff2") format("woff2-variations");
  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: "Geist";
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url("fonts/geist-latin-ext-wght-normal.woff2") format("woff2-variations");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, 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;
}
@font-face {
  font-family: "Geist Mono";
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url("fonts/geist-mono-latin-wght-normal.woff2") format("woff2-variations");
  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: "Geist Mono";
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url("fonts/geist-mono-latin-ext-wght-normal.woff2") format("woff2-variations");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, 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;
}

/* ---------- Tokens: the "Colour" swatches, named as in Figma ---------- */
:root {
  --ds-ink: #111827;
  --ds-night: #0a0b0f;
  --ds-muted: #787572;
  --ds-subtle: #a8a49f;
  --ds-chip: #f3f2f0;
  --ds-paper: #ffffff;
  --ds-violet: #5b3fe0;
  --ds-deep-violet: #2e1a92;
  --ds-dusk-navy: #141846;
  --ds-dusk-plum: #50288c;
  --ds-dusk-magenta: #be4696;
  --ds-dusk-coral: #ff8c78;
  --ds-pink: #ff9fb0;
  --ds-teal: #7fd3cc;

  /* Component colours that are not swatches (button hover states). */
  --ds-ink-hover: #2a3142;
  --ds-chip-hover: #e8e6e3;
  --ds-violet-hover: #4a31c9;
  --ds-line-strong: rgba(16, 19, 33, 0.15);

  --ds-font-sans: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --ds-font-serif: "Newsreader", ui-serif, Georgia, "Times New Roman", serif;
  --ds-font-brand: "Geist", var(--ds-font-sans);
  --ds-font-mono: "Geist Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  --ds-focus: 0 0 0 2px var(--ds-paper), 0 0 0 4px var(--ds-violet);
}

/* ---------- Button (component 226:115) ----------
   Style: .btn--primary | --secondary | --outline | --accent | --on-dark | --ghost
   Size:  .btn--s (28) | .btn--m (32, default) | .btn--l (40)
   State: :hover, and disabled via the `disabled` attribute or aria-disabled="true". */
.btn {
  --btn-h: 32px;
  --btn-px: 12px;
  --btn-fs: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
  height: var(--btn-h);
  padding: 0 var(--btn-px);
  border: 1px solid transparent;
  border-radius: 0;
  background: transparent;
  color: var(--ds-ink);
  font-family: var(--ds-font-sans);
  font-size: var(--btn-fs);
  font-weight: 400;
  line-height: 1;
  letter-spacing: -0.015em;
  white-space: nowrap;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 120ms ease, color 120ms ease;
}
.btn--s {
  --btn-h: 28px;
  --btn-px: 10px;
  --btn-fs: 13px;
}
.btn--m {
  --btn-h: 32px;
  --btn-px: 12px;
  --btn-fs: 14px;
}
.btn--l {
  --btn-h: 40px;
  --btn-px: 18px;
  --btn-fs: 15px;
}

.btn--primary {
  background: var(--ds-ink);
  color: var(--ds-paper);
}
.btn--primary:hover {
  background: var(--ds-ink-hover);
}

.btn--secondary {
  background: var(--ds-chip);
  color: var(--ds-ink);
}
.btn--secondary:hover {
  background: var(--ds-chip-hover);
}

.btn--outline {
  border-color: var(--ds-line-strong);
  color: var(--ds-ink);
  font-family: var(--ds-font-mono);
  font-size: calc(var(--btn-fs) - 2px); /* 11 / 12 / 13 */
  letter-spacing: 0.02em;
  text-transform: uppercase;
}
.btn--outline:hover {
  background: var(--ds-chip);
}

.btn--accent {
  background: var(--ds-violet);
  color: var(--ds-paper);
}
.btn--accent:hover {
  background: var(--ds-violet-hover);
}

.btn--on-dark {
  background: var(--ds-paper);
  color: var(--ds-ink);
}
.btn--on-dark:hover {
  background: var(--ds-chip);
}

.btn--ghost:hover {
  background: var(--ds-chip);
}

/* Disabled: 45% opacity, text at 40% (as drawn in every Disabled variant). */
.btn:disabled,
.btn[aria-disabled="true"] {
  opacity: 0.45;
  cursor: not-allowed;
  pointer-events: none;
}
.btn--primary:disabled,
.btn--primary[aria-disabled="true"],
.btn--accent:disabled,
.btn--accent[aria-disabled="true"] {
  color: rgba(255, 255, 255, 0.4);
}
.btn--secondary:disabled,
.btn--secondary[aria-disabled="true"],
.btn--outline:disabled,
.btn--outline[aria-disabled="true"],
.btn--on-dark:disabled,
.btn--on-dark[aria-disabled="true"],
.btn--ghost:disabled,
.btn--ghost[aria-disabled="true"] {
  color: rgba(17, 24, 39, 0.4);
}

.btn:focus-visible {
  outline: none;
  box-shadow: var(--ds-focus);
}

@media (prefers-reduced-motion: reduce) {
  .btn {
    transition: none;
  }
}
