/* ============================================================================
   sections/header.css — Sticky header / primary navigation + mobile overlay
   ----------------------------------------------------------------------------
   States: transparent over hero -> on scroll shrinks into a frosted dark-green
   bar with a gold bottom hairline. JS (nav.js) toggles .is-scrolled / .is-open.
   ========================================================================== */

.site-header {
  position: fixed; top: 0; left: 0; right: 0;
  z-index: var(--z-header);
  display: flex; align-items: center; justify-content: space-between;
  gap: var(--space-5);
  padding: clamp(.9rem, 2vw, 1.4rem) var(--gutter);
  transition: padding var(--dur) var(--ease), background var(--dur) var(--ease),
              box-shadow var(--dur) var(--ease), border-color var(--dur) var(--ease);
  border-bottom: 1px solid transparent;
}
.site-header.is-scrolled {
  padding-block: .7rem;
  background: rgba(8,41,30,.72);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  border-bottom-color: var(--line);
  box-shadow: 0 8px 30px -16px rgba(0,0,0,.6);
}

/* ---- Brand lockup ---------------------------------------------------- */
.brand { display: flex; align-items: center; gap: .7rem; }
/* Logo is a non-square badge — size by height, let width follow. */
.brand .mark { height: 50px; width: auto; transition: height var(--dur) var(--ease); filter: drop-shadow(0 2px 6px rgba(0,0,0,.35)); }
.is-scrolled .brand .mark { height: 42px; }
.brand .wordmark { display: flex; flex-direction: column; line-height: 1.05; }
.brand .wordmark b {
  font-family: var(--font-display); font-weight: 600; font-size: 1.05rem;
  letter-spacing: .14em; text-transform: uppercase; color: var(--cream-100);
}
.brand .wordmark small {
  font-size: .58rem; letter-spacing: .26em; text-transform: uppercase;
  color: var(--gold-500); font-weight: 600;
}

/* ---- Desktop nav ----------------------------------------------------- */
.nav { display: flex; align-items: center; gap: clamp(1rem, 2.4vw, 2.2rem); }
.nav a {
  position: relative; font-size: var(--fs-small); font-weight: 600; letter-spacing: .04em;
  color: var(--text-on-dark); padding-block: .25rem;
}
.nav a::after {
  content: ""; position: absolute; left: 0; bottom: -2px; height: 2px; width: 100%;
  background: var(--gold-500); transform: scaleX(0); transform-origin: left;
  transition: transform var(--dur) var(--ease);
}
.nav a:hover, .nav a[aria-current="page"] { color: var(--gold-300); }
.nav a:hover::after, .nav a[aria-current="page"]::after { transform: scaleX(1); }

/* ---- Right cluster --------------------------------------------------- */
.header-cta { display: flex; align-items: center; gap: .6rem; }
.icon-btn {
  display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%;
  border: 1px solid var(--line); color: var(--gold-300);
  transition: background var(--dur-fast) var(--ease), border-color var(--dur-fast) var(--ease), transform var(--dur-fast) var(--ease);
}
.icon-btn:hover { background: rgba(201,162,75,.12); border-color: var(--gold-500); transform: translateY(-2px); }
.icon-btn svg { width: 18px; height: 18px; }

/* ---- Hamburger ------------------------------------------------------- */
.hamburger { display: none; width: 44px; height: 44px; place-items: center; color: var(--gold-300); }
.hamburger svg { width: 26px; height: 26px; }

/* ---- Full-screen mobile overlay menu --------------------------------- */
.mobile-menu {
  position: fixed; inset: 0; z-index: var(--z-overlay);
  background: var(--green-900);
  display: flex; flex-direction: column; justify-content: center; gap: 1.25rem;
  padding: var(--gutter);
  transform: translateY(-100%);
  transition: transform var(--dur-slow) var(--ease);
  overflow: hidden;
}
.mobile-menu.is-open { transform: none; }
.mobile-menu .close { position: absolute; top: 1.25rem; right: 1.25rem; width: 44px; height: 44px; display: grid; place-items: center; color: var(--gold-300); }
.mobile-menu .close svg { width: 26px; height: 26px; }
.mobile-menu nav { display: flex; flex-direction: column; gap: 1rem; }
.mobile-menu nav a {
  font-family: var(--font-display); font-size: clamp(1.8rem, 8vw, 2.6rem);
  color: var(--cream-100); letter-spacing: .04em;
  opacity: 0; transform: translateY(20px);
}
.mobile-menu.is-open nav a { animation: menu-in var(--dur-slow) var(--ease) forwards; }
.mobile-menu.is-open nav a:nth-child(1) { animation-delay: .06s; }
.mobile-menu.is-open nav a:nth-child(2) { animation-delay: .12s; }
.mobile-menu.is-open nav a:nth-child(3) { animation-delay: .18s; }
.mobile-menu.is-open nav a:nth-child(4) { animation-delay: .24s; }
.mobile-menu .menu-actions { display: flex; flex-wrap: wrap; gap: .6rem; margin-top: 1.5rem; }
.mobile-menu .menu-socials { display: flex; gap: 1rem; margin-top: 1rem; color: var(--gold-300); }
.mobile-menu .menu-silhouette { position: absolute; right: -10%; bottom: -5%; width: 70%; opacity: .08; color: var(--gold-500); pointer-events: none; }
@keyframes menu-in { to { opacity: 1; transform: none; } }

/* ---- Responsive switch ----------------------------------------------
   The menu is intentionally short (Home / Products / About), so on mobile we
   keep it as a fixed inline nav in the hero header — NOT a hamburger overlay. */
@media (max-width: 980px) {
  .header-cta .btn { display: none; }   /* hide the big "Request a Quote" pill */
  .hamburger { display: none; }         /* no hamburger — nav stays visible */

  .site-header { gap: var(--space-3); padding-inline: var(--space-4); }
  .nav { display: flex; gap: clamp(.7rem, 4vw, 1.4rem); }
  .nav a { font-size: .82rem; letter-spacing: .03em; }
  /* Keep it to three: Home / Products / About (hide Contact on mobile — the
     floating dock + Request-a-Quote already cover reaching out). */
  .nav a[href="#contact"] { display: none; }
}

/* Very small screens: drop the wordmark text, keep the logo mark + nav. */
@media (max-width: 560px) {
  .brand .wordmark { display: none; }
  .brand .mark { height: 40px; }
  .header-cta { gap: .4rem; }
  .icon-btn { width: 36px; height: 36px; }
}

@media (prefers-reduced-motion: reduce) {
  .mobile-menu.is-open nav a { animation: none; opacity: 1; transform: none; }
}
