/* ═══════════════════════════════════════════════
   Leuchten lernen. — Ghost Theme
   ═══════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400;0,500;0,700;1,400;1,500&family=Source+Serif+4:ital,opsz,wght@0,8..60,300;0,8..60,400;1,8..60,300;1,8..60,400&display=swap');

/* ── Variables ── */
:root {
  --midnight:   #0e1118;
  --surface:    #151b25;
  --surface-2:  #1c2535;
  --warm-white: #f5ede0;
  --text:       #c8bfb0;
  --muted:      #7a8799; /* aufgehellt für WCAG AA: 4,72:1 auf --surface, 5,20:1 auf --midnight */
  --rule:       rgba(255,255,255,0.06);

  --rainbow: linear-gradient(90deg,
    #ff4444, #ff9500, #ffe600,
    #44cc44, #2288ff, #6644ff, #cc44ff, #ff44aa);
}

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { font-size: 16px; scroll-behavior: smooth; }

body {
  background: var(--midnight);
  color: var(--text);
  font-family: 'Source Serif 4', Georgia, serif;
  font-weight: 300;
  line-height: 1.85;
  font-optical-sizing: auto;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
a   { color: inherit; text-decoration: none; }

/* ═══════════════════════════════════════════════
   SITE HEADER / NAV
   ═══════════════════════════════════════════════ */
.site-header {
  background: var(--surface);
  border-bottom: 1px solid var(--rule);
  padding: 1rem 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 100;
}

.site-logo {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  font-family: 'Playfair Display', serif;
  font-weight: 400;
  font-size: 1rem;
  white-space: nowrap;
}

.logo-icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.logo-wordmark {
  color: var(--warm-white);
  letter-spacing: 0;
  word-spacing: -0.02em;
}

.logo-wordmark em {
  font-style: italic;
  color: var(--warm-white);
}

/* legacy spans — kept for safety */
.logo-leuchten { color: var(--warm-white); }
.logo-lernen   { color: var(--warm-white); font-style: italic; }
.logo-dot      { color: white; }

.site-nav {
  display: flex;
  gap: 1.5rem;
  list-style: none;
}

.site-nav a {
  font-size: 0.68rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
  transition: color 0.2s;
}

.site-nav a:hover { color: var(--warm-white); }

/* ═══════════════════════════════════════════════
   HERO (index only)
   ═══════════════════════════════════════════════ */
.site-hero {
  background: var(--surface);
  padding: 5rem 2rem 4.5rem;
  text-align: center;
  border-bottom: 1px solid var(--rule);
}

.hero-eyebrow {
  font-size: 0.65rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 1.5rem;
}

.hero-icon {
  width: 72px;
  height: 72px;
  margin: 0 auto 2rem;
}

.hero-icon .ray { transform-origin: 36px 36px; }
.r1 { animation: rp1 4s 0.0s ease-in-out infinite; }
.r2 { animation: rp2 4s 0.5s ease-in-out infinite; }
.r3 { animation: rp3 4s 1.0s ease-in-out infinite; }
.r4 { animation: rp4 4s 1.5s ease-in-out infinite; }
.r5 { animation: rp5 4s 2.0s ease-in-out infinite; }
.r6 { animation: rp6 4s 2.5s ease-in-out infinite; }
.r7 { animation: rp7 4s 3.0s ease-in-out infinite; }
.r8 { animation: rp8 4s 3.5s ease-in-out infinite; }

@keyframes rp1 { 0%,100%{opacity:.25;filter:drop-shadow(0 0 3px #ff4444)} 50%{opacity:.9;filter:drop-shadow(0 0 8px #ff4444)} }
@keyframes rp2 { 0%,100%{opacity:.25;filter:drop-shadow(0 0 3px #ff9500)} 50%{opacity:.9;filter:drop-shadow(0 0 8px #ff9500)} }
@keyframes rp3 { 0%,100%{opacity:.25;filter:drop-shadow(0 0 3px #ffe600)} 50%{opacity:.9;filter:drop-shadow(0 0 8px #ffe600)} }
@keyframes rp4 { 0%,100%{opacity:.25;filter:drop-shadow(0 0 3px #44cc44)} 50%{opacity:.9;filter:drop-shadow(0 0 8px #44cc44)} }
@keyframes rp5 { 0%,100%{opacity:.25;filter:drop-shadow(0 0 3px #2288ff)} 50%{opacity:.9;filter:drop-shadow(0 0 8px #2288ff)} }
@keyframes rp6 { 0%,100%{opacity:.25;filter:drop-shadow(0 0 3px #6644ff)} 50%{opacity:.9;filter:drop-shadow(0 0 8px #6644ff)} }
@keyframes rp7 { 0%,100%{opacity:.25;filter:drop-shadow(0 0 3px #cc44ff)} 50%{opacity:.9;filter:drop-shadow(0 0 8px #cc44ff)} }
@keyframes rp8 { 0%,100%{opacity:.25;filter:drop-shadow(0 0 3px #ff44aa)} 50%{opacity:.9;filter:drop-shadow(0 0 8px #ff44aa)} }

.core-pulse {
  animation: cpulse 4s ease-in-out infinite;
}
@keyframes cpulse {
  0%,100% { opacity:.9; filter:drop-shadow(0 0 6px rgba(255,255,255,.6)); }
  50%      { opacity:1;  filter:drop-shadow(0 0 14px rgba(255,255,255,.9)); }
}

.hero-title {
  font-family: 'Playfair Display', serif;
  font-weight: 500;
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  line-height: 1.2;
  color: var(--warm-white);
  margin-bottom: 1.2rem;
}

.hero-title em {
  font-style: italic;
  color: var(--warm-white);
}

.hero-desc {
  font-size: 0.65rem;
  font-weight: 300;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--muted);
  max-width: 420px;
  margin: 0 auto 2.5rem;
  line-height: 1.85;
}

.hero-rule {
  width: 60px;
  height: 2px;
  background: var(--rainbow);
  margin: 0 auto;
  border-radius: 2px;
  opacity: 0.7;
}

/* ═══════════════════════════════════════════════
   POST LIST (index)
   ═══════════════════════════════════════════════ */
.post-feed {
  max-width: 740px;
  margin: 0 auto;
  padding: 0 2rem;
}

.post-card {
  display: grid;
  grid-template-columns: 2.5rem 1fr;
  gap: 1.5rem;
  padding: 2rem 0;
  border-bottom: 1px solid var(--rule);
  align-items: start;
}

.post-card:last-child { border-bottom: none; }

.post-number {
  font-family: 'Playfair Display', serif;
  font-size: 0.8rem;
  color: rgba(255,255,255,0.12);
  padding-top: 0.25rem;
  text-align: right;
  letter-spacing: 0.05em;
}

.post-date {
  font-size: 0.7rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 0.4rem;
}

/* rainbow accent dot before date */
.post-date::before {
  content: '·';
  background: var(--rainbow);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-right: 0.4em;
  font-size: 1rem;
  line-height: 0;
  vertical-align: -0.1em;
}

.post-title {
  font-family: 'Playfair Display', serif;
  font-size: 1.1rem;
  font-weight: 400;
  color: var(--warm-white);
  line-height: 1.4;
  margin-bottom: 0.4rem;
  transition: color 0.2s;
}

.post-card a:hover .post-title {
  color: rgba(245,237,224,0.75);
}

.post-excerpt {
  font-size: 0.85rem;
  font-weight: 300;
  color: var(--muted);
  line-height: 1.7;
}

/* ═══════════════════════════════════════════════
   SINGLE POST
   ═══════════════════════════════════════════════ */
.post-header {
  background: var(--surface);
  padding: 4rem 2rem 3.5rem;
  text-align: center;
  border-bottom: 1px solid var(--rule);
}

.post-header .post-date {
  margin-bottom: 1.2rem;
  display: block;
}

.post-header-title {
  font-family: 'Playfair Display', serif;
  font-weight: 500;
  font-size: clamp(1.8rem, 4vw, 3rem);
  line-height: 1.2;
  color: var(--warm-white);
  max-width: 680px;
  margin: 0 auto 2rem;
}

.post-header .hero-rule { margin-top: 0; }

.post-feature-image {
  max-width: 740px;
  margin: 0 auto;
  padding: 2.5rem 2rem 0;
}

.post-feature-image img {
  width: 100%;
  border: 1px solid var(--rule);
}

.post-content {
  max-width: 640px;
  margin: 0 auto;
  padding: 3rem 2rem 5rem;
}

/* Ghost content styles */
.gh-content h2 {
  font-family: 'Playfair Display', serif;
  font-weight: 500;
  font-size: 1.5rem;
  color: var(--warm-white);
  margin: 2.5rem 0 1rem;
  line-height: 1.3;
}

.gh-content h3 {
  font-family: 'Playfair Display', serif;
  font-weight: 400;
  font-size: 1.15rem;
  font-style: italic;
  color: var(--warm-white);
  margin: 2rem 0 0.8rem;
}

.gh-content p {
  margin-bottom: 1.5rem;
  font-size: 1rem;
  line-height: 1.85;
  color: var(--text);
}

.gh-content a {
  color: var(--warm-white);
  border-bottom: 1px solid rgba(255,255,255,0.2);
  transition: border-color 0.2s;
}

.gh-content a:hover {
  border-color: rgba(255,255,255,0.5);
}

.gh-content blockquote {
  border-left: 2px solid;
  border-image: linear-gradient(180deg, #ff4444, #ff9500, #ffe600, #44cc44, #2288ff, #6644ff, #cc44ff, #ff44aa) 1;
  padding: 0.5rem 0 0.5rem 1.5rem;
  margin: 2rem 0;
  font-style: italic;
  color: var(--warm-white);
  font-size: 1.05rem;
}

.gh-content ul,
.gh-content ol {
  padding-left: 1.5rem;
  margin-bottom: 1.5rem;
  color: var(--text);
}

.gh-content li { margin-bottom: 0.4rem; }

.gh-content hr {
  border: none;
  height: 2px;
  background: var(--rainbow);
  opacity: 0.3;
  margin: 3rem auto;
  width: 60px;
  border-radius: 2px;
}

.gh-content figure {
  margin: 2.5rem 0;
}

.gh-content figcaption {
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  color: var(--muted);
  text-align: center;
  margin-top: 0.75rem;
}

/* ── Post navigation ── */
.post-nav {
  max-width: 740px;
  margin: 0 auto;
  padding: 2rem;
  display: flex;
  justify-content: space-between;
  border-top: 1px solid var(--rule);
  gap: 1rem;
}

.post-nav a {
  font-size: 0.7rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--muted);
  transition: color 0.2s;
}

.post-nav a:hover { color: var(--warm-white); }

/* ═══════════════════════════════════════════════
   PAGE (about etc.)
   ═══════════════════════════════════════════════ */
.page-header {
  background: var(--surface);
  padding: 4rem 2rem 3rem;
  text-align: center;
  border-bottom: 1px solid var(--rule);
}

.page-title {
  font-family: 'Playfair Display', serif;
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  font-weight: 500;
  color: var(--warm-white);
  margin-bottom: 1.5rem;
}

.page-content {
  max-width: 640px;
  margin: 0 auto;
  padding: 3rem 2rem 5rem;
}

/* ═══════════════════════════════════════════════
   SITE FOOTER
   ═══════════════════════════════════════════════ */
.site-footer {
  background: var(--surface);
  border-top: 1px solid var(--rule);
  padding: 2.5rem 2rem;
  text-align: center;
}

.footer-logo {
  font-family: 'Playfair Display', serif;
  font-size: 0.9rem;
  color: var(--warm-white);
  margin-bottom: 0.6rem;
}

.footer-logo em { font-style: italic; }

.footer-tagline {
  font-size: 0.65rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 1.5rem;
}

.footer-rainbow {
  width: 40px;
  height: 1px;
  background: var(--rainbow);
  margin: 0 auto 1.5rem;
  opacity: 0.5;
}

.footer-copy {
  font-size: 0.7rem;
  color: var(--muted);
  letter-spacing: 0.05em;
}

.footer-rss {
  color: var(--muted);
  transition: color 0.2s;
}

.footer-rss:hover { color: var(--warm-white); }

/* ═══════════════════════════════════════════════
   PAGINATION
   ═══════════════════════════════════════════════ */
.pagination {
  max-width: 740px;
  margin: 0 auto;
  padding: 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid var(--rule);
}

.pagination a,
.pagination span {
  font-size: 0.68rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
}

.pagination a:hover { color: var(--warm-white); }

/* ═══════════════════════════════════════════════
   404
   ═══════════════════════════════════════════════ */
.error-page {
  min-height: 60vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 4rem 2rem;
}

.error-code {
  font-family: 'Playfair Display', serif;
  font-size: 5rem;
  font-weight: 300;
  color: rgba(255,255,255,0.06);
  line-height: 1;
  margin-bottom: 1rem;
}

.error-title {
  font-family: 'Playfair Display', serif;
  font-size: 1.4rem;
  color: var(--warm-white);
  margin-bottom: 0.8rem;
}

.error-desc {
  font-size: 0.9rem;
  color: var(--muted);
  margin-bottom: 2rem;
}

.btn {
  display: inline-block;
  padding: 0.6rem 1.5rem;
  border: 1px solid var(--rule);
  font-size: 0.68rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
  transition: color 0.2s, border-color 0.2s;
}

.btn:hover {
  color: var(--warm-white);
  border-color: rgba(255,255,255,0.2);
}

/* ═══════════════════════════════════════════════
   BURGER MENU
   ═══════════════════════════════════════════════ */
.burger {
  display: none;
  flex-direction: column;
  justify-content: space-between;
  /* Touch-Target 44×44px, visuell 22×16px */
  width: 44px;
  height: 44px;
  padding: 14px 11px;
  background: none;
  border: none;
  cursor: pointer;
  flex-shrink: 0;
}

.burger span {
  display: block;
  width: 100%;
  height: 1.5px;
  background: var(--muted);
  transition: transform 0.25s, opacity 0.2s;
}

.burger[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(7.25px) rotate(45deg);
}
.burger[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
}
.burger[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-7.25px) rotate(-45deg);
}

/* Mobile overlay nav */
.mobile-nav {
  display: none;
  position: fixed;
  inset: 0;
  background: var(--surface);
  z-index: 99;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.mobile-nav.is-open { display: flex; }

body.nav-open { overflow: hidden; }

.mobile-nav ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.mobile-nav a {
  font-size: 0.68rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
  transition: color 0.2s;
}

.mobile-nav a:hover { color: var(--warm-white); }

/* ═══════════════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════════════ */
@media (max-width: 600px) {
  .site-header { padding: 0.9rem 1.2rem; }
  .site-nav { display: none; }
  .burger { display: flex; }
  .post-feed { padding: 0 1.2rem; }
  .post-content { padding: 2.5rem 1.2rem 4rem; }
  .post-header { padding: 3rem 1.2rem 2.5rem; }
  .site-hero { padding: 3.5rem 1.2rem 3rem; }
}

/* ═══════════════════════════════════════════════
   FOCUS (Tastaturnavigation)
   ═══════════════════════════════════════════════ */
:focus-visible {
  outline: 2px solid var(--warm-white);
  outline-offset: 3px;
  border-radius: 2px;
}

.gh-content a:focus-visible {
  outline-offset: 2px;
}

/* ═══════════════════════════════════════════════
   REDUCED MOTION
   ═══════════════════════════════════════════════ */
@media (prefers-reduced-motion: reduce) {
  .ray {
    animation: none;
    opacity: 0.6;
  }
  .core-pulse {
    animation: none;
  }
  .burger span {
    transition: none;
  }
  .site-nav a,
  .mobile-nav a,
  .post-nav a,
  .footer-rss,
  .pagination a,
  .btn,
  .gh-content a {
    transition: none;
  }
}

/* ═══════════════════════════════════════════════
   KOENIG EDITOR — required classes
   ═══════════════════════════════════════════════ */
.gh-content .kg-width-wide {
  margin-left: calc(50% - 50vw + 2rem);
  margin-right: calc(50% - 50vw + 2rem);
  max-width: 100vw;
}

.gh-content .kg-width-full {
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
  max-width: 100vw;
}

.gh-content .kg-image { max-width: 100%; }

.gh-content .kg-gallery-container {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.gh-content .kg-gallery-row {
  display: flex;
  gap: 0.5rem;
}

.gh-content .kg-gallery-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.gh-content .kg-bookmark-card {
  border: 1px solid var(--rule);
  padding: 1.2rem;
  margin: 1.5rem 0;
}

.gh-content .kg-bookmark-title {
  font-family: 'Playfair Display', serif;
  color: var(--warm-white);
  margin-bottom: 0.3rem;
}

.gh-content .kg-bookmark-description {
  font-size: 0.85rem;
  color: var(--muted);
}

.gh-content .kg-callout-card {
  display: flex;
  gap: 1rem;
  padding: 1.2rem 1.5rem;
  background: var(--surface);
  border-left: 2px solid;
  border-image: linear-gradient(180deg, #ff4444, #ff9500, #ffe600, #44cc44, #2288ff, #6644ff, #cc44ff, #ff44aa) 1;
  margin: 1.5rem 0;
}

.gh-content .kg-callout-text { color: var(--text); }

.gh-content .kg-toggle-card {
  border: 1px solid var(--rule);
  padding: 1rem 1.2rem;
  margin: 1.5rem 0;
}

.gh-content .kg-toggle-heading-text {
  font-family: 'Playfair Display', serif;
  color: var(--warm-white);
}

.gh-content .kg-video-card { margin: 2rem 0; }
.gh-content .kg-video-card video { width: 100%; }

.gh-content .kg-audio-card { margin: 2rem 0; }

.gh-content .kg-button-card {
  text-align: center;
  margin: 2rem 0;
}

.gh-content .kg-button-card a {
  display: inline-block;
  padding: 0.7rem 1.8rem;
  border: 1px solid rgba(255,255,255,0.15);
  color: var(--warm-white);
  font-size: 0.8rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  border-bottom: none;
  transition: background 0.2s;
}

.gh-content .kg-button-card a:hover {
  background: rgba(255,255,255,0.05);
}
