


/* ---------- 1) TOP BAR ---------- */

.navBar {
  display: flex;
  justify-content: space-between;
  padding: 2vw 5vh;
  position: relative;
}

.navBar a {
  font-family: 'font1regular';
  color: black;
  font-size: 0.9rem;
  text-decoration: none;
  z-index: 9999;
}

.navBarLeft {
  display: flex;
  gap: 0.9rem;
  align-items: center;
}

.navBarRight {
  display: flex;
  align-items: center;
}


/* Mobile-only pieces: hidden on desktop, shown in the ≤700px block at the bottom */
.navLogo,
.navCta,
.navBurger {
  display: none;
}


/* ---------- MENU / CLOSE BUTTON ---------- */

.navBtn {
  position: relative;
  z-index: 99999999;              /* stays above the side menu */

  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;

  width: 6vw;
  margin-left: 1vw;

  cursor: pointer;
  user-select: none;
}

.navBtn:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 5px;
}

/* text wrapper (MENU / CLOSE stacked, one visible at a time) */

.navBtnAbs {
  position: relative;

  display: flex;
  align-items: center;
  justify-content: center;

  width: 4vw;
  min-width: 50px;
  height: 20px;

  overflow: hidden;
}

.navBtnAbs p {
  position: absolute;
  top: 0;
  left: 0;

  margin: 0;

  font-family: 'poppins';
  font-size: 12px;
  font-weight: 500;
  line-height: 20px;

  white-space: nowrap;
  transition: none;
}

.navOn {
  opacity: 1;
}

.navClose {
  opacity: 0;
}

/* dot icon */

.navBtnIcon {
  display: flex;
  align-items: center;
  justify-content: flex-end;

  width: 25px;
  height: 25px;

  color: #f0ece2;
  transition: color 0.35s ease;
}

.navBtnIcon i {
  display: block;

  font-size: 11px;
  color: #FF0000;

  transition:
    transform 0.5s cubic-bezier(.77, 0, .18, 1),
    color 0.35s ease;
}

.navBtn.is-open .navBtnIcon {
  color: #ff3b1f;
}

.navBtn.is-open .navBtnIcon i {
  transform: rotate(180deg);
}


/* ---------- 2) SIDE MENU ---------- */

/* full-screen backdrop (also the click-outside target) */

.navDiv {
  position: fixed;
  inset: 0;
  z-index: 9999999;

  width: 100%;
  height: 100dvh;

  display: flex;
  justify-content: flex-end;
  align-items: center;

  background: rgba(5, 5, 5, 0.82);
  overflow: hidden;

  visibility: hidden;
  pointer-events: none;
}

/* the red panel */

.nav {
  position: relative;

  width: 40%;
  height: calc(100% - 2vh);
  margin-right: 1vw;
  padding-left: 3vw;

  display: flex;
  flex-direction: column;
  justify-content: center;

  background: #ff3b1f;
  border-radius: 20px;
}

/* main links */

.navLinks {
  display: flex;
  flex-direction: column;
  gap: 0.15em;
}

.navLinks a {
  position: relative;

  width: fit-content;

  font-family: 'font1medium';
  font-size: 4rem;
  line-height: 1.12;
  text-decoration: none;
  color: #f0ece2;

  transition: color 0.3s ease;
}

.navLinks a::after {
  content: "";

  position: absolute;
  left: 0;
  bottom: -3px;

  width: 0;
  height: 2px;

  background: #f0ece2;
  transition: width 0.35s ease;
}

.navLinks a:hover::after,
.navLinks a:focus-visible::after {
  width: 100%;
}

/* contact + socials */

.contactNav {
  position: absolute;
  left: 3vw;
  bottom: 5vh;

  display: flex;
  align-items: flex-end;
}

.linksNavMenu p {
  margin: 0 0 1.5vh 0;

  font-family: 'poppins';
  font-size: 1rem;
  color: #f0ece2;
}

.socialNav {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.linksNavMenu a {
  display: flex;
  align-items: center;
  justify-content: center;

  width: 42px;
  height: 42px;

  text-decoration: none;
  color: #f0ece2;

  border: 1px solid rgba(240, 236, 226, 0.35);
  border-radius: 50%;

  transition:
    background 0.3s ease,
    color 0.3s ease,
    border-color 0.3s ease;
}

.linksNavMenu a:hover {
  background: #f0ece2;
  color: #ff3b1f;
  border-color: #f0ece2;
}

.linksNavMenu .icons {
  font-size: 1rem;
}


/* ---------- TABLET + PHONE ---------- */

@media (max-width: 1024px) {

  .nav {
    width: min(560px, calc(100% - 20px));
    height: calc(100% - 20px);
    margin-right: 10px;
    padding-left: clamp(32px, 7vw, 56px);
    border-radius: 18px;
  }

  .navLinks a {
    font-size: clamp(3rem, 9vw, 4.6rem);
  }

  .contactNav {
    left: clamp(32px, 7vw, 56px);
    bottom: 5vh;
  }

}


/* ==========================================================
   COMPACT TOP BAR  (phones + tablets, ≤1024px)
   [ ✱ Quenatic ]                [ Get quote ↗ ] ( ☰ )

   - Fixed, so the menu is always one tap away
   - Turns into a frosted bar once the page has scrolled
     (.is-scrolled is toggled in js/nav.js)
   - Stays ABOVE the side menu (z-index) so the ✕ is
     tappable; while the menu is open (body.nav-open) the
     bar goes transparent and the logo turns cream.
   ========================================================== */

@media (max-width: 1024px) {

  .navBar {

    top: 0;
    left: 0;
    right: 0;
    z-index: 99999999;

    height: calc(72px + env(safe-area-inset-top, 0px));
    padding: env(safe-area-inset-top, 0px) max(6.4vw, 22px) 0;

    align-items: center;

    transition:
      background-color 0.35s ease,
      box-shadow 0.35s ease;
  }

  .navBar.is-scrolled {
    background: rgba(240, 236, 226, 0.86);
    -webkit-backdrop-filter: blur(14px) saturate(1.2);
    backdrop-filter: blur(14px) saturate(1.2);
    box-shadow: 0 1px 0 rgba(13, 13, 13, 0.08);
  }

  body.nav-open .navBar,
  body.nav-open .navBar.is-scrolled {
    background: transparent;
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
    box-shadow: none;
  }

  /* desktop-only bits */
  .navBarLeft,
  .navBar .navMail {
    display: none;
  }

  /* --- logo --- */

  .navBar .navLogo {
    display: inline-flex;
    align-items: center;
    gap: 8px;

    font-family: 'font1bold';
    font-size: 1.4rem;
    letter-spacing: -0.03em;
    line-height: 1;
    color: #0d0d0d;

    transition: color 0.35s ease;
  }

  .navLogo img {
    display: block;
    width: 28px;
    height: 28px;
  }

  .navLogo img {
    transition: filter 0.35s ease;
  }

  body.nav-open .navBar .navLogo {
    color: #f0ece2;
  }

  body.nav-open .navLogo img {
    filter: brightness(0) invert(0.93) sepia(0.1);
  }

  /* --- right side: CTA pill + burger --- */

  .navBarRight {
    gap: 8px;
  }

  .navBar .navCta {
    display: inline-flex;
    align-items: center;
    gap: 8px;

    height: 44px;
    padding: 0 18px 0 20px;

    border-radius: 999px;
    background: #ff3b1f;
    color: #f0ece2;

    font-family: 'font1medium';
    font-size: 0.92rem;
    letter-spacing: 0.005em;
    white-space: nowrap;

    transition:
      opacity 0.3s ease,
      transform 0.3s ease;
  }

  .navBar .navCta:active {
    transform: scale(0.96);
  }

  body.nav-open .navBar .navCta {
    opacity: 0;
    pointer-events: none;
    transform: translateX(10px);
  }

  /* --- burger: round button, two lines that morph into ✕ --- */

  .navBtn {
    width: 44px;
    height: 44px;
    margin: 0;
    gap: 0;

    border-radius: 50%;
    background: #e2ddcf;

    -webkit-tap-highlight-color: transparent;
    transition: background-color 0.35s ease;
  }

  .navBtn.is-open {
    background: #f0ece2;
  }

  .navBtn:active {
    transform: scale(0.94);
  }

  .navBtnAbs,
  .navBtnIcon {
    display: none;
  }

  .navBurger {
    position: relative;
    display: block;
    width: 18px;
    height: 10px;
  }

  .navBurger i {
    position: absolute;
    left: 0;

    width: 100%;
    height: 1.5px;

    background: #0d0d0d;
    border-radius: 2px;

    transition:
      top 0.4s cubic-bezier(.77, 0, .18, 1),
      transform 0.4s cubic-bezier(.77, 0, .18, 1);
  }

  .navBurger i:nth-child(1) { top: 0; }
  .navBurger i:nth-child(2) { top: 8.5px; }

  .navBtn.is-open .navBurger i:nth-child(1) {
    top: 4.25px;
    transform: rotate(45deg);
  }

  .navBtn.is-open .navBurger i:nth-child(2) {
    top: 4.25px;
    transform: rotate(-45deg);
  }

  /* never let logo / CTA / burger touch each other */
  .navBar {
    gap: 10px;
  }

  .navBar .navLogo,
  .navBtn {
    flex-shrink: 0;
  }

  .contactNav {
    bottom: calc(5vh + env(safe-area-inset-bottom, 0px));
  }

}


/* tablet: roomier bar */
@media (min-width: 701px) and (max-width: 1024px) {

  .navBar {
    height: calc(88px + env(safe-area-inset-top, 0px));
    padding: env(safe-area-inset-top, 0px) max(5vw, 32px) 0;
  }

  .navBar .navLogo {
    gap: 10px;
    font-size: 1.65rem;
  }

  .navLogo img {
    width: 34px;
    height: 34px;
  }

  .navBarRight {
    gap: 12px;
  }

  .navBar .navCta {
    height: 50px;
    padding: 0 24px 0 26px;
    font-size: 1rem;
  }

  .navBtn {
    width: 50px;
    height: 50px;
  }

  .navBurger {
    width: 20px;
  }

}


/* phone: the menu is a full-screen panel */
@media (max-width: 700px) {

  .nav {
    width: 100%;
    height: 100%;
    margin: 0;
    padding-left: max(6.4vw, 22px);
    border-radius: 0;
  }

  .navLinks a {
    font-size: clamp(3rem, 12vw, 5rem);
  }

  .contactNav {
    left: max(6.4vw, 22px);
  }

}


/* small phones (≤ 400px): logo + CTA + burger must fit one row with breathing room */
@media (max-width: 400px) {

  .navBar {
    padding-left: 18px;
    padding-right: 18px;
  }

  .navBar .navLogo {
    gap: 6px;
    font-size: 1.25rem;
  }

  .navLogo img {
    width: 25px;
    height: 25px;
  }

  .navBarRight {
    gap: 6px;
  }

  .navBar .navCta {
    height: 42px;
    padding: 0 14px 0 16px;
    gap: 6px;
    font-size: 0.88rem;
  }

  .navBtn {
    width: 42px;
    height: 42px;
  }

}


/* narrow phones (≤ 360px): keep logo + CTA + burger on one row */
@media (max-width: 360px) {

  .navBar .navLogo {
    gap: 6px;
    font-size: 1.2rem;
  }

  .navLogo img {
    width: 24px;
    height: 24px;
  }

  .navBarRight {
    gap: 6px;
  }

  .navBar .navCta {
    height: 40px;
    padding: 0 15px;
    font-size: 0.86rem;
  }

  .navBtn {
    width: 40px;
    height: 40px;
  }

}

@media (max-width: 340px) {

  .navCta .btnArrow {
    display: none;
  }

}
