/* belschak.dev v4 — Sektion 05: The Workshop (Nacht-Akt) · Welle 2.5 Port
   Ziel-Look: claude-design-run/bundle-2026-07-14 (s05). Tokens: shared/tokens.css.
   Bundle-Mapping: --lamp→--lamplight · --nightS→--night-soft · --bone→--bone.
   Grund-Architektur: CSS-Default ist eine OPAKE night-Sektion (no-JS/reduced sicher);
   der Motion-Pfad in section.js setzt .ws-js und macht die Sektion transparent,
   dann trägt body --act-bg (scrub paper→night→paper) die Farbe über die Akt-Grenzen.
   KEIN z-index/transform/opacity/filter auf .ws selbst: der Marathon-Frame aus 04
   (z-index 3) muss im Root-Stacking-Context über diese Sektion zeichnen können.
   Alpha-Werte für Text auf Dunkel nie unter .65 (Kontrast 4.5:1); die 35%-Dimmung
   inaktiver Rules ist ein transienter Pin-Zustand (Bundle-MOTION), kein Ruhezustand. */

/* Fallback + reduced-motion: harter Akt-Wechsel via Klasse (gesetzt in section.js) */
body.act-night {
  --act-bg: var(--night);
  --act-ink: var(--bone);
}

.ws {
  position: relative;
  color: var(--bone);
  background: var(--night);
  overflow: hidden;
  /* Horizontal-Gutter: globales --px (Welle-2.5-Konvention aller Ports statt .wrap),
     Fallback lokal, da shared Terminal C gehört. */
  padding: clamp(150px, 20vh, 260px) var(--px, clamp(20px, 6vw, 110px)) clamp(120px, 16vh, 200px);
}

/* Motion-Pfad (Klasse setzt NUR section.js): body --act-bg übernimmt die Farbe */
.ws.ws-js {
  background: transparent;
}

/* ---------- Lamplight-Glow (flackert im Motion-Pfad einmal an) ---------- */
.ws-glow {
  position: absolute;
  inset: 0;
  background: radial-gradient(58% 46% at 74% 8%, rgba(217, 154, 78, 0.17), transparent 68%);
  pointer-events: none;
}

/* ---------- Marginalie: vertikales Sektions-Label ---------- */
.ws-side-label {
  position: absolute;
  top: 50%;
  right: clamp(5px, 1vw, 20px);
  transform: translateY(-50%);
  writing-mode: vertical-rl;
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: rgba(241, 232, 216, 0.72);
  z-index: 1;
}

.ws-inner {
  position: relative;
  z-index: 1;
}

/* ---------- Lead: These links, Plate rechts (randabfallend) ---------- */
.ws-lead {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 440px), 1fr));
  gap: clamp(36px, 5vw, 90px);
  align-items: end;
}

/* Bei 'align-items: end' bündig zur Plate-Unterkante; die Stats-Rail zieht sich per
   negativem margin-top opak darüber (überlappt gewollt die Plate rechts). Diese
   padding-bottom > Rail-Überlappung hält die letzte Standfirst-Zeile links frei,
   auch wenn der Text auf 3 Zeilen umbricht (sonst schluckt der Balken sie). */
.ws-head {
  padding-bottom: clamp(28px, 4vh, 48px);
}

.ws-kicker {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--lamplight);
}

.ws-kicker-dot {
  display: inline-block;
  width: 9px;
  height: 9px;
  background: var(--lamplight);
  margin-right: 12px;
}

.ws-title {
  margin-top: clamp(20px, 3vh, 36px);
  font-weight: 420;
  font-size: clamp(40px, 5.6vw, 96px);
  line-height: 1.02;
  letter-spacing: -0.025em;
  color: var(--bone);
  text-wrap: balance;
}

/* Akzent-Wort im Nacht-Akt: Lamplight statt Coral (MASTER Prinzip 5) */
.ws .t-accent {
  color: var(--lamplight);
}

.ws-standfirst {
  margin-top: clamp(22px, 3.5vh, 40px);
  max-width: 54ch;
  font-size: clamp(16px, 1.35vw, 19px);
  line-height: 1.65;
  color: rgba(241, 232, 216, 0.82);
}

/* Plate: Asset 2 (lamplight-plate), bleedet rechts bis an den Viewport-Rand */
.ws-plate {
  position: relative;
  height: clamp(300px, 44vh, 520px);
  margin: 0 calc(var(--px, clamp(20px, 6vw, 110px)) * -1) 0 0;
  border: 1px solid rgba(241, 232, 216, 0.22);
  border-right: none;
}

.ws-plate-media {
  position: absolute;
  inset: 0;
  overflow: hidden;
  background: var(--night-soft);
}

.ws-plate-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 70% 50%;
  will-change: transform;
}

/* Koordinaten-Overlay (faktisch korrekt, von David sanktioniert) */
.ws-coords {
  position: absolute;
  left: 14px;
  top: 14px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: rgba(241, 232, 216, 0.75);
  pointer-events: none;
}

/* ---------- Stats-Rail (überlappt die Plate-Unterkante) ---------- */
.ws-rail {
  position: relative;
  z-index: 2;
  margin-top: clamp(-40px, -3vh, -20px);
  border-top: 1px solid rgba(241, 232, 216, 0.22);
  border-bottom: 1px solid rgba(241, 232, 216, 0.22);
  background: var(--night);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: clamp(22px, 4vw, 70px);
  padding: clamp(22px, 3vh, 36px) 0;
}

.ws-rail-label {
  flex: 1 1 170px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: rgba(241, 232, 216, 0.72);
}

/* dl bleibt semantisch erhalten und ist selbst eine Flex-Reihe in der Rail */
.ws-stats {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: clamp(22px, 4vw, 70px);
}

.ws-stat {
  display: flex;
  flex-direction: column;
}

.ws-stat-value {
  order: 1;
  font-family: var(--font-display);
  font-weight: 460;
  font-size: clamp(40px, 4.6vw, 76px);
  line-height: 1;
  font-variation-settings: 'opsz' 144;
  color: var(--lamplight);
}

/* Lamplight-Underline (zeichnet sich beim Count-up, section.js) */
.ws-stat-line {
  order: 2;
  width: 44px;
  height: 2px;
  margin-top: 10px;
  background: var(--lamplight);
  transform-origin: 0% 50%;
}

.ws-stat-label {
  order: 3;
  margin-top: 8px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(241, 232, 216, 0.72);
}

.ws-rail-note {
  margin-left: auto;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  color: rgba(241, 232, 216, 0.72);
}

/* ---------- Rules-Ledger: Terminal-Fenster ---------- */
.ws-ledger {
  position: relative;
  z-index: 1;
  margin-top: clamp(50px, 8vh, 100px);
  border: 1px solid rgba(241, 232, 216, 0.24);
  background: var(--night-soft);
}

.ws-ledger-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 11px 18px;
  border-bottom: 1px solid rgba(241, 232, 216, 0.24);
}

.ws-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  border: 1px solid rgba(241, 232, 216, 0.5);
  flex-shrink: 0;
}

.ws-dot-lamp {
  border: none;
  background: var(--lamplight);
}

.ws-ledger-label {
  margin-left: auto;
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: rgba(241, 232, 216, 0.72);
}

/* Rule-Zeilen: Dimmen (35%) + Index-Glow steuert NUR section.js im Pin */
.ws-rule {
  display: flex;
  flex-wrap: wrap;
  gap: 16px clamp(24px, 3vw, 56px);
  padding: clamp(28px, 3.6vw, 48px) clamp(18px, 3vw, 44px);
  border-bottom: 1px solid rgba(241, 232, 216, 0.24);
}

.ws-rule:last-child {
  border-bottom: none;
}

.ws-rule-tag {
  flex: 0 0 210px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--lamplight);
  line-height: 1.7;
}

.ws-rule-cat {
  color: rgba(241, 232, 216, 0.72);
}

.ws-rule-main {
  flex: 1 1 340px;
  min-width: 0;
}

.ws-rule-title {
  font-weight: 460;
  font-size: clamp(24px, 2.8vw, 44px);
  line-height: 1.1;
  letter-spacing: -0.015em;
  color: var(--bone);
  font-variation-settings: 'opsz' 60;
}

.ws-rule-body {
  margin-top: 14px;
  max-width: 60ch;
  font-size: 16px;
  line-height: 1.65;
  color: rgba(241, 232, 216, 0.82);
}

.ws-rule-foot {
  margin-top: 18px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  color: var(--lamplight);
}

/* ---------- Blog-Link ---------- */
.ws-more {
  margin-top: clamp(36px, 5vh, 60px);
  text-align: right;
}

.ws-link {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 14px;
  letter-spacing: 0.06em;
  color: var(--lamplight);
  text-decoration: underline;
  text-decoration-color: var(--lamplight);
  text-decoration-thickness: 1.5px;
  text-underline-offset: 4px;
  transition: color 0.2s ease;
}

.ws-link:hover,
.ws-link:focus-visible {
  color: var(--bone);
}

/* ---------- Mobile ---------- */
@media (max-width: 767px) {
  .ws {
    padding: clamp(120px, 18vh, 180px) var(--px, clamp(20px, 6vw, 110px)) clamp(96px, 14vh, 150px);
  }

  .ws-side-label {
    display: none;
  }

  .ws-plate {
    height: clamp(240px, 38vh, 380px);
  }

  .ws-plate-media img {
    object-position: 74% 50%;
  }

  .ws-rail {
    margin-top: 40px;
    row-gap: 18px;
  }

  .ws-stat-value {
    font-size: 38px;
  }

  .ws-rule-tag {
    flex: 1 1 100%;
  }
}
