/* CHAINSOFT design tokens (v2). Meaning and rules: DESIGN.md sections 2 to 5. */

@font-face {
  font-family: "Mona Sans";
  src: url("/assets/fonts/mona-sans-latin-var.woff2") format("woff2");
  font-weight: 200 900;
  font-stretch: 75% 125%;
  font-style: normal;
  font-display: swap;
  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";
  src: url("/assets/fonts/geist-mono-latin-var.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Noto Kufi Arabic";
  src: url("/assets/fonts/noto-kufi-arabic-var.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0020, U+00A0, U+0600-06FF, U+0750-077F, U+0870-0891, U+0897-08E1, U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FE74, U+FE76-FEFC;
}

:root {
  color-scheme: dark;

  /* Colour */
  --void: #05060a;
  --ink-900: #090b11;
  --ink-800: #0f121a;
  --ink-700: #181c27;
  --ink-600: #262c3a;
  --mute-dark: #9aa3b5;
  --paper: #f3f5fa;
  --paper-ink: #4a5163;
  --electric-700: #1a2fd6;
  --electric: #2e4bff;
  --azure: #3fa9ff;
  --aqua: #2ee6d6;
  --lime: #d4ff3f;
  --white: #f7f8fc;
  --on-electric-dim: rgb(247 248 252 / 0.9);
  --line-dark: rgb(247 248 252 / 0.14);
  --line-paper: rgb(9 11 17 / 0.14);
  --grad-signal: linear-gradient(100deg, #8fb0ff 0%, var(--aqua) 45%, var(--lime) 100%);

  /* Type */
  --font: "Mona Sans", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "Geist Mono", ui-monospace, "SF Mono", Menlo, monospace;
  --fs-display: clamp(2.75rem, 8.6vw, 8.5rem);
  --fs-title: clamp(2.25rem, 6.2vw, 6rem);
  --fs-marquee: clamp(4rem, 13vw, 13rem);
  --fs-card-title: clamp(2rem, 4.6vw, 4.5rem);
  --fs-statement: clamp(1.75rem, 3.6vw, 3.5rem);
  --fs-lead: clamp(1.125rem, 1.5vw, 1.375rem);
  --fs-body: 1rem;
  --fs-label: 0.78125rem;
  --fs-small: 0.875rem;
  --stretch-wide: 112.5%;
  --stretch-xwide: 125%;

  /* Space */
  --s-1: 4px;
  --s-2: 8px;
  --s-3: 12px;
  --s-4: 16px;
  --s-5: 24px;
  --s-6: 32px;
  --s-7: 48px;
  --s-8: 64px;
  --s-9: 96px;
  --s-10: 128px;
  --s-11: 160px;
  --frame: 8px;
  --gutter: max(20px, 4vw);
  --section-pt: clamp(56px, 6.7vw, 96px);
  --section-pb: clamp(48px, 5vw, 72px);
  --col-gap: clamp(16px, 2vw, 32px);
  --content-max: 1600px;
  --radius-card: 16px;
  --radius-inner: 12px;
  --radius-pill: 999px;
  --nav-h: 64px;
  --nav-top: 16px;

  /* Motion */
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-out-quart: cubic-bezier(0.25, 1, 0.5, 1);
  --ease-ui: cubic-bezier(0.165, 0.84, 0.44, 1);
  --ease-in-out: cubic-bezier(0.45, 0, 0.55, 1);
  --ease-roll: cubic-bezier(0.65, 0, 0.35, 1);
  --dur-line: 1100ms;
  --dur-rise: 830ms;
  --dur-ui: 400ms;
  --dur-press: 160ms;
  --stagger: 70ms;

  /* Layers */
  --z-hovercard: 40;
  --z-nav: 50;
  --z-menu: 60;
  --z-skip: 100;
}

/* Arabic pages: Kufi first, Latin glyphs fall back to Mona Sans. */
:root[lang="ar"] {
  --font: "Noto Kufi Arabic", "Mona Sans", ui-sans-serif, system-ui, sans-serif;
  --font-mono: "Noto Kufi Arabic", "Geist Mono", ui-monospace, monospace;
}

@media (min-width: 900px) {
  :root {
    --nav-top: 24px;
  }
}

@media (min-width: 1440px) {
  :root {
    --fs-body: 1.0625rem;
  }
}
