/* ============================================
   musicformachines.com — IDM Glitch Stylesheet
   ============================================ */

:root {
  --black: #050507;
  --dark: #0a0b0f;
  --panel: #0f1018;
  --border: #1a1d2e;
  --accent: #00ffe1;
  --accent2: #ff003c;
  --accent3: #8400ff;
  --text: #c8ccd8;
  --text-dim: #555870;
  --white: #eef0f8;
  --font-mono: 'Share Tech Mono', 'Courier New', monospace;
  --font-display: 'Orbitron', monospace;
  --font-body: 'IBM Plex Mono', monospace;
}

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

html { scroll-behavior: smooth; }

body {
  background: var(--black);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 14px;
  line-height: 1.7;
  min-height: 100vh;
  overflow-x: hidden;
}

/* ── TEXTURE OVERLAYS ──────────────────────── */

.scanlines {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9999;
  background: repeating-linear-gradient(
    to bottom,
    transparent,
    transparent 2px,
    rgba(0,0,0,0.08) 2px,
    rgba(0,0,0,0.08) 4px
  );
}

.noise {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9998;
  opacity: 0.035;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 128px 128px;
}

/* ── TYPOGRAPHY ────────────────────────────── */

h1, h2, h3 { font-family: var(--font-display); font-weight: 700; letter-spacing: 0.04em; }

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

strong { color: var(--white); }

/* ── GLITCH EFFECTS ────────────────────────── */

.logo-glitch,
.glitch-word {
  position: relative;
  display: inline-block;
}

.logo-glitch::before,
.logo-glitch::after,
.glitch-word::before,
.glitch-word::after {
  content: attr(data-text);
  position: absolute;
  top: 0; left: 0;
  width: 100%;
  opacity: 0;
}

.logo-glitch:hover::before,
.glitch-word:hover::before {
  color: var(--accent2);
  clip-path: polygon(0 20%, 100% 20%, 100% 40%, 0 40%);
  transform: translateX(-3px);
  animation: glitch-clip 0.3s steps(1) infinite;
  opacity: 1;
}

.logo-glitch:hover::after,
.glitch-word:hover::after {
  color: var(--accent);
  clip-path: polygon(0 60%, 100% 60%, 100% 80%, 0 80%);
  transform: translateX(3px);
  animation: glitch-clip 0.3s steps(1) infinite reverse;
  opacity: 1;
}

@keyframes glitch-clip {
  0%   { clip-path: polygon(0 5%,  100% 5%,  100% 20%, 0 20%); }
  20%  { clip-path: polygon(0 45%, 100% 45%, 100% 55%, 0 55%); }
  40%  { clip-path: polygon(0 70%, 100% 70%, 100% 85%, 0 85%); }
  60%  { clip-path: polygon(0 10%, 100% 10%, 100% 30%, 0 30%); }
  80%  { clip-path: polygon(0 60%, 100% 60%, 100% 75%, 0 75%); }
  100% { clip-path: polygon(0 30%, 100% 30%, 100% 50%, 0 50%); }
}

.auto-glitch {
  animation: auto-glitch-anim 6s infinite;
}

@keyframes auto-glitch-anim {
  0%, 94%, 100% { opacity: 1; transform: none; }
  95% { opacity: 0.9; transform: translateX(-2px) skewX(-1deg); color: var(--accent2); }
  96% { opacity: 1; transform: translateX(2px); color: var(--accent); }
  97% { opacity: 0.95; transform: none; color: inherit; }
  98% { opacity: 1; transform: translateX(-1px); }
}

/* ── NAVIGATION ────────────────────────────── */

.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  background: rgba(5, 5, 7, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}

.nav-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.logo {
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: 0.05em;
  white-space: nowrap;
  text-transform: uppercase;
  transition: color 0.2s;
}

.logo:hover { color: var(--white); }

.nav-links {
  display: flex;
  list-style: none;
  gap: 0;
}

.nav-link {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.15em;
  color: var(--text-dim);
  padding: 6px 16px;
  border: 1px solid transparent;
  transition: color 0.2s, border-color 0.2s, background 0.2s;
  text-transform: uppercase;
}

.nav-link:hover,
.nav-link.active {
  color: var(--accent);
  border-color: var(--border);
  background: rgba(0, 255, 225, 0.04);
}

.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.hamburger span {
  display: block;
  width: 24px;
  height: 1px;
  background: var(--text);
  transition: all 0.3s;
}

/* ── MOBILE NAV ────────────────────────────── */

@media (max-width: 680px) {
  .nav-links { display: none; position: absolute; top: 60px; left: 0; right: 0; background: var(--dark); flex-direction: column; border-bottom: 1px solid var(--border); }
  .nav-links.open { display: flex; }
  .nav-link { padding: 14px 24px; border: none; border-bottom: 1px solid var(--border); font-size: 12px; }
  .hamburger { display: flex; }
}

/* ── LAYOUT ────────────────────────────────── */

main { padding-top: 60px; }

.section-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 60px 24px;
}

.section-label {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.3em;
  color: var(--text-dim);
  margin-bottom: 16px;
  text-transform: uppercase;
}

/* ── PAGE HEADER ───────────────────────────── */

.page-header {
  border-bottom: 1px solid var(--border);
  background: var(--dark);
}

.page-header .section-inner { padding: 48px 24px 40px; }

.page-title {
  font-family: var(--font-display);
  font-size: clamp(40px, 8vw, 80px);
  font-weight: 900;
  color: var(--white);
  letter-spacing: -0.02em;
  line-height: 1;
}

/* ── HERO ──────────────────────────────────── */

.hero {
  min-height: calc(100vh - 60px);
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(ellipse 80% 60% at 70% 50%, rgba(0,255,225,0.04) 0%, transparent 60%),
    radial-gradient(ellipse 50% 80% at 20% 80%, rgba(132,0,255,0.06) 0%, transparent 60%),
    var(--black);
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(var(--border) 1px, transparent 1px),
    linear-gradient(90deg, var(--border) 1px, transparent 1px);
  background-size: 60px 60px;
  opacity: 0.4;
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 1200px;
  margin: 0 auto;
  padding: 60px 24px;
  display: flex;
  align-items: center;
  gap: 80px;
  flex-wrap: wrap;
}

.hero-img-wrap {
  flex-shrink: 0;
  position: relative;
}

.hero-album {
  display: block;
  width: 260px;
  max-width: 100%;
  image-rendering: pixelated;
  filter: contrast(1.05) saturate(0.8);
  border: 1px solid var(--border);
  transition: filter 0.3s, transform 0.3s;
}

.hero-album:hover {
  filter: contrast(1.1) saturate(1.2) hue-rotate(10deg);
  transform: scale(1.02);
}

.hero-label {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--text-dim);
  letter-spacing: 0.3em;
  margin-top: 10px;
  text-align: center;
}

.hero-text { flex: 1; min-width: 240px; }

.hero-eyebrow {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--accent);
  letter-spacing: 0.3em;
  margin-bottom: 20px;
  animation: blink 2s steps(1) infinite;
}

@keyframes blink {
  0%, 49% { opacity: 1; }
  50%, 100% { opacity: 0.3; }
}

.hero-title {
  font-family: var(--font-display);
  font-size: clamp(52px, 10vw, 96px);
  font-weight: 900;
  line-height: 0.95;
  color: var(--white);
  letter-spacing: -0.02em;
  margin-bottom: 24px;
}

.hero-title .glitch-word { display: block; }

.hero-sub {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-dim);
  letter-spacing: 0.15em;
  margin-bottom: 36px;
  text-transform: uppercase;
}

.btn-primary {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.25em;
  color: var(--black);
  background: var(--accent);
  padding: 12px 28px;
  border: 1px solid var(--accent);
  transition: background 0.2s, color 0.2s, box-shadow 0.2s;
  text-transform: uppercase;
}

.btn-primary:hover {
  background: transparent;
  color: var(--accent);
  box-shadow: 0 0 20px rgba(0,255,225,0.2);
}

.hero-decoration {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.h-line {
  position: absolute;
  bottom: 30%;
  left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--border) 30%, var(--border) 70%, transparent);
  opacity: 0.5;
}

.v-line {
  position: absolute;
  top: 0; bottom: 0;
  right: 35%;
  width: 1px;
  background: linear-gradient(180deg, transparent, var(--border) 20%, var(--border) 80%, transparent);
  opacity: 0.3;
}

.corner {
  position: absolute;
  width: 20px; height: 20px;
  border-color: var(--accent);
  border-style: solid;
  opacity: 0.4;
}
.corner.tl { top: 24px; left: 24px; border-width: 1px 0 0 1px; }
.corner.tr { top: 24px; right: 24px; border-width: 1px 1px 0 0; }
.corner.bl { bottom: 24px; left: 24px; border-width: 0 0 1px 1px; }
.corner.br { bottom: 24px; right: 24px; border-width: 0 1px 1px 0; }

/* ── MISSION ───────────────────────────────── */

.mission {
  background: var(--dark);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.section-title {
  font-family: var(--font-display);
  font-size: clamp(22px, 4vw, 36px);
  color: var(--white);
  margin-bottom: 24px;
  letter-spacing: 0.02em;
}

.mission-text {
  font-family: var(--font-body);
  font-size: 15px;
  color: var(--text);
  max-width: 700px;
  line-height: 1.9;
  margin-bottom: 48px;
}

.data-row {
  display: flex;
  gap: 0;
  border: 1px solid var(--border);
  max-width: 420px;
}

.data-item {
  flex: 1;
  padding: 20px 24px;
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.data-item:last-child { border-right: none; }

.data-num {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 700;
  color: var(--accent);
}

.data-label {
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.2em;
  color: var(--text-dim);
  text-transform: uppercase;
}

/* ── DISCOGRAPHY ───────────────────────────── */

.discography .section-inner {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1px;
  padding: 0;
  background: var(--border);
}

.album-card {
  background: var(--dark);
  display: flex;
  gap: 0;
  transition: background 0.2s;
}

.album-card:hover { background: var(--panel); }

.album-cover-link {
  flex-shrink: 0;
  display: block;
}

.album-cover-wrap {
  position: relative;
  width: 120px;
  height: 120px;
  overflow: hidden;
}

.album-cover-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  filter: grayscale(20%) contrast(1.05);
  transition: filter 0.3s, transform 0.3s;
}

.album-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,255,225,0.85);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.2s;
}

.album-overlay span {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.2em;
  color: var(--black);
  font-weight: bold;
}

.album-card:hover .album-overlay { opacity: 1; }
.album-card:hover .album-cover-wrap img { filter: none; transform: scale(1.05); }

.album-info {
  flex: 1;
  padding: 16px 20px;
  min-width: 0;
  border-left: 1px solid var(--border);
}

.album-meta {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-bottom: 6px;
}

.album-year {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--accent);
  letter-spacing: 0.1em;
}

.album-type {
  font-family: var(--font-mono);
  font-size: 9px;
  color: var(--black);
  background: var(--text-dim);
  padding: 1px 6px;
  letter-spacing: 0.1em;
}

.album-title {
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 700;
  color: var(--white);
  letter-spacing: 0.02em;
  margin-bottom: 10px;
  line-height: 1.3;
}

.tracklist {
  list-style: none;
  padding: 0;
  counter-reset: track;
  max-height: 160px;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--border) transparent;
}

.tracklist li {
  counter-increment: track;
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--text-dim);
  line-height: 1.8;
  display: flex;
  gap: 8px;
}

.tracklist li::before {
  content: counter(track, decimal-leading-zero);
  color: var(--border);
  flex-shrink: 0;
  min-width: 20px;
}

.album-desc {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-dim);
  font-style: italic;
}

/* ── NEWS ──────────────────────────────────── */

.news-section { background: var(--black); }

.news-inner {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.news-entry {
  display: grid;
  grid-template-columns: 80px 1fr;
  gap: 32px;
  padding: 32px 0;
  border-bottom: 1px solid var(--border);
  align-items: start;
  animation: fadeIn 0.4s ease both;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: none; }
}

.news-year {
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: 0.05em;
  padding-top: 2px;
  position: relative;
}

.news-year::after {
  content: '';
  position: absolute;
  top: 10px;
  right: -16px;
  width: 8px;
  height: 1px;
  background: var(--border);
}

.news-content p {
  font-size: 14px;
  line-height: 1.85;
  color: var(--text);
}

@media (max-width: 500px) {
  .news-entry { grid-template-columns: 1fr; gap: 8px; }
  .news-year::after { display: none; }
}

/* ── CONTACT ───────────────────────────────── */

.contact-section { background: var(--black); }

.contact-inner {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 50vh;
}

.contact-block {
  text-align: center;
  max-width: 480px;
}

.contact-lead {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--text-dim);
  line-height: 1.9;
  margin-bottom: 32px;
}

.contact-email {
  display: inline-block;
  font-family: var(--font-display);
  font-size: clamp(16px, 3vw, 22px);
  color: var(--white);
  letter-spacing: 0.03em;
  border: 1px solid var(--border);
  padding: 20px 32px;
  margin-bottom: 32px;
  transition: border-color 0.2s, color 0.2s, box-shadow 0.2s;
  position: relative;
}

.contact-email:hover {
  border-color: var(--accent);
  color: var(--accent);
  box-shadow: 0 0 30px rgba(0,255,225,0.1);
}

.email-at { color: var(--text-dim); font-size: 0.85em; }

.contact-decoration {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 16px;
}

.cd-line {
  height: 1px;
  width: 40px;
  background: var(--border);
}

.cd-dot {
  width: 4px; height: 4px;
  border-radius: 50%;
  background: var(--accent);
  opacity: 0.4;
  animation: pulse 2s infinite;
}

.cd-dot:nth-child(3) { animation-delay: 0.3s; }
.cd-dot:nth-child(4) { animation-delay: 0.6s; }

@keyframes pulse {
  0%, 100% { opacity: 0.4; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.5); }
}

/* ── FOOTER ────────────────────────────────── */

.footer {
  background: var(--dark);
  border-top: 1px solid var(--border);
}

.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 24px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}

.footer-logo {
  font-family: var(--font-display);
  font-size: 11px;
  color: var(--text-dim);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.footer-nav {
  display: flex;
  list-style: none;
  gap: 24px;
}

.footer-nav a {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--text-dim);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  transition: color 0.2s;
}

.footer-nav a:hover { color: var(--accent); }

.footer-sig {
  font-family: var(--font-mono);
  font-size: 9px;
  color: var(--text-dim);
  letter-spacing: 0.2em;
  opacity: 0.5;
}

/* ── SCROLLBAR ─────────────────────────────── */

::-webkit-scrollbar { width: 4px; height: 4px; }
::-webkit-scrollbar-track { background: var(--black); }
::-webkit-scrollbar-thumb { background: var(--border); }
::-webkit-scrollbar-thumb:hover { background: var(--text-dim); }

/* ── SELECTION ─────────────────────────────── */

::selection { background: var(--accent); color: var(--black); }
