/* ---------- HEADER / NAV ---------- */

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  background: rgba(34, 148, 181, .96);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: background .3s ease, box-shadow .3s ease;
}

.site-header::after {
  content: "";
  position: absolute;
  left: 24px;
  right: 24px;
  bottom: 4px;
  height: 1px;
  background: #A6FF4D;
  opacity: .9;
}

.site-header.scrolled {
  background: rgba(34, 148, 181, .985);
  box-shadow: 0 12px 34px rgba(0, 0, 0, .10);
}

.nav-wrap {
  width: var(--container);
  height: 96px;
  margin-inline: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  transition: height .3s ease;
}

.site-header.scrolled .nav-wrap {
  height: 76px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 22px;
  position: relative;
  z-index: 2;
  text-decoration: none;
  flex-shrink: 0;
}

.brand-logo {
  width: 170px;
  height: auto;
  transition: width .3s ease;
}

.site-header.scrolled .brand-logo {
  width: 154px;
}

.brand-tagline {
  font-size: .72rem;
  letter-spacing: .22em;
  text-transform: uppercase;
  opacity: .9;
  white-space: nowrap;
  color: rgba(255,255,255,.82);
}

.main-nav {
  display: flex;
  align-items: center;
  justify-content: flex-end;
}

.main-nav-list {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 26px;
  margin: 0;
  padding: 0;
}

.main-nav-list li {
  margin: 0;
  padding: 0;
}

.nav-link {
  position: relative;
  display: inline-flex;
  align-items: center;
  color: #fff;
  font-size: .78rem;
  font-weight: 600;
  letter-spacing: .11em;
  text-transform: uppercase;
  padding: 10px 0;
  text-decoration: none;
  white-space: nowrap;
}

.nav-link::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 3px;
  width: 0;
  height: 2px;
  background: #A6FF4D;
  transform: translateX(-50%);
  transition: width .25s ease;
}

.nav-link:hover::after,
.nav-link.is-active::after {
  width: 100%;
}

.nav-link.is-active {
  color: #A6FF4D;
}

.nav-contact {
  padding: 10px 16px;
  border: 1px solid rgba(166, 255, 77, .75);
  border-radius: 999px;
}

.nav-contact::after {
  display: none;
}

.nav-contact:hover,
.nav-contact.is-active {
  background: #A6FF4D;
  color: #1d5f70;
}

/* botón mobile */
.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 0;
  background: transparent;
  padding: 0;
  cursor: pointer;
  position: relative;
  z-index: 3;
}

.nav-toggle span {
  display: block;
  width: 26px;
  height: 2px;
  margin: 6px auto;
  background: #fff;
  transition: transform .25s ease, opacity .25s ease;
}

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

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

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

/* deja espacio arriba porque el header es fixed */
body {
  padding-top: 96px;
}

/* ---------- MOBILE ---------- */

@media (max-width: 920px) {
  .brand-tagline {
    display: none;
  }

  .main-nav-list {
    gap: 20px;
  }

  .nav-link {
    font-size: .74rem;
    letter-spacing: .08em;
  }
}

@media (max-width: 820px) {
  body {
    padding-top: 82px;
  }

  .nav-wrap {
    height: 82px;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
  }

  .site-header.scrolled .nav-wrap {
    height: 74px;
  }

  .brand {
    flex-direction: column;
    align-items: flex-start;
    gap: 7px;
    max-width: calc(100% - 56px);
  }

  .brand-logo {
    width: 145px;
    display: block;
  }

  .site-header.scrolled .brand-logo {
    width: 138px;
  }

  .brand-tagline {
    display: block;
    font-size: 0.58rem;
    letter-spacing: 0.14em;
    color: rgba(255,255,255,0.68);
    white-space: nowrap;
    line-height: 1.1;
  }

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

  .main-nav {
    position: fixed;
    top: 82px;
    left: 0;
    width: 100%;
    background: rgba(34, 148, 181, .98);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    padding: 18px 24px 24px;
    border-top: 1px solid rgba(255,255,255,.18);
    box-shadow: 0 18px 40px rgba(0,0,0,.12);

    opacity: 0;
    pointer-events: none;
    transform: translateY(-10px);
    transition: opacity .25s ease, transform .25s ease;
  }

  .site-header.scrolled .main-nav {
    top: 74px;
  }

  .main-nav.is-open {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
  }

  .main-nav-list {
    display: grid;
    gap: 0;
    width: 100%;
  }

  .nav-link {
    display: flex;
    width: 100%;
    padding: 16px 0;
    border-bottom: 1px solid rgba(255,255,255,.16);
  }

  .nav-link::after {
    display: none;
  }

  .nav-link.is-active {
    color: #A6FF4D;
  }

  .nav-contact {
    justify-content: center;
    margin-top: 16px;
    padding: 13px 18px;
    border-bottom: 1px solid rgba(166, 255, 77, .75);
  }
}