/* murmel.fit
   Welt: die Nacht der App (Murmel/Views/Theme.swift, Design/AppIcon.html).
   Display: Fraunces mit weicher Achse (SOFT 100), Text: Nunito. Beide OFL,
   selbst gehostet in fonts/. Keine Skripte, keine fremden Ressourcen. */

@font-face {
  font-family: "Fraunces";
  src: url("fonts/fraunces.woff2") format("woff2-variations");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Nunito";
  src: url("fonts/nunito.woff2") format("woff2-variations");
  font-weight: 200 1000;
  font-style: normal;
  font-display: swap;
}

:root {
  --midnight: #0d0a1a;
  --night: #120e24;
  --indigo-deep: #261e4a;
  --raised: #1d1932;
  --periwinkle: #96a5f0;
  --dots: #9eaef5;
  --iris: #7566c7;
  --moon: #f8ebc8;
  --moon-shade: #e6d3a6;
  --lavender: #c2bae0;
  --lavender-dim: #a39cc4;
  --line: rgba(194, 186, 224, 0.14);

  --display: "Fraunces", ui-serif, Georgia, serif;
  --text: "Nunito", ui-rounded, -apple-system, "Segoe UI", sans-serif;

  --measure: 68ch;
  --gutter: clamp(20px, 5vw, 48px);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);

  color-scheme: dark;
  scrollbar-color: var(--iris) var(--midnight);
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }

body {
  margin: 0;
  min-height: 100vh;
  background: var(--midnight);
  color: var(--lavender);
  font-family: var(--text);
  font-size: 17px;
  line-height: 1.65;
  font-optical-sizing: auto;
  caret-color: var(--periwinkle);
  -webkit-font-smoothing: antialiased;
}

::selection { background: rgba(150, 165, 240, 0.35); color: var(--moon); }

a {
  color: var(--periwinkle);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.22em;
  transition: color 0.2s var(--ease-out);
}
a:hover { color: var(--moon); }

:focus-visible {
  outline: 2px solid var(--periwinkle);
  outline-offset: 3px;
  border-radius: 4px;
}

h1, h2, h3 {
  font-family: var(--display);
  font-variation-settings: "SOFT" 100;
  color: var(--moon);
  font-weight: 560;
  line-height: 1.15;
  letter-spacing: -0.012em;
  text-wrap: balance;
}

p, li { text-wrap: pretty; }

strong { color: var(--moon); font-weight: 700; }

code {
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 0.86em;
  color: var(--moon-shade);
}

.skip {
  position: absolute;
  left: -9999px;
}
.skip:focus { left: var(--gutter); top: 12px; z-index: 10; background: var(--raised); padding: 8px 14px; }

/* ---------- Kopf ---------- */

.masthead {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  max-width: 1120px;
  margin: 0 auto;
  padding: 22px var(--gutter);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--moon);
  text-decoration: none;
  font-family: var(--display);
  font-variation-settings: "SOFT" 100;
  font-weight: 600;
  font-size: 22px;
  letter-spacing: -0.01em;
}
.brand svg { width: 34px; height: 34px; }

.nav { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 22px; font-size: 15px; font-weight: 600; }
.nav a { color: var(--lavender); text-decoration: none; padding: 6px 0; }
.nav a:hover { color: var(--moon); }
.nav a[aria-current="page"] { color: var(--moon); text-decoration: underline; text-decoration-color: var(--iris); text-underline-offset: 0.5em; text-decoration-thickness: 2px; }
.nav .lang { color: var(--lavender-dim); font-weight: 500; }

/* ---------- Startseite: Nachthimmel ---------- */

.sky {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(60% 55% at 72% 42%, rgba(150, 165, 240, 0.16), transparent 70%) top / 100% min(100vh, 980px) no-repeat,
    linear-gradient(180deg, #2b2452 0%, var(--indigo-deep) 30%, var(--night) 72%, var(--midnight) 100%) top / 100% min(100vh, 980px) no-repeat,
    var(--midnight);
}

.stars {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}
.sky > .stars { height: min(100vh, 980px); }
.stars circle { fill: var(--moon); }

.hero {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  align-items: center;
  gap: clamp(24px, 4vw, 64px);
  max-width: 1120px;
  margin: 0 auto;
  padding: clamp(32px, 6vw, 80px) var(--gutter) clamp(40px, 6vw, 72px);
  min-height: min(76vh, 700px);
}

.hero h1 {
  font-size: clamp(44px, 7.2vw, 92px);
  line-height: 1.02;
  letter-spacing: -0.03em;
  font-weight: 520;
  margin: 0 0 24px;
}

.hero .lede {
  font-size: clamp(18px, 1.6vw, 21px);
  line-height: 1.6;
  max-width: 36ch;
  margin: 0 0 36px;
}

.soon {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 12px 22px 12px 16px;
  border-radius: 999px;
  background: var(--moon);
  color: var(--midnight);
  font-weight: 800;
  font-size: 16px;
  letter-spacing: 0.005em;
  box-shadow: 0 10px 30px -12px rgba(248, 235, 200, 0.45), 0 2px 6px rgba(0, 0, 0, 0.35);
}
.soon svg { width: 22px; height: 22px; flex: none; }
.soon small { display: block; font-weight: 600; font-size: 13px; opacity: 0.7; line-height: 1.2; }
.soon span { line-height: 1.2; }

.moon-mark { width: 100%; max-width: 460px; justify-self: center; overflow: visible; }
.moon-mark .dot { fill: var(--dots); transform-box: fill-box; transform-origin: center; }

/* Der eine Moment: die drei Punkte murmeln. */
@media (prefers-reduced-motion: no-preference) {
  .moon-mark .dot { animation: murmel 2.8s var(--ease-out) infinite; }
  .moon-mark .dot:nth-of-type(2) { animation-delay: 0.22s; }
  .moon-mark .dot:nth-of-type(3) { animation-delay: 0.44s; }
}
@keyframes murmel {
  0%, 60%, 100% { opacity: 1; transform: translateY(0); }
  20% { opacity: 0.45; transform: translateY(-14%); }
}

/* ---------- Startseite: Abschnitte ---------- */

.section {
  max-width: 1120px;
  margin: 0 auto;
  padding: clamp(64px, 9vw, 120px) var(--gutter) 0;
}

.section > h2 {
  font-size: clamp(30px, 3.6vw, 44px);
  margin: 0 0 14px;
  max-width: 22ch;
}
.section > .intro { max-width: 56ch; margin: 0 0 40px; font-size: 18px; }

/* Eine Nacht als Zeitleiste */
.night {
  position: relative;
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 18px;
}
.night::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 7px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--line) 8%, var(--line) 92%, transparent);
}
.night li { position: relative; padding-top: 30px; margin: 0; }
.night li::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 15px;
  height: 15px;
  border-radius: 50%;
  background: var(--night);
  border: 2px solid var(--lavender-dim);
}
.night li.speech::before { border-color: var(--dots); background: var(--dots); box-shadow: 0 0 0 5px rgba(158, 174, 245, 0.16); }
.night time {
  display: block;
  font-variant-numeric: tabular-nums;
  font-weight: 800;
  color: var(--moon);
  font-size: 15px;
}
.night .kind { display: block; font-size: 14px; color: var(--lavender-dim); font-weight: 700; margin-bottom: 6px; }
.night q {
  display: block;
  font-family: var(--display);
  font-variation-settings: "SOFT" 100;
  font-style: normal;
  color: var(--moon);
  font-size: 19px;
  line-height: 1.35;
  quotes: "„" "“";
}
.night .len { font-size: 14px; color: var(--lavender-dim); }
.caption { margin: 28px 0 0; font-size: 14px; color: var(--lavender-dim); max-width: 60ch; }

/* Was bei dir bleibt */
.promises {
  margin: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(24px, 3vw, 48px);
  border-top: 1px solid var(--line);
  padding-top: 32px;
}
.promises div { margin: 0; }
.promises dt {
  font-family: var(--display);
  font-variation-settings: "SOFT" 100;
  color: var(--moon);
  font-size: 22px;
  line-height: 1.25;
  margin-bottom: 10px;
}
.promises dd { margin: 0; color: var(--lavender); }

.closing {
  max-width: 1120px;
  margin: 0 auto;
  padding: clamp(72px, 10vw, 128px) var(--gutter) 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.closing .last {
  margin: 0;
  font-family: var(--display);
  font-variation-settings: "SOFT" 100;
  color: var(--moon);
  font-size: clamp(26px, 3vw, 36px);
  line-height: 1.2;
  max-width: 20ch;
}

/* ---------- Leseseiten ---------- */

.doc-head {
  position: relative;
  overflow: hidden;
  background: linear-gradient(180deg, #2b2452 0%, var(--indigo-deep) 45%, var(--midnight) 100%);
  border-bottom: 1px solid var(--line);
}
.doc-head .title {
  position: relative;
  z-index: 1;
  max-width: calc(var(--measure) + 2 * var(--gutter));
  margin: 0 auto;
  padding: 28px var(--gutter) 44px;
}
.doc-head h1 { font-size: clamp(36px, 5vw, 56px); margin: 0 0 10px; letter-spacing: -0.025em; }
.doc-head .meta { margin: 0; color: var(--lavender-dim); font-size: 15px; }

.doc {
  max-width: calc(var(--measure) + 2 * var(--gutter));
  margin: 0 auto;
  padding: 40px var(--gutter) 0;
}
.doc > p:first-child { font-size: 19px; color: var(--moon); line-height: 1.55; }
.doc h2 { font-size: 27px; margin: 2.2em 0 0.5em; }
.doc h3 { font-size: 20px; margin: 1.8em 0 0.4em; }
.doc ul { padding-left: 1.2em; }
.doc li { margin: 0.45em 0; }
.doc li::marker { color: var(--iris); }
.doc .note { color: var(--lavender-dim); font-size: 15px; }
.doc address { font-style: normal; }

.contents {
  margin: 0 0 8px;
  padding: 18px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  font-size: 15px;
}
.contents ol { margin: 0; padding-left: 1.3em; columns: 2; column-gap: 32px; }
.contents li { margin: 0.2em 0; break-inside: avoid; }
.contents a { text-decoration: none; }
.contents a:hover { text-decoration: underline; }

.table-wrap { overflow-x: auto; margin: 1em 0; }
table { width: 100%; border-collapse: collapse; font-size: 15px; }
th, td { text-align: left; vertical-align: top; padding: 10px 14px 10px 0; border-bottom: 1px solid var(--line); }
th { color: var(--moon); font-weight: 800; }

/* Einwilligungstexte: gesetzt wie ein Dokument mit Versionsvermerk */
.consent {
  margin: 40px 0;
  padding: 28px clamp(20px, 4vw, 36px) 32px;
  background: var(--raised);
  border-radius: 22px;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.06) inset, 0 24px 48px -28px rgba(0, 0, 0, 0.7);
}
.consent h2 { margin: 0 0 4px; font-size: 26px; }
.consent .version { margin: 0 0 20px; font-size: 14px; color: var(--lavender-dim); }
.consent p { margin: 0 0 1em; }
.consent p:last-child { margin-bottom: 0; }
.consent b { color: var(--moon); }

/* ---------- Fuß ---------- */

.footer {
  max-width: 1120px;
  margin: clamp(80px, 10vw, 120px) auto 0;
  padding: 28px var(--gutter) 44px;
  border-top: 1px solid var(--line);
  display: flex;
  flex-wrap: wrap;
  gap: 10px 26px;
  font-size: 14px;
  color: var(--lavender-dim);
}
.footer a { color: var(--lavender); text-decoration: none; font-weight: 600; }
.footer a:hover { color: var(--moon); }
.footer .fine { flex-basis: 100%; }

/* ---------- Schmal ---------- */

@media (max-width: 860px) {
  .hero { grid-template-columns: 1fr; min-height: 0; text-align: left; }
  .moon-mark { order: -1; max-width: 220px; justify-self: start; }
  .night { grid-template-columns: 1fr; gap: 26px; padding-left: 34px; }
  .night::before { top: 0; bottom: 0; left: 7px; right: auto; width: 1px; height: auto; background: var(--line); }
  .night li { padding-top: 0; }
  .night li::before { left: -34px; top: 4px; }
  .promises { grid-template-columns: 1fr; }
  .contents ol { columns: 1; }
}

@media (max-width: 560px) {
  .masthead { flex-direction: column; align-items: flex-start; gap: 10px; }
  body { font-size: 16.5px; }
}
