/* ---------------- FONTS ---------------- */
@font-face {
  font-family: 'ITCGaramondStd-BkNarrowIta';
  src: url('../fonts/ITCGaramondStd-BkNarrowIta.ttf') format('truetype');
}

@font-face {
  font-family: 'ITCGaramondStd-BkNarrow';
  src: url('../fonts/ITCGaramondStd-BkNarrow.ttf') format('truetype');
}

@font-face {
  font-family: 'helveticanowtext-bold';
  src: url('../fonts/helveticanowtext-bold.ttf') format('truetype');
}

/* ---------------- TOP NAV ---------------- */
.top-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  width: 100%;
  padding: 2rem 4rem;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  transition: background 0.3s ease, color 0.3s ease;
  background: transparent;
  font-family: 'Inter', sans-serif;
}

/* ---------------- BRAND ---------------- */
.brand {
  position: absolute;
  left: 4rem;
  font-family: 'Amarante', cursive;
  font-size: 1.5rem;
  letter-spacing: 0.08em;
  color: inherit;
}

/* ---------------- NAV LINKS ---------------- */
.nav-links {
  display: flex;
  gap: 3rem;
  margin: 0 auto;
}

.nav-links a {
  font-family: 'Inter', sans-serif;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-decoration: none;
  color: inherit;
  position: relative;
}

.nav-links a:visited {
  color: inherit;
}

.nav-links a:hover {
  color: #888;
}

/* ---------------- MENU BUTTON ---------------- */
.menu-button {
  position: absolute;
  right: 1rem;
  top: 0.8rem;
  font-family: 'ITCGaramondStd-BkNarrowIta', serif;
  font-size: 1.7rem;
  letter-spacing: 0.005em;
  background: none;
  border: none;
  color: #000;
  cursor: pointer;
  padding: 0.5rem 1.5rem;
  transition: opacity 0.3s ease, color 0.3s ease;
  z-index: 1001;
}

.menu-button::after {
  content: '';
  position: absolute;
  bottom: 0.5rem;
  left: 1.5rem;
  right: 1.5rem;
  width: 0;
  height: 1px;
  background-color: currentColor;
  transition: width 0.3s ease;
}

.menu-button:hover::after {
  width: calc(100% - 3rem);
}

.menu-button:hover {
  opacity: 0.8;
}

/* Turn white when active */
.menu-button.active {
  color: #f5f5f5 !important;
}

/* ---------------- MENU OVERLAY ---------------- */
.menu-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  background: #632222;
  z-index: 999;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.6s ease, visibility 0.6s ease;
  display: flex;
  align-items: flex-start;
  justify-content: flex-start;
  padding-left: 4rem;
  pointer-events: none;
}

.menu-overlay.active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.menu-list {
  list-style: none;
  padding: 0;
  margin: 0;
  pointer-events: auto;
  position: absolute;
  top: 12rem;
  left: 4rem;
  display: flex;
  flex-direction: row;
  gap: 2rem;
}

.menu-list li {
  margin-bottom: 0;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.menu-overlay.active .menu-list li {
  opacity: 1;
  transform: translateY(0);
}

.menu-overlay.active .menu-list li:nth-child(1) {
  transition-delay: 0.1s;
}

.menu-overlay.active .menu-list li:nth-child(2) {
  transition-delay: 0.2s;
}

.menu-overlay.active .menu-list li:nth-child(3) {
  transition-delay: 0.3s;
}

.menu-overlay.active .menu-list li:nth-child(4) {
  transition-delay: 0.4s;
}

.menu-list a {
  font-family: 'ITCGaramondStd-BkNarrow', serif;
  font-size: 6rem;
  color: #ffffff;
  text-decoration: none;
  transition: opacity 0.3s ease, transform 0.3s ease;
  display: inline-block;
}

.menu-list a:hover {
  opacity: 0.7;
  transform: translateX(0);
}

/* Close button in overlay */
.menu-close {
  position: absolute;
  top: 2rem;
  right: 4rem;
  font-family: 'ITCGaramondStd-BkNarrowIta', serif;
  font-size: 1.2rem;
  background: none;
  border: none;
  color: #f5f5f5;
  cursor: pointer;
  padding: 0.5rem 1rem;
  transition: opacity 0.3s ease;
}

.menu-close:hover {
  opacity: 0.7;
}

/* ---------------- PAGE-SPECIFIC BACKGROUNDS ---------------- */
body.page-index .nav-links a,
body.page-index .brand,
body.page-index .menu-button {
  color: #000000;
}

body.page-contact .nav-links a,
body.page-contact .brand,
body.page-contact .menu-button {
  color: #000000;
}

body.page-about.top-nav {
  background: #f7f5f1;
}
body.page-about .nav-links a,
body.page-about .brand,
body.page-about .menu-button {
  color: #111;
}

/* ---------------- RESPONSIVE ---------------- */
@media (max-width: 1024px) {
  .top-nav {
    padding: 1.5rem 2rem;
  }

  .brand {
    left: 2rem;
  }

  .nav-links {
    gap: 1.5rem;
  }

  .menu-button {
    right: 2rem;
  }

  .menu-overlay {
    padding-left: 2rem;
  }

  .menu-close {
    right: 2rem;
  }

  .menu-list a {
    font-size: 2.5rem;
  }
}