/* belschak.dev v4 — Sektion 03: Open Source · Welle 2.5 Port
   Quelle des Ziel-Looks: claude-design-run/bundle-2026-07-14 (id="s03").
   Tokens: shared/tokens.css · Initial-States für Entrances setzt NUR section.js.
   Lokales Utility (shared ist Owner C): --os-px entspricht Bundle var(--px). */

.os {
  position: relative;
  z-index: 1; /* liegt über dem sticky Footer-Cover (Sektion 08, Integrations-Hinweis) */
  /* --px kommt aus shared/tokens.css (Welle 2.5, Owner C); Fallback = Bundle-Wert */
  padding: clamp(100px, 14vh, 180px) var(--px, clamp(20px, 6vw, 110px)) clamp(120px, 16vh, 210px);
  overflow: hidden;
  /* Sonnenfleck statt flacher Fläche (MASTER: paper nie große flache Fläche) */
  background:
    radial-gradient(120% 90% at 12% 0%, rgba(255, 253, 246, 0.85), transparent 55%),
    radial-gradient(90% 70% at 100% 100%, rgba(237, 228, 210, 0.4), transparent 60%),
    var(--paper);
}

/* ---------- Rail + Kicker (Bundle-Chrome) ---------- */
.os-rail {
  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: var(--ink-soft); /* 6.66:1 auf paper */
}

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

.os-kicker-num {
  /* Bundle: coral. coral auf paper = 3.14:1, bei 12px Pflicht 4.5:1 -> coral-deep (4.67:1) */
  color: var(--coral-deep);
}

/* ---------- H2: zweizeilig, Zeile 2 kursiv-coral eingerückt ---------- */
.os-title {
  margin-top: clamp(20px, 3vh, 36px);
  font-family: var(--font-display);
  font-weight: 440;
  font-variation-settings: 'opsz' 144;
  font-size: clamp(46px, 7.6vw, 128px);
  line-height: 0.98;
  letter-spacing: -0.03em;
}

/* Mask-Container für den Zeilen-Reveal: Endzustand ist voll sichtbar,
   section.js schiebt die Innen-Spans nur bei aktiver Motion aus der Maske */
.os-title-mask {
  display: block;
  overflow: hidden;
  padding-bottom: 0.06em;
  margin-bottom: -0.06em;
}

.os-title-mask-indent {
  margin-left: clamp(34px, 9vw, 190px);
}

.os-title-line {
  display: inline-block;
}

.os-em {
  font-style: italic;
  font-weight: 480;
  color: var(--coral); /* Display-Größe = Large Text, 3.14:1 >= 3:1 */
}

/* ---------- Standfirst: rechtsbündig gesetzt ---------- */
.os-standfirst-row {
  display: flex;
  justify-content: flex-end;
  margin-top: clamp(24px, 4vh, 48px);
}

.os-standfirst {
  max-width: 56ch;
  font-size: clamp(16px, 1.35vw, 19px);
  line-height: 1.6;
  color: var(--ink-soft);
}

/* ---------- Karten-Grid: zweite Karte vertikal versetzt ---------- */
.os-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr));
  gap: clamp(28px, 4vw, 72px);
  margin-top: clamp(50px, 8vh, 110px);
  align-items: start;
}

.os-card-offset {
  margin-top: clamp(0px, 8vw, 120px);
}

/* ---------- Repo-Karte: harter Offset-Schatten, Border via Draw-Spans ---------- */
.os-card {
  position: relative;
  background: var(--paper);
  box-shadow: 10px 10px 0 0 var(--paper-deep);
  scroll-margin-top: 96px; /* für die Related-Anker-Sprünge */
}

/* Die vier Draw-Spans SIND die Karten-Border (statisch voll sichtbar,
   section.js zeichnet sie im Uhrzeigersinn von scale 0) */
.os-draw {
  position: absolute;
  background: var(--ink);
  pointer-events: none;
}

.os-draw-t { top: 0; left: 0; right: 0; height: 1px; }
.os-draw-r { top: 0; right: 0; bottom: 0; width: 1px; }
.os-draw-b { bottom: 0; left: 0; right: 0; height: 1px; }
.os-draw-l { top: 0; left: 0; bottom: 0; width: 1px; }

.os-card-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  padding: 14px clamp(18px, 2.2vw, 26px);
  border-bottom: 1px solid var(--ink);
}

.os-path {
  font-family: var(--font-mono);
  font-size: 13px;
}

.os-path strong {
  font-weight: 700;
}

.os-chip {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  border: 1px solid var(--ink-soft);
  color: var(--ink-soft);
  padding: 4px 10px;
  white-space: nowrap;
}

.os-card-main {
  padding: clamp(22px, 2.6vw, 34px) clamp(18px, 2.2vw, 26px) 0;
}

.os-card-title {
  font-family: var(--font-display);
  font-weight: 500;
  font-variation-settings: 'opsz' 40;
  font-size: clamp(24px, 2.3vw, 36px);
  line-height: 1.12;
  letter-spacing: -0.015em;
}

.os-card-text {
  margin-top: 16px;
  font-size: 16px;
  line-height: 1.65;
  color: var(--ink-soft);
}

/* ---------- Terminal: ink-dunkel, Type-on via section.js ---------- */
.os-term {
  margin: clamp(20px, 2.4vw, 28px) clamp(18px, 2.2vw, 26px) 0;
  background: var(--ink);
  color: var(--bone);
  font-family: var(--font-mono);
  font-size: 12.5px;
  line-height: 1.7;
  padding: 16px 18px;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}

.os-term code {
  font-family: inherit;
}

.os-term-prompt {
  color: var(--coral); /* 5.1:1 auf ink */
}

.os-cursor {
  display: inline-block;
  width: 8px;
  height: 15px;
  background: var(--bone);
  vertical-align: -2px;
  margin-left: 4px;
  animation: os-blink 1.1s step-end infinite;
}

@keyframes os-blink {
  0%, 54% { opacity: 1; }
  55%, 100% { opacity: 0; }
}

.os-verdict {
  display: inline-block;
  transform-origin: 0% 50%;
}

/* ---------- Links: mono, coral-Unterstreichung wie im Bundle ---------- */
.os-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 28px;
  padding: 20px clamp(18px, 2.2vw, 26px) 0;
}

.os-link {
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.04em;
  color: var(--ink);
  text-decoration: underline;
  text-decoration-color: var(--coral);
  text-decoration-thickness: 1.5px;
  text-underline-offset: 4px;
  transition: color 0.2s ease, text-decoration-color 0.2s ease;
}

.os-link:hover {
  color: var(--coral-deep); /* 4.67:1 auf paper */
  text-decoration-color: var(--coral-deep);
}

/* ---------- Related-Fußzeile: dashed Border ---------- */
.os-related {
  margin-top: 20px;
  padding: 12px clamp(18px, 2.2vw, 26px) 16px;
  border-top: 1px dashed rgba(26, 21, 13, 0.35);
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--ink-soft);
}

.os-related-link {
  color: var(--ink); /* 14:1; coral-Text läge bei 12px unter 4.5:1 */
  text-decoration: underline;
  text-decoration-color: var(--coral);
  text-decoration-thickness: 1.5px;
  text-underline-offset: 3px;
  transition: color 0.2s ease, text-decoration-color 0.2s ease;
}

.os-related-link:hover {
  color: var(--coral-deep);
  text-decoration-color: var(--coral-deep);
}

/* ---------- Mobile ---------- */
@media (max-width: 599px) {
  .os-term {
    font-size: 11.5px;
  }
}
