:root {
  --cream: #faf6f0;
  --cream-2: #f1e9dd;
  --ink: #3a352f;
  --muted: #8a8073;
  --gold: #b08d57;
  --sage: #7c8a6f;
  --line: #e4d9c8;
  --danger: #b3543f;
  --shadow: 0 12px 40px rgba(58, 53, 47, 0.12);
  --radius: 16px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: "Montserrat", system-ui, sans-serif;
  font-weight: 300;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

h1, h2 { font-family: "Cormorant Garamond", Georgia, serif; font-weight: 500; }

/* ===== Portada ===== */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 48px 20px;
  background:
    radial-gradient(120% 80% at 50% 0%, #fff 0%, var(--cream) 55%, var(--cream-2) 100%);
}
.hero__inner { animation: fadeUp 1.1s ease both; }
.hero__eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.42em;
  font-size: 0.72rem;
  color: var(--gold);
  margin: 0 0 22px;
}
.hero__photo {
  width: min(260px, 64vw);
  aspect-ratio: 1;
  margin: 0 auto 26px;
  border-radius: 50%;
  padding: 10px;
  background: #fff;
  box-shadow: var(--shadow);
  border: 1px solid var(--line);
}
.hero__photo img {
  width: 100%; height: 100%;
  object-fit: cover;
  border-radius: 50%;
  display: block;
}
.hero__names {
  font-size: clamp(2.8rem, 11vw, 5.5rem);
  line-height: 1.02;
  margin: 0;
}
.hero__names span { color: var(--gold); font-style: italic; font-weight: 400; }
.hero__date {
  letter-spacing: 0.3em;
  text-transform: uppercase;
  font-size: 0.8rem;
  color: var(--muted);
  margin-top: 14px;
}
.hero__scroll {
  position: absolute;
  bottom: 22px;
  font-size: 2rem;
  color: var(--gold);
  text-decoration: none;
  animation: bob 2s ease-in-out infinite;
}

/* ===== Intro ===== */
.intro {
  max-width: 680px;
  margin: 0 auto;
  padding: 80px 24px 30px;
  text-align: center;
}
.intro h2 { font-size: clamp(1.9rem, 6vw, 2.8rem); margin: 0 0 18px; }
.intro p { color: #5a534a; margin: 0 auto 14px; }
.intro__note {
  font-size: 0.95rem;
  color: var(--muted);
  border-top: 1px solid var(--line);
  padding-top: 18px;
  margin-top: 22px !important;
}

/* ===== Uploader ===== */
.uploader { max-width: 680px; margin: 0 auto; padding: 20px 24px 40px; }
.dropzone {
  border: 2px dashed var(--line);
  border-radius: var(--radius);
  background: #fff;
  padding: 40px 24px;
  text-align: center;
  transition: border-color .2s, background .2s, transform .1s;
  cursor: pointer;
}
.dropzone:hover, .dropzone:focus-visible { border-color: var(--gold); background: #fffdf9; outline: none; }
.dropzone.dragover { border-color: var(--sage); background: #f6f8f2; transform: scale(1.01); }
.dropzone__icon { font-size: 2.6rem; }
.dropzone__title { font-size: 1.1rem; margin: 10px 0 4px; color: var(--ink); }
.dropzone__or { color: var(--muted); margin: 6px 0; font-size: .85rem; }
.dropzone__hint { color: var(--muted); font-size: .8rem; margin-top: 14px; }

.btn {
  font-family: "Montserrat", sans-serif;
  font-weight: 500;
  font-size: .95rem;
  letter-spacing: .03em;
  color: #fff;
  background: var(--gold);
  border: none;
  border-radius: 999px;
  padding: 13px 28px;
  cursor: pointer;
  transition: background .2s, transform .1s;
}
.btn:hover { background: #9d7c49; }
.btn:active { transform: translateY(1px); }

.turnstile { margin: 18px 0 0; display: flex; justify-content: center; }

/* Cola de subida */
.queue { list-style: none; margin: 24px 0 0; padding: 0; display: grid; gap: 12px; }
.queue__item {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px 14px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 4px 12px;
  align-items: center;
}
.queue__name { font-size: .88rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.queue__pct { font-size: .8rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.queue__bar { grid-column: 1 / -1; height: 6px; background: var(--cream-2); border-radius: 999px; overflow: hidden; }
.queue__fill { height: 100%; width: 0%; background: var(--sage); transition: width .25s ease; }
.queue__item.done .queue__fill { background: var(--gold); }
.queue__item.error .queue__fill { background: var(--danger); }
.queue__item.error .queue__pct { color: var(--danger); }

.global-status { text-align: center; color: var(--sage); margin-top: 18px; font-size: .9rem; min-height: 1.2em; }

/* ===== Galería ===== */
.gallery-section { max-width: 1100px; margin: 0 auto; padding: 40px 18px 60px; text-align: center; }
.gallery-section h2 { font-size: clamp(1.8rem, 5vw, 2.6rem); margin: 0 0 6px; }
.count { color: var(--muted); font-family: "Montserrat", sans-serif; font-size: 1rem; }
.gallery-empty { color: var(--muted); margin: 18px 0 0; }
.gallery {
  margin-top: 26px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 10px;
}
.tile {
  position: relative;
  aspect-ratio: 1;
  border: none;
  padding: 0;
  background: var(--cream-2);
  border-radius: 10px;
  overflow: hidden;
  cursor: pointer;
}
.tile img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .3s; }
.tile:hover img { transform: scale(1.06); }
.tile--video { background: #2a2520; }
.tile--video img { opacity: .92; }
.tile__play {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 2.4rem; color: #fff;
  background: rgba(0,0,0,.18);
  text-shadow: 0 2px 8px rgba(0,0,0,.4);
}

/* ===== Footer ===== */
.footer { text-align: center; padding: 30px 20px 46px; color: var(--muted); font-size: .82rem; border-top: 1px solid var(--line); }

/* ===== Lightbox ===== */
.lightbox {
  position: fixed; inset: 0; z-index: 50;
  background: rgba(16, 13, 11, .985);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
}
.lightbox[hidden] { display: none; }

.lb-top {
  position: absolute; top: 0; left: 0; right: 0; z-index: 3;
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 18px;
  background: linear-gradient(to bottom, rgba(0,0,0,.55), transparent);
}
.lb-counter { color: #fff; font-size: .9rem; letter-spacing: .05em; font-variant-numeric: tabular-nums; }
.lb-tools { display: flex; gap: 10px; }

.lb-btn {
  background: rgba(255,255,255,.12); color: #fff;
  border: none; cursor: pointer; border-radius: 999px;
  width: 42px; height: 42px;
  display: flex; align-items: center; justify-content: center;
  text-decoration: none; font-size: 1.1rem; transition: background .2s;
}
.lb-btn:hover { background: rgba(255,255,255,.28); }
.lb-btn svg { width: 20px; height: 20px; }

.lightbox__stage { max-width: 92vw; max-height: 64vh; display: flex; align-items: center; justify-content: center; }
.lightbox__stage img, .lightbox__stage video { max-width: 92vw; max-height: 64vh; border-radius: 8px; box-shadow: 0 20px 60px rgba(0,0,0,.5); }

.lightbox__nav {
  position: absolute; top: 50%; transform: translateY(-50%); z-index: 3;
  background: rgba(255,255,255,.12); color: #fff;
  border: none; cursor: pointer; border-radius: 999px;
  width: 48px; height: 48px; font-size: 1.8rem; line-height: 1;
  display: flex; align-items: center; justify-content: center;
  transition: background .2s;
}
.lightbox__nav:hover { background: rgba(255,255,255,.25); }
.lightbox__prev { left: 14px; }
.lightbox__next { right: 14px; }

.lb-caption {
  color: rgba(255,255,255,.75); font-size: .82rem; margin-top: 14px;
  max-width: 80vw; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-align: center;
}

.lb-thumbs {
  position: absolute; bottom: 0; left: 0; right: 0; z-index: 3;
  display: flex; gap: 8px; overflow-x: auto; padding: 14px 16px;
  background: linear-gradient(to top, rgba(0,0,0,.55), transparent);
  scrollbar-width: thin;
}
.lb-thumb {
  flex: 0 0 auto; width: 62px; height: 62px;
  border: 2px solid transparent; border-radius: 8px; overflow: hidden;
  padding: 0; cursor: pointer; background: #2a2520; opacity: .55;
  transition: opacity .2s, border-color .2s; position: relative;
}
.lb-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.lb-thumb:hover { opacity: .85; }
.lb-thumb.active { opacity: 1; border-color: var(--gold); }
.lb-thumb__play {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 1rem; text-shadow: 0 1px 4px rgba(0,0,0,.6);
}

@media (max-width: 560px) {
  .lightbox__nav { width: 40px; height: 40px; }
  .lightbox__stage, .lightbox__stage img, .lightbox__stage video { max-height: 56vh; }
  .lb-thumb { width: 52px; height: 52px; }
}

/* ===== Animaciones ===== */
@keyframes fadeUp { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
@keyframes bob { 0%,100% { transform: translateY(0); } 50% { transform: translateY(7px); } }

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; scroll-behavior: auto; }
}
