/* ============================================
   CRYSTAL CASTLES ARCHIVE — GLOBAL STYLES
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=VT323&family=Share+Tech+Mono&family=Silkscreen:wght@400;700&display=swap');

:root {
  --black: #000000;
  --void: #05000d;
  --deep: #0d0020;
  --purple-dark: #1a0035;
  --purple-mid: #3d0070;
  --purple: #6b00cc;
  --purple-light: #a855f7;
  --glitch-cyan: #00ffe7;
  --glitch-magenta: #ff00aa;
  --text: #d4c5e8;
  --text-dim: #7a6a8a;
  --text-bright: #f0e8ff;
  --border: #2a1040;
  --accent: #8b00ff;
}

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

html {
  scroll-behavior: smooth;
}

body {
  background-color: var(--void);
  color: var(--text);
  font-family: 'Share Tech Mono', monospace;
  font-size: 15px;
  line-height: 1.7;
  min-height: 100vh;
  overflow-x: hidden;
  cursor: crosshair;
}

/* Scanlines overlay */
body::before {
  content: '';
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 2px,
    rgba(0, 0, 0, 0.15) 2px,
    rgba(0, 0, 0, 0.15) 4px
  );
  pointer-events: none;
  z-index: 9999;
}

/* Noise texture overlay */
body::after {
  content: '';
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.04'/%3E%3C/svg%3E");
  opacity: 0.3;
  pointer-events: none;
  z-index: 9998;
}

/* ============================================
   TYPOGRAPHY
   ============================================ */

h1, h2, h3 {
  font-family: 'Silkscreen', monospace;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

h1 { font-size: clamp(2rem, 6vw, 4.5rem); }
h2 { font-size: clamp(1.2rem, 3vw, 2rem); color: var(--purple-light); }
h3 { font-size: 1rem; color: var(--glitch-cyan); }

a {
  color: var(--purple-light);
  text-decoration: none;
  transition: color 0.2s, text-shadow 0.2s;
}
a:hover {
  color: var(--glitch-cyan);
  text-shadow: 0 0 8px var(--glitch-cyan);
}

p { margin-bottom: 1rem; }

/* ============================================
   GLITCH EFFECT
   ============================================ */

.glitch {
  position: relative;
  color: var(--text-bright);
  animation: glitch-main 4s infinite;
}

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

.glitch::before {
  color: var(--glitch-cyan);
  animation: glitch-before 4s infinite;
  clip-path: polygon(0 30%, 100% 30%, 100% 50%, 0 50%);
}

.glitch::after {
  color: var(--glitch-magenta);
  animation: glitch-after 4s infinite;
  clip-path: polygon(0 60%, 100% 60%, 100% 75%, 0 75%);
}

@keyframes glitch-main {
  0%, 90%, 100% { transform: translate(0); }
  92% { transform: translate(-2px, 1px); }
  94% { transform: translate(2px, -1px); }
  96% { transform: translate(-1px, 0); }
}

@keyframes glitch-before {
  0%, 90%, 100% { transform: translate(0); opacity: 0; }
  92% { transform: translate(-4px, 0); opacity: 0.8; }
  96% { transform: translate(4px, 0); opacity: 0.6; }
}

@keyframes glitch-after {
  0%, 90%, 100% { transform: translate(0); opacity: 0; }
  93% { transform: translate(4px, 0); opacity: 0.7; }
  97% { transform: translate(-4px, 0); opacity: 0.5; }
}

/* ============================================
   LAYOUT
   ============================================ */

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 2rem;
}

section {
  padding: 4rem 0;
  border-bottom: 1px solid var(--border);
}

/* ============================================
   HEADER / NAV
   ============================================ */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(5, 0, 13, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--purple-mid);
  padding: 0.8rem 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.site-header .logo {
  font-family: 'Silkscreen', monospace;
  font-size: 0.7rem;
  color: var(--purple-light);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  text-decoration: none;
}

.site-header .logo span {
  color: var(--glitch-cyan);
}

nav {
  display: flex;
  gap: 1.5rem;
  align-items: center;
  flex-wrap: wrap;
}

nav a {
  font-family: 'Silkscreen', monospace;
  font-size: 0.6rem;
  color: var(--text-dim);
  text-decoration: none;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  transition: color 0.2s;
  padding: 0.3rem 0;
  border-bottom: 1px solid transparent;
}

nav a:hover, nav a.active {
  color: var(--purple-light);
  border-bottom-color: var(--purple-light);
  text-shadow: 0 0 6px var(--purple-light);
}

/* Language toggle */
.lang-toggle {
  background: none;
  border: 1px solid var(--purple-mid);
  color: var(--text-dim);
  font-family: 'Silkscreen', monospace;
  font-size: 0.55rem;
  letter-spacing: 0.15em;
  padding: 0.3rem 0.6rem;
  cursor: pointer;
  transition: all 0.2s;
}

.lang-toggle:hover {
  border-color: var(--glitch-cyan);
  color: var(--glitch-cyan);
  text-shadow: 0 0 6px var(--glitch-cyan);
}

/* ============================================
   HERO
   ============================================ */

.hero {
  min-height: 90vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  padding: 6rem 2rem 4rem;
  position: relative;
  overflow: hidden;
  max-width: 1100px;
  margin: 0 auto;
}

.hero-eyebrow {
  font-size: 0.65rem;
  letter-spacing: 0.3em;
  color: var(--text-dim);
  text-transform: uppercase;
  margin-bottom: 1.5rem;
  font-family: 'Silkscreen', monospace;
}

.hero-eyebrow span {
  color: var(--glitch-magenta);
}

.hero h1 {
  font-size: clamp(3rem, 10vw, 7rem);
  line-height: 0.9;
  margin-bottom: 2rem;
  background: linear-gradient(135deg, var(--text-bright) 0%, var(--purple-light) 60%, var(--glitch-cyan) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-sub {
  font-size: 0.85rem;
  color: var(--text-dim);
  max-width: 500px;
  line-height: 1.8;
  margin-bottom: 3rem;
}

.hero-years {
  font-family: 'VT323', monospace;
  font-size: 5rem;
  color: var(--purple-mid);
  position: absolute;
  right: 0;
  bottom: 2rem;
  letter-spacing: -0.05em;
  line-height: 1;
  opacity: 0.4;
  user-select: none;
}

/* Ambient glow */
.hero::before {
  content: '';
  position: absolute;
  top: 20%;
  right: -10%;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(107, 0, 204, 0.15) 0%, transparent 70%);
  pointer-events: none;
}

/* ============================================
   NAV CARDS (index sections)
   ============================================ */

.nav-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
}

.nav-card {
  background: var(--void);
  padding: 2.5rem 2rem;
  text-decoration: none;
  color: var(--text);
  display: block;
  transition: background 0.3s;
  position: relative;
  overflow: hidden;
}

.nav-card::before {
  content: '';
  position: absolute;
  bottom: 0; left: 0;
  width: 100%;
  height: 2px;
  background: var(--purple);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s;
}

.nav-card:hover {
  background: var(--deep);
  color: var(--text-bright);
}

.nav-card:hover::before {
  transform: scaleX(1);
}

.nav-card .card-num {
  font-family: 'VT323', monospace;
  font-size: 3rem;
  color: var(--purple-mid);
  line-height: 1;
  margin-bottom: 0.5rem;
  transition: color 0.3s;
}

.nav-card:hover .card-num {
  color: var(--purple-light);
}

.nav-card h3 {
  font-family: 'Silkscreen', monospace;
  font-size: 0.75rem;
  color: var(--purple-light);
  margin-bottom: 0.5rem;
  letter-spacing: 0.1em;
}

.nav-card p {
  font-size: 0.8rem;
  color: var(--text-dim);
  margin: 0;
}

/* ============================================
   PAGE HEADER (inner pages)
   ============================================ */

.page-header {
  padding: 5rem 0 3rem;
  border-bottom: 1px solid var(--border);
  position: relative;
}

.page-header .breadcrumb {
  font-size: 0.65rem;
  color: var(--text-dim);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  margin-bottom: 1rem;
}

.page-header .breadcrumb a {
  color: var(--purple-light);
}

.page-header h1 {
  font-size: clamp(2rem, 5vw, 4rem);
  line-height: 1;
  color: var(--text-bright);
}

.page-header .page-desc {
  margin-top: 1rem;
  color: var(--text-dim);
  max-width: 600px;
  font-size: 0.85rem;
}

/* ============================================
   CONTENT BLOCKS
   ============================================ */

.content-block {
  padding: 3rem 0;
  border-bottom: 1px solid var(--border);
}

.content-block:last-child {
  border-bottom: none;
}

/* Callout box */
.callout {
  border-left: 2px solid var(--purple);
  padding: 1rem 1.5rem;
  background: var(--deep);
  margin: 1.5rem 0;
  font-size: 0.85rem;
}

.callout.cyan { border-left-color: var(--glitch-cyan); }
.callout.magenta { border-left-color: var(--glitch-magenta); }

/* ============================================
   TIMELINE
   ============================================ */

.timeline {
  position: relative;
  padding-left: 2rem;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0; bottom: 0;
  width: 1px;
  background: linear-gradient(to bottom, var(--purple), transparent);
}

.timeline-entry {
  position: relative;
  padding: 1.5rem 0 1.5rem 2rem;
  border-bottom: 1px solid var(--border);
}

.timeline-entry::before {
  content: '';
  position: absolute;
  left: -4px;
  top: 2rem;
  width: 8px;
  height: 8px;
  background: var(--purple);
  border: 1px solid var(--purple-light);
  transform: rotate(45deg);
}

.timeline-entry:hover::before {
  background: var(--glitch-cyan);
  border-color: var(--glitch-cyan);
  box-shadow: 0 0 8px var(--glitch-cyan);
}

.timeline-year {
  font-family: 'VT323', monospace;
  font-size: 2.5rem;
  color: var(--purple-mid);
  line-height: 1;
  margin-bottom: 0.25rem;
}

.timeline-entry h3 {
  font-family: 'Silkscreen', monospace;
  font-size: 0.7rem;
  color: var(--text-bright);
  margin-bottom: 0.5rem;
}

.timeline-entry p {
  font-size: 0.82rem;
  color: var(--text-dim);
  margin: 0;
}

.timeline-tag {
  display: inline-block;
  font-size: 0.6rem;
  font-family: 'Silkscreen', monospace;
  padding: 0.1rem 0.4rem;
  border: 1px solid var(--border);
  color: var(--text-dim);
  margin-right: 0.4rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.timeline-tag.album { border-color: var(--purple); color: var(--purple-light); }
.timeline-tag.lineup { border-color: var(--glitch-magenta); color: var(--glitch-magenta); }
.timeline-tag.show { border-color: var(--glitch-cyan); color: var(--glitch-cyan); }

/* ============================================
   ARCHIVE GRID
   ============================================ */

.filter-bar {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 2rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border);
}

.filter-btn {
  background: none;
  border: 1px solid var(--border);
  color: var(--text-dim);
  font-family: 'Silkscreen', monospace;
  font-size: 0.55rem;
  letter-spacing: 0.1em;
  padding: 0.4rem 0.8rem;
  cursor: pointer;
  text-transform: uppercase;
  transition: all 0.2s;
}

.filter-btn:hover, .filter-btn.active {
  border-color: var(--purple-light);
  color: var(--purple-light);
}

.archive-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1px;
  background: var(--border);
}

.archive-item {
  background: var(--void);
  aspect-ratio: 4/3;
  position: relative;
  overflow: hidden;
  cursor: pointer;
  display: flex;
  align-items: flex-end;
}

.archive-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(0.6) brightness(0.7);
  transition: filter 0.4s, transform 0.4s;
  position: absolute;
  inset: 0;
}

.archive-item:hover img {
  filter: saturate(1) brightness(0.85);
  transform: scale(1.03);
}

.archive-item-info {
  position: relative;
  z-index: 2;
  padding: 1rem;
  background: linear-gradient(to top, rgba(5,0,13,0.95) 0%, transparent 100%);
  width: 100%;
}

.archive-item-info .year {
  font-family: 'VT323', monospace;
  font-size: 1.8rem;
  color: var(--purple-light);
  line-height: 1;
}

.archive-item-info .label {
  font-size: 0.7rem;
  color: var(--text-dim);
}

/* Placeholder for archive items without image */
.archive-placeholder {
  background: var(--deep);
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'VT323', monospace;
  font-size: 3rem;
  color: var(--border);
  position: absolute;
  inset: 0;
}

/* ============================================
   DISCOGRAPHY
   ============================================ */

.discography-list {
  display: grid;
  gap: 1px;
  background: var(--border);
}

.release-item {
  background: var(--void);
  padding: 1.5rem 2rem;
  display: flex;
  gap: 2rem;
  align-items: flex-start;
  transition: background 0.2s;
}

.release-item:hover {
  background: var(--deep);
}

.release-year {
  font-family: 'VT323', monospace;
  font-size: 2.5rem;
  color: var(--purple-mid);
  min-width: 80px;
  line-height: 1;
}

.release-info h3 {
  font-family: 'Silkscreen', monospace;
  font-size: 0.7rem;
  color: var(--text-bright);
  margin-bottom: 0.3rem;
}

.release-info .release-type {
  font-size: 0.7rem;
  color: var(--purple-light);
  margin-bottom: 0.5rem;
}

.release-info p {
  font-size: 0.8rem;
  color: var(--text-dim);
  margin: 0;
}

/* ============================================
   MEMBERS
   ============================================ */

.members-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1px;
  background: var(--border);
}

.member-card {
  background: var(--void);
  padding: 2.5rem 2rem;
}

.member-card .member-name {
  font-family: 'Silkscreen', monospace;
  font-size: 0.9rem;
  color: var(--text-bright);
  margin-bottom: 0.25rem;
}

.member-card .member-role {
  font-size: 0.75rem;
  color: var(--glitch-cyan);
  margin-bottom: 1rem;
}

.member-card .member-period {
  font-family: 'VT323', monospace;
  font-size: 1.5rem;
  color: var(--purple-mid);
  margin-bottom: 1rem;
}

.member-card p {
  font-size: 0.8rem;
  color: var(--text-dim);
  margin: 0;
}

/* ============================================
   FOOTER
   ============================================ */

.site-footer {
  padding: 3rem 2rem;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  max-width: 1100px;
  margin: 0 auto;
}

.site-footer .footer-brand {
  font-family: 'Silkscreen', monospace;
  font-size: 0.6rem;
  color: var(--text-dim);
  letter-spacing: 0.2em;
}

.site-footer .footer-note {
  font-size: 0.75rem;
  color: var(--text-dim);
}

.site-footer .footer-note span {
  color: var(--glitch-magenta);
}

/* ============================================
   UTILITIES
   ============================================ */

.divider {
  height: 1px;
  background: linear-gradient(to right, var(--purple), transparent);
  margin: 2rem 0;
}

.tag {
  display: inline-block;
  font-size: 0.6rem;
  font-family: 'Silkscreen', monospace;
  padding: 0.15rem 0.5rem;
  border: 1px solid var(--purple-mid);
  color: var(--purple-light);
  margin: 0.15rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.mono {
  font-family: 'Share Tech Mono', monospace;
}

.text-dim { color: var(--text-dim); }
.text-cyan { color: var(--glitch-cyan); }
.text-magenta { color: var(--glitch-magenta); }
.text-purple { color: var(--purple-light); }

/* ============================================
   SCROLLBAR
   ============================================ */

::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-track { background: var(--void); }
::-webkit-scrollbar-thumb { background: var(--purple-mid); }
::-webkit-scrollbar-thumb:hover { background: var(--purple); }

/* ============================================
   RESPONSIVE
   ============================================ */

@media (max-width: 768px) {
  .site-header { flex-wrap: wrap; gap: 0.8rem; }
  nav { gap: 0.8rem; }
  .hero { padding: 4rem 1.5rem 3rem; }
  .hero-years { display: none; }
  .release-item { flex-direction: column; gap: 0.5rem; }
  .site-footer { flex-direction: column; text-align: center; }
}
