/* ==========================================================================
   Loretta's — one sticky header bar, shared by every page.
   Loaded last so it wins over the older floating .site-logo / .site-nav rules.
   Body class decides the resting state:
     .hero-dark  transparent over a photographic hero, white links
     .hero-light transparent over a cream hero, dark links
     (neither)   solid from the top, and the page is padded to clear it
   ========================================================================== */

:root { --hdr-h: 82px; }

/* anchor targets must clear the fixed bar */
html { scroll-behavior: smooth; }
[id] { scroll-margin-top: calc(var(--hdr-h) + 1.25rem); }

/* visible only when tabbed to */
.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 200;
  background: var(--green-deep); color: #fff;
  padding: 0.75rem 1.2rem; border-radius: 0 0 12px 0;
  font-weight: 600; text-decoration: none;
}
.skip-link:focus { left: 0; }

.hdr {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 60;
  transition: background-color 0.28s ease, box-shadow 0.28s ease, backdrop-filter 0.28s ease;
}
.hdr-inner {
  max-width: 1440px;
  margin: 0 auto;
  min-height: var(--hdr-h);
  display: flex;
  align-items: center;
  gap: clamp(1rem, 2.5vw, 2.25rem);
  padding: 0.7rem clamp(1rem, 4vw, 3.25rem);
}

/* ---------- brand ---------- */
.hdr-brand { display: flex; align-items: center; flex: 0 0 auto; }
.hdr-brand img {
  width: clamp(52px, 6vw, 66px);
  height: auto;
  display: block;
  transition: filter 0.28s ease;
}
body.hero-dark .hdr:not(.is-solid) .hdr-brand img {
  filter: drop-shadow(0 2px 10px rgba(45, 28, 22, 0.45));
}

/* ---------- links ---------- */
.hdr-nav { margin-left: auto; }
.hdr-nav > ul {
  list-style: none;
  display: flex;
  align-items: center;
  gap: clamp(0.9rem, 2vw, 1.9rem);
  margin: 0; padding: 0;
}
.hdr-nav a {
  color: var(--chocolate);
  text-decoration: none;
  font-size: 0.94rem;
  font-weight: 500;
  white-space: nowrap;
  transition: color 0.18s ease;
}
.hdr-nav a:hover, .hdr-nav a:focus-visible { color: var(--caramel-deep); }
.hdr-nav a.active { color: var(--caramel-deep); font-weight: 600; }
body.hero-dark .hdr:not(.is-solid) .hdr-nav a {
  color: rgba(255, 255, 255, 0.94);
  text-shadow: 0 1px 12px rgba(45, 28, 22, 0.5);
}
body.hero-dark .hdr:not(.is-solid) .hdr-nav a:hover,
body.hero-dark .hdr:not(.is-solid) .hdr-nav a.active { color: var(--tan-soft); }

/* ---------- solid state ---------- */
.hdr.is-solid {
  background: rgba(250, 244, 236, 0.96);
  backdrop-filter: saturate(150%) blur(10px);
  box-shadow: 0 2px 22px rgba(87, 59, 40, 0.13);
}
body:not(.hero-dark):not(.hero-light) .hdr { background: rgba(250, 244, 236, 0.96); box-shadow: 0 2px 22px rgba(87, 59, 40, 0.13); }
body:not(.hero-dark):not(.hero-light) { padding-top: var(--hdr-h); }

/* ---------- dropdowns ---------- */
.hdr-nav .has-sub { position: relative; }
.hdr-nav .has-sub > a::after {
  content: '';
  display: inline-block;
  width: 0.34em; height: 0.34em;
  margin-left: 0.42em;
  border-right: 1.6px solid currentColor;
  border-bottom: 1.6px solid currentColor;
  transform: translateY(-0.15em) rotate(45deg);
  transition: transform 0.2s ease;
}
.hdr-nav .has-sub[data-open="true"] > a::after { transform: translateY(0.05em) rotate(-135deg); }
.hdr-sub {
  position: absolute;
  top: calc(100% + 0.55rem);
  left: 50%;
  transform: translateX(-50%) translateY(-6px);
  min-width: 250px;
  list-style: none;
  margin: 0;
  padding: 0.5rem;
  background: #fff;
  border: 1px solid var(--tan-soft);
  border-radius: 16px;
  box-shadow: 0 18px 44px rgba(87, 59, 40, 0.18);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s;
}
.hdr-nav .has-sub:hover .hdr-sub,
.hdr-nav .has-sub:focus-within .hdr-sub,
.hdr-nav .has-sub[data-open="true"] .hdr-sub {
  opacity: 1; visibility: visible; transform: translateX(-50%) translateY(0);
}
/* a hover bridge, so the pointer can cross the gap without the menu closing */
.hdr-nav .has-sub::after {
  content: ''; position: absolute; left: 0; right: 0; top: 100%; height: 0.75rem;
}
.hdr-sub a {
  display: block;
  padding: 0.6rem 0.85rem;
  border-radius: 10px;
  color: var(--chocolate) !important;
  text-shadow: none !important;
  font-size: 0.92rem;
}
.hdr-sub a:hover, .hdr-sub a:focus-visible { background: var(--cream-deep); color: var(--brown-deep) !important; }
.hdr-sub a.active { color: var(--caramel-deep) !important; }

/* ---------- header CTA ---------- */
/* green rather than caramel, so it doesn't compete with the gold badge
   sitting next to it in the hero */
.hdr .btn-hdr {
  background: var(--green-deep);
  color: #fff;
  border: 1.5px solid var(--green-deep);
  border-radius: 999px;
  font-weight: 600;
  text-decoration: none;
  display: inline-block;
  transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}
.hdr .btn-hdr:hover { background: var(--green); border-color: var(--green); color: #fff; }
.hdr-menu .btn-hdr {
  background: var(--green-deep); color: #fff; border: 1.5px solid var(--green-deep);
  border-radius: 999px; font-weight: 600; text-align: center; padding: 0.85rem 1.4rem;
  text-decoration: none;
}

.hdr-cta { flex: 0 0 auto; }
.hdr .btn { padding: 0.62rem 1.25rem; font-size: 0.88rem; }
body.hero-dark .hdr:not(.is-solid) .hdr-cta .btn-primary { box-shadow: 0 6px 22px rgba(45, 28, 22, 0.35); }

/* ---------- burger ---------- */
.hdr-toggle {
  display: none;
  flex: 0 0 auto;
  width: 44px; height: 44px;
  background: none; border: none; cursor: pointer;
  padding: 10px 9px;
}
.hdr-toggle span {
  display: block; height: 2px; border-radius: 2px;
  background: var(--chocolate);
  margin: 4px 0;
  transition: background 0.28s ease;
}
body.hero-dark .hdr:not(.is-solid) .hdr-toggle span { background: #fff; }

/* ---------- mobile ---------- */
@media (max-width: 980px) {
  :root { --hdr-h: 70px; }
  .hdr-nav, .hdr-cta { display: none; }
  .hdr-toggle { display: block; margin-left: auto; }
}

.hdr-menu {
  position: fixed; inset: 0; z-index: 70;
  background: var(--cream);
  padding: 1.1rem clamp(1.2rem, 6vw, 2rem) 2.5rem;
  overflow-y: auto;
  display: flex; flex-direction: column;
}
.hdr-menu[hidden] { display: none; }
.hdr-menu-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 1.5rem; }
.hdr-menu-top img { width: 60px; height: auto; }
.hdr-menu-close { background: none; border: none; font-size: 2rem; line-height: 1; color: var(--brown-deep); cursor: pointer; }
.hdr-menu ul { list-style: none; margin: 0; padding: 0; }
.hdr-menu nav { display: block; }
.hdr-menu-list > li { border-bottom: 1px solid var(--tan-soft); }
.hdr-menu-list > li > a,
.hdr-menu-list > li > button {
  display: flex; align-items: center; justify-content: space-between; width: 100%;
  padding: 1rem 0.2rem;
  font-family: 'Fraunces', serif; font-size: 1.25rem; font-weight: 600;
  color: var(--green-deep); text-decoration: none;
  background: none; border: none; text-align: left; cursor: pointer;
}
.hdr-menu-list > li > button::after {
  content: '+'; font-family: 'Outfit', sans-serif; font-size: 1.4rem; color: var(--caramel-deep);
}
.hdr-menu-list > li[data-open="true"] > button::after { content: '\2013'; }
.hdr-menu .hdr-sub-m { display: none; padding: 0 0 0.9rem 0.2rem; }
.hdr-menu-list > li[data-open="true"] .hdr-sub-m { display: block; }
.hdr-menu .hdr-sub-m a {
  display: block; padding: 0.55rem 0; font-size: 1rem;
  color: var(--chocolate); text-decoration: none;
}
.hdr-menu .hdr-sub-m a:hover { color: var(--caramel-deep); }
.hdr-menu-cta { margin-top: auto; padding-top: 1.75rem; display: grid; gap: 0.7rem; }

@media (prefers-reduced-motion: reduce) {
  .hdr, .hdr-sub, .hdr-brand img, .hdr-toggle span { transition: none; }
}
