/* Owner-supplied palette. This layer is public-site only; CRM keeps its own theme. */
:root {
  --card: #fffcf5;
  --ring: #b77c41;
  --input: #e2d2b3;
  --muted: #f0e6d4;
  --accent: #dccca2;
  --border: #e2d2b3;
  --radius: .25rem;
  --chart-1: #b77c41;
  --chart-2: #9a6f3f;
  --chart-3: #7e5b2f;
  --chart-4: #c19061;
  --chart-5: #cda073;
  --popover: #fffcf5;
  --primary: #b77c41;
  --sidebar: #f0e6d4;
  --spacing: .25rem;
  --font-mono: 'ADLaM Display', ui-serif, serif;
  --font-sans: Manrope, ui-sans-serif, sans-serif, system-ui;
  --secondary: #e8dabd;
  --background: #f9f7f1;
  --font-serif: 'Bricolage Grotesque', ui-sans-serif, sans-serif, system-ui;
  --foreground: #4e3f31;
  --destructive: #cf391b;
  --shadow-blur: 1px;
  --shadow-color: #3c322a;
  --sidebar-ring: #b77c41;
  --shadow-spread: 0px;
  --letter-spacing: 0em;
  --shadow-opacity: 0;
  --sidebar-accent: #dccca2;
  --sidebar-border: #e2d2b3;
  --card-foreground: #4e3f31;
  --shadow-offset-x: 2px;
  --shadow-offset-y: 3px;
  --sidebar-primary: #b77c41;
  --muted-foreground: #856c4e;
  --accent-foreground: #4e3f31;
  --popover-foreground: #4e3f31;
  --primary-foreground: #fff;
  --sidebar-foreground: #4e3f31;
  --secondary-foreground: #624d39;
  --destructive-foreground: #fff;
  --sidebar-accent-foreground: #4e3f31;
  --sidebar-primary-foreground: #fff;
}
html.dark, html[data-theme="dark"] {
  --card: #0f0f0f;
  --ring: #cda073;
  --input: #4d3f36;
  --muted: #332b24;
  --accent: #5e4839;
  --border: #4d3f36;
  --chart-1: #cda073;
  --chart-2: #c19061;
  --chart-3: #b77c41;
  --chart-4: #9a6f3f;
  --chart-5: #7e5b2f;
  --popover: #3d3229;
  --primary: #cda073;
  --sidebar: #0f0f0f;
  --secondary: #4d3f36;
  --background: #1c1c17;
  --foreground: #f0e6d4;
  --sidebar-ring: #cda073;
  --sidebar-accent: #5e4839;
  --sidebar-border: #4d3f36;
  --card-foreground: #f0e6d4;
  --sidebar-primary: #cda073;
  --muted-foreground: #cabda7;
  --accent-foreground: #f0e6d4;
  --popover-foreground: #f0e6d4;
  --primary-foreground: #2f261f;
  --sidebar-foreground: #f0e6d4;
  --secondary-foreground: #f0e6d4;
  --sidebar-accent-foreground: #f0e6d4;
  --sidebar-primary-foreground: #2f261f;
}
/* Map existing Blade/Bootstrap-era design tokens to the same source of truth. */
html[data-theme] {
  --bg-primary: var(--background);
  --bg-surface: var(--card);
  --bg-elevated: var(--popover);
  --bg-stone-soft: var(--muted);
  --bg-hero: var(--background);
  --bg-sanjab-cream: var(--background);
  --bg-sanjab-cream-light: var(--card);
  --bg-sanjab-cream-deep: var(--muted);
  --text-primary: var(--foreground);
  --text-secondary: var(--secondary-foreground);
  --text-muted: var(--muted-foreground);
  --border-default: var(--border);
  --border-stone: var(--border);
  --border-sanjab: var(--border);
  --accent-gold: var(--primary);
  --accent-gold-hover: var(--chart-2);
  --accent-gold-text: var(--chart-3);
  --accent-brass: var(--chart-2);
  --accent-stone: var(--border);
  --badge-bg: var(--muted);
  --atelier-canvas: var(--background);
  --atelier-paper: var(--card);
  --atelier-soft: var(--muted);
  --atelier-ink: var(--foreground);
  --atelier-muted: var(--muted-foreground);
  --atelier-line: var(--border);
  --atelier-gold: var(--chart-3);
  --atelier-shadow: none;
  --light-canvas: var(--background);
  --light-canvas-deep: var(--muted);
  --light-surface: var(--card);
  --light-surface-soft: var(--card);
  --light-ink: var(--foreground);
  --light-muted: var(--muted-foreground);
  --light-line: var(--border);
  --light-line-strong: var(--primary);
  --light-gold: var(--primary);
  --light-gold-strong: var(--chart-3);
  --refined-edge: var(--border);
  --refined-radius: calc(var(--radius) * 3);
  --refined-shadow: none;
  --refined-hover-shadow: 0 12px 32px #3c322a0a;
  --refined-wash: color-mix(in srgb, var(--primary) 8%, transparent);
  --radius-sm: var(--radius);
  --radius-md: calc(var(--radius) * 2);
  --radius-lg: calc(var(--radius) * 3);
  --radius-xl: calc(var(--radius) * 4);
  --font-en: var(--font-sans);
  --action-background: var(--chart-3);
  --action-foreground: #fff;
}
html[data-theme="dark"] {
  --atelier-gold: var(--primary);
  --accent-gold-text: var(--primary);
  --action-background: var(--primary);
  --action-foreground: var(--primary-foreground);
  --glow-gold: #cda07318;
  --glow-cool: #b77c4108;
  --glow-warm: #9a6f3f0a;
}
.fargah-atelier {
  --refined-radius: calc(var(--radius) * 3);
  --refined-edge: var(--border);
  --refined-shadow: none;
  --refined-wash: color-mix(in srgb, var(--primary) 8%, transparent);
  background: var(--background);
  color: var(--foreground);
}
html[data-theme] body.fargah-atelier .btn-fargah--primary {
  background: var(--action-background);
  border-color: var(--action-background);
  color: var(--action-foreground) !important;
  box-shadow: none;
}
html[data-theme] body.fargah-atelier .btn-fargah--primary:hover {
  background: var(--foreground);
  border-color: var(--foreground);
  color: var(--background) !important;
}
html[data-theme] body.fargah-atelier :is(input:not([type="checkbox"]):not([type="radio"]), textarea, select) {
  accent-color: var(--primary);
  caret-color: var(--foreground);
}
html[data-theme] body.fargah-atelier :is(.articles-hub, .faq-hero, .stone-report-hero, .certificates-hero, .executed-mirror, .executed-video-mirror, .contact-studio, .brand-slides) {
  background-color: var(--background);
  color: var(--foreground);
}
html[data-theme] body.fargah-atelier :is(.article-feed-card, .editorial-card, .certificate-card, .faq-item, .catalog-live-section__inner, .contact-studio__form-card, .home-project-card) {
  background-color: var(--card);
  border-color: var(--border);
  color: var(--card-foreground);
  box-shadow: none;
}
html[data-theme="light"] body.fargah-atelier .certificate-card__body h3 {
  color: #151515 !important;
}
html[data-theme] body.fargah-atelier .fargah-page-scroll {
  color: var(--primary);
  border-color: var(--border);
}
.fargah-atelier ::selection { color: var(--foreground); background: var(--accent); }
@media (prefers-reduced-motion: reduce) {
  .fargah-atelier { scroll-behavior: auto; }
}
