/* Warm Editorial Literary - Magic Hours & Fraunces Design System */
@import url('https://fonts.googleapis.com/css2?family=Fraunces:ital,opsz,wght@0,9..144,300..900;1,9..144,300..900&family=Inter:wght@400;500;600;700&family=Newsreader:ital,opsz,wght@0,6..72,400;0,6..72,500;1,6..72,400&family=Plus+Jakarta+Sans:wght@300;400;500;600;700&display=swap');

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

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

@layer base {
  html, body {
    margin: 0;
    padding: 0;
    scroll-behavior: smooth;
    background-color: #fdf9f1;
    color: #1c1c17;
    overflow-x: hidden;
    max-width: 100vw;
  }
  body {
    overscroll-behavior-y: none;
    -webkit-tap-highlight-color: transparent;
  }
  main > :first-child {
    margin-top: 0 !important;
  }
  main > :last-child {
    margin-bottom: 0 !important;
  }
}

/* Hide scrollbars on horizontal filter bars while preserving scroll */
.no-scrollbar::-webkit-scrollbar,
.scrollbar-none::-webkit-scrollbar {
  display: none;
}
.no-scrollbar,
.scrollbar-none {
  -ms-overflow-style: none;
  scrollbar-width: none;
}

/* Editorial Headline Typography using custom Magic Hours font */
h1, h2, h3, h4,
.font-magic,
.font-serif,
.font-display,
.font-headline-xl,
.font-headline-lg,
.font-headline-md,
.font-headline-sm,
[class*='font-headline'] {
  font-family: 'Magic Hours', 'Fraunces', 'Newsreader', serif !important;
  font-optical-sizing: auto;
}

em, cite, .italic {
  font-style: italic;
}

/* Safe area padding for mobile tab bar */
.pb-safe {
  padding-bottom: env(safe-area-inset-bottom, 0px);
}
.pt-safe {
  padding-top: env(safe-area-inset-top, 0px);
}

/* Literary Dropcap */
.literary-dropcap {
  font-family: 'Magic Hours', 'Fraunces', 'Newsreader', serif;
  font-size: 2.25rem;
  font-style: italic;
  color: #c86d51;
}

/* Comfortable Mobile Proportions & Spacing */
@media (max-width: 640px) {
  .text-headline-md {
    font-size: 1.3rem !important;
    line-height: 1.28 !important;
  }
  .text-headline-sm {
    font-size: 1.125rem !important;
    line-height: 1.3 !important;
  }
  .text-body-lg {
    font-size: 0.95rem !important;
    line-height: 1.55 !important;
  }
  .py-20 {
    padding-top: 2.75rem !important;
    padding-bottom: 2.75rem !important;
  }
  .py-16 {
    padding-top: 2.25rem !important;
    padding-bottom: 2.25rem !important;
  }
  .p-8 {
    padding: 1.25rem !important;
  }
  .cbb-cursor-glow {
    display: none !important;
  }
}

/* ==========================================================================
   Interactive Mouse Glow & Dynamic Shadow System
   ========================================================================== */

/* 1. Ambient Cursor Spotlight Overlay */
.cbb-cursor-glow {
  position: fixed;
  top: 0;
  left: 0;
  width: 520px;
  height: 520px;
  border-radius: 9999px;
  pointer-events: none;
  z-index: 1;
  background: radial-gradient(
    circle,
    rgba(200, 109, 81, 0.13) 0%,
    rgba(255, 181, 159, 0.07) 38%,
    rgba(253, 249, 241, 0) 70%
  );
  transform: translate(-50%, -50%);
  transition: opacity 0.3s ease;
  will-change: left, top;
}

/* 2. Interactive Button & Pill Glow + Dynamic Spotlight */
button,
a.bg-primary,
a.bg-secondary,
a.bg-surface-container-high,
a.bg-surface-container-lowest {
  position: relative;
  overflow: hidden;
  transition:
    transform 0.24s cubic-bezier(0.22, 1, 0.36, 1),
    box-shadow 0.26s cubic-bezier(0.22, 1, 0.36, 1),
    background-color 0.2s ease !important;
}

button:hover,
a.bg-primary:hover {
  transform: translateY(-2px);
  box-shadow:
    0 10px 26px -4px rgba(200, 109, 81, 0.5),
    0 0 18px 2px rgba(200, 109, 81, 0.28) !important;
}

a.bg-secondary:hover {
  transform: translateY(-2px);
  box-shadow:
    0 10px 26px -4px rgba(92, 100, 83, 0.45),
    0 0 18px 2px rgba(92, 100, 83, 0.25) !important;
}

a.bg-surface-container-high:hover,
a.bg-surface-container-lowest:hover {
  transform: translateY(-2px);
  box-shadow:
    0 8px 22px -4px rgba(200, 109, 81, 0.26),
    0 0 14px 1px rgba(200, 109, 81, 0.16) !important;
}

/* Cursor-tracking inner shimmer on buttons & interactive cards */
button::after,
a.bg-primary::after,
a.bg-secondary::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(
    130px circle at var(--mouse-x, 50%) var(--mouse-y, 50%),
    rgba(255, 255, 255, 0.28),
    transparent 70%
  );
  opacity: 0;
  transition: opacity 0.25s ease;
}

button:hover::after,
a.bg-primary:hover::after,
a.bg-secondary:hover::after {
  opacity: 1;
}
