/* Lumina Anima — sunlit gallery wall, one band of refracted light.
   Tokens first; flat class selectors everywhere else. */

:root {
  --wall: #fafaf8;        /* sunlit plaster, no yellow cast */
  --ink: #1c1b22;         /* glass shadow: near-black, violet undertone */
  --graphite: #6e6c7a;    /* cool secondary text */
  --line: #e4e2e9;        /* hairlines, lilac cast */
  --pane: #f1f0f4;        /* empty image frames */
  --iris: #4f3fd0;        /* interactive accent */
  --spec-v: #7b5cff;
  --spec-b: #3fa0ff;
  --spec-g: #39c7a5;
  --spec-a: #ffc53f;
  --spec-c: #ff7b6b;
  --spectrum: linear-gradient(90deg,
      var(--spec-v) 0 20%, var(--spec-b) 20% 40%, var(--spec-g) 40% 60%,
      var(--spec-a) 60% 80%, var(--spec-c) 80% 100%);
  --display: "Spectral", Georgia, serif;
  --body: "Karla", -apple-system, "Segoe UI", sans-serif;
  --gutter: clamp(20px, 4vw, 48px);
}

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

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

body {
  background: var(--wall);
  color: var(--ink);
  font-family: var(--body);
  font-size: 16.5px;
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

img { display: block; max-width: 100%; }

a { color: inherit; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; text-decoration-color: var(--graphite); }
a:hover { text-decoration-color: var(--iris); color: var(--iris); }

a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible {
  outline: 2px solid var(--iris);
  outline-offset: 3px;
}

.skip {
  position: absolute; left: -9999px; top: 0;
  background: var(--ink); color: var(--wall); padding: 10px 16px; z-index: 10;
}
.skip:focus { left: 0; }

/* ---------- header + the spectrum band ---------- */

.site-head {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 24px; flex-wrap: wrap;
  padding: 26px var(--gutter) 20px;
  max-width: 1180px; margin: 0 auto; width: 100%;
}

.wordmark {
  font-family: var(--display); font-weight: 300; font-size: 23px;
  letter-spacing: 0.05em; text-decoration: none;
}
.wordmark em { font-style: italic; font-weight: 200; }
.wordmark:hover { color: var(--ink); }

/* flex-shrink 0 so a narrow screen wraps the nav to its own row instead of
   shrinking it below min-content and spilling off the right edge */
.site-nav { display: flex; gap: 28px; flex-shrink: 0; flex-wrap: wrap; }
.site-nav a {
  font-size: 12.5px; font-weight: 700; letter-spacing: 0.14em;
  text-transform: uppercase; text-decoration: none;
}
.site-nav a:hover { color: var(--iris); }
.site-nav a[aria-current="page"] {
  text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 6px;
}

/* The signature: a thin band of hard-stop spectral light under the header,
   as if the page itself sat behind a prism. It drifts, slowly. The gradient
   holds two full cycles at 200% size so the viewport always shows all five
   bands, and position 0% equals 100% — the loop is seamless. */
.spectrum {
  height: 3px;
  background: linear-gradient(90deg,
      var(--spec-v) 0 10%, var(--spec-b) 10% 20%, var(--spec-g) 20% 30%,
      var(--spec-a) 30% 40%, var(--spec-c) 40% 50%,
      var(--spec-v) 50% 60%, var(--spec-b) 60% 70%, var(--spec-g) 70% 80%,
      var(--spec-a) 80% 90%, var(--spec-c) 90% 100%);
  background-size: 200% 100%;
  animation: drift 45s linear infinite;
}
@keyframes drift {
  from { background-position: 0% 0; }
  to { background-position: -200% 0; }
}

main { width: 100%; max-width: 1180px; margin: 0 auto; padding: 0 var(--gutter); flex: 1; }

/* ---------- type utilities ---------- */

.eyebrow {
  font-size: 11.5px; font-weight: 700; letter-spacing: 0.2em;
  text-transform: uppercase; color: var(--graphite);
}

.page-title {
  font-family: var(--display); font-weight: 200;
  font-size: clamp(30px, 4.5vw, 42px);
  margin: 48px 0 28px;
}

.note { font-size: 13.5px; color: var(--graphite); margin-top: 14px; }
.note a { color: var(--ink); }

.empty {
  font-family: var(--display); font-weight: 300; font-style: italic;
  font-size: 19px; color: var(--graphite);
  text-align: center; padding: 90px 0;
}

/* ---------- catalog ---------- */

.intro { padding: clamp(40px, 8vh, 84px) 0 40px; max-width: 640px; }
.intro h1 {
  font-family: var(--display); font-weight: 200;
  font-size: clamp(42px, 7vw, 74px); line-height: 1.05;
  letter-spacing: -0.01em; margin: 10px 0 18px;
}
.lede { font-family: var(--display); font-weight: 300; font-size: 20px; line-height: 1.55; color: #45434f; }

.kinds { display: flex; gap: 22px; flex-wrap: wrap; margin: 8px 0 36px; }
.kinds a {
  font-size: 12.5px; font-weight: 700; letter-spacing: 0.12em;
  text-transform: uppercase; text-decoration: none; color: var(--graphite);
  padding-bottom: 4px;
}
.kinds a:hover { color: var(--iris); }
.kinds a[aria-current="true"] {
  color: var(--ink);
  background: var(--spectrum) bottom / 100% 2px no-repeat;
}

.grid {
  list-style: none;
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 56px clamp(24px, 3vw, 44px);
  padding: 12px 0 40px;
}
@media (max-width: 900px) { .grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .grid { grid-template-columns: 1fr; } }

.card { display: block; text-decoration: none; }
.card:hover { color: var(--ink); }

.card-media {
  position: relative; aspect-ratio: 4 / 5; overflow: hidden;
  background: var(--pane); border: 1px solid var(--line);
}
.card-media img { width: 100%; height: 100%; object-fit: cover; transition: filter 0.4s ease; }
.card:hover .card-media img, .card:focus-visible .card-media img { filter: brightness(1.05) saturate(1.05); }
/* refraction sliver: a piece of the spectrum slides in along the frame's foot */
.card-media::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 3px;
  background: var(--spectrum);
  transform: translateY(100%); transition: transform 0.25s ease;
}
.card:hover .card-media::after, .card:focus-visible .card-media::after { transform: translateY(0); }

.card-row { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin-top: 14px; }
.card-row h2 { font-family: var(--display); font-weight: 500; font-size: 17.5px; line-height: 1.3; }
.price { font-size: 15px; font-weight: 500; font-variant-numeric: tabular-nums; white-space: nowrap; }
.card-kind { font-size: 13px; color: var(--graphite); margin-top: 3px; }

.sold { font-size: 13.5px; color: var(--graphite); white-space: nowrap; display: inline-flex; align-items: center; gap: 7px; }
/* the gallery red dot, refracted violet */
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--spec-v); display: inline-block; }

.no-photo {
  display: flex; align-items: center; justify-content: center;
  width: 100%; height: 100%; min-height: 120px;
  font-family: var(--display); font-style: italic; font-weight: 300;
  font-size: 14px; color: var(--graphite);
}
.no-photo.tall { aspect-ratio: 4 / 5; border: 1px solid var(--line); background: var(--pane); }

/* ---------- piece page ---------- */

.piece {
  display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  gap: clamp(32px, 5vw, 72px);
  padding: 48px 0 40px;
}
@media (max-width: 800px) { .piece { grid-template-columns: 1fr; } }

.piece-photo { width: 100%; border: 1px solid var(--line); background: var(--pane); }
.thumbs { display: flex; gap: 12px; margin-top: 12px; flex-wrap: wrap; }
.thumbs a { display: block; width: 76px; }
.thumbs img { width: 76px; height: 95px; object-fit: cover; border: 1px solid var(--line); }

.piece-info h1 {
  font-family: var(--display); font-weight: 200;
  font-size: clamp(30px, 4.5vw, 44px); line-height: 1.1;
  margin: 8px 0 10px;
}
.piece-price { font-family: var(--display); font-weight: 300; font-size: 24px; margin-bottom: 22px; }
.piece-price.is-sold { color: var(--graphite); font-size: 20px; }
.piece-desc { max-width: 46ch; margin-bottom: 26px; color: #34323d; }

.specs { margin: 0 0 30px; }
.specs dt {
  font-size: 11px; font-weight: 700; letter-spacing: 0.18em;
  text-transform: uppercase; color: var(--graphite); margin-bottom: 2px;
}
.specs dd { margin: 0 0 14px; }

.ship-note { font-size: 13.5px; color: var(--graphite); margin-top: 16px; }

/* ---------- buttons + forms ---------- */

.btn {
  display: inline-block; cursor: pointer;
  font-family: var(--body); font-size: 13px; font-weight: 700;
  letter-spacing: 0.12em; text-transform: uppercase; text-decoration: none;
  color: var(--ink); background: transparent;
  border: 1px solid var(--ink); border-radius: 0;
  padding: 14px 30px;
  transition: background 0.16s ease, color 0.16s ease, border-color 0.16s ease;
}
.btn:hover { background: var(--ink); color: var(--wall); }
.btn-primary { background: var(--ink); color: var(--wall); }
.btn-primary:hover { background: var(--iris); border-color: var(--iris); color: #fff; }
.btn-small { padding: 8px 16px; font-size: 11.5px; }
.btn-wide { width: 100%; }

input[type="number"], input[type="text"], input[type="password"], textarea, select {
  font-family: var(--body); font-size: 15px; color: var(--ink);
  background: #fff; border: 1px solid var(--line); border-radius: 0;
  padding: 9px 12px;
}

/* ---------- cart ---------- */

.cart { max-width: 780px; padding-bottom: 40px; }

.cart-line {
  display: grid; grid-template-columns: 72px 1fr auto auto;
  gap: 20px; align-items: center;
  padding: 18px 0; border-bottom: 1px solid var(--line);
}
@media (max-width: 640px) {
  .cart-line { grid-template-columns: 60px 1fr; }
  .cart-line-total { grid-column: 2; text-align: left; }
}
.cart-thumb img { width: 72px; height: 90px; object-fit: cover; border: 1px solid var(--line); }
.cart-line-info a { font-family: var(--display); font-weight: 500; font-size: 17px; text-decoration: none; }
.cart-line-info a:hover { color: var(--iris); }
.cart-unit { font-size: 13px; color: var(--graphite); margin-top: 2px; }

.qty-form { display: flex; align-items: center; gap: 10px; }
.qty-form label { display: flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--graphite); }
.qty-form input { width: 64px; }

.cart-line-total { font-weight: 500; font-variant-numeric: tabular-nums; text-align: right; }

.cart-summary { max-width: 360px; margin-left: auto; padding-top: 24px; }
.zone-form { display: flex; align-items: flex-end; gap: 10px; margin-bottom: 18px; padding-bottom: 16px; border-bottom: 1px solid var(--line); }
.zone-form label { flex: 1; display: flex; flex-direction: column; gap: 6px; font-size: 12px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--graphite); }
.zone-form select { width: 100%; }
.sum-row { display: flex; justify-content: space-between; gap: 16px; margin-bottom: 10px; }
.sum-row.muted { color: var(--graphite); font-size: 14px; }
.cart-summary form { margin-top: 18px; }

/* ---------- prose pages (about, success, 404) ---------- */

.prose { max-width: 60ch; padding: clamp(48px, 10vh, 100px) 0 60px; }
.prose h1 {
  font-family: var(--display); font-weight: 200;
  font-size: clamp(34px, 5.5vw, 54px); line-height: 1.1;
  margin: 10px 0 22px;
}
.prose p { margin-bottom: 18px; }
.prose.center { margin: 0 auto; text-align: center; }

/* ---------- footer ---------- */

.site-foot {
  margin-top: clamp(60px, 12vh, 120px);
  border-top: 1px solid var(--line);
  padding: 30px var(--gutter) 40px;
  max-width: 1180px; margin-left: auto; margin-right: auto; width: 100%;
}
.foot-line { font-family: var(--display); font-weight: 300; font-style: italic; font-size: 15.5px; color: var(--graphite); margin-bottom: 8px; }
.foot-meta { font-size: 13px; color: var(--graphite); display: flex; gap: 10px; flex-wrap: wrap; }
.foot-meta a { text-decoration-color: var(--line); }
