/* ==========================================================================
   Cielo Vista Farms — Site Header / Navigation
   ========================================================================== */

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: transparent;
  transition:
    background-color 0.35s ease,
    box-shadow 0.35s ease,
    backdrop-filter 0.35s ease;
}

.site-header::before {
  /* Soft gradient so the menu reads on top of bright photos */
  content: "";
  position: absolute;
  inset: 0 0 -40px;
  background: linear-gradient(180deg, rgba(15, 13, 10, 0.55), rgba(15, 13, 10, 0));
  pointer-events: none;
  opacity: 1;
  transition: opacity 0.35s ease;
}

.site-header.scrolled {
  background: rgba(23, 21, 18, 0.9);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.22);
}

.site-header.scrolled::before {
  opacity: 0;
}

.header-inner {
  position: relative;
  width: min(1320px, 100% - 3rem);
  margin-inline: auto;
  height: 88px;
  display: flex;
  align-items: center;
  gap: 2rem;
  transition: height 0.35s ease;
}

.site-header.scrolled .header-inner {
  height: 72px;
}

/* Brand */
.brand {
  flex-shrink: 0;
  display: flex;
  align-items: center;
}

.brand img {
  height: 62px;
  width: auto;
  object-fit: contain;
  filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.35));
  transition: height 0.35s ease;
}

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

/* Primary nav */
.site-nav {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin-left: auto;
}

.site-nav a {
  position: relative;
  padding: 0.55rem 1rem;
  color: rgba(255, 255, 255, 0.92);
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 0.97rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  text-decoration: none;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.35);
  transition: color 0.25s ease;
}

.site-nav a::after {
  content: "";
  position: absolute;
  left: 1rem;
  right: 1rem;
  bottom: 0.2rem;
  height: 2px;
  border-radius: 2px;
  background: #fb923c;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}

.site-nav a:hover {
  color: #ffffff;
}

.site-nav a:hover::after {
  transform: scaleX(1);
}

.site-nav a.active {
  color: #fb923c;
}

.site-nav a.active::after {
  transform: scaleX(1);
}

/* Phone pill (desktop) */
.nav-phone {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.65rem 1.4rem;
  border-radius: 999px;
  background: #e8731f;
  color: #ffffff;
  font-family: "Inter", sans-serif;
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: none;
  box-shadow: 0 8px 22px rgba(232, 115, 31, 0.38);
  transition:
    background-color 0.25s ease,
    transform 0.25s ease,
    box-shadow 0.25s ease;
}

.nav-phone svg {
  width: 16px;
  height: 16px;
}

.nav-phone:hover {
  background: #c95c10;
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(232, 115, 31, 0.45);
}

/* Phone link inside mobile drawer */
.nav-phone-mobile {
  display: none;
}

/* Hamburger */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 46px;
  height: 46px;
  padding: 11px;
  border: none;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.12);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  cursor: pointer;
}

.nav-toggle span {
  display: block;
  height: 2px;
  width: 100%;
  border-radius: 2px;
  background: #ffffff;
  transition:
    transform 0.3s ease,
    opacity 0.3s ease;
}

body.nav-open .nav-toggle span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

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

body.nav-open .nav-toggle span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* Overlay behind mobile drawer */
.nav-overlay {
  position: fixed;
  inset: 0;
  z-index: 998;
  background: rgba(10, 9, 7, 0.55);
  -webkit-backdrop-filter: blur(3px);
  backdrop-filter: blur(3px);
  opacity: 0;
  visibility: hidden;
  transition:
    opacity 0.35s ease,
    visibility 0.35s ease;
}

body.nav-open .nav-overlay {
  opacity: 1;
  visibility: visible;
}

/* --------------------------------------------------------------------------
   Mobile
   -------------------------------------------------------------------------- */
@media (max-width: 960px) {
  .nav-phone {
    display: none;
  }

  .nav-toggle {
    display: flex;
    margin-left: auto;
  }

  .site-nav {
    position: fixed;
    top: 0;
    right: 0;
    z-index: 999;
    width: min(340px, 86vw);
    height: 100dvh;
    margin: 0;
    padding: 7.5rem 2rem 2.5rem;
    flex-direction: column;
    align-items: stretch;
    gap: 0.35rem;
    background: #171512;
    transform: translateX(100%);
    transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1);
    overflow-y: auto;
  }

  body.nav-open .site-nav {
    transform: translateX(0);
    box-shadow: -20px 0 60px rgba(0, 0, 0, 0.4);
  }

  .site-nav a {
    padding: 0.95rem 1rem;
    font-size: 1.12rem;
    border-radius: 12px;
    text-shadow: none;
  }

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

  .site-nav a:hover,
  .site-nav a.active {
    background: rgba(251, 146, 60, 0.12);
    color: #fb923c;
  }

  .nav-phone-mobile {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    margin-top: 1.5rem;
    padding: 1rem;
    border-radius: 999px;
    background: #e8731f;
    color: #ffffff !important;
    font-weight: 600;
    text-align: center;
  }

  .nav-phone-mobile:hover {
    background: #c95c10 !important;
  }

  .nav-phone-mobile svg {
    width: 18px;
    height: 18px;
  }
}

@media (max-width: 640px) {
  .header-inner {
    width: calc(100% - 2.5rem);
    height: 76px;
  }

  .brand img {
    height: 50px;
  }

  .site-header.scrolled .header-inner {
    height: 66px;
  }

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