/**
 * Tellr.in Design Tokens
 * Single source of truth for fonts, typography scale, colors, spacing, and effects.
 * Based on shadcn/ui Newsletter template · base style · neutral palette.
 */

:root {
  /* ── Typography: Font Families ─────────────────────────────────────────── */
  --tellr-font-sans: "Geist", "Inter", ui-sans-serif, system-ui, -apple-system, sans-serif;
  --tellr-font-mono: "Geist Mono", "JetBrains Mono", ui-monospace, monospace;
  --tellr-font-display: var(--tellr-font-sans);

  /* ── Typography: Font Sizes ────────────────────────────────────────────── */
  --tellr-text-xs: 0.75rem;      /* 12px */
  --tellr-text-sm: 0.875rem;     /* 14px */
  --tellr-text-base: 1rem;       /* 16px */
  --tellr-text-lg: 1.125rem;     /* 18px */
  --tellr-text-xl: 1.25rem;      /* 20px */
  --tellr-text-2xl: 1.5rem;      /* 24px */
  --tellr-text-3xl: 1.875rem;    /* 30px */
  --tellr-text-4xl: 2.25rem;     /* 36px */
  --tellr-text-5xl: 3rem;        /* 48px */
  --tellr-text-6xl: 3.75rem;     /* 60px */

  /* ── Typography: Line Heights ──────────────────────────────────────────── */
  --tellr-leading-none: 1;
  --tellr-leading-tight: 1.25;
  --tellr-leading-snug: 1.375;
  --tellr-leading-normal: 1.5;
  --tellr-leading-relaxed: 1.625;
  --tellr-leading-loose: 2;

  /* ── Typography: Font Weights ──────────────────────────────────────────── */
  --tellr-font-normal: 400;
  --tellr-font-medium: 500;
  --tellr-font-semibold: 600;
  --tellr-font-bold: 700;

  /* ── Typography: Letter Spacing ────────────────────────────────────────── */
  --tellr-tracking-tight: -0.025em;
  --tellr-tracking-normal: 0;
  --tellr-tracking-wide: 0.025em;

  /* ── shadcn/ui Semantic Colors (neutral · base style) ──────────────────── */
  --tellr-radius: 0.625rem;
  --tellr-radius-sm: calc(var(--tellr-radius) * 0.6);
  --tellr-radius-md: calc(var(--tellr-radius) * 0.8);
  --tellr-radius-lg: var(--tellr-radius);
  --tellr-radius-xl: calc(var(--tellr-radius) * 1.4);
  --tellr-radius-2xl: calc(var(--tellr-radius) * 1.8);
  --tellr-radius-full: 9999px;

  --tellr-background: oklch(1 0 0);
  --tellr-foreground: oklch(0.145 0 0);
  --tellr-card: oklch(1 0 0);
  --tellr-card-foreground: oklch(0.145 0 0);
  --tellr-popover: oklch(1 0 0);
  --tellr-popover-foreground: oklch(0.145 0 0);
  --tellr-primary: oklch(0.205 0 0);
  --tellr-primary-foreground: oklch(0.985 0 0);
  --tellr-secondary: oklch(0.97 0 0);
  --tellr-secondary-foreground: oklch(0.205 0 0);
  --tellr-muted: oklch(0.97 0 0);
  --tellr-muted-foreground: oklch(0.556 0 0);
  --tellr-accent: oklch(0.97 0 0);
  --tellr-accent-foreground: oklch(0.205 0 0);
  --tellr-destructive: oklch(0.577 0.245 27.325);
  --tellr-destructive-foreground: oklch(0.985 0 0);
  --tellr-border: oklch(0.922 0 0);
  --tellr-input: oklch(0.922 0 0);
  --tellr-ring: oklch(0.708 0 0);

  /* ── Tellr Brand Accents ─────────────────────────────────────────────────── */
  --tellr-brand: oklch(0.55 0.18 250);
  --tellr-brand-foreground: oklch(0.985 0 0);
  --tellr-brand-muted: oklch(0.55 0.18 250 / 12%);

  /* ── Gradients ───────────────────────────────────────────────────────────── */
  --tellr-gradient-hero: radial-gradient(ellipse 85% 55% at 50% -15%, oklch(0.55 0.2 250 / 32%), transparent),
    radial-gradient(ellipse 65% 45% at 88% 45%, oklch(0.62 0.17 280 / 22%), transparent),
    radial-gradient(ellipse 55% 35% at 12% 82%, oklch(0.58 0.15 200 / 20%), transparent),
    radial-gradient(ellipse 45% 30% at 72% 92%, oklch(0.64 0.14 320 / 16%), transparent);
  --tellr-gradient-card-shine: linear-gradient(135deg, oklch(1 0 0 / 80%) 0%, oklch(1 0 0 / 0%) 50%);
  --tellr-gradient-border: linear-gradient(135deg, oklch(0.922 0 0), oklch(0.85 0.05 250 / 40%), oklch(0.922 0 0));
  --tellr-gradient-cta: linear-gradient(135deg, oklch(0.205 0 0) 0%, oklch(0.35 0.08 250) 100%);
  --tellr-gradient-mesh: conic-gradient(from 180deg at 50% 50%, oklch(0.94 0.04 250) 0deg, oklch(1 0 0) 120deg, oklch(0.94 0.04 280) 240deg, oklch(0.95 0.03 220) 360deg);

  /* ── Shadows ─────────────────────────────────────────────────────────────── */
  --tellr-shadow-xs: 0 1px 2px oklch(0.145 0 0 / 4%);
  --tellr-shadow-sm: 0 1px 3px oklch(0.145 0 0 / 8%), 0 1px 2px oklch(0.145 0 0 / 4%);
  --tellr-shadow-md: 0 4px 6px oklch(0.145 0 0 / 6%), 0 2px 4px oklch(0.145 0 0 / 4%);
  --tellr-shadow-lg: 0 10px 15px oklch(0.145 0 0 / 8%), 0 4px 6px oklch(0.145 0 0 / 4%);
  --tellr-shadow-xl: 0 20px 25px oklch(0.145 0 0 / 10%), 0 8px 10px oklch(0.145 0 0 / 4%);
  --tellr-shadow-glow: 0 0 40px oklch(0.55 0.18 250 / 20%);

  /* ── Spacing Scale ───────────────────────────────────────────────────────── */
  --tellr-space-1: 0.25rem;
  --tellr-space-2: 0.5rem;
  --tellr-space-3: 0.75rem;
  --tellr-space-4: 1rem;
  --tellr-space-5: 1.25rem;
  --tellr-space-6: 1.5rem;
  --tellr-space-8: 2rem;
  --tellr-space-10: 2.5rem;
  --tellr-space-12: 3rem;
  --tellr-space-16: 4rem;
  --tellr-space-20: 5rem;
  --tellr-space-24: 6rem;

  /* ── Layout ──────────────────────────────────────────────────────────────── */
  --tellr-container-sm: 640px;
  --tellr-container-md: 768px;
  --tellr-container-lg: 1024px;
  --tellr-container-xl: 1280px;
  --tellr-container-2xl: 1400px;
  --tellr-container-max: var(--tellr-container-2xl);
  --tellr-content-width: 720px;
  --tellr-article-width: 840px;
  --tellr-sidebar-width: 320px;
  --tellr-header-height: 4.5rem;

  /* ── Motion ──────────────────────────────────────────────────────────────── */
  --tellr-ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --tellr-ease-in-out: cubic-bezier(0.4, 0, 0.2, 1);
  --tellr-duration-fast: 150ms;
  --tellr-duration-normal: 250ms;
  --tellr-duration-slow: 400ms;

  /* ── Particles ───────────────────────────────────────────────────────────── */
  --tellr-particle-color: oklch(0.52 0.2 250 / 55%);
  --tellr-particle-line: oklch(0.52 0.2 250);
  --tellr-particle-size: 2.5px;
  --tellr-particle-count: 90;

  /* ── Logo (light mode: no frame, invert image for light header) ──────────── */
  --tellr-logo-frame-bg: transparent;
  --tellr-logo-frame-border: transparent;
  --tellr-logo-frame-radius: 0;
  --tellr-logo-frame-shadow: none;
  --tellr-logo-frame-shine: none;
  --tellr-logo-filter: invert(1) hue-rotate(180deg);
}

/* Dark mode is the default; light mode is opt-in via data-theme="light". */
.dark,
[data-theme="dark"] {
  --tellr-background: oklch(0.145 0 0);
  --tellr-foreground: oklch(0.985 0 0);
  --tellr-card: oklch(0.205 0 0);
  --tellr-card-foreground: oklch(0.985 0 0);
  --tellr-popover: oklch(0.205 0 0);
  --tellr-popover-foreground: oklch(0.985 0 0);
  --tellr-primary: oklch(0.922 0 0);
  --tellr-primary-foreground: oklch(0.205 0 0);
  --tellr-secondary: oklch(0.269 0 0);
  --tellr-secondary-foreground: oklch(0.985 0 0);
  --tellr-muted: oklch(0.269 0 0);
  --tellr-muted-foreground: oklch(0.708 0 0);
  --tellr-accent: oklch(0.269 0 0);
  --tellr-accent-foreground: oklch(0.985 0 0);
  --tellr-destructive: oklch(0.704 0.191 22.216);
  --tellr-border: oklch(1 0 0 / 10%);
  --tellr-input: oklch(1 0 0 / 15%);
  --tellr-ring: oklch(0.556 0 0);

  --tellr-brand: oklch(0.65 0.18 250);
  --tellr-brand-muted: oklch(0.65 0.18 250 / 15%);

  --tellr-gradient-hero: radial-gradient(ellipse 80% 50% at 50% -20%, oklch(0.55 0.18 250 / 25%), transparent),
    radial-gradient(ellipse 60% 40% at 80% 50%, oklch(0.45 0.15 280 / 15%), transparent),
    radial-gradient(ellipse 50% 30% at 20% 80%, oklch(0.5 0.12 200 / 12%), transparent);
  --tellr-gradient-card-shine: linear-gradient(135deg, oklch(1 0 0 / 5%) 0%, oklch(1 0 0 / 0%) 50%);
  --tellr-gradient-border: linear-gradient(135deg, oklch(1 0 0 / 10%), oklch(0.55 0.18 250 / 30%), oklch(1 0 0 / 10%));
  --tellr-gradient-cta: linear-gradient(135deg, oklch(0.922 0 0) 0%, oklch(0.75 0.12 250) 100%);
  --tellr-gradient-mesh: conic-gradient(from 180deg at 50% 50%, oklch(0.2 0.02 250) 0deg, oklch(0.145 0 0) 120deg, oklch(0.2 0.02 280) 240deg, oklch(0.2 0.02 250) 360deg);

  --tellr-shadow-glow: 0 0 60px oklch(0.55 0.18 250 / 30%);
  --tellr-particle-color: oklch(0.68 0.2 250 / 55%);
  --tellr-particle-line: oklch(0.68 0.2 250);

  --tellr-logo-frame-bg: transparent;
  --tellr-logo-frame-border: transparent;
  --tellr-logo-frame-radius: 0;
  --tellr-logo-frame-shadow: none;
  --tellr-logo-frame-shine: none;
  --tellr-logo-filter: none;
}
