/* ==========================================================================
   krotkev — Gedichte & visuelle Poesie
   Design-Tokens: siehe unten. Farben und Typografie NUR hier ändern,
   dann wirkt es auf allen Seiten.
   ========================================================================== */

:root {
  /* Farben */
  --bg:          #ffffff;   /* reines Weiß, Basis */
  --bg-raised:   #f5f5f4;   /* leicht abgehobene Flächen (Karten) */
  --ink:         #14110f;   /* Haupttext, fast Schwarz */
  --ink-muted:   #6b6b68;   /* Sekundärtext, Meta-Infos */
  --line:        #e2e0dc;   /* Trennlinien, sehr dezent */
  --blood:       #14110f;   /* Hauptakzent: Schwarz */
  --blood-bright:#14110f;   /* Akzent für Hover/Fokus, gleich dunkel */

  /* Typografie */
  --font-display: "Fraunces", Georgia, serif;
  --font-body:    "Literata", Georgia, serif;
  --font-ui:      "Inter", -apple-system, sans-serif;

  --measure: 34rem; /* Lesebreite für Fließtext */
}

/* Dunkler Modus — wird per JS über data-theme="dark" auf <html> gesetzt */
:root[data-theme="dark"] {
  --bg:          #14110f;
  --bg-raised:   #1c1815;
  --ink:         #ece6df;
  --ink-muted:   #948c7f;
  --line:        #2c2620;
  --blood:       #ece6df;
  --blood-bright:#ffffff;
}

/* Hero-Bild: wechselt automatisch zwischen hell/dunkel */
.hero-photo--dark { display: none !important; }
:root[data-theme="dark"] .hero-photo--light { display: none !important; }
:root[data-theme="dark"] .hero-photo--dark { display: block !important; }

/* sanfter Übergang beim Umschalten */
body, .poem-preview, .link-list a, .site-nav a {
  transition: background-color 0.25s ease, color 0.25s ease, border-color 0.25s ease;
}

* { box-sizing: border-box; }

html, body {
  overflow-x: hidden;
  max-width: 100%;
}

html {
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

::selection {
  background: var(--blood);
  color: var(--bg);
}

a {
  color: inherit;
  text-decoration: none;
}

a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--blood-bright);
  outline-offset: 3px;
}

/* ---------- Layout-Grundgerüst ---------- */

.wrap {
  max-width: 64rem;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* ---------- Header ---------- */

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 2rem 0 1.5rem;
  border-bottom: 1px solid var(--line);
}

.wordmark {
  font-family: var(--font-ui);
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: 0.18em;
  text-transform: lowercase;
  color: var(--ink);
  display: inline-flex;
  align-items: baseline;
  gap: 0.5em;
}

.wordmark .dot {
  color: var(--blood-bright);
}

.site-nav {
  display: flex;
  gap: 1.75rem;
  font-family: var(--font-ui);
  font-size: 0.85rem;
  letter-spacing: 0.04em;
}

.nav-group {
  display: flex;
  align-items: center;
}

.site-nav a {
  color: var(--ink-muted);
  padding-bottom: 0.2rem;
  border-bottom: 1px solid transparent;
  transition: color 0.2s ease, border-color 0.2s ease;
}

.site-nav a:hover,
.site-nav a[aria-current="page"] {
  color: var(--ink);
  border-color: var(--blood);
}

.nav-toggle { display: none; }

.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.1rem;
  height: 2.1rem;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: none;
  cursor: pointer;
  color: var(--ink);
  margin-left: 1.25rem;
  flex-shrink: 0;
}

.theme-toggle:hover {
  border-color: var(--blood);
}

.theme-toggle svg {
  width: 1.05rem;
  height: 1.05rem;
}

.theme-toggle .icon-moon { display: none; }
:root[data-theme="dark"] .theme-toggle .icon-sun { display: none; }
:root[data-theme="dark"] .theme-toggle .icon-moon { display: block; }

@media (max-width: 40rem) {
  .site-header { flex-wrap: wrap; row-gap: 0.85rem; }
  .nav-group { flex-wrap: wrap; row-gap: 0.6rem; }
  .site-nav { flex-wrap: wrap; row-gap: 0.5rem; gap: 0.85rem; font-size: 0.78rem; }
  .theme-toggle { width: 1.9rem; height: 1.9rem; margin-left: 0.75rem; }
  .theme-toggle svg { width: 0.95rem; height: 0.95rem; }
  .wrap { padding: 0 1.1rem; }
}

/* ---------- Hero (nur Startseite) ---------- */

.hero {
  position: relative;
  padding: 5rem 0 4rem;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 2rem;
  align-items: start;
}

.pulse {
  width: 2px;
  height: 100%;
  min-height: 8rem;
  background: var(--blood);
  transform-origin: top;
  animation: pulse 2.6s ease-in-out infinite;
  margin-top: 0.4rem;
}

@keyframes pulse {
  0%, 100% { opacity: 0.35; transform: scaleY(0.85); }
  50%      { opacity: 1;    transform: scaleY(1); }
}

.hero h1 {
  font-family: var(--font-display);
  font-weight: 500;
  font-optical-sizing: auto;
  font-size: clamp(2.1rem, 5vw, 3.4rem);
  line-height: 1.15;
  margin: 0 0 1.25rem;
}

.hero h1 em {
  font-style: italic;
  color: var(--blood-bright);
}

.hero p {
  font-family: var(--font-body);
  color: var(--ink-muted);
  max-width: var(--measure);
  font-size: 1.05rem;
}

@media (max-width: 40rem) {
  .hero { grid-template-columns: 1fr; padding: 3rem 0 2.5rem; }
  .pulse { display: none; }
}

/* ---------- Abschnittstitel ---------- */

.section-label {
  font-family: var(--font-ui);
  font-size: 0.75rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--blood-bright);
  margin: 0 0 0.75rem;
}

section {
  padding: 3rem 0;
}

section + section {
  border-top: 1px solid var(--line);
}

/* ---------- Gedicht-Vorschau (Karten) ---------- */

.poem-preview-list {
  display: flex;
  flex-direction: column;
}

.poem-preview {
  display: block;
  padding: 1.75rem 0;
  border-top: 1px solid var(--line);
  transition: padding-left 0.25s ease;
}

.poem-preview:first-child { border-top: none; }

.poem-preview:hover,
.poem-preview:focus-visible {
  padding-left: 0.75rem;
}

.poem-preview .meta {
  font-family: var(--font-ui);
  font-size: 0.75rem;
  color: var(--ink-muted);
  letter-spacing: 0.04em;
  margin: 0 0 0.4rem;
}

.poem-preview h3 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 1.5rem;
  margin: 0 0 0.5rem;
}

.poem-preview .excerpt {
  color: var(--ink-muted);
  font-size: 0.98rem;
  max-width: var(--measure);
  font-style: italic;
}

.read-more {
  display: inline-block;
  margin-top: 0.6rem;
  font-family: var(--font-ui);
  font-size: 0.8rem;
  color: var(--blood-bright);
}

/* ---------- Volltext-Gedicht ---------- */

.poem {
  padding: 3.5rem 0;
  border-top: 1px solid var(--line);
  scroll-margin-top: 2rem;
}

.poem:first-of-type { border-top: none; }

.poem .meta {
  font-family: var(--font-ui);
  font-size: 0.75rem;
  color: var(--ink-muted);
  letter-spacing: 0.04em;
  margin: 0 0 0.6rem;
}

.poem h2 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 2rem;
  margin: 0 0 1.75rem;
}

.poem .body {
  max-width: var(--measure);
  font-size: 1.08rem;
  line-height: 1.85;
}

.poem .body p {
  margin: 0 0 1.5em;
  white-space: pre-line; /* erlaubt einzelne Zeilenumbrüche innerhalb einer Strophe */
}

.poem-cross-promo {
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
  margin-top: 2rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--line);
  font-family: var(--font-ui);
  font-size: 0.85rem;
}

.poem-cross-promo a {
  color: var(--blood-bright);
}

.poem-cross-promo a:hover {
  text-decoration: underline;
}

/* ---------- Textseiten (Über mich, Kontakt) ---------- */

.prose {
  max-width: var(--measure);
  font-size: 1.05rem;
}

.prose p { margin: 0 0 1.4em; }

.prose h1 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(1.9rem, 4vw, 2.6rem);
  margin: 0 0 1.5rem;
  max-width: 16ch;
}

/* ---------- Kontakt / Social-Liste ---------- */

.link-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  max-width: 24rem;
}

.link-list li {
  border-top: 1px solid var(--line);
}

.link-list li:last-child { border-bottom: 1px solid var(--line); }

.link-list a {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 0;
  font-family: var(--font-ui);
  font-size: 0.95rem;
  transition: color 0.2s ease;
}

.link-list a:hover { color: var(--blood-bright); }

.link-list .arrow {
  color: var(--ink-muted);
  transition: transform 0.2s ease;
}

.link-list a:hover .arrow {
  transform: translateX(3px);
  color: var(--blood-bright);
}

/* ---------- Newsletter-Banner (Startseite) ---------- */

.newsletter-banner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 2rem;
  flex-wrap: wrap;
  padding: 2rem;
  background: var(--bg-raised);
  border: 1px solid var(--line);
}

.newsletter-banner h3 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 1.35rem;
  margin: 0 0 0.4rem;
}

.newsletter-banner p {
  color: var(--ink-muted);
  margin: 0;
  max-width: 32ch;
}

.newsletter-banner .cta {
  flex-shrink: 0;
  font-family: var(--font-ui);
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--bg);
  background: var(--blood-bright);
  padding: 0.75rem 1.5rem;
  border-radius: 999px;
  white-space: nowrap;
  transition: opacity 0.2s ease;
}

.newsletter-banner .cta:hover {
  opacity: 0.85;
}

@media (max-width: 30rem) {
  .newsletter-banner { padding: 1.5rem; }
}

/* ---------- Video-Einbettung (YouTube) ---------- */

.video-block {
  padding: 1.75rem 0;
  border-top: 1px solid var(--line);
}

.video-block:first-child { border-top: none; }

.video-block .meta {
  font-family: var(--font-ui);
  font-size: 0.75rem;
  color: var(--ink-muted);
  letter-spacing: 0.04em;
  margin: 0 0 0.4rem;
}

.video-block h3 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 1.4rem;
  margin: 0 0 1rem;
}

.video-embed {
  position: relative;
  width: 100%;
  max-width: var(--measure);
  aspect-ratio: 16 / 9;
  background: var(--bg-raised);
  border: 1px solid var(--line);
}

.video-embed iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

/* ---------- Substack-Embed ---------- */

.substack-embed {
  max-width: var(--measure);
  border: 1px solid var(--line);
  background: var(--bg-raised);
  overflow: hidden;
}

.substack-embed iframe {
  width: 100%;
  border: 0;
  display: block;
}

/* ---------- Footer ---------- */

.site-footer {
  border-top: 1px solid var(--line);
  padding: 2.5rem 0 3rem;
  margin-top: 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--font-ui);
  font-size: 0.78rem;
  color: var(--ink-muted);
  letter-spacing: 0.02em;
}

.site-footer a { transition: color 0.2s ease; }
.site-footer a:hover { color: var(--blood-bright); }

.footer-links {
  display: flex;
  gap: 1.5rem;
}

@media (max-width: 30rem) {
  .footer-links { gap: 1.1rem; }
}

@media (max-width: 30rem) {
  .site-footer { flex-direction: column; gap: 0.75rem; align-items: flex-start; }
}
