/* Challoween – Variante «Mondnacht» */
:root {
  --night: #15111c;
  --night-2: #211a2b;
  --night-3: #2c2236;
  --pumpkin: #f07a1c;
  --ember: #ffb05c;
  --moss: #7f9a5c;
  --bone: #efe6d6;
  --mist: #a69bb3;
  --line: #3a2f47;
  --danger: #ff8a7a;
  --f-display: "Pirata One", Georgia, serif;
  --f-body: "Karla", system-ui, -apple-system, "Segoe UI", sans-serif;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--night); color: var(--bone); font-family: var(--f-body); font-size: 1.0625rem; line-height: 1.6; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--ember); }
a:hover { color: var(--pumpkin); }
:focus-visible { outline: 2px solid var(--ember); outline-offset: 3px; }
.wrap { max-width: 70rem; margin: 0 auto; padding-inline: 20px; }
.muted { color: var(--mist); }
[hidden] { display: none !important; }

.btn { display: inline-block; font: inherit; font-weight: 800; color: var(--night); background: var(--pumpkin); border: 0; border-radius: 4px; padding: .9rem 1.6rem; text-decoration: none; cursor: pointer; }
.btn:hover { background: var(--ember); color: var(--night); }
.btn-sm { padding: .45rem 1.1rem; }

/* Navigation */
.nav { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px; padding-block: 16px; }
.brand { font-family: var(--f-display); font-size: 1.9rem; color: var(--pumpkin); text-decoration: none; line-height: 1; }
.nav-links { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 24px; font-weight: 600; }
.nav-links a:not(.btn) { color: var(--bone); text-decoration: none; }
.nav-links a:not(.btn):hover { color: var(--ember); }

/* Hero */
.hero { position: relative; overflow: hidden; isolation: isolate; padding-block: 5rem 6.5rem; background: linear-gradient(#0e0b14, #2a1a24); }
#sky { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -1; }
.moon { position: absolute; z-index: -1; right: max(8vw, 16px); top: 3rem; width: clamp(90px, 20vw, 180px); aspect-ratio: 1; border-radius: 50%; background: radial-gradient(circle at 38% 36%, #fff6df 0%, #f3dfb4 55%, #d9b97f 100%); box-shadow: 0 0 80px 14px rgba(255, 200, 120, .18); }
.eyebrow { font-weight: 800; font-size: .8rem; letter-spacing: .18em; text-transform: uppercase; color: var(--moss); }
.title { font-family: var(--f-display); font-weight: 400; font-size: clamp(4rem, 14vw, 8.5rem); line-height: .9; margin: .5rem 0 .4rem; color: var(--pumpkin); text-shadow: 0 0 30px rgba(240, 122, 28, .45); }
.title .ch { color: var(--bone); text-shadow: none; }
.tagline { font-size: 1.35rem; max-width: 30ch; margin: 0; text-wrap: balance; }
.facts { display: flex; flex-wrap: wrap; gap: .5rem 1.8rem; margin-top: 1.6rem; font-weight: 600; }
.facts b { font-weight: 400; color: var(--mist); font-size: .8rem; text-transform: uppercase; letter-spacing: .1em; margin-right: .35rem; }
.countdown { display: flex; flex-wrap: wrap; align-items: center; gap: .75rem; margin-top: 2.2rem; }
.cd { min-width: 5rem; padding: .6rem .8rem .5rem; text-align: center; background: rgba(33, 26, 43, .85); border: 1px solid var(--line); border-radius: 6px; }
.cd strong { display: block; font-family: var(--f-display); font-weight: 400; font-size: 2.4rem; line-height: 1; color: var(--ember); font-variant-numeric: tabular-nums; }
.cd small { font-size: .72rem; letter-spacing: .14em; text-transform: uppercase; color: var(--mist); }
.countdown .btn { margin-left: .5rem; }
.cd-done { font-family: var(--f-display); font-size: 2.2rem; color: var(--ember); }

/* Sections */
main section { padding-block: 4.5rem; border-top: 1px solid var(--line); }
main section:first-child { border-top: 0; }
h2 { font-family: var(--f-display); font-weight: 400; font-size: clamp(2.4rem, 6vw, 3.3rem); line-height: 1; margin: 0 0 1rem; text-wrap: balance; }
.split { display: flex; flex-wrap: wrap; gap: 2rem 3rem; }
.split > :first-child { flex: 1 1 16rem; }
.split > :last-child { flex: 2 1 28rem; min-width: 0; }
.section-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: .5rem 1rem; margin-bottom: 1.5rem; }
.section-head h2 { margin: 0; }

.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li { display: grid; grid-template-columns: 4.5rem 1fr; gap: 1rem; padding-block: .9rem; border-bottom: 1px dashed var(--line); }
.timeline li:last-child { border-bottom: 0; }
.timeline time { font-weight: 800; color: var(--ember); font-variant-numeric: tabular-nums; }
.timeline h3 { margin: 0; font-size: 1.1rem; }
.timeline p { margin: .15rem 0 0; color: var(--mist); }
.timeline li > div { min-width: 0; }

.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(16rem, 1fr)); gap: 1.25rem; }
.card { background: var(--night-2); border: 1px solid var(--line); border-radius: 8px; padding: 1.4rem; min-width: 0; }
.card-date { font-size: .8rem; font-weight: 800; letter-spacing: .1em; color: var(--moss); }
.card h3 { margin: .4rem 0; font-size: 1.2rem; }
.card p { margin: 0; color: var(--mist); overflow-wrap: anywhere; }

.photo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(12rem, 1fr)); gap: .6rem; }
.photo { display: block; aspect-ratio: 4 / 3; overflow: hidden; border-radius: 6px; background: var(--night-3); }
.photo img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s; }
.photo:hover img { transform: scale(1.04); }
.lightbox { max-width: min(92vw, 1200px); max-height: 92vh; padding: 0; border: 0; border-radius: 8px; background: var(--night); color: var(--bone); }
.lightbox::backdrop { background: rgba(8, 6, 12, .88); }
.lightbox img { max-height: 82vh; width: auto; margin: 0 auto; }
.lightbox p { margin: 0; padding: .6rem 1rem; color: var(--mist); }
.lightbox p:empty { display: none; }
.lightbox-close { position: absolute; top: .4rem; right: .4rem; width: 44px; height: 44px; border: 0; border-radius: 50%; background: rgba(21, 17, 28, .8); color: var(--bone); font-size: 1.6rem; cursor: pointer; }

/* Formular */
.panel { background: var(--night-2); border: 1px solid var(--line); border-radius: 8px; padding: 1.6rem; margin: 0; }
.form { display: grid; gap: 1.1rem; }
.grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr)); gap: 1.1rem; }
.field { display: grid; gap: .35rem; min-width: 0; margin: 0; padding: 0; border: 0; }
.field > label, .field legend { font-weight: 600; padding: 0; }
input, textarea { font: inherit; color: var(--bone); background: var(--night); border: 1px solid var(--line); border-radius: 4px; padding: .7rem .8rem; width: 100%; }
input:focus, textarea:focus { border-color: var(--ember); outline: none; box-shadow: 0 0 0 2px rgba(255, 176, 92, .3); }
input[aria-invalid="true"], textarea[aria-invalid="true"] { border-color: var(--danger); }
.ages-list { display: flex; flex-wrap: wrap; gap: .6rem 1rem; margin-top: .35rem; }
.ages-list label { display: flex; align-items: center; gap: .5rem; color: var(--mist); }
.ages-list input { width: 5rem; }
.check { display: flex; gap: .75rem; align-items: flex-start; font-weight: 400 !important; color: var(--mist); cursor: pointer; }
.check input { width: 1.25rem; height: 1.25rem; margin-top: .2rem; flex: none; accent-color: var(--pumpkin); }
.field-error, .form-error { color: var(--danger); margin: 0; font-size: .95rem; }
.form-error { font-weight: 600; }
.form .btn { justify-self: start; }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

/* Mitbringen */
.bring .hint { margin: .1rem 0 .4rem; font-size: .95rem; }
.bring-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr)); gap: .6rem; }
.bring-item { display: flex; gap: .7rem; align-items: flex-start; padding: .75rem .85rem; border: 1px solid var(--line); border-radius: 6px; background: var(--night); cursor: pointer; min-width: 0; }
.bring-item:has(input:checked) { border-color: var(--pumpkin); background: rgba(240, 122, 28, .08); }
.bring-item input { width: 1.2rem; height: 1.2rem; margin-top: .2rem; flex: none; accent-color: var(--pumpkin); }
.bring-text { display: grid; min-width: 0; overflow-wrap: anywhere; }
.bring-text small { color: var(--ember); font-size: .85rem; }
.bring-item.is-full { opacity: .5; cursor: not-allowed; }
.bring-item.is-full small { color: var(--mist); }

/* Packliste (Hinweis) */
.packbox { margin-top: 1.6rem; padding: 1.2rem 1.3rem; border: 1px dashed var(--line); border-radius: 8px; max-width: 34rem; }
.packbox h3 { margin: 0; font-family: var(--f-display); font-weight: 400; font-size: 1.7rem; color: var(--ember); }
.packbox > p { margin: .1rem 0 .6rem; font-size: .95rem; }
.packlist { list-style: none; margin: 0 0 .9rem; padding: 0; display: grid; gap: .45rem; }
.packlist li { display: grid; padding-left: 1.6rem; position: relative; line-height: 1.4; }
.packlist li::before { content: ""; position: absolute; left: 0; top: .2rem; width: .9rem; height: .9rem; border: 2px solid var(--pumpkin); border-radius: 3px; }
.packlist .muted { font-size: .92rem; }
.print-link { font-weight: 600; }

/* Hinweise (Freitext) */
.notes { max-width: 65ch; }
.notes p { margin: 0 0 1rem; }
.notes strong { color: var(--ember); }
.notes ul { margin: -.4rem 0 1rem; padding-left: 1.2rem; }
.notes li { margin-bottom: .25rem; }
.notes li::marker { color: var(--pumpkin); }
.packbox.notes > :last-child { margin-bottom: 0; }

/* Unterseiten */
.page { padding-block: 3rem 5rem; min-height: 50vh; }
.page-title { font-family: var(--f-display); font-weight: 400; font-size: clamp(2.6rem, 8vw, 4.2rem); line-height: 1; margin: 0 0 1rem; color: var(--pumpkin); }
.lead { font-size: 1.3rem; }
.summary { display: grid; gap: .4rem; margin: 1.5rem 0; padding: 1.2rem 1.4rem; background: var(--night-2); border: 1px solid var(--line); border-radius: 8px; max-width: 34rem; }
.summary div { display: grid; grid-template-columns: 8rem 1fr; gap: 1rem; }
.summary dt { color: var(--mist); }
.summary dd { margin: 0; font-weight: 600; }
.album { padding-block: 1.5rem; }
.album h2 { font-size: 2.2rem; }
.count { font-family: var(--f-body); font-size: 1rem; }

.footer { border-top: 1px solid var(--line); padding-block: 2rem 2.5rem; color: var(--mist); font-size: .95rem; }
.footer-row { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: .75rem; }
.footer-brand { font-family: var(--f-display); font-size: 1.6rem; color: var(--pumpkin); }

@media (max-width: 480px) {
  .timeline li { grid-template-columns: 3.8rem 1fr; gap: .7rem; }
  .cd { min-width: 4.2rem; }
  .countdown .btn { margin-left: 0; }
  .hero { padding-block: 6rem 5rem; }
  .moon { width: 64px; top: 1.2rem; right: 16px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .photo img { transition: none; }
}
