/* ============================================
   SIGNAL COLLAPSE — Exhibition Styles
   
   All degradable values use CSS custom properties
   driven by the entropy engine in collapse.js.
   
   The exhibition opens warm and clean (#f5f2ed),
   then collapses toward the artworks' native
   dark palette (#0a0a0a) as entropy accumulates.
   ============================================ */

:root {
  /* Entropy-driven properties (updated by JS) */
  --entropy: 0;
  --bg-color: #f5f2ed;
  --text-color: #2a2520;
  --text-secondary: #6a6055;
  --border-color: #d0c8be;
  --noise-opacity: 0;
  --blur: 0px;
  --margin-drift: 0;
  --letter-jitter: 0;
  --font-weight-var: 400;
  --rotation-max: 0;
  --saturation: 1;
  --scan-line-opacity: 0;
}

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

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
  /* No scroll-behavior: smooth — instant scrolling fits the degradation aesthetic
     and avoids false entropy from programmatic scroll events */
}

body {
  background-color: var(--bg-color);
  color: var(--text-color);
  font-family: 'Georgia', 'Times New Roman', serif;
  line-height: 1.6;
  overflow-x: hidden;
  transition: background-color 0.5s ease;
}

/* ---- Noise Canvas ---- */
#noise-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: 10;
  opacity: var(--noise-opacity);
  /* no blend mode — noise uses transparent canvas with alpha-controlled grain */
}

/* ---- Landing Section ---- */
.landing {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 2rem;
  position: relative;
  z-index: 20;
  background-color: #f5f2ed;
}

.landing-inner {
  max-width: 600px;
}

.landing-title {
  font-family: 'Georgia', serif;
  font-size: clamp(1.4rem, 4vw, 2.2rem);
  font-weight: 400;
  letter-spacing: 0.15em;
  margin-bottom: 1.5rem;
  color: #2a2520;
}

.landing-subtitle {
  font-family: 'Georgia', serif;
  font-size: 1.15rem;
  font-style: italic;
  color: #6a6055;
  margin-bottom: 1.5rem;
}

.landing-body {
  font-size: 0.95rem;
  color: #5a5045;
  line-height: 1.7;
  margin-bottom: 2rem;
}

.landing-warning {
  font-size: 0.85rem;
  color: #8a7e72;
  margin-bottom: 2.5rem;
  line-height: 1.6;
  font-style: italic;
}

.enter-btn {
  display: inline-block;
  padding: 0.75rem 2.5rem;
  font-family: 'Georgia', serif;
  font-size: 0.9rem;
  letter-spacing: 0.2em;
  color: #2a2520;
  background: transparent;
  border: 1px solid #c0b8ae;
  cursor: pointer;
  transition: all 0.3s ease;
  margin-bottom: 2rem;
}

.enter-btn:hover {
  background-color: #2a2520;
  color: #f5f2ed;
  border-color: #2a2520;
}

.landing-credit {
  font-size: 0.75rem;
  color: #a09890;
  line-height: 1.6;
}

/* ---- Exhibition (hidden until ENTER) ---- */
.exhibition {
  display: none;
  padding-bottom: 10vh;
}

.exhibition.active {
  display: block;
}

/* ---- Work Sections ---- */
.work-section {
  min-height: 100vh;
  padding: 8vh 1.5rem 4vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
}

.work-header {
  text-align: center;
  margin-bottom: 2rem;
  max-width: 700px;
}

.work-number {
  display: block;
  font-family: 'Courier New', monospace;
  font-size: 0.75rem;
  color: var(--text-secondary);
  letter-spacing: 0.3em;
  margin-bottom: 0.5rem;
  opacity: 0.6;
}

.work-title {
  font-family: 'Georgia', serif;
  font-size: clamp(1.1rem, 3vw, 1.6rem);
  font-weight: 400;
  color: var(--text-color);
  line-height: 1.4;
  margin-bottom: 0.4rem;
}

.work-artist {
  font-family: 'Georgia', serif;
  font-size: 0.85rem;
  color: var(--text-secondary);
  font-style: italic;
}

/* ---- Artwork Container ---- */
.artwork-container {
  width: 100%;
  max-width: 960px;
  position: relative;
  z-index: 15; /* above noise canvas */
  margin-bottom: 1.5rem;
}

.artwork-frame {
  display: block;
  width: 100%;
  height: 70vh;
  border: 1px solid var(--border-color);
  background: #0a0a0a;
  transition: border-color 0.5s ease;
}

@media (max-width: 768px) {
  .artwork-frame {
    height: 60vh;
  }
}

/* ---- Micro-text (curatorial voice) ---- */
.micro-text {
  max-width: 600px;
  font-family: 'Georgia', serif;
  font-size: 0.85rem;
  color: var(--text-secondary);
  text-align: center;
  line-height: 1.7;
  margin-top: 1.5rem;
  margin-bottom: 2rem;
  font-style: italic;
  filter: blur(var(--blur));
}

/* ---- Section Divider ---- */
.section-divider {
  display: flex;
  gap: 1.5rem;
  justify-content: center;
  color: var(--border-color);
  font-size: 1rem;
  margin: 2rem 0;
  opacity: 0.5;
}

/* ---- Endgame Section ---- */
.endgame-section {
  min-height: 30vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4rem 2rem;
  text-align: center;
}

.endgame-text {
  font-family: 'Courier New', monospace;
  font-size: 0.85rem;
  color: #4a4540;
  font-style: italic;
  opacity: 0;
  transition: opacity 2s ease;
  letter-spacing: 0.05em;
  max-width: 500px;
}

/* ---- Footer ---- */
.exhibition-footer {
  text-align: center;
  padding: 4rem 2rem 3rem;
  font-size: 0.75rem;
  color: var(--text-secondary);
  opacity: 0.5;
}

.exhibition-footer p {
  margin-bottom: 0.3rem;
}

/* ============================================
   DEGRADATION CLASSES
   Applied progressively by the entropy engine.
   These augment the CSS custom property system.
   ============================================ */

/* Character jitter — applied to individual spans in Phase 1+ */
.char-jitter {
  display: inline-block;
  transition: transform 0.1s ease;
}

/* Scan line overlay — appears in Phase 3+ */
.scan-line {
  position: fixed;
  left: 0;
  width: 100vw;
  height: 2px;
  background: rgba(255, 255, 255, 0.08);
  pointer-events: none;
  z-index: 11;
  opacity: var(--scan-line-opacity);
}

/* Flash frame — brief white/static flash in Phase 4 */
.flash-frame {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: 12;
  opacity: 0;
  transition: opacity 0.05s;
}

.flash-frame.active {
  opacity: 1;
}

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

@media (max-width: 600px) {
  .work-section {
    padding: 6vh 1rem 3vh;
  }
  
  .work-header {
    margin-bottom: 1.5rem;
  }
  
  .micro-text {
    font-size: 0.8rem;
    padding: 0 0.5rem;
  }
  
  .landing-title {
    letter-spacing: 0.08em;
  }
}
