/* =====================================================================
   Galeria de Eventos - estilos publicos
   Mobile-first. Sin dependencias externas ni fuentes remotas.
   ===================================================================== */

:root {
  --accent: #1a1a1a;
  --bg: #ffffff;
  --bg-soft: #faf9f7;
  --fg: #17150f;
  --muted: #6d675f;
  --line: #e9e5df;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(23, 21, 15, .04), 0 8px 30px rgba(23, 21, 15, .06);
  --font-serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, "Times New Roman", serif;
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --display: var(--font-serif);
  --ease: cubic-bezier(.22, .61, .36, 1);
}

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { max-width: 100%; display: block; }
a { color: inherit; }

h1, h2, h3 { font-family: var(--display); font-weight: 400; line-height: 1.15; margin: 0; letter-spacing: -.01em; }

.wrap { width: 100%; max-width: 1180px; margin: 0 auto; padding: 0 20px; }
.narrow { max-width: 640px; }
.center { text-align: center; }
.muted { color: var(--muted); }

.section { padding: 68px 0; }
.section + .section { border-top: 1px solid var(--line); }
.section-tag {
  font-family: var(--font-sans);
  font-size: 11px;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 14px;
}
.section h2 { font-size: clamp(26px, 5vw, 38px); margin-bottom: 12px; }
.section p.lead { color: var(--muted); margin: 0 auto; max-width: 52ch; }

/* --- Botones ------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 52px;
  padding: 0 28px;
  border: 1px solid var(--accent);
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  font: 500 15px/1 var(--font-sans);
  text-decoration: none;
  cursor: pointer;
  transition: transform .18s var(--ease), opacity .18s var(--ease);
  -webkit-tap-highlight-color: transparent;
}
.btn:hover { opacity: .88; }
.btn:active { transform: scale(.98); }
.btn[disabled] { opacity: .45; cursor: not-allowed; }
.btn-ghost { background: transparent; color: var(--fg); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--fg); opacity: 1; }
.btn-sm { min-height: 40px; padding: 0 18px; font-size: 14px; }
.btn-block { width: 100%; }

/* --- Portada -------------------------------------------------------- */
.hero {
  position: relative;
  min-height: 88svh;
  min-height: 88vh;
  display: grid;
  place-items: center;
  text-align: center;
  color: #fff;
  overflow: hidden;
  background: #14120e;
}
.hero-media { position: absolute; inset: 0; }
.hero-media img { width: 100%; height: 100%; object-fit: cover; opacity: .82; }
.hero::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,.35) 0%, rgba(0,0,0,.15) 40%, rgba(0,0,0,.62) 100%);
}
.hero-inner { position: relative; z-index: 2; padding: 96px 22px 72px; }
.hero-kicker {
  font-size: 11px; letter-spacing: .3em; text-transform: uppercase;
  opacity: .85; margin: 0 0 18px;
}
.hero h1 { font-size: clamp(38px, 11vw, 88px); text-shadow: 0 2px 30px rgba(0,0,0,.3); }
.hero-hosts { font-family: var(--display); font-size: clamp(19px, 4.6vw, 27px); margin: 18px 0 0; opacity: .95; }
.hero-date {
  margin: 22px 0 0; font-size: 13px; letter-spacing: .18em; text-transform: uppercase; opacity: .9;
}
.hero-actions { margin-top: 38px; display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.hero .btn { background: #fff; color: #14120e; border-color: #fff; }
.hero .btn-ghost { background: rgba(255,255,255,.08); color: #fff; border-color: rgba(255,255,255,.5); }
.scroll-cue {
  position: absolute; bottom: 26px; left: 50%; transform: translateX(-50%);
  z-index: 2; font-size: 22px; opacity: .8; animation: bob 2.4s var(--ease) infinite;
}
@keyframes bob { 0%,100% { transform: translate(-50%, 0); } 50% { transform: translate(-50%, 8px); } }

/* --- Carrusel de momentos ------------------------------------------ */
.carousel { position: relative; margin-top: 34px; }
.carousel-track {
  display: flex;
  gap: 14px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  padding-bottom: 10px;
  scrollbar-width: none;
}
.carousel-track::-webkit-scrollbar { display: none; }
.carousel-slide {
  flex: 0 0 84%;
  scroll-snap-align: center;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--bg-soft);
  aspect-ratio: 4 / 5;
  box-shadow: var(--shadow);
  margin: 0;
}
.carousel-slide img { width: 100%; height: 100%; object-fit: cover; }
.carousel-nav {
  display: flex; align-items: center; justify-content: center; gap: 16px; margin-top: 18px;
}
.carousel-btn {
  width: 44px; height: 44px; border-radius: 50%;
  border: 1px solid var(--line); background: #fff; color: var(--fg);
  font-size: 17px; cursor: pointer; display: grid; place-items: center;
}
.carousel-btn:hover { border-color: var(--fg); }
.carousel-dots { display: flex; gap: 7px; }
.carousel-dots button {
  width: 7px; height: 7px; padding: 0; border: 0; border-radius: 50%;
  background: var(--line); cursor: pointer; transition: all .2s var(--ease);
}
.carousel-dots button[aria-current="true"] { background: var(--accent); width: 22px; border-radius: 4px; }

/* --- Subida --------------------------------------------------------- */
.dropzone {
  margin-top: 30px;
  border: 1.5px dashed var(--line);
  border-radius: 20px;
  background: var(--bg-soft);
  padding: 46px 22px;
  text-align: center;
  transition: border-color .2s var(--ease), background .2s var(--ease);
}
.dropzone.is-over { border-color: var(--accent); background: #fff; }
.dropzone-icon { font-size: 34px; line-height: 1; }
.dropzone h3 { font-size: 21px; margin: 16px 0 6px; }
.dropzone p { color: var(--muted); font-size: 14px; margin: 0 0 22px; }
.dropzone .hint { font-size: 12.5px; margin-top: 18px; margin-bottom: 0; }

.name-field { max-width: 320px; margin: 0 auto 22px; text-align: left; }
.name-field label { display: block; font-size: 13px; color: var(--muted); margin-bottom: 7px; }
input[type="text"], input[type="email"], input[type="password"], input[type="date"], input[type="number"], textarea, select {
  width: 100%;
  min-height: 48px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  color: var(--fg);
  font: 400 16px/1.4 var(--font-sans);
}
textarea { min-height: 110px; resize: vertical; }
input:focus, textarea:focus, select:focus { outline: 2px solid var(--accent); outline-offset: 1px; border-color: transparent; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.queue { margin-top: 26px; display: grid; gap: 10px; text-align: left; }
.queue-item {
  display: flex; align-items: center; gap: 12px;
  padding: 10px; border: 1px solid var(--line); border-radius: 12px; background: #fff;
}
.queue-thumb {
  width: 46px; height: 46px; border-radius: 8px; object-fit: cover; flex: 0 0 46px; background: var(--bg-soft);
}
.queue-body { flex: 1; min-width: 0; }
.queue-name {
  font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.queue-msg { font-size: 12px; color: var(--muted); }
.queue-item.is-error .queue-msg { color: #b3261e; }
.queue-item.is-done .queue-msg { color: #1c6a3f; }
.bar { height: 4px; border-radius: 3px; background: var(--line); overflow: hidden; margin-top: 6px; }
.bar > span { display: block; height: 100%; width: 0; background: var(--accent); transition: width .25s var(--ease); }

/* --- Galeria -------------------------------------------------------- */
.grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  margin-top: 30px;
}
.tile {
  position: relative;
  margin: 0;
  aspect-ratio: 1 / 1;
  border-radius: 10px;
  overflow: hidden;
  background: var(--bg-soft);
  cursor: zoom-in;
  border: 0;
  padding: 0;
}
.tile img {
  width: 100%; height: 100%; object-fit: cover;
  opacity: 0; transition: opacity .5s var(--ease), transform .5s var(--ease);
}
.tile img.is-loaded { opacity: 1; }
.tile:hover img { transform: scale(1.04); }
.tile-meta {
  position: absolute; inset: auto 0 0 0;
  padding: 22px 10px 8px;
  background: linear-gradient(transparent, rgba(0,0,0,.55));
  color: #fff; font-size: 11.5px; text-align: left;
  opacity: 0; transition: opacity .25s var(--ease);
}
.tile:hover .tile-meta, .tile:focus-visible .tile-meta { opacity: 1; }
.gallery-empty { padding: 56px 0; color: var(--muted); }
.load-more { margin-top: 32px; text-align: center; }
.sentinel { height: 1px; }

/* --- Visor ---------------------------------------------------------- */
.lightbox {
  position: fixed; inset: 0; z-index: 90;
  background: rgba(12, 11, 9, .96);
  display: none;
  align-items: center;
  justify-content: center;
  touch-action: pan-y;
}
.lightbox.is-open { display: flex; }
.lightbox img {
  max-width: 100%; max-height: 100svh; max-height: 100vh; object-fit: contain;
  user-select: none; -webkit-user-drag: none;
}
.lb-close, .lb-prev, .lb-next {
  position: absolute; z-index: 3;
  width: 46px; height: 46px; border-radius: 50%;
  border: 0; background: rgba(255,255,255,.12); color: #fff;
  font-size: 20px; cursor: pointer; display: grid; place-items: center;
  backdrop-filter: blur(6px);
}
.lb-close { top: 14px; right: 14px; }
.lb-prev { left: 10px; top: 50%; transform: translateY(-50%); }
.lb-next { right: 10px; top: 50%; transform: translateY(-50%); }
.lb-bar {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 3;
  padding: 16px 18px calc(16px + env(safe-area-inset-bottom));
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
  color: #fff; font-size: 13px;
  background: linear-gradient(transparent, rgba(0,0,0,.75));
}
.lb-bar .btn { min-height: 42px; background: #fff; color: #14120e; border-color: #fff; }

/* --- Descarga completa ---------------------------------------------- */
.zip-box { margin-top: 28px; }
.zip-status { margin-top: 18px; font-size: 14px; color: var(--muted); }
.zip-parts { margin-top: 16px; display: grid; gap: 10px; justify-content: center; }

/* --- Avisos --------------------------------------------------------- */
.notice {
  margin-top: 22px; padding: 14px 16px; border-radius: 12px;
  background: var(--bg-soft); border: 1px solid var(--line);
  font-size: 14px; color: var(--muted);
}
.notice.ok { border-color: #bfe3cd; background: #f2fbf5; color: #17593a; }
.notice.error { border-color: #f0c4c0; background: #fdf4f3; color: #8f2c22; }

/* --- Pie ------------------------------------------------------------ */
.footer {
  padding: 48px 0 calc(48px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--line);
  text-align: center; color: var(--muted); font-size: 13px;
}
.footer .brand { font-family: var(--display); font-size: 19px; color: var(--fg); margin-bottom: 8px; }

/* --- Escritorio ----------------------------------------------------- */
@media (min-width: 640px) {
  .section { padding: 92px 0; }
  .grid { grid-template-columns: repeat(3, 1fr); gap: 12px; }
  .carousel-slide { flex-basis: 46%; aspect-ratio: 3 / 4; }
  .queue { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 1024px) {
  .grid { grid-template-columns: repeat(4, 1fr); }
  .carousel-slide { flex-basis: 31%; }
  .queue { grid-template-columns: repeat(3, 1fr); }
  .lb-prev { left: 26px; }
  .lb-next { right: 26px; }
}

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


/* --- Contacto ------------------------------------------------------- */
.contact-section { background: var(--bg-soft); }
.contact-actions {
  margin-top: 28px;
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}
.contact-site {
  margin-top: 20px !important;
  font-size: 14px;
  color: var(--muted);
}
.contact-site a,
.footer-contact a,
.footer-copy a {
  text-underline-offset: 3px;
}
.footer-contact {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 18px;
  margin-top: 10px;
}
.footer-contact a { color: var(--muted); }
.footer-copy {
  margin-top: 14px;
  font-size: 12px;
  color: var(--muted);
}
@media (max-width: 560px) {
  .contact-actions .btn { width: 100%; }
}


/* --- Carrusel horizontal de portada -------------------------------- */
#homePhotoReel{display:block;width:100%;height:218px;overflow:hidden;margin:0;padding:8px 0;box-sizing:border-box}
#homePhotoReel .home-reel-viewport{display:block;width:100%;height:202px;overflow:hidden}
#homePhotoReel .home-reel-track{display:flex;flex-flow:row nowrap;align-items:stretch;width:max-content;height:202px;gap:8px;margin:0;padding:0;will-change:transform}
#homePhotoReel .home-reel-slide{display:block;flex:0 0 142px;width:142px;height:202px;margin:0;padding:0;overflow:hidden;border-radius:8px;background:var(--bg-soft);line-height:0}
#homePhotoReel .home-reel-slide img{display:block;width:100%;height:100%;max-width:none;object-fit:cover;object-position:center;margin:0;padding:0}
.home-intro{padding-top:42px}
@media(max-width:640px){
  #homePhotoReel{height:172px;padding:6px 0 8px}
  #homePhotoReel .home-reel-viewport,#homePhotoReel .home-reel-track{height:158px}
  #homePhotoReel .home-reel-slide{flex-basis:112px;width:112px;height:158px}
  .home-intro{padding-top:34px}
}
