/*
 * Das Tape: one column on the brand ground. Every colour and type stack is a
 * brand token from /assets/brand.css (projected from web-kit); this file only
 * lays them out. The film itself stays dark in both themes: it is a picture.
 */

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { background: var(--ground); }
body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font-family: var(--type-body);
  font-size: 16px;
  line-height: 1.6;
  padding-inline: clamp(16px, 4vw, 48px);
  padding-block: 22px 72px;
}
button, input { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--ember); outline-offset: 2px; }

.app { max-width: 1240px; margin: 0 auto; display: grid; gap: 34px; }

/* header lockup */
.bar {
  max-width: 1240px;
  margin: 0 auto 30px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
}
.lockup { display: inline-flex; align-items: flex-end; gap: 8px; color: var(--ink); text-decoration: none; }
.lockup span { font-family: var(--type-display); font-size: 22px; line-height: 1; padding-bottom: 3px; }
tape-mark { display: inline-block; height: 40px; }
tape-mark svg { height: 100%; width: auto; display: block; }
tape-mark .mark-ink { fill: currentColor; }
tape-mark .mark-dot { fill: var(--ember); }
.bar-meta { margin: 0; font-family: var(--type-mono); font-size: 13px; color: var(--ink-2); }
.cut { color: var(--ember-ink); }

/* hero */
.hero { display: grid; gap: 12px; }
.opener { margin: 0; font-family: var(--type-display); font-style: italic; font-size: clamp(20px, 2.4vw, 26px); color: var(--ink-2); }
h1 { font-family: var(--type-display); font-weight: 600; font-size: clamp(44px, 7vw, 76px); line-height: 1; margin: 0; letter-spacing: -0.01em; }
h1 .stop { color: var(--ember); }
.lede { margin: 0; max-width: 60ch; color: var(--ink-2); font-size: 18px; }
.eyebrow { margin: 4px 0 0; font-size: 13px; font-weight: 600; letter-spacing: 0.2em; text-transform: uppercase; color: var(--ink-2); }
h2 { font-family: var(--type-display); font-weight: 600; font-size: clamp(28px, 4vw, 40px); line-height: 1.1; margin: 0 0 12px; }

/* the film */
.player { display: grid; gap: 14px; scroll-margin-top: 16px; }
tape-player { display: grid; gap: 14px; }
.stage-wrap {
  position: relative;
  aspect-ratio: 16 / 9;
  max-width: 100%;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--line-2);
  background: var(--ground-deep);
}
.stage { position: absolute; inset: 0; }
.stage-svg { display: block; width: 100%; height: 100%; }
.stage-wrap:fullscreen { border-radius: 0; border: 0; display: grid; place-items: center; }
.caption {
  position: absolute;
  left: 50%;
  bottom: 2.2%;
  transform: translateX(-50%);
  width: max-content;
  max-width: 86%;
  margin: 0;
  text-align: center;
  font-size: clamp(12px, 1.55vw, 21px);
  line-height: 1.35;
  padding: 0.4em 0.8em;
  border-radius: 8px;
  background: rgb(23 23 23 / 0.82);
  color: oklch(0.95 0.015 85);
  text-wrap: balance;
}
.caption span { opacity: 0.42; transition: opacity 0.12s linear; }
.caption span.said { opacity: 1; }
.poster {
  position: absolute;
  inset: 0;
  border: 0;
  cursor: pointer;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 10px;
  text-align: center;
  background: rgb(23 23 23 / 0.8);
  color: oklch(0.95 0.015 85);
  padding: 16px;
}
.p-eyebrow { font-size: clamp(10px, 1.2vw, 13px); font-weight: 600; letter-spacing: 0.2em; text-transform: uppercase; opacity: 0.7; }
.p-title { font-family: var(--type-display); font-weight: 600; font-size: clamp(32px, 6.4vw, 80px); line-height: 1; }
.p-title i { font-style: normal; color: var(--ember); }
.p-play {
  width: clamp(52px, 7vw, 84px);
  aspect-ratio: 1;
  border-radius: 50%;
  background: var(--ember);
  margin-top: 10px;
  transition: transform 0.15s ease;
  clip-path: circle(50%);
  position: relative;
}
.p-play::after {
  content: "";
  position: absolute;
  inset: 30% 28% 30% 38%;
  background: var(--on-ember);
  clip-path: polygon(0 0, 100% 50%, 0 100%);
}
.poster:hover .p-play { transform: scale(1.06); }
.p-meta { font-size: clamp(11px, 1.3vw, 14px); opacity: 0.7; }

/* transport */
.transport { display: grid; gap: 12px; }
.row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; }
.btn {
  border: 1px solid var(--line-2);
  background: var(--raised);
  border-radius: 999px;
  padding: 7px 16px;
  cursor: pointer;
  font-weight: 500;
  white-space: nowrap;
  text-decoration: none;
  color: var(--ink);
}
.btn:hover { background: var(--lifted); }
.btn.ghost { background: transparent; }
.btn.primary { background: var(--ember); color: var(--on-ember); border-color: var(--ember); font-weight: 700; min-width: 128px; display: inline-flex; align-items: center; gap: 8px; justify-content: center; }
.play-glyph { width: 11px; height: 12px; background: currentColor; clip-path: polygon(0 0, 100% 50%, 0 100%); }
.play[aria-pressed="true"] { box-shadow: inset 0 2px 0 rgb(0 0 0 / 0.25); transform: translateY(1px); }
.play[aria-pressed="true"] .play-glyph { clip-path: polygon(0 0, 35% 0, 35% 100%, 0 100%, 0 0, 65% 0, 100% 0, 100% 100%, 65% 100%, 65% 0); }
.time { font-family: var(--type-mono); font-variant-numeric: tabular-nums; font-size: 14px; color: var(--ink-2); min-width: 13ch; }

/* the cassette as progress bar: supply reel, tape, take-up reel */
.reelbar { flex: 1 1 320px; min-width: 0; display: flex; align-items: center; gap: 8px; }
.reel { width: 34px; height: 34px; flex: none; }
.reel-flange { fill: var(--raised); stroke: var(--line-2); stroke-width: 1.2; }
.reel-pack { fill: color-mix(in oklab, var(--ember) 30%, var(--lifted)); }
.reel-hub { fill: var(--ground); stroke: var(--ink-3); stroke-width: 1.4; }
.reel-spoke { fill: var(--ink-3); }
.scrub { position: relative; flex: 1 1 auto; min-width: 0; height: 30px; display: flex; align-items: center; }
.scrub input { width: 100%; accent-color: var(--ember); margin: 0; position: relative; z-index: 1; background: transparent; }
.marks, .pins { position: absolute; inset: 0; pointer-events: none; }
.mark { position: absolute; top: 6px; bottom: 6px; width: 2px; margin-left: -1px; background: var(--ink-3); border-radius: 1px; }
.pins { z-index: 2; }
.pin {
  position: absolute;
  top: -10px;
  width: 10px;
  height: 12px;
  margin-left: -5px;
  border: 0;
  padding: 0;
  cursor: pointer;
  pointer-events: auto;
  background: var(--ember);
  clip-path: polygon(0 0, 100% 0, 100% 66%, 50% 100%, 0 66%);
}
.pin.is-done { background: var(--ink-3); }
.pin.is-ask { background: var(--space-business); }

.chapters { display: flex; flex-wrap: wrap; gap: 6px; flex: 1 1 560px; min-width: 0; }
.chapters button {
  border: 1px solid var(--line);
  background: transparent;
  border-radius: 8px;
  padding: 6px 12px 6px 8px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--ink-2);
  font-size: 14px;
}
.chapters button:hover { color: var(--ink); background: var(--raised); }
.chapters button[aria-current="true"] { color: var(--ink); background: var(--lifted); border-color: var(--line-2); }
.n { display: inline-grid; place-items: center; min-width: 26px; height: 22px; padding: 0 4px; border-radius: 6px; background: var(--raised); color: var(--ink-2); font-family: var(--type-mono); font-size: 12px; flex: none; }
.chapters button[aria-current="true"] .n { background: var(--ember); color: var(--on-ember); }
.opts { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; font-size: 14px; color: var(--ink-2); }
.opts label { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; }
.opts input[type="checkbox"] { accent-color: var(--ember); }
.status { margin: 0; font-size: 13px; color: var(--ink-2); display: flex; flex-wrap: wrap; gap: 4px 18px; }
kbd { font-family: var(--type-mono); font-size: 12px; border: 1px solid var(--line-2); border-bottom-width: 2px; border-radius: 4px; padding: 0 5px; color: var(--ink); }
.privacy { margin: 0; font-size: 14px; color: var(--ink-2); }
.privacy::before { content: ""; display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--ember); margin-right: 8px; vertical-align: 1px; }

/* the people behind it */
.people { display: grid; gap: 12px; max-width: 70ch; scroll-margin-top: 16px; }
.people p { margin: 0; }
.dedication { font-family: var(--type-display); font-style: italic; font-size: 22px; }
.jcard-words { display: flex; flex-wrap: wrap; gap: 12px 40px; padding: 16px 20px; border: 1px solid var(--line-2); border-radius: 8px; background: var(--raised); }
.jcard-words ul { list-style: none; margin: 4px 0 0; padding: 0; display: grid; gap: 2px; font-family: var(--type-display); font-size: 20px; }
.side { font-family: var(--type-mono); font-size: 12px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-2); }
.question { font-family: var(--type-display); font-size: 24px; }

/* Im Studio */
.studio { display: grid; gap: 8px; }
.studio-lede { margin: 0 0 16px; color: var(--ink-2); max-width: 70ch; }
.scene { display: grid; gap: 4px; margin-bottom: 28px; }
.scene > header { display: flex; align-items: start; gap: 14px; padding: 10px 0 14px; }
.scene > header .n { height: 28px; min-width: 34px; font-size: 13px; margin-top: 3px; }
.scene > header div { flex: 1; min-width: 0; }
.scene h3 { font-family: var(--type-display); font-size: 26px; font-weight: 600; margin: 0; line-height: 1.2; }
.scene header p { margin: 4px 0 0; color: var(--ink-2); max-width: 70ch; }
.range { font-family: var(--type-mono); font-size: 13px; color: var(--ink-2); white-space: nowrap; padding-top: 6px; }
.seg { display: grid; grid-template-columns: 120px minmax(0, 1fr); gap: 18px; padding: 16px 14px; border-top: 1px solid var(--line); transition: background 0.2s; }
.seg.is-live { background: var(--ember-soft); }
.seg-time { display: flex; flex-direction: column; gap: 2px; font-family: var(--type-mono); font-size: 13px; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.sid { color: var(--ember-ink); }
.tc { font-family: var(--type-mono); font-variant-numeric: tabular-nums; border: 0; background: none; color: var(--ember-ink); padding: 0; cursor: pointer; text-align: left; font-size: 16px; }
.tc:hover { text-decoration: underline; }
.tc.small { font-size: 13px; }
.seg-body { min-width: 0; }
.line { font-family: var(--type-display); font-size: 22px; line-height: 1.4; margin: 0 0 6px; max-width: 62ch; }
.concept { margin: 0; color: var(--ink-2); }
.delivery { margin: 4px 0 0; color: var(--ink-2); font-size: 14px; font-family: var(--type-display); font-style: italic; }
.cues { list-style: none; padding: 0; margin: 12px 0 0; display: grid; gap: 6px; }
.cues li { display: grid; grid-template-columns: 56px 128px minmax(0, 1fr); gap: 10px; font-size: 14px; align-items: baseline; }
.trig { color: var(--ink-2); font-size: 13px; overflow-wrap: anywhere; }
.pause { margin: 10px 0 0; font-size: 12px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-3); }

@media (max-width: 640px) {
  .seg { grid-template-columns: minmax(0, 1fr); gap: 8px; }
  .seg-time { flex-direction: row; gap: 10px; align-items: baseline; }
  .cues li { grid-template-columns: 52px minmax(0, 1fr); }
  .cues li .trig { display: none; }
  .line { font-size: 19px; }
  .p-eyebrow, .p-meta { display: none; }
  .poster { gap: 4px; }
  .status { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .p-play, .seg, .caption span { transition: none; }
}

/* recording mode (#aufnahme): the stage alone */
html.recording body { padding: 0; overflow: hidden; }
html.recording .bar, html.recording .app > :not(.player), html.recording .transport, html.recording .caption, html.recording .poster, html.recording .privacy { display: none !important; }
html.recording .app { max-width: none; display: grid; place-items: center; height: 100vh; }
html.recording .stage-wrap { width: min(100vw, 177.78vh); border-radius: 0; border: 0; }
