/* LayerCraft 3D — shared design tokens & base styles (local port of globals.css)
   Premium light theme: white/stone base, lime accent, subtle sky secondary.
   Component CSS lives in site.css (storefront) and admin.css (admin). */

:root {
  --radius: 0.75rem;
  --background: oklch(1 0 0);
  --foreground: oklch(0.216 0.006 56); /* stone-900 */
  --card: oklch(1 0 0);
  --card-foreground: oklch(0.216 0.006 56);
  --primary: oklch(0.768 0.19 125.08); /* lime-500 */
  --primary-strong: oklch(0.64 0.2 129); /* lime-600 */
  --primary-foreground: oklch(0.216 0.006 56);
  --secondary: oklch(0.967 0.001 286); /* stone-100 */
  --secondary-foreground: oklch(0.216 0.006 56);
  --muted: oklch(0.967 0.001 286);
  --muted-foreground: oklch(0.553 0.013 58); /* stone-500 */
  --accent: oklch(0.968 0.032 130); /* light lime wash */
  --accent-foreground: oklch(0.42 0.14 128);
  --destructive: oklch(0.577 0.245 27.325); /* red-500-ish */
  --border: oklch(0.923 0.003 48); /* stone-200 */
  --input: oklch(0.923 0.003 48);
  --ring: oklch(0.768 0.19 125.08);
  --sky: oklch(0.746 0.16 232.661); /* sky-400 */
  --sidebar: oklch(0.985 0.001 106); /* stone-50 */
  --shadow-soft: 0 8px 30px rgb(23 23 20 / 0.05);
  --shadow-lift: 0 18px 50px rgb(23 23 20 / 0.1);
  --font-body: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-display: "Sora", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
}

/* ---------- minimal base reset (Tailwind preflight equivalents used by the UI) ---------- */
*, *::before, *::after { box-sizing: border-box; border: 0 solid var(--border); }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--background);
  color: var(--foreground);
  font-family: var(--font-body);
  font-feature-settings: "ss01" on;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4, h5, h6, p, figure, blockquote { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; letter-spacing: inherit; background: none; padding: 0; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; }
svg { display: block; }
table { border-collapse: collapse; }
::selection { background: oklch(0.9 0.2 130 / 0.5); }
:focus-visible { outline: 2px solid oklch(0.768 0.19 125.08 / 0.5); outline-offset: 2px; }

/* ---------- LayerCraft design utilities ---------- */
.font-display { font-family: var(--font-display), ui-sans-serif, system-ui, sans-serif; }

.glass-card {
  background: color-mix(in oklab, white 72%, transparent);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border: 1px solid rgb(255 255 255 / 0.55);
  box-shadow: 0 8px 30px rgb(23 23 20 / 0.06);
}

.soft-card {
  background: white;
  border: 1px solid oklch(0.923 0.003 48);
  box-shadow: 0 8px 30px rgb(23 23 20 / 0.05);
  transition: box-shadow 0.35s ease, transform 0.35s ease, border-color 0.35s ease;
}
.soft-card:hover {
  box-shadow: 0 18px 50px rgb(23 23 20 / 0.1);
  border-color: oklch(0.85 0.05 125);
}

.text-gradient {
  background: linear-gradient(100deg, oklch(0.42 0.14 128) 0%, oklch(0.65 0.2 130) 45%, oklch(0.746 0.16 232.661) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* Reveal on scroll */
.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1), transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
  will-change: opacity, transform;
}
.reveal.reveal-visible { opacity: 1; transform: translateY(0); }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
}

/* Slow animated gradient blobs */
@keyframes blob-float {
  0%, 100% { transform: translate3d(0, 0, 0) scale(1); }
  33% { transform: translate3d(24px, -32px, 0) scale(1.08); }
  66% { transform: translate3d(-20px, 16px, 0) scale(0.94); }
}
.animate-blob { animation: blob-float 16s ease-in-out infinite; }
.animate-blob-slow { animation: blob-float 26s ease-in-out infinite reverse; }
@media (prefers-reduced-motion: reduce) {
  .animate-blob, .animate-blob-slow { animation: none; }
}

/* Custom scrollbar for scrollable panels */
.scroll-slim { scrollbar-width: thin; scrollbar-color: oklch(0.87 0.03 125) transparent; }
.scroll-slim::-webkit-scrollbar { width: 6px; height: 6px; }
.scroll-slim::-webkit-scrollbar-track { background: transparent; }
.scroll-slim::-webkit-scrollbar-thumb { background: oklch(0.87 0.03 125); border-radius: 999px; }
.scroll-slim::-webkit-scrollbar-thumb:hover { background: oklch(0.78 0.08 128); }

/* Chat panel bubbles */
.chat-bubble-user {
  background: oklch(0.42 0.14 128);
  color: white;
  border-radius: 18px 18px 4px 18px;
}
.chat-bubble-assistant {
  background: oklch(0.967 0.001 286);
  color: oklch(0.216 0.006 56);
  border-radius: 18px 18px 18px 4px;
}

/* Shared toast (sonner equivalent — sonner's default position is bottom-right) */
#toast-root {
  position: fixed;
  bottom: 1.25rem;
  right: 1.25rem;
  z-index: 100;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.5rem;
  pointer-events: none;
  width: max-content;
  max-width: min(92vw, 26rem);
}
.lc-toast {
  pointer-events: auto;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background: var(--foreground);
  color: white;
  border-radius: 0.75rem;
  padding: 0.75rem 1rem;
  font-size: 0.875rem;
  box-shadow: 0 10px 40px rgb(23 23 20 / 0.25);
  animation: toast-in 0.25s ease;
  max-width: 100%;
}
.lc-toast .lc-toast-action {
  color: oklch(0.868 0.169 129);
  font-weight: 600;
  white-space: nowrap;
}
.lc-toast.lc-toast-error { background: oklch(0.44 0.19 27); }
@keyframes toast-in {
  from { opacity: 0; transform: translateY(10px) scale(0.97); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
