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

:root {
  --font: 'Space Grotesk', sans-serif;
  --white: #f5f5f0;
  --muted: rgba(245, 245, 240, 0.45);
  --dark: #0a0a0a;
  --accent: #c8a96e;
  --header-h: 64px;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font);
  color: var(--white);
  background: var(--dark);
  overflow-x: hidden;
}

/* ── Logo — strips white background, keeps red artwork ── */
.hero-logo,
.header-logo {
  filter: invert(1) hue-rotate(180deg);
  mix-blend-mode: screen;
}

/* ── Hero ───────────────────────────────────────────────── */
#hero {
  position: relative;
  height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: url('images/bg.jpg') center / cover no-repeat fixed;
}

#hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
}

.hero-overlay { display: none; }

.hero-content {
  position: relative;
  z-index: 1;
  text-align: center;
  padding: 0 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}

.hero-logo {
  height: 130px;
  width: auto;
  object-fit: contain;
}

.hero-title {
  font-size: clamp(1.6rem, 5vw, 2.8rem);
  font-weight: 600;
  letter-spacing: 0.05em;
  color: var(--white);
  line-height: 1.1;
}

.hero-tagline {
  font-size: clamp(0.7rem, 2vw, 0.85rem);
  font-weight: 300;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

.hero-count {
  font-size: 0.75rem;
  font-weight: 400;
  letter-spacing: 0.08em;
  color: var(--accent);
  text-transform: uppercase;
}

.scroll-arrow {
  position: absolute;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1;
  background: none;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--white);
  animation: bounce 2s ease-in-out infinite;
  transition: border-color 0.2s;
}

.scroll-arrow:hover { border-color: var(--accent); color: var(--accent); }
.scroll-arrow svg { width: 20px; height: 20px; }

@keyframes bounce {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50%       { transform: translateX(-50%) translateY(6px); }
}

/* ── Map section ─────────────────────────────────────────── */
#map-section {
  height: 100dvh;
  display: flex;
  flex-direction: column;
  position: relative;
}

header {
  flex-shrink: 0;
  height: var(--header-h);
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 0 24px;
  background: rgba(10, 10, 10, 0.85);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
  position: sticky;
  top: 0;
  z-index: 400;
}

.header-text { flex: 1; }

.header-text h2 {
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0.04em;
}

.header-text .tagline {
  font-size: 0.68rem;
  font-weight: 300;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  margin-top: 2px;
}

.header-count {
  font-size: 0.72rem;
  font-weight: 300;
  letter-spacing: 0.06em;
  color: var(--accent);
  text-transform: uppercase;
  white-space: nowrap;
}

#map {
  flex: 1;
  width: 100%;
  background: #111;
}

/* ── Leaflet overrides ────────────────────────────────────── */
.leaflet-container { font-family: var(--font) !important; }

.leaflet-popup-content-wrapper {
  background: #111;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.75);
  padding: 0;
  overflow: hidden;
  animation: popup-in 0.18s ease;
}

@keyframes popup-in {
  from { opacity: 0; transform: translateY(6px) scale(0.97); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

.leaflet-popup-tip-container { display: none; }

.leaflet-popup-close-button {
  color: var(--muted) !important;
  font-size: 16px !important;
  top: 10px !important;
  right: 12px !important;
  z-index: 1;
}
.leaflet-popup-close-button:hover { color: var(--white) !important; }

/* ── Popup card ───────────────────────────────────────────── */
.popup-card { width: 280px; }

.popup-photo {
  width: 100%;
  height: 220px;
  object-fit: cover;
  display: block;
}

.popup-body { padding: 14px 16px 16px; }

.popup-title {
  font-size: 0.88rem;
  font-weight: 400;
  color: var(--white);
  line-height: 1.4;
}

.popup-desc {
  font-size: 0.76rem;
  font-weight: 300;
  color: var(--muted);
  margin-top: 6px;
  line-height: 1.5;
}

/* ── Image markers ────────────────────────────────────────── */
.img-marker {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background-size: cover;
  background-position: center;
  border: 2.5px solid rgba(255, 255, 255, 0.9);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.6);
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.img-marker:hover {
  transform: scale(1.15);
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.85);
}

/* ── Cluster markers ──────────────────────────────────────── */
.duck-cluster {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(10, 10, 10, 0.88);
  border: 2px solid var(--accent);
  color: var(--accent);
  font-family: var(--font);
  font-size: 0.8rem;
  font-weight: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.6);
  cursor: pointer;
  transition: transform 0.15s;
}
.duck-cluster:hover { transform: scale(1.1); }

/* Hide default cluster styles */
.marker-cluster-small,
.marker-cluster-medium,
.marker-cluster-large { background: none !important; }
.marker-cluster-small div,
.marker-cluster-medium div,
.marker-cluster-large div { background: none !important; }

/* ── Menu button ─────────────────────────────────────────── */
#menu-btn {
  position: fixed;
  top: 16px;
  left: 16px;
  z-index: 800;
  background: rgba(10,10,10,0.85);
  backdrop-filter: blur(10px);
  border: 1px solid var(--border);
  border-radius: 8px;
  width: 40px;
  height: 40px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  cursor: pointer;
  padding: 0;
}

#menu-btn span {
  display: block;
  width: 18px;
  height: 1.5px;
  background: var(--white);
  border-radius: 2px;
  transition: transform 0.25s, opacity 0.25s;
}

#menu-btn.open span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
#menu-btn.open span:nth-child(2) { opacity: 0; }
#menu-btn.open span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

/* ── Sidebar ──────────────────────────────────────────────── */
#sidebar {
  position: fixed;
  top: 0;
  left: 0;
  width: 220px;
  height: 100%;
  background: rgba(10,10,10,0.97);
  backdrop-filter: blur(20px);
  border-right: 1px solid var(--border);
  z-index: 700;
  transform: translateX(-100%);
  transition: transform 0.3s cubic-bezier(0.32,0.72,0,1);
  display: flex;
  flex-direction: column;
  padding: 80px 0 40px;
}

#sidebar.open { transform: translateX(0); }

#sidebar nav {
  display: flex;
  flex-direction: column;
}

.nav-item {
  padding: 18px 32px;
  font-size: 1rem;
  font-weight: 400;
  letter-spacing: 0.04em;
  color: var(--muted);
  text-decoration: none;
  border-bottom: 1px solid var(--border);
  transition: color 0.15s, padding-left 0.15s;
}

.nav-item:first-child { border-top: 1px solid var(--border); }
.nav-item:hover { color: var(--white); padding-left: 38px; }

#sidebar-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 600;
}

/* ── Feed ─────────────────────────────────────────────────── */
#feed {
  background: var(--dark);
  padding: 60px 24px 80px;
}

.feed-header {
  display: flex;
  align-items: baseline;
  gap: 14px;
  margin-bottom: 32px;
  border-bottom: 1px solid var(--border);
  padding-bottom: 16px;
}

.feed-title {
  font-size: 1.1rem;
  font-weight: 500;
  letter-spacing: 0.04em;
}

.feed-subtitle {
  font-size: 0.72rem;
  font-weight: 300;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
}

#feed-grid {
  display: flex;
  flex-direction: column;
  gap: 0;
  max-width: 600px;
  margin: 0 auto;
}

.feed-card {
  background: #111;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
}

.feed-card:first-child { border-top: 1px solid var(--border); }

.feed-card img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  display: block;
}

.feed-card-body {
  padding: 16px 20px 20px;
}

.feed-card-address {
  font-size: 0.95rem;
  font-weight: 400;
  color: var(--white);
  line-height: 1.4;
}

.feed-card-date {
  font-size: 0.72rem;
  font-weight: 300;
  letter-spacing: 0.05em;
  color: var(--muted);
  margin-top: 6px;
}

@media (max-width: 640px) {
  #feed { padding: 40px 0 60px; }
  .feed-header { padding: 0 16px 16px; }
  .feed-card-body { padding: 14px 16px 18px; }
}

/* ── Mobile bottom sheet ──────────────────────────────────── */
#sheet-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 500;
}

#bottom-sheet {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 600;
  background: #111;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px 16px 0 0;
  transform: translateY(100%);
  transition: transform 0.3s cubic-bezier(0.32, 0.72, 0, 1);
  max-height: 75dvh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

#bottom-sheet.open {
  transform: translateY(0);
}

#sheet-drag-bar {
  width: 36px;
  height: 4px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 2px;
  margin: 12px auto 0;
  flex-shrink: 0;
}

#sheet-close {
  position: absolute;
  top: 14px;
  right: 16px;
  background: none;
  border: none;
  color: var(--muted);
  font-size: 1rem;
  cursor: pointer;
  line-height: 1;
}
#sheet-close:hover { color: var(--white); }

#sheet-photo {
  width: 100%;
  max-height: 45dvh;
  object-fit: cover;
  display: block;
  flex-shrink: 0;
  margin-top: 8px;
}

#sheet-body {
  padding: 14px 20px 28px;
  overflow-y: auto;
}

#sheet-address {
  font-size: 0.9rem;
  font-weight: 400;
  color: var(--white);
  line-height: 1.4;
}

/* ── Footer ───────────────────────────────────────────────── */
footer {
  display: none;
}

/* ── Responsive ───────────────────────────────────────────── */
@media (max-width: 640px) {
  header { padding: 0 16px; gap: 10px; }
  .header-logo { height: 32px; }
  .hero-logo { height: 100px; }
}
