/* ============================================================
   Statik · Ghost Theme
   Hell: Eis (weiß, kühl, transparent) · Dunkel: Polarnacht
   ============================================================ */

:root {
  --paper: #FBFDFE;
  --sky: #EDF7FC;
  --glass: rgba(255, 255, 255, 0.62);
  --glass-border: rgba(16, 42, 59, 0.08);
  --ink: #102A3B;
  --muted: #5E7A8C;
  --line: rgba(16, 42, 59, 0.10);
  --frost: #2E9FD8;
  --frost-soft: #BFE3F5;
  --deep: #0B4A6F;
  --shadow: 0 10px 34px rgba(16, 74, 111, 0.07);

  --font-sans: "Avenir Next", "Futura", "Segoe UI", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --font-mono: "SF Mono", ui-monospace, "JetBrains Mono", Menlo, Consolas, monospace;

  --measure: 62ch;
  --wrap: 1160px;
  --radius: 16px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #0A1B28;
    --sky: #0D2233;
    --glass: rgba(255, 255, 255, 0.045);
    --glass-border: rgba(215, 240, 252, 0.10);
    --ink: #E6F3FA;
    --muted: #8FB0C4;
    --line: rgba(215, 240, 252, 0.10);
    --frost: #56C3F0;
    --frost-soft: #1E4B66;
    --deep: #7ADCFF;
    --shadow: 0 10px 34px rgba(0, 0, 0, 0.35);
  }
}

/* ---------- Grundlagen ---------- */

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: linear-gradient(180deg, var(--paper) 0%, var(--sky) 46%, var(--paper) 100%);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 17.5px;
  line-height: 1.7;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

::selection { background: var(--frost); color: #fff; }

img { max-width: 100%; height: auto; }

a { color: inherit; }
a:focus-visible,
button:focus-visible,
input:focus-visible { outline: 2px solid var(--frost); outline-offset: 3px; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 clamp(1.2rem, 4vw, 3rem); }

.label {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--frost);
  font-weight: 500;
}

.arw { display: inline-block; transition: transform .18s; }

/* ---------- Kopfzeile ---------- */

.topbar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0.9rem clamp(1.2rem, 4vw, 3rem);
  background: color-mix(in srgb, var(--paper) 55%, transparent);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--line);
}
.mark { display: flex; align-items: baseline; gap: 0.65rem; text-decoration: none; }
.mark .word { font-size: 1.06rem; font-weight: 600; letter-spacing: 0.34em; text-transform: uppercase; }
.mark .word b { color: var(--frost); font-weight: inherit; }
.mark .by { font-family: var(--font-mono); font-size: 0.62rem; letter-spacing: 0.14em; color: var(--muted); text-transform: uppercase; }
.nav { display: flex; align-items: center; gap: clamp(0.9rem, 2.2vw, 1.9rem); }
.nav a { font-size: 0.82rem; font-weight: 500; letter-spacing: 0.04em; text-decoration: none; color: var(--muted); transition: color .15s; }
.nav a:hover { color: var(--ink); }
.nav .cta { color: #fff; background: var(--frost); border-radius: 999px; padding: 0.5rem 1.1rem; transition: filter .15s; }
.nav .cta:hover { color: #fff; filter: brightness(1.07); }
@media (max-width: 720px) { .nav a:not(.cta) { display: none; } }

/* ---------- Hero ---------- */

.hero { padding: clamp(3.4rem, 9vh, 6.5rem) 0 clamp(2rem, 5vh, 3rem); }
.hero .label { display: block; margin-bottom: 1.8rem; }
.hero h1 {
  font-size: clamp(2.5rem, 6.5vw, 4.9rem);
  font-weight: 250;
  line-height: 1.06;
  letter-spacing: -0.015em;
  margin: 0 0 1.5rem;
  text-wrap: balance;
  max-width: 21ch;
}
.hero h1 .reisst { color: var(--deep); font-weight: 500; }
.hero .lead { font-size: clamp(1.05rem, 1.6vw, 1.22rem); max-width: 46ch; color: var(--muted); margin: 0 0 2.4rem; }
.cta-row { display: flex; flex-wrap: wrap; gap: 0.8rem; }

.btn {
  font-size: 0.86rem; font-weight: 500; letter-spacing: 0.03em;
  text-decoration: none; padding: 0.85rem 1.5rem; border-radius: 999px;
  display: inline-flex; align-items: center; gap: 0.55rem; transition: all .18s;
  border: 1px solid transparent; cursor: pointer;
}
.btn:hover .arw { transform: translateX(4px); }
.btn-primary { background: var(--frost); color: #fff; box-shadow: var(--shadow); }
.btn-primary:hover { filter: brightness(1.07); }
.btn-ghost { border-color: var(--glass-border); background: var(--glass); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); color: var(--ink); }
.btn-ghost:hover { border-color: var(--frost); color: var(--frost); }

/* ---------- Lastdiagramm ---------- */

.diagram {
  margin: clamp(2.6rem, 6vh, 4.2rem) 0 0;
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: var(--shadow);
  padding: clamp(1.2rem, 3vw, 2.2rem);
}
.diagram svg { width: 100%; height: auto; display: block; }
.diag-cap { font-family: var(--font-mono); font-size: 0.64rem; letter-spacing: 0.12em; color: var(--muted); text-transform: uppercase; display: flex; justify-content: space-between; margin-top: 0.9rem; }
.dgrid text { font-family: var(--font-mono); }

/* ---------- Sektionen ---------- */

section.block { padding: clamp(3.4rem, 9vh, 6rem) 0; }
.section-head { margin-bottom: 2.4rem; }
.section-head .label { display: block; margin-bottom: 0.9rem; }
.section-title {
  font-size: clamp(1.8rem, 3.6vw, 2.7rem);
  font-weight: 250; letter-spacing: -0.01em; line-height: 1.12;
  margin: 0; text-wrap: balance;
}
.prose { max-width: var(--measure); }
.prose p { margin: 0 0 1.1rem; }
.prose strong { font-weight: 600; }
.wink { font-size: 0.92rem; color: var(--muted); font-style: italic; }

blockquote.pull {
  max-width: 34ch; margin: 2.8rem 0 0; padding: 1.6rem 1.8rem;
  background: var(--glass); border: 1px solid var(--glass-border);
  border-left: 3px solid var(--deep);
  border-radius: 0 var(--radius) var(--radius) 0;
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  font-size: clamp(1.25rem, 2.4vw, 1.7rem); font-weight: 300; line-height: 1.32;
}
blockquote.pull cite { display: block; margin-top: 1rem; font-family: var(--font-mono); font-style: normal; font-size: 0.66rem; letter-spacing: 0.2em; color: var(--muted); text-transform: uppercase; }

/* ---------- Methode ---------- */

.cuts { display: flex; flex-direction: column; gap: 0.7rem; }
.cut {
  display: grid; grid-template-columns: 3.6rem 1fr; gap: 0 clamp(1rem, 3vw, 2.2rem);
  align-items: start;
  background: var(--glass); border: 1px solid var(--glass-border); border-radius: var(--radius);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  padding: 1.3rem 1.5rem;
  transition: border-color .18s, transform .18s;
}
.cut:hover { border-color: var(--frost); transform: translateY(-2px); }
.cut .num { font-family: var(--font-mono); font-size: 0.82rem; color: var(--frost); padding-top: 0.3rem; }
.cut h3 { font-size: 1.28rem; font-weight: 500; line-height: 1.15; margin: 0 0 0.35rem; }
.cut p { margin: 0; color: var(--muted); max-width: 56ch; font-size: 0.96rem; }

/* ---------- Prüfstand ---------- */

.schedule { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.9rem; }
@media (max-width: 860px) { .schedule { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 540px) { .schedule { grid-template-columns: 1fr; } }
.load {
  padding: 1.4rem;
  background: var(--glass); border: 1px solid var(--glass-border); border-radius: var(--radius);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  transition: border-color .18s, transform .18s;
}
.load:hover { border-color: var(--frost); transform: translateY(-2px); }
.load .idx { font-family: var(--font-mono); font-size: 0.64rem; letter-spacing: 0.18em; color: var(--frost); text-transform: uppercase; }
.load h4 { font-size: 1.14rem; font-weight: 500; margin: 0.55rem 0 0.4rem; }
.load p { margin: 0; font-size: 0.9rem; color: var(--muted); }

/* ---------- Essays ---------- */

.essays-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.9rem; }
@media (max-width: 860px) { .essays-grid { grid-template-columns: 1fr; } }
.essay {
  background: var(--glass); border: 1px solid var(--glass-border); border-radius: var(--radius);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  display: flex; flex-direction: column; min-height: 180px;
  transition: border-color .18s, transform .18s;
}
.essay:hover { border-color: var(--frost); transform: translateY(-2px); }
.essay-link { text-decoration: none; display: flex; flex-direction: column; flex: 1; padding: 1.5rem; }
.essay .meta { font-family: var(--font-mono); font-size: 0.64rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); display: flex; justify-content: space-between; gap: 0.6rem; }
.essay h3 { font-size: 1.18rem; font-weight: 500; line-height: 1.28; margin: 0.85rem 0 0.5rem; }
.essay p { margin: 0; color: var(--muted); font-size: 0.94rem; }
.essay .more { margin-top: auto; padding-top: 1rem; font-size: 0.8rem; font-weight: 500; color: var(--frost); }
.essay.placeholder { align-items: flex-start; justify-content: center; color: var(--muted); padding: 1.5rem; }

.chip {
  font-family: var(--font-mono); font-size: 0.6rem; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--frost); border: 1px solid var(--frost-soft); border-radius: 999px; padding: 0.1rem 0.55rem;
  white-space: nowrap;
}

.stream-all { margin-top: 1.6rem; }
.stream-all a { font-size: 0.86rem; font-weight: 500; color: var(--frost); text-decoration: none; }
.stream-all a:hover .arw { transform: translateX(4px); }

/* ---------- Angebot ---------- */

.offers { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1rem; max-width: 780px; }
@media (max-width: 720px) { .offers { grid-template-columns: 1fr; } }
.offer {
  background: var(--glass); border: 1px solid var(--glass-border); border-radius: var(--radius);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  padding: 1.8rem 1.7rem; display: flex; flex-direction: column;
}
.offer.feature { border-color: var(--frost); box-shadow: var(--shadow); }
.offer .tier { font-family: var(--font-mono); font-size: 0.64rem; letter-spacing: 0.18em; text-transform: uppercase; color: var(--frost); }
.offer h3 { font-size: 1.5rem; font-weight: 500; margin: 0.6rem 0 0.7rem; }
.offer > p { margin: 0 0 1.1rem; font-size: 0.95rem; color: var(--muted); }
.offer ul { list-style: none; padding: 0; margin: 0 0 1.6rem; display: flex; flex-direction: column; gap: 0.5rem; }
.offer li { position: relative; padding-left: 1.3rem; font-size: 0.92rem; }
.offer li::before { content: ""; position: absolute; left: 0; top: 0.52em; width: 0.55rem; height: 0.55rem; border-radius: 50%; background: var(--frost-soft); border: 1.5px solid var(--frost); }
.offer .foot { margin-top: auto; }
.offer .price { font-size: 1.45rem; font-weight: 300; margin: 0 0 0.9rem; }
.offer .price span { font-family: var(--font-mono); font-size: 0.7rem; color: var(--muted); }
.offer .btn { width: 100%; justify-content: center; }
.offers-single { grid-template-columns: 1fr; max-width: 520px; }
.founder-note { font-size: 0.88rem; color: var(--muted); max-width: 52ch; margin: 1.4rem 0 0; }

/* ---------- Person ---------- */

.about { display: grid; grid-template-columns: 1.3fr 1fr; gap: clamp(1.6rem, 5vw, 4rem); align-items: start; }
@media (max-width: 820px) { .about { grid-template-columns: 1fr; } }
.facts {
  background: var(--glass); border: 1px solid var(--glass-border); border-radius: var(--radius);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  padding: 0.4rem 1.4rem;
}
.fact { display: flex; justify-content: space-between; gap: 1rem; padding: 0.85rem 0; border-bottom: 1px solid var(--line); }
.fact:last-child { border-bottom: none; }
.fact .k { font-family: var(--font-mono); font-size: 0.64rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); padding-top: 0.2rem; white-space: nowrap; }
.fact .v { text-align: right; font-size: 0.95rem; }
.fact .v sub { display: block; font-size: 0.78rem; color: var(--muted); vertical-align: baseline; }

/* ---------- Signup ---------- */

.signup .inner {
  background: var(--glass); border: 1px solid var(--glass-border); border-radius: calc(var(--radius) * 1.4);
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  box-shadow: var(--shadow);
  padding: clamp(2rem, 5vw, 3.4rem);
}
.signup h2 { font-size: clamp(1.9rem, 4.4vw, 3rem); font-weight: 250; line-height: 1.08; margin: 0 0 0.8rem; max-width: 20ch; text-wrap: balance; }
.signup .sub { max-width: 48ch; color: var(--muted); margin: 0 0 1.7rem; }
.signup form { display: flex; gap: 0.6rem; max-width: 480px; flex-wrap: wrap; }
.signup input {
  flex: 1 1 220px; background: color-mix(in srgb, var(--paper) 70%, transparent);
  border: 1px solid var(--glass-border); border-radius: 999px;
  color: var(--ink); font-family: inherit; font-size: 0.9rem; padding: 0.85rem 1.25rem;
}
.signup input::placeholder { color: var(--muted); }
.signup button {
  font-family: inherit; font-size: 0.86rem; font-weight: 500; letter-spacing: 0.03em;
  background: var(--frost); color: #fff; border: none; border-radius: 999px;
  padding: 0.85rem 1.6rem; cursor: pointer; transition: filter .15s;
}
.signup button:hover { filter: brightness(1.07); }
.signup .note { font-family: var(--font-mono); font-size: 0.64rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); margin: 1.1rem 0 0; }

.signup-response { display: none; flex-basis: 100%; font-size: 0.9rem; margin: 0.4rem 0 0; }
form.success .response-success { display: block; color: var(--frost); }
form.error .response-error { display: block; color: var(--deep); }
form.loading button { opacity: 0.6; pointer-events: none; }

/* ---------- Essay-Seite ---------- */

.post-full { padding: clamp(2.6rem, 7vh, 5rem) clamp(1.2rem, 4vw, 3rem); }
.post-head { max-width: 720px; margin: 0 auto 2.4rem; }
.post-meta { display: flex; align-items: center; gap: 1rem; margin-bottom: 1.4rem; flex-wrap: wrap; }
.mono-meta { font-family: var(--font-mono); font-size: 0.68rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); }
.post-title {
  font-size: clamp(2.1rem, 5vw, 3.6rem);
  font-weight: 250; line-height: 1.08; letter-spacing: -0.015em;
  margin: 0 0 0.8rem; text-wrap: balance;
}
.post-subtitle { font-size: 1.12rem; color: var(--muted); margin: 0; max-width: 52ch; }

.prose-content { max-width: 720px; margin: 0 auto; font-size: 1.06rem; line-height: 1.78; }
.prose-content > * { margin-top: 0; margin-bottom: 1.25em; }
.prose-content h2 {
  font-size: 1.55rem; font-weight: 500; line-height: 1.2; letter-spacing: -0.005em;
  margin: 2.4em 0 0.7em; padding-top: 1.2em; border-top: 1px solid var(--line);
}
.prose-content h3 { font-size: 1.25rem; font-weight: 500; margin: 2em 0 0.6em; }
.prose-content strong { font-weight: 600; }
.prose-content em { font-style: italic; }
.prose-content a { color: var(--frost); text-decoration-color: var(--frost-soft); text-underline-offset: 3px; }
.prose-content blockquote {
  margin: 1.6em 0; padding: 1rem 1.4rem;
  background: var(--glass); border: 1px solid var(--glass-border);
  border-left: 3px solid var(--deep); border-radius: 0 var(--radius) var(--radius) 0;
  font-weight: 300; font-size: 1.1em;
}
.prose-content blockquote p { margin: 0; }
.prose-content hr { border: none; border-top: 1px dashed var(--line); margin: 2.4em 0; }
.prose-content ul, .prose-content ol { padding-left: 1.4em; }
.prose-content li { margin-bottom: 0.4em; }
.prose-content figcaption { font-family: var(--font-mono); font-size: 0.7rem; letter-spacing: 0.08em; color: var(--muted); text-transform: uppercase; text-align: center; margin-top: 0.6rem; }
.prose-content pre { overflow-x: auto; background: var(--glass); border: 1px solid var(--glass-border); border-radius: var(--radius); padding: 1rem 1.2rem; font-size: 0.85em; }
.prose-content code { font-family: var(--font-mono); font-size: 0.9em; }
.prose-content table { width: 100%; border-collapse: collapse; font-size: 0.92em; }
.prose-content th, .prose-content td { text-align: left; padding: 0.5em 0.7em; border-bottom: 1px solid var(--line); }

/* Callout-Karten: immer im Glas-Stil, unabhängig von der im Editor gewählten Farbe */
.kg-callout-card {
  background: var(--glass) !important;
  border: 1px solid var(--glass-border);
  border-left: 3px solid var(--frost);
  border-radius: 0 var(--radius) var(--radius) 0;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  padding: 1.1rem 1.4rem;
}
.kg-callout-card .kg-callout-text { color: var(--muted); font-size: 0.95rem; line-height: 1.6; }
.kg-callout-card .kg-callout-emoji { display: none; }

/* Editor-Breiten (Koenig-Karten) */
.kg-width-wide { position: relative; width: min(88vw, 1040px); margin-left: 50%; transform: translateX(-50%); }
.kg-width-full { position: relative; width: 100vw; margin-left: 50%; transform: translateX(-50%); }
.kg-width-full img { width: 100%; }

/* Ghosts eingebaute Standard-Schranke ausblenden: das Theme bringt seine eigene (.paywall) mit */
.gh-post-upgrade-cta { display: none !important; }

/* Bezahlschranke */
.paywall {
  max-width: 720px; margin: 2.6rem auto 0;
  background: var(--glass); border: 1px solid var(--frost); border-radius: calc(var(--radius) * 1.4);
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  box-shadow: var(--shadow);
  padding: clamp(1.8rem, 4vw, 2.8rem);
}
.paywall .label { display: block; margin-bottom: 0.8rem; }
.paywall h2 { font-size: clamp(1.5rem, 3.4vw, 2.1rem); font-weight: 300; line-height: 1.15; margin: 0 0 0.7rem; text-wrap: balance; }
.paywall p { color: var(--muted); margin: 0 0 1.5rem; max-width: 52ch; }

.post-foot { max-width: 720px; margin: 3rem auto 0; padding-top: 1.6rem; border-top: 1px solid var(--line); }

/* ---------- Archiv ---------- */

.archive-head { padding: clamp(2.6rem, 7vh, 4.5rem) 0 2.2rem; }
.archive-head .label { display: block; margin-bottom: 0.9rem; }
.archive { padding-bottom: clamp(3rem, 8vh, 5rem); }

.pagination {
  display: flex; justify-content: space-between; align-items: center;
  margin-top: 2.4rem; font-size: 0.86rem;
}
.pagination a { font-weight: 500; color: var(--frost); text-decoration: none; }
.pagination .page-number { font-family: var(--font-mono); font-size: 0.7rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }

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

.site-foot { border-top: 1px solid var(--line); padding: 2.6rem 0 3.2rem; }
.foot-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 2rem; flex-wrap: wrap; margin-bottom: 1.6rem; }
.foot-links { display: flex; gap: 1.5rem; flex-wrap: wrap; align-items: center; }
.foot-links a { font-size: 0.82rem; color: var(--muted); text-decoration: none; }
.foot-links a:hover { color: var(--ink); }
.foot-links .nav { display: contents; }
.foot-links .nav a { font-size: 0.82rem; font-weight: 400; }
.disclaimer { font-size: 0.8rem; color: var(--muted); max-width: 70ch; margin: 0; }

/* ---------- Reveal ---------- */

.reveal { opacity: 0; transform: translateY(14px); transition: opacity .6s ease, transform .6s ease; }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .defl { stroke-dashoffset: 0 !important; }
  .cut:hover, .load:hover, .essay:hover { transform: none; }
}
