/*
  v3/tokens.css - the page's tokens: the kit's names (../assets/system.css, ../assets/motion/motion.css) with this
  direction's values, then the ones it adds. Link it after the kit and before dp.css. The scene (scene.js) reads its
  colours from the --scene-* tokens; no colour is written anywhere else.
*/
:root {
  /* palette: Meiji Shikon (deep indigo-purple) as a night, cream text, gold light */
  --p-bg: #120e24; --p-surface: #1b1635; --p-ink: #f2efe9; --p-muted: #c4c0d4;
  --p-accent: #d9a95e; --p-accent-ink: #2b1405; --p-action: #ecd29c; --p-action-ink: #2b1405;
  --p-inv-bg: #f7f5f0; --p-inv-surface: #ece8df; --p-inv-ink: #191336; --p-inv-muted: #544f66;
  --p-inv-accent: #7a521a; --p-inv-accent-ink: #f7f5f0; --p-inv-action: #191336; --p-inv-action-ink: #f7f5f0;
  /* added: the night's two depths, gold in three strengths, the cream of the pill, the lead's softer cream */
  --p-night: #120e24; --p-night-deep: #0a0816;
  --p-gold: #d9a95e; --p-gold-light: #ecd29c; --p-gold-deep: #7a521a;
  --p-cream: #f5f2ea; --p-cream-2: #ebe5d8; --p-lead: #dedbe8; --p-shade: #04030a;

  /* added: the scene's colours (scene.js) — Meiji Shikon seats, carpet, curtains and banner */
  --scene-fog-hall: #1c1635; --scene-fog-night: #0e0b22; --scene-fog-sepia: #26201a; --scene-fog-spot: #140f29;
  --scene-seat: #38286b; --scene-seat-hi: #65539e; --scene-floor: #3b2820; --scene-carpet: #312163; --scene-gold: #d6a95c;
  --scene-wood: #8c5c38; --scene-wood-dark: #523120; --scene-curtain: #281b54; --scene-curtain-hi: #483682;
  --scene-wall: #3d3857; --scene-wall-hi: #5c567a; --scene-panel: #45291d; --scene-ceiling: #241f3b; --scene-ceiling-hi: #3d365c;
  --scene-banner: #2f2466; --scene-banner-ink: #f2efe9; --scene-window: #f4d9a4; --scene-moon: #9fb2e8;
  --scene-lamp: #ffd894; --scene-dust: #ffdca6;
  --scene-tint-night: #7a85fa; --scene-tint-sepia: #ffd59c;   /* multiplied into the hall at night / in the sepia mood */

  /* Ryumin for major headings; BIZ UDGothic for text and controls. */
  --font-display: var(--font-text);
  --font-text: "BIZ UDGothic", "Hiragino Sans", "Yu Gothic", Meiryo, sans-serif;
  --font-mincho-fallback: "Yu Mincho", "Hiragino Mincho ProN", serif;
  --font-serif: var(--font-mincho-fallback);
  --display-weight: 700;
  --display-tracking: .04em;
  /* the kit's small sizes, raised a step for reading on a phone (no text under 14px) */
  --t-label: 14px;
  --t-small: 15px;

  /* added type (the reference's clamps; Japanese line heights are taller on purpose) */
  --t-dp-display: clamp(2.15rem, 1.25rem + 3.4vw, 4.5rem);   /* set vertically: one column holds 一八九〇年創立、 */
  --t-dp-h2: clamp(2rem, 1.3rem + 3.2vw, 4rem);
  --t-dp-breath: clamp(1.7rem, 1.2rem + 1.9vw, 2.5rem);
  --t-dp-lead: clamp(1.0625rem, .98rem + .38vw, 1.25rem);
  --t-dp-eyebrow: .88rem;
  --t-dp-card: 1.4rem;
  --t-dp-stat: 1.9rem;
  --t-dp-wordmark: clamp(1.125rem, 1rem + .25vw, 1.25rem);
  --t-dp-pill: .875rem;
  --t-dp-show: 1.85rem;
  --t-dp-boot: clamp(2.1rem, 7vw, 3.1rem);
  --t-dp-cue: 1.45rem;

  /* the commentary (read.css): its own type steps */
  --t-rd-h2: clamp(1.875rem, 1.3rem + 1.4vw, 2.75rem);
  --t-rd-h3: clamp(1.375rem, 1.2rem + .5vw, 1.625rem);

  /* the commentary: neutral paper and ink, Meiji Shikon for actions and a deeper Shikon at the foot */
  --rd-paper: #fafafa;
  --rd-ink: #16151f; --rd-text: #32313d; --rd-muted: #5b5968;
  --rd-plum: #291b54; --rd-footer: #16102e; --rd-footer-muted: #cac7dc;
  --rd-line: color-mix(in oklab, var(--rd-ink) 14%, transparent);
  --rd-rule: color-mix(in oklab, var(--rd-ink) 28%, var(--rd-paper));
  --rd-max: 1180px;
  --rd-bar: 76px;

  /* added layout: shared container width and fluid outer gutter */
  --dp-wrap: var(--rd-max);
  --dp-edge: clamp(1.25rem, 3.2vw, 3rem);
  --dp-pad: clamp(6rem, 11vh, 8rem);

  /* radii: glass panels take the kit's --r-lg (20), plates its --r-md (12); added: tiles and pills */
  --r-tile: 16px; --r-pill: 999px;

  /* added shadows (as tokens, from the palette) */
  --sh-glass: inset 0 1px color-mix(in oklab, var(--p-ink) 6%, transparent), 0 22px 46px -32px color-mix(in oklab, var(--p-shade) 85%, transparent);
  --sh-plate: 0 40px 80px -40px color-mix(in oklab, var(--p-shade) 95%, transparent), 0 0 0 1px color-mix(in oklab, var(--p-shade) 30%, transparent);
  --sh-pill: 0 0 0 1px color-mix(in oklab, var(--p-gold-deep) 45%, transparent), 0 8px 20px -14px color-mix(in oklab, var(--p-gold-deep) 70%, transparent);
  --sh-glow: 0 0 22px -4px color-mix(in oklab, var(--p-gold) 55%, transparent);
  --sh-ring-gold: inset 0 0 0 1px color-mix(in oklab, var(--p-gold-light) 45%, transparent);
  /* glows as filters, so they can move with transform and opacity (the reference animates text-shadow) */
  --fx-glow-off: drop-shadow(0 0 0 transparent);
  --fx-glow-boot: drop-shadow(0 0 10px color-mix(in oklab, var(--p-gold) 55%, transparent));
  --fx-glow-hop: drop-shadow(0 0 9px color-mix(in oklab, var(--p-gold) 50%, transparent));
  --fx-glow-spark: drop-shadow(0 0 6px var(--p-gold));
  --ts-display: 0 3px 44px color-mix(in oklab, var(--p-shade) 55%, transparent), 0 1px 8px color-mix(in oklab, var(--p-shade) 35%, transparent);
  --ts-h2: 0 2px 30px color-mix(in oklab, var(--p-shade) 62%, transparent), 0 1px 6px color-mix(in oklab, var(--p-shade) 35%, transparent);
  --ts-lead: 0 2px 16px color-mix(in oklab, var(--p-shade) 55%, transparent), 0 1px 4px color-mix(in oklab, var(--p-shade) 30%, transparent);

  /* added motion: the reference's timings and its one ease (cubic-bezier(.16,1,.3,1)); the kit's --m-ease-io stays */
  --m-ease-expo: cubic-bezier(.16, 1, .3, 1);
  --m-hop-ease: cubic-bezier(.34, 1.3, .5, 1);
  --m-shim-ease: cubic-bezier(.4, 0, .2, 1);
  --m-reveal-dp: 700ms; --m-step-dp: 80ms;
  --m-arrive: 1100ms; --m-arrive-sweep: 750ms; --m-arrive-jitter: 100ms;
  --m-flick: 6500ms;
  --m-hop: 740ms; --m-hop-char: 60ms; --m-hop-word: 80ms;
  --m-lead-delay: 950ms;
  --m-hover-dp: 420ms; --m-hover-dp-in: 620ms; --m-press: 100ms; --m-lift: 500ms;
  --m-sweep: 1500ms; --m-ping: 2600ms; --m-scene-wait: 4500ms; --m-play-delay: 40ms;
  --m-sheen: 18s; --m-bob: 2400ms; --m-dapple-a: 19s; --m-dapple-b: 24s; --m-spark: 3000ms;
  --m-boot-hop: 1100ms; --m-boot-step: 85ms; --m-boot-fade: 320ms;
  --m-scene-ease: .12;   /* seconds: the scene follows the scroll with this time constant */
}

:root[data-ryumin="ready"] { --font-serif: "a-otf-ryumin-pr6n", var(--font-mincho-fallback); }
