/* Self-hosted fonts (replaces Google Fonts CDN) */
@font-face {
  font-family: 'Fraunces';
  font-style: normal;
  font-weight: 400 500;
  font-display: swap;
  src: url('/fonts/fraunces-roman.woff2') format('woff2-variations'),
       url('/fonts/fraunces-roman.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Fraunces';
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url('/fonts/fraunces-italic.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400 500;
  font-display: swap;
  src: url('/fonts/inter-roman.woff2') format('woff2-variations'),
       url('/fonts/inter-roman.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --bg-0: #050510;
  --bg-1: #0e0e22;
  --bg-2: #14142b;
  --card: rgba(255, 255, 255, 0.035);
  --card-strong: rgba(255, 255, 255, 0.06);
  --card-border: rgba(255, 255, 255, 0.08);
  --card-border-hover: rgba(245, 230, 168, 0.25);
  --text: #f0e9d8;
  --text-muted: #8a8499;
  --text-dim: #5c5670;
  --accent: #f5e6a8;
  --accent-soft: #c9b878;
  --accent-glow: rgba(245, 230, 168, 0.35);
  --eclipse: #b8a4ff;
  --supermoon: #ffd47a;
  --serif: 'Fraunces', Georgia, 'Times New Roman', serif;
  --sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  --radius: 18px;
  --max: 960px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  color: var(--text);
  background: radial-gradient(ellipse at 20% 0%, #1a1a3a 0%, transparent 55%),
              radial-gradient(ellipse at 80% 100%, #1f1530 0%, transparent 55%),
              linear-gradient(180deg, var(--bg-0) 0%, var(--bg-1) 100%);
  background-attachment: fixed;
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ---------- Parallax background ---------- */

.parallax {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}
.parallax-layer { position: absolute; inset: -10% 0; will-change: transform; }
.parallax-stars-far {
  background-image:
    radial-gradient(1px 1px at 12% 18%, rgba(255,255,255,0.45), transparent 60%),
    radial-gradient(1px 1px at 28% 72%, rgba(255,255,255,0.35), transparent 60%),
    radial-gradient(1px 1px at 78% 24%, rgba(255,255,255,0.5), transparent 60%),
    radial-gradient(1px 1px at 65% 56%, rgba(255,255,255,0.3), transparent 60%),
    radial-gradient(1px 1px at 88% 80%, rgba(255,255,255,0.4), transparent 60%),
    radial-gradient(1px 1px at 42% 32%, rgba(255,255,255,0.45), transparent 60%),
    radial-gradient(1px 1px at 8% 88%, rgba(255,255,255,0.35), transparent 60%),
    radial-gradient(1px 1px at 55% 12%, rgba(255,255,255,0.5), transparent 60%),
    radial-gradient(1px 1px at 95% 48%, rgba(255,255,255,0.4), transparent 60%);
  background-size: 100% 1400px;
  background-repeat: repeat-y;
}
.parallax-stars-mid {
  background-image:
    radial-gradient(1.5px 1.5px at 20% 30%, rgba(255,255,255,0.55), transparent 60%),
    radial-gradient(1.5px 1.5px at 60% 70%, rgba(255,250,230,0.45), transparent 60%),
    radial-gradient(2px 2px at 80% 20%, rgba(255,255,255,0.6), transparent 60%),
    radial-gradient(1.5px 1.5px at 30% 80%, rgba(255,255,255,0.4), transparent 60%),
    radial-gradient(1.5px 1.5px at 90% 60%, rgba(255,250,230,0.5), transparent 60%),
    radial-gradient(1.5px 1.5px at 40% 50%, rgba(255,255,255,0.45), transparent 60%);
  background-size: 100% 1100px;
  background-repeat: repeat-y;
}
.parallax-stars-near {
  background-image:
    radial-gradient(2.5px 2.5px at 15% 40%, rgba(255,255,255,0.7), transparent 60%),
    radial-gradient(2px 2px at 70% 25%, rgba(255,250,230,0.65), transparent 60%),
    radial-gradient(2.5px 2.5px at 50% 85%, rgba(255,255,255,0.7), transparent 60%),
    radial-gradient(2px 2px at 85% 70%, rgba(255,255,255,0.55), transparent 60%);
  background-size: 100% 800px;
  background-repeat: repeat-y;
}
.parallax-nebula {
  background:
    radial-gradient(ellipse 600px 350px at 75% 30%, rgba(140, 80, 200, 0.10), transparent 70%),
    radial-gradient(ellipse 700px 400px at 20% 70%, rgba(80, 120, 220, 0.08), transparent 70%);
  background-size: 100% 1500px;
  background-repeat: repeat-y;
  filter: blur(20px);
}

/* ---------- Layout ---------- */

.site-header, main, .site-footer {
  position: relative;
  z-index: 1;
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 24px;
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 28px;
  padding-bottom: 16px;
}
.logo {
  display: inline-flex; align-items: center; gap: 10px;
  text-decoration: none; color: var(--text);
  font-family: var(--serif); font-weight: 500; font-size: 18px;
  letter-spacing: 0.01em;
}
.logo-dot {
  width: 14px; height: 14px; border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #fff8e1, #f5e6a8 50%, #c9b878);
  box-shadow: 0 0 16px var(--accent-glow);
}
.lang-switch {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 13px; letter-spacing: 0.06em; text-transform: uppercase;
}
.lang-switch a {
  color: var(--text-muted); text-decoration: none;
  padding: 4px 8px; border-radius: 8px;
  transition: color 160ms ease, background 160ms ease;
}
.lang-switch a:hover { color: var(--text); }
.lang-switch a[aria-current="true"] {
  color: var(--accent); background: rgba(245, 230, 168, 0.08);
}
.lang-switch span { color: var(--text-dim); }

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

.hero {
  display: grid;
  grid-template-columns: 1fr;
  gap: 32px;
  align-items: center;
  padding: 56px 0 28px;
}
@media (min-width: 720px) {
  .hero {
    grid-template-columns: 280px 1fr;
    gap: 56px;
    padding: 80px 0 40px;
  }
}

.hero-moon {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
}
.hero-moon-svg {
  width: min(70vw, 280px);
  height: auto;
  filter: drop-shadow(0 0 60px rgba(245, 230, 168, 0.18));
  animation: gentleFloat 8s ease-in-out infinite;
  position: relative;
  z-index: 2;
}
@keyframes gentleFloat {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-6px); }
}

.eyebrow {
  font-size: 13px; letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--accent); margin-bottom: 14px; opacity: 0.85;
}

.hero-date {
  font-family: var(--serif); font-weight: 400;
  font-size: clamp(34px, 6vw, 56px);
  line-height: 1.05; letter-spacing: -0.02em;
  color: var(--text); margin-bottom: 14px;
}

.hero-badges {
  display: flex; flex-wrap: wrap; gap: 6px;
  margin-bottom: 18px;
}
.badge {
  display: inline-block;
  padding: 5px 12px;
  font-size: 12px;
  letter-spacing: 0.04em;
  border-radius: 999px;
  border: 1px solid var(--card-border);
  background: var(--card);
  color: var(--text);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.badge-folklore {
  font-family: var(--serif);
  font-style: italic;
  font-size: 13px;
  color: var(--accent);
  border-color: rgba(245, 230, 168, 0.25);
  background: rgba(245, 230, 168, 0.05);
}
.badge-supermoon {
  color: var(--supermoon);
  border-color: rgba(255, 212, 122, 0.3);
  background: rgba(255, 212, 122, 0.06);
}
.badge-eclipse {
  color: var(--eclipse);
  border-color: rgba(184, 164, 255, 0.3);
  background: rgba(184, 164, 255, 0.06);
}
.badge-bluemoon {
  font-family: var(--serif);
  font-style: italic;
  font-size: 13px;
  color: #8ec1e8;
  border-color: rgba(142, 193, 232, 0.32);
  background: rgba(142, 193, 232, 0.07);
}
.moon-item-folk-blue { color: #8ec1e8; opacity: 1; }

.hero-time {
  color: var(--text-muted);
  font-size: 16px;
  line-height: 1.7;
  margin-bottom: 28px;
}
.hero-time .local-time {
  color: var(--text);
  font-weight: 500;
}

.hero-actions {
  display: flex; flex-wrap: wrap; gap: 8px;
  margin-bottom: 28px;
}
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 16px;
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: 10px;
  color: var(--text);
  font: inherit; font-size: 14px;
  cursor: pointer;
  transition: border-color 200ms ease, background 200ms ease, color 200ms ease;
}
.btn:hover { border-color: var(--card-border-hover); color: var(--accent); }
.btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.btn svg { flex-shrink: 0; }

/* Countdown */
.countdown {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  max-width: 480px;
}
.cd-unit {
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: 14px;
  padding: 18px 8px 12px;
  text-align: center;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
.cd-num {
  display: block;
  font-family: var(--serif); font-weight: 400;
  font-variant-numeric: tabular-nums;
  font-size: clamp(28px, 5vw, 40px);
  color: var(--text);
  line-height: 1; letter-spacing: -0.02em;
}
.cd-lbl {
  display: block; margin-top: 6px;
  font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--text-muted);
}

/* ---------- Timeline ---------- */

.timeline {
  margin: 24px 0 12px;
  padding: 20px 18px;
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
.timeline-output {
  font-size: 14px;
  color: var(--text-muted);
  margin-bottom: 12px;
  font-variant-numeric: tabular-nums;
}
.timeline-output strong { color: var(--text); font-weight: 500; }
.timeline-row {
  display: flex; align-items: center; gap: 12px;
}
.timeline-slider {
  flex: 1;
  -webkit-appearance: none;
  appearance: none;
  background: transparent;
  height: 24px;
  cursor: pointer;
}
.timeline-slider::-webkit-slider-runnable-track {
  height: 4px;
  background: linear-gradient(90deg,
    rgba(245,230,168,0.15) 0%,
    rgba(245,230,168,0.5) 50%,
    rgba(245,230,168,0.15) 100%);
  border-radius: 999px;
}
.timeline-slider::-moz-range-track {
  height: 4px;
  background: linear-gradient(90deg,
    rgba(245,230,168,0.15) 0%,
    rgba(245,230,168,0.5) 50%,
    rgba(245,230,168,0.15) 100%);
  border-radius: 999px;
}
.timeline-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 18px; height: 18px;
  margin-top: -7px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #fff8e1, #f5e6a8 60%, #c9b878);
  border: 2px solid #0e0e22;
  box-shadow: 0 0 16px rgba(245, 230, 168, 0.55);
  cursor: grab;
}
.timeline-slider::-moz-range-thumb {
  width: 18px; height: 18px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #fff8e1, #f5e6a8 60%, #c9b878);
  border: 2px solid #0e0e22;
  box-shadow: 0 0 16px rgba(245, 230, 168, 0.55);
  cursor: grab;
}
.timeline-now-btn {
  flex-shrink: 0;
  padding: 6px 14px;
  font-size: 12px; letter-spacing: 0.06em; text-transform: uppercase;
  background: transparent;
  border: 1px solid var(--card-border);
  color: var(--text-muted);
  border-radius: 999px;
  cursor: pointer;
  transition: color 160ms ease, border-color 160ms ease;
}
.timeline-now-btn:hover { color: var(--accent); border-color: var(--card-border-hover); }

/* ---------- Sections ---------- */

section { padding: 36px 0; }
section + section { border-top: 1px solid rgba(255,255,255,0.04); }

h2 {
  font-family: var(--serif); font-weight: 400;
  font-size: clamp(24px, 3.4vw, 32px);
  letter-spacing: -0.01em;
  margin-bottom: 20px;
  color: var(--text);
}
h3 {
  font-family: var(--serif); font-weight: 500;
  font-size: 19px; color: var(--text);
}
p { color: var(--text-muted); }

/* Today */
.today-answer {
  font-family: var(--serif);
  font-size: clamp(22px, 3vw, 28px);
  color: var(--text);
  margin-bottom: 8px;
}
.today-answer.today-yes {
  color: var(--accent);
  text-shadow: 0 0 24px var(--accent-glow);
}
.today-phase { font-size: 14px; color: var(--text-muted); letter-spacing: 0.02em; }

/* Moonrise */
.moonrise {
  margin-top: 18px;
  display: flex; flex-wrap: wrap; align-items: center; gap: 12px;
}
.moonrise-output {
  color: var(--text-muted); font-size: 14px;
  font-variant-numeric: tabular-nums;
}
.moonrise-output strong { color: var(--accent); font-weight: 500; }

/* Upcoming list */
.moon-list {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 10px;
}
.moon-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 14px 14px 16px;
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: border-color 200ms ease, transform 200ms ease;
}
.moon-item:hover {
  border-color: var(--card-border-hover);
  transform: translateY(-1px);
}
.moon-item-next {
  border-color: rgba(245, 230, 168, 0.3);
  background: linear-gradient(135deg, rgba(245,230,168,0.06), rgba(245,230,168,0.02));
}
.moon-mini {
  width: 32px; height: 32px; flex-shrink: 0;
  filter: drop-shadow(0 0 6px rgba(245, 230, 168, 0.25));
}
.moon-item-info { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.moon-item-date {
  color: var(--text); font-weight: 500; font-size: 14px; letter-spacing: 0.01em;
}
.moon-item-time {
  color: var(--text-muted); font-size: 12px; margin-top: 2px;
}
.moon-item-folk {
  color: var(--accent-soft);
  font-family: var(--serif);
  font-style: italic;
  font-size: 12px;
  margin-top: 4px;
  opacity: 0.85;
}
.moon-item-cal {
  flex-shrink: 0;
  width: 34px; height: 34px;
  display: inline-flex; align-items: center; justify-content: center;
  background: transparent;
  border: 1px solid var(--card-border);
  border-radius: 10px;
  color: var(--text-muted);
  cursor: pointer;
  transition: color 160ms ease, border-color 160ms ease, background 160ms ease;
}
.moon-item-cal:hover {
  color: var(--accent);
  border-color: var(--card-border-hover);
  background: rgba(245, 230, 168, 0.05);
}

/* Counter */
.counter-form {
  display: flex; flex-wrap: wrap; gap: 12px; align-items: center;
  margin-top: 12px;
}
.counter-input {
  flex: 1; min-width: 200px;
  padding: 12px 14px;
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: 12px;
  color: var(--text);
  font: inherit;
  font-size: 14px;
  color-scheme: dark;
  transition: border-color 160ms ease;
}
.counter-input:focus {
  outline: none;
  border-color: var(--card-border-hover);
}
.counter-result {
  margin-top: 14px;
  font-family: var(--serif);
  font-size: clamp(20px, 2.6vw, 26px);
  color: var(--text-muted);
  min-height: 32px;
}
.counter-result strong {
  color: var(--accent);
  font-weight: 500;
  text-shadow: 0 0 24px var(--accent-glow);
}

/* Ad slot */
.ad-slot {
  margin: 28px auto;
  max-width: 100%;
  min-height: 96px;
  border: 1px dashed rgba(255,255,255,0.06);
  border-radius: var(--radius);
  display: flex; align-items: center; justify-content: center;
}
.ad-placeholder {
  color: var(--text-dim); font-size: 11px;
  letter-spacing: 0.2em; text-transform: uppercase;
}

/* FAQ */
.faq-list { display: flex; flex-direction: column; gap: 6px; }
.faq-item {
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: 14px;
  padding: 4px 18px;
  transition: border-color 200ms ease;
}
.faq-item:hover { border-color: var(--card-border-hover); }
.faq-item summary {
  list-style: none; cursor: pointer;
  padding: 16px 0;
  font-family: var(--serif); font-size: 17px; color: var(--text);
  position: relative; padding-right: 32px;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: '+';
  position: absolute; right: 4px; top: 50%;
  transform: translateY(-50%);
  color: var(--accent); font-size: 22px; line-height: 1;
  transition: transform 200ms ease;
}
.faq-item[open] summary::after { transform: translateY(-50%) rotate(45deg); }
.faq-item p { padding: 0 0 18px; font-size: 15px; line-height: 1.65; }

/* Legal pages (Impressum, Datenschutz, Privacy) */
.legal {
  max-width: 720px;
  margin: 0 auto;
  padding: 32px 24px 64px;
}
.legal h1 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(32px, 5vw, 44px);
  letter-spacing: -0.02em;
  margin-bottom: 8px;
  color: var(--text);
}
.legal .legal-updated {
  color: var(--text-dim);
  font-size: 13px;
  margin-bottom: 36px;
}
.legal h2 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 22px;
  margin-top: 36px;
  margin-bottom: 12px;
  color: var(--text);
  border: none;
  padding: 0;
}
.legal h3 {
  font-family: var(--sans);
  font-weight: 500;
  font-size: 15px;
  letter-spacing: 0.02em;
  margin-top: 22px;
  margin-bottom: 8px;
  color: var(--text);
}
.legal p, .legal ul, .legal address {
  color: var(--text-muted);
  font-size: 15px;
  line-height: 1.7;
  margin-bottom: 14px;
}
.legal address { font-style: normal; }
.legal ul { padding-left: 1.2em; }
.legal li { margin-bottom: 4px; }
.legal a {
  color: var(--accent);
  text-decoration: underline;
  text-decoration-color: rgba(245, 230, 168, 0.35);
  text-underline-offset: 3px;
}
.legal a:hover { text-decoration-color: var(--accent); }
.legal strong { color: var(--text); font-weight: 500; }
.legal .placeholder {
  color: var(--accent-soft);
  background: rgba(245, 230, 168, 0.08);
  padding: 1px 6px;
  border-radius: 4px;
  font-family: var(--sans);
  font-size: 0.92em;
}

/* Footer */
.site-footer {
  padding-top: 48px; padding-bottom: 56px;
  text-align: center; color: var(--text-dim); font-size: 13px;
}
.site-footer p + p { margin-top: 6px; }
.site-footer a { color: var(--text-muted); text-decoration: none; }
.site-footer a:hover { color: var(--accent); }
.footer-legal {
  margin-top: 18px;
  display: inline-flex; flex-wrap: wrap; gap: 10px 16px;
  justify-content: center;
}
.footer-legal a { font-size: 12px; }
.footer-legal span { color: var(--text-dim); font-size: 12px; }

@media (max-width: 480px) {
  .countdown { gap: 6px; }
  .cd-unit { padding: 14px 4px 10px; }
  .cd-lbl { font-size: 10px; letter-spacing: 0.1em; }
  .moon-item { padding: 12px; gap: 10px; }
  .moon-item-cal { width: 30px; height: 30px; }
}

@media (prefers-reduced-motion: reduce) {
  .hero-moon-svg { animation: none; }
}
