/* ─── css/style.css ───────────────────────────────────────────
   Estilos da galeria. Paleta, layout e componentes.
   Para mudar o visual, edite as variáveis em :root.
────────────────────────────────────────────────────────────── */

/* ─── Reset ─────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

/* ─── Tokens de design ──────────────────────────────────────── */
:root {
  /* Cores */
  --bg:        #0D0D0D;
  --surface:   #141414;
  --border:    rgba(255, 255, 255, 0.08);
  --text:      #F0EDE8;
  --muted:     #888680;
  --gold:      #C9A84C;

  /* Bordas */
  --radius-sm: 6px;
  --radius-md: 10px;

  /* Animações */
  --transition: 0.25s ease;
}

/* ─── Base ───────────────────────────────────────────────────── */
html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  line-height: 1.6;
  min-height: 100vh;
}

/* ─── Header ─────────────────────────────────────────────────── */
header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(13, 13, 13, 0.88);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  padding: 0 2rem;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.site-title {
  font-family: 'Cormorant Garant', serif;
  font-size: 1.6rem;
  font-weight: 300;
  letter-spacing: 0.18em;
  color: var(--text);
}

.site-title span { color: var(--gold); }

/* ─── Galeria ────────────────────────────────────────────────── */
.gallery-wrap {
  width: 50%;
  margin: 0 auto;
  padding: 2rem 0 5rem;
}

@media (max-width: 1200px) { .gallery-wrap { width: 70%; } }
@media (max-width: 800px)  { .gallery-wrap { width: 90%; } }
@media (max-width: 500px)  { .gallery-wrap { width: 96%; } }

.gallery-toolbar {
  display: flex;
  align-items: center;
  margin-bottom: 1.25rem;
}

.gallery-count {
  font-size: 12px;
  color: var(--muted);
  letter-spacing: 0.04em;
}

/* ─── Grid masonry — 3 colunas por JS ───────────────────────── */
.masonry {
  display: flex;
  gap: 10px;
  align-items: flex-start;
}

.masonry-col {
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1;
  min-width: 0;
}

@media (max-width: 500px) {
  .masonry     { gap: 6px; }
  .masonry-col { gap: 6px; }
}

/* ─── Card ───────────────────────────────────────────────────── */
.art-card {
  position: relative;
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--surface);
  cursor: pointer;
}

.art-card img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: var(--radius-md);
  transition: transform 0.4s ease;
}

.art-card:hover img { transform: scale(1.04); }

/* Imagem quebrada (arquivo não encontrado) */
.art-card.broken {
  display: none;
}

.card-overlay {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  padding: 2.5rem 0.85rem 0.85rem;
  background: linear-gradient(
    to top,
    rgba(0, 0, 0, 0.90) 0%,
    rgba(0, 0, 0, 0.35) 55%,
    transparent 100%
  );
  border-radius: 0 0 var(--radius-md) var(--radius-md);
  opacity: 0;
  transform: translateY(6px);
  transition: opacity var(--transition), transform var(--transition);
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.art-card:hover .card-overlay {
  opacity: 1;
  transform: translateY(0);
}

.card-name {
  font-family: 'Cormorant Garant', serif;
  font-size: 1rem;
  font-weight: 400;
  color: #fff;
  line-height: 1.3;
  word-break: break-word;
}

.card-date {
  font-size: 10px;
  color: rgba(255, 255, 255, 0.5);
  letter-spacing: 0.04em;
}

/* ─── Empty state ────────────────────────────────────────────── */
.empty-state {
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 6rem 2rem;
  gap: 0.75rem;
}
.empty-state.visible { display: flex; }

.empty-icon {
  font-size: 3rem;
  opacity: 0.12;
  line-height: 1;
  margin-bottom: 0.5rem;
}

.empty-title {
  font-family: 'Cormorant Garant', serif;
  font-size: 1.8rem;
  font-weight: 300;
  color: var(--muted);
}

.empty-text {
  font-size: 13px;
  color: var(--muted);
  opacity: 0.5;
  max-width: 280px;
}

/* ─── Lightbox ───────────────────────────────────────────────── */
.lightbox {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.96);
  z-index: 300;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 1rem;
  padding: 1rem;
  cursor: zoom-out;
}
.lightbox.open { display: flex; }

.lightbox-img-wrap {
  cursor: default;
  display: flex;
  align-items: center;
  justify-content: center;
  max-width: 92vw;
  max-height: 88vh;
}

.lightbox-img-wrap img {
  max-width: 100%;
  max-height: 88vh;
  object-fit: contain;
  border-radius: var(--radius-sm);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.7);
}

.lightbox-caption {
  font-family: 'Cormorant Garant', serif;
  font-size: 1.1rem;
  font-weight: 300;
  color: rgba(255, 255, 255, 0.65);
  letter-spacing: 0.06em;
  text-align: center;
}

.lightbox-close {
  position: fixed;
  top: 1.25rem; right: 1.25rem;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #fff;
  font-size: 1rem;
  width: 38px; height: 38px;
  border-radius: 50%;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: background var(--transition);
}
.lightbox-close:hover { background: rgba(255, 255, 255, 0.18); }

.lightbox-nav {
  position: fixed;
  top: 50%; transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #fff;
  font-size: 1.2rem;
  width: 44px; height: 44px;
  border-radius: 50%;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: background var(--transition);
  z-index: 10;
}
.lightbox-nav:hover { background: rgba(255, 255, 255, 0.16); }
#lightboxPrev { left: 1.25rem; }
#lightboxNext { right: 1.25rem; }

/* ─── Toast ──────────────────────────────────────────────────── */
.toast {
  position: fixed;
  bottom: 2rem; left: 50%;
  transform: translateX(-50%) translateY(16px);
  background: var(--surface);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: var(--radius-sm);
  padding: 10px 20px;
  font-size: 13px;
  color: var(--text);
  opacity: 0;
  transition: opacity 0.25s ease, transform 0.25s ease;
  z-index: 400;
  pointer-events: none;
  white-space: nowrap;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
}
.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ─── Scrollbar ──────────────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: #1C1C1C; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #333; }