@font-face {
  font-family: "Anybody";
  src: url("/home/fonts/anybody.woff2") format("woff2");
  font-weight: 100 900;
  font-stretch: 50% 150%;
  font-display: swap;
}
@font-face {
  font-family: "Newsreader";
  src: url("/home/fonts/newsreader.woff2") format("woff2");
  font-weight: 200 800;
  font-display: swap;
}

:root {
  --linen: #d9d6ce;      /* Rohleinen, Seitengrund */
  --linen-hi: #e9e7e1;   /* Schussfaden, ungefärbt */
  --indigo: #23306b;     /* Kettfaden, indigogefärbt */
  --indigo-deep: #161f4a;
  --ink: #1d2033;
  --madder: #a3352d;     /* der eine Krappfaden */
  --muted: #55586a;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --linen: #141a36;
    --linen-hi: #c9c5ba;
    --indigo: #3b4b9a;
    --indigo-deep: #232f6b;
    --ink: #e7e4dc;
    --madder: #d0574d;
    --muted: #a3a6b8;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --linen: #141a36;
  --linen-hi: #c9c5ba;
  --indigo: #3b4b9a;
  --indigo-deep: #232f6b;
  --ink: #e7e4dc;
  --madder: #d0574d;
  --muted: #a3a6b8;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--linen);
  color: var(--ink);
  font-family: "Newsreader", Georgia, serif;
  font-size: 1.1875rem;
  line-height: 1.55;
  font-optical-sizing: auto;
}
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 0.2em; }
a:hover { text-decoration-color: var(--madder); }
:focus-visible { outline: 2px solid var(--madder); outline-offset: 3px; }

/* Gewebe mit eingenähtem Webetikett */
.hero {
  position: relative;
  height: min(64vh, 640px);
  min-height: 340px;
  background: var(--indigo-deep);
  overflow: hidden;
}
#cloth { display: block; width: 100%; height: 100%; }

.mark {
  position: absolute;
  left: clamp(16px, 6vw, 88px);
  bottom: clamp(24px, 6vh, 64px);
  margin: 0;
  padding: 0.18em 0.42em 0.24em;
  background: var(--linen-hi);
  color: #161f4a; /* Etikett bleibt in beiden Modi hell, die Schrift dunkel */
  font-family: "Anybody", "Arial Black", sans-serif;
  font-weight: 820;
  font-stretch: 150%;
  font-size: clamp(2rem, 7.4vw, 7rem);
  line-height: 1;
  letter-spacing: -0.01em;
  /* Steppnaht rundum */
  outline: 2px dashed var(--madder);
  outline-offset: -0.16em;
  box-shadow: 0 2px 0 rgba(0, 0, 0, 0.18);
}
.body {
  display: grid;
  grid-template-columns: minmax(0, 34rem) auto;
  justify-content: space-between;
  gap: 48px 64px;
  max-width: 1120px;
  margin: 0 auto;
  padding: 72px clamp(16px, 6vw, 88px) 56px;
}
.intro p { margin: 0 0 1em; max-width: 34em; }
.intro .lede {
  font-size: clamp(1.5rem, 2.6vw, 2rem);
  line-height: 1.3;
  font-weight: 450;
  color: var(--ink);
}
.intro p:not(.lede) { color: var(--muted); }

.loom { justify-self: end; }
.presets { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.presets button {
  font: inherit;
  font-size: 1rem;
  padding: 6px 14px;
  border: 1px solid var(--ink);
  border-radius: 999px;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
}
.presets button[aria-pressed="true"] { background: var(--ink); color: var(--linen); }

.draft {
  --cell: clamp(28px, 4.2vw, 38px);
  display: grid;
  grid-template-columns: repeat(8, var(--cell));
  gap: 2px;
  padding: 2px;
  background: var(--ink);
  width: max-content;
}
.draft button {
  width: var(--cell);
  height: var(--cell);
  padding: 0;
  border: 0;
  background: var(--linen-hi);
  cursor: pointer;
}
.draft button[aria-pressed="true"] { background: var(--indigo); }
.draft button:focus-visible { outline-offset: -3px; outline-color: var(--madder); position: relative; }

.legend { display: flex; align-items: center; gap: 8px; margin: 12px 0 0; font-size: 0.95rem; color: var(--muted); }
.sw { display: inline-block; width: 14px; height: 14px; border: 1px solid var(--ink); }
.sw-warp { background: var(--indigo); }
.sw-weft { background: var(--linen-hi); margin-left: 12px; }

.foot {
  max-width: 1120px;
  margin: 0 auto;
  padding: 28px clamp(16px, 6vw, 88px) 48px;
  border-top: 1px solid color-mix(in srgb, var(--ink) 25%, transparent);
  display: flex;
  flex-wrap: wrap;
  gap: 8px 32px;
  font-size: 1rem;
  color: var(--muted);
}
.foot p { margin: 0; }
.foot nav { margin-left: auto; display: flex; gap: 20px; }

@media (max-width: 760px) {
  .hero { height: 48vh; min-height: 300px; }
  .body { grid-template-columns: 1fr; padding-top: 48px; }
  .loom { justify-self: start; }
  .foot nav { margin-left: 0; }
}

/* Rechtstexte */
.legal { max-width: 40rem; margin: 0 auto; padding: 56px clamp(16px, 6vw, 40px) 72px; }
.legal .back {
  font-family: "Anybody", sans-serif;
  font-weight: 800;
  font-stretch: 150%;
  font-size: 1.5rem;
  text-decoration: none;
  color: var(--indigo);
}
.legal h1 { font-size: 2.2rem; line-height: 1.15; font-weight: 500; margin: 1.6em 0 0.6em; }
.legal h2 { font-size: 1.25rem; font-weight: 600; margin: 2em 0 0.4em; }
.legal p, .legal li { color: var(--ink); }
.legal address { font-style: normal; }
