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

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

@theme inline {
    --color-background: var(--background);
    --color-foreground: var(--foreground);
    --font-sans: var(--font-inter);
    --font-mono: var(--font-geist-mono);
    --aspect-video-large: 16 / 13;
    --color-sidebar-ring: var(--sidebar-ring);
    --color-sidebar-border: var(--sidebar-border);
    --color-sidebar-accent-foreground: var(--sidebar-accent-foreground);
    --color-sidebar-accent: var(--sidebar-accent);
    --color-sidebar-primary-foreground: var(--sidebar-primary-foreground);
    --color-sidebar-primary: var(--sidebar-primary);
    --color-sidebar-foreground: var(--sidebar-foreground);
    --color-sidebar: var(--sidebar);
    --color-chart-5: var(--chart-5);
    --color-chart-4: var(--chart-4);
    --color-chart-3: var(--chart-3);
    --color-chart-2: var(--chart-2);
    --color-chart-1: var(--chart-1);
    --color-ring: var(--ring);
    --color-input: var(--input);
    --color-border: var(--border);
    --color-destructive: var(--destructive);
    --color-accent-foreground: var(--accent-foreground);
    --color-accent: var(--accent);
    --color-muted-foreground: var(--muted-foreground);
    --color-muted: var(--muted);
    --color-secondary-foreground: var(--secondary-foreground);
    --color-secondary: var(--secondary);
    --color-primary-foreground: var(--primary-foreground);
    --color-primary: var(--primary);
    --color-popover-foreground: var(--popover-foreground);
    --color-popover: var(--popover);
    --color-card-foreground: var(--card-foreground);
    --color-card: var(--card);
    --radius-sm: calc(var(--radius) - 4px);
    --radius-md: calc(var(--radius) - 2px);
    --radius-lg: var(--radius);
    --radius-xl: calc(var(--radius) + 4px);
    --animate-orbit: orbit calc(var(--duration) * 1s) linear infinite;
    @keyframes orbit {
        0% {
            transform: rotate(calc(var(--angle) * 1deg))
                translateY(calc(var(--radius) * 1px))
                rotate(calc(var(--angle) * -1deg));
        }
        100% {
            transform: rotate(calc(var(--angle) * 1deg + 360deg))
                translateY(calc(var(--radius) * 1px))
                rotate(calc((var(--angle) * -1deg) - 360deg));
        }
    }
    --animate-ripple: ripple var(--duration, 2s) ease calc(var(--i, 0) * 0.2s)
        infinite;
    @keyframes ripple {
        0%,
        100% {
            transform: translate(-50%, -50%) scale(1);
        }
        50% {
            transform: translate(-50%, -50%) scale(0.9);
        }
    }
    --animate-aurora: aurora 8s ease-in-out infinite alternate;
    @keyframes aurora {
        0% {
            background-position: 0% 50%;
            transform: rotate(-5deg) scale(0.9);
        }
        25% {
            background-position: 50% 100%;
            transform: rotate(5deg) scale(1.1);
        }
        50% {
            background-position: 100% 50%;
            transform: rotate(-3deg) scale(0.95);
        }
        75% {
            background-position: 50% 0%;
            transform: rotate(3deg) scale(1.05);
        }
        100% {
            background-position: 0% 50%;
            transform: rotate(-5deg) scale(0.9);
        }
    }
    --animate-grid: grid 15s linear infinite;
    @keyframes grid {
        0% {
            transform: translateY(-50%);
        }
        100% {
            transform: translateY(0);
        }
    }
    --animate-spotlight: spotlight 2s ease 0.75s 1 forwards;
    @keyframes spotlight {
        0% {
            opacity: 0;
            transform: translate(-72%, -62%) scale(0.5);
        }
        100% {
            opacity: 1;
            transform: translate(-50%, -40%) scale(1);
        }
    }
    --animate-rainbow: rainbow var(--speed, 2s) infinite linear;
    --color-color-5: var(--color-5);
    --color-color-4: var(--color-4);
    --color-color-3: var(--color-3);
    --color-color-2: var(--color-2);
    --color-color-1: var(--color-1);
    @keyframes rainbow {
        0% {
            background-position: 0%;
        }
        100% {
            background-position: 200%;
        }
    }
}

:root {
    --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);
}

.dark {
    --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 utilities {
    .container {
        @apply mx-auto max-w-6xl px-4 xl:px-6;
    }

    .grain-effect {
        position: relative;
    }

    .grain-effect::before {
        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='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 1 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)' opacity='0.2'/%3E%3C/svg%3E");
        mix-blend-mode: screen;
        pointer-events: none;
        opacity: 0.7;
    }

    .mesh-background {
        @apply dark:to-muted to-primary from-primary dark:from-muted via-primary/70 dark:via-foreground/15 bg-gradient-to-br;
    }
}

@utility no-scrollbar {
    -ms-overflow-style: none;
    scrollbar-width: none;

    &::-webkit-scrollbar {
        display: none;
    }
}

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

    body {
        @apply bg-background text-foreground;
    }

    .font-heading {
        @apply tracking-[-0.06em];
    }

    .border-grid {
        @apply border-border/50 dark:border-border;
    }

    .focus-ring {
        @apply focus-visible:border-ring focus-visible:ring-ring/50 transition-all outline-none focus-visible:ring-[3px];
    }
}

.container-line-wrapper {
    /* mx-auto */
    margin-left: auto;
    margin-right: auto;
    /* w-full */
    width: 100%;
    /* max-w-[800px] */
    max-width: 800px;
    /* border-border/70 */
}

/* min-[800px]:border-x */
@media (min-width: 800px) {
    .container-line-wrapper {
        /* remove top/bottom borders */
        border-top: none;
        border-bottom: none;
        /* add left/right borders using the current border-color */
        border-left: 1px solid var(--border);
        border-right: 1px solid var(--border);
    }
}
