:root {
  --ivory: #FBF6EC;
  --glow: #F3E4C4;
  --panel: #F3EADA;
  --gold: #B8923A;
  --gold-soft: #D8BE80;
  --espresso: #7A4B1E;
  --ink-black: #111111;
  --gold-text: #7A5C1F; /* text-safe gold, 5.8:1 on ivory */
  --muted: #6B5A48;     /* secondary text, >=5:1 */
  --ink: #4A3220;
  --white: #FFFFFF;
  --radius: 10px;
  --shadow: 0 6px 18px rgba(74, 50, 32, .10);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 76px; }
body {
  margin: 0;
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 18px;
  color: var(--ink);
  background: var(--ivory);
  line-height: 1.45;
}
img { display: block; max-width: 100%; }
button, input, select { font: inherit; color: inherit; }
a { color: inherit; }

/* ---------- nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between;
  padding: 4px clamp(16px, 4vw, 48px);
  background: rgba(251, 246, 236, .92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--gold-soft);
}
.brand {
  font-family: "Pinyon Script", cursive;
  font-size: 30px; color: var(--ink-black); text-decoration: none; line-height: 1;
}
.brand img { height: 72px; width: auto; mix-blend-mode: multiply; display: block; }
.nav-links { display: flex; gap: 22px; align-items: center; font-family: "Cinzel", serif; font-size: 13px; letter-spacing: .12em; text-transform: uppercase; }
.nav-links a { text-decoration: none; }
.nav-links a:hover { color: var(--gold); }
.nav-cta {
  padding: 9px 16px; border: 1px solid var(--gold); border-radius: 999px; color: var(--espresso);
}
.nav-cta:hover { background: var(--gold); color: var(--white) !important; }

/* ---------- landing / collection views ---------- */
body:not(.view-shop) .shop, body:not(.view-shop) .footer { display: none; }
body.view-shop .landing { display: none; }
.landing {
  min-height: calc(100vh - 66px);
  display: grid; grid-template-columns: minmax(0, 540px) minmax(0, 460px);
  align-items: center; justify-content: center; gap: clamp(32px, 6vw, 96px);
  padding: clamp(24px, 4vw, 56px) clamp(20px, 5vw, 64px);
  background: radial-gradient(ellipse at 30% 0%, var(--glow) 0%, var(--ivory) 62%);
}
.l-title {
  font-family: "Pinyon Script", cursive; font-weight: 400; color: var(--ink-black);
  font-size: clamp(50px, 6.2vw, 88px); line-height: 1.02; margin: 12px 0 0;
}
.l-title span { color: var(--gold); }
.l-lede { font-size: 21px; font-style: italic; max-width: 460px; margin: 18px 0 0; }
.landing .hero-actions { justify-content: flex-start; margin-top: 30px; }
.l-visit { margin: 22px 0 0; font-size: 16px; color: var(--muted); }
.l-visit a { color: var(--espresso); }
.l-art { position: relative; height: min(480px, 60vh); }
.pol {
  position: absolute; margin: 0; background: var(--white); padding: 12px 12px 0;
  border: 1px solid var(--gold-soft); box-shadow: 0 18px 40px rgba(74, 50, 32, .22);
  animation: rise .9s ease both;
}
.pol img { width: 100%; height: calc(100% - 44px); object-fit: cover; display: block; }
.pol figcaption { height: 44px; display: grid; place-items: center; font-family: "Pinyon Script", cursive; font-size: 24px; color: var(--ink-black); }
.p1 { width: 66%; top: 0; left: 0; transform: rotate(-4deg); --r: -4deg; }
.p2 { width: 60%; right: 0; bottom: 0; transform: rotate(3.5deg); --r: 3.5deg; animation-delay: .2s; }
@keyframes rise { from { opacity: 0; transform: translateY(18px) rotate(var(--r)); } to { opacity: 1; transform: rotate(var(--r)); } }
@media (max-width: 820px) {
  .landing { grid-template-columns: 1fr; text-align: center; min-height: auto; }
  .l-lede { margin-inline: auto; }
  .landing .hero-actions { justify-content: center; }
  .l-art { height: 380px; order: -1; }
  .p1 { width: 60%; } .p2 { width: 56%; }
}

/* ---------- hero ---------- */
.hero {
  text-align: center;
  padding: clamp(56px, 10vw, 110px) 20px clamp(44px, 7vw, 80px);
  background:
    radial-gradient(ellipse at 50% 0%, var(--glow) 0%, var(--ivory) 65%);
  border-bottom: 1px solid var(--gold-soft);
}
.eyebrow {
  font-family: "Cinzel", serif; font-size: 12px; letter-spacing: .3em; text-transform: uppercase; color: var(--gold-text); margin: 0;
}
.hero h1 {
  font-family: "Pinyon Script", cursive; font-weight: 400;
  font-size: clamp(48px, 9vw, 96px); color: var(--ink-black); margin: 10px 0 0; line-height: 1.05;
}
.rule { width: 90px; height: 1px; background: var(--gold); margin: 18px auto; position: relative; }
.rule::after { content: ""; position: absolute; left: 50%; top: 50%; width: 7px; height: 7px; border-radius: 50%; background: var(--gold); transform: translate(-50%, -50%); }
.lede { max-width: 560px; margin: 0 auto; font-size: 20px; font-style: italic; }
.hero-actions { margin-top: 28px; display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

/* ---------- buttons ---------- */
.btn-gold, .btn-ghost {
  display: inline-block; padding: 12px 22px; border-radius: 999px; text-decoration: none; cursor: pointer;
  font-family: "Cinzel", serif; font-size: 13px; letter-spacing: .12em; text-transform: uppercase;
  transition: .2s ease; border: 1px solid transparent;
}
.btn-gold { background: var(--gold); color: var(--white); }
.btn-gold:hover { background: var(--espresso); }
.btn-ghost { border-color: var(--gold); color: var(--espresso); background: transparent; }
.btn-ghost:hover { background: var(--gold); color: var(--white); }
button.link { background: none; border: 0; color: var(--espresso); text-decoration: underline; cursor: pointer; padding: 6px; font-size: 16px; }

/* ---------- shop toolbar ---------- */
.shop { padding: 28px clamp(16px, 4vw, 48px) 80px; max-width: 1400px; margin: 0 auto; }
.toolbar {
  position: sticky; top: 66px; z-index: 10;
  background: var(--ivory); padding: 14px 0 12px; border-bottom: 1px solid var(--gold-soft);
  display: flex; flex-direction: column; gap: 12px;
}
.search-row { display: flex; gap: 10px; }
#q {
  flex: 1; min-width: 0; height: 46px; padding: 0 16px; border-radius: 999px;
  border: 1px solid var(--gold-soft); background: var(--white); font-size: 18px;
}
#q:focus, select:focus { outline: 2px solid var(--gold); outline-offset: 1px; }
select {
  height: 46px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--gold-soft);
  background: var(--white); cursor: pointer; font-size: 16px;
}
.chips { display: flex; gap: 8px; overflow-x: auto; padding: 2px; scrollbar-width: thin; }
.chip {
  flex: none; padding: 7px 14px; border-radius: 999px; border: 1px solid var(--gold-soft);
  background: var(--white); cursor: pointer; font-size: 16px; white-space: nowrap; transition: .15s;
}
.chip:hover { border-color: var(--gold); }
.chip[aria-pressed="true"] { background: var(--espresso); border-color: var(--espresso); color: var(--white); }
.chip span { color: var(--muted); font-size: 13px; margin-left: 4px; }
.filter-row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.filter-row .chips { flex: 1; min-width: 0; }
#sil { min-width: 180px; }
.count { margin: 0; font-family: "Cinzel", serif; font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: var(--gold-text); }

/* ---------- grid ---------- */
.grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: clamp(14px, 2vw, 26px);
  margin-top: 26px;
}
.card {
  all: unset; cursor: pointer; display: flex; flex-direction: column;
  background: var(--white); border-radius: var(--radius); overflow: hidden;
  box-shadow: var(--shadow); transition: transform .25s ease, box-shadow .25s ease;
}
.card:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }
.card:hover { transform: translateY(-4px); box-shadow: 0 14px 30px rgba(74, 50, 32, .16); }
.ph { position: relative; aspect-ratio: 3 / 4; background: var(--panel); overflow: hidden; }
.ph img { width: 100%; height: 100%; object-fit: cover; transition: opacity .4s ease, transform .6s ease; }
.ph img.hover { position: absolute; inset: 0; opacity: 0; }
.card:hover .ph img.hover { opacity: 1; }
.card:hover .ph img:not(.hover) { transform: scale(1.03); }
.nophoto { height: 100%; display: grid; place-items: center; font-family: "Cinzel", serif; font-size: 12px; letter-spacing: .1em; color: var(--gold-text); }
.badge {
  position: absolute; left: 10px; bottom: 10px; padding: 4px 10px; border-radius: 999px;
  background: rgba(251, 246, 236, .92); font-family: "Cinzel", serif; font-size: 12px; letter-spacing: .08em; color: var(--espresso);
}
.meta { padding: 12px 14px 16px; text-align: left; }
.meta small { font-family: "Cinzel", serif; font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--gold-text); }
.meta h3 { margin: 4px 0 2px; font-size: 21px; font-weight: 600; line-height: 1.2; }
.meta p { margin: 0; font-size: 16px; font-style: italic; color: var(--muted); }

.empty { text-align: center; padding: 60px 0; }
.empty p { font-size: 20px; font-style: italic; }
.status { text-align: center; font-style: italic; padding: 40px 0; }

/* ---------- viewer ---------- */
dialog#viewer {
  border: 0; padding: 0; width: min(1100px, 94vw); max-height: 92vh; border-radius: 14px;
  background: var(--ivory); box-shadow: 0 30px 80px rgba(0,0,0,.35);
}
dialog#viewer::backdrop { background: rgba(40, 26, 16, .72); }
.x {
  position: absolute; top: 10px; right: 12px; z-index: 3; width: 40px; height: 40px; border-radius: 50%;
  border: 1px solid var(--gold-soft); background: var(--white); font-size: 26px; line-height: 1; cursor: pointer;
}
.x:hover { background: var(--gold); color: var(--white); }
.v-grid { display: grid; grid-template-columns: 1.1fr 1fr; max-height: 92vh; }
.v-gallery { padding: 22px; background: var(--panel); display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.v-main { position: relative; flex: 1; min-height: 0; display: grid; place-items: center; }
#v-img { max-height: 70vh; width: 100%; object-fit: contain; border-radius: 6px; background: var(--white); }
.arrow {
  position: absolute; top: 50%; transform: translateY(-50%); width: 42px; height: 42px; border-radius: 50%;
  border: 0; background: rgba(251, 246, 236, .9); font-size: 26px; cursor: pointer; box-shadow: var(--shadow);
}
.arrow.prev { left: 6px; } .arrow.next { right: 6px; }
.arrow:hover { background: var(--gold); color: var(--white); }
.v-thumbs { display: flex; gap: 8px; overflow-x: auto; }
.v-thumbs button { flex: none; width: 56px; height: 70px; padding: 0; border: 2px solid transparent; border-radius: 6px; overflow: hidden; cursor: pointer; background: var(--white); }
.v-thumbs button[aria-current="true"] { border-color: var(--gold); }
.v-thumbs img { width: 100%; height: 100%; object-fit: cover; }
.v-info { padding: 34px 30px 26px; overflow-y: auto; }
.v-info > small { font-family: "Cinzel", serif; font-size: 11px; letter-spacing: .16em; text-transform: uppercase; color: var(--gold-text); }
.v-info h2 { font-family: "Cinzel", serif; font-weight: 500; font-size: 30px; margin: 6px 0 2px; color: var(--ink-black); }
.v-sil { margin: 0 0 14px; font-size: 20px; font-style: italic; }
#v-specs { display: grid; grid-template-columns: auto 1fr; gap: 8px 16px; margin: 0 0 14px; }
#v-specs dt { font-family: "Cinzel", serif; font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: var(--gold-text); padding-top: 3px; }
#v-specs dd { margin: 0; font-size: 18px; }
.v-desc { font-size: 17px; line-height: 1.5; border-top: 1px solid var(--gold-soft); padding-top: 14px; }
.v-price { font-family: "Cinzel", serif; font-size: 14px; letter-spacing: .08em; color: var(--espresso); }
.v-actions { display: flex; gap: 10px; flex-wrap: wrap; margin: 18px 0 10px; }
.v-note { font-size: 15px; font-style: italic; color: var(--muted); }

/* ---------- footer ---------- */
.footer {
  text-align: center; padding: 56px 20px 64px; background: var(--espresso); color: var(--ivory);
}
.footer .brand { color: var(--ivory); font-size: 44px; }
.footer .tag { font-family: "Cinzel", serif; font-size: 12px; letter-spacing: .22em; color: var(--gold-soft); margin: 8px 0 0; }
.footer .rule { background: var(--gold-soft); }
.footer .rule::after { background: var(--gold-soft); }
.footer a { color: var(--gold-soft); }

/* ---------- mobile ---------- */
@media (max-width: 640px) {
  body { font-size: 17px; }
  .nav-links a:not(.nav-cta) { display: none; }
  .toolbar { position: static; padding-top: 10px; }
  .search-row { flex-wrap: wrap; }
  #q { flex-basis: 100%; height: 42px; font-size: 16px; }
  .filter-row { gap: 8px; }
  #sort { height: 46px; max-width: 140px; }
  #sil { min-width: 0; flex: 1; height: 40px; }
  .grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .meta h3 { font-size: 18px; }
  .v-grid { grid-template-columns: 1fr; overflow-y: auto; }
  .v-main { max-height: 52vh; }
  #v-img { max-height: 48vh; }
}
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; scroll-behavior: auto !important; }
}

/* ---------- polish: states, focus, filter tags, back-to-top ---------- */
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }
.skel {
  aspect-ratio: 3 / 4; border-radius: var(--radius);
  background: linear-gradient(90deg, #F3EADA 25%, #FBF6EC 50%, #F3EADA 75%);
  background-size: 200% 100%; animation: shimmer 1.4s infinite linear;
}
@keyframes shimmer { to { background-position: -200% 0; } }
.active { display: flex; flex-wrap: wrap; gap: 8px; }
.active:empty { display: none; }
.tag {
  display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px; border-radius: 999px;
  background: var(--panel); border: 1px solid var(--gold-soft); cursor: pointer; font-size: 15px;
}
.tag:hover { border-color: var(--espresso); }
.tag span { font-size: 16px; line-height: 1; color: var(--espresso); }
.totop {
  position: fixed; right: 20px; bottom: 20px; z-index: 15; padding: 10px 16px; border-radius: 999px;
  background: var(--espresso); color: var(--white); border: 0; cursor: pointer;
  font-family: "Cinzel", serif; font-size: 12px; letter-spacing: .1em; box-shadow: var(--shadow);
}
.totop[hidden] { display: none; }
.status { color: var(--muted); }
.status a { color: var(--espresso); }
button:disabled { opacity: .5; cursor: not-allowed; }
