/*
 * Grundlagen der öffentlichen Seiten (/willkommen, /impressum, /datenschutz):
 * Papier, Schrift, Bedienelemente, Kleingedrucktes und Hinweise. Immer helles
 * Papier. Die Titelseite „Journey-Rundschau“ steht in zeitung.css; Kopf und
 * Fuß aus Karton sowie der Textblock gehören zu den Rechtsseiten. Die
 * Materialwerte stammen aus styles/core.css, styles/navigation.css und
 * styles/heft.css und stehen hier als Kopie.
 */

html {
  /* Tinte und Stempel als Masken, nie als Farben (styles/core.css). */
  --ink: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='260' height='260'%3E%3Cfilter id='t'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' seed='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -.9 0 0 0 1.4'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23t)'/%3E%3C/svg%3E");
  --stamp: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='s'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.55' numOctaves='3' seed='11' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -1.7 0 0 0 1.95'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23s)'/%3E%3C/svg%3E");

  /* Seite: Papier-Scan hell, feines Korn dunkel. */
  --paper-image:
    linear-gradient(90deg, rgb(92 70 34 / 0.07), transparent 14%, transparent 86%, rgb(92 70 34 / 0.07)),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='900' height='900'%3E%3Cfilter id='c'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.004' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .45 0 0 0 0 .38 0 0 0 0 .25 .09 0 0 0 -.03'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23c)'/%3E%3C/svg%3E"),
    url("assets/heft/papier-scan.webp");
  --paper-repeat: repeat-y, repeat, repeat;
  --paper-size: 100% 100%, 900px 900px, 1024px 1024px;
  --paper-blend: normal, normal, multiply;

  /* Umschlag aus blauem Karton (styles/navigation.css). */
  --cover: light-dark(#2c3e52, #3a4f63);
  --cover-ink: light-dark(#f4efe5, #f7f3ea);
  --cover-muted: light-dark(rgb(244 239 229 / 0.78), rgb(247 243 234 / 0.86));
  --cover-shadow: light-dark(rgb(40 30 14 / 0.28), rgb(0 0 0 / 0.5));

  /* Aufgelegtes Blatt (styles/heft.css): Korn, Licht und Klebeband für zeitung.css. */
  --sheet-grain:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='f'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='1.3' numOctaves='1' seed='7' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .4 0 0 0 0 .33 0 0 0 0 .22 .1 0 0 0 -.035'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23f)'/%3E%3C/svg%3E") 0 0 / 160px 160px,
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='480' height='480'%3E%3Cfilter id='w'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.012' numOctaves='2' seed='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .45 0 0 0 0 .38 0 0 0 0 .25 .08 0 0 0 -.03'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23w)'/%3E%3C/svg%3E") 0 0 / 480px 480px;
  --sheet-light: linear-gradient(160deg, rgb(255 255 255 / 0.5), rgb(255 255 255 / 0) 36%, rgb(92 70 34 / 0) 64%, rgb(92 70 34 / 0.05));
  --tape: light-dark(rgb(232 214 170 / 0.72), rgb(150 134 98 / 0.6));

  --line-block: 2px solid var(--fm-color-text);
  --line-head: 1px solid var(--fm-color-text);
  --line-hair: 1px solid var(--fm-color-border);
  --gutter: 48px;
  --section-gap: 96px;
  --stamp-blue: light-dark(#1d5f8c, #8fcdf2);
  scroll-behavior: smooth;
  scroll-padding-top: 72px;
}

* { box-sizing: border-box; }
body {
  position: relative;
  min-height: 100vh;
  margin: 0;
  color: var(--fm-color-text);
  background-color: var(--fm-color-paper-base);
  background-image: var(--paper-image);
  background-repeat: var(--paper-repeat);
  background-size: var(--paper-size);
  background-blend-mode: var(--paper-blend);
  font-family: var(--fm-font-body);
  font-size: 16px;
  line-height: 1.55;
}
h1, h2, p, figure { margin: 0; }
h1, h2 { color: var(--fm-color-text); font-family: var(--fm-font-heading); letter-spacing: 0; }
a { color: inherit; text-underline-offset: 4px; }
:is(a, summary):focus-visible { outline: 3px solid var(--fm-color-focus, #cf7e06); outline-offset: 3px; }
.wrap { width: min(1200px, 100% - 2 * var(--gutter)); margin-inline: auto; }
.skip { position: fixed; z-index: 40; top: 0; left: 16px; padding: 12px 16px; background: var(--fm-color-text); color: var(--fm-color-paper-base); transform: translateY(-120%); }
.skip:focus { transform: none; }

/* Tinte zieht ins Papier: große Überschriften, nur hell. */
html[data-theme="light"] :is(h1, h2) {
  -webkit-mask-image: var(--ink);
  mask-image: var(--ink);
  -webkit-mask-size: 260px 260px;
  mask-size: 260px 260px;
}

/* Bedienung: Tintenfläche und gedruckter Verweis. */
.ink-button {
  display: inline-flex;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  padding: 12px 22px;
  border: 1px solid var(--fm-color-text);
  border-radius: 3px;
  font-weight: 700;
  font-size: 15px;
  line-height: 1.2;
  text-decoration: none;
  background: var(--fm-color-text);
  color: var(--fm-color-paper-base);
  transition: background-color 160ms, border-color 160ms;
}
.ink-button:hover { background: color-mix(in srgb, var(--fm-color-text) 86%, var(--fm-color-paper-base)); }
.printed-link { font-weight: 650; text-decoration: underline; text-decoration-thickness: 1px; }
.printed-link:hover { text-decoration-thickness: 2px; }

/* Umschlag: Kopf aus blauem Karton, steht still, das Papier gleitet darunter. */
.cover-bar, .cover-foot {
  color: var(--cover-ink);
  background-color: var(--cover);
  background-image: url("assets/heft/karton-scan.webp");
  background-size: 768px 768px;
  background-blend-mode: overlay;
}
.cover-bar { position: sticky; z-index: 20; top: 0; box-shadow: inset 0 -1px 0 rgb(255 255 255 / 0.07), 0 6px 14px -8px var(--cover-shadow); }
.cover-bar-inner { display: flex; min-height: 58px; align-items: center; justify-content: space-between; gap: 16px; }
.masthead { display: inline-flex; align-items: baseline; gap: 10px; text-decoration: none; }
.masthead-title { font: 800 26px/1 var(--fm-font-heading); letter-spacing: 0.01em; }
.masthead-by { color: var(--cover-muted); font-size: 12px; font-weight: 600; letter-spacing: 0.08em; }
.cover-nav { display: flex; align-items: center; gap: 24px; font-size: 14px; font-weight: 650; }
.cover-nav a { text-decoration: none; }
.cover-nav a:hover { text-decoration: underline; }
.cover-login { padding: 8px 14px; border: 1px solid var(--cover-ink); border-radius: 3px; }
.cover-bar :focus-visible, .cover-foot :focus-visible { outline-color: var(--cover-ink); }

/* Kleingedrucktes */
.faq { margin-top: 12px; border-top: var(--line-block); }
.faq details { border-bottom: var(--line-hair); }
.faq summary { display: flex; min-height: 54px; align-items: center; justify-content: space-between; gap: 16px; padding: 12px 0; font-weight: 650; list-style: none; cursor: pointer; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { color: var(--fm-color-text-muted); font: 700 20px/1 var(--fm-font-heading); content: "+"; }
.faq details[open] summary::after { content: "–"; }
.faq p { margin: 0 0 16px; color: var(--fm-color-text-muted); }
.micro { margin-top: 14px; color: var(--fm-color-text-muted); font-size: 13px; }

/* Seitenfuß aus Karton */
.cover-foot { margin-top: var(--section-gap); }
.cover-foot-inner { display: flex; min-height: 56px; align-items: center; justify-content: space-between; gap: 16px; font-size: 13px; }
.cover-foot-inner > span:first-child { font-weight: 700; }
.cover-foot-links { display: flex; gap: 20px; }

@media (max-width: 1000px) {
  html { --gutter: 28px; --section-gap: 80px; }
}

/* Handy: 16 px Rand */
@media (max-width: 760px) {
  html { --gutter: 16px; --section-gap: 52px; scroll-padding-top: 64px; }
  .cover-foot { padding-bottom: 66px; }
  .cover-bar-inner { min-height: 54px; }
  .masthead-title { font-size: 23px; }
  .masthead-by { display: none; }
  .cover-login { padding: 7px 12px; white-space: nowrap; }
  .cover-foot-inner { flex-direction: column; align-items: flex-start; justify-content: center; gap: 6px; padding: 14px 0; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}

/* Nach dem Abmelden oder ohne Zugang: gedruckter Hinweis über der Titelseite. */
.logout-note, .access-note { margin-bottom: 14px; padding: 8px 0; border-top: var(--line-hair); border-bottom: var(--line-hair); font-weight: 650; }
.logout-note a, .access-note a { margin-left: 6px; white-space: nowrap; }

/* Rechtsseiten: dieselbe Seite, ein schmaler Block Text. */
.legal { max-width: 760px; padding-top: 32px; padding-bottom: 24px; }
.legal h1 { margin: 0 0 20px; padding-top: 14px; border-top: 3px solid var(--fm-color-text); font-size: clamp(40px, 6vw, 64px); font-weight: 800; line-height: 1; overflow-wrap: anywhere; hyphens: manual; }
.legal h2 { margin: 36px 0 10px; padding-top: 10px; border-top: var(--line-head); font-size: 24px; font-weight: 800; }
.legal p, .legal address { margin: 0 0 12px; color: var(--fm-color-text-muted); font-size: 16px; font-style: normal; line-height: 1.7; }
.legal address { color: var(--fm-color-text); }
.legal a { font-weight: 600; overflow-wrap: anywhere; }
.legal .legal-lead { padding: 18px 20px; color: var(--fm-color-text); font-size: 18px; }
.legal .legal-date { margin-top: 40px; font-size: 13px; }
.legal-page .cover-foot { margin-top: 64px; }
