/* anjula.dev design tokens
   Canonical source: https://anjula.dev/design/tokens.css
   The system is documented in DESIGN.md. Copy this file into a project, or link
   it, then style from the custom properties rather than from raw colours. */

:root {
  color-scheme: light;

  /* Surfaces */
  --paper: #faf8f3;
  --card: #ffffff;
  --wash: #f4f2ec;
  --hair: #f0ede4;
  --line: #dfdbd0;

  /* Ambient wash (DESIGN.md): the signature page background. Two very soft
     glows over the paper, clay from the top-left and moss from the top-right.
     The glow tokens reference the palette, so .dark remaps them with no second
     definition. Apply --wash-ambient as the page's background-image, fixed. */
  --wash-glow-clay: color-mix(in srgb, var(--clay) 5%, transparent);
  --wash-glow-moss: color-mix(in srgb, var(--moss) 4%, transparent);
  --wash-ambient:
    radial-gradient(900px 480px at 8% -10%, var(--wash-glow-clay), transparent 62%),
    radial-gradient(760px 420px at 92% -4%, var(--wash-glow-moss), transparent 58%);

  /* Ink */
  --ink: #44403a;
  --ink-700: #5f5a51;
  --ink-500: #767064;
  --ink-400: #948e80;

  /* Accents */
  --clay: #c1603c;
  --clay-strong: #9e4a2d;
  --clay-soft: #e7966e;
  --moss: #78876a;
  --positive: #157a58;
  --negative: #b3323f;
  --gold: #8a6309;

  /* Type */
  --font-serif: 'Source Serif 4', 'Iowan Old Style', Georgia, 'Times New Roman', serif;
  --font-ui: Inter, ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  --text-xs: 0.75rem;
  --text-sm: 0.875rem;
  --text-base: 1rem;
  --text-reading: 1.125rem;
  --text-xl: 1.25rem;
  --text-2xl: 1.5rem;
  --text-4xl: 2.25rem;
  --text-6xl: 3.75rem;

  --leading-tight: 1.15;
  --leading-snug: 1.35;
  --leading-normal: 1.6;
  /* Reading text is 1.125rem on a 1.75rem line, the blog's accepted metric. */
  --leading-reading: 1.75rem;

  /* Layout. The blog is the reference: 80rem content area, wide gutters. */
  --container: 80rem;
  --measure: 65ch;
  --gutter: 1.5rem;

  /* Space, 4px scale */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.25rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;
  --space-16: 4rem;
  --space-20: 5rem;

  /* Shape */
  --radius-sm: 0.375rem;
  --radius: 0.625rem;
  --radius-lg: 0.875rem;
  --radius-card: 0.875rem;
  --radius-full: 9999px;

  /* One soft shadow, for a raised app card. The blog uses none. */
  --shadow-card: 0 1px 2px rgb(28 27 23 / 0.04), 0 8px 24px -12px rgb(28 27 23 / 0.08);

  /* Motion */
  --ease: cubic-bezier(0.4, 0, 0.2, 1);
  --ease-reveal: cubic-bezier(0.22, 1, 0.36, 1);
  --dur-fast: 150ms;
  --dur: 240ms;
}

@media (min-width: 640px) {
  :root {
    --gutter: 3.5rem;
  }
}

@media (min-width: 768px) {
  :root {
    --gutter: 6rem;
  }
}

@media (min-width: 1024px) {
  :root {
    --gutter: 8rem;
  }
}

.dark {
  color-scheme: dark;

  --paper: #282622;
  --card: #2f2d29;
  --wash: #33312c;
  --hair: #3a3833;
  --line: #5b564c;

  --ink: #f4f2ec;
  --ink-700: #cdc8bb;
  --ink-500: #948e80;
  --ink-400: #767064;

  --clay: #e7966e;
  --clay-strong: #d97757;
  --clay-soft: #c1603c;
  --moss: #98a688;
  --positive: #6cc4a1;
  --negative: #e08d92;
  --gold: #d3b45c;
}

/* The shell every project should share. */
.shell {
  margin-inline: auto;
  max-width: var(--container);
  padding-inline: var(--gutter);
}

.measure {
  max-width: var(--measure);
}

/* The signature page background: paper plus the ambient wash. Apply to the page
   element (body or the app shell). */
.ambient {
  background-color: var(--paper);
  background-image: var(--wash-ambient);
  background-attachment: fixed;
  background-repeat: no-repeat;
}

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