/* Self-hosted fonts — WOFF2 for smaller payloads */
@font-face {
  font-family: 'Playfair Display';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('@/fonts/playfair-400.woff2') format('woff2');
}
@font-face {
  font-family: 'Playfair Display';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('@/fonts/playfair-700.woff2') format('woff2');
}
@font-face {
  font-family: 'Playfair Display';
  font-style: normal;
  font-weight: 800;
  font-display: swap;
  src: url('@/fonts/playfair-800.woff2') format('woff2');
}
@font-face {
  font-family: 'DM Sans';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('@/fonts/dm-sans-400.woff2') format('woff2');
}
@font-face {
  font-family: 'DM Sans';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('@/fonts/dm-sans-500.woff2') format('woff2');
}
@font-face {
  font-family: 'DM Sans';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('@/fonts/dm-sans-600.woff2') format('woff2');
}
@font-face {
  font-family: 'DM Sans';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('@/fonts/dm-sans-700.woff2') format('woff2');
}

@tailwind base;
@tailwind components;
@tailwind utilities;

@layer base {
  :root {
    --background: 45 25% 95%;
    --foreground: 150 30% 10%;

    --card: 45 20% 91%;
    --card-foreground: 150 30% 10%;

    --popover: 45 25% 95%;
    --popover-foreground: 150 30% 10%;

    --primary: 150 40% 16%;
    --primary-foreground: 45 30% 95%;

    --secondary: 42 70% 45%;
    --secondary-foreground: 150 40% 10%;

    --muted: 45 15% 87%;
    --muted-foreground: 150 12% 32%;

    --accent: 42 70% 45%;
    --accent-foreground: 45 30% 95%;

    --destructive: 0 84.2% 60.2%;
    --destructive-foreground: 210 40% 98%;

    --border: 40 18% 80%;
    --input: 40 18% 80%;
    --ring: 150 40% 16%;

    --radius: 0.375rem;

    --sidebar-background: 0 0% 98%;
    --sidebar-foreground: 240 5.3% 26.1%;
    --sidebar-primary: 240 5.9% 10%;
    --sidebar-primary-foreground: 0 0% 98%;
    --sidebar-accent: 240 4.8% 95.9%;
    --sidebar-accent-foreground: 240 5.9% 10%;
    --sidebar-border: 220 13% 91%;
    --sidebar-ring: 217.2 91.2% 59.8%;

    --font-display: 'Playfair Display', serif;
    --font-body: 'DM Sans', sans-serif;
  }

  .dark {
    --background: 150 20% 7%;
    --foreground: 45 20% 90%;
    --card: 150 18% 11%;
    --card-foreground: 45 20% 90%;
    --popover: 150 20% 7%;
    --popover-foreground: 45 20% 90%;
    --primary: 150 35% 30%;
    --primary-foreground: 45 30% 95%;
    --secondary: 42 70% 50%;
    --secondary-foreground: 150 40% 10%;
    --muted: 150 10% 16%;
    --muted-foreground: 150 8% 62%;
    --accent: 42 70% 50%;
    --accent-foreground: 45 30% 95%;
    --destructive: 0 62.8% 30.6%;
    --destructive-foreground: 210 40% 98%;
    --border: 150 10% 20%;
    --input: 150 10% 20%;
    --ring: 150 35% 30%;
    --sidebar-background: 240 5.9% 10%;
    --sidebar-foreground: 240 4.8% 95.9%;
    --sidebar-primary: 224.3 76.3% 48%;
    --sidebar-primary-foreground: 0 0% 100%;
    --sidebar-accent: 240 3.7% 15.9%;
    --sidebar-accent-foreground: 240 4.8% 95.9%;
    --sidebar-border: 240 3.7% 15.9%;
    --sidebar-ring: 217.2 91.2% 59.8%;
  }
}

@layer base {
  * {
    @apply border-border;
  }

  body {
    @apply bg-background text-foreground;
    font-family: var(--font-body);
  }

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

/* Lightweight CSS animations to replace framer-motion on below-fold sections */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(24px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes fadeInLeft {
  from { opacity: 0; transform: translateX(-24px); }
  to { opacity: 1; transform: translateX(0); }
}
@keyframes fadeInRight {
  from { opacity: 0; transform: translateX(24px); }
  to { opacity: 1; transform: translateX(0); }
}

.animate-on-scroll {
  opacity: 0;
}
.animate-on-scroll.is-visible {
  animation: fadeInUp 0.5s ease-out forwards;
}
.animate-on-scroll.fade-left.is-visible {
  animation: fadeInLeft 0.5s ease-out forwards;
}
.animate-on-scroll.fade-right.is-visible {
  animation: fadeInRight 0.5s ease-out forwards;
}

@layer components {
  .form-input {
    @apply w-full px-3 py-2.5 rounded bg-background border border-input text-foreground text-sm placeholder:text-muted-foreground focus:outline-none focus:ring-2 focus:ring-ring transition-colors;
  }
}
