/* Writeograph – Webseite
   Schwarz auf Weiß wie die App: Schreibmaschinenschrift, feine Linien, Kopfzeile als schwarzer Balken
   mit weißen Titeln. Der gewählte Reiter wird weiß und geht in die Seite darunter über.
   Am Computer stehen alle Reiter nebeneinander, auf dem Handy rollt die Reiterleiste seitlich. */

:root {
  --ink: #000;
  --soft: #5f5f5f;
  --pale-gray: #f1f1f1;
  --pink: #d6337f;
  --pale-pink: #f8d3e3;
  --font: "Courier New", Courier, "Nimbus Mono PS", monospace;
  --bar: 46px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: #fff;
  color: var(--ink);
  font-family: var(--font);
  line-height: 1.5;
  -webkit-text-size-adjust: 100%;
}
a { color: inherit; }
b { font-weight: 700; }
img, video { max-width: 100%; }

/* Sprache: beide Fassungen stehen im Text, sichtbar ist nur eine. */
html[lang="de"] [lang="en"], html[lang="en"] [lang="de"] { display: none !important; }

.pink { color: var(--pink); font-weight: 700; }

/* ---------- Kopfzeile ---------- */
.deck {
  display: grid;
  /* über | Struktur | Szenen | Varianten | Timeline | Bühne/Text | Fundus | legal – ungefähr wie die Spalten der App */
  grid-template-columns: var(--bar) 1fr 1fr 1.1fr 1.1fr 1.7fr 2.4fr 1.4fr 1fr var(--bar);
  position: sticky;
  top: 0;
  z-index: 10;
  background: #000;
  border-bottom: 1px solid #000;
}
.logo {
  display: flex;
  align-items: center;
  justify-content: center;
  width: var(--bar);
  height: var(--bar);
  background: #000;
  color: #fff;
  text-decoration: none;
  border-right: 1px solid #fff;
}
/* Logo wie in der App: großes W, darüber „gr“, darunter „r“ */
.mark {
  position: relative;
  display: block;
  width: 30px;
  height: 30px;
  font-family: var(--font);
  font-weight: 700;
  color: #fff;
}
.mark .w { position: absolute; left: 1px; top: -1px; font-size: 26px; line-height: 30px; }
.mark .gr { position: absolute; left: 18px; top: 1px; font-size: 9px; line-height: 10px; }
.mark .r { position: absolute; left: 19px; top: 12px; font-size: 12px; line-height: 12px; }

.tab {
  display: flex;
  align-items: center;
  height: var(--bar);
  padding: 0 18px;
  color: #fff;
  background: #000;
  font-weight: 700;
  font-size: 15px;
  text-decoration: none;
  white-space: nowrap;
  border-right: 1px solid #fff;
}
.tab:hover { background: #222; }
.tab[aria-selected="true"] { background: #fff; color: #000; }
.fill { display: none; }
.lang {
  width: var(--bar);
  height: var(--bar);
  border: 0;
  border-left: 1px solid #fff;
  background: #000;
  color: #fff;
  font: 700 14px var(--font);
  cursor: pointer;
}
.lang:hover { background: #222; }

/* ---------- Seiten ---------- */
.page { display: none; padding: 28px 24px 50px; }
.page.on { display: block; }
#p-legal > * { max-width: 900px; margin-left: auto; margin-right: auto; }

h1 {
  font-size: 24px;
  line-height: 1.15;
  margin: 0 0 12px;
}
.lead { font-size: 14px; margin: 0 0 10px; }
.lead.strong { font-weight: 700; }
.intro { margin-bottom: 40px; }
.intro .lead { margin-left: 0; }

/* Film und Bilder: feine schwarze Linie, leichter Schatten – wie die schwebenden Fenster der App */
.film, .shot img {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid #000;
  background: #fff;
  box-shadow: 0 18px 40px rgba(0, 0, 0, .16);
}
.hero { margin-bottom: 70px; }
.film { background: #000; }

/* ---------- Zeilen: Bild neben Text ---------- */
.row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) clamp(200px, 19vw, 300px);
  gap: 28px;
  align-items: start;
  margin-bottom: 44px;
}
.row.flip { grid-template-columns: clamp(200px, 19vw, 300px) minmax(0, 1fr); }
.row.flip .shot, .row.flip .filmbox { order: 2; }
.shot { margin: 0; }
.shot figcaption { margin-top: 12px; font-size: 14px; color: var(--soft); }
.text { padding-top: 4px; }
.text h2 { font-size: 16px; line-height: 1.25; margin: 0 0 8px; }
.text h1 + .lead, .text h1 + h2 { margin-top: 0; }
.text p { margin: 0 0 10px; font-size: 14px; }
.text ul { margin: 4px 0 0; padding-left: 18px; }
.text li { font-size: 14px; margin-bottom: 6px; }
.text .lead + h2, .text p + h2 { margin-top: 18px; }

/* ---------- Kästen: Kopf als schwarzer Balken wie die Abschnitte im Fundus ---------- */
.block {
  border: 1px solid #000;
  margin: 0 0 24px;
}
.block h2 {
  margin: 0;
  padding: 8px 16px;
  background: #000;
  color: #fff;
  font-size: 14px;
}
.block .body { padding: 12px 14px 8px; }
.block p, .block li { font-size: 14px; margin: 0 0 8px; }
.block ol, .block ul { margin: 0 0 10px; padding-left: 24px; }
.blocks { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0 20px; }
.blocks .block { margin: 0 0 24px; }
.pair { display: grid; grid-template-columns: 1fr 1fr; gap: 0 20px; }
.block.price { border-width: 2px; }
.block.price h2 { background: var(--pink); }

/* ---------- Legal ---------- */
.legalbox { border: 1px solid #000; margin: 0 auto 30px; max-width: 900px; }
.legalbox h2 { margin: 0; padding: 8px 16px; background: #000; color: #fff; font-size: 18px; }
.legalbox .body { padding: 14px 20px 18px; }
.legalbox h3 { font-size: 17px; margin: 22px 0 6px; }
.legalbox p { margin: 6px 0; font-size: 16px; }
.legalbox .stand, .legalbox .note { color: var(--soft); font-size: 14px; }

/* ---------- Fuß ---------- */
.foot { text-align: center; padding: 34px 22px 40px; border-top: 1px solid #000; }
.store {
  display: inline-block;
  margin: 4px 0;
  padding: 9px 20px;
  background: #000;
  color: #fff;
  font: 700 15px var(--font);
  text-decoration: none;
  border: 1px solid #000;
}
.store:hover { background: #fff; color: #000; }
.store.off { background: #fff; color: var(--soft); border-color: var(--soft); pointer-events: none; }
.small { margin: 18px 0 0; font-size: 14px; color: var(--soft); }

/* ---------- Handy ---------- */
/* schmale Fenster und Handy hochkant: Text unter das Bild */
@media (max-width: 640px) {
  .row, .row.flip { grid-template-columns: 1fr; gap: 14px; margin-bottom: 36px; }
  .row.flip .shot, .row.flip .filmbox { order: 0; }
  .blocks, .pair { grid-template-columns: 1fr; }
}

@media (max-width: 860px) {
  .deck {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    scrollbar-width: none;
  }
  .deck::-webkit-scrollbar { display: none; }
  .logo, .lang { flex: 0 0 var(--bar); }
  .fill { display: none; }
  .lang { position: sticky; right: 0; }
  .tab { padding: 0 14px; font-size: 14px; }
  .page { padding: 30px 16px 46px; }
  .blocks, .pair { grid-template-columns: 1fr 1fr; }
}

/* ---------- Smartphone: Reiter in zwei Zeilen, alles untereinander, erst Text, dann Bild ---------- */
@media (max-width: 640px) {
  .deck {
    display: grid;
    grid-template-columns: 40px repeat(4, minmax(0, 1fr)) 40px;
    overflow: visible;
  }
  .logo { grid-column: 1; grid-row: 1 / span 2; width: 40px; height: 81px; border-right: 1px solid #fff; }
  .lang { grid-column: 6; grid-row: 1 / span 2; width: 40px; height: 81px; position: static; }
  .tab {
    height: 40px;
    padding: 0 4px;
    justify-content: center;
    font-size: 12px;
    border-bottom: 1px solid #fff;
  }
  .page { padding: 20px 14px 36px; }
  .row, .row.flip { grid-template-columns: 1fr; gap: 12px; margin-bottom: 34px; }
  .row .text { order: -1; }
  .row .shot, .row.flip .shot, .row .filmbox, .row.flip .filmbox { order: 0; }
  .blocks, .pair { grid-template-columns: 1fr; }
  h1 { font-size: 22px; }
}
