/* ------------------------------------------------------------------
   B&B Den Duine — custom utilities
   The signature: the vertical timber slat wall behind the bed,
   abstracted into a thin ribbed divider used between sections.
------------------------------------------------------------------ */

:root {
  --dd-slat-gap: 9px;
}

html {
  scroll-behavior: smooth;
}

/* Anchor targets sit below the sticky header when jumped to */
:where([id]) {
  scroll-margin-top: 5.5rem;
}

/* Fixed header — always visible while scrolling.
   position:fixed is used instead of sticky because sticky is silently
   disabled if any ancestor has overflow hidden/auto/scroll, which plugins
   or wrappers can introduce. Fixed is immune to that. */
header.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  width: 100%;
  z-index: 100;
  box-shadow: 0 1px 8px rgba(58, 42, 31, 0.06);
}

/* The fixed header sits above the flow, so offset content on normal pages.
   The front page (body.home) has a full-bleed hero and stays flush. */
main {
  padding-top: 4.5rem;
}
.home main {
  padding-top: 0;
}

/* Eyebrow / kicker above section headings ------------------------- */
.dd-eyebrow {
  font-family: var(--wp--preset--font-family--body);
  text-transform: uppercase;
  letter-spacing: 0.2em;
  font-size: 0.76rem;
  font-weight: 600;
  color: var(--wp--preset--color--cognac);
  margin: 0 0 0.4rem;
}

/* On dark (espresso/ink) sections the kicker shifts to oak */
.has-espresso-background-color .dd-eyebrow,
.has-ink-background-color .dd-eyebrow {
  color: var(--wp--preset--color--oak);
}

/* Vertical-slat divider ------------------------------------------- */
.dd-slat {
  height: 34px;
  width: 100%;
  background-image: repeating-linear-gradient(
    90deg,
    var(--wp--preset--color--oak) 0,
    var(--wp--preset--color--oak) 2px,
    transparent 2px,
    transparent var(--dd-slat-gap)
  );
  opacity: 0.65;
}

.dd-slat--dark {
  background-image: repeating-linear-gradient(
    90deg,
    var(--wp--preset--color--espresso) 0,
    var(--wp--preset--color--espresso) 2px,
    transparent 2px,
    transparent var(--dd-slat-gap)
  );
  opacity: 0.4;
}

/* Header navigation links ----------------------------------------- */
.site-header .dd-nav-link a {
  font-family: var(--wp--preset--font-family--body);
  font-size: 0.9rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  color: var(--wp--preset--color--espresso);
}
.site-header .dd-nav-link a:hover {
  color: var(--wp--preset--color--cognac);
}

.site-header .wp-block-site-title a {
  font-family: var(--wp--preset--font-family--display);
  font-weight: 500;
  letter-spacing: -0.01em;
}

/* Give figure captions a quiet, consistent voice ------------------ */
.wp-block-image figcaption,
.wp-block-gallery figcaption {
  font-family: var(--wp--preset--font-family--body);
  font-size: 0.82rem;
  color: color-mix(in srgb, var(--wp--preset--color--espresso) 70%, transparent);
}

/* Respect reduced-motion preference ------------------------------- */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}
