:root {
  --soil: #2C1810;
  --bark: #4A2E1A;
  --clay: #8B4513;
  --amber: #D4893F;
  --sand: #f9deae;
  --parchment: #F5EDE0;
  --fog: #E8DCC8;
  --moss: #4A5E3A;
  --fern: #7A8E62;
  --sage: #9AAC88;
  --ocean-deep: #1A3A4A;
  --ocean-mid: #2E5A6E;
  --ocean-light: #71c3de;
  --ash: #cac0af;
  --bone: #D4C4A8;
  --ink: #1A1208;
  --critical: #E8954A;
  --endangered: #7A8E62;
  --lost: #b3aca0;
}

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

body {
  background: var(--soil);
  color: var(--parchment);
  font-family: 'Josefin Sans', sans-serif;
  font-weight: 300;
  min-height: 100vh;
  overflow-x: hidden;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.03'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 1000;
  opacity: 0.3;
}

.hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 4rem 2rem;
  position: relative;
  border-bottom: 1px solid rgba(226,194,139,0.15);
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 50% 60%, rgba(74,46,26,0.7) 0%, rgba(44,24,16,0.95) 70%);
}

.hero-rings {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}

.ring {
  position: absolute;
  border-radius: 50%;
  border: 1px solid rgba(212,169,106,0.1);
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  animation: pulse-ring 8s ease-in-out infinite;
}
.ring:nth-child(1) { width: 300px; height: 300px; animation-delay: 0s; }
.ring:nth-child(2) { width: 500px; height: 500px; animation-delay: 1.5s; }
.ring:nth-child(3) { width: 700px; height: 700px; animation-delay: 3s; }
.ring:nth-child(4) { width: 900px; height: 900px; animation-delay: 4.5s; }
.ring:nth-child(5) { width: 1100px; height: 1100px; animation-delay: 6s; }

@keyframes pulse-ring {
  0%, 100% { opacity: 0.2; }
  50% { opacity: 0.6; }
}

.hero-content { position: relative; z-index: 1; max-width: 700px; }

.museum-label {
  font-family: 'Josefin Sans', sans-serif;
  font-weight: 200;
  font-size: 10px;
  letter-spacing: 0.35em;
  text-transform: uppercase;
  color: var(--sand);
  margin-bottom: 2rem;
  opacity: 0;
  animation: fade-up 1s ease forwards 0.3s;
}

.hero-title {
  font-family: 'Cormorant Garamond', serif;
  font-weight: 300;
  font-size: clamp(3rem, 8vw, 6rem);
  line-height: 1.05;
  color: var(--parchment);
  margin-bottom: 1.5rem;
  opacity: 0;
  animation: fade-up 1s ease forwards 0.6s;
}

.hero-title em {
  font-style: italic;
  color: var(--sand);
}

.hero-subtitle {
  font-family: 'Cormorant Garamond', serif;
  font-style: italic;
  font-size: 1.2rem;
  color: var(--bone);
  line-height: 1.8;
  margin-bottom: 3rem;
  opacity: 0;
  animation: fade-up 1s ease forwards 0.9s;
}

.hero-cta {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-family: 'Josefin Sans', sans-serif;
  font-weight: 200;
  font-size: 11px;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--parchment);
  border: 1px solid rgba(212,169,106,0.4);
  padding: 14px 32px;
  cursor: pointer;
  transition: all 0.3s ease;
  background: transparent;
  opacity: 0;
  animation: fade-up 1s ease forwards 1.2s;
}

.hero-cta:hover {
  background: rgba(212,169,106,0.12);
  border-color: var(--sand);
}

.hero-cta .arrow { transition: transform 0.3s; }
.hero-cta:hover .arrow { transform: translateY(4px); }

.scroll-hint {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  font-size: 10px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--ash);
  opacity: 0;
  animation: fade-up 1s ease forwards 2s;
}

@keyframes fade-up {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

.stats-bar {
  display: flex;
  justify-content: center;
  gap: 0;
  border-bottom: 1px solid rgba(212,169,106,0.12);
  background: rgba(26,18,8,0.7);
  backdrop-filter: blur(2px);
}

.stat-item {
  flex: 1;
  max-width: 200px;
  text-align: center;
  padding: 1.5rem 1rem;
  border-right: 1px solid rgba(212,169,106,0.12);
}
.stat-item:last-child { border-right: none; }

.stat-number {
  font-family: 'Cormorant Garamond', serif;
  font-size: 2rem;
  font-weight: 300;
  color: var(--sand);
  display: block;
}

.stat-label {
  font-size: 9px;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--ash);
  display: block;
  margin-top: 4px;
}

.nominate-section {
  padding: 5rem 2rem;
  max-width: 900px;
  margin: 0 auto;
  border-bottom: 1px solid rgba(212,169,106,0.08);
}

.section-label {
  font-size: 9px;
  letter-spacing: 0.35em;
  text-transform: uppercase;
  color: var(--amber);
  margin-bottom: 1rem;
}

.section-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 300;
  color: var(--parchment);
  margin-bottom: 1rem;
  line-height: 1.2;
}

.section-title em { font-style: italic; color: var(--sand); }

.section-body {
  font-family: 'Cormorant Garamond', serif;
  font-style: italic;
  font-size: 1.1rem;
  color: var(--bone);
  line-height: 1.8;
  margin-bottom: 2.5rem;
  max-width: 600px;
}

.nominate-box {
  background: rgba(74,46,26,0.35);
  border: 1px solid rgba(212,169,106,0.2);
  padding: 2rem;
}

.nominate-input-row {
  display: flex;
  gap: 0;
  margin-bottom: 1rem;
}

.nominate-input {
  flex: 1;
  background: rgba(26,18,8,0.6);
  border: 1px solid rgba(212,169,106,0.3);
  border-right: none;
  color: var(--parchment);
  font-family: 'Cormorant Garamond', serif;
  font-style: italic;
  font-size: 1.1rem;
  padding: 14px 20px;
  outline: none;
  transition: border-color 0.3s;
}

.nominate-input::placeholder { color: var(--ash); }
.nominate-input:focus { border-color: rgba(212,169,106,0.6); }

.nominate-btn {
  background: var(--amber);
  border: 1px solid var(--amber);
  color: var(--ink);
  font-family: 'Josefin Sans', sans-serif;
  font-weight: 400;
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  padding: 14px 28px;
  cursor: pointer;
  transition: all 0.3s;
  white-space: nowrap;
}

.nominate-btn:hover { background: var(--sand); border-color: var(--sand); }
.nominate-btn:disabled { opacity: 0.5; cursor: not-allowed; }

.nominate-hint {
  font-size: 14px;
  color: var(--ash);
  letter-spacing: 0.05em;
}

.generating-indicator {
  display: none;
  align-items: center;
  gap: 12px;
  padding: 1rem 0;
  font-family: 'Cormorant Garamond', serif;
  font-style: italic;
  color: var(--bone);
  font-size: 1rem;
}

.generating-indicator.visible { display: flex; }

.gen-dots span {
  display: inline-block;
  width: 4px; height: 4px;
  background: var(--amber);
  border-radius: 50%;
  margin: 0 2px;
  animation: dot-pulse 1.4s ease-in-out infinite;
}
.gen-dots span:nth-child(2) { animation-delay: 0.2s; }
.gen-dots span:nth-child(3) { animation-delay: 0.4s; }

@keyframes dot-pulse {
  0%, 80%, 100% { transform: scale(0.6); opacity: 0.4; }
  40% { transform: scale(1); opacity: 1; }
}

.error-msg {
  display: none;
  color: var(--critical);
  font-family: 'Cormorant Garamond', serif;
  font-style: italic;
  font-size: 1rem;
  padding: 0.5rem 0;
}
.error-msg.visible { display: block; }

.gallery-section {
  padding: 5rem 2rem;
  max-width: 1200px;
  margin: 0 auto;
}

.gallery-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 3rem;
  flex-wrap: wrap;
  gap: 1rem;
}

.filter-pills {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.filter-pill {
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  padding: 7px 16px;
  border: 1px solid rgba(212,169,106,0.2);
  background: transparent;
  color: var(--ash);
  cursor: pointer;
  transition: all 0.2s;
}

.filter-pill.active, .filter-pill:hover {
  border-color: var(--amber);
  color: var(--sand);
  background: rgba(193,122,59,0.1);
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1px;
  background: rgba(212,169,106,0.08);
  border: 1px solid rgba(212,169,106,0.08);
}

.exhibit-card {
  background: var(--soil);
  padding: 2rem;
  cursor: pointer;
  transition: background 0.3s;
  position: relative;
  overflow: hidden;
}

.exhibit-card::before {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 2px;
  background: var(--amber);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s ease;
}

.exhibit-card:hover { background: rgba(74,46,26,0.6); }
.exhibit-card:hover::before { transform: scaleX(1); }

.exhibit-card.is-new {
  animation: card-appear 0.6s ease forwards;
}

@keyframes card-appear {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}

.exhibit-icon {
  font-size: 2.5rem;
  margin-bottom: 1.2rem;
  display: block;
  line-height: 1;
}

.exhibit-status {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 0.8rem;
}

.status-dot {
  width: 5px; height: 5px;
  border-radius: 50%;
  flex-shrink: 0;
}
.status-dot.critical { background: var(--critical); }
.status-dot.endangered { background: var(--fern); }
.status-dot.lost { background: var(--ash); }

.status-text {
  font-size: 9px;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--ash);
}
.status-text.critical { color: var(--critical); }
.status-text.endangered { color: var(--fern); }

.exhibit-name {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.4rem;
  font-weight: 400;
  color: var(--parchment);
  margin-bottom: 0.4rem;
  line-height: 1.2;
}

.exhibit-era {
  font-size: 10px;
  letter-spacing: 0.15em;
  color: var(--ash);
  margin-bottom: 1rem;
  text-transform: uppercase;
}

.exhibit-desc {
  font-family: 'Cormorant Garamond', serif;
  font-style: italic;
  font-size: 0.95rem;
  color: var(--bone);
  line-height: 1.6;
}

.exhibit-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 1.2rem;
}

.tag {
  font-size: 9px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ash);
  border: 1px solid rgba(138,131,120,0.4);
  padding: 3px 8px;
}

.ai-badge {
  position: absolute;
  top: 1rem; right: 1rem;
  font-size: 8px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ocean-light);
  border: 1px solid rgba(90,154,176,0.4);
  padding: 3px 8px;
  background: rgba(26,18,8,0.6);
}

.lightbox-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(26,18,8,0.97);
  z-index: 500;
  overflow-y: auto;
  padding: 2rem;
}

.lightbox-overlay.open { display: flex; align-items: flex-start; justify-content: center; }

.lightbox {
  max-width: 800px;
  width: 100%;
  margin: 4rem auto;
  position: relative;
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.4s ease;
}

.lightbox.visible {
  opacity: 1;
  transform: translateY(0);
}

.lightbox-close {
  position: absolute;
  top: -2.5rem; right: 0;
  background: none;
  border: none;
  color: var(--ash);
  font-family: 'Josefin Sans', sans-serif;
  font-size: 10px;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  cursor: pointer;
  transition: color 0.2s;
  display: flex;
  align-items: center;
  gap: 8px;
}
.lightbox-close:hover { color: var(--parchment); }

.lightbox-inner {
  border: 1px solid rgba(212,169,106,0.2);
  background: var(--bark);
}

.lightbox-header {
  padding: 3rem;
  border-bottom: 1px solid rgba(212,169,106,0.12);
  display: flex;
  gap: 2rem;
  align-items: flex-start;
}

.lightbox-icon {
  font-size: 4rem;
  line-height: 1;
  flex-shrink: 0;
}

.lightbox-meta { flex: 1; }

.lightbox-status {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 1rem;
}

.lightbox-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 300;
  color: var(--parchment);
  line-height: 1.1;
  margin-bottom: 0.5rem;
}

.lightbox-era {
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ash);
}

.lightbox-body {
  padding: 3rem;
  border-bottom: 1px solid rgba(212,169,106,0.12);
}

.lightbox-long {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.15rem;
  color: var(--bone);
  line-height: 1.9;
  margin-bottom: 2rem;
}

.lightbox-tags { display: flex; flex-wrap: wrap; gap: 8px; }

.guestbook {
  padding: 2.5rem 3rem;
}

.guestbook-title {
  font-family: 'Cormorant Garamond', serif;
  font-style: italic;
  font-size: 1.3rem;
  color: var(--sand);
  margin-bottom: 0.5rem;
}

.guestbook-subtitle {
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ash);
  margin-bottom: 1.5rem;
}

.guestbook-compose {
  display: flex;
  gap: 0;
  margin-bottom: 1.5rem;
}

.guestbook-input {
  flex: 1;
  background: rgba(26,18,8,0.6);
  border: 1px solid rgba(212,169,106,0.2);
  border-right: none;
  color: var(--parchment);
  font-family: 'Cormorant Garamond', serif;
  font-style: italic;
  font-size: 1rem;
  padding: 12px 16px;
  outline: none;
  transition: border-color 0.3s;
}

.guestbook-input:focus { border-color: rgba(212,169,106,0.5); }
.guestbook-input::placeholder { color: var(--ash); }

.guestbook-submit {
  background: transparent;
  border: 1px solid rgba(212,169,106,0.3);
  color: var(--sand);
  font-family: 'Josefin Sans', sans-serif;
  font-size: 9px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  padding: 12px 20px;
  cursor: pointer;
  transition: all 0.2s;
}

.guestbook-submit:hover { background: rgba(193,122,59,0.15); border-color: var(--amber); }

.guestbook-messages { display: flex; flex-direction: column; gap: 12px; }

.guestbook-msg {
  padding: 14px 16px;
  background: rgba(26,18,8,0.4);
  border-left: 2px solid rgba(212,169,106,0.25);
}

.msg-text {
  font-family: 'Cormorant Garamond', serif;
  font-style: italic;
  font-size: 1rem;
  color: var(--bone);
  line-height: 1.6;
  margin-bottom: 6px;
}

.msg-author {
  font-size: 9px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ash);
}

.wiki-link {
  display: inline-block;
  margin-top: 1rem;
  font-size: 9px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  font-weight: 500;
  color: var(--ocean-light);
  text-decoration: none;
  border-bottom: 1px solid rgba(90,154,176,0.3);
  transition: border-color 0.2s, color 0.2s;
}

.wiki-link:hover {
  color: var(--sand);
  border-bottom-color: var(--sand);
}

footer {
  border-top: 1px solid rgba(212,169,106,0.08);
  padding: 3rem 2rem;
  text-align: center;
}

.footer-title {
  font-family: 'Cormorant Garamond', serif;
  font-style: italic;
  font-size: 1.5rem;
  color: var(--bone);
  margin-bottom: 0.5rem;
}

.footer-sub {
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ash);
}

.powered-by {
  margin-top: 1.5rem;
  font-size: 12px;
  letter-spacing: 0.15em;
  color: var(--ash);
}

.powered-by span { color: var(--ocean-light); }

.powered-by a{
  color: var(--ocean-light);
  text-decoration: none;
  font-weight: 500;
}

.persistence-note {
  font-size: 12px;
  letter-spacing: 0.15em;
  color: var(--ash);
  text-align: center;
  margin-top: 1rem;
  padding-top: 0.5rem;
  border-top: 1px solid rgba(212,169,106,0.1);
}

@media (max-width: 600px) {
  .lightbox-header { flex-direction: column; gap: 1rem; padding: 2rem; }
  .lightbox-body, .guestbook { padding: 2rem; }
  .nominate-input-row { flex-direction: column; }
  .nominate-input { border-right: 1px solid rgba(212,169,106,0.3); }
  .stats-bar { flex-wrap: wrap; }
  .stat-item { min-width: 100px; }
}

@media (max-width: 480px) {
  .lightbox {
    margin: 0;
    width: 100%;
  }

  .lightbox-close {
    position: static;
    width: 100%;
    justify-content: flex-end;
    padding: 1rem 1.5rem 0;
    background: var(--bark);
    border-bottom: 1px solid rgba(212,169,106,0.1);
    margin-bottom: 0;
  }

  .lightbox-overlay {
    padding: 0;
    align-items: flex-start;
  }

  .lightbox-inner {
    border-left: none;
    border-right: none;
    border-top: none;
  }

  .lightbox-header {
    padding: 1.5rem;
    flex-direction: column;
    gap: 0.8rem;
  }

  .lightbox-body {
    padding: 1.5rem;
  }

  .guestbook {
    padding: 1.5rem;
  }

  .guestbook-compose {
    flex-direction: column;
  }

  .guestbook-input {
    border-right: 1px solid rgba(212,169,106,0.2);
    border-bottom: none;
  }

  .guestbook-submit {
    padding: 12px;
    text-align: center;
  }

  .lightbox-title {
    font-size: 1.6rem;
  }
}