@import "tailwindcss";
@import "tw-animate-css";
@import "shadcn/tailwind.css";

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

/* Custom fonts */
@font-face {
  font-family: 'Cocogoose';
  src: url('/fonts/Cocogoose-Classic-Medium-trial.ttf') format('truetype');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Geoform';
  src: url('/fonts/Geoform-Bold.otf') format('opentype');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Geoform';
  src: url('/fonts/Geoform.otf') format('opentype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@theme {
  /* Cachet brand palette — calibrated to logo */
  --color-brand-dark:    #314732;  /* Dark Green — primary headings, nav */
  --color-brand-mid:     #7a8876;  /* Light Green — accents, borders */
  --color-brand-light:   #f0f4ef;  /* Very light green tint — backgrounds */
  --color-brand-50:      #f0f4ef;
  --color-brand-100:     #d6e2d4;
  --color-brand-200:     #b8cdb5;
  --color-brand-300:     #97b393;
  --color-brand-400:     #7a8876;  /* Light Green */
  --color-brand-500:     #5a6e58;
  --color-brand-600:     #314732;  /* Dark Green — CTA buttons */
  --color-brand-700:     #263a27;  /* Hover state */
  --color-brand-800:     #1c2c1d;
  --color-brand-900:     #131f13;

  /* Graphite accent palette — anchored to #3D3E3B (warm charcoal) */
  --color-graphite-50:   #f6f6f5;
  --color-graphite-100:  #e8e9e7;
  --color-graphite-200:  #d1d3ce;
  --color-graphite-300:  #b0b3ac;
  --color-graphite-400:  #8a8d86;
  --color-graphite-500:  #656860;
  --color-graphite-600:  #3d3e3b;  /* base */
  --color-graphite-700:  #323330;
  --color-graphite-800:  #292a27;
  --color-graphite-900:  #1a1b19;
  --color-graphite-950:  #0f0f0e;

  /* Harmony accents (pair with graphite-600 for UI highlights) */
  --color-graphite-highlight: #c9cbc4;  /* soft sage-gray on dark backgrounds */
  --color-graphite-muted:     #9a9d95;  /* secondary text / borders */
  --color-graphite-warm:      #6b6358;  /* brown-gray link to wood / interior */

  /* Neutral palette */
  --color-gray-light:    #b7b6b6;
  --color-gray-dark:     #444445;

  /* Typography */
  --font-display: 'Cocogoose', system-ui, sans-serif;
  --font-body:    'Geoform', system-ui, sans-serif;
  --font-sans:    'Geoform', system-ui, sans-serif;
}

/* Base layer */
@layer base {
  html {
    scroll-behavior: smooth;
    @apply font-sans;
  }

  body {
    font-family: var(--font-body);
    color: var(--color-gray-dark);
    background-color: #ffffff;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    @apply bg-background text-foreground;
  }

  h1, h2, h3 {
    font-family: var(--font-display);
    color: var(--color-brand-600);
    font-weight: 500;
    line-height: 1.15;
  }

  h4, h5, h6 {
    font-family: var(--font-body);
    font-weight: 700;
    color: var(--color-brand-600);
  }

  a {
    color: inherit;
    text-decoration: none;
  }

  img {
    max-width: 100%;
    height: auto;
  }
  * {
    @apply border-border outline-ring/50;
  }
}

:root {
  --background: oklch(1 0 0);
  --foreground: oklch(0.145 0 0);
  --card: oklch(1 0 0);
  --card-foreground: oklch(0.145 0 0);
  --popover: oklch(1 0 0);
  --popover-foreground: oklch(0.145 0 0);
  --primary: oklch(0.205 0 0);
  --primary-foreground: oklch(0.985 0 0);
  --secondary: oklch(0.97 0 0);
  --secondary-foreground: oklch(0.205 0 0);
  --muted: oklch(0.97 0 0);
  --muted-foreground: oklch(0.556 0 0);
  --accent: oklch(0.97 0 0);
  --accent-foreground: oklch(0.205 0 0);
  --destructive: oklch(0.577 0.245 27.325);
  --border: oklch(0.922 0 0);
  --input: oklch(0.922 0 0);
  --ring: oklch(0.708 0 0);
  --chart-1: oklch(0.809 0.105 251.813);
  --chart-2: oklch(0.623 0.214 259.815);
  --chart-3: oklch(0.546 0.245 262.881);
  --chart-4: oklch(0.488 0.243 264.376);
  --chart-5: oklch(0.424 0.199 265.638);
  --radius: 0.625rem;
  --sidebar: oklch(0.985 0 0);
  --sidebar-foreground: oklch(0.145 0 0);
  --sidebar-primary: oklch(0.205 0 0);
  --sidebar-primary-foreground: oklch(0.985 0 0);
  --sidebar-accent: oklch(0.97 0 0);
  --sidebar-accent-foreground: oklch(0.205 0 0);
  --sidebar-border: oklch(0.922 0 0);
  --sidebar-ring: oklch(0.708 0 0);
}

.dark {
  --background: oklch(0.145 0 0);
  --foreground: oklch(0.985 0 0);
  --card: oklch(0.205 0 0);
  --card-foreground: oklch(0.985 0 0);
  --popover: oklch(0.205 0 0);
  --popover-foreground: oklch(0.985 0 0);
  --primary: oklch(0.922 0 0);
  --primary-foreground: oklch(0.205 0 0);
  --secondary: oklch(0.269 0 0);
  --secondary-foreground: oklch(0.985 0 0);
  --muted: oklch(0.269 0 0);
  --muted-foreground: oklch(0.708 0 0);
  --accent: oklch(0.269 0 0);
  --accent-foreground: oklch(0.985 0 0);
  --destructive: oklch(0.704 0.191 22.216);
  --border: oklch(1 0 0 / 10%);
  --input: oklch(1 0 0 / 15%);
  --ring: oklch(0.556 0 0);
  --chart-1: oklch(0.809 0.105 251.813);
  --chart-2: oklch(0.623 0.214 259.815);
  --chart-3: oklch(0.546 0.245 262.881);
  --chart-4: oklch(0.488 0.243 264.376);
  --chart-5: oklch(0.424 0.199 265.638);
  --sidebar: oklch(0.205 0 0);
  --sidebar-foreground: oklch(0.985 0 0);
  --sidebar-primary: oklch(0.488 0.243 264.376);
  --sidebar-primary-foreground: oklch(0.985 0 0);
  --sidebar-accent: oklch(0.269 0 0);
  --sidebar-accent-foreground: oklch(0.985 0 0);
  --sidebar-border: oklch(1 0 0 / 10%);
  --sidebar-ring: oklch(0.556 0 0);
}

@theme inline {
  --font-sans: 'Cocogoose', sans-serif;
  --color-sidebar-ring: var(--sidebar-ring);
  --color-sidebar-border: var(--sidebar-border);
  --color-sidebar-accent-foreground: var(--sidebar-accent-foreground);
  --color-sidebar-accent: var(--sidebar-accent);
  --color-sidebar-primary-foreground: var(--sidebar-primary-foreground);
  --color-sidebar-primary: var(--sidebar-primary);
  --color-sidebar-foreground: var(--sidebar-foreground);
  --color-sidebar: var(--sidebar);
  --color-chart-5: var(--chart-5);
  --color-chart-4: var(--chart-4);
  --color-chart-3: var(--chart-3);
  --color-chart-2: var(--chart-2);
  --color-chart-1: var(--chart-1);
  --color-ring: var(--ring);
  --color-input: var(--input);
  --color-border: var(--border);
  --color-destructive: var(--destructive);
  --color-accent-foreground: var(--accent-foreground);
  --color-accent: var(--accent);
  --color-muted-foreground: var(--muted-foreground);
  --color-muted: var(--muted);
  --color-secondary-foreground: var(--secondary-foreground);
  --color-secondary: var(--secondary);
  --color-primary-foreground: var(--primary-foreground);
  --color-primary: var(--primary);
  --color-popover-foreground: var(--popover-foreground);
  --color-popover: var(--popover);
  --color-card-foreground: var(--card-foreground);
  --color-card: var(--card);
  --color-foreground: var(--foreground);
  --color-background: var(--background);
  --radius-sm: calc(var(--radius) * 0.6);
  --radius-md: calc(var(--radius) * 0.8);
  --radius-lg: var(--radius);
  --radius-xl: calc(var(--radius) * 1.4);
  --radius-2xl: calc(var(--radius) * 1.8);
  --radius-3xl: calc(var(--radius) * 2.2);
  --radius-4xl: calc(var(--radius) * 2.6);
}