/* Zerra nav — canonical styles */
:root {
  --zn-bg:       #0a0f0d;
  --zn-border:   rgba(61,220,132,0.15);
  --zn-green:    #3ddc84;
  --zn-amber:    #f5a623;
  --zn-blue:     #5bc8f5;
  --zn-text:     #e8ede9;
  --zn-muted:    rgba(232,237,233,0.5);
  --zn-hint:     rgba(232,237,233,0.3);
  --zn-surface:  #111710;
  --zn-surface2: #161d14;
  --zn-mono:     'DM Mono', monospace;
  --zn-serif:    'Fraunces', Georgia, serif;
}

/* ── Reset nav element to prevent legacy page styles leaking in ── */
nav.zerra-nav, nav.zerra-nav * { box-sizing: border-box; }

/* ── Nav bar ── */
nav.zerra-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 56px;
  padding: 0 24px;
  position: sticky;
  top: 0;
  z-index: 1000;
  background: var(--zn-bg);
  border-bottom: 0.5px solid var(--zn-border);
  transition: background 0.2s;
}
nav.zerra-nav.scrolled {
  background: rgba(10,15,13,0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

/* ── Left ── */
.zn-left { display: flex; align-items: center; gap: 16px; flex-shrink: 0; }
.zn-logo { display: flex; align-items: center; text-decoration: none; }
.zn-logo img { height: 28px; width: auto; display: block; }
.zn-live { display: flex; align-items: center; gap: 7px; }
.zn-live-dot {
  width: 6px; height: 6px;
  background: var(--zn-green);
  border-radius: 50%;
  flex-shrink: 0;
  animation: zn-pulse 2.4s ease-in-out infinite;
}
@keyframes zn-pulse {
  0%,100% { opacity: 1; transform: scale(1); }
  50%      { opacity: 0.45; transform: scale(0.85); }
}
.zn-live-text { font-family: var(--zn-mono); font-size: 10px; color: var(--zn-hint); letter-spacing: 0.04em; }

/* ── Center ── */
.zn-center { display: flex; align-items: center; gap: 2px; }

/* ── Nav items ── */
.zn-item { position: relative; }
.zn-btn {
  display: flex; align-items: center; gap: 4px;
  font-family: var(--zn-mono); font-size: 11px;
  color: var(--zn-muted);
  background: none; border: none; cursor: pointer;
  padding: 6px 12px; border-radius: 4px;
  letter-spacing: 0.03em;
  text-decoration: none;
  transition: color 0.15s, background 0.15s;
  white-space: nowrap;
}
.zn-btn:hover { color: var(--zn-text); background: rgba(255,255,255,0.04); }
.zn-item.active > .zn-btn {
  color: var(--zn-green);
  border-bottom: 1px solid var(--zn-green);
  border-radius: 4px 4px 0 0;
}
.zn-caret { font-size: 9px; color: inherit; transition: transform 0.18s; }
.zn-item.open > .zn-btn .zn-caret { transform: rotate(180deg); }

/* ── Dropdown ── */
.zn-dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  min-width: 230px;
  background: var(--zn-surface);
  border: 0.5px solid var(--zn-border);
  border-radius: 6px;
  padding: 6px;
  opacity: 0;
  transform: translateY(-6px);
  transition: opacity 0.18s, transform 0.18s;
  z-index: 1001;
  box-shadow: 0 8px 32px rgba(0,0,0,0.4);
}
.zn-item.open .zn-dropdown {
  display: block;
  opacity: 1;
  transform: translateY(0);
}
.zn-dd-section {
  font-family: var(--zn-mono); font-size: 9px;
  letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--zn-hint);
  padding: 8px 10px 4px;
}
.zn-dd-item {
  display: block; padding: 8px 10px;
  border-radius: 4px; text-decoration: none;
  transition: background 0.12s;
}
.zn-dd-item:hover { background: var(--zn-surface2); }
.zn-dd-name {
  font-family: var(--zn-mono); font-size: 11px;
  color: var(--zn-text);
  display: flex; align-items: center; gap: 6px;
  margin-bottom: 2px;
}
.zn-dd-desc { font-family: var(--zn-mono); font-size: 10px; color: var(--zn-hint); }
.zn-dd-muted .zn-dd-name { color: var(--zn-muted); }
.zn-dd-muted .zn-dd-desc { color: rgba(232,237,233,0.2); }

/* ── Pills ── */
.zn-pill {
  font-family: var(--zn-mono); font-size: 8px;
  letter-spacing: 0.08em; text-transform: uppercase;
  padding: 1px 5px; border-radius: 3px;
  font-weight: 500;
}
.pill-live   { background: rgba(61,220,132,0.15);  color: #3ddc84; }
.pill-daily  { background: rgba(61,220,132,0.15);  color: #3ddc84; }
.pill-annual { background: rgba(91,200,245,0.15);  color: #5bc8f5; }
.pill-soon   { background: rgba(245,166,35,0.15);  color: #f5a623; }

/* ── Right ── */
.zn-right { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.zn-cta {
  font-family: var(--zn-mono); font-size: 11px;
  color: var(--zn-green); text-decoration: none;
  padding: 5px 12px;
  border: 0.5px solid rgba(61,220,132,0.3);
  border-radius: 4px;
  letter-spacing: 0.03em;
  transition: background 0.15s, border-color 0.15s;
  white-space: nowrap;
}
.zn-cta:hover { background: rgba(61,220,132,0.08); border-color: rgba(61,220,132,0.5); }
/* zn-cta as button reset */
button.zn-cta { appearance: none; -webkit-appearance: none; }

/* ── Hamburger ── */
.zn-hamburger {
  display: none; flex-direction: column; justify-content: center;
  gap: 5px; width: 32px; height: 32px; padding: 4px;
  background: none; border: none; cursor: pointer;
}
.zn-hamburger span {
  display: block; width: 100%; height: 1px;
  background: var(--zn-muted); border-radius: 1px;
  transition: transform 0.2s, opacity 0.2s;
}
.zn-hamburger.open span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.zn-hamburger.open span:nth-child(2) { opacity: 0; }
.zn-hamburger.open span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

/* ── Mobile drawer ── */
.zn-drawer {
  position: fixed; left: 0; right: 0; bottom: 0;
  /* top and height set dynamically by JS to match actual nav bottom */
  background: var(--zn-bg);
  border-top: 0.5px solid var(--zn-border);
  z-index: 999;
  overflow-y: auto;
  transform: translateX(100%);
  transition: transform 0.22s cubic-bezier(0.4,0,0.2,1);
}
.zn-drawer.open { transform: translateX(0); }
.zn-drawer-inner { padding: 16px 24px 40px; }

.zn-drawer-section {
  font-family: var(--zn-mono); font-size: 9px;
  letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--zn-hint);
  margin: 20px 0 8px;
}
.zn-drawer-section:first-child { margin-top: 8px; }
.zn-drawer-link {
  display: block;
  font-family: var(--zn-mono); font-size: 13px;
  color: var(--zn-muted); text-decoration: none;
  padding: 10px 0;
  border-bottom: 0.5px solid rgba(255,255,255,0.04);
  transition: color 0.15s;
}
.zn-drawer-link:hover { color: var(--zn-text); }

/* ── Drawer subscribe button ── */
.zn-drawer-subscribe {
  display: block; width: 100%; margin-top: 24px;
  background: rgba(61,220,132,0.08);
  border: 0.5px solid rgba(61,220,132,0.3);
  border-radius: 4px;
  color: var(--zn-green); font-family: var(--zn-mono); font-size: 12px;
  letter-spacing: 0.05em; padding: 12px; cursor: pointer;
  transition: background 0.15s;
}
.zn-drawer-subscribe:hover { background: rgba(61,220,132,0.14); }

/* ── Subscribe modal ── */
#subscribe-modal {
  display: none; position: fixed; inset: 0;
  background: rgba(0,0,0,0.7);
  z-index: 1100;
  align-items: center; justify-content: center;
  padding: 1rem;
}
#subscribe-modal.open { display: flex; }
.zn-modal-card {
  position: relative;
  width: 100%; max-width: 480px;
  background: #0a0f0d;
  border: 0.5px solid rgba(61,220,132,0.25);
  padding: 2.5rem;
}
.zn-modal-card::before {
  content: '';
  position: absolute; top: 0; left: 0;
  width: 2.5rem; height: 0.5px;
  background: #3ddc84;
}
.zn-modal-close {
  position: absolute; top: 1rem; right: 1rem;
  background: none; border: none; cursor: pointer;
  color: rgba(232,240,235,0.4); font-size: 1.2rem; line-height: 1;
  padding: 4px 6px;
  transition: color 0.15s;
}
.zn-modal-close:hover { color: rgba(232,240,235,0.8); }
.zn-modal-label {
  font-family: var(--zn-mono); font-size: 0.65rem;
  letter-spacing: 0.15em; text-transform: uppercase;
  color: #3ddc84; margin-bottom: 1.25rem;
}
.zn-modal-heading {
  font-family: var(--zn-serif); font-weight: 300;
  font-size: 1.4rem; color: #e8f0eb; margin-bottom: 0.75rem;
}
.zn-modal-text {
  font-family: var(--zn-mono); font-size: 0.75rem;
  color: rgba(232,240,235,0.45); line-height: 1.6;
  margin-bottom: 1.75rem;
}
.zn-modal-form { display: flex; }
.zn-modal-input {
  flex: 1; background: transparent;
  border: 0.5px solid rgba(61,220,132,0.3); border-right: none;
  color: #e8f0eb; font-family: var(--zn-mono); font-size: 0.8rem;
  padding: 0.75rem 1rem; outline: none;
}
.zn-modal-input:focus { border-color: rgba(61,220,132,0.6); }
.zn-modal-input::placeholder { color: rgba(232,240,235,0.25); }
.zn-modal-btn {
  background: #3ddc84; border: none; color: #0a0f0d;
  font-family: var(--zn-mono); font-size: 0.7rem;
  letter-spacing: 0.1em; text-transform: uppercase;
  padding: 0.75rem 1.25rem; cursor: pointer;
  transition: background 0.15s;
}
.zn-modal-btn:hover { background: #5be89a; }
.zn-modal-btn:disabled { opacity: 0.5; cursor: default; }
.zn-modal-status {
  min-height: 1rem; font-family: var(--zn-mono);
  font-size: 0.7rem; margin-top: 0.875rem;
}
.zn-modal-status.success { color: #3ddc84; }
.zn-modal-status.error   { color: #f5a623; }
.zn-modal-footer {
  margin-top: 1.5rem; padding-top: 1rem;
  border-top: 0.5px solid rgba(61,220,132,0.1);
  font-family: var(--zn-mono); font-size: 0.65rem;
  color: rgba(232,240,235,0.25);
}

/* ── Mobile breakpoint ── */
@media (max-width: 768px) {
  .zn-center, .zn-cta, .zn-live { display: none; }
  .zn-hamburger { display: flex; }
}
@media (max-width: 480px) {
  .zn-modal-card { padding: 1.75rem 1.5rem; }
}
@media (max-width: 420px) {
  nav.zerra-nav { padding: 0 16px; }
}
