/*
 * Home premium design tokens.
 *
 * Scope: homepage-only visual primitives shared by the later HOMEUX steps.
 * This file intentionally contains tokens, semantic aliases, and motion/layout
 * primitives only. Component rules stay in the dedicated home-*.css modules.
 */
:root {
  /* Foundation palette: keep parity with the current inline homepage variables. */
  --bg: #f6f1e8;
  --paper: rgba(255, 253, 248, .86);
  --paper-strong: #fffdf8;
  --ink: #24211d;
  --muted: #6b6258;
  --line: rgba(105, 86, 60, .18);
  --accent: #8a5a2b;
  --accent-2: #244f5b;
  --gold: #bd8b38;
  --soft: #f0e5d3;
  --surface: rgba(255, 253, 248, .58);
  --surface-strong: rgba(255, 253, 248, .92);
  --focus: rgba(36, 79, 91, .28);
  --read: rgba(34, 126, 83, .14);
  --read-ink: #11613d;
  --read-line: rgba(34, 126, 83, .42);
  --read-strong: #1f7a50;
  --read-hover: rgba(34, 126, 83, .20);
  --state-closed-bg: rgba(189, 139, 56, .13);
  --state-closed-line: rgba(189, 139, 56, .30);
  --state-open-bg: rgba(36, 79, 91, .10);
  --state-open-line: rgba(36, 79, 91, .34);
  --shadow: 0 24px 70px rgba(60, 45, 25, .12);
  --shadow-soft: 0 14px 36px rgba(60, 45, 25, .075);
  --radius-xl: 30px;
  --radius-lg: 22px;
  --radius-md: 16px;
  --max: 1120px;

  /* Semantic aliases for the premium homepage refactor. */
  --home-color-page: var(--bg);
  --home-color-surface: var(--paper);
  --home-color-surface-strong: var(--paper-strong);
  --home-color-surface-muted: var(--surface);
  --home-color-text: var(--ink);
  --home-color-text-muted: var(--muted);
  --home-color-border: var(--line);
  --home-color-primary: var(--accent-2);
  --home-color-primary-soft: rgba(36, 79, 91, .10);
  --home-color-accent: var(--accent);
  --home-color-accent-soft: rgba(138, 90, 43, .12);
  --home-color-gold: var(--gold);
  --home-color-focus: var(--focus);

  /* Type scale. */
  --home-font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans TC", "PingFang TC", "Microsoft JhengHei", Arial, sans-serif;
  --home-font-serif: "Noto Serif TC", "Songti TC", "PMingLiU", serif;
  --home-text-xs: .78rem;
  --home-text-sm: .88rem;
  --home-text-base: 1rem;
  --home-text-md: 1.06rem;
  --home-text-lg: clamp(1.03rem, 2.5vw, 1.24rem);
  --home-title-lg: clamp(2.2rem, 7.2vw, 5.1rem);
  --home-title-md: clamp(1.7rem, 4.2vw, 2.55rem);
  --home-title-sm: 1.1rem;
  --home-leading-body: 1.75;
  --home-tracking-body: .015em;

  /* Spacing and layout. */
  --home-space-2xs: 4px;
  --home-space-xs: 8px;
  --home-space-sm: 12px;
  --home-space-md: 16px;
  --home-space-lg: 22px;
  --home-space-xl: 30px;
  --home-space-2xl: 44px;
  --home-space-3xl: 60px;
  --home-container-max: var(--max);
  --home-container-gutter: 30px;
  --home-touch-target: 44px;

  /* Radius, elevation, and motion. */
  --home-radius-sm: 12px;
  --home-radius-md: var(--radius-md);
  --home-radius-lg: var(--radius-lg);
  --home-radius-xl: var(--radius-xl);
  --home-radius-hero: 36px;
  --home-radius-pill: 999px;
  --home-shadow-soft: var(--shadow-soft);
  --home-shadow-raised: var(--shadow);
  --home-focus-ring: 0 0 0 4px rgba(36, 79, 91, .14);
  --home-focus-ring-strong: 0 0 0 4px rgba(36, 79, 91, .18), 0 0 0 7px rgba(255,253,248,.62);
  --home-active-scale: .992;
  --home-mobile-readable-measure: 38rem;
  --home-transition-fast: 160ms ease;
  --home-transition-base: 220ms ease;

  /* Card hierarchy tokens: HOMEUX-Step 6. */
  --home-card-border-subtle: rgba(105, 86, 60, .14);
  --home-card-border-medium: rgba(105, 86, 60, .20);
  --home-card-border-featured: rgba(36, 79, 91, .24);
  --home-card-border-article: rgba(36, 79, 91, .18);
  --home-card-border-category: rgba(138, 90, 43, .20);
  --home-card-bg-hero: linear-gradient(135deg, rgba(255, 253, 248, .97), rgba(246, 237, 222, .93)), radial-gradient(circle at 85% 20%, rgba(189, 139, 56, .22), transparent 18rem);
  --home-card-bg-featured: linear-gradient(180deg, rgba(255,253,248,.94), rgba(244, 236, 222, .78));
  --home-card-bg-article: linear-gradient(180deg, rgba(255,253,248,.98), rgba(246, 240, 229, .93));
  --home-card-bg-category: linear-gradient(180deg, rgba(255,253,248,.92), rgba(248,239,225,.66));
  --home-card-bg-utility: rgba(255,253,248,.72);
  --home-card-bg-entry: rgba(255,253,248,.84);
  --home-card-shadow-hero: var(--home-shadow-raised);
  --home-card-shadow-featured: 0 18px 40px rgba(60,45,25,.095);
  --home-card-shadow-article: 0 15px 34px rgba(60,45,25,.085);
  --home-card-shadow-category: 0 12px 30px rgba(60,45,25,.065);
  --home-card-shadow-entry: 0 7px 18px rgba(60,45,25,.045);
  --home-card-inset-highlight: inset 0 1px 0 rgba(255,255,255,.58);
  --home-card-accent-bar: linear-gradient(180deg, rgba(36,79,91,.72), rgba(189,139,56,.54));
}
