/* ---------- Fonts (lokal gehostet, kein Google-Request) ---------- */
@font-face {
  font-family: "Big Shoulders Stencil";
  src: url("../fonts/big-shoulders-stencil-800.woff2") format("woff2");
  font-weight: 800;
  font-display: swap;
}
@font-face {
  font-family: "IBM Plex Mono";
  src: url("../fonts/ibm-plex-mono-400.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "IBM Plex Mono";
  src: url("../fonts/ibm-plex-mono-600.woff2") format("woff2");
  font-weight: 600;
  font-display: swap;
}

/* ---------- Tokens ---------- */
:root {
  --paper: #1d4e8f;          /* Blaupause */
  --paper-deep: #163d73;
  --ink: #ffffff;
  --ink-soft: rgba(255, 255, 255, 0.72);
  --grid-minor: rgba(255, 255, 255, 0.055);
  --grid-major: rgba(255, 255, 255, 0.12);
  --line: rgba(255, 255, 255, 0.85);
  --gutter: clamp(16px, 3vw, 40px);
  --font-display: "Big Shoulders Stencil", "Arial Narrow", Impact, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, "Consolas", monospace;
}

*, *::before, *::after { box-sizing: border-box; }

html, body { margin: 0; height: 100%; }

body {
  background-color: var(--paper);
  background-image:
    radial-gradient(ellipse at 50% 40%, transparent 40%, var(--paper-deep) 120%),
    linear-gradient(var(--grid-major) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-major) 1px, transparent 1px),
    linear-gradient(var(--grid-minor) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-minor) 1px, transparent 1px);
  background-size: 100% 100%, 100px 100px, 100px 100px, 20px 20px, 20px 20px;
  background-position: center, -1px -1px, -1px -1px, -1px -1px, -1px -1px;
  background-attachment: fixed;
  color: var(--ink);
  font-family: var(--font-mono);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* ---------- Blatt & Zeichnungsrahmen ---------- */
.sheet {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  overflow: hidden;
}

.frame {
  position: absolute;
  inset: var(--gutter);
  border: 2px solid var(--line);
  outline: 1px solid var(--ink-soft);
  outline-offset: 5px;
  pointer-events: none;
  z-index: 3;
}

.zones {
  position: absolute;
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  font-size: 10px;
  letter-spacing: 0.1em;
  color: var(--ink-soft);
}
.zones li { flex: 1; display: flex; align-items: center; justify-content: center; }
.zones li + li { border-left: 1px solid var(--ink-soft); }
.zones--x { top: 0; left: 0; right: 0; height: 14px; border-bottom: 1px solid var(--ink-soft); }
.zones--y {
  top: 14px; bottom: 0; left: 0; width: 14px;
  flex-direction: column;
  border-right: 1px solid var(--ink-soft);
}
.zones--y li + li { border-left: 0; border-top: 1px solid var(--ink-soft); }

/* ---------- Bibliothek ---------- */
.building {
  position: absolute;
  right: 0;
  bottom: 0;
  width: min(100%, 118vh);
  height: auto;
  max-height: 100%;
  object-fit: contain;
  object-position: right bottom;
  opacity: 0.9;
  z-index: 1;
  animation: plot 1.8s cubic-bezier(.6, 0, .2, 1) both;
}

@keyframes plot {
  from { clip-path: inset(100% 0 0 0); opacity: 0.4; }
  to   { clip-path: inset(0 0 0 0);    opacity: 0.9; }
}

/* ---------- Titel ---------- */
.hero {
  position: relative;
  z-index: 2;
  padding: calc(var(--gutter) + 48px) calc(var(--gutter) + 40px) 0;
}

.eyebrow {
  margin: 0 0 0.75rem;
  font-size: clamp(11px, 1.1vw, 14px);
  font-weight: 600;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--ink-soft);
}
.eyebrow::before { content: "⌖ "; letter-spacing: 0; }

.title {
  width: max-content;
  margin: 0;
  white-space: nowrap;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(5rem, min(17vw, 28vh), 17rem);
  line-height: 0.82;
  letter-spacing: 0.01em;
  text-transform: uppercase;
}

.title__line { display: block; }

.title__line--outline {
  color: var(--paper);
  -webkit-text-stroke: 2px var(--ink);
}

/* Maßkette unter dem Titel */
.title::after {
  content: "";
  display: block;
  width: 100%;
  height: 0.12em;
  margin-top: 0.12em;
  border-left: 2px solid var(--line);
  border-right: 2px solid var(--line);
  background: linear-gradient(var(--line), var(--line)) center / 100% 1px no-repeat;
}

/* ---------- Schriftfeld ---------- */
.titleblock {
  position: absolute;
  right: calc(var(--gutter) + 2px);
  bottom: calc(var(--gutter) + 2px);
  z-index: 2;
  border-collapse: collapse;
  background: var(--paper);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.titleblock th,
.titleblock td {
  border: 1px solid var(--line);
  padding: 4px 10px;
  text-align: left;
  vertical-align: top;
}
.titleblock th { font-weight: 400; color: var(--ink-soft); font-size: 9px; }
.titleblock td { font-weight: 600; }

/* ---------- Bildnachweis ---------- */
.credit {
  position: absolute;
  left: calc(var(--gutter) + 26px);
  bottom: calc(var(--gutter) + 10px);
  z-index: 2;
  font-size: 10px;
  letter-spacing: 0.05em;
  color: var(--ink-soft);
}
.credit a { color: inherit; }
.credit a:hover { color: var(--ink); }

/* ---------- Mobil ---------- */
@media (max-width: 720px) {
  .hero { padding: calc(var(--gutter) + 34px) calc(var(--gutter) + 24px) 0; }
  .title { font-size: 16vw; }
  .title__line--split { display: inline; }
  .building { width: 125%; right: -10%; max-height: none; }
  .titleblock { left: calc(var(--gutter) + 2px); right: calc(var(--gutter) + 2px); bottom: calc(var(--gutter) + 30px); font-size: 10px; }
  .titleblock th, .titleblock td { padding: 3px 6px; }
  .credit { left: calc(var(--gutter) + 8px); right: calc(var(--gutter) + 8px); bottom: calc(var(--gutter) + 8px); font-size: 9px; }
  .building { bottom: 150px; }
  .zones { font-size: 8px; }
}

@media (prefers-reduced-motion: reduce) {
  .building { animation: none; }
}
