/* Nettspend archive page — black & white monochrome (single greyscale
   ramp: white -> grey -> black). Everything here is scoped to
   .nettspend-archive-page or net-* classes so the shared archive.css
   (homepage silver, Che purple) is never affected. */

.nettspend-archive-page {
  margin: 0;
  background: #050505;
  min-height: 100vh;
}

/* ---- Header palette overrides (shared markup, Nettspend colors) ---- */

/* Title left to the archive.css default (silver, same as the homepage) —
   no scoped override here. */

/* Greyscale spinning globes */
.nettspend-archive-page .fcf-globe img {
  filter: grayscale(1) brightness(0.85);
}

/* Greyscale boombox art; the breathing glow is the shared white one from
   archive.css (unified across every boombox) */
.nettspend-archive-page .che-music-player img {
  filter: grayscale(1) brightness(1);
}

/* Playing pulse timed to "you ready" (~96 BPM): one glow pulse per beat
   (0.62s), head-tilt snapping over two beats. Overrides the shared 77 BPM
   default. */
.nettspend-archive-page .che-music-player.playing {
  animation-duration: 0.62s;
}
.nettspend-archive-page .che-music-player.playing img {
  animation-duration: 1.24s;
}

/* ---- Background layers (filled by nettspend-background.js) ---- */

.net-bg-ticker {
  position: absolute;
  inset: 0;
  background-repeat: repeat;
  image-rendering: pixelated;
  image-rendering: -moz-crisp-edges;
  image-rendering: crisp-edges;
  /* Same 16px/s leftward drift as the asset strip (200px tile / 12.5s), so
     grain and assets read as one moving canvas; both loop seamlessly */
  animation: netGrainDrift 12.5s linear infinite;
}

@keyframes netGrainDrift {
  from { background-position: 0 0; }
  to { background-position: -200px 0; }
}

.net-bg-field {
  position: absolute;
  inset: 0;
  overflow: hidden;
  z-index: 2;
  pointer-events: none;
}

/* Conveyor strip holding two side-by-side copies of the asset layout.
   Drifting left by exactly one layout width (1920px) per loop lands copy B
   where copy A started, so the scroll never shows a seam. 120s = 16px/s.
   (Same movement as the other archive pages.) */
.net-bg-strip {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  animation: netFieldDrift 120s linear infinite;
}

@keyframes netFieldDrift {
  from { transform: translateX(0); }
  to { transform: translateX(-1920px); }
}

.net-bg-item {
  position: absolute;
  opacity: 0.5;
}

.net-bg-item img {
  display: block;
  width: 100%;
  height: 100%;
  pointer-events: none;
  image-rendering: pixelated;
  image-rendering: -moz-crisp-edges;
  image-rendering: crisp-edges;
  animation: netTilt 6s step-end infinite;
  /* Black & white: wash each motif (color portrait, etc.) to greyscale */
  filter: grayscale(1) brightness(0.95);
}

/* 6s cycle, one snap turn per kind: spray at 0s, portrait at 2s, tag at 4s */

/* nett.png portrait: near-square, contain */
.net-bg-item-nett img {
  animation-delay: 2s;
  animation-name: netTiltHard;
  object-fit: contain;
}

/* BAFK "BAD" tag: wide sprite, contain. Forced to solid white
   (brightness(0) blacks it out, invert(1) flips to white) so it reads as
   a white tag against the dark field. */
.net-bg-item-bafk img {
  animation-delay: 4s;
  object-fit: contain;
  filter: brightness(0) invert(1);
}

/* "early life crisis." album wordmark (images/early-life-crisis.png),
   replacing the old spray can. Square tile; contain keeps it centered and
   undistorted in the square slot. The generic grayscale filter above leaves
   the white letters white against the dark field. */
.net-bg-item-spray img {
  object-fit: contain;
}

@keyframes netTilt {
  0% { transform: rotate(-8deg); }
  8.33% { transform: rotate(8deg); }
  16.67%, 100% { transform: rotate(0deg); }
}

@keyframes netTiltHard {
  0% { transform: rotate(-14deg); }
  8.33% { transform: rotate(14deg); }
  16.67%, 100% { transform: rotate(0deg); }
}

/* ---- Content row: overview left, video player right ----
   Layout geometry and hand-tuned transforms copied from Che's page */

.net-content-row {
  position: relative;
  z-index: 3;
  width: min(1200px, 94%);
  margin: 9vh auto 10vh;
  display: flex;
  gap: 28px;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
}

/* ---- Artist overview: fit stage stacked over the stat sheet ---- */

.net-overview {
  flex: 1 1 320px;
  display: flex;
  flex-direction: column;
  gap: 22px;
  transform: translate(-249px, -7px) scale(1.09);
}

.net-fit-panel,
.net-info-panel {
  background: #0c0c0c;
  box-shadow: 0 0 22px rgba(220, 220, 220, 0.28);
  padding: 16px;
}

.net-fit-panel {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.net-fit-stage {
  flex: 1;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  background:
    repeating-linear-gradient(
      180deg,
      rgba(240, 240, 240, 0.04) 0 1px,
      transparent 1px 3px
    ),
    #151515;
  border: 1px solid #3a3a3a;
  padding: 14px 14px 0;
  overflow: hidden;
}

.net-fit-stage img {
  display: block;
  width: 100%;
  max-width: 230px;
  transform: translateY(13px) scale(1.12);
  transform-origin: bottom center;
  transition: opacity 0.15s ease;
  /* Rim glow hugging the cutout's silhouette, lifting it off the dark stage */
  filter:
    drop-shadow(0 0 1px rgba(240, 240, 240, 0.55))
    drop-shadow(0 0 7px rgba(210, 210, 210, 0.4));
}

.net-fit-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.net-fit-label {
  font-family: "Press Start 2P", monospace;
  font-size: 8px;
  letter-spacing: 1px;
  color: #9a9a9a;
}

.net-fit-swap {
  font-family: "Press Start 2P", monospace;
  font-size: 9px;
  letter-spacing: 1px;
  color: #f2f2f2;
  background: #151515;
  border: 2px solid #9a9a9a;
  padding: 9px 12px;
  cursor: pointer;
  transition: background 0.1s ease;
}

.net-fit-swap:hover {
  background: #3a3a3a;
  border-color: #ffffff;
}

.net-fit-swap:active {
  transform: translateY(1px);
}

.net-info-panel {
  display: flex;
  flex-direction: column;
}

.net-info-title {
  margin: 0 0 18px;
  font-family: "Press Start 2P", monospace;
  font-size: 13px;
  letter-spacing: 2px;
  color: #f2f2f2;
  text-shadow: 0 0 8px rgba(230, 230, 230, 0.8);
}

.net-info-list {
  margin: 0;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-around;
  gap: 12px;
}

.net-info-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 14px;
  padding-bottom: 10px;
  border-bottom: 2px dotted #3a3a3a;
}

.net-info-row dt {
  font-family: "Press Start 2P", monospace;
  font-size: 8px;
  letter-spacing: 1px;
  color: #9a9a9a;
  white-space: nowrap;
}

.net-info-row dd {
  margin: 0;
  font-family: "Press Start 2P", monospace;
  font-size: 10px;
  letter-spacing: 1px;
  color: #f2f2f2;
  text-align: right;
}

/* Clickable info values (name -> Instagram, latest release -> album) */
.net-info-link {
  color: #f2f2f2;
  text-decoration: underline;
  text-decoration-color: #9a9a9a;
  text-underline-offset: 3px;
}

.net-info-link:hover {
  color: #ffffff;
  text-decoration-color: #ffffff;
  text-shadow: 0 0 8px rgba(230, 230, 230, 0.8);
}

/* ---- Video player (reuses the shared VHS UI script via che-* ids; all
        styling lives on these net-* classes) ---- */

.net-video-player {
  position: relative;
  flex: 1.6 1 420px;
  min-width: 0;
  transform: translate(47px, -15px) scale(1.42);
}

.net-video-frame {
  position: relative;
  background: #0c0c0c;
  padding: 10px;
  box-shadow: 0 0 22px rgba(220, 220, 220, 0.28);
}

/* "early life crisis." wordmark border crawling around the video frame —
   same 4-strip structure as Che's chain border, with the logo tile instead.
   Strips sit centered on the frame's outer edge (24px thick, offset -12px);
   top/bottom run full width to cover the corners, left/right tuck between
   them. Tile is 157px so the crawl shifts by exactly one logo per loop.
   A solid black band fills each strip, with the white wordmark sitting
   inside it (the tile PNG is transparent, so the black shows through). */
.net-elc-border {
  position: absolute;
  background-color: #000000;
  background-repeat: repeat;
  image-rendering: pixelated;
  image-rendering: -moz-crisp-edges;
  image-rendering: crisp-edges;
  z-index: 4;
  pointer-events: none;
}

/* The black band runs the full edge (through the corners); the scrolling
   word texture lives on ::after, inset from both ends and faded out with a
   mask so the words stop shortly before each corner */
.net-elc-border::after {
  content: "";
  position: absolute;
  background-repeat: repeat;
  image-rendering: pixelated;
  image-rendering: -moz-crisp-edges;
  image-rendering: crisp-edges;
}

.net-elc-top,
.net-elc-bottom {
  left: -12px;
  right: -12px;
  height: 24px;
}

.net-elc-top::after,
.net-elc-bottom::after {
  top: 0;
  bottom: 0;
  left: 34px;
  right: 34px;
  background-image: url("./images/elc-border-h.png");
  background-size: 157px 24px;
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 30px, #000 calc(100% - 30px), transparent 100%);
  mask-image: linear-gradient(90deg, transparent 0, #000 30px, #000 calc(100% - 30px), transparent 100%);
}

.net-elc-top { top: -12px; }
.net-elc-bottom { bottom: -12px; }
.net-elc-top::after { animation: netElcCrawlX 12s linear infinite; }
.net-elc-bottom::after { animation: netElcCrawlX 12s linear infinite reverse; }

.net-elc-left,
.net-elc-right {
  top: 12px;
  bottom: 12px;
  width: 24px;
}

.net-elc-left::after,
.net-elc-right::after {
  left: 0;
  right: 0;
  top: 22px;
  bottom: 22px;
  background-image: url("./images/elc-border-v.png");
  background-size: 24px 157px;
  -webkit-mask-image: linear-gradient(180deg, transparent 0, #000 30px, #000 calc(100% - 30px), transparent 100%);
  mask-image: linear-gradient(180deg, transparent 0, #000 30px, #000 calc(100% - 30px), transparent 100%);
}

.net-elc-left { left: -12px; }
.net-elc-right { right: -12px; }
.net-elc-left::after { animation: netElcCrawlY 12s linear infinite reverse; }
.net-elc-right::after { animation: netElcCrawlY 12s linear infinite; }

/* Shift by exactly one tile so the loop is seamless; the four edges combine
   into one clockwise circulation */
@keyframes netElcCrawlX {
  from { background-position: 0 0; }
  to { background-position: 157px 0; }
}

@keyframes netElcCrawlY {
  from { background-position: 0 0; }
  to { background-position: 0 157px; }
}

.net-video-shell {
  position: relative;
  cursor: pointer;
}

/* "Next video" control — sits over the frame (the shell handles
   click-to-play; this button stops that and swaps to the next tape) */
.net-video-next {
  position: absolute;
  right: 14px;
  bottom: 12px;
  z-index: 6;
  font-family: "Press Start 2P", monospace;
  font-size: 8px;
  letter-spacing: 1px;
  color: #f2f2f2;
  background: rgba(12, 12, 12, 0.85);
  border: 2px solid #9a9a9a;
  padding: 7px 10px;
  cursor: pointer;
  transition: background 0.1s ease, border-color 0.1s ease;
}

.net-video-next:hover {
  background: #1a1a1a;
  border-color: #ffffff;
}

.net-video-next:active {
  transform: translateY(1px);
}

.net-video {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #080808;
  object-fit: contain;
}

.net-video-scanlines {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: repeating-linear-gradient(
    180deg,
    rgba(240, 240, 240, 0.05) 0 1px,
    transparent 1px 3px
  );
}

.net-video-osd {
  position: absolute;
  inset: 0;
  pointer-events: none;
  font-family: "Press Start 2P", monospace;
  letter-spacing: 1px;
  color: #f2f2f2;
  text-shadow: 1px 1px 0 #000;
}

.net-osd-state {
  position: absolute;
  top: 10px;
  left: 12px;
  font-size: 10px;
}

/* Centered prompt shown while the tape is stopped */
.net-osd-center {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  font-size: 12px;
  animation: netOsdBlink 1s step-end infinite;
}

.net-osd-center.hidden {
  display: none;
}

.net-osd-center-triangle {
  width: 0;
  height: 0;
  border-left: 26px solid #f2f2f2;
  border-top: 16px solid transparent;
  border-bottom: 16px solid transparent;
  filter: drop-shadow(0 0 8px rgba(230, 230, 230, 0.8));
}

@keyframes netOsdBlink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

.net-osd-counter {
  position: absolute;
  top: 10px;
  right: 12px;
  font-size: 10px;
}

.net-osd-label {
  position: absolute;
  bottom: 10px;
  left: 12px;
  font-size: 8px;
  color: #b0b0b0;
}
