/* Cerylex 3.0 design tokens. One source for colour, type, space, shape and motion.
   Two themes share the same semantic names:
     dark  (default)  home + gallery - the art lives here
     light            services, downloads, support, about - built for reading and doing
   Brand colours come from the mark family: midnight navy tile + origin orange ball. */
@font-face { font-family: "Instrument Sans"; src: url("../../../fonts/instrument-sans-latin.woff2") format("woff2"); font-weight: 400 700; font-style: normal; font-display: swap; unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2122, U+2191, U+2193, U+2212, U+2215; }
@font-face { font-family: "Cinzel"; src: url("../../../fonts/cinzel-latin.woff2") format("woff2"); font-weight: 400 700; font-style: normal; font-display: swap; unicode-range: U+0000-00FF, U+2000-206F; }
/* Noto Sans TC, subset at build time to the glyphs headings use (build.mjs). */
@font-face { font-family: "Cx Sans TC"; src: url("../../../fonts/cx-sans-tc.woff2") format("woff2"); font-weight: 500 800; font-style: normal; font-display: swap; }

:root {
  /* brand */
  --navy-950: #070b1a;
  --navy-900: #0b1126;
  --navy-800: #0f1733;     /* Midnight Navy: the mark tile */
  --navy-700: #16204a;
  --navy-600: #1f2b5e;
  --orange: #ff9a35;       /* Origin Orange: the ball */
  --orange-strong: #e9781a;
  --mist: #f4f5f8;         /* page background of the mark sheet */
  /* art palette (home + gallery only) */
  --pink: #f35aad;
  --violet: #8757fa;
  --cyan: #30d5ce;
  --gold: #f1d678;
  /* service tints (from the marks) */
  --svc-downloader: #33d2c3;
  --svc-converter: #a98bff;

  /* semantic, dark theme */
  color-scheme: dark;
  --bg: var(--navy-900);              /* pages sit one step deeper than the mark tile */
  --bg-2: var(--navy-950);
  --surface: rgba(26, 36, 82, 0.55);  /* cards: lifted navy, readable over the backdrop glow */
  --surface-solid: #141c3c;
  --surface-2: rgba(255, 255, 255, 0.045);
  --line: rgba(220, 226, 255, 0.12);
  --line-strong: rgba(220, 226, 255, 0.24);
  --text: #eef0f8;
  --text-2: #b9bfd6;
  --text-3: #8c93b0;
  --accent: var(--orange);
  --accent-ink: #1b1306;
  --link: #ffb46b;
  --focus: var(--orange);
  --field: rgba(255, 255, 255, 0.06);
  --field-line: rgba(220, 226, 255, 0.24);
  --ok: #5fd6a0;
  --warn: #f1c25b;
  --err: #ff8794;
  --info: #7fb2ff;
  --muted: #8c93b0;
  --shadow-1: 0 1px 0 rgba(255, 255, 255, 0.05) inset, 0 12px 32px -18px rgba(0, 0, 0, 0.8);
  --shadow-2: 0 1px 0 rgba(255, 255, 255, 0.06) inset, 0 40px 80px -40px rgba(0, 0, 0, 0.9);

  /* type */
  /* body text must NOT list the heading subset: it only has heading glyphs at weight >= 500,
     so body copy would mix bold subset glyphs with regular system glyphs */
  --font-sans: "Instrument Sans", "PingFang TC", "Microsoft JhengHei UI", "Microsoft JhengHei", "Noto Sans TC", "Noto Sans CJK TC", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-head: "Instrument Sans", "Cx Sans TC", "PingFang TC", "Microsoft JhengHei", "Noto Sans TC", system-ui, sans-serif;
  --font-mono: ui-monospace, "Cascadia Mono", "SF Mono", "Roboto Mono", Consolas, monospace;
  --font-cine: "Cinzel", "Cx Sans TC", "Noto Sans TC", serif;
  --fs-00: 0.78rem;
  --fs-0: 0.875rem;
  --fs-1: 1rem;
  --fs-2: clamp(1.06rem, 0.98rem + 0.35vw, 1.2rem);
  --fs-3: clamp(1.28rem, 1.1rem + 0.8vw, 1.66rem);
  --fs-4: clamp(1.6rem, 1.25rem + 1.6vw, 2.5rem);
  --fs-5: clamp(2.05rem, 1.35rem + 3.2vw, 3.9rem);
  --fs-6: clamp(3rem, 1.2rem + 8.4vw, 8rem);
  --lh-tight: 1.06;
  --lh-head: 1.22;
  --lh-body: 1.8;
  /* space (4px base) */
  --s-1: 0.25rem; --s-2: 0.5rem; --s-3: 0.75rem; --s-4: 1rem; --s-5: 1.5rem; --s-6: 2rem;
  --s-7: 3rem; --s-8: 4.5rem; --s-9: 7rem;
  --gutter: clamp(1.15rem, 4.6vw, 4.5rem);
  --w-text: 44rem;
  --w-content: 74rem;
  --w-wide: 88rem;
  --header-h: 4.5rem;
  /* shape (the mark tile is 23% rounded) */
  --r-1: 8px; --r-2: 14px; --r-3: 22px; --r-pill: 999px;
  /* motion */
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
  --t-fast: 160ms;
  --t-med: 380ms;
  --t-slow: 900ms;
  /* home transition state, written by js/bloom/enter-transition.js */
  --enter: 0;
  --ex: 50%;
  --ey: 100%;
}

[data-theme="light"] {
  color-scheme: light;
  --bg: var(--mist);
  --bg-2: #eceef4;
  --surface: #ffffff;
  --surface-solid: #ffffff;
  --surface-2: #f6f7fa;
  --line: #e3e6ee;
  --line-strong: #cdd2df;
  --text: #0f1733;
  --text-2: #444c66;
  --text-3: #555d7c;            /* >= 5.5:1 on Mist and on white */
  --accent: var(--orange-strong);
  --accent-ink: #ffffff;
  --link: #a14f05;
  --focus: #d26a10;
  --field: #ffffff;
  --field-line: #c9cedb;
  --ok: #0d7448;                /* status colours all >= 4.8:1 on Mist */
  --warn: #8a5200;
  --err: #b0263c;
  --info: #2556b8;
  --muted: #555d7c;
  --shadow-1: 0 1px 2px rgba(15, 23, 51, 0.06), 0 8px 24px -14px rgba(15, 23, 51, 0.18);
  --shadow-2: 0 2px 4px rgba(15, 23, 51, 0.05), 0 30px 60px -30px rgba(15, 23, 51, 0.3);
}
