/* Tonal Borderless tokens shared by every non-VitePress page. */

@property --hc-fill {
    syntax: "<color>";
    inherits: false;
    initial-value: transparent;
}

html.rcitrat-preview {
    color-scheme: dark;

    --hc-bg: #111a20;
    --hc-surface-1: #182329;
    --hc-surface-2: #1e2c34;
    --hc-surface-3: #25353e;
    --hc-surface-4: #2c3e48;
    --hc-on: #eef5f6;
    --hc-on-2: #b8c9ce;
    --hc-on-3: #8ca0a7;
    --hc-primary: #8ed2ff;
    --hc-on-primary: #172b38;
    --hc-primary-container: #2d5065;
    --hc-on-primary-container: #eaf6ff;
    --hc-accent: #4eb8f5;
    --hc-on-accent: #10222c;
    --hc-accent-rgb: 78, 184, 245;

    --hc-type-body: 0.95rem;
    --hc-type-small: 0.82rem;
    --hc-type-micro: 0.74rem;
    --hc-type-title: clamp(1.55rem, 1.4rem + 0.35vw, 1.7rem);
    --hc-line-body: 1.55;
    --hc-line-tight: 1.22;
    --hc-space-xs: 0.35rem;
    --hc-space-sm: 0.6rem;
    --hc-space-md: 0.9rem;
    --hc-space-lg: 1.25rem;
    --hc-space-xl: 1.75rem;

    --hc-ease: cubic-bezier(.2, 0, 0, 1);
    --hc-ease-out: cubic-bezier(.16, 1, .3, 1);
    --hc-spring: cubic-bezier(.34, 1.56, .64, 1);
    --hc-duration-fast: 160ms;
    --hc-duration-normal: 350ms;
    --hc-duration-slow: 550ms;
    --hc-glass-blur: blur(8px) saturate(1.05);
    --hc-fill-strength: 78%;
    --hc-glass-1: color-mix(in oklab, var(--hc-surface-1) var(--hc-fill-strength), transparent);
    --hc-glass-2: color-mix(in oklab, var(--hc-surface-2) var(--hc-fill-strength), transparent);
    --hc-glass-3: color-mix(in oklab, var(--hc-surface-3) var(--hc-fill-strength), transparent);
    --hc-glass-4: color-mix(in oklab, var(--hc-surface-4) var(--hc-fill-strength), transparent);
    --radius-sm: 8px;
    --radius-md: 10px;
    --radius-lg: 14px;
    --radius-xl: 18px;
    --radius-pill: 9999px;
    --transition-fast: var(--hc-duration-fast) var(--hc-ease);
    --transition-normal: var(--hc-duration-normal) var(--hc-ease);
    --transition-slow: var(--hc-duration-slow) var(--hc-ease);
    --bg-image: url("/resource/backgrounds/13.webp");
    --body-size: var(--hc-type-body);
    --title-size: var(--hc-type-title);

    /* Legacy aliases keep the existing page CSS working during the preview. */
    --box-color: var(--hc-glass-1);
    --sub-box-color: var(--hc-glass-2);
    --box-shadow-color: color-mix(in oklab, var(--hc-surface-1) 48%, transparent);
    --text-color: var(--hc-on);
    --overlay: color-mix(in oklab, var(--hc-bg) 72%, transparent);
    --logo-color: var(--hc-on);
    --logo-sub-color: var(--hc-accent);
    --btn-text-color: var(--hc-on-accent);
    --ac-btn-color: var(--hc-accent);
    --ac-btn-shadow-color: color-mix(in oklab, var(--hc-accent) 48%, transparent);
    --ac-btn-color-l: var(--hc-primary);
    --ac-btn-shadow-color-l: color-mix(in oklab, var(--hc-primary) 48%, transparent);
    --bg-card: var(--hc-glass-1);
    --bg-card-hover: var(--hc-glass-2);
    --bg-input: var(--hc-glass-3);
    --primary-color: var(--hc-primary);
    --primary-rgb: var(--hc-accent-rgb);
    --secondary-color: var(--hc-accent);
    --text-primary: var(--hc-on);
    --text-secondary: var(--hc-on-2);
    --text-muted: var(--hc-on-3);
    --shadow-card: 0 0 8px 2px color-mix(in oklab, var(--hc-surface-1) 60%, transparent),
                   0 0 28px 8px color-mix(in oklab, var(--hc-surface-1) 24%, transparent);
    --shadow-card-hover: 0 0 10px 3px color-mix(in oklab, var(--hc-surface-2) 60%, transparent),
                         0 0 32px 10px color-mix(in oklab, var(--hc-surface-2) 28%, transparent);
    --shadow-btn: 0 0 6px 1px color-mix(in oklab, var(--hc-accent) 60%, transparent),
                  0 0 20px 5px color-mix(in oklab, var(--hc-accent) 24%, transparent);
    --shadow-btn-hover: 0 0 8px 2px color-mix(in oklab, var(--hc-primary) 60%, transparent),
                        0 0 26px 8px color-mix(in oklab, var(--hc-primary) 28%, transparent);
    --border-card: transparent;
    --glass-blur: var(--hc-glass-blur);
    --about-mask: color-mix(in oklab, var(--hc-bg) 68%, transparent);
}

html.rcitrat-preview[data-theme="light"] {
    color-scheme: light;

    --hc-bg: #f8fbfc;
    --hc-surface-1: #edf4f6;
    --hc-surface-2: #e2edf1;
    --hc-surface-3: #d5e5ea;
    --hc-surface-4: #c7dce3;
    --hc-on: #1a2a31;
    --hc-on-2: #45616a;
    --hc-on-3: #6a8189;
    --hc-primary: #2878a5;
    --hc-on-primary: #f8fcfe;
    --hc-primary-container: #cbe6f3;
    --hc-on-primary-container: #173749;
    --hc-accent: #217ea8;
    --hc-on-accent: #f8fcfe;
    --hc-accent-rgb: 33, 126, 168;
}
