/* Small custom touches Tailwind's CDN build doesn't cover well. */

body {
  font-family: "Schibsted Grotesk", system-ui, sans-serif;
  background-color: #faf8f4;
}
h1, h2, h3, .font-display {
  font-family: "Fraunces", serif;
}
.font-mono, .figure {
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.01em;
}

.leaflet-popup-content-wrapper {
  border-radius: 10px;
  font-family: "Schibsted Grotesk", system-ui, sans-serif;
}

#mobileMenu a {
  display: block;
  padding: 0.5rem 0;
}

/* Small uppercase eyebrow label with a short leading rule, used instead of
   a bare "kicker" text line — gives every section header a deliberate,
   art-directed feel rather than a generic pill/label. */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #9c7640;
}
.eyebrow::before {
  content: "";
  display: block;
  width: 2rem;
  height: 1px;
  background: currentColor;
}
.eyebrow-light { color: #c9a15f; }
.eyebrow-bare::before { content: none; }

/* Button hierarchy: one filled gold primary, one quiet outline/ghost for
   everything secondary. Reused everywhere instead of ad-hoc utility soup
   so every page has the same, deliberate weighting. */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.85rem 1.6rem;
  border-radius: 2px;
  font-weight: 600;
  font-size: 0.95rem;
  transition: transform 0.25s cubic-bezier(0.22, 1, 0.36, 1), background-color 0.25s ease, border-color 0.25s ease, color 0.25s ease;
  white-space: nowrap;
}
.btn-primary {
  background: #9c7640;
  color: #faf8f4;
}
.btn-primary:hover {
  background: #7d5e34;
  transform: translateY(-2px);
}
.btn-outline-light {
  border: 1px solid rgba(250, 248, 244, 0.35);
  color: #faf8f4;
  background: transparent;
}
.btn-outline-light:hover {
  border-color: rgba(250, 248, 244, 0.8);
  transform: translateY(-2px);
}
.btn-outline-dark {
  border: 1px solid #1d1e2b;
  color: #1d1e2b;
  background: transparent;
}
.btn-outline-dark:hover {
  background: #1d1e2b;
  color: #faf8f4;
  transform: translateY(-2px);
}

/* Photo container with a slow, deliberate zoom on hover — used anywhere a
   property photo or hero image should feel alive rather than static. */
.img-zoom {
  overflow: hidden;
}
.img-zoom img {
  transition: transform 1.2s cubic-bezier(0.22, 1, 0.36, 1);
}
.img-zoom:hover img {
  transform: scale(1.06);
}

/* Animated underline on nav links */
.nav-link {
  position: relative;
}
.nav-link::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -4px;
  width: 100%;
  height: 1px;
  background: #9c7640;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.25s ease;
}
.nav-link:hover::after,
.nav-link.is-active::after {
  transform: scaleX(1);
}

/* Scroll-reveal: elements fade + rise into place once, the first time
   they enter the viewport. JS toggles .is-visible via IntersectionObserver
   (see initReveal() in main.js). Falls back to visible if JS never runs. */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.8s cubic-bezier(0.22, 1, 0.36, 1), transform 0.8s cubic-bezier(0.22, 1, 0.36, 1);
}
.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}
.reveal-delay-1.is-visible { transition-delay: 0.12s; }
.reveal-delay-2.is-visible { transition-delay: 0.24s; }

/* Word-by-word hero headline reveal. Wrap each word (or line) in
   <span class="word-reveal"> — JS staggers the animation-delay via a
   --i custom property set on each span (see splitHeadline() in main.js). */
.word-reveal {
  display: inline-block;
  opacity: 0;
  transform: translateY(0.6em);
  animation: word-rise 0.9s cubic-bezier(0.22, 1, 0.36, 1) forwards;
  animation-delay: calc(var(--i, 0) * 0.07s + 0.1s);
}
@keyframes word-rise {
  to { opacity: 1; transform: translateY(0); }
}

/* Staggered entrance for card grids rendered by JS (deals grid, featured
   deals) — plays once on load rather than on scroll, since the grid often
   renders above the fold. */
.stagger-in > * {
  animation: stagger-rise 0.6s cubic-bezier(0.22, 1, 0.36, 1) both;
}
.stagger-in > *:nth-child(1) { animation-delay: 0.02s; }
.stagger-in > *:nth-child(2) { animation-delay: 0.08s; }
.stagger-in > *:nth-child(3) { animation-delay: 0.14s; }
.stagger-in > *:nth-child(4) { animation-delay: 0.2s; }
.stagger-in > *:nth-child(5) { animation-delay: 0.26s; }
.stagger-in > *:nth-child(6) { animation-delay: 0.32s; }
.stagger-in > *:nth-child(n+7) { animation-delay: 0.36s; }
@keyframes stagger-rise {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (prefers-reduced-motion: reduce) {
  .reveal, .stagger-in > *, .word-reveal {
    animation: none !important;
    transition: none !important;
    opacity: 1 !important;
    transform: none !important;
  }
  .img-zoom:hover img { transform: none; }
}
