/* ─────────────────────────────────────────────
   SELVARO CREATIVE — NAVIGATION
───────────────────────────────────────────── */

/*
Requires these variables to already exist
in the page's main :root:

--black
--white
--orange
*/


/* ── MAIN NAV ── */

nav {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 100;

  width: calc(100% - 48px);
  max-width: 1200px;

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

  padding: 14px 20px;

  border-radius: 16px;

  background: rgba(255, 255, 255, 0.1);

  backdrop-filter: blur(40px) saturate(200%);
  -webkit-backdrop-filter: blur(40px) saturate(200%);

  box-shadow:
    0 8px 32px rgba(0, 0, 0, 0.15),
    inset 0 0 0 1px rgba(255, 255, 255, 0.2);

  transition:
    background 0.6s cubic-bezier(0.16, 1, 0.3, 1),
    box-shadow 0.6s cubic-bezier(0.16, 1, 0.3, 1),
    transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

nav.nav-hidden {
  transform: translateX(-50%) translateY(-140%);
}

nav.scrolled {
  background: rgba(255, 255, 255, 0.92);

  box-shadow:
    0 8px 32px rgba(0, 0, 0, 0.1),
    inset 0 0 0 1px rgba(0, 0, 0, 0.06);
}

nav.scrolled .nav-logo {
  color: var(--black);
}

nav.scrolled .hamburger-lines span {
  background: var(--black);
}

nav.scrolled .hamburger-label {
  color: var(--black);
}


/* ── NAV GLARE ── */

.nav-glare-container {
  position: absolute;
  inset: 0;

  border-radius: 16px;
  overflow: hidden;

  pointer-events: none;

  z-index: 5;
}

.nav-glare {
  position: absolute;
  inset: 0;

  opacity: 0;

  background:
    radial-gradient(
      circle 90px at var(--x, 50%) var(--y, 50%),
      rgba(255, 255, 255, 0.4) 0%,
      transparent 100%
    );

  mix-blend-mode: overlay;

  transition: opacity 0.3s ease;
}

nav:hover .nav-glare {
  opacity: 1;
}


/* ── NAV OVER LIGHT SECTIONS ── */

body.nav-on-light .nav-logo {
  color: var(--black);
}

body.nav-on-light .hamburger-lines span {
  background: var(--black);
}

body.nav-on-light .hamburger-label {
  color: var(--black);
}

body.nav-on-light nav:not(.scrolled) {
  background: rgba(255, 255, 255, 0.92);

  box-shadow:
    0 8px 32px rgba(0, 0, 0, 0.1),
    inset 0 0 0 1px rgba(0, 0, 0, 0.06);
}


/* ── NAV LOGO ── */

.nav-logo {
  position: relative;

  z-index: 3;

  display: flex;
  flex-direction: column;

  font-family: 'Glasio', 'Helvetica Neue', Helvetica, Arial, sans-serif;

  font-weight: 400;
  line-height: 1.15;

  letter-spacing: 0.08em;
  text-transform: uppercase;

  color: var(--white);

  text-decoration: none;

  transition: color 0.3s ease;
}

.nav-logo-top,
.nav-logo-bottom {
  font-size: 0.82rem;
}


/* ── HAMBURGER ── */

.hamburger {
  position: relative;

  z-index: 3;

  display: flex;
  flex-direction: row;
  align-items: center;

  gap: 10px;

  padding: 8px 0;

  background: none;
  border: none;

  cursor: pointer;
}

.hamburger-lines {
  display: flex;
  flex-direction: column;

  gap: 5px;
}

.hamburger-lines span {
  display: block;

  width: 18px;
  height: 2px;

  background: var(--white);

  border-radius: 2px;

  transform-origin: center;

  transition:
    transform 0.3s cubic-bezier(0.16, 1, 0.3, 1),
    opacity 0.3s ease;
}

.hamburger-label {
  font-family: 'Manrope', 'Helvetica Neue', Helvetica, Arial, sans-serif;

  font-size: 0.85rem;
  font-weight: 600;

  letter-spacing: 0.1em;
  text-transform: uppercase;

  color: var(--white);

  transition:
    opacity 0.2s ease,
    color 0.3s ease;
}

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

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

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

.hamburger.open .hamburger-label {
  opacity: 0;
}


/* ─────────────────────────────────────────────
   DRAWER OVERLAY
───────────────────────────────────────────── */

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

  z-index: 200;

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

  opacity: 0;

  pointer-events: none;

  transition: opacity 0.4s ease;
}

.drawer-overlay.active {
  opacity: 1;

  pointer-events: all;
}


/* ─────────────────────────────────────────────
   NAV DRAWER
───────────────────────────────────────────── */

.nav-drawer {
  position: fixed;

  top: 0;
  right: 0;

  z-index: 201;

  width: 90%;
  height: 100vh;
  height: 100dvh;

  display: flex;
  flex-direction: column;

  padding: 100px 56px 48px;

  background: #161513;

  transform: translateX(100%);

  transition:
    transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.nav-drawer.active {
  transform: translateX(0);
}


/* ── DRAWER CLOSE ── */

.nav-drawer-close {
  position: absolute;

  top: 28px;
  right: 32px;

  display: flex;
  align-items: center;

  gap: 8px;

  font-family: 'Manrope', 'Helvetica Neue', Helvetica, Arial, sans-serif;

  font-size: 0.95rem;
  font-weight: 600;

  letter-spacing: 0.1em;
  text-transform: uppercase;

  color: rgba(255, 255, 255, 0.5);

  cursor: pointer;

  transition: color 0.2s ease;
}

.nav-drawer-close:hover {
  color: var(--white);
}


/* ─────────────────────────────────────────────
   DRAWER LINKS
───────────────────────────────────────────── */

.nav-drawer-links {
  flex: 1;

  display: flex;
  flex-direction: column;

  gap: 4px;

  list-style: none;
}

.nav-drawer-links li {
  position: relative;

  overflow: hidden;

  isolation: isolate;
}

.nav-drawer-links li a {
  position: relative;

  z-index: 2;

  display: flex;
  align-items: center;

  gap: 20px;

  padding: 18px 0;

  border-bottom:
    0.5px solid rgba(255, 255, 255, 0.06);

  font-family: 'Manrope', 'Helvetica Neue', Helvetica, Arial, sans-serif;

  font-size: 4rem;
  font-weight: 700;

  line-height: 1;

  letter-spacing: -0.02em;

  color: rgba(255, 255, 255, 0.9);

  text-decoration: none;

  transition:
    color 0.18s ease;

  will-change: color;
}

/*
The orange marquee has its own black text,
so hide the normal white link text while
the hover animation is visible.
*/
.nav-drawer-links li:hover > a {
  color: transparent;
}

/* Keyboard accessibility */
.nav-drawer-links li:focus-within > a {
  color: transparent;
}


/* ── DRAWER ARROW ── */

.drawer-arrow {
  display: inline-flex;

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

  width: 0.42em;
  height: 0.42em;

  flex-shrink: 0;

  transform: translateY(-2px);

  color: currentColor;
}

.drawer-arrow svg {
  display: block;

  width: 100%;
  height: 100%;
}


/* ── DRAWER NUMBERS ── */

.drawer-num {
  position: absolute;

  top: 26px;
  right: 4px;

  z-index: 3;

  font-family: 'Manrope', 'Helvetica Neue', Helvetica, Arial, sans-serif;

  font-size: 0.85rem;
  font-weight: 500;

  color: rgba(255, 255, 255, 0.3);

  pointer-events: none;

  transition: opacity 0.18s ease;
}

.nav-drawer-links li:hover .drawer-num {
  opacity: 0;
}


/* ─────────────────────────────────────────────
   DRAWER MARQUEE
───────────────────────────────────────────── */

.drawer-marquee {
  position: absolute;

  inset: 0;

  z-index: 1;

  display: flex;
  align-items: center;

  overflow: hidden;

  background: var(--orange);

  transform: translate3d(0, 101%, 0);

  pointer-events: none;

  will-change: transform;

  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}

.drawer-marquee-inner {
  display: flex;
  align-items: center;

  width: max-content;
  min-width: 100%;
  height: 100%;

  will-change: transform;

  pointer-events: none;
}

.drawer-marquee-part {
  display: flex;
  align-items: center;

  flex-shrink: 0;

  padding: 0 24px;
}

.drawer-marquee-part span {
  font-family: 'Manrope', 'Helvetica Neue', Helvetica, Arial, sans-serif;

  font-size: 4rem;
  font-weight: 700;

  line-height: 1;

  letter-spacing: -0.02em;

  color: var(--black);

  white-space: nowrap;
}

.drawer-marquee-dot {
  width: 8px;
  height: 8px;

  margin: 0 16px;

  border-radius: 50%;

  background: var(--black);

  flex-shrink: 0;
}


/* ─────────────────────────────────────────────
   DRAWER BOTTOM BRAND
───────────────────────────────────────────── */

.nav-drawer-logo-bottom {
  margin-top: 40px;
  margin-bottom: 24px;

  font-family: 'Glasio', 'Helvetica Neue', Helvetica, Arial, sans-serif;

  font-size: 1.3rem;
  font-weight: 400;

  letter-spacing: 0.08em;
  text-transform: uppercase;

  color: rgba(255, 255, 255, 0.9);
}


/* ─────────────────────────────────────────────
   DRAWER SOCIALS
───────────────────────────────────────────── */

.drawer-socials {
  display: flex;
  align-items: center;

  width: 100%;

  gap: 16px;

  margin-bottom: 32px;
}


/* SOCIAL ICON */

.dock-item {
  position: relative;

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

  width: 34px;
  height: 34px;

  flex: 0 0 34px;

  border:
    1px solid rgba(255, 255, 255, 0.15);

  border-radius: 10px;

  background: rgba(255, 255, 255, 0.08);

  color: var(--white);

  text-decoration: none;

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

.dock-item:hover {
  background: var(--orange);
  border-color: var(--orange);

  color: var(--white);
}

.dock-item svg {
  display: block;

  width: 18px;
  height: 18px;

  stroke: currentColor;
}


/* SOCIAL TOOLTIP */

.dock-label {
  position: absolute;

  bottom: calc(100% + 8px);
  left: 50%;

  transform: translateX(-50%);

  padding: 3px 9px;

  border:
    1px solid rgba(255, 255, 255, 0.15);

  border-radius: 6px;

  background: rgba(255, 255, 255, 0.1);

  font-family: 'Manrope', 'Helvetica Neue', Helvetica, Arial, sans-serif;

  font-size: 0.7rem;
  font-weight: 500;

  color: var(--white);

  white-space: nowrap;

  opacity: 0;

  pointer-events: none;

  transition: opacity 0.15s ease;
}

.dock-item:hover .dock-label {
  opacity: 1;
}


/* ─────────────────────────────────────────────
   CONTACT BUTTON
   IMPORTANT:
   Put this INSIDE .drawer-socials,
   after the X social link.
───────────────────────────────────────────── */

.drawer-contact-btn {
  margin-left: auto;

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

  flex-shrink: 0;

  min-height: 36px;
  padding: 8px 16px;

  background: var(--orange);
  color: var(--white);

  border: 1px solid var(--orange);
  border-radius: 8px;

  font-family: 'Manrope', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  font-size: 0.76rem;
  font-weight: 600;

  letter-spacing: 0.04em;
  text-transform: uppercase;
  text-decoration: none;
  white-space: nowrap;

  transition:
    background 0.2s ease,
    border-color 0.2s ease,
    color 0.2s ease,
    transform 0.2s ease;
}

.drawer-contact-btn:hover {
  background: var(--white);
  border-color: var(--white);
  color: var(--black);
  transform: translateY(-1px);
}


/* ─────────────────────────────────────────────
   OLD DRAWER CTA
   Keep hidden if old HTML still exists.
───────────────────────────────────────────── */

.nav-drawer-cta {
  display: none;
}


/* ─────────────────────────────────────────────
   DRAWER FOOTER
───────────────────────────────────────────── */

.nav-drawer-footer {
  margin-top: 24px;

  font-family: 'Manrope', 'Helvetica Neue', Helvetica, Arial, sans-serif;

  font-size: 0.72rem;

  letter-spacing: 0.08em;

  color: rgba(255, 255, 255, 0.2);
}


/* ─────────────────────────────────────────────
   TABLET / MOBILE
───────────────────────────────────────────── */

@media (max-width: 700px) {

  nav {
    top: 12px;

    width: calc(100% - 24px);
  }


  .hamburger-label {
    display: none;
  }


  .nav-drawer {
    width: 100%;

    padding:
      88px
      24px
      28px;

    overflow-y: auto;
  }


  .nav-drawer-close {
    top: 26px;
    right: 24px;
  }


  .nav-drawer-links li a {
    padding: 12px 0;

    font-size: clamp(2rem, 10vw, 2.6rem);
  }


  .drawer-num {
    top: 18px;

    font-size: 0.72rem;
  }


  .drawer-marquee-part span {
    font-size: 2.4rem;
  }


  .nav-drawer-logo-bottom {
    margin-top: 24px;
    margin-bottom: 16px;

    font-size: 1.05rem;
  }


  .drawer-socials {
    gap: 10px;

    margin-bottom: 20px;
  }


  .dock-item {
    width: 32px;
    height: 32px;

    flex-basis: 32px;

    border-radius: 9px;
  }


  .dock-item svg {
    width: 17px;
    height: 17px;
  }


  .drawer-contact-btn {
    min-height: 34px;

    padding: 8px 14px;

    font-size: 0.7rem;
  }
}


/* ─────────────────────────────────────────────
   SMALL MOBILE
───────────────────────────────────────────── */

@media (max-width: 400px) {

  .nav-drawer {
    padding-left: 20px;
    padding-right: 20px;
  }


  .nav-drawer-links li a {
    font-size: 2rem;
  }


  .drawer-socials {
    gap: 8px;
  }


  .dock-item {
    width: 30px;
    height: 30px;

    flex-basis: 30px;
  }


  .dock-item svg {
    width: 16px;
    height: 16px;
  }


  .drawer-contact-btn {
    padding: 8px 11px;

    font-size: 0.66rem;

    letter-spacing: 0.02em;
  }
}