:root{
  --cream: #FAF6EF;
  --ink: #221E1B;
  --ink-soft: #6B6259;
  --red: #E14434;
  --orange: #F2954A;
  --gold: #F3BE3E;
  --line: rgba(34,30,27,0.12);
  --card-bg: #ffffff;
  --radius: 14px;
}

*{ box-sizing: border-box; }

html{ scroll-behavior: smooth; }

body{
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: 'Inter', sans-serif;
  position: relative;
  min-height: 100vh;
}

.grain{
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 999;
  opacity: 0.035;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ---------- HERO ---------- */
.hero{
  padding: 72px 24px 56px;
  text-align: center;
  border-bottom: 1px solid var(--line);
  background:
    radial-gradient(circle at 15% 20%, rgba(225,68,52,0.07), transparent 45%),
    radial-gradient(circle at 85% 10%, rgba(243,190,62,0.10), transparent 40%);
}

.hero-inner{ max-width: 640px; margin: 0 auto; }

.eyebrow{
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin: 0 0 18px;
  font-weight: 600;
}

.wordmark{
  font-family: 'Fraunces', serif;
  font-size: clamp(64px, 14vw, 116px);
  font-weight: 700;
  line-height: 0.9;
  margin: 0;
  letter-spacing: -0.02em;
}
.wordmark .d{ color: var(--red); }
.wordmark .k{ color: var(--orange); }
.wordmark .v{ color: var(--gold); }

.tagline{
  margin: 22px auto 0;
  font-size: 16px;
  line-height: 1.6;
  color: var(--ink-soft);
  max-width: 460px;
}

.stats{
  margin-top: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
}
.stat{ display: flex; flex-direction: column; align-items: center; }
.stat-num{ font-family: 'Fraunces', serif; font-size: 22px; font-weight: 600; }
.stat-label{ font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-soft); margin-top: 2px; }
.divider-dot{ color: var(--line); font-size: 20px; }

/* ---------- TOOLBAR ---------- */
.gallery-wrap{
  max-width: 1180px;
  margin: 0 auto;
  padding: 44px 24px 90px;
}

.toolbar{
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 30px;
}

.search-box{
  flex: 1 1 260px;
  padding: 12px 16px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--card-bg);
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  color: var(--ink);
  outline: none;
  transition: border-color 0.15s ease;
}
.search-box:focus{ border-color: var(--orange); }
.search-box::placeholder{ color: #B4AA9E; }

.upload-zone{
  padding: 12px 20px;
  border-radius: 999px;
  border: 1px dashed var(--ink-soft);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  color: var(--ink);
  background: transparent;
  transition: background 0.15s ease, border-color 0.15s ease;
  white-space: nowrap;
}
.upload-zone:hover{ background: rgba(225,68,52,0.06); border-color: var(--red); }

/* ---------- MASONRY GALLERY ---------- */
.gallery{
  columns: 4 220px;
  column-gap: 16px;
}
@media (max-width: 900px){ .gallery{ columns: 3 160px; } }
@media (max-width: 560px){ .gallery{ columns: 2 140px; column-gap: 10px; } }

.card{
  break-inside: avoid;
  margin-bottom: 16px;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--card-bg);
  border: 1px solid var(--line);
  cursor: zoom-in;
  position: relative;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.card:hover{
  transform: translateY(-3px);
  box-shadow: 0 14px 30px -14px rgba(34,30,27,0.28);
}
.card img{
  display: block;
  width: 100%;
  height: auto;
}
.card .cap{
  padding: 9px 12px 11px;
  font-size: 11.5px;
  color: var(--ink-soft);
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  border-top: 1px solid var(--line);
}

.empty-state{
  text-align: center;
  color: var(--ink-soft);
  padding: 60px 0;
  font-size: 15px;
}

/* ---------- FOOTER ---------- */
.site-footer{
  text-align: center;
  padding: 26px 20px 40px;
  color: var(--ink-soft);
  font-size: 13px;
  border-top: 1px solid var(--line);
}

/* ---------- LIGHTBOX ---------- */
.lightbox{
  position: fixed;
  inset: 0;
  background: rgba(20,17,15,0.94);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  flex-direction: column;
  padding: 40px 20px;
}
.lightbox.open{ display: flex; }

.lightbox-img{
  max-width: min(90vw, 780px);
  max-height: 78vh;
  border-radius: 8px;
  box-shadow: 0 30px 70px -20px rgba(0,0,0,0.6);
}

.lightbox-caption{
  color: #E8E2D8;
  font-size: 13px;
  margin-top: 16px;
  letter-spacing: 0.02em;
}

.lightbox-close{
  position: absolute;
  top: 20px;
  right: 24px;
  background: none;
  border: none;
  color: #fff;
  font-size: 34px;
  line-height: 1;
  cursor: pointer;
  opacity: 0.8;
}
.lightbox-close:hover{ opacity: 1; }

.lightbox-nav{
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255,255,255,0.08);
  border: none;
  color: #fff;
  font-size: 30px;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  cursor: pointer;
  transition: background 0.15s ease;
}
.lightbox-nav:hover{ background: rgba(255,255,255,0.18); }
.lightbox-prev{ left: 18px; }
.lightbox-next{ right: 18px; }

@media (max-width: 560px){
  .lightbox-nav{ width: 40px; height: 40px; font-size: 24px; }
  .lightbox-prev{ left: 6px; }
  .lightbox-next{ right: 6px; }
}

@media (prefers-reduced-motion: reduce){
  .card{ transition: none; }
  html{ scroll-behavior: auto; }
}
