/* Mondfinsternis 2026 - Nachthimmel, ruhig, die Zeichnung im Mittelpunkt. */

@font-face {
  font-family: "Fraunces";
  src: url("/static/fonts/fraunces-v38-latin-regular.woff2") format("woff2");
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Fraunces";
  src: url("/static/fonts/fraunces-v38-latin-600.woff2") format("woff2");
  font-weight: 600; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Fraunces";
  src: url("/static/fonts/fraunces-v38-latin-700.woff2") format("woff2");
  font-weight: 700; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Atkinson";
  src: url("/static/fonts/atkinson-hyperlegible-v12-latin-regular.woff2") format("woff2");
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Atkinson";
  src: url("/static/fonts/atkinson-hyperlegible-v12-latin-700.woff2") format("woff2");
  font-weight: 700; font-style: normal; font-display: swap;
}

:root {
  --night: #070B1E;
  --night-2: #0B1129;
  --panel: #121A3B;
  --panel-2: #161F44;
  --line: rgba(154, 160, 216, 0.20);
  --moonlight: #ECE9F5;
  --muted: #A9ADCC;
  --copper: #C8552F;
  --copper-2: #E9A279;
  --cream: #F3E3BE;
  --display: "Fraunces", Georgia, "Times New Roman", serif;
  --body: "Atkinson", system-ui, -apple-system, "Segoe UI", sans-serif;
  --wrap: 74rem;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--night);
  color: var(--moonlight);
  font-family: var(--body);
  font-size: clamp(1.02rem, 0.98rem + 0.3vw, 1.16rem);
  line-height: 1.7;
  text-wrap: pretty;
}

img, svg { max-width: 100%; }

a { color: var(--copper-2); text-underline-offset: 0.2em; }
a:hover { color: var(--cream); }

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

.skip {
  position: absolute; left: -9999px; top: 0;
  background: var(--panel); color: var(--moonlight);
  padding: 0.8rem 1.2rem; z-index: 20;
}
.skip:focus { left: 0.75rem; top: 0.75rem; }

.wrap {
  width: min(var(--wrap), 100% - 2.5rem);
  margin-inline: auto;
}
.wrap.narrow { width: min(42rem, 100% - 2.5rem); }

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

.hero {
  position: relative;
  overflow: hidden;
  padding: clamp(4.5rem, 12vh, 9rem) 0 clamp(3.5rem, 9vh, 6.5rem);
  background:
    radial-gradient(120% 90% at 78% 8%, rgba(200, 85, 47, 0.20), transparent 58%),
    radial-gradient(90% 70% at 12% 0%, rgba(96, 112, 214, 0.22), transparent 60%),
    linear-gradient(180deg, #060919 0%, var(--night) 72%);
}

.starfield {
  position: absolute; inset: 0;
  background-image:
    radial-gradient(2px 2px at 12% 22%, rgba(255,255,255,0.9), transparent),
    radial-gradient(1.5px 1.5px at 28% 64%, rgba(255,255,255,0.7), transparent),
    radial-gradient(2.2px 2.2px at 46% 12%, rgba(255,246,230,0.85), transparent),
    radial-gradient(1.4px 1.4px at 58% 78%, rgba(255,255,255,0.6), transparent),
    radial-gradient(2px 2px at 71% 34%, rgba(255,255,255,0.9), transparent),
    radial-gradient(1.5px 1.5px at 84% 60%, rgba(255,255,255,0.65), transparent),
    radial-gradient(1.8px 1.8px at 92% 18%, rgba(255,255,255,0.8), transparent),
    radial-gradient(1.4px 1.4px at 6% 82%, rgba(255,255,255,0.6), transparent),
    radial-gradient(1.6px 1.6px at 38% 90%, rgba(255,255,255,0.55), transparent),
    radial-gradient(1.3px 1.3px at 19% 47%, rgba(255,255,255,0.55), transparent),
    radial-gradient(1.7px 1.7px at 63% 8%, rgba(255,255,255,0.7), transparent),
    radial-gradient(1.2px 1.2px at 77% 88%, rgba(255,255,255,0.5), transparent),
    radial-gradient(1.9px 1.9px at 88% 42%, rgba(255,238,214,0.75), transparent),
    radial-gradient(1.3px 1.3px at 52% 52%, rgba(255,255,255,0.5), transparent),
    radial-gradient(1.5px 1.5px at 33% 33%, rgba(255,255,255,0.6), transparent),
    radial-gradient(1.2px 1.2px at 96% 72%, rgba(255,255,255,0.5), transparent),
    radial-gradient(1.6px 1.6px at 2% 12%, rgba(255,255,255,0.6), transparent),
    radial-gradient(1.3px 1.3px at 68% 62%, rgba(255,255,255,0.45), transparent);
  pointer-events: none;
}

.hero-inner { position: relative; }

.eyebrow {
  font-size: 0.82rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--copper-2);
  margin: 0 0 1rem;
}

h1 {
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(2.6rem, 1.3rem + 5.6vw, 5.6rem);
  line-height: 1.02;
  letter-spacing: -0.015em;
  margin: 0 0 1.6rem;
  text-wrap: balance;
}

.lead {
  max-width: 44ch;
  font-size: clamp(1.1rem, 1rem + 0.5vw, 1.35rem);
  color: #D6D5E9;
  margin: 0 0 1.6rem;
}

.count {
  font-family: var(--display);
  font-size: 1.15rem;
  color: var(--cream);
  margin: 0 0 2rem;
}

.down {
  display: inline-block;
  min-height: 44px;
  padding: 0.75rem 1.6rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--moonlight);
  text-decoration: none;
  background: rgba(154, 160, 216, 0.08);
}
.down:hover { background: rgba(200, 85, 47, 0.22); color: var(--cream); }

/* ---------- Abschnitte ---------- */

.section { padding: clamp(3.5rem, 9vh, 6.5rem) 0; }
.section-alt { background: var(--night-2); border-block: 1px solid var(--line); }

h2 {
  font-family: var(--display);
  font-weight: 600;
  font-size: clamp(1.9rem, 1.2rem + 2.4vw, 3.1rem);
  line-height: 1.12;
  margin: 0 0 1.4rem;
  text-wrap: balance;
}

h3 {
  font-family: var(--display);
  font-weight: 600;
  font-size: 1.22rem;
  line-height: 1.25;
  margin: 0 0 0.5rem;
}

.text { max-width: 62ch; margin: 0 0 1.3rem; color: #DAD8EC; }
.note, .aside, .caption, .hint {
  max-width: 62ch;
  color: var(--muted);
  font-size: 0.94rem;
}
.note { border-left: 2px solid var(--copper); padding-left: 1rem; margin-top: 1.8rem; }
.aside { margin-top: 2.5rem; }

/* ---------- Die Zeichnung ---------- */

.stage {
  margin: 2.5rem 0 0;
  padding: clamp(0.6rem, 2vw, 1.6rem);
  background: linear-gradient(180deg, rgba(18, 26, 59, 0.9), rgba(9, 13, 33, 0.9));
  border: 1px solid var(--line);
  border-radius: 14px;
}
.diagram { display: block; width: 100%; height: auto; }
.caption { margin: 0.9rem 0 0; }

.lbl {
  font-family: var(--body);
  font-size: 17px;
  fill: var(--moonlight);
  fill-opacity: 0.85;
}
.lbl.small { font-size: 15px; fill: var(--muted); }
.lbl.sun { fill: #6B3A0E; fill-opacity: 0.9; font-size: 16px; }
.lbl.small.dark { fill: #C9CCEC; fill-opacity: 0.85; }
.lbl.small.orbit { fill: #8E95CE; }

.legend { display: none; }

.controls { margin: 1.6rem 0 0; }
.ctl-label { display: block; font-size: 0.9rem; color: var(--muted); margin-bottom: 0.6rem; }
.ctl-row { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; }

input[type="range"] {
  flex: 1 1 16rem;
  min-height: 44px;
  background: transparent;
  -webkit-appearance: none;
  appearance: none;
}
input[type="range"]::-webkit-slider-runnable-track {
  height: 4px;
  border-radius: 999px;
  background: rgba(154, 160, 216, 0.28);
}
input[type="range"]::-moz-range-track {
  height: 4px;
  border-radius: 999px;
  background: rgba(154, 160, 216, 0.28);
}
input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 22px; height: 22px;
  margin-top: -9px;
  border-radius: 50%;
  background: var(--cream);
  border: 2px solid var(--copper);
  cursor: grab;
}
input[type="range"]::-moz-range-thumb {
  width: 22px; height: 22px;
  border-radius: 50%;
  background: var(--cream);
  border: 2px solid var(--copper);
  cursor: grab;
}

.btn-ghost {
  min-height: 44px;
  padding: 0.5rem 1.2rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(154, 160, 216, 0.08);
  color: var(--moonlight);
  font-family: var(--body);
  font-size: 0.95rem;
  cursor: pointer;
}
.btn-ghost:hover { background: rgba(200, 85, 47, 0.22); }

.hint { margin: 0.7rem 0 0; }

.view {
  display: grid;
  grid-template-columns: 190px 1fr;
  gap: clamp(1.2rem, 3vw, 2.5rem);
  align-items: center;
  margin-top: 2.6rem;
  padding: clamp(1.2rem, 3vw, 2rem);
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 14px;
}
.view-moon svg { display: block; width: 100%; height: auto; }
.phase {
  font-family: var(--display);
  font-weight: 600;
  font-size: 1.5rem;
  margin: 0 0 0.5rem;
}
.phase-text { margin: 0; color: #D3D2E8; max-width: 46ch; }

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
  gap: 1.4rem;
  margin-top: 2.6rem;
}
.card {
  padding: 1.5rem;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 14px;
}
.card p { margin: 0; color: #CFCEE6; font-size: 0.98rem; }

/* ---------- Zwei Spalten ---------- */

.two-col {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: clamp(1.6rem, 4vw, 3.5rem);
  align-items: center;
}
.atmo { margin: 0; }
.atmo svg { display: block; width: 100%; height: auto; }

/* ---------- Zeitleiste ---------- */

.timeline { list-style: none; margin: 2.5rem 0 0; padding: 0; }
.timeline li {
  display: grid;
  grid-template-columns: 7rem 1fr;
  gap: 1.2rem;
  padding: 1.5rem 0;
  border-top: 1px solid var(--line);
}
.timeline li:last-child { border-bottom: 1px solid var(--line); }
.timeline .t {
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(1.5rem, 1.2rem + 1vw, 2.1rem);
  color: var(--cream);
  font-variant-numeric: tabular-nums;
  line-height: 1.1;
}
.timeline .mark .t { color: var(--copper-2); }
.timeline .dim { opacity: 0.62; }
.timeline p { margin: 0; max-width: 60ch; color: #CFCEE6; font-size: 0.98rem; }

.warnbox {
  margin-top: 2.6rem;
  padding: clamp(1.3rem, 3vw, 2rem);
  background: rgba(200, 85, 47, 0.12);
  border: 1px solid rgba(200, 85, 47, 0.4);
  border-radius: 14px;
}
.warnbox p { margin: 0 0 1rem; max-width: 62ch; }
.warnbox p:last-child { margin-bottom: 0; }

/* ---------- Formular ---------- */

.form { margin-top: 1.8rem; }
.field { margin-bottom: 1.3rem; }
.field label { display: block; font-size: 0.92rem; color: var(--muted); margin-bottom: 0.45rem; }

input[type="text"], input[type="email"], textarea {
  width: 100%;
  min-height: 48px;
  padding: 0.7rem 0.9rem;
  background: rgba(7, 11, 30, 0.7);
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--moonlight);
  font-family: var(--body);
  font-size: 1rem;
  line-height: 1.6;
}
textarea { resize: vertical; }
input::placeholder, textarea::placeholder { color: #6F739B; }

.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.btn {
  min-height: 48px;
  margin-top: 0.6rem;
  padding: 0.75rem 1.8rem;
  border: none;
  border-radius: 999px;
  background: var(--copper);
  color: #FFF4EA;
  font-family: var(--body);
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
}
.btn:hover { background: #D96238; }

.sent {
  margin: 1.8rem 0;
  padding: 1.3rem 1.5rem;
  background: rgba(120, 190, 150, 0.12);
  border: 1px solid rgba(120, 190, 150, 0.4);
  border-radius: 12px;
}
.sent p { margin: 0; }

.err {
  margin: 1.2rem 0 0;
  padding: 0.9rem 1.1rem;
  background: rgba(200, 85, 47, 0.14);
  border: 1px solid rgba(200, 85, 47, 0.45);
  border-radius: 10px;
  color: var(--cream);
}

.or-mail { margin-top: 2rem; }

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

.foot {
  padding: 2.5rem 0 3.5rem;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.9rem;
}
.foot p { margin: 0; max-width: 62ch; }

/* ---------- Schmale Bildschirme ---------- */

@media (max-width: 46rem) {
  /* Auf schmalen Bildschirmen schrumpfen die Beschriftungen in der Zeichnung unter die
     Lesbarkeit. Dann tritt eine Legende aus Text an ihre Stelle. */
  .diagram .lbl { display: none; }
  .legend {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 1.1rem;
    list-style: none;
    margin: 1rem 0 0;
    padding: 0;
    font-size: 0.88rem;
    color: var(--muted);
  }
  .legend li { display: flex; align-items: center; gap: 0.45rem; }
  .sw { width: 13px; height: 13px; border-radius: 50%; flex: none; }
  .sw-sun { background: #F8CE7A; }
  .sw-earth { background: #2E7CA6; }
  .sw-moon { background: var(--cream); }
  .sw-umbra { background: #04060E; border: 1px solid var(--line); }
  .sw-pen { background: rgba(154, 160, 216, 0.42); }
  .sw-orbit {
    height: 0; border-radius: 0;
    border-top: 2px dashed rgba(154, 160, 216, 0.7);
  }

  .two-col { grid-template-columns: 1fr; }
  .view { grid-template-columns: 1fr; justify-items: center; text-align: center; }
  .view-moon { width: min(11rem, 60%); }
  .phase-text { max-width: none; }
  .timeline li { grid-template-columns: 1fr; gap: 0.4rem; }
}
