:root {
  --bg-color: black;
  --text-color: white;
  --border-color: white;
}

.page-video {
  --bg-color: #e2ffdc;
  --text-color: black;
  --border-color: black;
}

.page-blog {
  --bg-color: #100306;
  --text-color: #fff1f2;
  --border-color: #e32943;
  background: var(--bg-color);
  color: var(--text-color);
}

.page-blog .bg-tile {
  opacity: 0.32;
  filter: brightness(0) saturate(100%) invert(14%) sepia(92%) saturate(5000%) hue-rotate(339deg) brightness(95%) contrast(110%);
}

.page-blog .site-title {
  color: #fff1f2;
  border-color: #ed2944;
}

.page-blog nav a[aria-current="page"] {
  color: #ff304b;
}

.page-blog a:hover {
  color: #ff5368;
}

.page-blog .blog-posts > h2,
.page-blog .blog-post h3 {
  color: #ff304b;
}

.page-blog .blog-post {
  border-color: #c91e38;
}

.page-blog .blog-post-meta {
  color: #ff7283;
}

.page-blog .blog-post p {
  color: #fff1f2;
}

.page-blog .modal-content {
  background: rgba(16, 3, 6, 0.96);
  border-color: #e32943;
}

@font-face {
  font-family: "ITC Machine W03 Bold";
  src: url("assets/fonts/ITC Machine W03 Bold.woff2") format(woff2);
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

body {
  margin: 40px;
  font-family: monospace;
  background: var(--bg-color);
  color: var(--text-color);
}

#bg-wrapper {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  z-index: -1;
}

#bg-glow-wrapper {
  position: fixed;
  inset: 0;
  overflow: hidden;
  z-index: 9999;
  pointer-events: none;
  filter:
    drop-shadow(0 0 2px rgba(214, 236, 220, 0.55))
    drop-shadow(0 0 6px rgba(170, 215, 181, 0.3))
    drop-shadow(0 0 3px rgba(0, 0, 0, 0.9));
}

#bg-glow-wrapper .bg-tile {
  opacity: 0.28;
}

.bg-side {
  position: absolute;
  top: 0;
  height: 100%;
  width: 200px; /* adjust to taste */
  overflow: hidden;
}

.bg-side.left {
  left: 0;
}

.bg-side.right {
  right: 0;
  transform: scaleX(-1); /* mirror */
}

.bg-track {
  display: flex;
  flex-direction: column;

  /* IMPORTANT: total height = 2 tiles */
  animation: scrollVertical 5s linear infinite;
}

.bg-tile {
  height: 100vh;

  background-image: url("assets/svg/tribal-scroll.svg");
  background-repeat: repeat-y;
  background-size: auto 100vh; /* match height exactly */
  background-position: left top;

  opacity: 0.15;
}

@keyframes scrollVertical {
  from {
    transform: translateY(0);
  }
  to {
    transform: translateY(-100vh); /* EXACTLY one tile height */
  }
}

/* Full-screen black overlay */
#loading-screen {
  transition: opacity 0.5s ease;
  pointer-events: all;
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: black;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  z-index: 10003;
}

#rapid-intro {
  position: fixed;
  inset: 0;
  z-index: 10004;
  pointer-events: none;
}

#rapid-intro[hidden] {
  display: none;
}

#rapid-intro img {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: fill;
}

/* Center loader container */
#loader {
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* 3D rotating SVG animation */
#rotating-svg {
  width: 100px;
  height: 100px;
  animation: rotate3d 1s linear infinite;
}

@keyframes rotate3d {
  0% { transform: rotateX(0deg) rotateY(0deg) rotateZ(0deg); }
  100% { transform: rotateX(0deg) rotateY(360deg) rotateZ(0deg); }
}

/* Loading bar container */
#loading-bar-container {
  width: 100%;
  max-width: 120px;
  height: 4px;
  background: #333;
  margin-top: 12px;
  overflow: hidden;
  position: relative;
}

/* Base fill */
#loading-bar {
  position: relative;
  height: 100%;
  background: rgb(165, 165, 165);
  transform-origin: left;
  transform: scaleX(0);
  animation: fillBar 1.2s linear forwards;
  overflow: hidden;
}

/* Shimmer overlay */
#loading-bar::after {
  content: "";
  position: absolute;
  top: 0;
  left: -50%;
  width: 50%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgb(255, 255, 255),
    transparent
  );
  animation: shimmer 0.6s linear infinite;
}

/* Fill animation */
@keyframes fillBar {
  from { transform: scaleX(0); }
  to   { transform: scaleX(1); }
}

/* Shimmer movement */
@keyframes shimmer {
  from { left: -50%; }
  to   { left: 100%; }
}

a {
  color: white;
  text-decoration: none;
}

a:visited {
  color: var(--text-color);
  text-decoration: none;
}

a:hover {
  color: var(--text-color);
  text-decoration: underline;
}

/* HEADER */
header {
  padding: 40px 20px;
  text-align: center;
}

.site-title {
  font-family: "ITC Machine W03 Bold", monospace;
  font-size: clamp(3rem, 9vw, 9rem);
  text-transform: uppercase;
  letter-spacing: normal;
  line-height: 0.85;
  margin: 0;

  display: inline-block;
  color: #dcdcdc;
  border-bottom: 2px solid var(--border-color);
  padding-bottom: 12px;

  --lx: 0px;
  --ly: 1px;

  text-shadow:
    var(--lx) calc(1px + var(--ly)) 0 #ffffff,   /* top highlight */
    calc(-1px - var(--lx)) calc(-2px - var(--ly)) 0 #000000, /* bottom shadow */
    0 0 2px #888888, /* soft ambient */
    0 1px 0 rgba(255,255,255,0.3),  /* extra subtle top highlight */
    0 -1px 0 rgba(0,0,0,0.3);      /* extra subtle bottom shadow */
}

/* NAVIGATION */
nav {
  margin-top: 20px;
}

nav a {
  margin: 0 15px;
  text-decoration: none;
  color: var(--text-color);
}

/* MAIN CONTENT */
main {
  padding: 40px 20px;
}

/* RELEASE GRID */
.releases {
  text-align: center;
  text-decoration: none;
}

.blog-posts {
  width: 100%;
  max-width: 880px;
  margin: 0 auto;
}

.blog-post {
  width: 100%;
  max-width: 680px;
  margin: 20px auto 0;
  padding-top: 20px;
  border-top: 2px solid var(--border-color);
  text-align: left;
}

.blog-post-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  font-size: 0.85rem;
  text-transform: uppercase;
}

.blog-post h3 {
  margin: 14px 0;
  font-size: 1.75rem;
  line-height: 1.1;
}

.blog-post p {
  margin: 0 0 1.1rem;
  line-height: 1.6;
}

.blog-post p:last-child {
  margin-bottom: 0;
}

.blog-post-image {
  display: block;
  width: 100%;
  height: auto;
  margin: 18px 0;
  border: 1px solid var(--border-color);
}

.release-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 280px));
  gap: 28px;
  width: 100%;
  max-width: 960px;
  margin: 20px auto 0;
  justify-content: center;
}

.release-card {
  min-width: 0;
}

@media (max-width: 760px) {
  .release-grid {
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 20px;
    max-width: 100%;
  }
}

.release-item {
  aspect-ratio: 1/1;
  box-sizing: border-box;
  border: 2px solid var(--border-color);
  overflow: hidden;
  padding: 20px;

  display: flex;
  align-items: center;
  justify-content: center;

  text-align: center;
  perspective: 500px;
  background-color: var(--bg-color);
}

.release-meta-line {
  margin: 0;
  padding: 8px 0;
  border-bottom: 2px solid transparent;
  color: var(--text-color);
  text-align: center;
  text-transform: uppercase;
}

.release-meta-line:empty {
  display: none;
}

.release-item:not(.undefined):hover + .release-meta .release-meta-line {
  border-color: white;
}

.release-item.undefined {
  cursor: wait;
}

.release-item.undefined.pending {
  transform: scale(0.98);
  transition: transform 0.1s ease;
  filter: contrast(1.25);
}

.release-item.undefined:hover {
  border-color: red;  /* border turns red */
  color: red;         /* text turns red */
  animation: cursorFlicker 0.6s steps(2) infinite; /* optional */
  transition: 
  transform 1s ease, 
  border-color 1s ease, 
  color 1s ease,
  background-color 1s ease;
}

@keyframes cursorFlicker {
  0% { cursor: pointer; }
  50% { cursor: wait; }
  100% { cursor: pointer; }
}

.album {
  width: 100%;
  height: 100%;
  transform-style: preserve-3d;
  transition: transform 0.6s ease;
}

.release-item.intermediate .album {
  display: flex;
  align-items: center;
  justify-content: center;
}

.album img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

@keyframes spin3d {
  from {
    transform: rotateY(0deg);
  }
  to {
    transform: rotateY(360deg);
  }
}

.release-item:hover {
  border-color: blue;   /* border turns blue on hover */
  color: blue;          /* text turns blue on hover */
}

.release-item:hover .album img {
  animation: spin3d 4s linear infinite;
}

/* VIDEO GRID OVERRIDE */
.page-video .video-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 30px;
  margin-top: 20px;
  max-width: 1000px;
  margin-left: auto;
  margin-right: auto;
}

/* VIDEO ITEM (inherits from release-item) */
.page-video .video-item {
  aspect-ratio: 4 / 3;
  padding: 0;
  position: relative;
  z-index: 10000;
}

.video-wrapper {
  width: 100%;
  height: 100%;
}



/* VIDEO WRAPPER */
.video-wrapper iframe {
  width: 100%;
  height: 100%;
  display: flex; /* THIS fixes the gap */
  border: none;
}

/* ABOUT SECTION */
.about {
  margin-top: 60px;
  text-align: center;
}

/* FOOTER */
footer {
  border-top: 2px solid var(--border-color);
  padding: 20px;
  text-align: center;
  margin-top: 60px;
}

/* MODAL MENU */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 10002;

  background: rgba(0, 0, 0, 0.35);

  display: none;

  align-items: center;
  justify-content: center;
}

.modal-content {
  background: rgba(0, 0, 0, 0.85); 
  padding: 40px;
  border: 2px solid white;
  text-align: center;

  display: flex;
  flex-direction: column;
  gap: 20px;
}

.modal-links {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.modal-links[hidden] {
  display: none;
}

.close-btn {
  color: white;
  align-self: flex-end;
  border: none;
  background: none;
  font-size: 18px;
  cursor: pointer;
}

/* JUMPSCARE */
#jumpscare {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;

  background: black;
  display: flex;
  justify-content: center;
  align-items: center;

  opacity: 0;
  pointer-events: none;

  transition: opacity 0.4s ease;
  z-index: 10002;
}

#jumpscare.active {
  opacity: 1;
  pointer-events: all;
  animation: flash 0.08s alternate infinite;
}

#jumpscare.fade-out {
  opacity: 0;
  animation: none;
}

/* Flash animation */
@keyframes flash {
  from { filter: brightness(1); }
  to { filter: brightness(1.8); }
}

#jumpscare img {
  width: 100%;
  height: 100%;
  object-fit: fill;
  transform: scale(1);
  transition: transform 0.4s ease;
}

/* =========================
   VIDEO PAGE BASE (DARK)
========================= */
.page-video {
  background: #020402;
  color: #b7ff7a;
}

.page-video.ambient-pulse #ambient-pulse-overlay {
  opacity: 0.72;
}

.page-video .site-title {
  text-shadow: none;
}

/* Glow text (default state) */
.page-video h2,
.page-video p,
.page-video a {
  color: #d6ecdc;
  text-shadow:
    0 0 2px rgba(214, 236, 220, 0.5),
    0 0 5px rgba(170, 215, 181, 0.3),
    0 1px 2px rgba(0, 0, 0, 0.95),
    0 0 4px rgba(0, 0, 0, 0.85);
  transition: all 0.15s ease;
}

/* =========================
   LIGHT LAYER (REAL CONTENT LOOK)
========================= */
.page-video::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 2;
  pointer-events: none;

  background: #e2ffdc; /* your pale green */

  /* This is the KEY: mask reveals this layer */
  mask: radial-gradient(
    circle 180px at var(--x, 50%) var(--y, 50%),
    black 0%,
    transparent 70%
  );

  -webkit-mask: radial-gradient(
    circle 180px at var(--x, 50%) var(--y, 50%),
    black 0%,
    transparent 70%
  );
}

/* =========================
   DARK OVERLAY (TOP LAYER)
========================= */
#flashlight {
  position: fixed;
  inset: 0;
  z-index: 9998;
  pointer-events: none;

  --x: 50%;
  --y: 50%;

  background: radial-gradient(
    circle 200px at var(--x) var(--y),
    transparent 0%,
    rgba(0,0,0,0.85) 60%,
    rgba(0,0,0,1) 100%
  );

  animation: flicker 0.15s infinite;
}

#ambient-pulse-overlay {
  position: fixed;
  inset: 0;
  z-index: 10000;
  background-color: #303536;
  mix-blend-mode: screen;
  opacity: 0;
  transition: opacity 0.8s ease-in-out;
  pointer-events: none;
}

#flashlight-text {
  position: fixed;
  inset: 0;
  z-index: 10001;
  overflow: hidden;
  pointer-events: none;

  mask: radial-gradient(
    circle 200px at var(--x, 50%) var(--y, 50%),
    black 0%,
    transparent 70%
  );
  -webkit-mask: radial-gradient(
    circle 200px at var(--x, 50%) var(--y, 50%),
    black 0%,
    transparent 70%
  );
}

#flashlight-text-outline {
  position: fixed;
  inset: 0;
  z-index: 10001;
  pointer-events: none;
}

.page-video .flashlight-text-copy,
.page-video .flashlight-text-visible-copy,
.page-video .flashlight-text-outline-copy {
  position: absolute;
  display: block;
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  overflow: visible;
}

.page-video .flashlight-text-copy,
.page-video .flashlight-text-visible-copy {
  color: #d6ecdc;
  -webkit-text-stroke: 0;
  text-shadow:
    0 0 1px rgba(214, 236, 220, 0.35),
    0 0 3px rgba(170, 215, 181, 0.2),
    0 1px 2px rgba(0, 0, 0, 0.95),
    0 0 4px rgba(0, 0, 0, 0.85);
}

.page-video .flashlight-title-copy {
  color: #e5f4e9;
  -webkit-text-stroke: 0.75px #ffffff;
  paint-order: stroke fill;
  text-shadow:
    0 0 2px rgba(245, 255, 248, 0.9),
    0 0 6px rgba(190, 225, 200, 0.75),
    0 0 12px rgba(145, 195, 158, 0.45),
    0 1px 2px rgba(0, 0, 0, 0.95),
    0 0 5px rgba(0, 0, 0, 0.85);
}

.page-video .flashlight-text-outline-copy {
  color: transparent;
  -webkit-text-stroke: 0.75px #d6ecdc;
  paint-order: stroke fill;
  filter:
    drop-shadow(0 0 2px rgba(245, 255, 248, 0.9))
    drop-shadow(0 0 6px rgba(190, 225, 200, 0.75))
    drop-shadow(0 0 12px rgba(145, 195, 158, 0.45))
    drop-shadow(0 0 2px rgba(0, 0, 0, 0.95))
    drop-shadow(0 0 5px rgba(0, 0, 0, 0.85));
}

.flashlight-box-outline-copy {
  position: absolute;
  box-sizing: border-box;
  border-style: solid;
  border-color: #d6ecdc;
  background: transparent;
  box-shadow:
    0 0 3px rgba(205, 235, 214, 0.4),
    0 0 6px rgba(165, 210, 177, 0.2),
    0 0 2px rgba(0, 0, 0, 0.95),
    0 0 5px rgba(0, 0, 0, 0.85);
  pointer-events: none;
}

.flashlight-box-outline-copy.flashlight-box-no-glow {
  box-shadow: none;
}

/* =========================
   TEXT SWITCH (REAL EFFECT)
========================= */
.page-video main,
.page-video header,
.page-video footer {
  position: relative;
  z-index: auto;
}

/* When inside light → remove glow */
.page-video .lit {
  color: black !important;
  text-shadow: none !important;
}