/* ============================================
   THE BLACKLIGHT CODEX — V2
   Premium sales-facing Blacklight site
   ============================================ */

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html, body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: #000;
  -webkit-tap-highlight-color: transparent;
  -webkit-touch-callout: none;
  user-select: none;
}

/* ---- VIDEO WALL (Desktop) ---- */

#wall {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  display: grid;
  grid-template-columns: 60fr 40fr;
  grid-template-rows: 65fr 35fr;
  gap: 1px;
  background: #000;
  z-index: 1;
}

.panel {
  position: relative;
  overflow: hidden;
  background: #000;
}

#panel-dom {
  grid-row: 1;
  grid-column: 1;
}

#panel-sm1 {
  grid-row: 1;
  grid-column: 2;
}

#panel-sm2 {
  grid-row: 2;
  grid-column: 1;
}

#panel-sm3 {
  grid-row: 2;
  grid-column: 2;
}

.panel video {
  position: absolute;
  top: 50%; left: 50%;
  min-width: 100%; min-height: 100%;
  width: auto; height: auto;
  transform: translate(-50%, -50%);
  object-fit: cover;
  opacity: 1;
  transition: opacity 4s ease-in-out;
}

/* ---- MOBILE VIDEO ---- */

#mobile-video {
  display: none;
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  z-index: 1;
  background: #000;
}

#mobile-video video {
  position: absolute;
  top: 50%; left: 50%;
  min-width: 100%; min-height: 100%;
  width: auto; height: auto;
  transform: translate(-50%, -50%);
  object-fit: cover;
}

/* ---- GRAIN OVERLAY (static PNG) ---- */

#grain {
  position: fixed;
  top: -50%; left: -50%;
  width: 200%; height: 200%;
  pointer-events: none;
  z-index: 10;
  opacity: 0.04;
  mix-blend-mode: overlay;
  background-image: url('video/grain.png');
  background-repeat: repeat;
  animation: grain-shift 0.5s steps(4) infinite;
}

@keyframes grain-shift {
  0%   { transform: translate(0, 0); }
  25%  { transform: translate(-2%, -3%); }
  50%  { transform: translate(1%, 2%); }
  75%  { transform: translate(-1.5%, 1%); }
  100% { transform: translate(0, 0); }
}

/* ---- SALES LAYER ---- */

#sales {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 20;
  text-align: center;
  pointer-events: none;
}

#sales h1 {
  font-family: 'EB Garamond', 'Georgia', serif;
  font-weight: 400;
  font-size: 24px;
  letter-spacing: 0.35em;
  text-transform: uppercase;
  color: #fff;
  opacity: 0.85;
  text-shadow: 0 0 60px rgba(0,0,0,0.9), 0 0 120px rgba(0,0,0,0.6);
  line-height: 1.4;
}

#sales .subtitle {
  font-family: 'EB Garamond', 'Georgia', serif;
  font-weight: 400;
  font-style: italic;
  font-size: 15px;
  letter-spacing: 0.15em;
  color: #fff;
  opacity: 0.4;
  margin-top: 10px;
  text-shadow: 0 0 40px rgba(0,0,0,0.8);
}

/* ---- RETAILER LINKS ---- */

#retailers {
  position: fixed;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 16px;
  opacity: 0;
  animation: retailers-in 6s ease 2s forwards;
}

@keyframes retailers-in {
  to { opacity: 1; }
}

#retailers a,
#retailers .coming {
  font-family: 'EB Garamond', 'Georgia', serif;
  font-weight: 400;
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: lowercase;
  color: #fff;
  opacity: 0.3;
  text-decoration: none;
  transition: opacity 0.5s ease;
  text-shadow: 0 0 30px rgba(0,0,0,0.8);
}

#retailers a:hover {
  opacity: 0.6;
}

#retailers .dot {
  font-family: 'EB Garamond', 'Georgia', serif;
  font-size: 12px;
  color: #fff;
  opacity: 0.15;
}

/* ---- RESPONSIVE ---- */

@media (max-width: 768px) {
  #wall {
    display: none;
  }

  #mobile-video {
    display: block;
  }

  #sales h1 {
    font-size: 18px;
    letter-spacing: 0.25em;
  }

  #sales .subtitle {
    font-size: 13px;
  }

  #retailers {
    bottom: 20px;
  }
}

@media (min-width: 769px) and (max-width: 1024px) {
  #wall {
    grid-template-columns: 50fr 50fr;
    grid-template-rows: 55fr 45fr;
  }
}

@media (max-height: 500px) {
  #retailers {
    bottom: 12px;
  }

  #sales h1 {
    font-size: 18px;
  }
}

/* ---- MUTE TOGGLE ---- */

#mute-toggle {
  position: fixed;
  top: 24px;
  right: 24px;
  z-index: 20;
  background: none;
  border: none;
  cursor: pointer;
  color: #fff;
  opacity: 0.3;
  transition: opacity 0.5s ease;
  padding: 4px;
  line-height: 0;
}

#mute-toggle:hover {
  opacity: 0.6;
}

@media (max-width: 768px) {
  #mute-toggle {
    top: 16px;
    right: 16px;
  }
}
