/* ================================================================
   nav.css — Vettadex Shared Navigation
   Included by every public page. No !important. No duplication.
   ================================================================ */

/* ── DESIGN TOKENS ──────────────────────────────────────────── */
:root {
  --color-brand:       #1D9E75;
  --color-brand-dk:    #17875f;
  --color-danger:      #E24B4A;
  --color-warn:        #BA7517;
  --color-amber:       #D85A30;
  --color-blue:        #378ADD;
  --color-surface:     #0d1117;
  --color-bg:          #06080e;
  --color-border:      rgba(255,255,255,0.07);
  --color-border-subtle: rgba(255,255,255,0.05);
  --color-text:        #ffffff;
  --color-text-muted:  rgba(255,255,255,0.38);
  --color-text-dim:    rgba(255,255,255,0.22);
  --color-text-ghost:  rgba(255,255,255,0.15);
  --nav-height:        64px;
  --radius-sm:         6px;
  --radius-md:         8px;
  --radius-lg:         12px;
  --radius-xl:         16px;
}

/* ── RESET INHERITED FONT ────────────────────────────────────── */
button, input, select, textarea {
  font-family: inherit;
}

/* ── SKIP TO MAIN (ACCESSIBILITY) ────────────────────────────── */
.skip-to-main {
  position: absolute;
  top: -100%;
  left: 0;
  background: var(--color-brand);
  color: #fff;
  padding: 8px 20px;
  font-size: 13px;
  font-weight: 500;
  z-index: 9999;
  text-decoration: none;
  border-radius: 0 0 8px 0;
  transition: top 0.2s;
}
.skip-to-main:focus { top: 0; }

/* ── NAV ─────────────────────────────────────────────────────── */
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 52px;
  height: var(--nav-height);
  border-bottom: 1px solid var(--color-border-subtle);
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(6,8,14,0.97);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  flex-shrink: 0;
}

.nav-logo span {
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.04em;
  color: var(--color-text);
}

.nav-logo em {
  color: var(--color-brand);
  font-style: normal;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
  flex: 1;
  justify-content: center;
}

.nav-link {
  font-size: 13px;
  font-weight: 400;
  color: var(--color-text-muted);
  letter-spacing: -0.01em;
  text-decoration: none;
  transition: color 0.2s;
  cursor: pointer;
}

.nav-link:hover,
.nav-link[aria-current="page"] {
  color: var(--color-text);
}

.nav-r {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.nav-btn {
  height: 36px;
  padding: 0 18px;
  background: transparent;
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 500;
  color: rgba(255,255,255,0.65);
  text-decoration: none;
  display: flex;
  align-items: center;
  transition: border-color 0.2s, color 0.2s;
  white-space: nowrap;
  cursor: pointer;
}

.nav-btn:hover {
  border-color: rgba(255,255,255,0.28);
  color: var(--color-text);
}

.nav-btn:focus-visible {
  outline: 2px solid var(--color-brand);
  outline-offset: 2px;
}

.nav-btn-solid {
  height: 36px;
  padding: 0 18px;
  background: var(--color-brand);
  border: none;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 500;
  color: var(--color-text);
  text-decoration: none;
  display: flex;
  align-items: center;
  transition: background 0.2s;
  white-space: nowrap;
  cursor: pointer;
}

.nav-btn-solid:hover { background: var(--color-brand-dk); }
.nav-btn-solid:focus-visible {
  outline: 2px solid var(--color-brand);
  outline-offset: 3px;
}

/* ── HAMBURGER ───────────────────────────────────────────────── */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  width: 36px;
  height: 36px;
  background: transparent;
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: var(--radius-sm);
  cursor: pointer;
  align-items: center;
  justify-content: center;
  padding: 0;
  transition: border-color 0.2s;
}

.hamburger:hover { border-color: rgba(255,255,255,0.28); }

.hamburger span {
  display: block;
  width: 16px;
  height: 1.5px;
  background: rgba(255,255,255,0.6);
  border-radius: 1px;
  transition: all 0.25s;
}

.hamburger.open span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.hamburger.open span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

/* ── MOBILE DRAWER ───────────────────────────────────────────── */
.mobile-drawer {
  display: none;
  position: fixed;
  top: var(--nav-height);
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(6,8,14,0.99);
  z-index: 99;
  backdrop-filter: blur(20px);
  overflow-y: auto;
}

.mobile-drawer.open { display: flex; }

.mobile-drawer-inner {
  display: flex;
  flex-direction: column;
  padding: 32px 28px;
  gap: 4px;
  width: 100%;
}

.mobile-link {
  font-size: 18px;
  font-weight: 400;
  color: rgba(255,255,255,0.65);
  text-decoration: none;
  padding: 14px 0;
  border-bottom: 1px solid rgba(255,255,255,0.05);
  letter-spacing: -0.02em;
  transition: color 0.2s;
}

.mobile-link:hover { color: var(--color-text); }

.mobile-drawer-btns {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 28px;
}

.mobile-btn-outline {
  height: 50px;
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: var(--radius-md);
  background: transparent;
  color: rgba(255,255,255,0.6);
  font-size: 15px;
  font-weight: 500;
  text-decoration: none;
  display: flex;
  align-items: center;
  justify-content: center;
  letter-spacing: -0.02em;
}

.mobile-btn-solid {
  height: 50px;
  background: var(--color-brand);
  border-radius: var(--radius-md);
  color: var(--color-text);
  font-size: 15px;
  font-weight: 500;
  text-decoration: none;
  display: flex;
  align-items: center;
  justify-content: center;
  letter-spacing: -0.02em;
  transition: background 0.2s;
}

.mobile-btn-solid:hover { background: var(--color-brand-dk); }

/* ── LOGO ANIMATION ──────────────────────────────────────────── */
.logo-mark line, .logo-mark polygon, .logo-mark circle {
  opacity: 0;
  animation: markFadeIn 0.3s ease forwards;
}
.logo-mark line:nth-child(1)  { animation-delay: 0.05s; }
.logo-mark line:nth-child(2)  { animation-delay: 0.10s; }
.logo-mark line:nth-child(3)  { animation-delay: 0.15s; }
.logo-mark line:nth-child(4)  { animation-delay: 0.20s; }
.logo-mark line:nth-child(5)  { animation-delay: 0.25s; }
.logo-mark line:nth-child(6)  { animation-delay: 0.30s; }
.logo-mark polygon:nth-of-type(1) { animation-delay: 0.40s; }
.logo-mark polygon:nth-of-type(2) { animation-delay: 0.50s; }
.logo-mark polygon:nth-of-type(3) { animation-delay: 0.58s; }
.logo-mark circle             { animation-delay: 0.66s; }
.logo-mark circle:last-child  { animation-delay: 0.74s; animation-duration: 0.4s; }

@keyframes markFadeIn {
  from { opacity: 0; transform-origin: 32px 32px; transform: scale(0.85); }
  to   { opacity: 1; transform: scale(1); }
}

.logo-mark circle:last-child {
  animation: markFadeIn 0.4s ease 0.74s forwards,
             threatPulse 2.4s ease 1.5s infinite;
}

@keyframes threatPulse {
  0%, 100% { r: 6.5; opacity: 1; }
  50%       { r: 7.5; opacity: 0.85; }
}

/* ── HAMBURGER JS ────────────────────────────────────────────── */

/* ── RESPONSIVE ──────────────────────────────────────────────── */
@media (max-width: 900px) {
  .nav { padding: 0 18px; }
  .nav-links { display: none; }
  .hamburger { display: flex; }
}
