/* Restframe Software – restframe.de
   Eine Schrift (Archivo, variabel: wght 100–900, wdth 62–125, OFL,
   selbst gehostet, Lizenz in fonts/OFL.txt), keine externen Ressourcen,
   kein JavaScript. */

@font-face {
  font-family: "Archivo";
  src: url("/fonts/archivo.woff2") format("woff2-variations"),
       url("/fonts/archivo.woff2") format("woff2");
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Archivo";
  src: url("/fonts/archivo-italic.woff2") format("woff2-variations"),
       url("/fonts/archivo-italic.woff2") format("woff2");
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-style: italic;
  font-display: swap;
}

:root {
  --paper:    #f4f6f5;  /* kühles Papier */
  --ink:      #172338;  /* Tusche, Marineblau */
  --graphite: #535d6b;  /* Nebentext, 6,3:1 auf Papier */
  --rule:     #c3cad3;  /* Hilfslinien */
  --datum:    #0b6a73;  /* Bezugsfarbe: Achsenbeschriftung, Links */
  --datum-bg: #d7ebec;

  --measure: 34rem;
  --gutter: clamp(1.25rem, 5vw, 4.5rem);
  --step-0: 1.0625rem;
  --step-1: 1.25rem;
  --mark: clamp(3.5rem, 13.5vw, 9.25rem);

  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  background: var(--paper);
  color: var(--ink);
  font-family: "Archivo", system-ui, sans-serif;
  font-size: var(--step-0);
  line-height: 1.55;
  font-kerning: normal;
  font-variant-numeric: tabular-nums;
}

::selection { background: var(--datum-bg); color: var(--ink); }

a {
  color: var(--datum);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.22em;
}
a:hover { text-decoration-thickness: 2px; }
a:focus-visible {
  outline: 2px solid var(--datum);
  outline-offset: 3px;
  border-radius: 2px;
}

.skip {
  position: absolute;
  left: var(--gutter);
  top: -4rem;
  background: var(--ink);
  color: var(--paper);
  padding: 0.5rem 0.75rem;
}
.skip:focus { top: 1rem; }

main, .foot { padding-inline: var(--gutter); }
main { flex: 1; }

/* ---------- Bezugssystem S′: die Wortmarke steht im Ursprung ---------- */

.frame {
  position: relative;
  margin-top: clamp(3rem, 12vh, 8rem);
  padding: clamp(2.5rem, 9vh, 5.5rem) 0 0 clamp(1.25rem, 3vw, 2.25rem);
  max-width: 68rem;
}

/* y-Achse */
.frame::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 1.5px;
  background: var(--ink);
  transform-origin: bottom;
}
/* x-Achse */
.frame::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 1.5px;
  background: var(--ink);
  transform-origin: left;
}

/* Teilstriche entlang der Achsen */
.ticks-x, .ticks-y {
  position: absolute;
  pointer-events: none;
  color: var(--rule);
}
.ticks-x {
  left: 0;
  right: 1.5rem;
  bottom: -0.5rem;
  height: 0.5rem;
  background: repeating-linear-gradient(to right, currentColor 0 1px, transparent 1px 2.5rem);
}
.ticks-y {
  top: 1.5rem;
  bottom: 0;
  left: -0.5rem;
  width: 0.5rem;
  background: repeating-linear-gradient(to top, currentColor 0 1px, transparent 1px 2.5rem);
}

/* Pfeilspitzen und Beschriftung */
.axis-label {
  position: absolute;
  font-style: italic;
  font-size: var(--step-1);
  line-height: 1;
  color: var(--datum);
}
.axis-label.x { right: 0; bottom: 0.75rem; }
.axis-label.y { left: 0.75rem; top: 0; }
.axis-label.o { left: -1.35rem; bottom: -1.6rem; font-size: var(--step-0); }

.arrow {
  position: absolute;
  width: 10px;
  height: 10px;
  color: var(--ink);
}
.arrow.x { right: -4px; bottom: -4.25px; }
.arrow.y { left: -4.25px; top: -4px; }

.mark {
  margin: 0;
  padding-bottom: clamp(1.25rem, 3vw, 2.25rem);
  font-weight: 680;
  font-stretch: 72%;
  font-size: var(--mark);
  line-height: 0.86;
  letter-spacing: -0.035em;
  text-wrap: balance;
}
.mark span {
  display: block;
  font-weight: 420;
  font-stretch: 100%;
  font-size: 0.34em;
  letter-spacing: 0;
  line-height: 1.2;
  margin-top: 0.5rem;
  color: var(--graphite);
}

/* ---------- Text ---------- */

.about {
  max-width: var(--measure);
  margin: clamp(3rem, 8vh, 4.5rem) 0 0;
  font-size: var(--step-1);
  line-height: 1.45;
  text-wrap: pretty;
}

.facts {
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: 0.6rem 2rem;
  margin: 2rem 0 0;
  max-width: var(--measure);
}
.facts dt { color: var(--graphite); }
.facts dd { margin: 0; }
.facts ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0 1.25rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

/* ---------- Rechtstexte ---------- */

.doc {
  max-width: 40rem;
  padding-block: clamp(2.5rem, 8vh, 5rem) 3rem;
}
.doc .back {
  display: inline-block;
  margin-bottom: 2.5rem;
  font-weight: 600;
  font-stretch: 78%;
  font-size: 1.5rem;
  letter-spacing: -0.02em;
  color: var(--ink);
  text-decoration: none;
}
.doc .back:hover { color: var(--datum); }
.doc h1 {
  margin: 0 0 0.5rem;
  font-size: clamp(2rem, 6vw, 2.75rem);
  font-weight: 620;
  font-stretch: 86%;
  line-height: 1.05;
  letter-spacing: -0.025em;
}
.doc h2 {
  margin: 2.5rem 0 0.5rem;
  font-size: var(--step-1);
  font-weight: 620;
  line-height: 1.3;
}
.doc p, .doc ul, .doc address { margin: 0 0 1rem; }
.doc address { font-style: normal; }
.doc ul { padding-left: 1.2rem; }
.doc li { margin-bottom: 0.3rem; }
.doc .meta { color: var(--graphite); }
.draft {
  margin: 0 0 2rem;
  padding: 0.75rem 1rem;
  background: var(--datum-bg);
  border-radius: 4px;
}
.placeholder {
  background: #fff1b8;
  color: var(--ink);
  padding: 0 0.2em;
  border-radius: 2px;
}

/* ---------- Fuß ---------- */

.foot {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
  padding-block: 2.5rem 2rem;
  margin-top: 4rem;
  font-size: 0.9375rem;
  color: var(--graphite);
}
.foot a { color: var(--graphite); }
.foot a:hover { color: var(--ink); }
.foot small { font-size: inherit; margin-left: auto; }

/* ---------- Der eine Moment: das Bezugssystem zeichnet sich auf ---------- */

@media (prefers-reduced-motion: no-preference) {
  .frame::after  { animation: draw-x 900ms cubic-bezier(0.16, 1, 0.3, 1) both; }
  .frame::before { animation: draw-y 700ms cubic-bezier(0.16, 1, 0.3, 1) 120ms both; }
  .frame .arrow, .frame .axis-label, .frame .ticks-x, .frame .ticks-y {
    animation: appear 500ms ease-out 650ms both;
  }
}
@keyframes draw-x { from { transform: scaleX(0); } }
@keyframes draw-y { from { transform: scaleY(0); } }
@keyframes appear { from { opacity: 0; } }

@media (max-width: 40rem) {
  .facts { grid-template-columns: 1fr; gap: 0.15rem; }
  .facts dd + dt { margin-top: 0.85rem; }
  .foot small { margin-left: 0; width: 100%; }
  .axis-label.o { left: 0.35rem; bottom: -1.85rem; }
}

@media print {
  .frame::before, .frame::after { animation: none; }
  .foot { display: none; }
}
