/* ==========================================================================
   Feres Journal — design tokens
   Colours sampled from brand/brand-chart.png. Every colour, font, space and
   motion value used by the site lives here.
   ========================================================================== */

/* Fonts, self-hosted. Hanken Grotesk carries Latin, IBM Plex Sans Arabic
   carries Arabic. unicode-range lets the browser pick per character, so one
   font stack handles mixed titles. */
@font-face {
  font-family: "Hanken Grotesk";
  src: url("/assets/fonts/hanken-grotesk-latin.woff2") format("woff2");
  font-weight: 400 600;
  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: "Hanken Grotesk";
  src: url("/assets/fonts/hanken-grotesk-latin-ext.woff2") format("woff2");
  font-weight: 400 600;
  font-display: swap;
  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-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: "IBM Plex Sans Arabic";
  src: url("/assets/fonts/plex-arabic-300.woff2") format("woff2");
  font-weight: 300;
  font-display: swap;
  unicode-range: 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;
}

@font-face {
  font-family: "IBM Plex Sans Arabic";
  src: url("/assets/fonts/plex-arabic-400.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
  unicode-range: 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;
}

@font-face {
  font-family: "IBM Plex Sans Arabic";
  src: url("/assets/fonts/plex-arabic-700.woff2") format("woff2");
  font-weight: 700;
  font-display: swap;
  unicode-range: 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;
}

/* Amiri, a classical naskh, for the Arabic quotes on the coming soon page.
   Subset to the Arabic letters, harakat and digits (fontTools) to stay small. */
@font-face {
  font-family: "Amiri";
  src: url("/assets/fonts/amiri-400-arabic.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
  unicode-range: 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: light;

  /* Colour */
  --paper: #e0ddd1;
  --paper-raised: #ebe8de;    /* floating cards and pills, one step lighter */
  --shadow: rgb(60 40 20 / 0.45);  /* warm, only under floating cards */
  --tomato: #be3f27;          /* large text only on paper (3.9:1) */
  --mustard: #c89f21;         /* the dot; never text */
  --ink: #18170e;             /* ~14:1 on paper */
  --on-tomato: #f7f3e8;       /* ~4.7:1 on tomato, AA at any size */
  --muted: #5e5b52;           /* chart grey #7a776d darkened to pass AA (~5:1) */
  --halftone: #928f85;
  --rule: rgb(24 23 14 / 0.16);
  --rule-strong: rgb(24 23 14 / 0.42);
  --rule-on-tomato: rgb(247 243 232 / 0.45);

  /* Type */
  --font-sans: "Hanken Grotesk", "IBM Plex Sans Arabic", system-ui, sans-serif;
  --font-naskh: "Amiri", "IBM Plex Sans Arabic", serif;
  --weight-light: 300;
  --weight-regular: 400;
  --weight-medium: 500;
  --weight-semibold: 600;
  --weight-bold: 700;

  --text-2xs: 0.625rem;                                         /* 10px */
  --text-xs: 0.8125rem;                                         /* 13px */
  --text-sm: 0.9375rem;                                         /* 15px */
  --text-base: 1.0625rem;                                       /* 17px */
  --text-input: max(1rem, 16px);                                /* never below 16px: iOS zooms */
  --text-lg: clamp(1.1875rem, 1.1rem + 0.4vw, 1.375rem);
  --text-xl: clamp(1.375rem, 1.15rem + 1vw, 1.75rem);
  --text-2xl: clamp(1.875rem, 1.3rem + 2.6vw, 3rem);
  --text-hero: clamp(2.5rem, 1.2rem + 5vw, 5.25rem);
  --text-wordmark: clamp(1.375rem, 1.15rem + 1vw, 1.875rem);

  --leading-tight: 1.2;
  --leading-snug: 1.4;
  --leading-body: 1.7;        /* Arabic needs the extra room */
  --tracking-wordmark: -0.015em;
  --tracking-vertical: 0.2em;

  /* Space */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.5rem;
  --space-6: 2rem;
  --space-7: 3rem;
  --space-8: 4rem;
  --space-9: 6rem;
  --space-10: 8rem;
  --gutter: clamp(1rem, 0.6rem + 2vw, 2.5rem);
  --measure: 75rem;
  --tap: 44px;

  /* Shape */
  --radius-pill: 999px;
  --border-thin: 1px;
  --border-mark: 1.5px;
  --focus-ring: 2px;

  /* Hero geometry, proportions measured from the chart (circle = 64% of width
     there). Everything in the hero scales off --circle. */
  --circle: min(68vw, 34rem, 62vh);
  --dot-size: 0.118;          /* × circle */
  --dot-offset: -0.16;        /* × circle, outward from the circle's edge */

  /* Motion */
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --dur-press: 160ms;
  --dur-color: 150ms;
  --dur-hero: 700ms;
  --dur-hero-line: 400ms;
  --dur-hero-dot: 600ms;
  --dur-fade: 250ms;
}

@supports (height: 1svh) {
  :root {
    --circle: min(68vw, 34rem, 62svh);
  }
}

@media (min-width: 40em) {
  :root {
    --dot-offset: -0.2;       /* the chart's exact position, once there is room */
  }
}
