/* ============================================================
   HELIOCASTLE — NAVIGATION
   Header bar, brand mark, links and the burger. The slide-down
   panel itself lives in responsive.css.

   There is no light/dark switch: the theme follows the operating
   system, in kit/tokens/theme-light.css.
   ============================================================ */

/* ============================================================
   NAVIGATION
   ============================================================ */

.nav {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  padding: 30px var(--pad-x);
}

.brand { display: flex; align-items: center; gap: 14px; }
.brand-mark { width: 34px; height: auto; filter: drop-shadow(0 0 10px rgb(var(--ink-rgb) / 0.25)); }
.brand-text { display: flex; flex-direction: column; line-height: 1.25; }
.brand-name {
  font-size: 17px;
  font-weight: 500;
  letter-spacing: 0.24em;
  text-transform: uppercase;
}
.brand-tag {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 8.5px;
  font-weight: 400;
  letter-spacing: 0.34em;
  text-transform: uppercase;
  color: var(--muted);
}
.brand-tag i { flex: 0 0 12px; height: 1px; background: rgb(var(--ink-rgb) / 0.35); }

.nav-links {
  display: flex;
  gap: clamp(18px, 2.6vw, 44px);
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
}
.nav-links a {
  position: relative;
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: rgb(var(--ink-rgb) / 0.78);
  padding: 6px 2px;
  transition: color 0.3s;
}
.nav-links a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 1px;
  background: var(--gold);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.4s var(--ease);
}
.nav-links a:hover { color: var(--text); }
.nav-links a:hover::after,
.nav-links a.is-active::after { transform: scaleX(1); transform-origin: left; }
.nav-links a.is-active { color: var(--gold); }

.nav-cta {
  box-shadow: 0 0 26px rgb(var(--accent-rgb) / 0.16), inset 0 0 14px rgb(var(--accent-rgb) / 0.05); padding: 13px 26px; }

/* ---------- mobile menu button ---------- */

.nav-toggle {
  display: none;
  position: relative;
  width: 46px;
  height: 46px;
  padding: 0;
  background: none;
  border: 1px solid rgb(var(--ink-rgb) / 0.14);
  cursor: pointer;
  transition: border-color 0.3s;
}
.nav-toggle span {
  position: absolute;
  left: 13px;
  width: 20px;
  height: 1.5px;
  background: var(--text);
  transition: transform 0.4s var(--ease), opacity 0.25s, top 0.4s var(--ease);
}
.nav-toggle span:nth-child(1) { top: 16px; }
.nav-toggle span:nth-child(2) { top: 22px; }
.nav-toggle span:nth-child(3) { top: 28px; }
.nav-toggle:hover { border-color: var(--gold-soft); }

/* the small gold mark that sits between the switch and the CTA */
.nav-spark {
  width: 9px;
  height: 9px;
  flex: 0 0 9px;
  background: var(--gold);
  clip-path: polygon(50% 0, 61% 39%, 100% 50%, 61% 61%, 50% 100%, 39% 61%, 0 50%, 39% 39%);
  opacity: 0.9;
  animation: spark-breathe 4.5s ease-in-out infinite;
}
@keyframes spark-breathe {
  0%, 100% { opacity: 0.55; transform: scale(0.88) rotate(0deg); }
  50% { opacity: 1; transform: scale(1) rotate(90deg); }
}

/* burger morphs into a cross while the panel is open */
.nav.is-open .nav-toggle span:nth-child(1) { top: 22px; transform: rotate(45deg); }
.nav.is-open .nav-toggle span:nth-child(2) { opacity: 0; }
.nav.is-open .nav-toggle span:nth-child(3) { top: 22px; transform: rotate(-45deg); }
