/* Luxury cyber circuit lockup — R chassis, ruby/gold, not a tool panel */

.nav > .brand,
.nav > .brand-lockup,
a.brand-lockup {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  flex: 0 0 auto;
  width: auto;
  min-width: 0;
  max-width: none;
  position: relative;
  z-index: 5;
  text-decoration: none;
  overflow: visible;
}

@media (min-width: 1181px) {
  .nav > .brand,
  .nav > .brand-lockup,
  a.brand-lockup {
    flex: 0 0 210px;
    width: 210px;
    min-width: 196px;
    max-width: 230px;
  }
}

.brand-mark-circuit {
  position: relative;
  width: 48px;
  height: 48px;
  flex: 0 0 48px;
  display: grid;
  place-items: center;
  overflow: hidden;
  isolation: isolate;
  border-radius: 3px;
  background:
    radial-gradient(circle at 50% 38%, rgba(255, 48, 72, 0.42) 0%, rgba(8, 8, 12, 0.96) 58%, #050508 100%);
  border: 1px solid rgba(255, 70, 90, 0.55);
  box-shadow:
    0 0 0 1px rgba(212, 176, 122, 0.22),
    0 0 16px rgba(255, 31, 61, 0.38),
    inset 0 0 14px rgba(255, 31, 61, 0.22);
}

.brand-mark-circuit::before {
  content: "";
  position: absolute;
  inset: -40%;
  background: conic-gradient(
    from 210deg,
    transparent 0 58%,
    rgba(255, 70, 90, 0.55) 64%,
    rgba(212, 176, 122, 0.7) 68%,
    rgba(0, 243, 255, 0.35) 72%,
    transparent 78% 100%
  );
  animation: chassis-orbit 9s linear infinite;
  z-index: 0;
  pointer-events: none;
}

.brand-mark-circuit::after {
  content: "";
  position: absolute;
  inset: 2px;
  border-radius: 2px;
  background: #07070a;
  z-index: 1;
  pointer-events: none;
}

.brand-mark-circuit img {
  position: relative;
  z-index: 2;
  width: 40px;
  height: 40px;
  object-fit: contain;
  display: block;
  filter: drop-shadow(0 0 8px rgba(255, 31, 61, 0.55));
}

.brand-mark-scan {
  position: absolute;
  left: 2px;
  right: 2px;
  height: 46%;
  top: 2px;
  z-index: 3;
  background: linear-gradient(
    180deg,
    transparent 0%,
    rgba(0, 243, 255, 0) 30%,
    rgba(0, 243, 255, 0.55) 48%,
    rgba(255, 210, 140, 0.35) 56%,
    transparent 100%
  );
  mix-blend-mode: screen;
  pointer-events: none;
  animation: circuit-scan 5.5s ease-in-out infinite;
}

.brand-lockup:hover .brand-mark-circuit {
  box-shadow:
    0 0 0 1px rgba(0, 243, 255, 0.45),
    0 0 22px rgba(255, 31, 61, 0.55),
    inset 0 0 16px rgba(255, 31, 61, 0.3);
}

.brand-lockup:hover .brand-mark-scan {
  animation-duration: 1.05s;
}

.brand-lockup:hover .brand-mark-circuit img {
  filter: drop-shadow(0 0 12px rgba(255, 80, 100, 0.85));
}

.brand-copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  min-width: 0;
  line-height: 1;
  padding-left: 10px;
  border-left: 1px solid rgba(212, 176, 122, 0.28);
}

.brand-primary {
  display: block;
  font-family: var(--font-display, "Venus Rising", "Arial Black", sans-serif) !important;
  font-size: 15px !important;
  font-weight: 700 !important;
  letter-spacing: 0.08em !important;
  line-height: 1.05;
  color: #ff3355 !important;
  text-shadow:
    0 0 10px rgba(255, 31, 61, 0.55),
    0 0 22px rgba(255, 31, 61, 0.28) !important;
  white-space: nowrap;
}

html:not([lang="en"]) .brand-primary {
  font-family: var(--font-cn-title, "Shizuka-Glitch-Mincho", serif) !important;
  font-size: 17px !important;
  letter-spacing: 0.14em !important;
  color: #ff3355 !important;
}

.brand-secondary {
  display: block;
  font-family: var(--font-hud, "JetBrains Mono", "Consolas", monospace) !important;
  font-size: 9px !important;
  font-weight: 600 !important;
  letter-spacing: 0.38em !important;
  line-height: 1;
  text-transform: uppercase;
  color: #d4b07a !important;
  text-shadow: 0 0 8px rgba(212, 176, 122, 0.35);
  white-space: nowrap;
}

.brand-lockup:hover .brand-primary {
  color: #ff5d73 !important;
  text-shadow:
    0 0 14px rgba(255, 31, 61, 0.75),
    0 0 28px rgba(0, 243, 255, 0.18) !important;
}

.brand-lockup .brand-sub-serial {
  display: none !important;
}

@keyframes circuit-scan {
  0%, 12% { transform: translateY(-120%); opacity: 0; }
  18% { opacity: 1; }
  72% { transform: translateY(160%); opacity: 1; }
  84%, 100% { transform: translateY(180%); opacity: 0; }
}

@keyframes chassis-orbit {
  to { transform: rotate(360deg); }
}

@media (max-width: 1180px) {
  .menu-toggle {
    display: inline-flex !important;
    visibility: visible !important;
    opacity: 1 !important;
    width: 30px !important;
    height: 30px !important;
    min-width: 30px !important;
    flex: 0 0 30px !important;
    z-index: 40 !important;
  }

  .nav > .brand,
  .nav > .brand-lockup,
  a.brand-lockup {
    flex: 0 1 auto !important;
    width: auto !important;
    min-width: 0 !important;
    max-width: 42vw !important;
  }

  .brand-mark-circuit {
    width: 40px;
    height: 40px;
    flex-basis: 40px;
  }

  .brand-mark-circuit img {
    width: 34px;
    height: 34px;
  }

  .brand-primary {
    font-size: 13px !important;
  }

  html:not([lang="en"]) .brand-primary {
    font-size: 15px !important;
  }

  .brand-copy {
    padding-left: 8px;
  }
}

@media (max-width: 520px) {
  .brand-secondary {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .brand-mark-scan,
  .brand-mark-circuit::before {
    animation: none !important;
    display: none;
  }
}
