/* ============ SITE HEADER ============ */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: var(--z-header);
  height: 80px;
  transition: background var(--duration-slow) var(--ease-out-expo),
              box-shadow var(--duration-slow) var(--ease-out-expo);
}

.site-header.scrolled {
  background: rgba(253, 251, 247, 0.94);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: 0 1px 0 rgba(26, 24, 20, 0.05);
}

.header-inner {
  display: flex;
  align-items: center;
  height: 100%;
  max-width: var(--content-wide);
  margin: 0 auto;
  padding: 0 var(--gutter);
  gap: 40px;
}

/* ============ LOGO ============ */
.header-logo {
  flex-shrink: 0;
  display: flex;
  align-items: center;
}

.header-logo img {
  height: 30px;
  width: auto;
  filter: brightness(0) invert(1);
  transition: filter var(--duration-slow) var(--ease-out-expo);
}

.site-header.scrolled .header-logo img {
  filter: brightness(0) saturate(0);
}

/* ============ NAV ============ */
.header-nav {
  display: flex;
  align-items: center;
  margin-left: auto;
}

.header-nav ul {
  display: flex;
  align-items: center;
  gap: 0;
}

.header-nav a {
  display: flex;
  align-items: center;
  padding: 6px 20px;
  font-family: var(--font-body);
  font-size: 0.8125rem;
  font-weight: 500;
  letter-spacing: 0.03em;
  color: rgba(255, 255, 255, 0.65);
  border-radius: var(--radius-full);
  transition: color var(--duration-base) var(--ease-out-expo),
              background var(--duration-base) var(--ease-out-expo);
  position: relative;
  white-space: nowrap;
}

.header-nav a:hover {
  color: var(--white);
  background: rgba(255, 255, 255, 0.07);
}

/* ============ SCROLLED OVERRIDES ============ */
.site-header.scrolled .header-nav a {
  color: var(--stone);
}

.site-header.scrolled .header-nav a:hover {
  color: var(--espresso);
  background: rgba(26, 24, 20, 0.04);
}

.site-header.scrolled .hamburger span {
  background: var(--espresso);
}

/* ============ CTA BUTTON ============ */
.header-actions {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-shrink: 0;
  margin-left: 12px;
}

.btn-gold {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 24px;
  font-family: var(--font-body);
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--espresso);
  background: var(--gold);
  border-radius: var(--radius-full);
  transition: all var(--duration-base) var(--ease-out-expo);
  white-space: nowrap;
}

.btn-gold:hover {
  background: var(--gold-dark);
  color: var(--white);
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(196, 167, 125, 0.25);
}

.btn-gold:active {
  transform: translateY(0);
}

.btn-gold .btn-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: var(--radius-full);
  background: rgba(26, 24, 20, 0.08);
  font-size: 0.75rem;
  transition: transform var(--duration-base) var(--ease-out-expo),
              background var(--duration-base) var(--ease-out-expo);
}

.btn-gold:hover .btn-icon {
  transform: translateX(2px);
  background: rgba(255, 255, 255, 0.15);
}

/* ============ HAMBURGER ============ */
.hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  width: 44px;
  height: 44px;
  border-radius: var(--radius-full);
  cursor: pointer;
  position: relative;
  z-index: calc(var(--z-overlay) + 1);
  transition: background var(--duration-base) var(--ease-out-expo);
}

.hamburger:hover {
  background: rgba(255, 255, 255, 0.08);
}

.site-header.scrolled .hamburger:hover {
  background: rgba(26, 24, 20, 0.04);
}

.hamburger span {
  display: block;
  width: 18px;
  height: 1.5px;
  background: var(--white);
  border-radius: 1px;
  transition: all var(--duration-base) var(--ease-out-expo);
  position: absolute;
}

.hamburger span:nth-child(1) {
  transform: translateY(-5px);
}

.hamburger span:nth-child(2) {
  transform: translateY(0);
}

.hamburger span:nth-child(3) {
  transform: translateY(5px);
}

.hamburger.active span:nth-child(1) {
  transform: rotate(45deg);
}

.hamburger.active span:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);
}

.hamburger.active span:nth-child(3) {
  transform: rotate(-45deg);
}

/* ============ MOBILE OVERLAY ============ */
.mobile-overlay {
  position: fixed;
  inset: 0;
  z-index: var(--z-overlay);
  background: rgba(253, 251, 247, 0.97);
  backdrop-filter: blur(40px);
  -webkit-backdrop-filter: blur(40px);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity calc(var(--duration-slow) + 200ms) var(--ease-out-expo),
              visibility calc(var(--duration-slow) + 200ms) var(--ease-out-expo);
}

.mobile-overlay.open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

/* Close button positioned outside overlay flow */
.mobile-close {
  position: absolute;
  top: 20px;
  right: clamp(1.5rem, 4vw, 3rem);
  z-index: calc(var(--z-overlay) + 2);
  width: 44px;
  height: 44px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  background: rgba(26, 24, 20, 0.04);
  border: none;
  transition: background var(--duration-base) var(--ease-out-expo);
  opacity: 0;
  transform: translateY(-8px);
}

.mobile-overlay.open .mobile-close {
  opacity: 1;
  transform: translateY(0);
  transition: opacity var(--duration-base) var(--ease-out-expo) 0.3s,
              transform var(--duration-base) var(--ease-out-expo) 0.3s,
              background var(--duration-base) var(--ease-out-expo);
}

.mobile-close:hover {
  background: rgba(26, 24, 20, 0.08);
}

.mobile-close span {
  position: absolute;
  width: 18px;
  height: 1.5px;
  background: var(--espresso);
  border-radius: 1px;
}

.mobile-close span:nth-child(1) {
  transform: rotate(45deg);
}

.mobile-close span:nth-child(2) {
  transform: rotate(-45deg);
}

/* Overlay inner content */
.mobile-overlay-inner {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  height: 100%;
  padding: 80px 2rem 40px;
  text-align: center;
  gap: 2px;
}

/* Gold accent bar above links */
.mobile-overlay-inner::before {
  content: '';
  display: block;
  width: 24px;
  height: 1.5px;
  background: var(--gold);
  margin-bottom: 2rem;
  opacity: 0;
  transform: scaleX(0);
  transition: all var(--duration-base) var(--ease-out-expo) 0.25s;
}

.mobile-overlay.open .mobile-overlay-inner::before {
  opacity: 1;
  transform: scaleX(1);
}

.mobile-overlay a {
  font-family: var(--font-headline);
  font-size: clamp(1.75rem, 5vw, 2.75rem);
  font-weight: 400;
  color: var(--stone);
  padding: 8px 0;
  opacity: 0;
  transform: translateY(20px);
  transition: all var(--duration-slow) var(--ease-out-expo);
  transition-delay: 0s;
  position: relative;
}

.mobile-overlay.open a {
  opacity: 1;
  transform: translateY(0);
}

.mobile-overlay.open a:nth-child(1) { transition-delay: 0.05s; }
.mobile-overlay.open a:nth-child(2) { transition-delay: 0.1s; }
.mobile-overlay.open a:nth-child(3) { transition-delay: 0.15s; }
.mobile-overlay.open a:nth-child(4) { transition-delay: 0.2s; }

.mobile-overlay a:hover {
  color: var(--espresso);
}

/* Active link indicator */
.mobile-overlay a::after {
  content: '';
  position: absolute;
  bottom: 4px;
  left: 50%;
  transform: translateX(-50%) scaleX(0);
  width: 20px;
  height: 1px;
  background: var(--gold);
  transition: transform var(--duration-base) var(--ease-out-expo);
}

.mobile-overlay a:hover::after {
  transform: translateX(-50%) scaleX(1);
}

/* CTA button in overlay */
.mobile-overlay .mobile-cta {
  font-family: var(--font-body);
  font-size: 0.875rem;
  font-weight: 600;
  margin-top: 2.5rem;
  padding: 14px 36px;
  background: var(--gold);
  color: var(--espresso);
  border-radius: var(--radius-full);
  opacity: 0;
  transform: translateY(20px);
  transition: all var(--duration-slow) var(--ease-out-expo);
  transition-delay: 0.25s;
}

.mobile-overlay.open .mobile-cta {
  opacity: 1;
  transform: translateY(0);
}

.mobile-overlay .mobile-cta:hover {
  background: var(--gold-dark);
  color: var(--white);
}

/* Brand statement at bottom */
.mobile-overlay-brand {
  position: absolute;
  bottom: 2rem;
  left: 0;
  right: 0;
  text-align: center;
  font-family: var(--font-body);
  font-size: 0.625rem;
  font-weight: 500;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: rgba(26, 24, 20, 0.25);
  opacity: 0;
  transition: opacity var(--duration-slow) var(--ease-out-expo) 0.4s;
}

.mobile-overlay.open .mobile-overlay-brand {
  opacity: 1;
}

/* ============ RESPONSIVE ============ */
@media (max-width: 1024px) {
  .header-nav {
    display: none;
  }

  .header-actions {
    display: none;
  }

  .hamburger {
    display: flex;
    margin-left: auto;
  }

  .mobile-overlay {
    display: block;
  }
}
