/* ==========================================================================
   Previously — Unified Navigation (rebuild program, W0-3)
   Blank-slate build. Namespace: pvn-*. Zero collisions with page CSS.
   Brand accent: red #ec4634. No gold anywhere.
   --------------------------------------------------------------------------
   Integration: <link rel="stylesheet" href="/shared/nav/nav.css">
   Mount: <div id="pvn-mount"></div>  +  <script src="/shared/nav/nav.js" defer>
   ========================================================================== */

/* ---- Tokens, scoped to the nav so page CSS is never touched ---- */
.pvn {
  --pvn-bg: #0d0d10;
  --pvn-bg-panel: #121216;
  --pvn-ink: #f4f2ec;
  --pvn-ink-dim: rgba(244, 242, 236, 0.62);
  --pvn-ink-faint: rgba(244, 242, 236, 0.38);
  --pvn-accent: #ec4634;
  --pvn-accent-soft: rgba(236, 70, 52, 0.14);
  --pvn-line: rgba(244, 242, 236, 0.12);
  --pvn-bar-h: 64px;
  --pvn-ease: cubic-bezier(0.22, 0.61, 0.36, 1);

  position: sticky;
  top: 0;
  z-index: 1000;
  background: var(--pvn-bg);
  color: var(--pvn-ink);
  border-bottom: 1px solid var(--pvn-line);
  font-family: -apple-system, BlinkMacSystemFont, "Inter", "Helvetica Neue",
    Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

.pvn *,
.pvn *::before,
.pvn *::after {
  box-sizing: border-box;
}

/* ---- Bar ---- */
.pvn-bar {
  height: var(--pvn-bar-h);
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  gap: 28px;
}

/* ---- Brand ---- */
.pvn-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--pvn-ink);
  flex: 0 0 auto;
}

.pvn-brand svg {
  display: block;
  width: 26px;
  height: 26px;
}

.pvn-brand-name {
  font-size: 19px;
  font-weight: 700;
  letter-spacing: 0.01em;
  white-space: nowrap;
}

/* ---- Desktop links ---- */
.pvn-links {
  display: flex;
  align-items: center;
  gap: 2px;
  list-style: none;
  margin: 0 0 0 auto;
  padding: 0;
}

/* Desktop links are text-only (icons live in the mobile dropdown) — this
   keeps the full 10-item bar inside 1024px with comfortable margin. */
.pvn-links .pvn-link svg {
  display: none;
}

.pvn-link {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 44px; /* WCAG 2.2 AA target size — was ~39px */
  padding: 10px 12px;
  color: var(--pvn-ink-dim);
  text-decoration: none;
  font-size: 13.5px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border-radius: 8px;
  transition: color 160ms var(--pvn-ease), background-color 160ms var(--pvn-ease);
  white-space: nowrap;
}

.pvn-link svg {
  width: 15px;
  height: 15px;
  flex: 0 0 auto;
  opacity: 0.85;
}

.pvn-link::after {
  content: "";
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 4px;
  height: 2px;
  border-radius: 2px;
  background: var(--pvn-accent);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 200ms var(--pvn-ease);
}

.pvn-link:hover {
  color: var(--pvn-ink);
  background: rgba(244, 242, 236, 0.05);
}

.pvn-link:hover::after {
  transform: scaleX(1);
}

.pvn-link[aria-current="page"] {
  color: var(--pvn-accent);
}

.pvn-link[aria-current="page"]::after {
  transform: scaleX(1);
}

.pvn-link[aria-current="page"] svg {
  opacity: 1;
}

/* ---- Icon actions (search / account) ---- */
.pvn-actions {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-left: 8px;
}

.pvn-iconbtn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px; /* WCAG 2.2 AA target size — was 38px */
  height: 44px;
  border-radius: 50%;
  color: var(--pvn-ink-dim);
  text-decoration: none;
  border: 1px solid transparent;
  transition: color 160ms var(--pvn-ease), border-color 160ms var(--pvn-ease),
    background-color 160ms var(--pvn-ease);
}

.pvn-iconbtn svg {
  width: 18px;
  height: 18px;
}

.pvn-iconbtn:hover {
  color: var(--pvn-ink);
  border-color: var(--pvn-line);
  background: rgba(244, 242, 236, 0.05);
}

/* ---- Live dot (Live TV lane mark) ---- */
.pvn-livedot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--pvn-accent);
  box-shadow: 0 0 0 3px var(--pvn-accent-soft);
  flex: 0 0 auto;
}

/* ---- Hamburger (mobile/tablet) ---- */
.pvn-burger {
  display: none;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  margin-left: auto;
  background: transparent;
  border: 1px solid var(--pvn-line);
  border-radius: 12px;
  color: var(--pvn-ink);
  cursor: pointer;
  transition: border-color 160ms var(--pvn-ease), background-color 160ms var(--pvn-ease);
}

.pvn-burger:hover {
  border-color: rgba(244, 242, 236, 0.3);
  background: rgba(244, 242, 236, 0.05);
}

.pvn-burger svg {
  width: 20px;
  height: 20px;
}

/* ---- Dropdown panel (mobile/tablet) ---- */
.pvn-panel {
  display: none;
  position: fixed;
  top: var(--pvn-bar-h);
  left: 0;
  right: 0;
  max-height: calc(100dvh - var(--pvn-bar-h));
  overflow-y: auto;
  background: var(--pvn-bg-panel);
  border-bottom: 1px solid var(--pvn-line);
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.55);
  overscroll-behavior: contain;
}

.pvn[data-open="true"] .pvn-panel {
  display: block;
  animation: pvn-drop 220ms var(--pvn-ease);
}

@keyframes pvn-drop {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.pvn-panel-list {
  list-style: none;
  margin: 0;
  padding: 8px 0 calc(8px + env(safe-area-inset-bottom, 0px));
}

.pvn-row {
  position: relative;
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 56px;
  padding: 12px 24px;
  color: var(--pvn-ink-dim);
  text-decoration: none;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 0.02em;
  border-bottom: 1px solid rgba(244, 242, 236, 0.06);
}

.pvn-panel-list li:last-child .pvn-row {
  border-bottom: none;
}

.pvn-row svg {
  width: 19px;
  height: 19px;
  flex: 0 0 auto;
  opacity: 0.8;
}

.pvn-row-label {
  flex: 1 1 auto;
}

.pvn-row-chev {
  width: 16px;
  height: 16px;
  color: var(--pvn-ink-faint);
  flex: 0 0 auto;
}

.pvn-row:hover {
  color: var(--pvn-ink);
  background: rgba(244, 242, 236, 0.04);
}

.pvn-row[aria-current="page"] {
  color: var(--pvn-ink);
  background: var(--pvn-accent-soft);
}

.pvn-row[aria-current="page"]::before {
  content: "";
  position: absolute;
  left: 0;
  top: 10px;
  bottom: 10px;
  width: 3px;
  border-radius: 3px;
  background: var(--pvn-accent);
}

.pvn-row[aria-current="page"] .pvn-row-label {
  color: var(--pvn-accent);
}

/* ---- Focus visibility (keyboard users) ---- */
.pvn a:focus-visible,
.pvn button:focus-visible {
  outline: 2px solid var(--pvn-accent);
  outline-offset: 2px;
  border-radius: 8px;
}

/* ---- Responsive switch ---- */
@media (max-width: 1023px) {
  .pvn {
    --pvn-bar-h: 56px;
  }
  .pvn-bar {
    padding: 0 16px;
    gap: 12px;
  }
  .pvn-links,
  .pvn-actions {
    display: none;
  }
  .pvn-burger {
    display: inline-flex;
  }
  .pvn-brand-name {
    font-size: 17px;
  }
}

/* ---- Reduced motion: instant, honest ---- */
@media (prefers-reduced-motion: reduce) {
  .pvn *,
  .pvn *::before,
  .pvn *::after {
    animation: none !important;
    transition: none !important;
  }
}
