/* Battlezone-only decorative layer.
   Scoped by the active Battlezone navigation item so About/Media/Other remain unchanged. */

@font-face {
  font-family: "BZONE";
  src: local("BZONE"), local("Battlezone"), url("./assets/decor/BZONE.ttf") format("truetype");
  font-display: swap;
}

body:has(.nav-parent.active[href="./battlezone.html"]) {
  background:
    linear-gradient(180deg, rgba(3,6,4,.70), rgba(3,6,4,.94) 44rem, #030504 100%),
    radial-gradient(circle at 68% 8%, rgba(157,204,88,.13), transparent 34rem),
    url("./assets/decor/highres-combat.jpg") center top / min(1400px, 100vw) auto no-repeat fixed,
    #040605;
}

body:has(.nav-parent.active[href="./battlezone.html"]) .content-shell {
  border-color: #344639;
  background: linear-gradient(180deg, rgba(14,20,16,.965), rgba(6,9,7,.987));
}

body:has(.nav-parent.active[href="./battlezone.html"]) .content-shell :is(h1, h2, h3) {
  font-family: "BZONE", "Arial Narrow", "Segoe UI", sans-serif;
  font-weight: 400;
}

body:has(.nav-parent.active[href="./battlezone.html"]) .side-logo {
  position: relative;
  overflow: hidden;
  padding-top: 104px;
  background:
    linear-gradient(180deg, rgba(7,12,8,.68), rgba(7,11,8,.96)),
    url("./assets/decor/highres-combat.jpg") 42% 33% / 540px auto no-repeat;
}
body:has(.nav-parent.active[href="./battlezone.html"]) .side-logo::before {
  content: "";
  position: absolute;
  top: 14px;
  left: 50%;
  width: 78px;
  height: 74px;
  transform: translateX(-50%);
  background: url("./assets/decor/GrizzlyCircle.png") center / contain no-repeat;
  filter: drop-shadow(0 0 12px rgba(157,204,88,.18));
}

body:has(.nav-parent.active[href="./battlezone.html"]) .nav-parent.active { padding-right: 48px; }
body:has(.nav-parent.active[href="./battlezone.html"]) .nav-parent.active::after {
  content: "";
  position: absolute;
  right: 9px;
  top: 50%;
  width: 30px;
  height: 30px;
  transform: translateY(-50%);
  background: url("./assets/decor/bzlogo.png") center / contain no-repeat;
  opacity: .82;
  filter: drop-shadow(0 0 5px rgba(116,255,116,.19));
}

body:has(.nav-parent.active[href="./battlezone.html"]) .hero-banner {
  position: relative;
  overflow: hidden;
  padding: 17px 19px;
  border-bottom-color: #405443;
  background:
    linear-gradient(90deg, rgba(2,8,5,.86), rgba(3,9,6,.56), rgba(2,8,5,.88)),
    url("./assets/decor/highres-combat.jpg") center 43% / cover no-repeat;
}
body:has(.nav-parent.active[href="./battlezone.html"]) .hero-banner::after {
  content: "";
  position: absolute;
  inset: 5px;
  z-index: 2;
  pointer-events: none;
  border: 1px solid rgba(157,204,88,.22);
  box-shadow: inset 0 0 20px rgba(0,0,0,.55), inset 0 0 0 3px rgba(9,17,10,.42);
  clip-path: polygon(0 0, calc(100% - 18px) 0, 100% 18px, 100% 100%, 18px 100%, 0 calc(100% - 18px));
}
body:has(.nav-parent.active[href="./battlezone.html"]) .hero-banner img {
  position: relative;
  z-index: 1;
  background: rgba(2,7,4,.70);
  box-shadow: inset 0 0 22px rgba(126,255,112,.05);
}

body:has(.nav-parent.active[href="./battlezone.html"]) .page-titlebar {
  isolation: isolate;
  min-height: 140px;
  background:
    linear-gradient(90deg, rgba(28,47,25,.95), rgba(12,19,13,.96) 58%, rgba(8,13,9,.985)),
    url("./assets/decor/highres-combat.jpg") center 54% / cover no-repeat;
}
body:has(.nav-parent.active[href="./battlezone.html"]) .page-titlebar::before {
  content: "";
  position: absolute;
  z-index: -1;
  left: 58%;
  top: 50%;
  width: clamp(180px, 28vw, 270px);
  height: calc(100% - 24px);
  transform: translate(-50%, -50%);
  background: url("./assets/decor/bzlogo.png") center / contain no-repeat;
  opacity: .30;
  filter: saturate(1.05) drop-shadow(0 0 14px rgba(109,255,92,.12));
}
body:has(.nav-parent.active[href="./battlezone.html"]) .page-titlebar > * {
  position: relative;
  z-index: 1;
  max-width: 56%;
}

/* Give all project/tool/category tiles a faint Battlezone image underlay. */
body:has(.nav-parent.active[href="./battlezone.html"]) :is(.project-card, .category-card) {
  --bz-card-art: url("./assets/decor/HighresScreenshot00005.png");
  --bz-card-pos: center;
  background:
    linear-gradient(145deg, rgba(14,22,16,.955), rgba(7,12,8,.985) 74%),
    var(--bz-card-art) var(--bz-card-pos) / cover no-repeat;
}
body:has(.nav-parent.active[href="./battlezone.html"]) .grid-2 > .project-card:nth-child(even) { --bz-card-pos: 72% center; }
body:has(.nav-parent.active[href="./battlezone.html"]) .grid-2 > .project-card:nth-child(3n) { --bz-card-pos: 28% center; }
body:has(.nav-parent.active[href="./battlezone.html"]) .grid-3 > .project-card:nth-child(2n) { --bz-card-pos: 68% center; }
body:has(.nav-parent.active[href="./battlezone.html"]) .grid-3 > .project-card:nth-child(3n) { --bz-card-pos: 30% center; }

/* Featured tiles use stronger archival art but retain the same readability envelope. */
body:has(.nav-parent.active[href="./battlezone.html"]) .project-card.featured,
body:has(.nav-parent.active[href="./battlezone.html"]) .category-card.featured {
  --bz-card-art: url("./assets/decor/battle800x600.png");
  background:
    linear-gradient(145deg, rgba(17,31,18,.89), rgba(7,12,8,.972) 72%),
    var(--bz-card-art) var(--bz-card-pos) / cover no-repeat;
}
body:has(.nav-parent.active[href="./battlezone.html"]) .content-body > .panel {
  background:
    linear-gradient(90deg, rgba(7,14,9,.965), rgba(8,13,9,.985)),
    url("./assets/decor/bztemp.bmp") center / cover no-repeat;
}

body:has(.nav-parent.active[href="./battlezone.html"]) .lede,
body:has(.nav-parent.active[href="./battlezone.html"]) .creator-note {
  background:
    linear-gradient(90deg, rgba(7,17,9,.94), rgba(8,14,10,.98)),
    url("./assets/decor/highres-combat.jpg") center 62% / cover no-repeat;
  border-left-color: #8be85d;
}

/* Old Battlezone frame art as a very light HUD overlay on key emphasis surfaces. */
body:has(.nav-parent.active[href="./battlezone.html"]) :is(.lede, .workshop-summary, .mod-detail-hero) {
  position: relative;
  overflow: hidden;
}
body:has(.nav-parent.active[href="./battlezone.html"]) :is(.lede, .workshop-summary, .mod-detail-hero)::after {
  content: "";
  position: absolute;
  inset: 3px;
  z-index: 4;
  pointer-events: none;
  background: url("./assets/decor/BZframe.png") center / 100% 100% no-repeat;
  opacity: .12;
  mix-blend-mode: screen;
}

/* Section markers use the full logo as a small shell-style identifier. */
body:has(.nav-parent.active[href="./battlezone.html"]) .section-rule::before {
  content: "";
  width: 34px;
  height: 15px;
  flex: 0 0 34px;
  background: url("./assets/decor/bzlogofull.png") center / contain no-repeat;
  opacity: .68;
  filter: drop-shadow(0 0 5px rgba(116,255,116,.12));
}

/* HUD acquisition corners appear when cards are actionable/hovered. */
body:has(.nav-parent.active[href="./battlezone.html"]) :is(.project-card, .mod-card, .collection-card) {
  position: relative;
}
body:has(.nav-parent.active[href="./battlezone.html"]) :is(.project-card, .mod-card, .collection-card)::before {
  content: "";
  position: absolute;
  inset: 6px;
  z-index: 8;
  pointer-events: none;
  opacity: 0;
  transition: opacity .14s ease;
  background:
    linear-gradient(#a7e46d,#a7e46d) left top / 18px 1px no-repeat,
    linear-gradient(#a7e46d,#a7e46d) left top / 1px 18px no-repeat,
    linear-gradient(#a7e46d,#a7e46d) right top / 18px 1px no-repeat,
    linear-gradient(#a7e46d,#a7e46d) right top / 1px 18px no-repeat,
    linear-gradient(#a7e46d,#a7e46d) left bottom / 18px 1px no-repeat,
    linear-gradient(#a7e46d,#a7e46d) left bottom / 1px 18px no-repeat,
    linear-gradient(#a7e46d,#a7e46d) right bottom / 18px 1px no-repeat,
    linear-gradient(#a7e46d,#a7e46d) right bottom / 1px 18px no-repeat;
  filter: drop-shadow(0 0 3px rgba(139,232,93,.18));
}
body:has(.nav-parent.active[href="./battlezone.html"]) :is(.project-card, .mod-card, .collection-card):hover::before,
body:has(.nav-parent.active[href="./battlezone.html"]) :is(.project-card, .mod-card, .collection-card):focus-within::before {
  opacity: .88;
}

/* Black Dog releases get a restrained faction watermark instead of the generic BZ mark. */
body:has(.nav-parent.active[href="./battlezone.html"]) :is(
  .mod-card[data-mod-id="3476765858"],
  .mod-card[data-mod-id="2973893698"],
  .mod-card[data-mod-id="3522108622"],
  .mod-card[data-mod-id="3245077113"],
  .collection-card[href*="3538255964"]
)::after {
  content: "";
  position: absolute;
  right: 10px;
  bottom: 48px;
  width: 78px;
  height: 78px;
  z-index: 1;
  pointer-events: none;
  background: url("./assets/decor/BdogLogoHD2.png") center / contain no-repeat;
  opacity: .09;
  filter: grayscale(.15) drop-shadow(0 0 8px rgba(180,210,160,.08));
}
body:has(.nav-parent.active[href="./battlezone.html"]) :is(.mod-card, .collection-card) > * {
  position: relative;
  z-index: 2;
}

body.theme-blackdog:has(.nav-parent.active[href="./battlezone.html"]) .page-titlebar::before {
  background-image: url("./assets/decor/BdogLogoHD2.png");
  width: clamp(150px, 23vw, 220px);
  opacity: .20;
  filter: grayscale(.10) drop-shadow(0 0 14px rgba(210,235,190,.08));
}
body.theme-blackdog:has(.nav-parent.active[href="./battlezone.html"]) .mod-detail-hero {
  background:
    linear-gradient(145deg, rgba(22,27,21,.92), rgba(6,10,7,.985) 74%),
    url("./assets/decor/BlackDog-BasedOffOriginal.png") 86% center / 42% auto no-repeat;
}

/* Bottom status reads like a subdued telemetry rail instead of a plain divider. */
body:has(.nav-parent.active[href="./battlezone.html"]) .status-line {
  position: relative;
  overflow: hidden;
  align-items: center;
  margin-top: 30px;
  padding: 10px 13px 10px 26px;
  border: 1px solid #27372c;
  background:
    linear-gradient(90deg, rgba(15,25,16,.96), rgba(7,12,8,.98)),
    repeating-linear-gradient(90deg, transparent 0 52px, rgba(157,204,88,.035) 53px);
  box-shadow: inset 0 1px rgba(255,255,255,.02);
}
body:has(.nav-parent.active[href="./battlezone.html"]) .status-line::before {
  content: "";
  position: absolute;
  left: 11px;
  top: 50%;
  width: 6px;
  height: 6px;
  transform: translateY(-50%);
  border-radius: 50%;
  background: #9dcc58;
  box-shadow: 0 0 7px rgba(157,204,88,.55);
  animation: bz-status-pulse 2.8s ease-in-out infinite;
}
body:has(.nav-parent.active[href="./battlezone.html"]) .status-line::after {
  content: "";
  position: absolute;
  right: 11px;
  top: 4px;
  width: 54px;
  height: 3px;
  background: repeating-linear-gradient(90deg, rgba(157,204,88,.38) 0 5px, transparent 5px 9px);
  opacity: .45;
}

@keyframes bz-status-pulse {
  0%, 100% { opacity: .48; transform: translateY(-50%) scale(.86); }
  50% { opacity: 1; transform: translateY(-50%) scale(1.08); }
}

@media (prefers-reduced-motion: reduce) {
  body:has(.nav-parent.active[href="./battlezone.html"]) .status-line::before { animation: none; }
}

@media (max-width: 860px) {
  body:has(.nav-parent.active[href="./battlezone.html"]) { background-position: center top; background-attachment: scroll; }
  body:has(.nav-parent.active[href="./battlezone.html"]) .page-titlebar::before {
    left: 72%;
    width: 180px;
    opacity: .23;
  }
  body:has(.nav-parent.active[href="./battlezone.html"]) .page-titlebar > * { max-width: 64%; }
}

@media (max-width: 660px) {
  body:has(.nav-parent.active[href="./battlezone.html"]) .hero-banner { padding: 10px 11px; }
  body:has(.nav-parent.active[href="./battlezone.html"]) .page-titlebar { min-height: 126px; }
  body:has(.nav-parent.active[href="./battlezone.html"]) .page-titlebar::before {
    left: 76%;
    width: 128px;
    opacity: .17;
  }
  body:has(.nav-parent.active[href="./battlezone.html"]) .page-titlebar > * { max-width: 68%; }
  body:has(.nav-parent.active[href="./battlezone.html"]) :is(.project-card, .mod-card, .collection-card)::before { inset: 4px; }
  body:has(.nav-parent.active[href="./battlezone.html"]) .status-line { padding-left: 23px; }
}
