/* Rita Bucheit, Ltd. — Art Deco dark gallery stylesheet */

@import url('https://fonts.googleapis.com/css2?family=Cinzel:wght@400;600;700&family=Inter:wght@300;400;500&display=swap');

:root {
  --bg: #0c0c0c;
  --surface: #151515;
  --surface-2: #1e1e1e;
  --text: #f0ece2;
  --muted: #9c9688;
  --gold: #c5a059;
  --gold-dim: #9e7d3f;
  --bronze: #8f6b3f;
  --line: rgba(197, 160, 89, 0.35);
  --radius: 0;
}

* {
  box-sizing: border-box;
}

html {
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
}

/* Art Deco decorative rules */
.deco-line {
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
  margin: 1rem 0;
}

.deco-rule {
  border: 0;
  height: 4px;
  border-top: 1px solid var(--gold);
  border-bottom: 1px solid var(--gold);
  margin: 1.5rem 0;
}

.deco-double-border {
  border: 3px double var(--line);
}

.deco-corner {
  position: relative;
}

.deco-corner::before,
.deco-corner::after {
  content: '';
  position: absolute;
  width: 24px;
  height: 24px;
  border-color: var(--gold);
  border-style: solid;
  pointer-events: none;
}

.deco-corner::before {
  top: -3px;
  left: -3px;
  border-width: 2px 0 0 2px;
}

.deco-corner::after {
  bottom: -3px;
  right: -3px;
  border-width: 0 2px 2px 0;
}

/* Header */
rb-header {
  display: block;
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(12, 12, 12, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  max-width: 1440px;
  margin: 0 auto;
  padding: 1rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.site-title {
  font-family: 'Cinzel', serif;
  font-size: 1.6rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold);
  text-decoration: none;
  line-height: 1.1;
}

.site-title:hover {
  color: var(--text);
}

.nav-links {
  display: flex;
  gap: 1.25rem;
  align-items: center;
  flex-wrap: wrap;
}

.nav-links a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border-bottom: 1px solid transparent;
  padding-bottom: 2px;
  transition: color 0.2s, border-color 0.2s;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--gold);
  border-color: var(--gold);
}

.search-control {
  background: var(--surface);
  border: 1px solid var(--line);
  color: var(--text);
  padding: 0.55rem 0.9rem;
  font-family: inherit;
  font-size: 0.9rem;
  min-width: 220px;
  outline: none;
}

.search-control:focus {
  border-color: var(--gold);
}

/* Main layout */
main {
  max-width: 1440px;
  margin: 0 auto;
  padding: 2rem 1.5rem 4rem;
}

.page-title {
  font-family: 'Cinzel', serif;
  font-size: 2.4rem;
  font-weight: 400;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin: 0 0 0.5rem;
  color: var(--gold);
}

.page-subtitle {
  color: var(--muted);
  margin: 0 0 1.5rem;
  font-weight: 300;
}

.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: center;
  margin-bottom: 2rem;
}

.filter-bar label {
  color: var(--muted);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.filter-bar select {
  background: var(--surface);
  border: 1px solid var(--line);
  color: var(--text);
  padding: 0.45rem 0.8rem;
  font-family: inherit;
  font-size: 0.9rem;
}

/* Gallery grid */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
}

@media (min-width: 1200px) {
  .gallery-grid {
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  }
}

/* Card */
.item-card {
  display: block;
  background: var(--surface);
  border: 1px solid var(--line);
  text-decoration: none;
  color: inherit;
  position: relative;
  overflow: hidden;
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.item-card:hover {
  transform: translateY(-4px);
  border-color: var(--gold);
  box-shadow: 0 12px 30px rgba(0,0,0,0.5), 0 0 0 1px var(--gold);
}

.item-card .image-wrap {
  aspect-ratio: 4 / 5;
  overflow: hidden;
  background: #000;
  position: relative;
}

.item-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.5s ease;
}

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

.item-card .card-body {
  padding: 1rem 1.1rem 1.2rem;
}

.item-card .card-title {
  font-family: 'Cinzel', serif;
  font-size: 1.05rem;
  line-height: 1.25;
  margin: 0 0 0.4rem;
  color: var(--text);
}

.item-card .card-meta {
  font-size: 0.8rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.item-card .status-badge {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  background: var(--surface-2);
  border: 1px solid var(--line);
  color: var(--gold);
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  padding: 0.25rem 0.55rem;
  z-index: 2;
}

.item-card.hidden {
  display: none;
}

/* Empty state */
.empty-state {
  grid-column: 1 / -1;
  text-align: center;
  padding: 4rem 1rem;
  color: var(--muted);
  border: 1px solid var(--line);
}

/* Detail page */
.detail-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
}

@media (min-width: 900px) {
  .detail-layout {
    grid-template-columns: 1.4fr 1fr;
    align-items: start;
  }
}

.detail-hero {
  background: var(--surface);
  border: 1px solid var(--line);
  padding: 1rem;
}

.detail-hero img {
  width: 100%;
  height: auto;
  display: block;
  cursor: zoom-in;
}

.detail-thumbnails {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1rem;
}

.detail-thumbnails button {
  width: 90px;
  height: 90px;
  padding: 0;
  border: 1px solid var(--line);
  background: #000;
  cursor: pointer;
  overflow: hidden;
}

.detail-thumbnails button:hover,
.detail-thumbnails button.active {
  border-color: var(--gold);
}

.detail-thumbnails img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.detail-info {
  background: var(--surface);
  border: 1px solid var(--line);
  padding: 1.5rem 2rem;
}

.detail-info h1 {
  font-family: 'Cinzel', serif;
  font-size: 1.9rem;
  font-weight: 400;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin: 0 0 1rem;
  color: var(--gold);
}

.detail-meta {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.5rem 1.25rem;
  font-size: 0.95rem;
  margin-bottom: 1.5rem;
}

.detail-meta dt {
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.75rem;
}

.detail-meta dd {
  margin: 0;
  color: var(--text);
}

.detail-notes {
  white-space: pre-line;
  color: var(--text);
  line-height: 1.7;
  margin-top: 1.5rem;
}

.pdf-links {
  margin-top: 1.5rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.pdf-links a {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: var(--surface-2);
  border: 1px solid var(--line);
  color: var(--gold);
  padding: 0.55rem 0.9rem;
  text-decoration: none;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  transition: border-color 0.2s, color 0.2s;
}

.pdf-links a:hover {
  border-color: var(--gold);
  color: var(--text);
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--line);
  margin-top: 4rem;
  padding: 2rem 1.5rem;
  text-align: center;
  color: var(--muted);
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* Lightbox */
rb-lightbox {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(0,0,0,0.96);
}

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

rb-lightbox img {
  max-width: 96vw;
  max-height: 92vh;
  object-fit: contain;
  border: 1px solid var(--line);
}

rb-lightbox .close-btn {
  position: absolute;
  top: 1rem;
  right: 1rem;
  color: var(--gold);
  font-size: 2rem;
  background: transparent;
  border: none;
  cursor: pointer;
}

rb-lightbox .nav-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: transparent;
  border: 1px solid var(--line);
  color: var(--gold);
  font-size: 1.6rem;
  width: 48px;
  height: 48px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

rb-lightbox .nav-btn:hover {
  border-color: var(--gold);
}

rb-lightbox .prev { left: 1rem; }
rb-lightbox .next { right: 1rem; }

/* Utility */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}

@media (max-width: 640px) {
  .site-title { font-size: 1.2rem; }
  .header-inner { flex-direction: column; align-items: stretch; }
  .nav-links { justify-content: center; }
  .search-control { width: 100%; min-width: auto; }
  .page-title { font-size: 1.7rem; }
  .gallery-grid { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 1rem; }
}
