@import 'tailwindcss';
@import 'tw-animate-css';

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

:root {
  --background: #000000;
  --foreground: oklch(0.94 0.005 90);
  --card: oklch(0.09 0.008 260);
  --card-foreground: oklch(0.94 0.005 90);
  --popover: oklch(0.09 0.008 260);
  --popover-foreground: oklch(0.94 0.005 90);
  --primary: #F0405A;
  --primary-foreground: #ffffff;
  --secondary: #6055C8;
  --secondary-foreground: #ffffff;
  --muted: oklch(0.12 0.008 260);
  --muted-foreground: oklch(0.55 0.015 90);
  --accent: #A04AAA;
  --accent-foreground: #ffffff;
  --destructive: oklch(0.577 0.245 27.325);
  --destructive-foreground: oklch(0.94 0.005 90);
  --border: oklch(0.18 0.008 260);
  --input: oklch(0.14 0.008 260);
  --ring: #F0405A;
  --chart-1: #F0405A;
  --chart-2: #A04AAA;
  --chart-3: #6055C8;
  --chart-4: #D06080;
  --chart-5: #7A6BAA;
  --radius: 0.25rem;
  --sidebar: #000000;
  --sidebar-foreground: oklch(0.94 0.005 90);
  --sidebar-primary: #F0405A;
  --sidebar-primary-foreground: #ffffff;
  --sidebar-accent: #A04AAA;
  --sidebar-accent-foreground: #ffffff;
  --sidebar-border: oklch(0.18 0.008 260);
  --sidebar-ring: #F0405A;
}

@theme inline {
  --font-sans: var(--font-instrument), 'Instrument Sans', system-ui, sans-serif;
  --font-mono: var(--font-jetbrains), 'JetBrains Mono', monospace;
  --font-display: var(--font-instrument-serif), 'Instrument Serif', Georgia, serif;
  --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-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);
  --radius-sm: calc(var(--radius) - 4px);
  --radius-md: calc(var(--radius) - 2px);
  --radius-lg: var(--radius);
  --radius-xl: calc(var(--radius) + 4px);
  --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);
}

@layer base {
  * {
    @apply border-border outline-ring/50;
  }
  body {
    @apply bg-background text-foreground;
  }
  html {
    scroll-behavior: smooth;
  }
}

@layer utilities {
  .font-display {
    font-family: var(--font-display);
  }
  
  .text-stroke {
    -webkit-text-stroke: 1.5px currentColor;
    -webkit-text-fill-color: transparent;
  }
  
  .marquee {
    animation: marquee 30s linear infinite;
  }
  
  .marquee-reverse {
    animation: marquee-reverse 25s linear infinite;
  }

  @keyframes marquee {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
  }
  
  @keyframes marquee-reverse {
    0% { transform: translateX(-50%); }
    100% { transform: translateX(0); }
  }
  
  .line-reveal {
    clip-path: inset(0 100% 0 0);
    animation: line-reveal 0.8s cubic-bezier(0.77, 0, 0.175, 1) forwards;
  }
  
  @keyframes line-reveal {
    to { clip-path: inset(0 0 0 0); }
  }
  
  .hover-lift {
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
  }
  
  .hover-lift:hover {
    transform: translateY(-4px);
  }
  
  .letter-spin {
    display: inline-block;
    transition: transform 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
  }
  
  .letter-spin:hover {
    transform: rotateY(360deg);
  }
  
  .animate-char-in {
    animation: char-in 0.4s cubic-bezier(0.22, 1, 0.36, 1) forwards;
    opacity: 0;
    transform: translateY(60%);
  }
  
  @keyframes char-in {
    0% {
      opacity: 0;
      transform: translateY(60%);
    }
    100% {
      opacity: 1;
      transform: translateY(0);
    }
  }

  .noise-overlay {
    position: relative;
  }
  
  .noise-overlay::after {
    content: '';
    position: absolute;
    inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
    opacity: 0.03;
    pointer-events: none;
    z-index: 1;
  }
  
  .how-it-works-bg {
    background-color: oklch(0.10 0.008 260);
  }

  .word-gradient {
    background: linear-gradient(
      135deg,
      #F0405A 0%,
      #A04AAA 50%,
      #6055C8 100%
    );
    background-size: 200% 200%;
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
  }

  /* Brand gradient border utility */
  .brand-border {
    border-image: linear-gradient(135deg, #F0405A, #A04AAA, #6055C8) 1;
  }

  /* Brand glow utilities */
  .glow-primary {
    box-shadow: 0 0 40px rgba(240, 64, 90, 0.15);
  }
  .glow-accent {
    box-shadow: 0 0 40px rgba(160, 74, 170, 0.15);
  }
  .glow-secondary {
    box-shadow: 0 0 40px rgba(96, 85, 200, 0.15);
  }

  .static-page-content h2 {
    font-family: var(--font-display);
    font-size: clamp(1.5rem, 3vw, 2.25rem);
    line-height: 1.15;
    letter-spacing: -0.02em;
    margin-top: 2.5em;
    margin-bottom: 0.6em;
    background: linear-gradient(135deg, #F0405A 0%, #A04AAA 50%, #6055C8 100%);
    background-size: 200% 200%;
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
  }

  .static-page-content h3 {
    font-size: 1.15rem;
    font-weight: 600;
    letter-spacing: -0.01em;
    margin-top: 2em;
    margin-bottom: 0.5em;
    color: oklch(0.92 0.01 90);
  }

  .static-page-content p {
    margin-bottom: 1.25em;
    line-height: 1.8;
    color: oklch(0.65 0.015 90);
    font-size: 1.05rem;
  }

  .static-page-content a {
    color: #F0405A;
    text-decoration: none;
    border-bottom: 1px solid rgba(240, 64, 90, 0.3);
    transition: border-color 0.3s ease;
  }

  .static-page-content a:hover {
    border-bottom-color: #F0405A;
  }

  .static-page-content ul,
  .static-page-content ol {
    margin-bottom: 1.5em;
    padding-left: 1.5em;
    color: oklch(0.65 0.015 90);
    line-height: 1.8;
  }

  .static-page-content li {
    margin-bottom: 0.35em;
  }

  .static-page-content li::marker {
    color: #F0405A;
  }

  .static-page-content strong {
    color: oklch(0.92 0.01 90);
    font-weight: 600;
  }

  .static-page-content blockquote {
    border-left: 3px solid;
    border-image: linear-gradient(180deg, #F0405A, #A04AAA) 1;
    padding-left: 1.25em;
    margin: 1.5em 0;
    font-style: italic;
    color: oklch(0.7 0.015 90);
  }

  .static-page-content hr {
    border: none;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(160, 74, 170, 0.3), transparent);
    margin: 2.5em 0;
  }

  .static-page-content code {
    font-family: var(--font-mono);
    font-size: 0.85em;
    background: oklch(0.14 0.008 260);
    padding: 0.15em 0.4em;
    border-radius: 4px;
    color: #A04AAA;
  }

  .static-page-content pre {
    background: oklch(0.08 0.008 260);
    border: 1px solid oklch(0.15 0.008 260);
    border-radius: 12px;
    padding: 1.5em;
    overflow-x: auto;
    margin: 1.5em 0;
    font-family: var(--font-mono);
    font-size: 0.9rem;
    line-height: 1.6;
  }

  .static-page-content img {
    border-radius: 12px;
    border: 1px solid oklch(0.15 0.008 260);
    margin: 2em 0;
    max-width: 100%;
    height: auto;
  }

  .static-page-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5em 0;
    font-size: 0.95rem;
  }

  .static-page-content th {
    text-align: left;
    font-weight: 600;
    color: oklch(0.9 0.01 90);
    border-bottom: 1px solid oklch(0.18 0.008 260);
    padding: 0.75em 1em;
  }

  .static-page-content td {
    border-bottom: 1px solid oklch(0.12 0.008 260);
    padding: 0.75em 1em;
    color: oklch(0.65 0.015 90);
  }

  .static-page-content > *:first-child {
    margin-top: 0;
  }
}
