/* 晨霧 HALMA — design tokens
   Design frame 1600 × 900. --u is one reference pixel of the frame.
   The hero starts on night (--k: 1); every hero colour is a color-mix on --k. */
:root{
  --u: min(calc(100vw / 1600), calc(100vh / 900));

  /* surfaces */
  --paper: #f7f8f4;      /* sections below the hero */
  --paper-2: #eef1e8;    /* lifted panels */
  --night: #0b1426;      /* hero ground before the photo loads */

  /* ink */
  --ink: #14202f;
  --ink-2: #1b2736;
  --muted: #7c8794;
  --dim: #9aa3ad;

  /* the two lime tones — one for morning, one for night */
  --lime: #6d8f2a;
  --lime-soft: #d8ee8e;
  --lime-grad: linear-gradient(160deg,#f7f8dc,#e2ee9f 90%);

  /* lines */
  --line: #dfe3d8;
  --line-soft: #e8ece2;
  --line-dark: rgba(255,255,255,.18);

  /* hero-mixed colours (recomputed by JS through --k) */
  --on-morning: #1c2316;

  /* type ladder — 1600 frame */
  --fs-64: calc(64 * var(--u));
  --fs-40: calc(40 * var(--u));
  --fs-28: calc(28 * var(--u));
  --fs-25: calc(25 * var(--u));
  --fs-23: calc(23 * var(--u));
  --fs-20: calc(20 * var(--u));
  --fs-17: calc(17 * var(--u));
  --fs-16: calc(16.5 * var(--u));
  --fs-15: calc(15 * var(--u));
  --fs-14: calc(14 * var(--u));
  --fs-13: calc(13 * var(--u));
  --fs-12: calc(12 * var(--u));
  --fs-11: calc(11 * var(--u));

  --font: "Instrument Sans", "Noto Sans TC", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

  /* spacing ladder: 4 / 8 / 12 / 16 / 24 / 32 / 48 / 72 / 96 / 148 */
  --s1: calc(4 * var(--u));
  --s2: calc(8 * var(--u));
  --s3: calc(12 * var(--u));
  --s4: calc(16 * var(--u));
  --s5: calc(24 * var(--u));
  --s6: calc(32 * var(--u));
  --s7: calc(48 * var(--u));
  --s8: calc(72 * var(--u));
  --s9: calc(96 * var(--u));
  --s10: calc(148 * var(--u));

  --pad: calc(38 * var(--u));

  /* motion */
  --ease: cubic-bezier(.22,.61,.36,1);
  --ease-out: cubic-bezier(.19,1,.22,1);

  --sat: env(safe-area-inset-top, 0px);
  --sab: env(safe-area-inset-bottom, 0px);
}

@media (max-width: 820px){
  :root{
    --u: 1px;
    --pad: 16px;
    --fs-64: clamp(34px, 10.4vw, 56px);
    --fs-40: 26px; --fs-28: 22px; --fs-25: 21px; --fs-23: 19px; --fs-20: 18px;
    --fs-17: 16px; --fs-16: 15px; --fs-15: 14px; --fs-14: 14px; --fs-13: 13px;
    --fs-12: 12px; --fs-11: 11px;
    --s7: 30px; --s8: 44px; --s9: 60px; --s10: 80px;
    --sat: max(env(safe-area-inset-top, 0px), 46px);
    --sab: max(env(safe-area-inset-bottom, 0px), 18px);
  }
}
