/* DMNT Header Widget */

/* Site-wide override: theme reset.css applies background-color: #4dcc33 on button :hover/:focus.
   Force it transparent everywhere (loaded on all pages where the header widget is present). */
[type="button"]:hover,
[type="button"]:focus,
[type="submit"]:hover,
[type="submit"]:focus,
button:hover,
button:focus {
  background-color: transparent !important;
}

.dmnt-header,
.dmnt-header * { box-sizing: border-box; }

.dmnt-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 9990;
  width: 100%;
  background: transparent;
  transition: background-color 0.35s ease, box-shadow 0.35s ease, backdrop-filter 0.35s ease;
  font-family: 'Obvia', 'Inter Tight', system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
}

.dmnt-header.scrolled {
  background: #382619 !important;
  background-color: #382619 !important;
  box-shadow: 0 2px 18px rgba(0, 0, 0, 0.18);
}

/* Always-solid mode: lock background, no transition flicker on first paint */
.dmnt-header.is-solid {
  background: #382619;
  box-shadow: 0 2px 18px rgba(0, 0, 0, 0.18);
  transition: none;
}

/* Spacer reserves vertical space for the fixed header on non-transparent pages */
.dh-spacer { display: block; width: 100%; }

.dmnt-header-inner {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  height: 65px;
  max-width: 1320px;
  margin: 0 auto;
  padding: 0 32px;
}

/* ---------- Logo ---------- */
.dh-logo {
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;       /* center the two stacked lines */
  line-height: 1.05;
  color: #fff;
  text-decoration: none;
  font-weight: 700;
  font-size: 20px;
  letter-spacing: 0.02em;
  white-space: nowrap;
  flex-shrink: 0;
  text-align: center;
}
.dh-logo img { display: block; height: 40px; width: auto; }
.dh-logo-line { display: block; }

/* ---------- Desktop nav ---------- */
.dh-nav {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
}
.dh-menu {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  align-items: center;
  gap: 36px;
}
.dh-link {
  position: relative;
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  color: #e9ddc8;
  font-size: 15px;
  font-weight: 550;
  line-height: 1;
  letter-spacing: 0;
  padding: 8px 0;
  transition: color 0.2s ease;
}
.dh-link span { display: inline-block; }
.dh-link.is-active {
  color: #ffffff;
  font-weight: 1000;
}
/* Underline indicator that animates on hover and shows for active */
.dh-link::after {
  content: '';
  position: absolute;
  left: 0; right: 0;
  bottom: 2px;
  height: 1.5px;
  background: currentColor;
  transform-origin: left center;
  transform: scaleX(0);
  transition: transform 0.3s cubic-bezier(0.65, 0, 0.35, 1);
}
.dh-link:hover::after { transform: scaleX(1); }
.dh-link.is-active::after { transform: scaleX(1); }

/* ---------- CTA pill ---------- */
.dh-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 161px;
  height: 40px;
  border-radius: 37px;
  background: #cbb59a;
  color: #382619;
  text-decoration: none;
  font-size: 16px;
  font-weight: 550;
  line-height: 1.2;
  letter-spacing: 0;
  flex-shrink: 0;
  transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
  -webkit-tap-highlight-color: transparent;
}
.dh-cta svg { width: 16px; height: 16px; flex-shrink: 0; }
.dh-cta:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.22);
}
.dh-cta:active { transform: translateY(0); }

/* ---------- Mobile toggle (hamburger) ---------- */
.dh-toggle {
  display: none;
  position: relative;
  width: 38px;
  height: 38px;
  margin-left: auto;
  background: transparent;
  border: 0;
  padding: 0;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  flex-shrink: 0;
}
.dh-toggle-bar {
  position: absolute;
  left: 8px;
  width: 22px;
  height: 2px;
  background: #fff;
  border-radius: 2px;
  transition: transform 0.4s cubic-bezier(0.68, -0.55, 0.27, 1.55), opacity 0.25s ease, top 0.3s ease 0.15s;
}
.dh-toggle-bar:nth-child(1) { top: 12px; }
.dh-toggle-bar:nth-child(2) { top: 18px; }
.dh-toggle-bar:nth-child(3) { top: 24px; }

.dh-toggle.is-open .dh-toggle-bar {
  transition: top 0.3s ease, transform 0.4s cubic-bezier(0.68, -0.55, 0.27, 1.55) 0.15s, opacity 0.2s ease;
}
.dh-toggle.is-open .dh-toggle-bar:nth-child(1) { top: 18px; transform: rotate(45deg); }
.dh-toggle.is-open .dh-toggle-bar:nth-child(2) { opacity: 0; transform: scaleX(0); }
.dh-toggle.is-open .dh-toggle-bar:nth-child(3) { top: 18px; transform: rotate(-45deg); }

/* ---------- Mobile slide panel ---------- */
.dh-panel {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 100vh;
  height: 100dvh;
  background: #382619;
  padding-top: 53px;
  z-index: 9989;
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
  transform: translateY(-12px);
  transition: opacity 0.35s ease, transform 0.45s cubic-bezier(0.22, 1, 0.36, 1), visibility 0s linear 0.4s;
  overflow-y: auto;
  overscroll-behavior: contain;
}
.dh-panel.is-open {
  visibility: visible;
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
  transition: opacity 0.35s ease, transform 0.5s cubic-bezier(0.22, 1, 0.36, 1), visibility 0s linear 0s;
}
.dh-panel-inner {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 32px 28px calc(48px + env(safe-area-inset-bottom));
  max-width: 720px;
  margin: 0 auto;
}

/* In-panel close button */
.dh-panel-close {
  position: absolute;
  top: 14px;
  right: 18px;
  width: 42px;
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  cursor: pointer;
  padding: 0;
  z-index: 2;
  opacity: 0;
  transform: scale(0.8) rotate(-90deg);
  transition: opacity 0.3s ease, transform 0.4s cubic-bezier(0.22, 1, 0.36, 1), background 0.25s ease, border-color 0.25s ease;
  -webkit-tap-highlight-color: transparent;
}
.dh-panel-close svg { width: 20px; height: 20px; transition: transform 0.3s ease; }
.dh-panel-close:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.2);
}
.dh-panel-close:hover svg { transform: rotate(90deg); }
.dh-panel-close:active { transform: scale(0.92); }
.dh-panel.is-open .dh-panel-close {
  opacity: 1;
  transform: scale(1) rotate(0deg);
  transition-delay: 0.15s;
}
.dh-panel-menu {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
}
.dh-panel-item {
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.4s ease, transform 0.5s cubic-bezier(0.22, 1, 0.36, 1);
  transition-delay: calc(60ms * var(--i, 0));
}
.dh-panel.is-open .dh-panel-item {
  opacity: 1;
  transform: translateY(0);
  transition-delay: calc(80ms + 50ms * var(--i, 0));
}
.dh-panel-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 4px;
  font-family: 'Obvia', 'Inter Tight', system-ui, sans-serif;
  font-size: 22px;
  font-weight: 550;
  color: #e9ddc8;
  text-decoration: none;
  line-height: 1;
  transition: color 0.25s ease, transform 0.25s ease;
}
.dh-panel-link svg {
  width: 18px;
  height: 18px;
  opacity: 0.5;
  transform: translateX(-6px);
  transition: opacity 0.25s ease, transform 0.25s ease;
}
.dh-panel-link:hover {
  color: #fff;
  transform: translateX(2px);
}
.dh-panel-link:hover svg {
  opacity: 1;
  transform: translateX(0);
}
.dh-panel-link.is-active {
  color: #fff;
  font-weight: 1000;
}
.dh-panel-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-top: 16px;
  height: 52px;
  border-radius: 37px;
  background: #cbb59a;
  color: #382619;
  text-decoration: none;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.2;
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.4s ease, transform 0.5s cubic-bezier(0.22, 1, 0.36, 1);
  transition-delay: 200ms;
}
.dh-panel-cta svg { width: 18px; height: 18px; }
.dh-panel.is-open .dh-panel-cta {
  opacity: 1;
  transform: translateY(0);
  transition-delay: calc(80ms + 50ms * var(--menu-count, 5));
}

/* Lock body scroll when panel open */
body.dh-panel-open { overflow: hidden; }

/* ---------- Responsive breakpoints ---------- */
@media (max-width: 1024px) {
  .dh-menu { gap: 24px; }
  .dh-link { font-size: 14px; }
  .dh-header-inner { padding: 0 24px; }
}

@media (max-width: 880px) {
  .dh-nav { display: none; }
  .dh-cta { display: none; }
  .dh-toggle { display: block; }
  .dmnt-header-inner { padding: 0 20px; }
}

@media (max-width: 480px) {
  .dmnt-header-inner { padding: 0 16px; }
  .dh-logo { font-size: 12px; }
  .dh-panel-link { font-size: 20px; padding: 16px 2px; }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  .dmnt-header,
  .dh-link::after,
  .dh-toggle-bar,
  .dh-panel,
  .dh-panel-item,
  .dh-panel-link,
  .dh-panel-cta,
  .dh-cta { transition-duration: 0.01ms !important; }
}

[type="button"]:hover, [type="button"]:focus, [type="submit"]:hover, [type="submit"]:focus, button:hover, button:focus {
	background-color: #382619 !important;
}
