@import "tailwindcss";
@import "tw-animate-css";
@import "./fonts.css";
@import "./theme.css";
@import "./background.css";

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

@theme inline {
  /* Tyeda brand colors (constant across themes) */
  --color-nexus-blue: oklch(0.443 0.1928 261.11);
  --color-fusion-violet: oklch(0.6044 0.1597 294.36);
  --color-tyeda-dark: oklch(0.1695 0.022 267.28);
  --color-tyeda-slate: oklch(0.4455 0.0374 257.28);

  /* Design system tokens (theme-aware via CSS vars from theme.css) */
  --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);

  /* ruby_ui specific */
  --color-warning: var(--warning);
  --color-warning-foreground: var(--warning-foreground);
  --color-success: var(--success);
  --color-success-foreground: var(--success-foreground);

  /* Border radius */
  --radius-sm: calc(var(--radius) - 4px);
  --radius-md: calc(var(--radius) - 2px);
  --radius-lg: var(--radius);
  --radius-xl: calc(var(--radius) + 4px);

  /* Font families */
  --font-mulish: "Mulish", sans-serif;
  --font-instrument: "Instrument Sans", sans-serif;

  /* Box shadows */
  --shadow-nexus: 0 10px 40px -10px oklch(0.443 0.1928 261.11 / 30%);
  --shadow-fusion: 0 10px 40px -10px oklch(0.6044 0.1597 294.36 / 30%);

  /* Backdrop blur */
  --backdrop-blur-xs: 2px;

  /* Animations */
  --animate-bounce-slow: bounce-slow 3s infinite;
}

@keyframes bounce-slow {
  0%,
  100% {
    transform: translateY(-5%);
    animation-timing-function: cubic-bezier(0.8, 0, 1, 1);
  }
  50% {
    transform: translateY(0);
    animation-timing-function: cubic-bezier(0, 0, 0.2, 1);
  }
}

@utility checkbox-tick {
  &:checked {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' fill='none' stroke='white' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M2 6l3 3 5-5'/%3E%3C/svg%3E");
    background-size: 80%;
    background-repeat: no-repeat;
    background-position: center;
  }
}

@utility container {
  margin-inline: auto;
  padding-inline: 2rem;
  max-width: 1400px;
}

@layer base {
  * {
    @apply border-border outline-ring/50;
  }
  body {
    @apply bg-background text-foreground font-instrument antialiased;
  }
  h1,
  h2,
  h3,
  h4,
  h5,
  h6 {
    @apply font-mulish;
  }
}
