/* ==========================================================================
   nest-matcha / tokens.css — ENTIRE visual identity (contract §7)
   matchanest.com — "Zen seremoni, washi dokusu"
   Motion: data-motion="calm" — slow ink-fade, never bounces.
   --------------------------------------------------------------------------
   3-layer structure:
     1. primitives  — raw brand palette (only place raw hex may exist)
     2. semantic    — overrides of the contract §2 tokens
     3. physics     — radius / motion / typography personality
   Loaded AFTER parent main.css; overrides custom properties only.
   @font-face for self-hosted woff2 lives in the skin's font CSS enqueued by
   functions.php (declared via nestcore_brand()['fonts'] for preload).
   ========================================================================== */

/* ---- 1. Primitives: the matcha palette ---------------------------------- */
:root {
  --mn-washi:        #F6F2E7;  /* washi paper — page ground                 */
  --mn-washi-raised: #FCF9F1;  /* slightly lifted sheet — cards             */
  --mn-sumi:         #1C1F1A;  /* sumi ink — text                           */
  --mn-sumi-soft:    #4B5045;  /* diluted ink — secondary text              */
  --mn-matcha-deep:  #2D4A32;  /* deep ceremonial matcha — brand & CTA      */
  --mn-leaf:         #7C9A4E;  /* fresh leaf — garnish tints                */
  --mn-stone:        #D9D3C3;  /* river stone — hairlines                   */
  --mn-kin:          #C2A14D;  /* kintsugi gold — sparing accent            */
}

/* ---- 2. Semantic overrides (contract §2) -------------------------------- */
:root {
  --color-bg:       var(--mn-washi);
  --color-surface:  var(--mn-washi-raised);
  --color-ink:      var(--mn-sumi);
  --color-ink-soft: var(--mn-sumi-soft);
  --color-brand:    var(--mn-matcha-deep);
  --color-accent:   var(--mn-kin);
  --color-cta:      var(--mn-matcha-deep);
  --color-cta-ink:  var(--mn-washi);
  --color-line:     var(--mn-stone);

  /* Ink-wash shadows: barely-there, warm gray. */
  --shadow-color: rgb(28 31 26 / 0.07);
}

/* ---- 3. Brand physics ----------------------------------------------------
   calm: long, weightless reveals on a gentle out-curve. The whole derived
   motion system (--dur-micro/fast/slow) rescales from --dur-reveal.       */
:root {
  --radius-base: 2px;                              /* zen: near-square      */
  --dur-reveal: 1100ms;                            /* slow ink-fade         */
  --ease-brand: cubic-bezier(0.22, 1, 0.36, 1);    /* drifts in, no bounce  */

  /* Typography: Japanese mincho ceremony + clean gothic body.
     Self-hosted woff2; metric-compatible system fallbacks for CLS. */
  --font-display: "Shippori Mincho", "Hiragino Mincho ProN", "Yu Mincho",
                  "Noto Serif JP", Georgia, serif;
  --font-body: "Zen Kaku Gothic New", "Hiragino Kaku Gothic ProN",
               "Yu Gothic", -apple-system, "Segoe UI", sans-serif;
}

/* Light identity: native form controls / scrollbars stay light. */
:root {
  color-scheme: light;
}

/* Leaf green is intentionally NOT a semantic token — it is reserved for
   skin-level garnish (logo, illustrations, texture tints) so component CSS
   stays within the contract palette. Exposed here for assets that need it. */
:root {
  --brand-garnish: var(--mn-leaf);
}

/* ---- 4. Contrast receipts (WCAG, computed — keep updated if palette moves)
   ink      / bg   14.90:1  AAA
   ink-soft / bg    7.41:1  AAA
   brand    / bg    8.78:1  AAA   (brand is safe as a text color here)
   cta-ink  / cta   8.78:1  AAA
   accent   / bg    2.21:1  — kin gold is NON-TEXT garnish only (star fills,
                              dividers). Focus rings auto-correct through
                              --focus-ring-color (accent mixed toward ink)
                              defined in parent tokens.default.css.
   ------------------------------------------------------------------------ */
