/* =========================================================
   GRIFFIN MARKETING — HEADER / NAV
   Glassmorphism on scroll, logo color swap, hamburger menu
   ========================================================= */

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  padding: 22px 0;
  background: transparent;
  transition: all 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}

.site-header.scrolled {
  padding: 14px 0;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: saturate(180%) blur(16px);
  -webkit-backdrop-filter: saturate(180%) blur(16px);
  border-bottom: 1px solid rgba(232, 226, 208, 0.6);
  box-shadow: 0 2px 20px rgba(26, 26, 26, 0.04);
}

.nav-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 32px;
}

/* Brand / Logo */
.brand {
  display: flex;
  align-items: center;
  gap: 8px;
  /* Fallback type styling if image is missing */
  font-family: "Playfair Display", Georgia, serif;
  font-size: 1.75rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: #C9A227;
}

.brand img {
  height: 42px;
  width: auto;
  display: block;
  transition: height 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}

.site-header.scrolled .brand img {
  height: 36px;
}

.brand-mark {
  font-style: italic;
  color: #1A1A1A;
  font-weight: 400;
}

/* Nav links */
.nav-list {
  display: flex;
  align-items: center;
  gap: 36px;
  list-style: none;
}

.nav-list a {
  font-family: "Inter", sans-serif;
  font-size: 0.875rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: #1A1A1A;
  position: relative;
  padding: 8px 0;
  transition: color 0.3s ease;
}

.nav-list a::after {
  content: "";
  position: absolute;
  bottom: 2px;
  left: 0;
  width: 0;
  height: 1.5px;
  background: #C9A227;
  transition: width 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}

.nav-list a:hover::after,
.nav-list a.active::after {
  width: 100%;
}

.nav-list a:hover {
  color: #9A7A1F;
}

.nav-list a.active {
  color: #9A7A1F;
}

.nav-cta {
  background: #C9A227;
  color: #FFFFFF !important;
  padding: 12px 24px !important;
  border-radius: 4px;
  font-weight: 600 !important;
  letter-spacing: 0.08em !important;
  text-transform: uppercase;
  font-size: 0.8125rem !important;
  transition: all 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}

.nav-cta::after { display: none; }

.nav-cta:hover {
  background: #9A7A1F !important;
  color: #FFFFFF !important;
  transform: translateY(-1px);
  box-shadow: 0 8px 20px rgba(201, 162, 39, 0.3);
}

/* Hamburger */
.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  position: relative;
  z-index: 1100;
  cursor: pointer;
}

.nav-toggle span {
  position: absolute;
  left: 10px;
  width: 24px;
  height: 1.5px;
  background: #1A1A1A;
  transition: all 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}

.nav-toggle span:nth-child(1) { top: 16px; }
.nav-toggle span:nth-child(2) { top: 22px; width: 18px; }
.nav-toggle span:nth-child(3) { top: 28px; }

.nav-toggle.open span:nth-child(1) {
  top: 22px;
  transform: rotate(45deg);
  width: 24px;
}

.nav-toggle.open span:nth-child(2) {
  opacity: 0;
}

.nav-toggle.open span:nth-child(3) {
  top: 22px;
  transform: rotate(-45deg);
  width: 24px;
}

/* Mobile menu */
@media (max-width: 900px) {
  .nav-toggle { display: block; }

  .nav-list {
    position: fixed;
    top: 0;
    right: 0;
    width: min(85vw, 380px);
    /* Height driven by content, capped at viewport for safety */
    max-height: 100vh;
    background: #FFFFFF;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    padding: 100px 32px 24px;
    gap: 0;
    box-shadow: -20px 0 60px rgba(0, 0, 0, 0.15);
    border-bottom-left-radius: 12px;
    transform: translateX(100%);
    transition: transform 0.5s cubic-bezier(0.22, 1, 0.36, 1);
    overflow-y: auto;
    /* Sit ABOVE the backdrop and BELOW the toggle */
    z-index: 1080;
  }

  .nav-list.open {
    transform: translateX(0);
  }

  .nav-list li {
    width: 100%;
    border-bottom: 1px solid #F4EFE2;
  }

  .nav-list li:last-child {
    border-bottom: none;
    margin-top: 0;
    padding-top: 16px;
  }

  .nav-list a {
    display: block;
    padding: 18px 0;
    font-size: 1.0625rem;
    font-family: "Playfair Display", Georgia, serif;
    font-weight: 600;
    line-height: 1.4;
  }

  .nav-list a::after { display: none; }

  /* Apply button — match the rendered height of regular menu items.
     Regular item: padding 18px + font 17px * line-height 1.4 ≈ 60px tall.
     Mirror that exactly with matching font-size + line-height + padding. */
  .nav-list .nav-cta,
  .nav-cta {
    display: block !important;
    width: 100%;
    padding: 18px 24px !important;
    margin: 0 !important;
    text-align: center;
    font-family: "Inter", sans-serif !important;
    font-size: 0.9375rem !important;
    font-weight: 600 !important;
    line-height: 1.4 !important;
    letter-spacing: 0.08em !important;
    text-transform: uppercase;
    border-radius: 4px;
    box-sizing: border-box;
  }

  /* Backdrop when open — sits BELOW the header so the menu panel
     (which lives inside .site-header) can render on top of it.
     The backdrop only needs to cover the page content. */
  .nav-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 990;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s ease;
  }

  .nav-backdrop.show {
    opacity: 1;
    pointer-events: auto;
  }
}

/* Larger screens — push brand to top-left, nav to top-right corners,
   then add 20px breathing room */
@media (min-width: 901px) {
  .site-header .container,
  .site-header .nav-inner {
    max-width: 100%;
    padding-left: 0;
    padding-right: 0;
    margin-left: 0;
    margin-right: 0;
  }

  .brand {
    margin-left: 0;
    margin-right: 80px;
  }

  .nav-list {
    margin-left: 1000px;
    margin-right: 0;
  }
}