:root{
  --accent:#963CEE;
  --bg:#0a0a0c;
  --text:#f3f3f2;
  --dim:#9a9a9c;
  --line: rgba(255,255,255,.14);
  --panel:#111113;
  --field:#0d0d0d;
  --field-placeholder:#191919;
  --scrim: rgba(0,0,0,.7);
  --chip-bg: rgba(255,255,255,.08);
  --disabled:#444;
}
html[data-theme="light"]{
  --bg:#f4f3f0;
  --text:#161513;
  --dim:#6c6a66;
  --line: rgba(0,0,0,.12);
  --panel:#ffffff;
  --field:#ffffff;
  --field-placeholder:#e7e5e0;
  --scrim: rgba(244,243,240,.88);
  --chip-bg: rgba(0,0,0,.06);
  --disabled:#bbb;
}
*{box-sizing:border-box; margin:0; padding:0;}
html,body{background:var(--bg); color:var(--text); font-family:'Space Grotesk', sans-serif; min-height:100vh;}
.mono{font-family:'JetBrains Mono', monospace;}
::selection{color:#fff; background-color:#963CEE;}
input,select,button{font-family:inherit; color:inherit;}
a{color:inherit;}

/* ---------- loading screen (every page) ---------- */
html.loading-lock, html.loading-lock body{overflow:hidden; height:100%;}
.loader{position:fixed; inset:0; z-index:999; background:#050506; display:flex; align-items:center; justify-content:center; transition:opacity .35s ease;}
.loader.hide{opacity:0; pointer-events:none;}
.loader-icons{display:flex; align-items:center; gap:38px;}
.loader-icons img{height:44px; width:auto; opacity:0; transform:scale(.5); display:block;}
.loader-icons img.show{animation: loaderPop .3s cubic-bezier(.34,1.56,.64,1) forwards;}
@keyframes loaderPop{ to{ opacity:1; transform:scale(1); } }
@media (max-width:640px){
  .loader-icons{gap:24px;}
  .loader-icons img{height:32px;}
}

/* ---------- shared nav (every real page) ---------- */
.sitenav{position:fixed; top:0; left:0; right:0; z-index:50; display:flex; justify-content:space-between; align-items:center; padding:24px 36px;}
.sitenav .brand{font-weight:700; font-size:15px; letter-spacing:.02em; text-decoration:none; color:var(--text); display:inline-flex; align-items:center;}
.sitenav .brand-logo{height:22px; width:auto; display:block; filter:drop-shadow(0 1px 2px rgba(0,0,0,.4));}
.sitenav .links{display:flex; align-items:center; gap:20px;}
.sitenav .links a{font-family:'JetBrains Mono', monospace; font-size:11.5px; letter-spacing:.05em; color:#ccc; text-decoration:none; padding-bottom:3px; border-bottom:1px solid transparent; text-shadow:0 1px 2px rgba(0,0,0,.45);}
.sitenav .links a:hover{color:var(--text);}
.sitenav .links a.current{color:var(--accent); border-color:var(--accent);}
.sitenav.dark{background:linear-gradient(180deg, var(--scrim), transparent);}
.sitenav.dark .links a{color:var(--dim); text-shadow:none;}
.sitenav.dark .links a:hover{color:var(--text);}
.sitenav.dark .links a.current{color:var(--accent);}
html[data-theme="light"] .sitenav.dark .brand-logo{filter:invert(1) brightness(.2);}

.theme-toggle{background:none; border:none; cursor:pointer; padding:2px; margin:0; display:inline-flex; align-items:center; color:var(--dim); line-height:0;}
.sitenav:not(.dark) .theme-toggle{text-shadow:0 1px 2px rgba(0,0,0,.45); filter:drop-shadow(0 1px 2px rgba(0,0,0,.3));}
.theme-toggle:hover{color:var(--text);}
.theme-toggle svg{display:block;}
.theme-toggle .icon-moon{display:none;}
html[data-theme="light"] .theme-toggle .icon-sun{display:none;}
html[data-theme="light"] .theme-toggle .icon-moon{display:block;}

/* ============ HOME ============ */
/* background is fixed to the viewport — it never scrolls; only the content above it does */
.bg-fixed{position:fixed; inset:0; z-index:0; overflow:hidden;}
.bg-fixed .photo{position:absolute; inset:0; background-size:cover; background-position:center; background-color:#0c0c0e;}
.bg-fixed .photo::after{content:''; position:absolute; inset:0; background:linear-gradient(180deg, rgba(0,0,0,.5) 0%, rgba(0,0,0,.12) 10%, rgba(0,0,0,.35) 45%, rgba(0,0,0,.92) 100%);}
.bg-fixed .placeholder-tag{position:absolute; inset:0; display:flex; align-items:center; justify-content:center; z-index:1;}
.bg-fixed .placeholder-tag span{font-family:'JetBrains Mono', monospace; font-size:12px; letter-spacing:.1em; color:#4a4a4f; border:1px dashed #333; padding:10px 16px; border-radius:8px;}

/* darkens the fixed photo as you scroll into the story section, so the text stays legible
   without the background itself moving */
.scroll-dim{position:absolute; inset:0; z-index:1; background:#000; opacity:0; pointer-events:none;}

/* film grain — canvas-driven: js/grain.js redraws the actual noise pattern ~24x/sec AND
   randomizes its own opacity each frame (3%–10%), so intensity flickers randomly rather
   than breathing in a smooth wave. overlay blend keeps true blacks black.
   toggle via admin -> data.grainEnabled */
.grain{
  position:absolute; inset:0; z-index:2; pointer-events:none;
  width:100%; height:100%; display:block;
  mix-blend-mode:overlay;
  image-rendering:pixelated;
  opacity:.06;
}
.grain.grain-off{display:none;}

/* occasional glitch flicker on the hero title — monochrome slice/tear, no color separation
   (keeps the black & white "No Way Out" identity intact) */
.glitch-text{position:relative;}
.glitch-text::before, .glitch-text::after{
  content: attr(data-text);
  position:absolute; left:0; top:0; width:100%; height:100%;
  background:transparent; opacity:0; pointer-events:none; color:#fff;
}
.glitch-text::before{ animation: glitchA 4.5s infinite; }
.glitch-text::after{ color:#c9c9c9; animation: glitchB 4.5s infinite; }
.glitch-text.glitch-off::before, .glitch-text.glitch-off::after{ display:none; }
@keyframes glitchA{
  0%, 91%, 100%{ opacity:0; transform:translate(0,0); clip-path:inset(0 0 0 0);}
  92%{ opacity:.9; transform:translate(-4px,0); clip-path:inset(18% 0 55% 0);}
  93%{ opacity:.9; transform:translate(3px,0); clip-path:inset(55% 0 12% 0);}
  94%{ opacity:0;}
}
@keyframes glitchB{
  0%, 91.5%, 100%{ opacity:0; transform:translate(0,0); clip-path:inset(0 0 0 0);}
  92.5%{ opacity:.7; transform:translate(3px,0); clip-path:inset(62% 0 6% 0);}
  93.5%{ opacity:.7; transform:translate(-3px,0); clip-path:inset(6% 0 68% 0);}
  94.5%{ opacity:0;}
}

.streamlink{display:inline-block; margin-top:22px; font-family:'JetBrains Mono', monospace; font-size:13px; letter-spacing:.03em; color:#fff; text-decoration:underline; text-underline-offset:3px;}
.streamlink:hover{color:var(--accent);}
.streamlink.disabled{color:#666; pointer-events:none; text-decoration:underline dotted;}

/* scrollable foreground: hero content fades out, story text fades in over the same fixed bg */
.scroll-content{position:relative; z-index:5;}
.hero-section{min-height:100vh; display:flex; align-items:flex-end;}
.homecontent{width:100%; padding:0 48px 56px; display:flex; justify-content:space-between; align-items:flex-end; gap:24px; flex-wrap:wrap;}
.homecontent h1{font-size:min(9vw, 88px); line-height:.96; font-weight:700; letter-spacing:-.02em; text-transform:uppercase;}
.homecontent .rel{font-family:'JetBrains Mono', monospace; font-size:13px; color:var(--accent); letter-spacing:.05em; margin-bottom:12px;}
.homecontent .bio{max-width:55ch; font-size:15px; line-height:1.6; color:#cfcfcf; margin-top:16px;}
.socials{display:flex; flex-direction:column; gap:10px; align-items:flex-end;}
.socials a{font-family:'JetBrains Mono', monospace; font-size:12.5px; color:#ccc; text-decoration:none;}
.socials a:hover{color:var(--accent);}

.story-section{min-height:100vh; display:flex; align-items:center; justify-content:center; padding:80px 48px;}
.story-content{max-width:620px; text-align:left; opacity:0; will-change:opacity, transform;}
.story-content h2{font-size:20px; font-weight:700; color:#fff; margin-bottom:20px;}
.story-content p{font-size:14px; line-height:1.75; color:#c7c7c9; margin-bottom:18px;}
.story-content .story-thanks{color:#f0f0f0; font-weight:500;}

/* ============ ERROR PAGES ============ */
.error-page{min-height:100vh; display:flex; flex-direction:column; align-items:center; justify-content:center; text-align:center; padding:100px 24px 60px; background:var(--bg);}
.error-brand{position:fixed; top:24px; left:36px; z-index:10;}
.error-brand img{height:22px; width:auto; display:block;}
.error-code{font-size:clamp(64px,14vw,140px); font-weight:700; letter-spacing:-.03em; line-height:1;}
.error-text{font-family:'JetBrains Mono', monospace; font-size:13px; color:#999; margin-top:16px; max-width:36ch; line-height:1.6;}
.error-home{display:inline-block; margin-top:26px; font-family:'JetBrains Mono', monospace; font-size:12px; color:#fff; text-decoration:underline; text-underline-offset:3px;}
.error-home:hover{color:var(--accent);}

.icon-loop{display:flex; align-items:center; gap:30px; margin-top:52px; height:32px;}
.icon-loop img{height:30px; width:auto; opacity:0; transform:scale(.4); animation:iconCycle 1.8s infinite;}
.icon-loop img.i2{animation-delay:.6s;}
.icon-loop img.i3{animation-delay:1.2s;}
@keyframes iconCycle{
  0%{opacity:0; transform:scale(.4);}
  8%{opacity:1; transform:scale(1);}
  30%{opacity:1; transform:scale(1);}
  40%{opacity:0; transform:scale(.4);}
  100%{opacity:0; transform:scale(.4);}
}
@media (max-width:640px){
  .error-brand{left:20px;}
  .icon-loop{gap:20px;}
}

/* ============ DOWNLOADS ============ */
.page-wrap{max-width:1000px; margin:0 auto; padding:110px 36px 60px;}
.dl-title{font-size:33px; font-weight:700;}
.art-title{font-size:33px; font-weight:700;}
.dl-sub{font-family:'JetBrains Mono', monospace; font-size:12.5px; color:var(--dim); margin-top:7px; margin-bottom:26px;}
.search-input{
  display:block; width:100%; margin-bottom:20px;
  background:var(--field); border:1px solid var(--line); border-radius:9px;
  padding:10px 14px; font-size:13px; color:var(--text);
}
.search-input::placeholder{color:var(--dim);}
.search-input:focus{outline:none; border-color:var(--accent);}
.art-sub{font-family:'JetBrains Mono', monospace; font-size:11.5px; color:var(--dim); margin-top:6px; margin-bottom:24px;}
.tracklist{border-top:1px solid var(--line);}
.track{display:grid; grid-template-columns:42px 1fr auto auto; align-items:center; gap:18px; padding:13px 2px; border-bottom:1px solid var(--line);}
.track .thumb{width:37px; height:37px; border-radius:7px; background-size:cover; background-position:center; background-color:var(--field-placeholder);}
.tt .name{font-size:16px; font-weight:600;}
.tt .meta{font-family:'JetBrains Mono', monospace; font-size:11.5px; color:var(--dim); margin-top:2px;}
.badge{font-family:'JetBrains Mono', monospace; font-size:10.5px; letter-spacing:.04em; padding:4.5px 10px; border-radius:20px; white-space:nowrap;}
.badge.copy{background:var(--chip-bg); color:var(--dim); margin-right:4px;}
.tagsline{display:flex; align-items:center; gap:6px; flex-wrap:wrap; justify-content:flex-end;}

.copy-wrap{position:relative; display:inline-flex;}
.copy-tooltip{
  position:absolute; bottom:calc(100% + 10px); left:0; z-index:30;
  width:260px; background:var(--panel); border:1px solid var(--line); border-radius:12px;
  padding:14px 16px; font-family:'Space Grotesk', sans-serif; font-size:12.5px; line-height:1.55; color:var(--text);
  opacity:0; visibility:hidden; transform:translateY(4px); pointer-events:none;
  transition:opacity .15s ease, transform .15s ease;
  box-shadow:0 10px 30px rgba(0,0,0,.55);
}
.copy-wrap:hover .copy-tooltip{opacity:1; visibility:visible; transform:translateY(0);}
@media (max-width:640px){
  .copy-tooltip{width:220px;}
  /* type pills (single/ep/album/remix) get dropped on phones — with long
     titles wrapping to several lines, a row of colored pills next to them
     just looks cluttered. copyright stays, but shrinks to just "©". */
  .tagsline .badge:not(.copy){display:none;}
  .tagsline .badge.copy{padding:4px 7px;}
  .tagsline .copy-label{display:none;}
}
.act{font-family:'JetBrains Mono', monospace; font-size:12px; color:var(--dim); text-decoration:none; margin-left:15px;}
.act:hover{color:var(--text);}
.act.stream{color:var(--text); font-weight:600;}
.act.stream:hover{opacity:.85; color:var(--text);}
.act.disabled{color:var(--disabled); pointer-events:none; font-weight:400;}
.empty-note{font-family:'JetBrains Mono', monospace; font-size:12px; color:var(--dim); padding:30px 2px;}

/* ============ ARTWORKS ============ */
.art-grid{display:grid; grid-template-columns:repeat(auto-fill, minmax(190px, 1fr)); gap:18px;}
.art-card{border:1px solid var(--line); border-radius:10px; overflow:hidden; background:var(--panel);}
.art-cover{aspect-ratio:1/1; background-size:cover; background-position:center; background-color:var(--field-placeholder); display:flex; align-items:center; justify-content:center;}
.art-cover span{font-family:'JetBrains Mono', monospace; font-size:9px; color:#3f3f3f;}
.art-meta{padding:11px 13px;}
.art-meta .name{font-size:13px; font-weight:600;}
.art-meta .date{font-family:'JetBrains Mono', monospace; font-size:10px; color:var(--dim); margin-top:2px;}
.art-dl{display:block; font-family:'JetBrains Mono', monospace; font-size:10.5px; color:var(--accent); text-decoration:none; margin-top:9px;}
.art-dl.disabled{color:var(--disabled); pointer-events:none;}

/* ============ ADMIN ============ */
.admin-wrap{max-width:1240px; margin:0 auto; padding:110px 36px 70px;}
.admin-head{display:flex; justify-content:space-between; align-items:center; margin-bottom:24px;}
.admin-head h2{font-size:24px; font-weight:700;}
.admin-head .note{font-family:'JetBrains Mono', monospace; font-size:10.5px; color:var(--dim); margin-top:4px;}

.admin-grid{display:grid; grid-template-columns:300px 1fr; gap:22px; align-items:start;}
.panel{background:var(--panel); border:1px solid var(--line); border-radius:12px; padding:16px 18px; margin-bottom:18px;}
.panel h3{font-size:12px; text-transform:uppercase; letter-spacing:.1em; color:var(--dim); font-family:'JetBrains Mono', monospace; margin-bottom:14px;}
.panel-header-row{display:flex; justify-content:space-between; align-items:center; margin-bottom:14px;}
.panel-header-row h3{margin-bottom:0;}

.field{margin-bottom:14px;}
.field:last-child{margin-bottom:0;}
.field label{display:block; font-family:'JetBrains Mono', monospace; font-size:10.5px; color:var(--dim); margin-bottom:6px;}
.field input[type=text], .field input[type=date]{width:100%; background:var(--field); color:var(--text); border:1px solid var(--line); border-radius:7px; padding:8px 10px; font-size:13px;}
.field textarea.expandable{width:100%; background:var(--field); color:var(--text); border:1px solid var(--line); border-radius:7px; padding:8px 10px; font-size:13px; font-family:inherit; line-height:1.5; resize:vertical; min-height:38px; max-height:280px;}
.colorwrap{display:flex; align-items:center; gap:10px;}
.swatch-input{width:36px; height:32px; border-radius:6px; border:1px solid var(--line); flex-shrink:0; padding:0; background:none; cursor:pointer; -webkit-appearance:none; appearance:none;}
.swatch-input::-webkit-color-swatch-wrapper{padding:0; border-radius:5px;}
.swatch-input::-webkit-color-swatch{border:none; border-radius:5px;}
.swatch-input::-moz-color-swatch{border:none; border-radius:5px;}
.hexinput{width:100px; background:var(--field); border:1px solid var(--line); border-radius:6px; padding:7px 10px; font-size:12.5px; color:var(--text); letter-spacing:.03em;}
.hexinput.invalid{border-color:#c85b5b; color:#ff9b9b;}

.type-color-row{display:flex; align-items:center; justify-content:space-between; padding:7px 0; border-bottom:1px solid var(--line);}
.type-color-row:last-child{border-bottom:none;}
.type-color-row .tname{font-family:'JetBrains Mono', monospace; font-size:11.5px; color:var(--text); text-transform:uppercase; letter-spacing:.04em;}

.gate-platform-row{display:grid; grid-template-columns:1fr 1.6fr auto; gap:8px; align-items:center; padding:7px 0; border-bottom:1px solid var(--line);}
.gate-platform-row:last-child{border-bottom:none;}
.gate-platform-row input[type=text]{width:100%; background:var(--field); color:var(--text); border:1px solid var(--line); border-radius:6px; padding:7px 8px; font-family:'JetBrains Mono', monospace; font-size:12px;}

.grain-range-row{display:flex; align-items:center; gap:8px;}
.grain-range-row input[type=number]{width:64px; background:var(--field); color:var(--text); border:1px solid var(--line); border-radius:6px; padding:7px 8px; font-size:12.5px;}
.grain-range-row .mono{font-size:11px; color:var(--dim);}

.photo-upload{display:flex; align-items:center; gap:12px;}
.photo-preview{width:64px; height:44px; border-radius:6px; background-size:cover; background-position:center; background-color:var(--field-placeholder); border:1px solid var(--line); flex-shrink:0;}
.filebtn{font-family:'JetBrains Mono', monospace; font-size:11px; background:var(--field-placeholder); border:1px solid var(--line); color:var(--text); padding:7px 12px; border-radius:7px; cursor:pointer;}
.filebtn:hover{border-color:#444;}
input[type=file]{display:none;}

.btn-add{font-family:'JetBrains Mono', monospace; font-size:11.5px; letter-spacing:.04em; background:var(--accent); color:#000; border:none; padding:9px 14px; border-radius:8px; cursor:pointer; font-weight:600;}
.btn-add:hover{opacity:.88;}
.btn-reset{font-family:'JetBrains Mono', monospace; font-size:10.5px; background:transparent; border:1px solid var(--line); color:var(--dim); padding:7px 12px; border-radius:7px; cursor:pointer;}
.btn-reset:hover{color:#ff8080; border-color:#c85b5b;}

.releases-admin{display:flex; flex-direction:column; gap:10px;}
.release-card{background:var(--field); border:1px solid var(--line); border-radius:9px; padding:10px;}
.release-row{display:grid; grid-template-columns:44px 1fr 110px 100px 145px auto; gap:10px; align-items:center;}
.release-row2{display:grid; grid-template-columns:150px 1fr 1fr; gap:10px; margin-top:8px; padding-top:8px; border-top:1px solid var(--line);}
.release-row2 .field{margin-bottom:0;}
.release-row2 label{font-family:'JetBrains Mono', monospace; font-size:9.5px; color:var(--dim); margin-bottom:4px; display:block;}
.release-row2 input[type=text]{width:100%; background:var(--field); color:var(--text); border:1px solid var(--line); border-radius:6px; padding:7px 8px; font-size:12px;}

.rr-thumb{width:38px; height:38px; border-radius:6px; background-size:cover; background-position:center; background-color:var(--field-placeholder); border:1px solid var(--line); cursor:pointer; position:relative;}
.rr-thumb::after{content:'+'; position:absolute; inset:0; display:flex; align-items:center; justify-content:center; color:#555; font-size:16px; opacity:0; transition:opacity .15s;}
.rr-thumb:hover::after{opacity:1; background:rgba(0,0,0,.4);}
.release-row input[type=text], .release-row select{width:100%; background:var(--field); color:var(--text); border:1px solid var(--line); border-radius:6px; padding:7px 8px; font-size:12.5px;}
.rr-flags{display:flex; flex-direction:column; align-items:flex-start; gap:4px; font-family:'JetBrains Mono', monospace; font-size:10px; color:var(--dim);}
.rr-flags label{display:flex; align-items:center; gap:5px; cursor:pointer; white-space:nowrap;}
.rr-actions{display:flex; gap:4px; align-items:center; justify-content:flex-end;}

.type-multiselect{position:relative;}
.tms-trigger{width:100%; background:var(--field); border:1px solid var(--line); border-radius:6px; padding:7px 8px; font-family:'JetBrains Mono', monospace; font-size:11.5px; color:var(--text); text-align:left; cursor:pointer; text-transform:capitalize; white-space:nowrap; overflow:hidden; text-overflow:ellipsis;}
.tms-trigger:hover{border-color:#555;}
.tms-panel{position:absolute; top:calc(100% + 4px); left:0; min-width:150px; background:var(--panel); border:1px solid var(--line); border-radius:8px; padding:5px; z-index:40; display:none; box-shadow:0 10px 30px rgba(0,0,0,.35);}
.type-multiselect.open .tms-panel{display:block;}
.tms-option{display:flex; align-items:center; gap:8px; padding:6px 8px; border-radius:6px; font-family:'JetBrains Mono', monospace; font-size:11.5px; color:var(--text); cursor:pointer; text-transform:capitalize;}
.tms-option:hover{background:var(--field-placeholder);}
.tms-option.checked{background:var(--accent); color:#000; font-weight:600;}
.tms-option input[type=checkbox]{display:none;}
.tms-check{width:12px; display:inline-block; text-align:center; font-size:10.5px;}
.btn-icon{width:26px; height:26px; border-radius:6px; background:var(--field-placeholder); border:1px solid var(--line); color:var(--dim); cursor:pointer; font-size:11px; display:flex; align-items:center; justify-content:center;}
.btn-icon:hover{border-color:#555; color:#fff;}
.btn-icon.danger:hover{border-color:#c85b5b; color:#ff8080;}

.col-labels{display:grid; grid-template-columns:44px 1fr 110px 100px 145px auto; gap:10px; font-family:'JetBrains Mono', monospace; font-size:9.5px; color:var(--dim); text-transform:uppercase; letter-spacing:.06em; padding:0 2px; margin-bottom:8px;}

@media (max-width:900px){
  .admin-grid{grid-template-columns:1fr;}
  .release-row{grid-template-columns:1fr;}
  .release-row2{grid-template-columns:1fr;}
}
@media (max-width:640px){
  .sitenav{padding:18px 20px;}
  .homecontent{padding:0 20px 34px; flex-direction:column; align-items:flex-start;}
  .socials{flex-direction:row; align-items:flex-start; flex-wrap:wrap;}
  .page-wrap, .admin-wrap{padding-left:20px; padding-right:20px;}
}
