/* ===== NAV ===== */

header{
  position:fixed;
  top:0;
  left:0;
  right:0;
  z-index:100;

  /* SAME SIZE BEFORE AND AFTER SCROLL */
  padding:10px 0;

  background:#0A1628;

  transition: background-color 0.5s ease, border-color 0.5s ease;

  border-bottom:1px solid transparent;
}


/* NAVBAR AFTER SCROLL */

header.scrolled{
  position:fixed;
  top:0;
  left:0;
  right:0;
  z-index:100;

  /* DO NOT CHANGE PADDING HERE */
  padding:10px 0;

  background:#ffffff;

  backdrop-filter:none;

  border-bottom:1px solid #e5e5e5;
}


/* NAV */

nav{
  display:flex;
  align-items:center;
  justify-content:space-between;
}


/* ===== LOGO ===== */

.logo{
  position:relative;

  display:block;

  width:200px;
  height:80px;

  flex-shrink:0;
}


/* Both logos occupy EXACTLY the same position */

.logo img{
  position:absolute !important;
  top:0;
  left:0;

  width:150px;
  height:90px;

  object-fit:contain;

  display:block;

  transition: opacity 0.5s ease;
}


/* Normal logo */

.logo-default{
  opacity:1;
  visibility:visible;
}


/* Scrolled logo */

.logo-scrolled{
  position:absolute !important;
  top:0 !important;
  left:0 !important;

  display:block !important;

  opacity:0;
  visibility:hidden;
}


/* When scrolled: hide white logo */

#siteHeader.scrolled .logo-default{
  opacity:0;
  visibility:hidden;
}


/* When scrolled: show dark logo */

#siteHeader.scrolled .logo-scrolled{
  opacity:1;
  visibility:visible;
}


/* ===== OLD LOGO TEXT SUPPORT ===== */

.logo .mark{
  width:11px;
  height:11px;
  border:1.4px solid var(--gold);
  transform:rotate(45deg);
}

.logo b{
  font-weight:500;
}

.logo span{
  color:var(--gold-bright);
  font-family:var(--mono);
  font-size:10px;
  letter-spacing:0.14em;
  text-transform:uppercase;
  margin-left:2px;
  border-left:1px solid var(--hairline-dark);
  padding-left:10px;
  font-weight:400;
}


/* ===== NAV LINKS ===== */

.nav-links{
  display:flex;
  gap:38px;
  list-style:none;

  margin:0;
  padding:0;
}

#services,
#process,
#industries,
#portfolio,
#insights,
#contact{
    scroll-margin-top: 130px;
}


.nav-links a{
  color:rgba(246,244,239,0.78);

  font-size:18px;
  font-weight:500;

  position:relative;
  padding-bottom:4px;

  transition: color 0.5s ease;
}


.nav-links a::after{
  content:"";

  position:absolute;
  bottom:0;
  left:0;

  width:0;
  height:1px;

  background:var(--gold);

  transition:width .35s var(--ease);
}


.nav-links a:hover{
  color:#fff;
}


.nav-links a:hover::after{
  width:100%;
}


/* ===== SCROLLED NAV TEXT ===== */

#siteHeader.scrolled .nav-links a{
  color:#000000;
}

#siteHeader.scrolled .burger span{
  background:#000;
}

#siteHeader.scrolled .nav-links a:hover{
  color:#000000;
}


/* ===== CTA ===== */

.nav-cta{
  font-size:18px;
  font-weight:600;

  color:var(--navy);
  background:var(--gold-bright);

  padding:11px 22px;

  border-radius:2px;

  letter-spacing:0.01em;

  transition:
    background .3s var(--ease),
    transform .3s var(--ease);
}


.nav-cta:hover{
  background:#fff;
  transform:translateY(-1px);
}


/* ===== MOBILE BURGER ===== */

.burger{
  display:none;

  width:22px;
  height:16px;

  position:relative;
  cursor:pointer;
  z-index:110;
}


.burger span{
  position:absolute;

  left:0;
  right:0;

  height:1px;

  background:#fff;

  transition:.3s;
}


.burger span:nth-child(1){
  top:0;
}

.burger span:nth-child(2){
  top:7px;
}

.burger span:nth-child(3){
  top:14px;
}


/* Burger turns into an X when menu is open */

#siteHeader.nav-open .burger span{
  background:#000;
}

#siteHeader.nav-open .burger span:nth-child(1){
  top:7px;
  transform:rotate(45deg);
}

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

#siteHeader.nav-open .burger span:nth-child(3){
  top:7px;
  transform:rotate(-45deg);
}


/* ===== MOBILE ===== */

@media(max-width:900px){

  .nav-links{
    display:flex;
    flex-direction:column;
    align-items:flex-start;
    gap:0;

    position:fixed;
    top:0;
    right:0;

    width:78%;
    max-width:320px;
    height:100vh;

    background:#ffffff;

    padding:100px 30px 30px;

    box-shadow:-8px 0 30px rgba(0,0,0,0.15);

    transform:translateX(100%);
    transition:transform .35s var(--ease);

    z-index:105;
  }

  #siteHeader.nav-open .nav-links{
    transform:translateX(0);
  }

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

  .nav-links a{
    display:block;
    width:100%;
    padding:16px 0;

    color:#111111 !important;
    font-size:17px;
  }

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

  .nav-cta{
    display:none;
  }

  #siteHeader.nav-open .nav-cta{
    display:block;
    text-align:center;

    position:fixed;
    bottom:30px;
    right:30px;

    width:calc(78% - 60px);
    max-width:260px;

    z-index:106;
  }

  .burger{
    display:block;
  }

  .nav-overlay{
    position:fixed;
    inset:0;

    background:rgba(0,0,0,0.4);

    opacity:0;
    visibility:hidden;

    transition:opacity .35s ease;

    z-index:104;
  }

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

}
