:root {
  --ink: #0b0b0d;
  --ink-2: #15140f;
  --gold: #d4af37;
  --gold-light: #f3d98b;
  --gold-dark: #8a6d1f;
  --cream: #f4ead2;
  --muted: #b9ad8e;
  --gold-gradient: linear-gradient(135deg, var(--gold-dark), var(--gold-light) 45%, var(--gold) 55%, var(--gold-dark));
}

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

[hidden] { display: none !important; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  color: var(--cream);
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 1.125rem;
  background-color: var(--ink);
  background-image:
    radial-gradient(ellipse at top, rgba(212, 175, 55, 0.12), transparent 60%),
    repeating-linear-gradient(45deg, rgba(212, 175, 55, 0.035) 0 1px, transparent 1px 28px),
    repeating-linear-gradient(-45deg, rgba(212, 175, 55, 0.035) 0 1px, transparent 1px 28px);
  background-attachment: fixed;
}

main { flex: 1; width: 100%; }

.masthead {
  text-align: center;
  padding: 2.5rem 1rem 1.5rem;
}

.masthead h1 {
  margin: 0.6rem 0;
  font-family: "Limelight", "Poiret One", serif;
  font-weight: 400;
  font-size: clamp(2.4rem, 7vw, 4.75rem);
  letter-spacing: 0.06em;
  line-height: 1.05;
  background: var(--gold-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  text-shadow: 0 0 40px rgba(212, 175, 55, 0.25);
}

.masthead.compact h1 { font-size: clamp(2rem, 5vw, 3.25rem); }

.eyebrow {
  margin: 0.4rem 0;
  font-family: "Poiret One", sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.4em;
  font-size: 0.85rem;
  color: var(--muted);
}

.event-date {
  margin: 0.2rem 0 0.9rem;
  font-family: "Poiret One", sans-serif;
  font-size: clamp(1.1rem, 3vw, 1.5rem);
  letter-spacing: 0.5em;
  padding-left: 0.5em;
  color: var(--gold-light);
}

.verify {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  margin: 0 0 1.75rem;
}

.verify-msg {
  margin: 0;
  font-family: "Poiret One", sans-serif;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  font-size: 0.8rem;
  color: var(--muted);
}

.dropzone.locked {
  opacity: 0.45;
  cursor: not-allowed;
}

.upload-note {
  margin: 1.75rem 0 0;
  text-align: center;
  font-style: italic;
  color: var(--muted);
}

.deco-rule {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  max-width: 520px;
  margin: 0 auto;
}

.deco-rule span {
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold));
  position: relative;
}

.deco-rule span:last-child { background: linear-gradient(90deg, var(--gold), transparent); }

.deco-rule span::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 4px;
  height: 1px;
  background: inherit;
  opacity: 0.5;
}

.deco-rule i {
  width: 12px;
  height: 12px;
  border: 1px solid var(--gold);
  transform: rotate(45deg);
  box-shadow: inset 0 0 0 3px var(--ink), inset 0 0 0 6px var(--gold);
}

.back {
  display: inline-block;
  margin-bottom: 1.25rem;
  font-family: "Poiret One", sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.25em;
  font-size: 0.8rem;
  color: var(--gold);
  text-decoration: none;
}

.back:hover { color: var(--gold-light); }

.carousel {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1rem;
}

.frame {
  position: relative;
  padding: 14px;
  border: 1px solid var(--gold);
  outline: 1px solid rgba(212, 175, 55, 0.4);
  outline-offset: 6px;
  background: var(--ink-2);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6);
}

.corner {
  position: absolute;
  width: 46px;
  height: 46px;
  border-color: var(--gold);
  border-style: solid;
  pointer-events: none;
  z-index: 2;
}

.corner::after {
  content: "";
  position: absolute;
  width: 8px;
  height: 8px;
  background: var(--gold);
  transform: rotate(45deg);
}

.corner.tl { top: -10px; left: -10px; border-width: 3px 0 0 3px; }
.corner.tr { top: -10px; right: -10px; border-width: 3px 3px 0 0; }
.corner.bl { bottom: -10px; left: -10px; border-width: 0 0 3px 3px; }
.corner.br { bottom: -10px; right: -10px; border-width: 0 3px 3px 0; }
.corner.tl::after { top: 6px; left: 6px; }
.corner.tr::after { top: 6px; right: 6px; }
.corner.bl::after { bottom: 6px; left: 6px; }
.corner.br::after { bottom: 6px; right: 6px; }

.stage {
  position: relative;
  aspect-ratio: 3 / 2;
  max-height: 72vh;
  width: 100%;
  overflow: hidden;
  background: #000;
  border: 1px solid rgba(212, 175, 55, 0.35);
}

.slide {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  opacity: 0;
  transition: opacity 1.2s ease;
}

.slide.active { opacity: 1; }
.slide:not([src]) { visibility: hidden; }

.empty {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  margin: 0;
  font-family: "Poiret One", sans-serif;
  font-size: clamp(1.1rem, 3vw, 1.6rem);
  letter-spacing: 0.3em;
  text-transform: uppercase;
  text-align: center;
  color: var(--muted);
  padding: 1rem;
}

.nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 3;
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  font-size: 1.1rem;
  color: var(--gold);
  background: rgba(11, 11, 13, 0.7);
  border: 1px solid var(--gold);
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}

.nav::before {
  content: "";
  position: absolute;
  inset: 4px;
  border: 1px solid rgba(212, 175, 55, 0.4);
}

.nav:hover, .nav:focus-visible { background: var(--gold); color: var(--ink); }
.frame .nav.prev { left: 28px; }
.frame .nav.next { right: 28px; }

.controls {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1.5rem;
  margin-top: 1.75rem;
}

.pill {
  font-family: "Poiret One", sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.25em;
  font-size: 0.8rem;
  padding: 0.45rem 1.2rem;
  color: var(--gold);
  background: transparent;
  border: 1px solid var(--gold);
  cursor: pointer;
}

.pill:hover, .pill:focus-visible { background: var(--gold); color: var(--ink); }

.counter {
  font-family: "Poiret One", sans-serif;
  letter-spacing: 0.3em;
  color: var(--muted);
}

.cta {
  display: block;
  width: fit-content;
  margin: 2.5rem auto 3rem;
  padding: 1rem 2.5rem;
  font-family: "Poiret One", sans-serif;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.3em;
  font-size: 0.95rem;
  text-align: center;
  color: var(--ink);
  text-decoration: none;
  background: var(--gold-gradient);
  border: 1px solid var(--gold-light);
  outline: 1px solid var(--gold);
  outline-offset: 5px;
  transition: outline-offset 0.25s, filter 0.25s;
}

.cta:hover, .cta:focus-visible { outline-offset: 9px; filter: brightness(1.1); }

.grid {
  columns: 4 260px;
  column-gap: 1.25rem;
  max-width: 1400px;
  margin: 1rem auto 3rem;
  padding: 0 1rem;
}

.tile {
  display: block;
  width: 100%;
  margin: 0 0 1.25rem;
  padding: 6px;
  break-inside: avoid;
  background: var(--ink-2);
  border: 1px solid rgba(212, 175, 55, 0.45);
  cursor: pointer;
  position: relative;
  min-height: 120px;
  transition: border-color 0.25s, transform 0.25s;
}

.tile::after {
  content: "";
  position: absolute;
  inset: 12px;
  border: 1px solid transparent;
  transition: border-color 0.25s;
  pointer-events: none;
}

.tile:hover, .tile:focus-visible { border-color: var(--gold); transform: translateY(-3px); }
.tile:hover::after, .tile:focus-visible::after { border-color: rgba(243, 217, 139, 0.7); }

.tile img,
.tile video {
  display: block;
  width: 100%;
  height: auto;
  opacity: 0;
  transition: opacity 0.6s ease;
}

.tile.loaded { min-height: 0; }
.tile.loaded img,
.tile.loaded video { opacity: 1; }

.tile.video video { aspect-ratio: 16 / 9; object-fit: cover; background: #000; }

.tile.video::before {
  content: "\25B6";
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 1;
  width: 56px;
  height: 56px;
  margin: -28px 0 0 -28px;
  display: grid;
  place-items: center;
  padding-left: 4px;
  font-size: 1.2rem;
  color: var(--gold);
  background: rgba(11, 11, 13, 0.7);
  border: 1px solid var(--gold);
  border-radius: 50%;
  box-shadow: 0 0 0 4px rgba(11, 11, 13, 0.5), 0 0 0 5px rgba(212, 175, 55, 0.5);
  pointer-events: none;
  transition: background 0.25s, color 0.25s;
}

.tile.video:hover::before, .tile.video:focus-visible::before { background: var(--gold); color: var(--ink); }

.tile.broken video { opacity: 0.25; }

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(5, 5, 6, 0.95);
}

.lightbox figure {
  margin: 0;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 4rem 5rem 2rem;
}

.lb-media {
  display: contents;
}

.lb-media > img,
.lb-media > video {
  max-width: 100%;
  max-height: calc(100vh - 8rem);
  object-fit: contain;
  border: 1px solid var(--gold);
  padding: 6px;
  background: var(--ink-2);
}

.lightbox figcaption {
  margin-top: 1rem;
  font-family: "Poiret One", sans-serif;
  letter-spacing: 0.3em;
  color: var(--muted);
}

.lightbox .nav.prev { left: 1.25rem; }
.lightbox .nav.next { right: 1.25rem; }

.lb-close {
  position: absolute;
  top: 1rem;
  right: 1.25rem;
  z-index: 3;
  width: 44px;
  height: 44px;
  font-size: 1.8rem;
  line-height: 1;
  color: var(--gold);
  background: transparent;
  border: 1px solid var(--gold);
  cursor: pointer;
}

.lb-close:hover, .lb-close:focus-visible { background: var(--gold); color: var(--ink); }

.actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1.5rem 2rem;
  margin: 2.5rem auto 3rem;
  padding: 0 1rem;
}

.actions .cta { margin: 0; }

.cta.ghost {
  color: var(--gold);
  background: transparent;
  border-color: var(--gold);
}

.cta.ghost:hover, .cta.ghost:focus-visible { color: var(--ink); background: var(--gold-gradient); }

.links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem 2.5rem;
}

.uploader {
  max-width: 720px;
  margin: 1rem auto 2rem;
  padding: 0 1rem;
}

.dropzone {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  min-height: 220px;
  padding: 2rem 1rem;
  text-align: center;
  cursor: pointer;
  background: var(--ink-2);
  border: 1px solid var(--gold);
  outline: 1px solid rgba(212, 175, 55, 0.4);
  outline-offset: 6px;
  transition: background 0.25s, outline-offset 0.25s;
}

.dropzone::before {
  content: "";
  position: absolute;
  inset: 10px;
  border: 1px dashed rgba(212, 175, 55, 0.45);
  pointer-events: none;
}

.dropzone:hover, .dropzone.over, .dropzone:focus-within {
  background: rgba(212, 175, 55, 0.08);
  outline-offset: 10px;
}

.dropzone input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.dz-title {
  font-family: "Limelight", serif;
  font-size: clamp(1.6rem, 5vw, 2.2rem);
  letter-spacing: 0.08em;
  background: var(--gold-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.dz-limits {
  font-style: italic;
  font-size: 0.95rem;
  color: var(--muted);
  opacity: 0.8;
}

.dz-sub {
  font-family: "Poiret One", sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.3em;
  font-size: 0.8rem;
  color: var(--muted);
}

.queue {
  list-style: none;
  margin: 2rem 0 0;
  padding: 0;
}

.queue li {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.35rem 1rem;
  padding: 0.75rem 0;
  border-bottom: 1px solid rgba(212, 175, 55, 0.2);
}

.q-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.q-note {
  font-family: "Poiret One", sans-serif;
  letter-spacing: 0.15em;
  font-size: 0.85rem;
  color: var(--muted);
}

.queue li.ok .q-note { color: var(--gold-light); }
.queue li.err .q-note { color: #e08a7a; }

.q-track {
  grid-column: 1 / -1;
  height: 3px;
  background: rgba(212, 175, 55, 0.15);
  overflow: hidden;
}

.q-bar {
  display: block;
  width: 0;
  height: 100%;
  background: var(--gold-gradient);
  transition: width 0.2s;
}

.queue li.err .q-track { display: none; }

.status {
  min-height: 1.5em;
  margin: 1.5rem 0 0;
  text-align: center;
  font-family: "Poiret One", sans-serif;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  font-size: 0.85rem;
  color: var(--muted);
}

.lightbox figcaption {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
}

.pill.danger {
  color: #e08a7a;
  border-color: #e08a7a;
}

.pill.danger:hover, .pill.danger:focus-visible, .pill.danger.confirming {
  color: var(--ink);
  background: #e08a7a;
}

.pill:disabled { opacity: 0.6; cursor: wait; }

.admin-bar {
  width: calc(100% - 2rem);
  max-width: 720px;
  margin: 0 auto 1.5rem;
  padding: 1rem 1.25rem;
  border: 1px solid rgba(212, 175, 55, 0.45);
  background: var(--ink-2);
  font-family: "Poiret One", sans-serif;
  letter-spacing: 0.15em;
  color: var(--muted);
}

.admin-bar form, .admin-on {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.75rem 1rem;
}

.admin-bar label { text-transform: uppercase; font-size: 0.8rem; }

.admin-bar input {
  flex: 1 1 160px;
  max-width: 260px;
  padding: 0.45rem 0.75rem;
  font: inherit;
  letter-spacing: 0.1em;
  color: var(--cream);
  background: var(--ink);
  border: 1px solid rgba(212, 175, 55, 0.6);
}

.admin-bar input:focus { outline: 1px solid var(--gold); outline-offset: 2px; }

.admin-msg { color: #e08a7a; }

.admin-on span { color: var(--gold-light); }

footer {
  text-align: center;
  padding: 1.5rem;
  font-family: "Poiret One", sans-serif;
  letter-spacing: 0.4em;
  color: var(--gold-dark);
  border-top: 1px solid rgba(212, 175, 55, 0.2);
}

footer span { color: var(--gold); margin: 0 0.5rem; }

@media (max-width: 640px) {
  .frame { padding: 8px; }
  .corner { width: 30px; height: 30px; }
  .nav { width: 38px; height: 38px; }
  .frame .nav.prev { left: 14px; }
  .frame .nav.next { right: 14px; }
  .stage { aspect-ratio: 4 / 5; }
  .grid { columns: 2 140px; column-gap: 0.6rem; }
  .tile { margin-bottom: 0.6rem; padding: 3px; }
  .lightbox figure { padding: 4rem 0.5rem 2rem; }
  .lightbox .nav { top: auto; bottom: 1rem; transform: none; }
  .cta { padding: 0.9rem 1.4rem; letter-spacing: 0.2em; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; }
}
