/* =========================================================
   osche – Landing Page
   Schwarz/weiß, Bleistift-Optik, ohne Abhängigkeiten
   ========================================================= */

:root {
  --paper: #faf9f6;
  --ink: #141414;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  overflow: hidden;
  cursor: crosshair;
}

/* ---------------------------- Papier ---------------------------- */

#trail {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  pointer-events: none;
}

.grain {
  position: fixed;
  inset: 0;
  z-index: 3;
  pointer-events: none;
  opacity: 0.14;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='260' height='260'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='260' height='260' filter='url(%23n)'/%3E%3C/svg%3E");
}

.vignette {
  position: fixed;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background: radial-gradient(circle at 50% 45%, transparent 45%, rgba(20, 20, 20, 0.09) 100%);
}

/* Nur Träger der Filterdefinitionen */
.filters {
  position: absolute;
  width: 0;
  height: 0;
}

/* ---------------------------- Bühne ---------------------------- */

.stage {
  position: relative;
  z-index: 5;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  pointer-events: none;
}

#mark {
  width: min(62vw, 620px);
  height: auto;
  overflow: visible;
  pointer-events: auto;
}

/* Alle handgezeichneten Linien */

.ink {
  fill: none;
  stroke: var(--ink);
  stroke-width: 7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* Unterstreichung: liegt bereit und wird beim Überfahren gezogen */

.underline .ink {
  stroke-width: 5;
  opacity: 0.75;
}

/* Schraffur hinter dem Schriftzug */

.hatch line {
  stroke: var(--ink);
  stroke-width: 2.4;
  stroke-linecap: round;
  opacity: 0.16;
}

.hint {
  margin: 1.6rem 0 0;
  font-size: 0.78rem;
  letter-spacing: 0.34em;
  text-transform: uppercase;
  color: rgba(20, 20, 20, 0.4);
  transition: opacity 0.6s;
}

.hint.is-gone {
  opacity: 0;
}

/* ---------------------------- Stadtansichten ---------------------------- */

.piece {
  position: fixed;
  z-index: 4;
  margin: 0;
  pointer-events: none;
  transition: transform 0.45s cubic-bezier(0.2, 0.7, 0.3, 1);
}

.piece svg {
  display: block;
  width: 100%;
  height: auto;
  overflow: visible;
}

.piece path {
  fill: none;
  stroke: var(--ink);
  stroke-width: 3.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* Vorzeichnung: immer da, aber blass */
.piece .art {
  opacity: 0.16;
}

/* Reinzeichnung: wird beim Annähern gezogen */
.piece .inked {
  opacity: 0.92;
}

.piece figcaption {
  margin-top: 0.7rem;
  text-align: center;
  font-size: 0.63rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  white-space: nowrap;
  color: rgba(20, 20, 20, 0.55);
  opacity: 0;
  transform: translateY(4px);
  transition: opacity 0.4s ease, transform 0.4s ease;
}

.piece.is-inked {
  transform: scale(1.03);
}

.piece.is-inked figcaption {
  opacity: 1;
  transform: none;
}

.piece--tv {
  width: 108px;
  top: 13%;
  left: 7%;
}

.piece--tor {
  width: 196px;
  bottom: 13%;
  left: 8%;
}

.piece--liesel {
  width: 104px;
  top: 13%;
  right: 8%;
}

.piece--jacobi {
  width: 92px;
  bottom: 13%;
  right: 11%;
}

/* Auf schmalen Viewports würde die zweiteilige Bildunterschrift über den
   Rand laufen – dort bleibt nur der Name des Bauwerks stehen. */
@media (max-width: 1000px) {
  .piece .city,
  .piece .sep {
    display: none;
  }
}

/* ---------------------------- Randnotizen ---------------------------- */

.accent {
  position: fixed;
  z-index: 4;
  opacity: 0.45;
  overflow: visible;
  pointer-events: none;
}

.accent .ink {
  stroke-width: 3.4;
}

.accent--spiral {
  width: 56px;
  top: 11%;
  left: 40%;
}

.accent--wave {
  width: 92px;
  bottom: 19%;
  right: 38%;
}

/* ---------------------------- Fokus & Responsive ---------------------------- */

:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 6px;
}

@media (max-width: 1100px) {
  #mark {
    width: min(72vw, 520px);
  }

  .piece--tv {
    width: 84px;
    left: 5%;
  }

  .piece--tor {
    width: 150px;
    left: 5%;
  }

  .piece--liesel {
    width: 82px;
    right: 5%;
  }

  .piece--jacobi {
    width: 72px;
    right: 6%;
  }
}

@media (max-width: 720px) {
  #mark {
    width: 78vw;
  }

  .piece {
    transition: none;
  }

  .piece--tv {
    width: 58px;
    top: 8%;
    left: 7%;
  }

  .piece--tor {
    width: 108px;
    bottom: 9%;
    left: 6%;
  }

  .piece--liesel {
    width: 56px;
    top: 8%;
    right: 7%;
  }

  .piece--jacobi {
    width: 50px;
    bottom: 9%;
    right: 8%;
  }

  .piece figcaption {
    font-size: 0.52rem;
    letter-spacing: 0.14em;
    margin-top: 0.45rem;
  }

  .accent--spiral {
    width: 36px;
    top: 6%;
    left: 44%;
  }

  .accent--wave {
    width: 58px;
    bottom: 24%;
    right: 30%;
  }
}

@media (max-height: 560px) {
  .hint {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .hint,
  .piece,
  .piece figcaption {
    transition: none;
  }
}
