/* Font loading handled via <link> in index.html for non-render-blocking delivery */

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

@layer base {
  :root {
    --font-serif: 'Cormorant Garamond', 'Garamond', Georgia, serif;
    --font-sans: 'DM Sans', system-ui, sans-serif;

    /* Warm natural stone palette — honed marble white, travertine cream, deep charcoal */
    --background: 42 22% 97%;        /* warm ivory — honed marble white */
    --foreground: 24 14% 11%;        /* deep charcoal — warm black */
    --card: 40 18% 96%;              /* limestone card surface */
    --card-foreground: 24 14% 11%;
    --popover: 42 22% 97%;
    --popover-foreground: 24 14% 11%;
    --primary: 24 14% 11%;           /* deep charcoal */
    --primary-foreground: 42 22% 97%;
    --secondary: 40 16% 93%;         /* travertine cream */
    --secondary-foreground: 24 14% 11%;
    --muted: 38 12% 91%;             /* honed stone muted */
    --muted-foreground: 28 9% 35%;   /* warm taupe text — improved readability */
    --accent: 36 24% 86%;            /* champagne accent */
    --accent-foreground: 24 14% 11%;
    --destructive: 0 72% 51%;
    --destructive-foreground: 0 0% 98%;
    --border: 36 14% 86%;            /* soft stone border */
    --input: 36 14% 86%;
    --ring: 36 22% 55%;
    --radius: 0.125rem;              /* sharper corners — architectural precision */

    --gold: 36 38% 42%;              /* muted bronze — not bright gold */
    --gold-light: 38 32% 88%;
    --stone: 34 9% 52%;
    --stone-light: 38 14% 92%;
    --limestone: 40 20% 89%;
    --warm-white: 42 22% 97%;
    --champagne: 40 28% 80%;         /* refined champagne — not flashy */

    --sidebar-background: 40 18% 97%;
    --sidebar-foreground: 25 12% 10%;
    --sidebar-primary: 25 12% 10%;
    --sidebar-primary-foreground: 40 18% 98%;
    --sidebar-accent: 38 20% 94%;
    --sidebar-accent-foreground: 25 12% 10%;
    --sidebar-border: 35 15% 88%;
    --sidebar-ring: 38 30% 58%;
  }

  .dark {
    --background: 25 10% 7%;
    --foreground: 40 15% 92%;
    --card: 25 10% 9%;
    --card-foreground: 40 15% 92%;
    --popover: 25 10% 7%;
    --popover-foreground: 40 15% 92%;
    --primary: 40 15% 92%;
    --primary-foreground: 25 10% 7%;
    --secondary: 25 8% 14%;
    --secondary-foreground: 40 15% 92%;
    --muted: 25 8% 14%;
    --muted-foreground: 35 8% 52%;
    --accent: 25 8% 14%;
    --accent-foreground: 40 15% 92%;
    --destructive: 0 62.8% 30.6%;
    --destructive-foreground: 0 0% 98%;
    --border: 25 8% 16%;
    --input: 25 8% 16%;
    --ring: 38 30% 55%;
    --sidebar-background: 25 10% 9%;
    --sidebar-foreground: 40 15% 92%;
    --sidebar-primary: 40 15% 92%;
    --sidebar-primary-foreground: 25 10% 7%;
    --sidebar-accent: 25 8% 14%;
    --sidebar-accent-foreground: 40 15% 92%;
    --sidebar-border: 25 8% 16%;
    --sidebar-ring: 38 30% 55%;
  }
}

@layer base {
  * {
    @apply border-border outline-ring/50;
  }
  body {
    @apply bg-background text-foreground;
    font-family: var(--font-sans);
  }
}

/* Soro embedded articles widget — keep it within our container width without
   overriding Soro's own thumbnail/flex card layout (which treats images as fixed-size
   thumbnails beside the title/excerpt, not full-width banners). */
#soro-blog {
  width: 100%;
  max-width: 100%;
  overflow: hidden;
}
#soro-blog * {
  box-sizing: border-box !important;
}
#soro-blog img {
  max-width: 100%;
  height: auto;
}

/* Custom scrollbar */
::-webkit-scrollbar { width: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: hsl(var(--stone)); border-radius: 3px; }

html { scroll-behavior: smooth; }

/* Typography helpers */
.font-serif { font-family: var(--font-serif); }
.font-sans { font-family: var(--font-sans); }

/* ---------------------------------------------------------------
   NiceJob review widget — legibility overrides.
   The SDK injects its own small, low-contrast type; these scoped
   rules raise size, weight and contrast to match the site's scale.
   --------------------------------------------------------------- */
.nj-stories .nj-review__content {
  font-family: var(--font-sans) !important;
  font-size: 1rem !important;
  line-height: 1.65 !important;
  font-weight: 400 !important;
  letter-spacing: 0 !important;
  color: hsl(var(--foreground)) !important;
}

.nj-stories .nj-review__author {
  font-family: var(--font-sans) !important;
  font-size: 0.9375rem !important;
  font-weight: 600 !important;
  color: hsl(var(--foreground)) !important;
}

.nj-stories .nj-review__time {
  font-family: var(--font-sans) !important;
  font-size: 0.8125rem !important;
  color: hsl(var(--muted-foreground)) !important;
}

.nj-stories .nj-review__see-more {
  font-size: 0.9375rem !important;
  font-weight: 600 !important;
}

.nj-stories .nj-gravatar span {
  font-size: 0.875rem !important;
  font-weight: 600 !important;
}

.nj-stories .nj-powerbar__link {
  font-family: var(--font-serif) !important;
  font-size: 1.125rem !important;
  font-weight: 500 !important;
  color: hsl(var(--foreground)) !important;
}

.nj-stories .nj-brand-badge__label {
  font-family: var(--font-sans) !important;
  font-size: 0.75rem !important;
  color: hsl(var(--muted-foreground)) !important;
}