:root {
  --black: #000;
  --ink: #0a0a0a;
  --white: #f4f2ee;
  --grey: #8a8a8a;
  --line: rgba(244, 242, 238, 0.85);
  --font: "Archivo", "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { background: var(--black); scroll-behavior: smooth; }
body {
  background: var(--black);
  color: var(--white);
  font-family: var(--font);
  -webkit-font-smoothing: antialiased;
  min-height: 100dvh;
}
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.hidden { display: none !important; }

/* ---------- State switching ---------- */
.screen, #party { display: none; }
.state-gate #gate,
.state-intro #intro { display: flex; }
.state-party #party { display: block; animation: fade 1.2s ease both; }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }

.screen {
  position: fixed; inset: 0;
  background: var(--black);
  align-items: center; justify-content: center;
}

/* ---------- Gate ---------- */
.gate { display: flex; flex-direction: column; align-items: center; gap: 2.5rem; padding: 16px; }
.gate-title {
  font-weight: 900;
  font-stretch: 85%;
  font-size: clamp(4.5rem, 22vw, 11rem);
  letter-spacing: -0.04em;
  line-height: 0.9;
}
#code {
  width: min(260px, 80vw);
  background: transparent;
  border: 0;
  border-bottom: 1px solid #333;
  color: var(--white);
  font: 500 1rem/1 var(--font);
  letter-spacing: 0.35em;
  text-align: center;
  padding: 0.75rem 0;
  outline: none;
  transition: border-color .3s;
}
#code::placeholder { color: #444; letter-spacing: 0.2em; text-transform: uppercase; font-size: .75rem; }
#code:focus { border-color: var(--white); }
.gate-enter {
  margin-top: -1rem;
  background: transparent;
  color: var(--white);
  border: 1px solid #333;
  border-radius: 999px;
  padding: .7rem 2.4rem;
  font: 600 .75rem var(--font);
  letter-spacing: .35em;
  text-transform: uppercase;
  cursor: pointer;
  transition: border-color .3s, background .3s, color .3s;
}
.gate-enter:hover, .gate-enter:focus-visible { border-color: var(--white); background: var(--white); color: var(--black); outline: none; }
.shake { animation: shake .4s; }
@keyframes shake {
  20%, 60% { transform: translateX(-10px); }
  40%, 80% { transform: translateX(10px); }
}

/* ---------- Intro ---------- */
#intro video { width: 100%; height: 100%; object-fit: contain; background: #000; }
.pill {
  display: inline-block;
  background: rgba(0,0,0,.55);
  color: var(--white);
  border: 1px solid rgba(244,242,238,.4);
  border-radius: 999px;
  padding: .55rem 1.1rem;
  font: 500 .8rem var(--font);
  letter-spacing: .12em;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
  backdrop-filter: blur(6px);
}
#intro .pill { position: absolute; bottom: max(24px, env(safe-area-inset-bottom)); }
#intro .skip { right: 20px; }
#unmute { left: 20px; }

/* ---------- Party: Hero ---------- */
.hero {
  min-height: 100dvh;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 1.5rem;
  padding: 48px 16px;
  text-align: center;
  position: relative;
}
.vinyl { position: relative; width: min(78vw, 520px); aspect-ratio: 1; }
.vinyl-disc {
  position: absolute; inset: 0; border-radius: 50%;
  background:
    repeating-radial-gradient(circle at 50% 50%, #0b0b0b 0 1px, #161616 1.5px 2.5px, #0b0b0b 3px 4px),
    #0b0b0b;
  box-shadow: 0 0 0 1px #1d1d1d, 0 30px 80px rgba(255,255,255,.04);
}
.vinyl-sheen {
  position: absolute; inset: 0; border-radius: 50%;
  background: conic-gradient(from 20deg,
    transparent 0deg, rgba(255,255,255,.18) 25deg, transparent 55deg,
    transparent 180deg, rgba(255,255,255,.14) 205deg, transparent 235deg);
  mix-blend-mode: screen;
  pointer-events: none;
}
.vinyl-label {
  position: absolute; inset: 31%;
  border-radius: 50%;
  background: linear-gradient(var(--white) 0 50%, var(--ink) 50%);
  box-shadow: 0 0 0 3px var(--black), 0 0 0 5px var(--white);
  display: flex; align-items: center; justify-content: center;
}
/* dreht beim Erscheinen und bremst ab, bis das Label gerade steht (wie im Video) */
.state-party .vinyl-label { animation: spindown 5s cubic-bezier(.25,.6,.35,1) .3s both; }
@keyframes spindown { from { transform: rotate(-1080deg); } to { transform: rotate(0deg); } }
.label-year {
  color: var(--ink);
  font-weight: 900; font-stretch: 85%;
  font-size: clamp(2rem, 11vw, 4.6rem);
  letter-spacing: -0.04em;
  line-height: 1;
  transform: translateY(-50%);
}
.label-hole {
  position: absolute; width: 7%; aspect-ratio: 1; border-radius: 50%;
  background: var(--black); top: 50%; left: 50%; transform: translate(-50%, -50%);
}
.hosts {
  font-weight: 600; font-stretch: 75%;
  font-size: clamp(1rem, 3.6vw, 1.4rem);
  letter-spacing: .14em; text-transform: uppercase;
}
.tagline { color: var(--grey); font-size: .9rem; letter-spacing: .08em; }
.scroll-cue {
  position: absolute; bottom: 24px;
  color: var(--grey); text-decoration: none; font-size: 1.4rem;
  animation: bob 2s ease-in-out infinite;
}
@keyframes bob { 50% { transform: translateY(6px); } }

/* ---------- Sections ---------- */
.facts, .ticket-section, .flyer, .foot {
  max-width: 880px; margin: 0 auto; padding: 72px 16px;
}
.section-title {
  font-weight: 800; font-stretch: 80%;
  font-size: .85rem; letter-spacing: .3em; text-transform: uppercase;
  color: var(--grey);
  margin-bottom: 2.5rem;
}

.fact-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 3rem 2rem; }
.fact dt {
  font-size: clamp(1rem, 3vw, 1.35rem);
  padding-bottom: .5rem;
  border-bottom: 2px solid var(--line);
  margin-bottom: .75rem;
}
.fact dd {
  font-weight: 800;
  font-size: clamp(1.8rem, 6vw, 3.2rem);
  line-height: 1.05;
  letter-spacing: -0.01em;
}
.fact dd small { font-weight: 400; font-size: .5em; }
.fact:nth-child(even) { text-align: right; }
.more { margin-top: 3rem; color: var(--grey); }

/* ---------- Lineup ---------- */
.lineup { max-width: 880px; margin: 0 auto; padding: 72px 16px; }
.lineup-list { list-style: none; border-top: 2px solid var(--line); }
.lineup-list li {
  font-weight: 900; font-stretch: 85%;
  font-size: clamp(2.4rem, 10vw, 5.5rem);
  line-height: 1; letter-spacing: -0.02em; text-transform: uppercase;
  padding: .3em 0;
  border-bottom: 1px solid #2a2a2a;
}

/* ---------- Ticket ---------- */
.ticket-form { display: grid; gap: 1.75rem; max-width: 480px; }
.field label {
  display: block; font-size: .75rem; letter-spacing: .2em; text-transform: uppercase;
  color: var(--grey); margin-bottom: .6rem;
}
.field input {
  width: 100%; background: transparent; color: var(--white);
  border: 0; border-bottom: 2px solid #333;
  font: 700 1.5rem var(--font); padding: .4rem 0; outline: none;
  transition: border-color .3s; border-radius: 0;
}
.field input:focus { border-color: var(--white); }
.stepper { display: flex; align-items: center; gap: 1rem; }
.stepper input { width: 4ch; text-align: center; -moz-appearance: textfield; }
.stepper input::-webkit-inner-spin-button, .stepper input::-webkit-outer-spin-button { -webkit-appearance: none; }
.stepper button {
  width: 44px; height: 44px; border-radius: 50%;
  background: transparent; color: var(--white); border: 1px solid #444;
  font-size: 1.3rem; cursor: pointer;
}
.stepper button:hover { border-color: var(--white); }
.hp { position: absolute; left: -9999px; }
.cta {
  justify-self: start;
  background: var(--white); color: var(--black);
  border: 0; border-radius: 999px;
  padding: 1rem 2.2rem;
  font: 800 1rem var(--font); letter-spacing: .12em; text-transform: uppercase;
  cursor: pointer; transition: transform .2s;
}
.cta:hover { transform: translateY(-2px); }
.cta:disabled { opacity: .6; cursor: wait; transform: none; }
.error { color: #ff7a6b; min-height: 1.2em; font-size: .9rem; }

.ticket {
  display: grid; grid-template-columns: 1fr auto;
  max-width: 560px;
  background: var(--white); color: var(--black);
  border-radius: 14px;
  animation: pop .6s cubic-bezier(.2,1.4,.4,1) both;
}
@keyframes pop { from { transform: scale(.9) rotate(-2deg); opacity: 0; } }
.ticket-main { padding: 1.5rem 1.75rem; display: grid; gap: .35rem; }
.ticket-stub {
  padding: 1.5rem 1.5rem; border-left: 2px dashed rgba(0,0,0,.35);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
}
.ticket-kicker { font-size: .7rem; letter-spacing: .25em; text-transform: uppercase; color: #555; }
.ticket-name { font-weight: 900; font-stretch: 85%; font-size: clamp(1.6rem, 6vw, 2.4rem); line-height: 1; word-break: break-word; }
.ticket-meta { font-size: .8rem; color: #444; }
.ticket-count { font-weight: 900; font-size: 2.6rem; line-height: 1; }

/* ---------- Flyer & Footer ---------- */
.flyer { display: flex; flex-direction: column; align-items: center; gap: 1.5rem; }
.flyer img { width: min(100%, 520px); height: auto; display: block; border-radius: 6px; }
.foot { text-align: center; padding-bottom: 64px; }
.link {
  background: none; border: 0; color: var(--grey); cursor: pointer;
  font: 500 .85rem var(--font); letter-spacing: .1em; text-decoration: underline; text-underline-offset: 4px;
}
.link:hover { color: var(--white); }

@media (max-width: 520px) {
  .fact-grid { gap: 2.5rem 1.25rem; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; scroll-behavior: auto !important; }
}

/* ---------- Party-Fotos (Teaser auf der Startseite) ---------- */
.photos-teaser { max-width: 880px; margin: 0 auto; padding: 72px 16px; }
.photos-lead { font-size: clamp(1.2rem, 3.5vw, 1.6rem); font-weight: 600; margin-bottom: 2rem; max-width: 30ch; }
a.cta { display: inline-block; text-decoration: none; }

/* ---------- Foto-Seite ---------- */
.photos-page { max-width: 1100px; margin: 0 auto; padding: 24px 16px 80px; }
.photos-head { display: grid; gap: 12px; padding: 8px 0 40px; }
.photos-back { color: var(--grey); text-decoration: none; font-weight: 600; letter-spacing: .1em; }
.photos-back:hover { color: var(--white); }
.photos-title { font-weight: 900; font-stretch: 85%; font-size: clamp(3rem, 12vw, 6rem); letter-spacing: -0.03em; line-height: .9; }

.upload-card { display: grid; gap: 1.5rem; max-width: 520px; padding-bottom: 48px; border-bottom: 1px solid #222; }
.upload-btn { text-align: center; }
.queue { list-style: none; display: grid; gap: .5rem; }
.queue li { display: grid; grid-template-columns: 1fr 90px 90px; gap: 12px; align-items: center; font-size: .85rem; color: var(--grey); }
.q-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.q-bar { height: 3px; background: #222; border-radius: 2px; overflow: hidden; }
.q-bar i { display: block; height: 100%; width: 0; background: var(--white); transition: width .2s; }
.q-state { text-align: right; }
.q-ok .q-state { color: var(--white); }
.q-err .q-state { color: #ff7a6b; }

.gallery-section { padding-top: 48px; }
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 6px; }
.tile { padding: 0; border: 0; background: #111; aspect-ratio: 1; overflow: hidden; cursor: zoom-in; border-radius: 3px; }
.tile img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .4s, opacity .4s; }
.tile:hover img { transform: scale(1.04); }
@media (max-width: 520px) { .gallery { grid-template-columns: repeat(3, 1fr); gap: 3px; } }

.lightbox { position: fixed; inset: 0; z-index: 50; background: rgba(0,0,0,.95); display: flex; align-items: center; justify-content: center; }
.lightbox img { max-width: 100vw; max-height: 100dvh; object-fit: contain; }
.lb-btn { position: absolute; background: none; border: 0; color: var(--white); font-size: 2.6rem; line-height: 1; cursor: pointer; padding: 16px; opacity: .8; }
.lb-btn:hover { opacity: 1; }
.lb-close { top: 4px; right: 8px; }
.lb-prev { left: 4px; top: 50%; transform: translateY(-50%); }
.lb-next { right: 4px; top: 50%; transform: translateY(-50%); }
.lb-dl { position: absolute; bottom: max(20px, env(safe-area-inset-bottom)); right: 20px; }
.lb-by { position: absolute; bottom: max(28px, env(safe-area-inset-bottom)); left: 20px; color: var(--white); font-size: .9rem; text-shadow: 0 1px 6px #000; }
