/*
 * Tailwind v4 entry: config lives here, with no tailwind.config.js or PostCSS plugin.
 * - Keep every @import in this top block, above @theme and the rest of the file. Install an
 *   npm package before @importing its CSS. Never @import a remote URL (web fonts, CDN CSS): the
 *   build resolves @import from the filesystem. Load those with a <link> in the head() of
 *   src/routes/__root.tsx and name the family in a --font-* token in @theme inline below.
 */
@import "tailwindcss" source(none);
@source "../src";
@import "tw-animate-css";

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

/*
 * Design system definition.
 *
 * The design lives in this file: oklch color tokens on the shadcn variables
 * (--background, --foreground, --primary, --secondary, --muted, --accent, ...) plus
 * new tokens as needed, font tokens, and custom styles and animations.
 *
 * The @theme inline block maps CSS custom properties to Tailwind utility
 * classes (e.g. --color-primary -> bg-primary, text-primary).
 *
 * The :root and .dark blocks define the actual color values using oklch.
 * All colors MUST use oklch format.
 *
 * To add a new semantic color:
 * 1. Add the variable to :root (light value) and .dark (dark value)
 * 2. Register it in @theme inline as --color-<name>: var(--<name>)
 */

@theme inline {
  --radius-sm: calc(var(--radius) - 4px);
  --radius-md: calc(var(--radius) - 2px);
  --radius-lg: var(--radius);
  --radius-xl: calc(var(--radius) + 4px);
  --radius-2xl: calc(var(--radius) + 8px);
  --radius-3xl: calc(var(--radius) + 12px);
  --radius-4xl: calc(var(--radius) + 16px);
  --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-ring-offset-background: var(--background);
  --color-navy-deep: var(--navy-deep);
  --color-gold: var(--gold);
  --color-gold-glow: var(--gold-glow);
  --color-whatsapp: var(--whatsapp);
  --font-display: "Oswald", sans-serif;
  --font-sans: "Inter", sans-serif;
  --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);
}

:root {
  --radius: 0.5rem;
  --background: oklch(0.985 0.006 85);
  --foreground: oklch(0.2 0.05 265);
  --card: oklch(1 0 0);
  --card-foreground: oklch(0.2 0.05 265);
  --popover: oklch(1 0 0);
  --popover-foreground: oklch(0.2 0.05 265);
  --primary: oklch(0.26 0.08 var(--hue-dark));
  --primary-foreground: oklch(0.98 0.01 85);
  --secondary: oklch(0.95 0.02 85);
  --secondary-foreground: oklch(0.26 0.08 265);
  --muted: oklch(0.95 0.01 85);
  --muted-foreground: oklch(0.48 0.03 265);
  --accent: oklch(0.8 0.14 var(--hue-accent));
  --accent-foreground: oklch(0.2 0.05 265);
  --destructive: oklch(0.577 0.245 27.325);
  --destructive-foreground: oklch(0.98 0 0);
  --border: oklch(0.9 0.015 85);
  --input: oklch(0.9 0.015 85);
  --ring: oklch(0.8 0.14 var(--hue-accent));
  --navy-deep: oklch(0.18 0.06 var(--hue-dark));
  --gold: oklch(0.8 0.14 var(--hue-accent));
  --gold-glow: oklch(0.88 0.12 calc(var(--hue-accent) + 8));
  --whatsapp: oklch(0.68 0.17 150);
  --gradient-gold: linear-gradient(135deg, var(--gold), var(--gold-glow), oklch(0.7 0.13 calc(var(--hue-accent) - 12)));
  --gradient-navy: linear-gradient(160deg, var(--navy-deep), var(--primary));
  --shadow-gold: 0 12px 40px -12px color-mix(in oklab, var(--gold) 55%, transparent);
  --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.984 0.003 247.858);
  --sidebar-foreground: oklch(0.129 0.042 264.695);
  --sidebar-primary: oklch(0.208 0.042 265.755);
  --sidebar-primary-foreground: oklch(0.984 0.003 247.858);
  --sidebar-accent: oklch(0.968 0.007 247.896);
  --sidebar-accent-foreground: oklch(0.208 0.042 265.755);
  --sidebar-border: oklch(0.929 0.013 255.508);
  --sidebar-ring: oklch(0.704 0.04 256.788);
}

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

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

@utility bg-gradient-gold { background-image: var(--gradient-gold); }
@utility bg-gradient-navy { background-image: var(--gradient-navy); }
@utility text-gradient-gold { background-image: var(--gradient-gold); background-clip: text; color: transparent; }
@utility shadow-gold { box-shadow: var(--shadow-gold); }
@layer base { h1, h2, h3, .font-display { font-family: var(--font-display); } body { font-family: var(--font-sans); } }

/* Site-wide colour cycle: theme hues shift every ~8s */
@property --hue-dark { syntax: "<number>"; inherits: true; initial-value: 265; }
@property --hue-accent { syntax: "<number>"; inherits: true; initial-value: 82; }
:root { animation: theme-cycle 48s ease-in-out infinite; }
@keyframes theme-cycle {
  0%, 12% { --hue-dark: 265; --hue-accent: 82; }
  17%, 29% { --hue-dark: 300; --hue-accent: 20; }
  34%, 45% { --hue-dark: 160; --hue-accent: 75; }
  50%, 62% { --hue-dark: 25; --hue-accent: 95; }
  67%, 79% { --hue-dark: 230; --hue-accent: 190; }
  84%, 95% { --hue-dark: 330; --hue-accent: 60; }
  100% { --hue-dark: 265; --hue-accent: 82; }
}
@media (prefers-reduced-motion: reduce) { :root { animation: none; } }

/* Logo gentle float + glow pulse */
@keyframes logo-float {
  0%, 100% { transform: translateY(0) scale(1); filter: drop-shadow(0 0 6px oklch(0.8 0.14 var(--hue-accent) / 0.35)); }
  50% { transform: translateY(-4px) scale(1.03); filter: drop-shadow(0 0 16px oklch(0.8 0.14 var(--hue-accent) / 0.7)); }
}
.animate-logo { animation: logo-float 4s ease-in-out infinite; }
@media (prefers-reduced-motion: reduce) { .animate-logo { animation: none; } }

/* Clients circular orbit */
@keyframes orbit-spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}
