/* ═══════════════════════════════════════════════
   PRADUMNA_FX NAVBAR — TISATECH STYLE
   css/navbar.css  —  v5 border-only animation
   ═══════════════════════════════════════════════ */

/* ── @property: animatable angle for conic-gradient border ── */
@property --border-angle {
  syntax: "<angle>";
  inherits: false;
  initial-value: 0deg;
}

@property --search-angle {
  syntax: "<angle>";
  inherits: false;
  initial-value: 0deg;
}

/* ─── Animated border keyframes (ONLY angle moves, nothing rotates) ─── */
@keyframes border-spin {
  to {
    --border-angle: 360deg;
  }
}

@keyframes search-spin {
  to {
    --search-angle: 360deg;
  }
}

/* ── Pure black background override ── */
html,
body {
  background-color: #000000 !important;
}

/* ── Base header shell ── */
.pf-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: #000;
  padding: 12px 20px;
  border-bottom: none;
}

/* ── Nav pill container ── */
.pf-nav {
  max-width: 1300px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 0;
  background: #111118;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 50px;
  padding: 7px 8px 7px 8px;
}

/* ── Logo link ── */
.pf-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  flex-shrink: 0;
  padding: 4px 16px 4px 8px;
  margin-right: 8px;
}

/* ─── Logo ring: static wrapper, only border animates ─── */
.pf-logo-ring {
  position: relative;
  width: 43px;
  height: 42px;
  border-radius: 50%;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  /* No animation, no rotation on this element */
}

/* Animated border lives ONLY on ::before — content never moves */
.pf-logo-ring::before {
  content: '';
  position: absolute;
  inset: -2px;
  border-radius: 50%;
  background: conic-gradient(from var(--border-angle),
      #00F5FF,
      #7C3AED,
      #FF4ECD,
      #f97316,
      #00F5FF);
  animation: border-spin 4s linear infinite;
  z-index: 0;
}

/* Inner dark fill masks the center — only the 2px ring shows */
.pf-logo-ring::after {
  content: '';
  position: absolute;
  inset: 2px;
  border-radius: 50%;
  background: #000;
  z-index: 1;
}

.pf-logo-inner {
  position: relative;
  z-index: 2;
  /* above both pseudo-elements */
  width: 36px;
  height: 36px;
  border-radius: 59%;
  background: #000;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  flex-shrink: 0;
}

.pf-logo-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 59%;
  display: block;
}

/* Pause border animation on hover — logo image stays fixed */
.pf-logo:hover .pf-logo-ring::before {
  animation-play-state: paused;
}

/* ── Logo text ── */
.pf-logo-text {
  font-family: 'Space Grotesk', 'Inter', sans-serif;
  font-weight: 700;
  font-size: 1rem;
  color: #fff;
  letter-spacing: -0.01em;
  white-space: nowrap;
}

.pf-logo-accent {
  color: #22d3ee;
}

/* ── Desktop nav links ── */
.pf-nav-links {
  display: flex;
  align-items: center;
  gap: 2px;
  list-style: none;
  margin: 0;
  padding: 0;
  flex: 1;
  justify-content: center;
}

.pf-nav-link {
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 0.875rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.75);
  text-decoration: none;
  padding: 8px 14px;
  border-radius: 6px;
  white-space: nowrap;
  transition: color 0.15s ease, background 0.15s ease;
  display: block;
  letter-spacing: -0.01em;
}

.pf-nav-link:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.07);
}

/* Active state — current page */
.pf-nav-link.active,
.pf-nav-link[aria-current="page"] {
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
}

/* ─── Search ring wrap: static container, border-only animation ─── */
.pf-search-ring-wrap {
  position: relative;
  border-radius: 999px;
  flex-shrink: 0;
  margin-left: 8px;
  padding: 2px;
  background: #000;
  /* fallback beneath ::before */
  /* NO animation, NO rotation on this element */
}

/* Animated border ONLY on ::before — button content never moves */
.pf-search-ring-wrap::before {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: 999px;
  background: conic-gradient(from var(--search-angle),
      #00F5FF,
      #7C3AED,
      #FF4ECD,
      #00dd88,
      #00F5FF);
  animation: search-spin 3s linear infinite;
  z-index: 0;
}

/* Inner mask covers center — only the pill border ring shows */
.pf-search-ring-wrap::after {
  content: '';
  position: absolute;
  inset: 2px;
  border-radius: 999px;
  background: #000;
  z-index: 1;
}

/* Pause border on hover — button text/icon stay perfectly still */
.pf-search-ring-wrap:hover::before {
  animation-play-state: paused;
}

/* ─── Actual search button ─── */
.pf-search-btn {
  position: relative;
  z-index: 2;
  /* sits above both pseudo-elements */
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 18px;
  background: transparent;
  border: none;
  border-radius: 999px;
  color: #fff;
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  width: 100%;
  transition: color 0.2s ease;
  outline: none;
}

.pf-search-btn:hover {
  color: #fff;
}

.pf-search-btn svg {
  color: #00dd88;
  flex-shrink: 0;
}

/* ── Keyboard shortcut badge ── */
.pf-kbd {
  font-family: 'JetBrains Mono', 'Courier New', monospace;
  font-size: 0.6875rem;
  color: rgba(255, 255, 255, 0.4);
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 4px;
  padding: 2px 5px;
  letter-spacing: 0;
}

/* ── Hamburger (mobile only) ── */
.pf-hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 8px;
  flex-shrink: 0;
  margin-left: 4px;
}

.pf-hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: rgba(255, 255, 255, 0.7);
  border-radius: 2px;
  transition: all 0.2s ease;
}

.pf-hamburger[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.pf-hamburger[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
}

.pf-hamburger[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* ── Mobile menu ── */
.pf-mobile-menu {
  display: none;
  flex-direction: column;
  gap: 4px;
  padding: 12px 16px 16px;
  background: #111118;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-top: none;
  max-width: 1300px;
  margin: 4px auto 0;
  border-radius: 0 0 20px 20px;
}

.pf-mobile-menu.is-open {
  display: flex;
}

.pf-mobile-link {
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 0.9375rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.75);
  text-decoration: none;
  padding: 10px 14px;
  border-radius: 8px;
  transition: all 0.15s ease;
}

.pf-mobile-link:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.06);
}

/* ── Responsive breakpoints ── */
@media (max-width: 1100px) {
  .pf-nav-link {
    font-size: 0.8rem;
    padding: 7px 10px;
  }
}

@media (max-width: 900px) {
  .pf-nav-links {
    display: none;
  }

  .pf-kbd {
    display: none;
  }

  .pf-hamburger {
    display: flex;
  }

  .pf-nav {
    border-radius: 16px;
    padding: 8px 12px;
  }
}

@media (max-width: 480px) {
  .pf-header {
    padding: 10px 12px;
  }

  .pf-logo-text {
    font-size: 0.9rem;
  }

  .pf-logo-ring {
    width: 36px;
    height: 36px;
  }

  .pf-search-btn {
    padding: 7px 14px;
    font-size: 0.8125rem;
  }
}

/* ── Accessibility: focus states ── */
.pf-nav-link:focus-visible,
.pf-search-btn:focus-visible,
.pf-hamburger:focus-visible,
.pf-mobile-link:focus-visible {
  outline: 2px solid rgba(0, 221, 136, 0.7);
  outline-offset: 2px;
}

.pf-nav-link:focus:not(:focus-visible),
.pf-search-btn:focus:not(:focus-visible),
.pf-hamburger:focus:not(:focus-visible) {
  outline: none;
}

/* ── Step 6: Respect prefers-reduced-motion ── */
@media (prefers-reduced-motion: reduce) {

  .pf-logo-ring,
  .pf-search-ring-wrap {
    animation: none !important;
  }

  .pf-logo-ring {
    background: linear-gradient(135deg, #8b5cf6, #f97316);
  }

  .pf-search-ring-wrap {
    background: #00dd88;
  }
}

/* ── Print ── */
@media print {
  .pf-header {
    display: none;
  }
}

/* Footer mobile responsive fix */
@media (max-width: 768px) {
  footer > div:first-of-type {
    grid-template-columns: 1fr 1fr !important;
    gap: 32px !important;
  }
}

@media (max-width: 480px) {
  footer > div:first-of-type {
    grid-template-columns: 1fr !important;
  }
}