/* Hallmark · route: custom (bespoke) · structure: a manga chapter, sections as pages of panels
 * idea: "the word mouths its own name off-beat" — ink, paper, screentone; no colour at all
 * paper: oklch(95.8% 0.007 95) · ink: oklch(19% 0.005 95) · accent: none (ink is the accent)
 * display: Dela Gothic One · lettering + body: Shantell Sans
 * axes: light / display-heavy / neutral · gates: all-pass · studied: no
 */

@font-face {
  font-family: "Dela Gothic One";
  src: url("assets/fonts/dela-gothic-one-subset.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Shantell Sans";
  src: url("assets/fonts/shantell-sans-latin.woff2") format("woff2");
  font-weight: 400 800;
  font-style: normal;
  font-display: swap;
}

/* While Dela Gothic One loads, headings are set in Arial Black scaled to Dela's width and
 * line metrics (measured: 103.6% wider, ascent 1160 / descent 288 per 1000). */
@font-face {
  font-family: "Dela Fallback";
  src: local("Arial Black"), local("ArialBlack"), local("Arial-Black");
  size-adjust: 103.6%;
  ascent-override: 112%;
  descent-override: 27.8%;
  line-gap-override: 0%;
}

/* While Shantell Sans loads, text is set in Trebuchet MS scaled to Shantell's width and line
 * metrics (measured: 107.3% wider, ascent 1020 / descent 320 per 1000), so the swap moves nothing. */
@font-face {
  font-family: "Shantell Fallback";
  src: local("Trebuchet MS"), local("TrebuchetMS");
  size-adjust: 107.3%;
  ascent-override: 95.1%;
  descent-override: 29.8%;
  line-gap-override: 0%;
}

:root {
  /* Paper and ink. Every grey on the page is made of ink dots, not flat grey. */
  --color-paper: oklch(95.8% 0.007 95);
  --color-paper-2: oklch(92.5% 0.008 95);
  --color-ink: oklch(19% 0.005 95);
  --color-ink-soft: oklch(40% 0.005 95);
  --color-pencil: oklch(62% 0.005 95);
  --color-focus: var(--color-ink);

  /* Screentone: dot colour on transparent, tiled. Three densities like real tone sheets. */
  --tone-1: radial-gradient(circle, var(--color-ink) 0.9px, transparent 1.25px) 0 0 / 6px 6px;
  --tone-2: radial-gradient(circle, var(--color-ink) 1.45px, transparent 1.85px) 0 0 / 6px 6px;
  --tone-3: radial-gradient(circle, var(--color-ink) 2.3px, transparent 2.75px) 0 0 / 6px 6px;
  /* line tone (斜線): diagonal hatching, for backgrounds behind panels */
  --tone-lines: repeating-linear-gradient(-45deg, var(--color-ink) 0 1.2px, transparent 1.2px 5.5px);

  --font-display: "Dela Gothic One", "Dela Fallback", "Arial Black", system-ui, sans-serif;
  --font-letter: "Shantell Sans", "Shantell Fallback", "Trebuchet MS", system-ui, sans-serif;

  /* Major third, 16px base */
  --text-xs: 0.8rem;
  --text-sm: 0.9rem;
  --text-base: 1.0625rem;
  --text-md: 1.25rem;
  --text-lg: 1.5625rem;
  --text-xl: 1.9531rem;
  --text-2xl: clamp(1.9rem, 1.6vw + 1.2rem, 2.6rem);
  --text-3xl: clamp(2.3rem, 2.6vw + 1.2rem, 3.6rem);
  --text-display: clamp(2.6rem, 4.2vw + 1rem, 5.2rem);

  --space-3xs: 0.125rem;
  --space-2xs: 0.25rem;
  --space-xs: 0.5rem;
  --space-sm: 0.75rem;
  --space-md: 1rem;
  --space-lg: 1.5rem;
  --space-xl: 2.5rem;
  --space-2xl: 4rem;
  --space-3xl: 6rem;
  --space-4xl: 9rem;

  /* Panel language: ruled borders, white gutters, hard print offsets (no blur) */
  --rule-panel: 3px;
  --rule-thin: 2px;
  --gutter: var(--space-md);
  --offset: 5px;
  --radius-none: 0;

  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in: cubic-bezier(0.7, 0, 0.84, 0);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
  --ease-pop: cubic-bezier(0.34, 1.56, 0.64, 1); /* speech bubbles only */
  --dur-micro: 120ms;
  --dur-short: 220ms;
  --dur-long: 420ms;

  --z-base: 1;
  --z-raised: 10;
  --z-sticky: 200;
  --z-modal: 400;
}
