/* ==========================================================================
   tokens.css — design tokens for the redesigned portfolio
   The single source of truth for colour, type, spacing, layout and motion.
   Change a value here and it changes everywhere. Never hard-code a colour,
   size or spacing value in base.css, components.css or a page.

   BREAKPOINTS (custom properties cannot be used inside @media, so these
   values are repeated in base.css / components.css):
     480px  = 30em      small phones and up
     768px  = 48em      tablet and up
     1100px = 68.75em   desktop and up
     1440px = 90em      content max width
   ========================================================================== */

:root {
  /* ---- Colour: raw palette ------------------------------------------- */
  --color-paper: #f2f1ec;        /* background */
  --color-ink: #171717;          /* text, strong lines */
  --color-stone: #a5a39d;        /* decorative only; 2.3:1 on paper, never for text */
  --color-stone-dark: #6b6963;   /* secondary text; 4.9:1 on paper (AA) */
  --color-accent: #d7e34a;       /* highlight only, always with ink text */
  --color-line: #cfccc4;         /* hairlines on paper */
  --color-placeholder: #d9d6ce;  /* empty image areas */

  /* ---- Colour: semantic roles (use these in components) -------------- */
  --bg: var(--color-paper);
  --bg-inverse: var(--color-ink);
  --text: var(--color-ink);
  --text-muted: var(--color-stone-dark);
  --text-inverse: var(--color-paper);
  --text-inverse-muted: var(--color-stone);
  --border: var(--color-line);
  --border-strong: var(--color-ink);
  --highlight: var(--color-accent);

  /* ---- Typography: families ------------------------------------------ */
  --font-sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --font-serif: "Newsreader", Georgia, "Times New Roman", serif;

  /* ---- Typography: sizes (fluid between 390px and 1440px viewports) --- */
  --text-display: clamp(2.75rem, 1.729rem + 4.19vw, 5.5rem);   /* 44 -> 88 */
  --text-h1: clamp(2rem, 1.443rem + 2.29vw, 3.5rem);           /* 32 -> 56 */
  --text-h2: clamp(1.5rem, 1.221rem + 1.14vw, 2.25rem);        /* 24 -> 36 */
  --text-h3: clamp(1.25rem, 1.157rem + 0.38vw, 1.5rem);        /* 20 -> 24 */
  --text-body: clamp(1.0625rem, 1.039rem + 0.1vw, 1.125rem);   /* 17 -> 18 */
  --text-nav: 0.9375rem;                                        /* 15 */
  --text-caption: 0.875rem;                                     /* 14 */
  --text-meta: 0.75rem;                                         /* 12 */

  /* ---- Typography: line height, tracking, weight --------------------- */
  --lh-display: 0.95;
  --lh-h1: 1.05;
  --lh-h2: 1.15;
  --lh-h3: 1.3;
  --lh-body: 1.6;
  --lh-caption: 1.5;
  --lh-meta: 1.3;

  --tracking-display: -0.03em;
  --tracking-h1: -0.025em;
  --tracking-h2: -0.02em;
  --tracking-h3: -0.01em;
  --tracking-meta: 0.08em;

  --weight-regular: 400;
  --weight-medium: 500;
  --weight-semibold: 600;

  --measure: 66ch;               /* comfortable line length for body text */

  /* ---- Spacing scale (8-point rhythm, in rem) ------------------------ */
  --space-1: 0.25rem;   /*   4 */
  --space-2: 0.5rem;    /*   8 */
  --space-3: 1rem;      /*  16 */
  --space-4: 1.5rem;    /*  24 */
  --space-5: 2rem;      /*  32 */
  --space-6: 3rem;      /*  48 */
  --space-7: 4rem;      /*  64 */
  --space-8: 6rem;      /*  96 */
  --space-9: 8rem;      /* 128 */

  /* ---- Layout -------------------------------------------------------- */
  --container-max: 90rem;        /* 1440 */
  --margin: 1.25rem;             /* 20 on mobile; 32 tablet; 64 desktop (see base.css) */
  --gutter: 1.5rem;              /* 24 */
  --cols: 4;                     /* 4 mobile; 8 tablet; 12 desktop (see base.css) */

  /* ---- Lines and shapes (Swiss style: square corners) ----------------- */
  --line-hair: 1px solid var(--border);
  --line-strong: 1px solid var(--border-strong);
  --line-heavy: 2px solid var(--border-strong);
  --radius: 0;

  /* ---- Interaction --------------------------------------------------- */
  --touch-target: 2.75rem;       /* 44px minimum for anything tappable */
  --focus-ring: 2px solid var(--color-ink);
  --focus-offset: 3px;
  --duration-fast: 120ms;
  --duration-base: 200ms;
  --ease: cubic-bezier(0.25, 0.1, 0.25, 1);
}
