@import "tailwindcss" source(none);
@source "../src";
@import "tw-animate-css";

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

/*
 * PrimeView Design System
 * ------------------------------------------------------------------
 * Enterprise-grade tokens. All colors in OKLCH. Brand colors map to:
 *   --brand-500  #109FE3   primary brand cyan
 *   --brand-400  #1AA7EC   bright cyan (hover / glow)
 *   --neutral-500 #707070  mid neutral
 *   --ink         #191818  near-black ink
 *
 * Border radius scale (modern enterprise):
 *   sm 8 | md 12 (buttons, inputs) | lg 16 (cards) | xl 24 (containers)
 *
 * Spacing rhythm uses Tailwind defaults; section padding standard is
 * py-20 md:py-28.
 */

@theme inline {
  /* Radii */
  --radius: 1rem; /* 16px - card default */
  --radius-sm: 0.5rem; /* 8px */
  --radius-md: 0.75rem; /* 12px - buttons & inputs */
  --radius-lg: 1rem; /* 16px - cards */
  --radius-xl: 1.5rem; /* 24px - containers */
  --radius-2xl: 2rem;
  --radius-3xl: 2.5rem;
  --radius-4xl: 3rem;

  /* Semantic colors */
  --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);

  /* Brand scale */
  --color-brand: var(--brand-500);
  --color-brand-foreground: oklch(1 0 0);
  --color-brand-50: var(--brand-50);
  --color-brand-100: var(--brand-100);
  --color-brand-200: var(--brand-200);
  --color-brand-300: var(--brand-300);
  --color-brand-400: var(--brand-400);
  --color-brand-500: var(--brand-500);
  --color-brand-600: var(--brand-600);
  --color-brand-700: var(--brand-700);

  /* Ink scale */
  --color-ink: var(--ink);
  --color-ink-muted: var(--ink-muted);
  --color-surface: var(--surface);
  --color-surface-2: var(--surface-2);
  --color-surface-dark: var(--surface-dark);
  --color-surface-dark-foreground: var(--surface-dark-foreground);
  --color-hairline: var(--hairline);

  /* Trust / credibility accent colors */
  --color-trust-green: var(--trust-green);
  --color-trust-green-bg: var(--trust-green-bg);
  --color-trust-green-bg-hover: var(--trust-green-bg-hover);
  --color-trust-amber: var(--trust-amber);
  --color-trust-amber-bg: var(--trust-amber-bg);
  --color-trust-amber-bg-hover: var(--trust-amber-bg-hover);
  --color-trust-rose: var(--trust-rose);
  --color-trust-rose-bg: var(--trust-rose-bg);
  --color-trust-rose-bg-hover: var(--trust-rose-bg-hover);

  /* Problem-card title accent */
  --color-problem-yellow: var(--problem-yellow);

  --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-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);

  /* Typography */
  --font-sans: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI",
    Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-display: "Inter", ui-sans-serif, system-ui, sans-serif;

  /* Elevation - subtle only */
  --shadow-xs: 0 1px 2px 0 oklch(0.18 0 0 / 0.04);
  --shadow-sm: 0 1px 2px 0 oklch(0.18 0 0 / 0.05),
    0 1px 3px 0 oklch(0.18 0 0 / 0.04);
  --shadow-md: 0 2px 6px -1px oklch(0.18 0 0 / 0.06),
    0 4px 12px -2px oklch(0.18 0 0 / 0.06);
  --shadow-lg: 0 8px 24px -8px oklch(0.18 0 0 / 0.10),
    0 4px 12px -4px oklch(0.18 0 0 / 0.06);
  --shadow-brand: 0 10px 30px -10px oklch(0.66 0.14 232 / 0.45);
}

:root {
  /* Brand cyan (#109FE3 family) */
  --brand-50: oklch(0.97 0.02 232);
  --brand-100: oklch(0.93 0.04 232);
  --brand-200: oklch(0.86 0.07 232);
  --brand-300: oklch(0.78 0.10 232);
  --brand-400: oklch(0.71 0.13 232); /* #1AA7EC */
  --brand-500: oklch(0.66 0.14 232); /* #109FE3 */
  --brand-600: oklch(0.56 0.13 232);
  --brand-700: oklch(0.46 0.11 232);

  /* Ink + neutral scale */
  --ink: oklch(0.18 0 0); /* #191818 */
  --ink-muted: oklch(0.52 0 0); /* #707070 */
  --surface: oklch(1 0 0);
  --surface-2: oklch(0.985 0 0);
  --surface-dark: oklch(0.18 0.06 240);
  --surface-dark-foreground: oklch(0.98 0 0);
  --hairline: oklch(0.92 0 0);

  /* Trust / credibility accent colors */
  --trust-green: oklch(69.6% 0.17 162.48);
  --trust-green-bg: oklch(69.6% 0.17 162.48 / 0.10);
  --trust-green-bg-hover: oklch(69.6% 0.17 162.48 / 0.15);
  --trust-amber: oklch(76.9% 0.188 70.08);
  --trust-amber-bg: oklch(76.9% 0.188 70.08 / 0.10);
  --trust-amber-bg-hover: oklch(76.9% 0.188 70.08 / 0.15);
  --trust-rose: oklch(64.5% 0.246 16.439);
  --trust-rose-bg: oklch(64.5% 0.246 16.439 / 0.10);
  --trust-rose-bg-hover: oklch(64.5% 0.246 16.439 / 0.15);

  /* Problem-card title accent */
  --problem-yellow: oklch(0.78 0.14 85);

  /* Semantic mapping */
  --background: oklch(1 0 0);
  --foreground: var(--ink);
  --card: oklch(1 0 0);
  --card-foreground: var(--ink);
  --popover: oklch(1 0 0);
  --popover-foreground: var(--ink);

  --primary: var(--brand-500);
  --primary-foreground: oklch(1 0 0);

  --secondary: oklch(0.97 0.005 240);
  --secondary-foreground: var(--ink);

  --muted: oklch(0.97 0.005 240);
  --muted-foreground: var(--ink-muted);

  --accent: oklch(0.965 0.01 232);
  --accent-foreground: var(--brand-700);

  --destructive: oklch(0.58 0.22 27);
  --destructive-foreground: oklch(1 0 0);

  --border: var(--hairline);
  --input: var(--hairline);
  --ring: var(--brand-500);

  --chart-1: var(--brand-500);
  --chart-2: oklch(0.55 0.12 200);
  --chart-3: oklch(0.65 0.15 260);
  --chart-4: oklch(0.75 0.13 180);
  --chart-5: oklch(0.45 0.10 232);

  --sidebar: oklch(0.99 0 0);
  --sidebar-foreground: var(--ink);
  --sidebar-primary: var(--brand-500);
  --sidebar-primary-foreground: oklch(1 0 0);
  --sidebar-accent: oklch(0.96 0.005 240);
  --sidebar-accent-foreground: var(--ink);
  --sidebar-border: var(--hairline);
  --sidebar-ring: var(--brand-500);
}

.dark {
  --ink: oklch(0.98 0 0);
  --ink-muted: oklch(0.7 0 0);
  --surface: oklch(0.18 0 0);
  --surface-2: oklch(0.22 0 0);
  --hairline: oklch(1 0 0 / 0.10);

  /* Trust / credibility accent colors (same hues, tuned for dark surfaces) */
  --trust-green: oklch(74.6% 0.18 162.48);
  --trust-green-bg: oklch(74.6% 0.18 162.48 / 0.12);
  --trust-green-bg-hover: oklch(74.6% 0.18 162.48 / 0.18);
  --trust-amber: oklch(81.9% 0.198 70.08);
  --trust-amber-bg: oklch(81.9% 0.198 70.08 / 0.12);
  --trust-amber-bg-hover: oklch(81.9% 0.198 70.08 / 0.18);
  --trust-rose: oklch(69.5% 0.256 16.439);
  --trust-rose-bg: oklch(69.5% 0.256 16.439 / 0.12);
  --trust-rose-bg-hover: oklch(69.5% 0.256 16.439 / 0.18);

  /* Problem-card title accent */
  --problem-yellow: oklch(0.82 0.15 85);

  --background: oklch(0.14 0.005 240);
  --foreground: oklch(0.98 0 0);
  --card: oklch(0.18 0.005 240);
  --card-foreground: oklch(0.98 0 0);
  --popover: oklch(0.18 0.005 240);
  --popover-foreground: oklch(0.98 0 0);

  --primary: var(--brand-400);
  --primary-foreground: oklch(0.14 0.005 240);

  --secondary: oklch(0.24 0.01 240);
  --secondary-foreground: oklch(0.98 0 0);
  --muted: oklch(0.24 0.01 240);
  --muted-foreground: oklch(0.7 0 0);
  --accent: oklch(0.28 0.04 232);
  --accent-foreground: oklch(0.98 0 0);

  --destructive: oklch(0.7 0.19 22);
  --destructive-foreground: oklch(0.98 0 0);

  --border: oklch(1 0 0 / 0.10);
  --input: oklch(1 0 0 / 0.15);
  --ring: var(--brand-400);

  --sidebar: oklch(0.18 0.005 240);
  --sidebar-foreground: oklch(0.98 0 0);
  --sidebar-primary: var(--brand-400);
  --sidebar-primary-foreground: oklch(0.14 0.005 240);
  --sidebar-accent: oklch(0.24 0.01 240);
  --sidebar-accent-foreground: oklch(0.98 0 0);
  --sidebar-border: oklch(1 0 0 / 0.10);
  --sidebar-ring: var(--brand-400);
}

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

  html {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
  }

  body {
    background-color: var(--color-background);
    color: var(--color-foreground);
    font-family: var(--font-sans);
    font-feature-settings: "cv11", "ss01", "ss03";
  }

  ::selection {
    background-color: oklch(0.66 0.14 232 / 0.25);
    color: var(--ink);
  }

  /* Visible focus rings on every interactive element */
  :focus-visible {
    outline: 2px solid var(--brand-500);
    outline-offset: 2px;
    border-radius: 4px;
  }
}

/* ------------------------------------------------------------------
 * Typography utilities
 * ------------------------------------------------------------------ */
@utility text-display {
  font-family: var(--font-display);
  font-size: clamp(2.75rem, 5.5vw + 0.5rem, 4.75rem);
  line-height: 1.04;
  letter-spacing: -0.035em;
  font-weight: 700;
}
@utility text-h1 {
  font-size: clamp(2rem, 3vw + 0.5rem, 3rem);
  line-height: 1.08;
  letter-spacing: -0.028em;
  font-weight: 700;
}
@utility text-h2 {
  font-size: clamp(1.625rem, 2vw + 0.5rem, 2.25rem);
  line-height: 1.15;
  letter-spacing: -0.022em;
  font-weight: 600;
}
@utility text-h3 {
  font-size: clamp(1.25rem, 1vw + 0.75rem, 1.5rem);
  line-height: 1.25;
  letter-spacing: -0.015em;
  font-weight: 600;
}
@utility text-h4 {
  font-size: 1.125rem;
  line-height: 1.3;
  letter-spacing: -0.01em;
  font-weight: 600;
}
@utility text-body-lg {
  font-size: 1.125rem;
  line-height: 1.65;
  letter-spacing: -0.005em;
}
@utility text-body {
  font-size: 1rem;
  line-height: 1.6;
}
@utility text-caption {
  font-size: 0.8125rem;
  line-height: 1.45;
  letter-spacing: 0.005em;
  color: var(--ink-muted);
}
@utility text-eyebrow {
  font-size: 0.75rem;
  line-height: 1;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-weight: 600;
}

/* Container */
@utility container-pv {
  width: 100%;
  margin-inline: auto;
  padding-inline: 1.25rem;
  max-width: 80rem; /* 1280px - 12 col grid host */
}
@media (min-width: 768px) {
  .container-pv {
    padding-inline: 2rem;
  }
}

/* Subtle elevation card hover */
@utility card-hover {
  transition:
    transform 200ms cubic-bezier(0.2, 0.8, 0.2, 1),
    box-shadow 200ms cubic-bezier(0.2, 0.8, 0.2, 1),
    border-color 200ms;
}
.card-hover:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
  border-color: oklch(0.66 0.14 232 / 0.35);
}

/* Soft brand glow */
@utility ring-brand {
  box-shadow: 0 0 0 1px var(--brand-500),
    0 0 0 4px oklch(0.66 0.14 232 / 0.18);
}

/* Reveal-on-scroll: gracefully no-ops without JS */
@utility reveal {
  opacity: 0;
  transform: translateY(12px);
  transition:
    opacity 600ms ease,
    transform 600ms cubic-bezier(0.2, 0.8, 0.2, 1);
}
.reveal.is-visible {
  opacity: 1;
  transform: none;
}

@keyframes pv-fade-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
@utility animate-fade-in {
  animation: pv-fade-in 500ms cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

@keyframes pv-pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.55; transform: scale(0.85); }
}
@utility animate-pulse-dot {
  animation: pv-pulse-dot 1.8s ease-in-out infinite;
}

/* Tech-abstract dot-grid texture overlay */
@utility bg-texture-tech {
  background-image:
    radial-gradient(oklch(0.98 0 0 / 0.035) 1px, transparent 1px);
  background-size: 24px 24px;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    transition-duration: 0.001ms !important;
  }
}
