/* =====================================================================
   sheet.css — Das Konzeptblatt im Hero: eine Blaupause, die aus einer Rolle
   am linken Bildrand ausgerollt wird (schmale Schirme: von oben) und beim
   Scrollen wieder einrollt. camera.js setzt --u (0 = eingerollt, 1 = offen).
   Das Blatt selbst nutzt den Blaupausen-Look aus poster.css (.bp).
   ===================================================================== */

.sheet {
  --u: 1;                                 /* offen, bis camera.js übernimmt: so ist das Blatt beim Laden schon gerastert */
  --roll: 5.2vh;                          /* Durchmesser der Rolle */
  --sw: min(46vw, 760px);
  --sh: 92vh;
  position: absolute;
  left: 0; top: 0;                        /* bis zum oberen Bildrand */
  width: var(--sw);
  height: var(--sh);
  pointer-events: none;
  /* eingerollt: die Rolle verschwindet ganz im Bildrand */
  transform: translate3d(calc((1 - var(--u)) * -1.6 * var(--roll)), 0, 0);
  will-change: transform;
}
/* Der Beschnitt bewegt sich, das Papier darunter nicht: es bleibt eine einmal
   gerasterte Ebene (will-change), der Rahmen schneidet sie im Compositor zu.
   Ein animierter clip-path auf dem Papier selbst würde es jedes Frame neu
   rastern — das flackerte auf Laptop-Grafik. */
.sheet-clip {
  position: absolute;
  left: 0; top: 0; bottom: 0;
  right: calc((1 - var(--u)) * 100%);
  overflow: hidden;
}
.sheet-paper {
  position: absolute; left: 0; top: 0;
  width: var(--sw); height: var(--sh);
  will-change: transform;
  transform: translateZ(0);
  box-shadow: 0 2vh 6vh rgba(0, 0, 0, .55);
  font-size: 1.5vh;
  color: #dbe7f7;
  font-family: var(--wf-mono);
}
.sheet-bp {
  position: absolute; inset: 0; overflow: hidden;
  display: flex; flex-direction: column; gap: 1.6vh;
  padding: 3.4vh 3.6vh;
  box-sizing: border-box;
}
/* Schatten der Rolle auf dem Blatt (Wölbung kurz vor der Kante) */
.sheet-shade {
  position: absolute;
  top: 0; bottom: 0;
  left: calc(var(--u) * 100% - 7vh);
  z-index: 1;
  width: 7vh;
  background: linear-gradient(90deg, rgba(0,0,0,0) 0%, rgba(0,0,0,.18) 60%, rgba(0,0,0,.45) 100%);
  pointer-events: none;
}
/* Die Rolle: senkrechter Zylinder, dünner je weiter das Blatt abgerollt ist */
.sheet-roll {
  position: absolute;
  top: -.6vh; bottom: -.6vh;
  left: calc(var(--u) * 100%);
  width: calc(var(--roll) - var(--u) * 1.6vh);
  transform: translateX(-50%);
  border-radius: 999px;
  background:
    linear-gradient(90deg,
      #0b1f42 0%, #1d4a8c 16%, #4d84c6 34%, #7aa8de 42%, #3f74b8 56%, #163b74 78%, #0a1a38 100%);
  box-shadow:
    inset 0 0 0 1px rgba(255,255,255,.08),
    .6vh 1.2vh 2.4vh rgba(0, 0, 0, .55);
}
/* Stirnseiten: die Spirale des aufgerollten Papiers */
.sheet-roll::before, .sheet-roll::after {
  content: "";
  position: absolute;
  left: 0; right: 0;
  height: 1.7vh;
  border-radius: 50%;
  background:
    repeating-radial-gradient(ellipse at 50% 50%, #9dbbe4 0 .45px, #1d4a8c .45px 3.2px);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.18);
}
.sheet-roll::before { top: -.55vh; }
.sheet-roll::after  { bottom: -.55vh; }

/* ---- Inhalt des Blatts ------------------------------------------------ */
.sheet-bp .bp-frame { inset: 1.6vh; }
.sh-head {
  display: flex; justify-content: space-between; align-items: flex-end; gap: 2vh;
  border-bottom: 1px solid rgba(220,235,255,.7);
  padding-bottom: 1vh;
}
.sh-eyebrow {
  margin: 0 0 .9vh;
  font: 400 1.2vh/1 var(--wf-mono);
  letter-spacing: .3em;
  text-transform: uppercase;
  color: rgba(220,235,255,.85);
}
.sh-title {
  margin: 0;
  font: 700 3.5vh/1.08 var(--wf-display);
  letter-spacing: .01em;
  color: #eef4ff;
}
/* Marke als Zeichnung in Linienblau, rechts im Kopf, darunter die Metadaten */
.sh-corner { display: flex; flex-direction: column; align-items: flex-end; gap: 1vh; }
.sh-mark { display: block; pointer-events: auto; padding: .6vh .9vh; border: 1px solid rgba(220,235,255,.55); border-radius: 1.2vh; }
.sh-mark:hover { border-color: #ffb27a; }
.sh-mark .wf-mark { width: 8.4vh; height: 4.2vh; background: #eef4ff; }
.sh-mark:hover .wf-mark { background: #ffb27a; }
.sh-meta { text-align: right; font-size: 1.2vh; line-height: 1.6; letter-spacing: .12em; color: rgba(220,235,255,.85); white-space: nowrap; }

.sh-lead {
  margin: 0;
  font-size: 1.36vh; line-height: 1.5;
  color: rgba(220,235,255,.88);
}

.sh-figs {
  margin-top: .8vh;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2.4vh;
}
.sh-fig { margin: 0; }
.sh-fig h2, .sh-bom h2 {
  margin: 0 0 .9vh;
  font: 400 1.25vh/1 var(--wf-mono);
  letter-spacing: .28em;
  color: rgba(220,235,255,.9);
  border-bottom: 1px dashed rgba(220,235,255,.5);
  padding-bottom: .6vh;
}
.sh-fig svg { display: block; width: 100%; height: auto; overflow: visible; }
.sh-fig figcaption { margin-top: .8vh; font-size: 1.18vh; line-height: 1.5; color: rgba(220,235,255,.75); }

/* Zeichenstile in den Skizzen */
.sheet svg text { font-family: "JetBrains Mono", "Lucida Console", monospace; fill: #e6effc; }
.sheet svg .ln { fill: none; stroke: #dbe7f7; stroke-width: 1.2; vector-effect: non-scaling-stroke; }
.sheet svg .ln.thick { stroke-width: 3; }
.sheet svg .dim { fill: none; stroke: rgba(220,235,255,.75); stroke-width: 1; stroke-dasharray: 4 3; vector-effect: non-scaling-stroke; }
.sheet svg .fill { fill: rgba(220,235,255,.14); stroke: #dbe7f7; stroke-width: 1.1; vector-effect: non-scaling-stroke; }
.sheet svg rect:not([class]) { fill: rgba(220,235,255,.55); }

/* FIG. 1: Bahn zeichnet sich, Kegel pulsieren, Kamera fährt (SMIL) */
.fig-cam .draw { stroke-dasharray: 100; stroke-dashoffset: 100; animation: sh-draw 2.4s ease-out 1s forwards; }
@keyframes sh-draw { to { stroke-dashoffset: 0; } }
.fig-cam .cone path { fill: none; stroke: rgba(255,178,122,.55); stroke-width: .8; stroke-dasharray: 2 2; opacity: .35; }
.fig-cam .cone path:nth-child(1) { animation: sh-cone 9s linear infinite; }
.fig-cam .cone path:nth-child(2) { animation: sh-cone 9s linear 3.9s infinite; }
.fig-cam .cone path:nth-child(3) { animation: sh-cone 9s linear 8.1s infinite; }
@keyframes sh-cone { 0%, 4% { opacity: 1; } 14%, 100% { opacity: .3; } }
.fig-cam .station circle { fill: #1d4a8c; stroke: #eef4ff; stroke-width: 1; }
.fig-cam .cam-body { fill: #ffb27a; stroke: #2a1a0c; stroke-width: .7; }

/* FIG. 2: Bildfolge im Schirm, 9 s Schleife: POST → Start → Desktop → Fenster → Klick */
.fig-sim .s-bios rect { opacity: 0; animation: sh-bios 9s steps(1, end) infinite; }
.fig-sim .s-bios rect:nth-child(2) { animation-delay: .25s; }
.fig-sim .s-bios rect:nth-child(3) { animation-delay: .5s; }
.fig-sim .s-bios rect:nth-child(4) { animation-delay: .75s; }
.fig-sim .s-bios rect:nth-child(5) { animation-delay: 1s; }
@keyframes sh-bios { 0% { opacity: 0; } 2% { opacity: 1; } 22% { opacity: 1; } 23%, 100% { opacity: 0; } }
.fig-sim .s-boot { opacity: 0; animation: sh-boot 9s steps(1, end) infinite; }
@keyframes sh-boot { 0%, 24% { opacity: 0; } 25%, 44% { opacity: 1; } 45%, 100% { opacity: 0; } }
.fig-sim .s-bar { fill: #ffb27a; transform-origin: 141px 0; transform: scaleX(0); animation: sh-bar 9s linear infinite; }
@keyframes sh-bar { 0%, 25% { transform: scaleX(0); } 44% { transform: scaleX(1); } 45%, 100% { transform: scaleX(0); } }
.fig-sim .s-desk { opacity: 0; animation: sh-desk 9s steps(1, end) infinite; }
@keyframes sh-desk { 0%, 45% { opacity: 0; } 46%, 98% { opacity: 1; } 99%, 100% { opacity: 0; } }
.fig-sim .s-win { opacity: 0; transform-origin: 186px 92px; transform: scale(.2); animation: sh-win 9s cubic-bezier(.2,.9,.2,1) infinite; }
@keyframes sh-win { 0%, 55% { opacity: 0; transform: scale(.2); } 60%, 98% { opacity: 1; transform: scale(1); } 99%, 100% { opacity: 0; transform: scale(.2); } }
.fig-sim .win-body { fill: rgba(220,235,255,.12); stroke: #dbe7f7; stroke-width: 1; }
.fig-sim .win-bar { fill: rgba(220,235,255,.5); }
.fig-sim .win-el { fill: rgba(220,235,255,.35); }
.fig-sim .win-btn { fill: rgba(255,178,122,.35); stroke: #ffb27a; stroke-width: .8; animation: sh-btn 9s steps(1, end) infinite; }
@keyframes sh-btn { 0%, 84% { fill: rgba(255,178,122,.35); } 85%, 90% { fill: rgba(255,178,122,.9); } 91%, 100% { fill: rgba(255,178,122,.35); } }
.fig-sim .s-cursor { fill: #eef4ff; stroke: #0f2c5c; stroke-width: .8; opacity: 0; animation: sh-cursor 9s ease-in-out infinite; }
@keyframes sh-cursor {
  0%, 46%  { opacity: 0; transform: translate(270px, 140px); }
  50%      { opacity: 1; transform: translate(270px, 140px); }
  62%      { transform: translate(220px, 120px); }
  84%      { transform: translate(128px, 116px); }
  86%      { transform: translate(128px, 116px) scale(.85); }
  88%, 98% { opacity: 1; transform: translate(128px, 116px); }
  99%, 100% { opacity: 0; }
}

/* Fußzeile: Stückliste, Titelblock, Scroll-Aufforderung */
.sh-foot {
  margin-top: auto;
  display: grid;
  grid-template-columns: 1fr 1.15fr;
  gap: 2.4vh;
  align-items: end;
}
.sh-bom dl { margin: 0; display: grid; grid-template-columns: auto 1fr; gap: .35vh 1.6vh; font-size: 1.22vh; line-height: 1.35; }
.sh-bom dt { color: rgba(220,235,255,.7); letter-spacing: .08em; }
.sh-bom dd { margin: 0; text-align: right; color: #eef4ff; }
.sh-block {
  border: 1px solid rgba(220,235,255,.8);
  display: grid; grid-template-columns: 1fr 1fr;
  font-size: 1.15vh; line-height: 1.45;
}
.sh-block div { padding: .5vh .9vh; border-bottom: 1px solid rgba(220,235,255,.45); border-right: 1px solid rgba(220,235,255,.45); }
.sh-block div:nth-child(2n+1) { border-right: 0; }
.sh-block div:nth-last-child(-n+2) { border-bottom: 0; }
.sh-block b { display: block; font-weight: 400; letter-spacing: .2em; font-size: 1vh; color: rgba(220,235,255,.65); }
.sh-block .wide { grid-column: 1 / -1; font: 700 1.55vh/1.25 var(--wf-display); letter-spacing: .06em; padding: .8vh .9vh; border-right: 0; }
.sh-cta {
  grid-column: 1 / -1;
  justify-self: start;
  pointer-events: auto;
  border-color: rgba(220,235,255,.5);
  background: rgba(220,235,255,.06);
  color: #eef4ff;
}
.sh-cta:hover { border-color: #ffb27a; background: rgba(255,178,122,.12); }
.sh-cta .cta-wheel { border-color: rgba(220,235,255,.7); }

/* ---- Schmale Schirme: Blatt fast bildfüllend, Rolle oben, rollt nach oben ein --- */
@media (max-width: 900px) {
  .sheet {
    --roll: 4.6vh;
    --sw: 94vw;
    --sh: 90vh;
    left: 3vw; top: 0;
    transform: translate3d(0, calc((1 - var(--u)) * -1.6 * var(--roll)), 0);
  }
  .sheet-clip { right: 0; bottom: calc((1 - var(--u)) * 100%); }
  .sheet-paper { font-size: 1.35vh; }
  .sheet-shade {
    left: 0; right: 0; width: auto;
    top: calc(var(--u) * 100% - 6vh); bottom: auto; height: 6vh;
    background: linear-gradient(180deg, rgba(0,0,0,0) 0%, rgba(0,0,0,.18) 60%, rgba(0,0,0,.45) 100%);
  }
  .sheet-roll {
    left: -.6vh; right: -.6vh; width: auto;
    top: calc(var(--u) * 100%); bottom: auto;
    height: calc(var(--roll) - var(--u) * 1.4vh);
    transform: translateY(-50%);
    background:
      linear-gradient(180deg,
        #0b1f42 0%, #1d4a8c 16%, #4d84c6 34%, #7aa8de 42%, #3f74b8 56%, #163b74 78%, #0a1a38 100%);
    box-shadow: inset 0 0 0 1px rgba(255,255,255,.08), .6vh 1.2vh 2.4vh rgba(0, 0, 0, .55);
  }
  .sheet-roll::before, .sheet-roll::after { top: 0; bottom: 0; left: auto; right: auto; width: 1.7vh; height: auto; }
  .sheet-roll::before { left: -.55vh; }
  .sheet-roll::after  { right: -.55vh; }

  .sheet-bp { padding: 4.2vh 2.6vh 2.8vh; gap: 1.3vh; }
  .sh-head { align-items: flex-start; flex-direction: column; gap: .8vh; }
  .sh-eyebrow { font-size: 1.05vh; letter-spacing: .18em; }
  .sh-title { font-size: 2.9vh; }
  .sh-corner { flex-direction: row; align-items: center; gap: 1.6vh; }
  .sh-mark .wf-mark { width: 6.4vh; height: 3.2vh; }
  .sh-meta { text-align: left; font-size: 1.05vh; line-height: 1.5; }
  .sh-lead { font-size: 1.15vh; line-height: 1.45; }
  .sh-figs { grid-template-columns: 1fr; gap: 1.4vh; }
  .sh-fig svg { width: 60%; margin: 0 auto; }
  .sh-fig figcaption { display: none; }
  .sh-foot { grid-template-columns: 1fr; gap: 1.2vh; }
  .sh-bom { display: none; }
  .sh-block { font-size: 1.05vh; }
  .sh-cta { justify-self: stretch; justify-content: center; }
}

@media (prefers-reduced-motion: reduce) {
  .sheet svg * { animation: none !important; }
  .fig-cam .draw { stroke-dashoffset: 0; }
}
