/* Zinkly design tokens (redesign 2026, step 1, beta)
 *
 * One source for colour, type, spacing, corners, shadows and motion.
 * Prefix --zt- so nothing here collides with the older --zk-* variables.
 * Brand and accent follow AdminCP > Site design and each member's own colour choice
 * (--zk-brand / --zk-accent, set by App\Support\SiteDesign::css() in the Human look). In the Classic look
 * --zk-brand is not set, so the fallback is Zinkly violet (#7c5cff), matching that look.
 * Dark is the default (the layout starts with <html class="dark">); html.light swaps the surfaces.
 * Text levels are checked for 4.5:1 contrast on --zt-surface and --zt-surface-2.
 */
:root {
    /* brand */
    --zt-brand: var(--zk-brand, #7c5cff); /* Human look sets --zk-brand; the Classic look keeps Zinkly violet */
    --zt-brand-strong: var(--zk-brand-strong, color-mix(in srgb, var(--zt-brand) 86%, #000));
    --zt-brand-ink: var(--zk-brand-ink, color-mix(in srgb, var(--zt-brand) 52%, #fff)); /* brand as text */
    --zt-brand-soft: color-mix(in srgb, var(--zt-brand) 16%, transparent);              /* tinted backgrounds */
    --zt-on-brand: #fff;
    --zt-accent: var(--zk-accent, #f0b429);
    --zt-signature: linear-gradient(135deg, #7c5cff 0%, #22d3ee 100%); /* logo, VIP, achievements only */

    /* status */
    --zt-success: #22c55e;
    --zt-warning: #f59e0b;
    --zt-danger: #ef4444;
    --zt-danger-strong: #dc2626;
    --zt-info: var(--zt-brand-ink);

    /* surfaces (dark) */
    --zt-bg: #06070a;
    --zt-surface: #0f1117;
    --zt-surface-2: #14161f;
    --zt-surface-3: #1b1e29;
    --zt-border: #22242f;
    --zt-border-strong: #2e3140;
    --zt-overlay: rgba(6, 7, 10, .62);

    /* text (dark) */
    --zt-text: #f4f4f6;
    --zt-text-2: rgba(244, 244, 246, .72);
    --zt-text-3: rgba(244, 244, 246, .56);

    /* type: six sizes, nothing below 12px */
    --zt-fs-cap: .75rem;     /* 12px captions, badges */
    --zt-fs-sm: .8125rem;    /* 13px meta, secondary */
    --zt-fs-body: .9375rem;  /* 15px reading text */
    --zt-fs-lg: 1.0625rem;   /* 17px card titles */
    --zt-fs-xl: 1.25rem;     /* 20px section titles */
    --zt-fs-2xl: 1.75rem;    /* 28px page titles */
    --zt-lh-tight: 1.25;
    --zt-lh-body: 1.5;
    --zt-fw-regular: 400;
    --zt-fw-medium: 500;
    --zt-fw-semibold: 600;
    --zt-fw-bold: 700;

    /* spacing: 4px steps */
    --zt-s-1: 4px;
    --zt-s-2: 8px;
    --zt-s-3: 12px;
    --zt-s-4: 16px;
    --zt-s-5: 24px;
    --zt-s-6: 32px;
    --zt-s-7: 48px;

    /* corners: three radii (cards follow AdminCP > Site design > corners when set) */
    --zt-r-sm: 10px;
    --zt-r-md: var(--zk-card-radius, 16px);
    --zt-r-pill: 999px;

    /* shadows */
    --zt-shadow-1: inset 0 1px 0 rgba(255, 255, 255, .04), 0 1px 2px rgba(0, 0, 0, .4);
    --zt-shadow-2: 0 0 0 1px rgba(255, 255, 255, .08), 0 24px 60px -12px rgba(0, 0, 0, .7);

    /* focus */
    --zt-focus: 0 0 0 2px var(--zt-bg), 0 0 0 4px var(--zt-brand);

    /* motion */
    --zt-ease: cubic-bezier(.2, .8, .2, 1);
    --zt-dur-fast: 120ms;
    --zt-dur: 160ms;
    --zt-dur-slow: 240ms;

    /* sizes */
    --zt-tap: 44px;           /* minimum touch target */
    --zt-control-h: 40px;     /* buttons and inputs on desktop */
    --zt-w-feed: 640px;
    --zt-w-wide: 960px;
    --zt-w-full: 1200px;

    /* glass: floating bars only */
    --zt-glass-bg: color-mix(in srgb, var(--zt-surface) 72%, transparent);
    --zt-glass-blur: blur(14px) saturate(140%);
}

html.light {
    --zt-brand-ink: var(--zk-brand-ink, color-mix(in srgb, var(--zt-brand) 78%, #000));
    --zt-brand-soft: color-mix(in srgb, var(--zt-brand) 10%, transparent);

    --zt-bg: #f6f7f9;
    --zt-surface: #ffffff;
    --zt-surface-2: #f0f2f5;
    --zt-surface-3: #e7eaef;
    --zt-border: #e3e6eb;
    --zt-border-strong: #cfd4dc;
    --zt-overlay: rgba(15, 17, 23, .38);

    --zt-text: #0f1117;
    --zt-text-2: rgba(15, 17, 23, .74);
    --zt-text-3: rgba(15, 17, 23, .6);

    --zt-danger: #dc2626;
    --zt-danger-strong: #b91c1c;
    --zt-success: #15803d;
    --zt-warning: #b45309;

    --zt-shadow-1: 0 1px 2px rgba(16, 24, 40, .06), 0 1px 3px rgba(16, 24, 40, .08);
    --zt-shadow-2: 0 12px 32px -8px rgba(16, 24, 40, .18), 0 0 0 1px rgba(16, 24, 40, .06);
}

@media (min-width: 768px) {
    :root { --zt-tap: 40px; }
}
