/* ---------- Theme: change these to match your site ---------- */
:root {
  --wall: #1c1410;
  --wall-soft: #241a15;
  --wall-deep: #140e0b;
  --ink: #f6ede1;
  --ink-muted: #b6a394;
  --accent: #e558c4;      /* pink, same as the homepage */
  --label: #e6a95f;       /* orange, used for medium/year */
  --line: #4a3a31;

  --art-height: clamp(220px, 58vh, 520px); /* height of every piece in the strip */
  --gap: 2.75rem;                           /* space between pieces */

  --font-display: 'Fredoka', 'Trebuchet MS', sans-serif;
  --font-ui: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
}

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

body {
  margin: 0;
  min-height: 100vh;
  background: radial-gradient(120% 90% at 50% 15%, var(--wall-soft) 0%, var(--wall) 60%) fixed;
  background-color: var(--wall);
  color: var(--ink);
  font-family: var(--font-ui);
  line-height: 1.5;
}

a { color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }

/* ---------- Placeholder header (replace with your own) ---------- */
.site-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  padding: 1.25rem clamp(1rem, 4vw, 3rem);
}
.site-name { font-family: var(--font-display); font-weight: 600; font-size: 1.35rem; text-decoration: none; }
.site-name span { color: var(--accent); }
.site-header nav { display: flex; gap: 1.5rem; }
.site-header nav a { text-decoration: none; color: var(--ink-muted); }
.site-header nav a[aria-current="page"] { color: var(--ink); border-bottom: 1px solid var(--accent); }

/* ---------- Intro ---------- */
.intro {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: end;
  column-gap: 1rem;
  padding: 2.5rem clamp(1rem, 4vw, 3rem) 2rem;
}
.intro h1 {
  grid-column: 1;
  margin: 0;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(2.25rem, 6vw, 4rem);
  line-height: 1.05;
}
.intro p { grid-column: 1; margin: 0.5rem 0 0; color: var(--ink-muted); }
.pause {
  grid-column: 2;
  grid-row: 1 / span 2;
  align-self: end;
  background: none;
  color: var(--ink-muted);
  border: 1px solid var(--line);
  border-radius: 2px;
  padding: 0.45rem 0.9rem;
  font: inherit;
  font-size: 0.9rem;
  cursor: pointer;
}
.pause:hover { color: var(--ink); border-color: var(--ink-muted); }

.status { padding: 0 clamp(1rem, 4vw, 3rem); color: var(--ink-muted); }
.status[hidden] { display: none; }

/* ---------- The scrolling strip ---------- */
.marquee {
  overflow-x: hidden;
  padding-block: 1rem 2rem;
  -webkit-mask-image: linear-gradient(to right, transparent, #000 5%, #000 95%, transparent);
          mask-image: linear-gradient(to right, transparent, #000 5%, #000 95%, transparent);
}

.track {
  display: flex;
  width: max-content;
  animation: drift var(--duration, 90s) linear infinite;
}

/* The track holds two identical halves, so sliding by 50% loops seamlessly. */
@keyframes drift { to { transform: translateX(-50%); } }

.marquee.is-paused .track,
.marquee:focus-within .track { animation-play-state: paused; }

@media (hover: hover) {
  .marquee:hover .track { animation-play-state: paused; }
}

.list { display: flex; flex: none; margin: 0; padding: 0; list-style: none; }
.item { flex: none; margin-inline-end: var(--gap); }

.item button {
  display: block;
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  text-align: start;
  cursor: zoom-in;
}

.item img {
  display: block;
  height: var(--art-height);
  width: auto;
  max-width: none;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.5), 0 18px 40px -18px rgba(0, 0, 0, 0.7);
  transition: filter 0.2s;
}
.item button:hover img { filter: brightness(1.1); }

/* Caption never wider than the artwork above it */
.item-title {
  display: block;
  width: 0;
  min-width: 100%;
  margin-top: 0.8rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-family: var(--font-ui);
  font-size: 0.9rem;
  color: var(--ink-muted);
}

/* ---------- Detail pop-up ---------- */
dialog {
  width: min(1100px, 94vw);
  max-width: none;
  max-height: 92vh;
  padding: 0;
  border: 0;
  border-radius: 2px;
  background: var(--wall-deep);
  color: var(--ink);
  overflow: auto;
}
dialog[open] { animation: fade 0.2s ease-out; }
dialog::backdrop { background: rgba(8, 10, 13, 0.85); }
@keyframes fade { from { opacity: 0; } }

body:has(dialog[open]) { overflow: hidden; }

.piece-inner {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(16rem, 1fr);
}

.close {
  position: absolute;
  top: 0.9rem;
  right: 0.9rem;
  z-index: 1;
  background: rgba(20, 14, 11, 0.85);
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 2px;
  padding: 0.4rem 0.9rem;
  font: inherit;
  font-size: 0.9rem;
  cursor: pointer;
}
.close:hover { border-color: var(--ink-muted); }

.piece-image {
  display: grid;
  place-items: center;
  padding: clamp(1rem, 3vw, 2.5rem);
  background: #0e0907;
}
.piece-image img {
  display: block;
  max-width: 100%;
  max-height: 78vh;
  object-fit: contain;
}

.piece-label { padding: clamp(1.5rem, 3vw, 2.5rem); align-self: center; }
.piece-label h2 {
  margin: 0 2.5rem 0.5rem 0;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  line-height: 1.15;
}

.piece-meta { margin: 0 0 1.5rem; color: var(--label); }
.piece-meta:empty { display: none; }
.piece-desc { margin: 0; max-width: 60ch; color: var(--ink); line-height: 1.7; white-space: pre-line; }

@media (max-width: 760px) {
  .piece-inner { grid-template-columns: 1fr; }
  .piece-image img { max-height: 55vh; }
  .intro { grid-template-columns: 1fr; }
  .pause { grid-column: 1; grid-row: auto; justify-self: start; margin-top: 1rem; }
}

/* ---------- Pricing section ---------- */
.intro a { color: var(--accent); }

.pricing {
  max-width: 52rem;
  margin: 0 auto;
  padding: 3rem clamp(1rem, 4vw, 3rem) 5rem;
}
.pricing h2 {
  margin: 0 0 0.5rem;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(1.8rem, 4vw, 2.4rem);
}
.pricing-intro { margin: 0 0 2rem; color: var(--ink-muted); max-width: 60ch; }

.price-list { margin: 0; padding: 0; list-style: none; border-bottom: 1px solid var(--line); }
.price-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.5rem 2rem;
  padding: 1.5rem 0;
  border-top: 1px solid var(--line);
}
.price-row h3 { margin: 0 0 0.25rem; font-family: var(--font-display); font-weight: 600; font-size: 1.3rem; }
.price-row p { margin: 0; color: var(--ink-muted); }
.price-row .amount {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.4rem;
  color: var(--label);
  white-space: nowrap;
}
.covers { margin: 0.75rem 0 0; padding-left: 1.1rem; color: var(--ink); line-height: 1.7; }
.pricing-note { margin: 1.5rem 0 0; color: var(--ink-muted); max-width: 60ch; }

.contact { margin: 2rem 0 0; }
.contact .cta {
  display: inline-block;
  padding: 0.8rem 1.6rem;
  border-radius: 999px;
  border: 1px solid var(--accent);
  background: var(--accent);
  color: #1c1410;
  font-weight: 500;
  text-decoration: none;
  transition: background 0.2s ease, color 0.2s ease;
}
.contact .cta:hover { background: transparent; color: var(--accent); }

@media (max-width: 560px) {
  .price-row { grid-template-columns: 1fr; }
}

/* ---------- Respect "reduce motion": no drifting, swipe/scroll instead ---------- */
@media (prefers-reduced-motion: reduce) {
  .track { animation: none; }
  .marquee { overflow-x: auto; }
  .list[inert] { display: none; }   /* hide the duplicate copy used for looping */
  .pause { display: none; }
  dialog[open] { animation: none; }
}
