/* ============================================
   APEX AUTOMATIONS — Navigation Styles
   ============================================ */

/* ============================================
   Top Bar (fixed, all pages)
   ============================================ */
.nav-top {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 24px 32px;
  /* Fade to transparent so page content shows through */
  background: linear-gradient(to bottom, rgba(0, 0, 0, 0.4) 0%, transparent 100%);
}

/* ============================================
   Logo
   ============================================ */
.nav-logo {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 22px;
  letter-spacing: 5px;
  color: var(--color-gold);
  text-decoration: none;
  transition: color 0.3s ease, text-shadow 0.3s ease;
  z-index: 1001; /* Stays above overlay */
  position: relative;
}

.nav-logo:hover {
  color: var(--color-gold-light);
  text-shadow:
    0 0 16px var(--color-gold-glow),
    0 0 32px var(--color-gold-glow);
}

/* ============================================
   Hamburger Button
   ============================================ */
.nav-hamburger {
  position: fixed;
  top: 22px;
  right: 32px;
  z-index: 1001; /* Above overlay */
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 6px;
  width: 44px;
  height: 44px;
  padding: 8px;
  cursor: pointer;
  background: none;
  border: none;
}

.hamburger-line {
  display: block;
  width: 28px;
  height: 2px;
  background-color: var(--color-gold);
  border-radius: 1px;
  transform-origin: center;
  transition: transform 0.3s ease, opacity 0.3s ease, background-color 0.3s ease;
}

/* ---- Hamburger → X (when menu is open) ---- */
/*
  With gap: 6px and height: 2px, center-to-center distance = 8px.
  Line 1 shifts down 8px, line 3 shifts up 8px, both rotate to form X.
  Middle line fades out.
*/
.nav-hamburger.is-open .hamburger-line:nth-child(1) {
  transform: translateY(8px) rotate(45deg);
  background-color: #ffffff;
}

.nav-hamburger.is-open .hamburger-line:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);
}

.nav-hamburger.is-open .hamburger-line:nth-child(3) {
  transform: translateY(-8px) rotate(-45deg);
  background-color: #ffffff;
}

/* ============================================
   Full-Screen Overlay
   ============================================ */
.nav-overlay {
  position: fixed;
  inset: 0;
  z-index: 999;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: rgba(10, 10, 10, 0.97);

  /*
    Clip-path circle: starts as 0% radius at hamburger center
    (hamburger: right: 32px, top: 22px, size: 44x44 → center: calc(100% - 54px) / 44px)
  */
  clip-path: circle(0% at calc(100% - 54px) 44px);
  transition: clip-path 0.5s ease-out;
  pointer-events: none;
}

.nav-overlay.is-open {
  clip-path: circle(150% at calc(100% - 54px) 44px);
  pointer-events: all;
}

/* CSS-only noise/grain texture — no images */
.nav-overlay::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='4' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='300' height='300' filter='url(%23n)' opacity='0.07'/%3E%3C/svg%3E");
  background-repeat: repeat;
  pointer-events: none;
  opacity: 0.5;
  z-index: 0;
}

/* ============================================
   Overlay Inner Content
   ============================================ */
.nav-overlay-inner {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 48px;
  width: 100%;
  padding: 40px 24px;
}

/* ============================================
   Nav Links
   ============================================ */
.nav-links {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

/* Each li starts hidden — stagger in when overlay opens */
.nav-links li {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.4s ease, transform 0.4s ease;
}

.nav-overlay.is-open .nav-links li {
  opacity: 1;
  transform: translateY(0);
}

.nav-overlay.is-open .nav-links li:nth-child(1) { transition-delay: 0.25s; }
.nav-overlay.is-open .nav-links li:nth-child(2) { transition-delay: 0.35s; }
.nav-overlay.is-open .nav-links li:nth-child(3) { transition-delay: 0.45s; }

/* Individual link */
.nav-link {
  font-family: var(--font-display);
  font-size: 56px;
  font-weight: 700;
  color: var(--color-text);
  letter-spacing: 4px;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 16px;
  transition: color 0.3s ease, transform 0.3s ease;
}

.nav-link:hover {
  color: var(--color-gold);
  transform: translateX(10px);
}

/* Current page — gold dot before the link text */
.nav-link.is-current::before {
  content: '';
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: var(--color-gold);
  flex-shrink: 0;
}

/* ============================================
   Social Links Row
   ============================================ */
.nav-social {
  display: flex;
  align-items: center;
  gap: 32px;
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.4s ease 0.55s, transform 0.4s ease 0.55s;
}

.nav-overlay.is-open .nav-social {
  opacity: 1;
  transform: translateY(0);
}

.social-link {
  font-family: var(--font-body);
  font-size: 14px;
  color: var(--color-text-gray);
  letter-spacing: 1px;
  text-transform: uppercase;
  transition: color 0.3s ease;
}

.social-link:hover {
  color: var(--color-gold);
}

/* ============================================
   Email
   ============================================ */
.nav-email {
  font-family: var(--font-body);
  font-size: 13px;
  color: var(--color-text-dark);
  letter-spacing: 0.5px;
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.4s ease 0.65s, transform 0.4s ease 0.65s;
}

.nav-overlay.is-open .nav-email {
  opacity: 1;
  transform: translateY(0);
}

/* ============================================
   Responsive
   ============================================ */
@media (max-width: 768px) {
  .nav-top {
    padding: 20px 20px;
  }

  .nav-hamburger {
    top: 16px;
    right: 20px;
  }

  .nav-link {
    font-size: 36px;
    letter-spacing: 3px;
  }

  .nav-overlay-inner {
    gap: 36px;
  }

  .nav-links {
    gap: 4px;
  }
}

@media (max-width: 480px) {
  .nav-link {
    font-size: 32px;
    letter-spacing: 2px;
  }

  .nav-social {
    gap: 20px;
  }
}
