:root {
  --bg: #e9e9e7;
  --panel: #f1f1ef;
  --ink: #111318;
  --muted: #5d636c;
  --line: #c9cccf;
  --accent: #1e2a3a;
  --accent-soft: #93a8c2;
  --display-font: "Cinzel Decorative", "Times New Roman", serif;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  height: 100%;
}

body {
  font-family: "Space Grotesk", sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at 86% 14%, #ffffff 0%, transparent 45%),
    linear-gradient(120deg, #ececea 0%, var(--bg) 65%, #dddddb 100%);
  letter-spacing: 0.01em;
  overflow: hidden;
}

.page-glow {
  position: fixed;
  inset: auto -200px -200px auto;
  width: 420px;
  height: 420px;
  border-radius: 999px;
  background: radial-gradient(circle, rgba(147, 168, 194, 0.24) 0%, transparent 70%);
  pointer-events: none;
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.2rem 0.2rem;
}

.brand {
  font-family: var(--display-font);
  color: var(--ink);
  text-decoration: none;
  font-size: 1.1rem;
  font-weight: 700;
}

.main-nav {
  display: flex;
  gap: 1.5rem;
}

.main-nav a {
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.76rem;
  color: var(--ink);
}

.cta {
  border: 1px solid var(--ink);
  color: var(--ink);
  background: transparent;
  text-decoration: none;
  padding: 0.55rem 0.8rem;
  font-family: "Space Mono", monospace;
  font-size: 0.75rem;
}

.spotlight {
  display: grid;
  grid-template-columns: minmax(260px, 0.9fr) minmax(340px, 1.6fr);
  gap: 1rem;
  padding: 0.7rem;
  align-items: stretch;
  height: calc(100dvh - 62px);
}

.spotlight-info,
.spotlight-canvas {
  background: color-mix(in hsl, var(--panel) 95%, white 5%);
  border: 1px solid var(--line);
  min-height: 0;
  height: 100%;
}

.spotlight-info {
  padding: 1.2rem;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-size: 0.56rem;
  color: var(--muted);
  margin-bottom: 1.2rem;
}

h1 {
  margin: 0;
  font-family: "Space Mono", monospace;
  font-size: clamp(1.65rem, 3vw, 2.75rem);
  line-height: 0.98;
}

.active-piece {
  margin: 0.28rem 0 0;
  font-size: 0.78rem;
  color: var(--muted);
  font-family: "Space Mono", monospace;
}

.artist {
  margin-top: 0.6rem;
  font-size: 0.87rem;
  color: var(--muted);
}

.summary {
  margin: 1rem 0;
  max-width: 46ch;
  line-height: 1.4;
  font-size: 0.71rem;
}

.meta {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 0.35rem;
  color: var(--muted);
  font-size: 0.68rem;
}

.actions {
  margin-top: auto;
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  padding-top: 1rem;
}

.action-primary,
.action-secondary {
  text-decoration: none;
  padding: 0.78rem 1rem;
  font-size: 0.88rem;
  border: 1px solid var(--ink);
}

.action-primary {
  background: var(--ink);
  color: #fff;
}

.action-secondary {
  color: var(--ink);
  background: transparent;
  font-family: "Space Grotesk", sans-serif;
  cursor: pointer;
}

.spotlight-canvas {
  padding: 0.8rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  overflow: hidden;
}

.art-card {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-height: 0;
  opacity: 0;
  transform: translateY(10px);
  animation: rise-in 650ms ease forwards;
}

.artwork {
  flex: 1 1 auto;
  min-height: 0;
  border: 1px solid var(--line);
  background: #f3f3f3;
  position: relative;
  overflow: hidden;
}

.artwork-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  pointer-events: none;
  user-select: none;
  -webkit-user-drag: none;
}

.artwork::before,
.artwork::after {
  content: "";
  position: absolute;
  border: 1px solid rgba(29, 31, 35, 0.5);
  background: rgba(255, 255, 255, 0.35);
  pointer-events: none;
}

.artwork::before {
  width: 38%;
  height: 52%;
  top: 16%;
  left: 18%;
}

.artwork::after {
  width: 35%;
  height: 40%;
  right: 16%;
  bottom: 14%;
}

.caption-row {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  font-family: "Space Mono", monospace;
  font-size: 0.88rem;
}

.caption-row p {
  margin: 0.3rem 0 0;
}

.token {
  color: var(--muted);
}

.thumbs {
  margin-top: 0.2rem;
  display: flex;
  justify-content: flex-start;
  gap: 0.5rem;
  flex-wrap: nowrap;
  overflow-x: auto;
  overflow-y: hidden;
  padding-bottom: 0.25rem;
  flex: 0 0 auto;
  min-height: 56px;
}

.thumb {
  width: 52px;
  aspect-ratio: 1;
  border: 1px solid var(--line);
  display: block;
  overflow: hidden;
  background: #d9dcdc;
  padding: 0;
  cursor: pointer;
  flex: 0 0 52px;
  transition: transform 180ms ease, border-color 180ms ease;
}

.thumb:hover,
.thumb.active {
  border-color: var(--accent);
  transform: translateY(-2px);
}

.thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  pointer-events: none;
  user-select: none;
  -webkit-user-drag: none;
}

.editions-grid {
  display: none;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.55rem;
  overflow-y: auto;
  padding-right: 0.2rem;
}

.edition-card {
  border: 1px solid var(--line);
  padding: 0;
  background: #d9dcdc;
  cursor: pointer;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  transition: border-color 180ms ease, transform 180ms ease;
}

.edition-card:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
}

.edition-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  pointer-events: none;
  user-select: none;
}

.spotlight-canvas.show-grid .art-card,
.spotlight-canvas.show-grid .thumbs {
  display: none;
}

.spotlight-canvas.show-grid .editions-grid {
  display: grid;
}

@keyframes rise-in {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 980px) {
  .site-header {
    flex-wrap: wrap;
    padding: 0.8rem;
    gap: 0.7rem;
  }

  .main-nav {
    order: 3;
    width: 100%;
    justify-content: space-between;
    gap: 0.55rem;
  }

  .spotlight {
    grid-template-columns: 1fr;
    gap: 1rem;
    padding: 0.8rem;
    height: calc(100dvh - 92px);
  }

  .spotlight-info,
  .spotlight-canvas {
    min-height: 0;
    height: auto;
  }

  .spotlight-info {
    padding: 1.4rem;
  }

  .thumb {
    flex: 0 0 52px;
  }

  .editions-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
