* { margin: 0; padding: 0; box-sizing: border-box; }
:root {
  --ink: #1d1a16;
  --muted: #6f6a61;
  --paper: #faf7f2;
  --card: #ffffff;
  --line: #e7e0d4;
  --red: #d52b1e;
  --gold: #ffbc0d;
}
html { scroll-behavior: smooth; }
body {
  font-family: 'Inter', system-ui, sans-serif;
  background: var(--paper);
  color: var(--ink);
}

/* ---------- HERO ---------- */
.hero {
  position: relative;
  min-height: 92vh;
  display: flex;
  align-items: center;
  overflow: hidden;
  background: #2b2118;
}
.hero-img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: center;
}
.hero-shade {
  position: absolute; inset: 0;
  background: linear-gradient(90deg, rgba(16,10,4,.82) 0%, rgba(16,10,4,.62) 38%, rgba(16,10,4,.18) 68%, rgba(16,10,4,0) 100%),
              linear-gradient(0deg, rgba(16,10,4,.35) 0%, rgba(16,10,4,0) 35%);
}
.hero-content {
  position: relative;
  z-index: 2;
  max-width: 640px;
  padding: 64px 24px 64px clamp(24px, 6vw, 84px);
  color: #fff;
}
.eyebrow {
  font-size: 12px; font-weight: 700;
  letter-spacing: .32em;
  color: var(--gold);
  margin-bottom: 22px;
}
.hero h1 {
  font-family: 'Fraunces', serif;
  font-weight: 700;
  font-size: clamp(44px, 7.2vw, 88px);
  line-height: 1.02;
  letter-spacing: -0.01em;
}
.hero h1 em { font-style: italic; font-weight: 500; color: #ffd34d; }
.hero-sub {
  margin-top: 22px;
  font-size: clamp(16px, 2vw, 20px);
  color: rgba(255,255,255,.92);
}
.hero-meet { margin-top: 6px; font-size: clamp(15px, 1.8vw, 18px); color: rgba(255,255,255,.75); }
.search-wrap { margin-top: 38px; max-width: 420px; }
.search-wrap label {
  display: block;
  font-size: 13px; font-weight: 600;
  letter-spacing: .14em;
  color: rgba(255,255,255,.85);
  margin-bottom: 10px;
}
.search-wrap input {
  width: 100%;
  padding: 15px 18px;
  font-size: 16px;
  font-family: inherit;
  color: var(--ink);
  background: rgba(255,255,255,.97);
  border: none;
  border-radius: 999px;
  outline: none;
  box-shadow: 0 10px 34px rgba(0,0,0,.35);
}
.search-wrap input:focus { box-shadow: 0 0 0 3px var(--gold), 0 10px 34px rgba(0,0,0,.35); }

/* ---------- COLLECTION ---------- */
main { max-width: 1240px; margin: 0 auto; padding: 56px clamp(16px, 4vw, 40px) 30px; }
.section-head {
  display: flex; justify-content: space-between; align-items: baseline; gap: 16px;
  font-size: 13px; font-weight: 700; letter-spacing: .22em;
  border-bottom: 2px solid var(--ink);
  padding-bottom: 14px;
}
.section-head #count { color: var(--red); letter-spacing: .22em; }
.hint { margin-top: 14px; font-size: 14px; color: var(--muted); }
.grid {
  margin-top: 28px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 22px;
}
.card {
  display: block;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 18px;
  overflow: hidden;
  text-decoration: none;
  color: var(--ink);
  transition: transform .18s ease, box-shadow .18s ease;
}
.card:hover { transform: translateY(-4px); box-shadow: 0 16px 34px rgba(29,26,22,.14); }
.card img { display: block; width: 100%; aspect-ratio: 1/1; object-fit: cover; background: #efe9df; }
.card .meta {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: 12px 14px 13px;
}
.card .name { font-weight: 600; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card .dl {
  flex: none;
  font-size: 11px; font-weight: 700; letter-spacing: .08em;
  color: var(--red);
  border: 1px solid #f0c7c2;
  padding: 4px 8px; border-radius: 999px;
}
.card:hover .dl { background: var(--red); color: #fff; border-color: var(--red); }
.noresult { margin-top: 40px; text-align: center; color: var(--muted); font-size: 16px; }

footer {
  text-align: center;
  padding: 44px 20px 54px;
  font-size: 12px; font-weight: 700; letter-spacing: .3em; color: var(--muted);
}

@media (max-width: 640px) {
  .hero { min-height: 84vh; align-items: flex-end; }
  .hero-shade { background: linear-gradient(0deg, rgba(16,10,4,.86) 0%, rgba(16,10,4,.45) 55%, rgba(16,10,4,.05) 100%); }
  .hero-content { padding: 40px 20px 44px; }
  .grid { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 14px; }
}

/* ---------- CARD: X BADGE ---------- */
.card { position: relative; cursor: zoom-in; }
.card:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }
.xbadge {
  position: absolute; top: 10px; right: 10px; z-index: 2;
  display: inline-flex; align-items: center; gap: 5px;
  max-width: calc(100% - 20px);
  padding: 5px 9px 5px 7px;
  background: rgba(15,15,15,.82); color: #fff;
  border-radius: 999px; text-decoration: none;
  font-size: 11px; font-weight: 600; line-height: 1;
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  box-shadow: 0 4px 14px rgba(0,0,0,.22);
  transition: background .15s ease, transform .15s ease;
}
.xbadge svg { width: 11px; height: 11px; fill: currentColor; flex: none; }
.xbadge span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.xbadge:hover { background: #000; transform: scale(1.05); }

/* ---------- LIGHTBOX ---------- */
body.lb-lock { overflow: hidden; }
.lightbox {
  position: fixed; inset: 0; z-index: 100;
  display: flex; align-items: center; justify-content: center;
  background: rgba(12,9,6,.92);
  opacity: 0; transition: opacity .18s ease;
}
.lightbox[hidden] { display: none !important; }
.lightbox:not(.open) { pointer-events: none; }
.lightbox.open { opacity: 1; pointer-events: auto; }
.lb-fig {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  width: 100%; height: 100%; padding: 56px 72px 24px;
}
.lb-img {
  max-width: 100%; max-height: calc(100vh - 150px);
  border-radius: 20px; box-shadow: 0 30px 80px rgba(0,0,0,.55);
  transform: scale(.94); transition: transform .22s ease;
  background: #efe9df;
}
.lightbox.open .lb-img { transform: scale(1); }
.lb-cap {
  margin-top: 18px; display: flex; align-items: center; gap: 14px; flex-wrap: wrap; justify-content: center;
  color: #fff;
}
.lb-name { font-family: 'Fraunces', serif; font-size: 24px; font-weight: 700; }
.lb-actions { display: inline-flex; gap: 10px; }
.lb-x, .lb-dl {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 14px; border-radius: 999px; text-decoration: none;
  font-size: 13px; font-weight: 700; letter-spacing: .04em;
}
.lb-x { background: #fff; color: #000; }
.lb-x svg { width: 13px; height: 13px; fill: currentColor; }
.lb-dl { background: var(--red); color: #fff; }
.lb-x:hover, .lb-dl:hover { filter: brightness(1.08); }
.lb-close, .lb-nav {
  position: absolute; z-index: 2; border: none; cursor: pointer;
  color: #fff; background: rgba(255,255,255,.12); border-radius: 999px;
  display: flex; align-items: center; justify-content: center;
}
.lb-close { top: 14px; right: 14px; width: 44px; height: 44px; font-size: 28px; line-height: 1; }
.lb-nav { top: 50%; transform: translateY(-50%); width: 48px; height: 48px; font-size: 34px; line-height: 1; }
.lb-prev { left: 14px; }
.lb-next { right: 14px; }
.lb-close:hover, .lb-nav:hover { background: rgba(255,255,255,.24); }
@media (max-width: 640px) {
  .lb-fig { padding: 60px 10px 18px; }
  .lb-nav { top: auto; bottom: 18px; transform: none; }
  .lb-img { max-height: calc(100vh - 190px); }
  .xbadge { top: 8px; right: 8px; font-size: 10px; padding: 4px 7px 4px 6px; }
}
