/*
 * Copied from https://github.com/solana-foundation/design-system
 * Commit: 6dcaea6ad62b2e879ed9daf16055916f0c728f1d
 */

@import "tailwindcss/theme" layer(theme);
@import "tailwindcss/preflight" layer(base);
@import "tailwindcss/utilities" layer(utilities);

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

/* Tailwind-animate utilities for Tailwind v4 */
@keyframes enter {
  from {
    opacity: var(--tw-enter-opacity, 1);
    transform: translate3d(var(--tw-enter-translate-x, 0), var(--tw-enter-translate-y, 0), 0)
      scale3d(var(--tw-enter-scale, 1), var(--tw-enter-scale, 1), var(--tw-enter-scale, 1))
      rotate(var(--tw-enter-rotate, 0));
  }
  to {
    opacity: 1;
    transform: translate3d(0, 0, 0) scale3d(1, 1, 1) rotate(0);
  }
}

@keyframes exit {
  from {
    opacity: 1;
    transform: translate3d(0, 0, 0) scale3d(1, 1, 1) rotate(0);
  }
  to {
    opacity: var(--tw-exit-opacity, 1);
    transform: translate3d(var(--tw-exit-translate-x, 0), var(--tw-exit-translate-y, 0), 0)
      scale3d(var(--tw-exit-scale, 1), var(--tw-exit-scale, 1), var(--tw-exit-scale, 1))
      rotate(var(--tw-exit-rotate, 0));
  }
}

@utility animate-in {
  animation-name: enter;
  animation-duration: 150ms;
  animation-fill-mode: forwards;
  --tw-enter-opacity: initial;
  --tw-enter-scale: initial;
  --tw-enter-rotate: initial;
  --tw-enter-translate-x: initial;
  --tw-enter-translate-y: initial;
}

@utility animate-out {
  animation-name: exit;
  animation-duration: 150ms;
  animation-fill-mode: forwards;
  --tw-exit-opacity: initial;
  --tw-exit-scale: initial;
  --tw-exit-rotate: initial;
  --tw-exit-translate-x: initial;
  --tw-exit-translate-y: initial;
}

@utility fade-in-0 {
  --tw-enter-opacity: 0;
}

@utility fade-out-0 {
  --tw-exit-opacity: 0;
}

@utility zoom-in-95 {
  --tw-enter-scale: 0.95;
}

@utility zoom-out-95 {
  --tw-exit-scale: 0.95;
}

@utility slide-in-from-top-2 {
  --tw-enter-translate-y: -0.5rem;
}

@utility slide-in-from-bottom-2 {
  --tw-enter-translate-y: 0.5rem;
}

@utility slide-in-from-left-2 {
  --tw-enter-translate-x: -0.5rem;
}

@utility slide-in-from-right-2 {
  --tw-enter-translate-x: 0.5rem;
}

@utility slide-out-to-top-2 {
  --tw-exit-translate-y: -0.5rem;
}

@utility slide-out-to-bottom-2 {
  --tw-exit-translate-y: 0.5rem;
}

@utility slide-out-to-left-2 {
  --tw-exit-translate-x: -0.5rem;
}

@utility slide-out-to-right-2 {
  --tw-exit-translate-x: 0.5rem;
}

/* Inline code styling - sand background for code wrapped in `` */
.prose :not(pre) > code,
.prose p code,
.prose li code,
.prose td code,
.prose th code {
  background-color: var(--launch-inline-code-bg) !important;
  color: var(--launch-inline-code-text) !important;
  padding: 0.125rem 0.375rem !important;
  border-radius: 0.375rem !important;
  font-size: 0.75rem !important; /* text-xs */
  border: 1px solid var(--launch-inline-code-border) !important;
  font-family: var(--font-berkeley-mono), ui-monospace, monospace !important;
}

/* Ensure code blocks stay clean - NO background or styling */
.prose pre code,
.prose pre code *,
.prose code[class*="language-"],
.prose code[class*="shiki"],
.prose code[class*="hljs"],
.prose code[class*="prism"] {
  background: transparent !important;
  background-color: transparent !important;
  border: none !important;
  padding: 0 !important;
}

/* Add padding to code blocks */
.prose pre {
  padding-left: 1rem !important;
  padding-right: 1.5rem !important;
}

@keyframes spinner {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

.animate-spinner {
  animation: spinner 0.6s cubic-bezier(0.4, 0, 0.2, 1) infinite;
}

@theme {
  /* Gray palette - references CSS variables for light/dark mode switching */
  --color-gray-50: var(--gray-50);
  --color-gray-100: var(--gray-100);
  --color-gray-200: var(--gray-200);
  --color-gray-300: var(--gray-300);
  --color-gray-400: var(--gray-400);
  --color-gray-500: var(--gray-500);
  --color-gray-600: var(--gray-600);
  --color-gray-700: var(--gray-700);
  --color-gray-800: var(--gray-800);
  --color-gray-900: var(--gray-900);
  --color-gray-1000: var(--gray-1000);
  --color-gray-1100: var(--gray-1100);
  --color-gray-1200: var(--gray-1200);
  --color-gray-1300: var(--gray-1300);
  --color-gray-1400: var(--gray-1400);

  /* Text emphasis scale */
  --color-text-extra-high: var(--text-extra-high);
  --color-text-high: var(--text-high);
  --color-text-medium: var(--text-medium);
  --color-text-low: var(--text-low);
  --color-text-extra-low: var(--text-extra-low);

  /* Border scale */
  --color-border-strongest: var(--border-strongest);
  --color-border-strong: var(--border-strong);
  --color-border-medium: var(--border-medium);
  --color-border-light: var(--border-light);
  --color-border-extra-light: var(--border-extra-light);

  /* Base colors */
  --color-black: var(--black);
  --color-white: var(--white);
}

:root {
  /* Gray palette - Light mode */
  --gray-50: #f6f6f9;
  --gray-100: #ededf3;
  --gray-200: #dbdae5;
  --gray-300: #cbc9d7;
  --gray-400: #bbb8c7;
  --gray-500: #aca8b7;
  --gray-600: #9d98a6;
  --gray-700: #8e8a94;
  --gray-800: #7b7782;
  --gray-900: #69666f;
  --gray-1000: #56555c;
  --gray-1100: #444449;
  --gray-1200: #323236;
  --gray-1300: #212123;
  --gray-1400: #0f0f10;

  /* Base colors */
  --black: #000000;
  --white: #ffffff;

  /* Semantic tokens - Text (emphasis scale using transparency) */
  --text-extra-high: var(--gray-1400);
  --text-high: color-mix(in srgb, var(--gray-1400) 88%, transparent);
  --text-medium: color-mix(in srgb, var(--gray-1400) 72%, transparent);
  --text-low: color-mix(in srgb, var(--gray-1400) 56%, transparent);
  --text-extra-low: color-mix(in srgb, var(--gray-1400) 44%, transparent);

  /* Semantic tokens - Borders (using gray-1300 with transparency) */
  --border-strongest: var(--gray-1300);
  --border-strong: color-mix(in srgb, var(--gray-1300) 48%, transparent);
  --border-medium: color-mix(in srgb, var(--gray-1300) 20%, transparent);
  --border-light: color-mix(in srgb, var(--gray-1300) 12%, transparent);
  --border-extra-light: color-mix(in srgb, var(--gray-1300) 4%, transparent);

  /* Typography - Font Family */
  --font-sans: "Inter Variable", "Inter", system-ui, sans-serif;

  /* ==========================================================================
     Dark Mode Font Weight Compensation

     The irradiation illusion causes light text on dark backgrounds
     to appear 15-25% heavier than intended. We use a weight multiplier
     to reduce the rendered weight in dark mode.

     How it works:
     1. Define base weights (the intended design values)
     2. Apply multiplier: computed_weight = base_weight × multiplier
     3. Light mode: multiplier = 1 (no change)
     4. Dark mode: multiplier = 0.90 (10% reduction)

     Why 0.90?
     - Inter's weights (450/500/550/600) are already custom-tuned
     - 0.90 provides visible improvement with minimal layout shift
     - More aggressive values (0.85) cause noticeable text reflow

     Trade-off accepted:
     - Minor layout shift occurs on theme toggle
     - This is acceptable because toggles are user-initiated
     ========================================================================== */

  /* Weight multiplier (1 = no adjustment, <1 = lighter in dark mode) */
  --fw-mult: 1;

  /* Letter-spacing offset for dark mode (compensates for narrower glyphs) */
  --tracking-dark-offset: 0em;

  /* Base weight values - these are the intended design weights */
  --font-weight-regular-base: 450;
  --font-weight-medium-base: 500;
  --font-weight-semibold-base: 600;
  --font-weight-bold-base: 550;

  /* Typography - Weights (computed: base × multiplier) */
  --font-weight-regular: calc(var(--font-weight-regular-base) * var(--fw-mult));
  --font-weight-medium: calc(var(--font-weight-medium-base) * var(--fw-mult));
  --font-weight-semibold: calc(var(--font-weight-semibold-base) * var(--fw-mult));
  --font-weight-bold: calc(var(--font-weight-bold-base) * var(--fw-mult));

  /* Typography - Tracking */
  --tracking-tight: -0.01em;
  --tracking-normal: 0;
  --tracking-wide: 0.01em;

  /* Typography - Line Heights */
  --leading-none: 1;
  --leading-tight: 1.1;
  --leading-snug: 1.25;
  --leading-normal: 1.5;

  /* Typography - Fluid Sizes (768px → 1440px) */
  --text-display: clamp(36px, calc(36px + (48 - 36) * ((100vw - 768px) / (1440 - 768))), 48px);
  --text-title-xl: clamp(28px, calc(28px + (36 - 28) * ((100vw - 768px) / (1440 - 768))), 36px);
  --text-title-lg: clamp(22px, calc(22px + (28 - 22) * ((100vw - 768px) / (1440 - 768))), 28px);
  --text-title-md: clamp(19px, calc(19px + (24 - 19) * ((100vw - 768px) / (1440 - 768))), 24px);
  --text-title-sm: clamp(16px, calc(16px + (19 - 16) * ((100vw - 768px) / (1440 - 768))), 19px);

  /* Typography - Static Sizes */
  --text-headline-lg: 16px;
  --text-headline-md: 14px;
  --text-body-lg-size: 16px;
  --text-body-md-size: 14px;
  --text-body-sm-size: 12px;
  --text-button-xl: 16px;
  --text-button-lg: 15px;
  --text-button-md: 14px;
  --text-button-sm: 13px;

  /* =============================================================================
     BUTTON TOKENS
     ============================================================================= */

  /* Button Primary - high contrast, inverts in dark mode */
  --button-primary-bg: var(--gray-1400);
  --button-primary-bg-hover: var(--gray-1300);
  --button-primary-bg-active: var(--gray-1100);
  --button-primary-text: var(--white);

  /* Button Secondary - subtle transparency-based fill */
  --button-secondary-bg: color-mix(in srgb, var(--gray-1400) 8%, transparent);
  --button-secondary-bg-hover: color-mix(in srgb, var(--gray-1400) 12%, transparent);
  --button-secondary-bg-active: color-mix(in srgb, var(--gray-1400) 16%, transparent);
  --button-secondary-text: var(--text-high);

  /* Button Focus Ring - solid color for WCAG 2.4.13 compliance (≥3:1 contrast) */
  --button-focus-ring: var(--gray-1200);
  --button-focus-ring-offset: 2px;

  /* Button Heights */
  --button-height-xl: 48px;
  --button-height-lg: 40px;
  --button-height-md: 36px;
  --button-height-sm: 28px;

  /* Button Padding Horizontal */
  --button-padding-x-xl: 20px;
  --button-padding-x-lg: 18px;
  --button-padding-x-md: 12px;
  --button-padding-x-sm: 8px;

  /* Button Padding Horizontal - Round variant */
  --button-padding-x-round-xl: 26px;
  --button-padding-x-round-lg: 22px;
  --button-padding-x-round-md: 16px;
  --button-padding-x-round-sm: 12px;

  /* Button Radii - Default (per size) */
  --button-radius-xl: 12px;
  --button-radius-lg: 10px;
  --button-radius-md: 8px;
  --button-radius-sm: 6px;

  /* Button Icon Sizes */
  --button-icon-xl: 20px;
  --button-icon-lg: 18px;
  --button-icon-md: 16px;
  --button-icon-sm: 14px;

  /* Button Icon Gaps */
  --button-gap-xl: 10px;
  --button-gap-lg: 8px;
  --button-gap-md: 6px;
  --button-gap-sm: 4px;

  --radius: 0.625rem;

  --background: oklch(1 0 0);
  --foreground: oklch(0.145 0 0);
  --card: oklch(1 0 0);
  --card-foreground: oklch(0.145 0 0);
  --popover: oklch(1 0 0);
  --popover-foreground: oklch(0.145 0 0);
  --primary: oklch(0.205 0 0);
  --primary-foreground: oklch(0.985 0 0);
  --secondary: oklch(0.97 0 0);
  --secondary-foreground: oklch(0.205 0 0);
  --muted: oklch(0.97 0 0);
  --muted-foreground: oklch(0.556 0 0);
  --accent: oklch(0.97 0 0);
  --accent-foreground: oklch(0.205 0 0);
  --destructive: oklch(0.577 0.245 27.325);
  --border: oklch(0.922 0 0);
  --input: oklch(0.922 0 0);
  --ring: oklch(0.708 0 0);
  --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.985 0 0);
  --sidebar-foreground: oklch(0.145 0 0);
  --sidebar-primary: oklch(0.205 0 0);
  --sidebar-primary-foreground: oklch(0.985 0 0);
  --sidebar-accent: oklch(0.97 0 0);
  --sidebar-accent-foreground: oklch(0.205 0 0);
  --sidebar-border: oklch(0.922 0 0);
  --sidebar-ring: oklch(0.708 0 0);
}

/* =============================================================================
   TYPOGRAPHY SYSTEM - Inter Variable
   Using fluid scaling for display/titles, static sizes for body/UI text
   ============================================================================= */

/* Display & Titles (Fluid) */
.text-display {
  font-family: var(--font-sans);
  font-size: var(--text-display);
  font-weight: var(--font-weight-medium);
  line-height: var(--leading-tight);
  letter-spacing: var(--tracking-tight);
}

.text-title-xl {
  font-family: var(--font-sans);
  font-size: var(--text-title-xl);
  font-weight: var(--font-weight-medium);
  line-height: var(--leading-tight);
  letter-spacing: var(--tracking-tight);
}

.text-title-lg {
  font-family: var(--font-sans);
  font-size: var(--text-title-lg);
  font-weight: var(--font-weight-medium);
  line-height: var(--leading-tight);
  letter-spacing: var(--tracking-tight);
}

.text-title-md {
  font-family: var(--font-sans);
  font-size: var(--text-title-md);
  font-weight: var(--font-weight-medium);
  line-height: var(--leading-tight);
  letter-spacing: var(--tracking-tight);
}

.text-title-sm {
  font-family: var(--font-sans);
  font-size: var(--text-title-sm);
  font-weight: var(--font-weight-medium);
  line-height: 24px;
  letter-spacing: var(--tracking-tight);
}

/* Headlines (Static) */
.text-headline-lg {
  font-family: var(--font-sans);
  font-size: var(--text-headline-lg);
  font-weight: var(--font-weight-semibold);
  line-height: var(--leading-tight);
  letter-spacing: var(--tracking-tight);
}

.text-headline-md {
  font-family: var(--font-sans);
  font-size: var(--text-headline-md);
  font-weight: var(--font-weight-semibold);
  line-height: var(--leading-tight);
  letter-spacing: var(--tracking-tight);
}

/* Body (Static) */
.text-body-lg {
  font-family: var(--font-sans);
  font-size: var(--text-body-lg-size);
  font-weight: var(--font-weight-regular);
  line-height: var(--leading-normal);
  letter-spacing: var(--tracking-normal);
}

.text-body-lg-bold {
  font-family: var(--font-sans);
  font-size: var(--text-body-lg-size);
  font-weight: var(--font-weight-bold);
  line-height: var(--leading-normal);
  letter-spacing: var(--tracking-normal);
}

.text-body-md {
  font-family: var(--font-sans);
  font-size: var(--text-body-md-size);
  font-weight: var(--font-weight-regular);
  line-height: var(--leading-normal);
  letter-spacing: var(--tracking-tight);
}

.text-body-md-bold {
  font-family: var(--font-sans);
  font-size: var(--text-body-md-size);
  font-weight: var(--font-weight-bold);
  line-height: var(--leading-normal);
  letter-spacing: var(--tracking-tight);
}

.text-body-sm {
  font-family: var(--font-sans);
  font-size: var(--text-body-sm-size);
  font-weight: var(--font-weight-regular);
  line-height: 1.4;
  letter-spacing: var(--tracking-normal);
}

.text-body-sm-bold {
  font-family: var(--font-sans);
  font-size: var(--text-body-sm-size);
  font-weight: var(--font-weight-bold);
  line-height: 1.4;
  letter-spacing: var(--tracking-normal);
}

/* Buttons (Static) */
.text-button-xl {
  font-family: var(--font-sans);
  font-size: var(--text-button-xl);
  font-weight: var(--font-weight-medium);
  line-height: var(--leading-none);
  letter-spacing: var(--tracking-wide);
}

.text-button-lg {
  font-family: var(--font-sans);
  font-size: var(--text-button-lg);
  font-weight: var(--font-weight-medium);
  line-height: var(--leading-none);
  letter-spacing: var(--tracking-wide);
}

.text-button-md {
  font-family: var(--font-sans);
  font-size: var(--text-button-md);
  font-weight: var(--font-weight-medium);
  line-height: var(--leading-none);
  letter-spacing: var(--tracking-wide);
}

.text-button-sm {
  font-family: var(--font-sans);
  font-size: var(--text-button-sm);
  font-weight: var(--font-weight-medium);
  line-height: var(--leading-none);
  letter-spacing: var(--tracking-wide);
}

/* Legacy aliases for backwards compatibility */
.text-h1 {
  font-family: var(--font-sans);
  font-size: var(--text-display);
  font-weight: var(--font-weight-medium);
  line-height: var(--leading-tight);
  letter-spacing: var(--tracking-tight);
}

.text-title-2 {
  font-family: var(--font-sans);
  font-size: var(--text-title-xl);
  font-weight: var(--font-weight-medium);
  line-height: var(--leading-tight);
  letter-spacing: var(--tracking-tight);
}

.text-h2 {
  font-family: var(--font-sans);
  font-size: var(--text-title-lg);
  font-weight: var(--font-weight-medium);
  line-height: var(--leading-tight);
  letter-spacing: var(--tracking-tight);
}

.text-title-4 {
  font-family: var(--font-sans);
  font-size: var(--text-title-md);
  font-weight: var(--font-weight-medium);
  line-height: var(--leading-tight);
  letter-spacing: var(--tracking-tight);
}

.text-title-5 {
  font-family: var(--font-sans);
  font-size: var(--text-title-sm);
  font-weight: var(--font-weight-medium);
  line-height: 24px;
  letter-spacing: var(--tracking-tight);
}

.text-body-l {
  font-family: var(--font-sans);
  font-size: var(--text-body-lg-size);
  font-weight: var(--font-weight-regular);
  line-height: var(--leading-normal);
  letter-spacing: var(--tracking-normal);
}

.text-nav-item {
  font-family: var(--font-sans);
  font-size: var(--text-headline-md);
  font-weight: var(--font-weight-semibold);
  line-height: var(--leading-tight);
  letter-spacing: var(--tracking-tight);
}

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

@theme inline {
  --radius-sm: calc(var(--radius) - 4px);
  --radius-md: calc(var(--radius) - 2px);
  --radius-lg: var(--radius);
  --radius-xl: calc(var(--radius) + 4px);
  --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-border: var(--border);
  --color-input: var(--input);
  --color-ring: var(--ring);
  --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);
  --font-sans: var(--font-sans);
  --font-abc-diatype: var(--font-abc-diatype), system-ui, sans-serif;
  --font-berkeley-mono: var(--font-berkeley-mono), ui-monospace, monospace;
  --font-inter: var(--font-sans);
}

.dark {
  /* ==========================================================================
     Dark Mode Typography Adjustments

     These values counteract the irradiation illusion:
     - Reduce weight by 10% (0.90 multiplier)
     - Add slight letter-spacing to offset narrower glyphs

     Resulting weights in dark mode:
     - Regular: 450 × 0.90 = 405
     - Medium:  500 × 0.90 = 450
     - Bold:    550 × 0.90 = 495
     - Semibold: 600 × 0.90 = 540
     ========================================================================== */
  --fw-mult: 0.9;
  --tracking-dark-offset: 0.01em;

  /* Gray palette - Dark mode */
  --gray-50: #000000;
  --gray-100: #0f0f10;
  --gray-200: #212123;
  --gray-300: #323236;
  --gray-400: #444449;
  --gray-500: #56555c;
  --gray-600: #69666f;
  --gray-700: #7b7782;
  --gray-800: #8e8a94;
  --gray-900: #9b96a3;
  --gray-1000: #a7a3b2;
  --gray-1100: #b4b1c0;
  --gray-1200: #c1bfce;
  --gray-1300: #cfcedb;
  --gray-1400: #dedde7;

  /* Text tokens use white with transparency in dark mode */
  --text-extra-high: var(--white);
  --text-high: color-mix(in srgb, var(--white) 88%, transparent);
  --text-medium: color-mix(in srgb, var(--white) 72%, transparent);
  --text-low: color-mix(in srgb, var(--white) 56%, transparent);
  --text-extra-low: color-mix(in srgb, var(--white) 44%, transparent);

  /* Border tokens use white with transparency in dark mode */
  --border-strongest: var(--gray-1300);
  --border-strong: color-mix(in srgb, var(--white) 48%, transparent);
  --border-medium: color-mix(in srgb, var(--white) 20%, transparent);
  --border-light: color-mix(in srgb, var(--white) 12%, transparent);
  --border-extra-light: color-mix(in srgb, var(--white) 4%, transparent);

  /* Button Primary - inverted for dark mode (white bg, dark text) */
  /* Hover uses subtle dim instead of gray to avoid contrast inversion */
  --button-primary-bg: var(--white);
  --button-primary-bg-hover: color-mix(in srgb, var(--white) 90%, transparent);
  --button-primary-bg-active: var(--gray-300);
  --button-primary-text: var(--black);

  /* Button Secondary - uses white transparency in dark mode */
  --button-secondary-bg: color-mix(in srgb, var(--white) 8%, transparent);
  --button-secondary-bg-hover: color-mix(in srgb, var(--white) 12%, transparent);
  --button-secondary-bg-active: color-mix(in srgb, var(--white) 16%, transparent);
  --button-secondary-text: var(--text-high);

  /* Button Focus Ring - solid white for WCAG 2.4.13 compliance (≥3:1 contrast) */
  --button-focus-ring: var(--white);

  --background: oklch(0.145 0 0);
  --foreground: oklch(0.985 0 0);
  --card: oklch(0.205 0 0);
  --card-foreground: oklch(0.985 0 0);
  --popover: oklch(0.205 0 0);
  --popover-foreground: oklch(0.985 0 0);
  --primary: oklch(0.922 0 0);
  --primary-foreground: oklch(0.205 0 0);
  --secondary: oklch(0.269 0 0);
  --secondary-foreground: oklch(0.985 0 0);
  --muted: oklch(0.269 0 0);
  --muted-foreground: oklch(0.708 0 0);
  --accent: oklch(0.269 0 0);
  --accent-foreground: oklch(0.985 0 0);
  --destructive: oklch(0.704 0.191 22.216);
  --border: oklch(1 0 0 / 10%);
  --input: oklch(1 0 0 / 15%);
  --ring: oklch(0.556 0 0);
  --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.205 0 0);
  --sidebar-foreground: oklch(0.985 0 0);
  --sidebar-primary: oklch(0.488 0.243 264.376);
  --sidebar-primary-foreground: oklch(0.985 0 0);
  --sidebar-accent: oklch(0.269 0 0);
  --sidebar-accent-foreground: oklch(0.985 0 0);
  --sidebar-border: oklch(1 0 0 / 10%);
  --sidebar-ring: oklch(0.556 0 0);
}

@layer base {
  * {
    @apply border-border outline-ring/50;
  }

  body {
    @apply bg-background text-foreground;

    /* ==========================================================================
       Font Smoothing

       Grayscale antialiasing provides consistent rendering:
       - Prevents color fringing from subpixel rendering
       - Especially important on dark backgrounds
       - Standard practice for design systems
       ========================================================================== */
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;

    /* Enable Inter's optical size axis for automatic size-based tuning */
    font-optical-sizing: auto;
  }
}

/* Custom wide-spaced dashed borders using background gradients */
.border-l-dashed-wide {
  background:
    repeating-linear-gradient(
      to bottom,
      oklch(0.927 0.005 286.25) 0px,
      oklch(0.927 0.005 286.25) 12px,
      transparent 12px,
      transparent 24px
    )
    left / 1px 100% no-repeat;
}

.border-r-dashed-wide {
  background:
    repeating-linear-gradient(
      to bottom,
      oklch(0.927 0.005 286.25) 0px,
      oklch(0.927 0.005 286.25) 12px,
      transparent 12px,
      transparent 24px
    )
    right / 1px 100% no-repeat;
}

.border-lr-dashed-wide {
  background:
    repeating-linear-gradient(
      to bottom,
      oklch(0.927 0.005 286.25) 0px,
      oklch(0.927 0.005 286.25) 12px,
      transparent 12px,
      transparent 24px
    )
    left / 1px 100% no-repeat,
    repeating-linear-gradient(
      to bottom,
      oklch(0.927 0.005 286.25) 0px,
      oklch(0.927 0.005 286.25) 12px,
      transparent 12px,
      transparent 24px
    )
    right / 1px 100% no-repeat;
}

.border-horizontal-dashed-wide {
  background:
    repeating-linear-gradient(
      to right,
      oklch(0.927 0.005 286.25) 0px,
      oklch(0.927 0.005 286.25) 12px,
      transparent 12px,
      transparent 24px
    )
    top / 100% 1px no-repeat,
    repeating-linear-gradient(
      to right,
      oklch(0.927 0.005 286.25) 0px,
      oklch(0.927 0.005 286.25) 12px,
      transparent 12px,
      transparent 24px
    )
    bottom / 100% 1px no-repeat;
}

.border-vertical-dashed-wide {
  background:
    repeating-linear-gradient(
      to bottom,
      oklch(0.927 0.005 286.25) 0px,
      oklch(0.927 0.005 286.25) 12px,
      transparent 12px,
      transparent 24px
    )
    center / 1px 100% no-repeat;
}

/* Border medium dashed - 6px dash + 6px gap */
.border-all-dashed-medium {
  background:
    repeating-linear-gradient(
      to right,
      oklch(0.884 0.007 286.25) 0px,
      oklch(0.884 0.007 286.25) 6px,
      transparent 6px,
      transparent 12px
    )
    top / 100% 1px no-repeat,
    repeating-linear-gradient(
      to right,
      oklch(0.884 0.007 286.25) 0px,
      oklch(0.884 0.007 286.25) 6px,
      transparent 6px,
      transparent 12px
    )
    bottom / 100% 1px no-repeat,
    repeating-linear-gradient(
      to bottom,
      oklch(0.884 0.007 286.25) 0px,
      oklch(0.884 0.007 286.25) 6px,
      transparent 6px,
      transparent 12px
    )
    left / 1px 100% no-repeat,
    repeating-linear-gradient(
      to bottom,
      oklch(0.884 0.007 286.25) 0px,
      oklch(0.884 0.007 286.25) 6px,
      transparent 6px,
      transparent 12px
    )
    right / 1px 100% no-repeat;
}

.border-lr-dashed-medium {
  background:
    repeating-linear-gradient(
      to bottom,
      oklch(0.884 0.007 286.25) 0px,
      oklch(0.884 0.007 286.25) 6px,
      transparent 6px,
      transparent 12px
    )
    left / 1px 100% no-repeat,
    repeating-linear-gradient(
      to bottom,
      oklch(0.884 0.007 286.25) 0px,
      oklch(0.884 0.007 286.25) 6px,
      transparent 6px,
      transparent 12px
    )
    right / 1px 100% no-repeat;
}

/* Product card diagonal background - fade in on hover using opacity */
.product-card-diagonal {
  position: relative;
  background-image: repeating-linear-gradient(
    45deg,
    transparent,
    transparent 6px,
    oklch(0.884 0.007 286.25 / 0.5) 6px,
    oklch(0.884 0.007 286.25 / 0.5) 7px
  );
  transition: background-image 0.2s ease-in-out;
}

.product-card-diagonal::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: repeating-linear-gradient(
    45deg,
    transparent,
    transparent 6px,
    oklch(0.884 0.007 286.25) 6px,
    oklch(0.884 0.007 286.25) 7px
  );
  opacity: 0;
  transition: opacity 180ms ease-in-out;
  pointer-events: none;
}

.group:hover .product-card-diagonal::before {
  opacity: 1;
}

/* ABC Diatype font utilities */
.font-diatype {
  font-family: var(--font-abc-diatype);
}

.font-diatype-mono {
  font-family: var(--font-berkeley-mono);
}

.font-berkeley-mono {
  font-family: var(--font-berkeley-mono);
  font-weight: 400;
}

.font-diatype-regular {
  font-family: var(--font-abc-diatype);
  font-weight: 400;
}

.font-diatype-medium {
  font-family: var(--font-abc-diatype);
  font-weight: 500;
}

.font-diatype-bold {
  font-family: var(--font-abc-diatype);
  font-weight: 700;
}

/* Inter Variable font utilities */
.font-sans {
  font-family: var(--font-sans);
}

.font-inter {
  font-family: var(--font-sans);
}

.font-inter-regular {
  font-family: var(--font-sans);
  font-weight: var(--font-weight-regular);
}

.font-inter-medium {
  font-family: var(--font-sans);
  font-weight: var(--font-weight-medium);
}

.font-inter-semibold {
  font-family: var(--font-sans);
  font-weight: var(--font-weight-semibold);
}

.font-inter-bold {
  font-family: var(--font-sans);
  font-weight: var(--font-weight-bold);
}

/* Pulse animations for hero lines and borders */
@keyframes pulse-border-top {
  0% {
    left: -2px;
    opacity: 1;
    filter: blur(0px);
  }

  2% {
    opacity: 1;
    filter: blur(0px);
  }

  98% {
    opacity: 1;
    filter: blur(0px);
  }

  100% {
    left: 100%;
    opacity: 1;
    filter: blur(0px);
  }
}

@keyframes pulse-border-right {
  0% {
    top: -2px;
    opacity: 1;
    filter: blur(0px);
  }

  2% {
    opacity: 1;
    filter: blur(0px);
  }

  98% {
    opacity: 1;
    filter: blur(0px);
  }

  100% {
    top: 100%;
    opacity: 1;
    filter: blur(0px);
  }
}

@keyframes pulse-border-bottom {
  0% {
    right: -2px;
    opacity: 1;
    filter: blur(0px);
  }

  2% {
    opacity: 1;
    filter: blur(0px);
  }

  98% {
    opacity: 1;
    filter: blur(0px);
  }

  100% {
    right: 100%;
    opacity: 1;
    filter: blur(0px);
  }
}

@keyframes pulse-border-left {
  0% {
    bottom: -2px;
    opacity: 1;
    filter: blur(0px);
  }

  2% {
    opacity: 1;
    filter: blur(0px);
  }

  98% {
    opacity: 1;
    filter: blur(0px);
  }

  100% {
    bottom: 100%;
    opacity: 1;
    filter: blur(0px);
  }
}

@keyframes pulse-line-horizontal {
  0% {
    left: 0;
    opacity: 0;
    filter: blur(1px);
  }

  3% {
    opacity: 0.6;
    filter: blur(0.5px);
  }

  10% {
    opacity: 0.9;
    filter: blur(0px);
  }

  90% {
    opacity: 0.9;
    filter: blur(0px);
  }

  97% {
    opacity: 0.6;
    filter: blur(0.5px);
  }

  100% {
    left: 100%;
    opacity: 0;
    filter: blur(1px);
  }
}

@keyframes pulse-line-vertical {
  0% {
    top: 0;
    opacity: 0;
    filter: blur(1px);
  }

  3% {
    opacity: 0.6;
    filter: blur(0.5px);
  }

  10% {
    opacity: 0.9;
    filter: blur(0px);
  }

  90% {
    opacity: 0.9;
    filter: blur(0px);
  }

  97% {
    opacity: 0.6;
    filter: blur(0.5px);
  }

  100% {
    top: 100%;
    opacity: 0;
    filter: blur(1px);
  }
}

.pulse-border-top {
  animation: pulse-border-top 4s ease-in-out infinite;
  animation-delay: 0s;
}

.pulse-border-right {
  animation: pulse-border-right 4s ease-in-out infinite;
  animation-delay: 1s;
}

.pulse-border-bottom {
  animation: pulse-border-bottom 4s ease-in-out infinite;
  animation-delay: 2s;
}

.pulse-border-left {
  animation: pulse-border-left 4s ease-in-out infinite;
  animation-delay: 3s;
}

.pulse-line-horizontal-1 {
  animation: pulse-line-horizontal 6s ease-in-out infinite;
  animation-delay: 0.5s;
}

.pulse-line-horizontal-2 {
  animation: pulse-line-horizontal 6s ease-in-out infinite;
  animation-delay: 3.5s;
}

.pulse-line-vertical-1 {
  animation: pulse-line-vertical 6s ease-in-out infinite;
  animation-delay: 1.5s;
}

.pulse-line-vertical-2 {
  animation: pulse-line-vertical 6s ease-in-out infinite;
  animation-delay: 4.5s;
}

/* CTA Illustration Animations - Only float movement */

/* Float loop animations - up and down movement */
@keyframes cta-float {
  0% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-24px);
  }

  100% {
    transform: translateY(0);
  }
}

/* Apply animations to layers with staggered delays */
.cta-layer-1 {
  animation: cta-float 4s cubic-bezier(0.5, 0, 0, 1) 1.8s infinite;
  transform-origin: center;
}

.cta-layer-2 {
  animation: cta-float 4s cubic-bezier(0.5, 0, 0, 1) 2.1s infinite;
  transform-origin: center;
}

.cta-layer-3 {
  animation: cta-float 4s cubic-bezier(0.5, 0, 0, 1) 2.3s infinite;
  transform-origin: center;
}

/* Product Hero Entrance Animations */
@keyframes hero-entrance {
  0% {
    opacity: 0;
    transform: scale(0.8) translateY(10px);
  }

  100% {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.hero-logo {
  animation: hero-entrance 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) 0.1s both;
}

.hero-inner-decoration {
  animation: hero-entrance 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) 0.3s both;
}

.hero-outer-decoration {
  animation: hero-entrance 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) 0.5s both;
}

.hero-title {
  animation: hero-entrance 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) 0.6s both;
}

.hero-description {
  animation: hero-entrance 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) 0.7s both;
}

.hero-actions {
  animation: hero-entrance 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) 0.8s both;
}

/* Logo Grid Illustration Animation */
@keyframes illustration-entrance {
  0% {
    opacity: 0;
    transform: translateY(30px);
  }

  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

.illustration-animate {
  animation: illustration-entrance 0.8s cubic-bezier(0.34, 1.56, 0.64, 1) 0.2s both;
}
