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

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

/*
 * KUYA design system — "warm market".
 * All colours are semantic tokens in oklch. Never hardcode colours in components.
 */

@theme inline {
  --radius-sm: calc(var(--radius) - 8px);
  --radius-md: calc(var(--radius) - 4px);
  --radius-lg: var(--radius);
  --radius-xl: calc(var(--radius) + 4px);
  --radius-2xl: calc(var(--radius) + 8px);
  --radius-3xl: calc(var(--radius) + 16px);

  --font-display: "Baloo 2", system-ui, sans-serif;
  --font-body: "Nunito Sans", system-ui, sans-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-ink: var(--ink);
  --color-teal: var(--teal);
  --color-tealsoft: var(--tealsoft);
  --color-gold: var(--gold);
  --color-cream: var(--cream);
  --color-creamcard: var(--creamcard);
  --color-lilac: var(--lilac);
  --color-mint: var(--mint);
  --color-peach: var(--peach);
}

:root {
  --radius: 1rem;

  --ink: oklch(0.246 0.025 232.5);
  --teal: oklch(0.523 0.089 184.7);
  --tealsoft: oklch(0.622 0.104 183.2);
  --gold: oklch(0.82 0.147 81.2);
  --cream: oklch(0.976 0.023 82.1);
  --creamcard: oklch(0.994 0.009 93.6);
  --lilac: oklch(0.925 0.033 315.2);
  --mint: oklch(0.936 0.031 168.3);
  --peach: oklch(0.93 0.038 55.9);

  --background: var(--cream);
  --foreground: var(--ink);
  --card: var(--creamcard);
  --card-foreground: var(--ink);
  --popover: var(--creamcard);
  --popover-foreground: var(--ink);
  --primary: var(--teal);
  --primary-foreground: var(--cream);
  --secondary: var(--mint);
  --secondary-foreground: var(--ink);
  --muted: oklch(0.955 0.018 84);
  --muted-foreground: oklch(0.52 0.02 235);
  --accent: var(--gold);
  --accent-foreground: var(--ink);
  --destructive: oklch(0.62 0.199 31.3);
  --destructive-foreground: var(--cream);
  --border: oklch(0.246 0.025 232.5 / 12%);
  --input: oklch(0.246 0.025 232.5 / 15%);
  --ring: var(--teal);
}

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

  html {
    -webkit-text-size-adjust: 100%;
  }

  body {
    background-color: var(--color-background);
    color: var(--color-foreground);
    font-family: var(--font-body);
    -webkit-font-smoothing: antialiased;
  }

  h1,
  h2,
  h3,
  h4 {
    font-family: var(--font-display);
    font-weight: 700;
  }
}

@utility kuya-card {
  border-radius: var(--radius-3xl);
  background-color: var(--color-card);
  box-shadow: 0 0 0 1px oklch(0.246 0.025 232.5 / 12%);
  overflow: hidden;
}

@utility kuya-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  border-radius: 9999px;
  background-color: var(--color-card);
  box-shadow: 0 0 0 1px oklch(0.246 0.025 232.5 / 15%);
  padding: 0.25rem 0.875rem;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.8125rem;
  white-space: nowrap;
  cursor: pointer;
  transition: transform 0.15s ease;
  &:hover {
    transform: translateY(-1px);
  }
}

@utility kuya-chip-active {
  background-color: var(--color-ink);
  color: var(--color-cream);
  box-shadow: none;
}

@utility kuya-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  border-radius: var(--radius-2xl);
  font-family: var(--font-display);
  font-weight: 700;
  padding: 0.8rem 1.25rem;
  cursor: pointer;
  transition:
    transform 0.15s ease,
    filter 0.15s ease;
  &:hover {
    transform: translateY(-2px);
  }
  &:disabled {
    opacity: 0.55;
    cursor: not-allowed;
    transform: none;
  }
}

@utility kuya-btn-primary {
  background-color: var(--color-teal);
  color: var(--color-cream);
}

@utility kuya-btn-buy {
  background-color: var(--color-destructive);
  color: var(--color-destructive-foreground);
}

@utility kuya-btn-gold {
  background-color: var(--color-gold);
  color: var(--color-ink);
}

@utility kuya-btn-ghost {
  background-color: var(--color-card);
  color: var(--color-foreground);
  box-shadow: 0 0 0 1px oklch(0.246 0.025 232.5 / 20%);
}

@utility kuya-field {
  width: 100%;
  border-radius: var(--radius-xl);
  background-color: var(--color-background);
  box-shadow: 0 0 0 1px oklch(0.246 0.025 232.5 / 15%);
  padding: 0.625rem 0.875rem;
  font-size: 0.875rem;
  outline: none;
  &:focus {
    box-shadow: 0 0 0 2px var(--color-teal);
  }
}
