/*###############################
###
###     styles.css
###     PHASE. — Generative Microcosm
###     BASED ON: HTML5, CSS3, JavaScript, p5.js
###     AUTHOR: Benjamin Bennewitz
###
###
###       ██████╗  ▀█
###       ██╔══██╗ █▄
###       ██████╦╝
###       ██╔══██╗
###       ██████╦╝
###       ╚═════╝
###
#################################*/

/* ===========================================================================
   INHALTSVERZEICHNIS

   01   Design Tokens
   02   Basis und Fokus
   03   Seitengerüst
   04   Kopfzeile
   05   Bühne und Typografie
   06   Wellenlabor
   07   Technische Randnotizen
   08   Technische Fußzeile
   09   Responsive Anpassungen
   10   Probenarchiv
   11   Ergänzende Archivzustände
   12   Footer und Disclaimer
   ========================================================================== */

/* 01   Design Tokens */

:root {
  font-family: Arial, Helvetica, sans-serif;
  color-scheme: dark;
  --bg: #080909;
  --text: #efeee8;
  --muted: #959892;
  --line: #303331;
  --accent: #ff474b;
  --panel: rgba(12, 14, 13, 0.86);
}

:root[data-theme='light'] {
  color-scheme: light;
  --bg: #ddd2be;
  --text: #29271f;
  --muted: #625b4e;
  --line: #b6aa96;
  --accent: #b32734;
  --panel: rgba(215, 203, 181, 0.94);
}

/* 02   Basis und Fokus */

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
}

button,
a,
input {
  -webkit-tap-highlight-color: transparent;
}

button {
  font: inherit;
  color: inherit;
  background: transparent;
  border: 1px solid var(--line);
  padding: 10px 13px;
  cursor: pointer;
  border-radius: 2px;
  font-size: 12px;
}

button:hover {
  border-color: var(--text);
}

button:active {
  transform: translateY(1px);
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 5px;
}

button.primary {
  background: var(--text);
  color: var(--bg);
  border-color: var(--text);
}

button.primary:hover {
  background: var(--accent);
  color: var(--bg);
  border-color: var(--accent);
}

/* 03   Seitengerüst */

.phase {
  max-width: 1800px;
  margin: auto;
  padding: 0 40px;
}

/* 04   Kopfzeile */

.phase-header {
  height: 94px;
  display: flex;
  align-items: center;
  gap: 34px;
  border-bottom: 1px solid var(--line);
}

.wordmark {
  font-size: 30px;
  letter-spacing: -2px;
  font-weight: 800;
  color: var(--text);
  text-decoration: none;
}

.wordmark span {
  color: var(--accent);
}

.edition,
.eyebrow,
.annotation,
.phase-footer,
.index {
  font-family: monospace;
  font-size: 10px;
  letter-spacing: 1.7px;
}

.edition {
  color: var(--muted);
}

.header-actions {
  margin-left: auto;
  display: flex;
  gap: 8px;
}

/* 05   Bühne und Typografie */

.exhibit {
  position: relative;
  min-height: 690px;
  height: calc(100svh - 156px);
  max-height: 1100px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.intro {
  position: relative;
  z-index: 1;
  width: 33%;
  pointer-events: none;
  align-self: flex-start;
  margin-top: 100px;
}

.eyebrow {
  color: var(--accent);
  margin-bottom: 26px;
}

h1 {
  font-size: clamp(28px, 3.5vw, 58px);
  line-height: 1.05;
  font-weight: 500;
  letter-spacing: -2px;
  margin: 0;
}

.quiet {
  color: var(--muted);
}

.description {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.8;
  max-width: 230px;
  margin-top: 25px;
}

.stage {
  position: absolute;
  inset: 0 200px 0 180px;
  overflow: hidden;
}

.stage canvas {
  display: block;
}

.fallback {
  padding: 30px;
  color: var(--accent);
}

/* 06   Wellenlabor */

.controls {
  position: relative;
  z-index: 1;
  background: var(--panel);
  width: 260px;
  max-width: 100%;
  min-width: 0;
  flex-shrink: 0;
  padding: 23px 23px 20px;
  border-left: 1px solid var(--line);
}

.panel-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 30px;
}

h2 {
  font-size: 14px;
  font-weight: 500;
  margin: 0;
}

.index {
  color: var(--muted);
  font-size: 9px;
  letter-spacing: 0;
}

label {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  margin-top: 22px;
}

output {
  font-family: monospace;
  color: var(--muted);
  font-size: 11px;
}

input[type='range'] {
  width: 100%;
  accent-color: var(--accent);
  height: 24px;
  margin: 7px 0 0;
  cursor: pointer;
}

.panel-actions {
  display: flex;
  gap: 7px;
  margin-top: 25px;
}

.panel-actions button {
  font-size: 11px;
  flex: 1;
  padding: 10px 7px;
}

.panel-note {
  font-size: 10px;
  line-height: 1.7;
  color: var(--muted);
  margin: 17px 0 0;
}

/* 07   Technische Randnotizen */

.annotation {
  position: absolute;
  bottom: 30px;
  left: 0;
  right: 260px;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 9px;
  letter-spacing: 1px;
}

.signal {
  width: 5px;
  height: 5px;
  background: var(--accent);
  border-radius: 50%;
}

.specimen {
  margin-left: auto;
}

/* 08   Technische Fußzeile */

.phase-footer {
  min-height: 62px;
  border-top: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  color: var(--muted);
  font-size: 9px;
  letter-spacing: 1px;
}

/* 09   Responsive Anpassungen */

@media (min-width: 1500px) {
  .stage {
    left: 260px;
    right: 240px;
  }
}

@media (max-width: 900px) {
  .phase {
    padding: 0 24px;
  }

  .intro {
    width: 38%;
  }

  h1 {
    font-size: 34px;
  }

  .stage {
    left: 70px;
    right: 140px;
  }

  .controls {
    width: 221px;
    padding-inline: 16px;
  }

  .annotation {
    right: 225px;
  }

  .edition {
    display: none;
  }
}

@media (max-width: 620px) {
  .phase {
    padding: 0 20px;
  }

  .phase-header {
    height: 75px;
  }

  .exhibit {
    height: auto;
    max-height: none;
    min-height: 0;
    display: grid;
    grid-template-columns: 1fr;
  }

  .intro {
    width: 100%;
    margin-top: 30px;
  }

  .eyebrow {
    margin: 0 0 14px;
  }

  h1 {
    font-size: 31px;
    letter-spacing: -1px;
  }

  .description {
    max-width: 280px;
    font-size: 12px;
    margin: 15px 0 0;
  }

  .stage {
    position: relative;
    inset: auto;
    width: 100%;
    height: 440px;
    margin-top: -15px;
  }

  .controls {
    width: 100%;
    padding: 22px;
    border: 1px solid var(--line);
    margin-bottom: 26px;
  }

  .panel-heading {
    margin-bottom: 15px;
  }

  label {
    margin-top: 15px;
  }

  .annotation {
    position: relative;
    bottom: auto;
    right: auto;
    margin: -10px 0 6px;
    font-size: 8px;
  }

  .specimen {
    display: none;
  }

  .phase-footer {
    padding: 18px 0;
    flex-wrap: wrap;
    gap: 12px;
    font-size: 8px;
  }

  .phase-footer span:nth-child(2) {
    display: none;
  }
}

/* 10   Probenarchiv */

.archive {
  margin-top: 29px;
  max-width: 245px;
  pointer-events: auto;
}

.archive-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.archive-heading h2 {
  font-size: 10px;
  font-weight: 400;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--muted);
}

.archive-heading>span {
  font: 9px monospace;
  color: var(--muted);
}

.specimen-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 3px;
}

.specimen-list button {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 46px;
  border-color: transparent;
  text-align: left;
  padding: 6px 10px;
  color: var(--muted);
}

.specimen-list button:hover {
  border-color: var(--line);
  color: var(--text);
}

.specimen-list button[aria-pressed='true'] {
  border-color: var(--line);
  background: var(--panel);
  color: var(--text);
}

.specimen-list button[aria-pressed='true'] .specimen-number {
  color: var(--accent);
}

.specimen-number {
  font: 9px monospace;
}

.specimen-list svg {
  width: 24px;
  height: 31px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1;
  flex-shrink: 0;
}

.specimen-label {
  font-size: 12px;
}

.specimen-info {
  max-width: 245px;
  border-top: 1px solid var(--line);
  padding-top: 15px;
  margin-top: 18px;
}

.specimen-info h2 {
  font-size: 12px;
}

.specimen-info p {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.7;
  margin: 8px 0 0;
  min-height: 38px;
}

.intro {
  margin-top: 47px;
}

.eyebrow {
  margin-bottom: 20px;
}

.intro h1 {
  font-size: clamp(28px, 3.1vw, 48px);
}

.intro .description {
  margin-top: 19px;
}

.exhibit {
  min-height: 720px;
}

@media (max-width: 900px) and (min-width: 621px) {
  .intro {
    width: 33%;
  }

  .intro h1 {
    font-size: 29px;
  }

  .stage {
    left: 150px;
    right: 150px;
  }

  .archive {
    max-width: 220px;
  }

  .specimen-list button {
    gap: 7px;
    padding-left: 5px;
  }

  .specimen-label {
    font-size: 11px;
  }
}

@media (max-width: 620px) {
  .intro {
    width: 100%;
    margin-top: 30px;
  }

  .intro h1 {
    font-size: 31px;
  }

  .archive {
    max-width: none;
    margin-top: 23px;
  }

  .specimen-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
  }

  .specimen-list button {
    border-color: var(--line);
    gap: 8px;
    padding: 8px;
    min-height: 52px;
  }

  .specimen-label {
    font-size: 11px;
  }

  .specimen-list svg {
    width: 21px;
  }

  .specimen-info {
    max-width: none;
    margin-top: 16px;
  }

  .specimen-info p {
    min-height: 0;
  }

  .stage {
    height: 440px;
    margin-top: 0;
  }

  .exhibit {
    min-height: 0;
  }

  .annotation {
    margin-top: 0;
  }
}

/* 11   Ergänzende Archivzustände */

.specimen-label {
  min-width: 0;
  hyphens: auto;
  overflow-wrap: anywhere;
}

.specimen-list {
  max-height: 242px;
  overflow-y: auto;
  overscroll-behavior-y: contain;
  scrollbar-width: thin;
  scrollbar-color: var(--muted) transparent;
  padding: 4px;
}

.specimen-list button:focus-visible {
  outline-offset: 0;
}

.specimen-list li {
  min-width: 0;
}

@media (max-width: 620px) {
  .specimen-list {
    max-height: none;
    overflow: visible;
    padding: 2px;
  }
}

/* 12   Footer und Disclaimer */

.study-footer {
  padding-bottom: 25px;
}

.footer-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  padding: 20px 0;
}

.footer-content h2 {
  font-size: 30px;
  font-weight: 800;
  letter-spacing: -2px;
}

.footer-content h2 span {
  color: var(--accent);
}

.footer-content p {
  font-size: 12px;
  color: var(--muted);
}

.footer-content nav {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
}

.study-footer a {
  color: var(--text);
  font-size: 11px;
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
}

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

.footer-disclaimer {
  max-width: 760px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.8;
  margin: 5px 0 20px;
}

.footer-colophon {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  color: var(--muted);
  font: 9px monospace;
  letter-spacing: 1px;
}

.footer-colophon a {
  font: inherit;
  color: inherit;
}

@media (max-width: 620px) {
  .footer-content {
    align-items: flex-start;
    flex-direction: column;
  }

  .footer-content nav {
    gap: 15px;
  }

  .footer-colophon {
    flex-direction: column;
    gap: 10px;
  }
}