/*
 * Tailwind v4 entry: config lives here, with no tailwind.config.js or PostCSS plugin.
 * - Keep every @import in this top block, above @theme and the rest of the file. Install an
 *   npm package before @importing its CSS. Never @import a remote URL (web fonts, CDN CSS): the
 *   build resolves @import from the filesystem. Load those with a <link> in the head() of
 *   src/routes/__root.tsx and name the family in a --font-* token in @theme inline below.
 */
@import "tailwindcss" source(none);
@source "../src";
@import "tw-animate-css";

@custom-variant dark (&:is(.dark *));

/*
 * Design system definition.
 *
 * The design lives in this file: oklch color tokens on the shadcn variables
 * (--background, --foreground, --primary, --secondary, --muted, --accent, ...) plus
 * new tokens as needed, font tokens, and custom styles and animations.
 *
 * The @theme inline block maps CSS custom properties to Tailwind utility
 * classes (e.g. --color-primary -> bg-primary, text-primary).
 *
 * The :root and .dark blocks define the actual color values using oklch.
 * All colors MUST use oklch format.
 *
 * To add a new semantic color:
 * 1. Add the variable to :root (light value) and .dark (dark value)
 * 2. Register it in @theme inline as --color-<name>: var(--<name>)
 */

@theme inline {
  --radius-sm: calc(var(--radius) - 4px);
  --radius-md: calc(var(--radius) - 2px);
  --radius-lg: var(--radius);
  --radius-xl: calc(var(--radius) + 4px);
  --radius-2xl: calc(var(--radius) + 8px);
  --radius-3xl: calc(var(--radius) + 12px);
  --radius-4xl: calc(var(--radius) + 16px);
  --color-background: var(--background);
  --color-foreground: var(--foreground);
  --color-card: var(--card);
  --color-card-foreground: var(--card-foreground);
  --color-popover: var(--popover);
  --color-popover-foreground: var(--popover-foreground);
  --color-primary: var(--primary);
  --color-primary-foreground: var(--primary-foreground);
  --color-secondary: var(--secondary);
  --color-secondary-foreground: var(--secondary-foreground);
  --color-muted: var(--muted);
  --color-muted-foreground: var(--muted-foreground);
  --color-accent: var(--accent);
  --color-accent-foreground: var(--accent-foreground);
  --color-destructive: var(--destructive);
  --color-destructive-foreground: var(--destructive-foreground);
  --color-border: var(--border);
  --color-input: var(--input);
  --color-ring: var(--ring);
  --color-ring-offset-background: var(--background);
  --color-chart-1: var(--chart-1);
  --color-chart-2: var(--chart-2);
  --color-chart-3: var(--chart-3);
  --color-chart-4: var(--chart-4);
  --color-chart-5: var(--chart-5);
  --color-ink: var(--ink);
  --color-ink-foreground: var(--ink-foreground);
  --color-silver: var(--silver);
  --font-display: "Montserrat", system-ui, sans-serif;
  --font-sans: "Montserrat", system-ui, sans-serif;
  --color-sidebar: var(--sidebar);
  --color-sidebar-foreground: var(--sidebar-foreground);
  --color-sidebar-primary: var(--sidebar-primary);
  --color-sidebar-primary-foreground: var(--sidebar-primary-foreground);
  --color-sidebar-accent: var(--sidebar-accent);
  --color-sidebar-accent-foreground: var(--sidebar-accent-foreground);
  --color-sidebar-border: var(--sidebar-border);
  --color-sidebar-ring: var(--sidebar-ring);
}

:root {
  --radius: 0.375rem;
  --background: oklch(1 0 0);
  --foreground: oklch(0.18 0 0);
  --card: oklch(1 0 0);
  --card-foreground: oklch(0.22 0.03 220);
  --popover: oklch(1 0 0);
  --popover-foreground: oklch(0.22 0.03 220);
  --primary: oklch(0.66 0.11 205);
  --primary-foreground: oklch(0.99 0 0);
  --secondary: oklch(0.97 0 0);
  --secondary-foreground: oklch(0.25 0.03 220);
  --muted: oklch(0.95 0 0);
  --muted-foreground: oklch(0.45 0 0);
  --accent: oklch(0.72 0.11 205);
  --accent-foreground: oklch(0.99 0 0);
  --destructive: oklch(0.577 0.245 27.325);
  --destructive-foreground: oklch(0.99 0 0);
  --border: oklch(0.89 0.01 220);
  --input: oklch(0.89 0.01 220);
  --ring: oklch(0.66 0.11 205);
  --ink: oklch(0.12 0 0);
  --ink-foreground: oklch(0.99 0 0);
  --silver: oklch(0.82 0.01 230);
  --gradient-silver: linear-gradient(120deg, oklch(0.95 0.005 230), oklch(0.8 0.015 230), oklch(0.95 0.005 230));
  --chart-1: oklch(0.646 0.222 41.116);
  --chart-2: oklch(0.6 0.118 184.704);
  --chart-3: oklch(0.398 0.07 227.392);
  --chart-4: oklch(0.828 0.189 84.429);
  --chart-5: oklch(0.769 0.188 70.08);
  --sidebar: oklch(0.984 0.003 247.858);
  --sidebar-foreground: oklch(0.129 0.042 264.695);
  --sidebar-primary: oklch(0.208 0.042 265.755);
  --sidebar-primary-foreground: oklch(0.984 0.003 247.858);
  --sidebar-accent: oklch(0.968 0.007 247.896);
  --sidebar-accent-foreground: oklch(0.208 0.042 265.755);
  --sidebar-border: oklch(0.929 0.013 255.508);
  --sidebar-ring: oklch(0.704 0.04 256.788);
}

.dark {
  --background: oklch(0.129 0.042 264.695);
  --foreground: oklch(0.984 0.003 247.858);
  --card: oklch(0.208 0.042 265.755);
  --card-foreground: oklch(0.984 0.003 247.858);
  --popover: oklch(0.208 0.042 265.755);
  --popover-foreground: oklch(0.984 0.003 247.858);
  --primary: oklch(0.929 0.013 255.508);
  --primary-foreground: oklch(0.208 0.042 265.755);
  --secondary: oklch(0.279 0.041 260.031);
  --secondary-foreground: oklch(0.984 0.003 247.858);
  --muted: oklch(0.279 0.041 260.031);
  --muted-foreground: oklch(0.704 0.04 256.788);
  --accent: oklch(0.279 0.041 260.031);
  --accent-foreground: oklch(0.984 0.003 247.858);
  --destructive: oklch(0.704 0.191 22.216);
  --destructive-foreground: oklch(0.984 0.003 247.858);
  --border: oklch(1 0 0 / 10%);
  --input: oklch(1 0 0 / 15%);
  --ring: oklch(0.551 0.027 264.364);
  --chart-1: oklch(0.488 0.243 264.376);
  --chart-2: oklch(0.696 0.17 162.48);
  --chart-3: oklch(0.769 0.188 70.08);
  --chart-4: oklch(0.627 0.265 303.9);
  --chart-5: oklch(0.645 0.246 16.439);
  --sidebar: oklch(0.208 0.042 265.755);
  --sidebar-foreground: oklch(0.984 0.003 247.858);
  --sidebar-primary: oklch(0.488 0.243 264.376);
  --sidebar-primary-foreground: oklch(0.984 0.003 247.858);
  --sidebar-accent: oklch(0.279 0.041 260.031);
  --sidebar-accent-foreground: oklch(0.984 0.003 247.858);
  --sidebar-border: oklch(1 0 0 / 10%);
  --sidebar-ring: oklch(0.551 0.027 264.364);
}

@layer base {
  * {
    border-color: var(--color-border);
  }

  body {
    background-color: var(--color-background);
    color: var(--color-foreground);
  }
}

@layer base {
  h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 700; letter-spacing: -0.01em; }
}
.text-silver-gradient { background: var(--gradient-silver); -webkit-background-clip: text; background-clip: text; color: transparent; }
.prose-post { font-size: 1.125rem; line-height: 1.8; }
.prose-post p, .prose-post ul, .prose-post ol { margin: 0 0 1.25rem; }
.prose-post ul { list-style: disc; padding-left: 1.5rem; }
.prose-post ol { list-style: decimal; padding-left: 1.5rem; }
.prose-post h2, .prose-post h3 { font-size: 1.6rem; margin: 2.5rem 0 1rem; line-height: 1.2; }
.prose-post a { color: var(--primary); text-decoration: underline; }
.prose-post img { border-radius: var(--radius); margin: 1.5rem 0; height: auto; }
.prose-post .video { aspect-ratio: 16/9; margin: 2rem 0; border-radius: var(--radius); overflow: hidden; }
.prose-post .video iframe { width: 100%; height: 100%; }
.prose-post blockquote { border-left: 4px solid var(--accent); padding-left: 1.25rem; font-style: italic; }

.bg-teal-band { background: linear-gradient(135deg, oklch(0.5 0.09 210), oklch(0.6 0.1 205)); }
.hero-dots { background-image: radial-gradient(oklch(1 0 0 / 0.06) 1px, transparent 1px); background-size: 22px 22px; }
.slant-bottom { clip-path: polygon(0 0, 100% 0, 100% 88%, 0 100%); }
.prose-policy h2 { font-size: 1.6rem; margin: 2.5rem 0 1rem; }
.prose-policy h3 { font-size: 1.25rem; margin: 2rem 0 .75rem; }
.prose-policy p, .prose-policy ul, .prose-policy ol { margin: 0 0 1rem; line-height: 1.75; }
.prose-policy ul { list-style: disc; padding-left: 1.5rem; }
.prose-policy ol { list-style: decimal; padding-left: 1.5rem; }
.prose-policy a { color: var(--primary); text-decoration: underline; }
.prose-policy table { width: 100%; border-collapse: collapse; margin: 1rem 0; }
.prose-policy td, .prose-policy th { border: 1px solid var(--border); padding: .5rem; }
