/* Heirloom Heraldry: dark, dramatic, restrained. The carvings are the star. */
:root {
  --navy: #0e1729;
  --navy-2: #16223a;
  --burgundy: #3d1019;
  --gold: #c8a44d;
  --gold-light: #e7d08f;
  --gold-faint: rgba(200, 164, 77, .38);
  --parchment: #eee4cc;
  --ink-soft: #c9bfa8;
  --serif: "Cormorant Garamond", "Garamond", "Georgia", serif;
  --body: "EB Garamond", "Garamond", "Georgia", serif;
  --blackletter: "UnifrakturMaguntia", "Old English Text MT", serif;
  --gutter: 16px;
  --mat: #16223a;      /* the border every crest photo sits on */
  --mat-size: 7%;      /* how thick that border is */
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  color: var(--parchment);
  font: 18px/1.55 var(--body);
  background-color: var(--navy);
  background-image:
    radial-gradient(ellipse 90% 60% at 50% -10%, rgba(61, 16, 25, .9), transparent 70%),
    radial-gradient(ellipse 70% 50% at 100% 100%, rgba(61, 16, 25, .55), transparent 70%),
    linear-gradient(180deg, var(--navy) 0%, #0b1322 100%);
  background-attachment: fixed;
}
/* faint parchment grain */
body::before {
  content: "";
  position: fixed; inset: 0; pointer-events: none; z-index: 0; opacity: .07; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .93 0 0 0 0 .87 0 0 0 0 .72 0 0 0 1 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
body > * { position: relative; z-index: 1; }
a { color: var(--gold-light); }
img { max-width: 100%; display: block; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

.sample-notice { background: var(--gold); color: var(--navy); text-align: center; font: 600 14px/1.4 var(--serif); padding: 5px var(--gutter); }

/* ---------- header ---------- */
.site-header {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 14px var(--gutter) 10px; max-width: 1200px; margin: 0 auto;
}
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: inherit; min-width: 0; }
.brand img { height: 52px; width: auto; filter: drop-shadow(0 2px 4px rgba(0,0,0,.5)); }
@media (min-width: 640px) { .brand img { height: 68px; } }  /* MrGoodWood logo (2026-11-01) */
.logo-placeholder {
  flex: 0 0 auto; width: 48px; height: 48px; border-radius: 50%;
  border: 1px dashed var(--gold); color: var(--gold); font: italic 12px/48px var(--serif); text-align: center;
}
.brand-text { display: flex; flex-direction: column; min-width: 0; }
.brand-name { font-family: var(--blackletter); font-size: clamp(26px, 7vw, 40px); line-height: 1; color: var(--gold-light);
  text-shadow: 0 1px 0 rgba(0,0,0,.6), 0 0 18px rgba(200,164,77,.18); }
.brand-name.small { font-size: 26px; }
.maker { font: italic 500 14px/1.3 var(--serif); letter-spacing: .08em; color: var(--ink-soft); margin-top: 4px; }
.etsy-link { flex: 0 0 auto; font: 600 15px/1 var(--serif); letter-spacing: .04em; text-decoration: none; color: var(--gold-light);
  border: 1px solid var(--gold-faint); padding: 9px 12px; border-radius: 2px; transition: box-shadow .25s, border-color .25s; }
.etsy-link:hover { border-color: var(--gold); box-shadow: 0 0 14px rgba(200,164,77,.35); }

/* ---------- pinned search ---------- */
.search-bar {
  position: sticky; top: 0; z-index: 10;
  display: flex; gap: 8px; align-items: center;
  padding: 10px var(--gutter);
  background: rgba(14, 23, 41, .92); backdrop-filter: blur(6px);
  border-top: 1px solid var(--gold-faint); border-bottom: 1px solid var(--gold-faint);
}
.search-bar input {
  flex: 1; min-width: 0; font: 18px var(--body); color: var(--parchment);
  background: rgba(255,255,255,.04); border: 1px solid var(--gold-faint); border-radius: 2px; padding: 10px 12px;
}
.search-bar input::placeholder { color: #9d937e; font-style: italic; }
.search-bar input:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 12px rgba(200,164,77,.3); }
.sort { display: flex; flex: 0 0 auto; }
.sort button { font: 600 14px var(--serif); color: var(--ink-soft); background: transparent; border: 1px solid var(--gold-faint); padding: 10px 10px; cursor: pointer; }
.sort button + button { border-left: 0; }
.sort button[aria-pressed="true"] { color: var(--navy); background: var(--gold); border-color: var(--gold); }

/* ---------- gallery ---------- */
.gallery, .crest { max-width: 1200px; margin: 0 auto; padding: 0 var(--gutter) 40px; }
.intro { text-align: center; padding: 26px 0 6px; }
h1, h2 { font-family: var(--serif); font-weight: 600; color: var(--gold-light); letter-spacing: .02em; }
.intro h1 { font-size: clamp(30px, 6vw, 46px); margin: 0 0 6px; }
.intro p { color: var(--ink-soft); max-width: 36em; margin: 0 auto; }
.filters { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin: 18px 0 0; }
.filters button { font: 600 15px/1.2 var(--serif); letter-spacing: .03em; color: var(--ink-soft); background: transparent;
  border: 1px solid var(--gold-faint); border-radius: 999px; padding: 7px 14px; cursor: pointer; transition: box-shadow .25s, border-color .25s; }
.filters button:hover { border-color: var(--gold); box-shadow: 0 0 12px rgba(200,164,77,.3); }
.filters button[aria-pressed="true"] { color: var(--navy); background: var(--gold); border-color: var(--gold); }
.card-name.motto { font-style: italic; font-weight: 500; }
.origin-badge { display: inline-block; margin: 0 0 12px; padding: 5px 12px; border: 1px solid var(--gold); border-radius: 999px;
  font: 600 14px/1.2 var(--serif); letter-spacing: .08em; text-transform: uppercase; color: var(--gold-light);
  background: rgba(200,164,77,.08); }
.details dd.motto { font-style: italic; }
.count { text-align: center; color: #9d937e; font-style: italic; font-size: 15px; margin: 14px 0; }
.grid { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 640px) { .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; } }
@media (min-width: 1000px) { .grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 26px; } }
.card a { display: block; text-decoration: none; color: inherit; text-align: center; }
.frame {
  display: block; padding: 5px; border: 1px solid var(--gold-faint); background: rgba(0,0,0,.18);
  transition: box-shadow .35s, border-color .35s;
}
.frame img { width: 100%; aspect-ratio: 4 / 5; object-fit: contain; height: auto; padding: var(--mat-size); background: var(--mat); }
.card a:hover .frame, .card a:focus-visible .frame { border-color: var(--gold); box-shadow: 0 0 22px rgba(200,164,77,.35); }
.card-name { display: block; font: 600 clamp(18px, 4.6vw, 22px)/1.2 var(--serif); color: var(--parchment); margin-top: 8px; }
.card-spec { display: block; font-size: 14px; color: #a99e86; letter-spacing: .04em; }
.no-results, .cta { text-align: center; padding: 26px 0; }
.cta { margin-top: 36px; border-top: 1px solid var(--gold-faint); }
.cta h2 { margin: 18px 0 4px; font-size: 26px; }
.cta p { color: var(--ink-soft); margin: 0 0 14px; }

.button {
  display: inline-block; font: 700 18px/1 var(--serif); letter-spacing: .06em; text-decoration: none;
  color: var(--navy); background: linear-gradient(180deg, var(--gold-light), var(--gold));
  padding: 14px 24px; border-radius: 2px; border: 1px solid #a8862f;
  box-shadow: 0 2px 0 rgba(0,0,0,.4); transition: box-shadow .25s;
}
.button:hover { box-shadow: 0 0 22px rgba(200,164,77,.55); }
.button.big { font-size: 21px; padding: 17px 30px; width: 100%; max-width: 420px; text-align: center; }

/* ---------- crest page ---------- */
.crumbs { padding: 6px 0 12px; font-family: var(--serif); }
.crumbs a { text-decoration: none; }
.crest, .crest-top { display: grid; gap: 22px; }
@media (min-width: 900px) {
  /* photos left, details right; the details stay in view while scrolling the photos, but only
     alongside them (their own box), so they never slide over "More crests" below */
  .crest-top { grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); align-items: start; column-gap: 40px; }
  .hero-shot { grid-row: span 2; }
  .details { position: sticky; top: 20px; }
}
.hero-shot { margin: 0; padding: 6px; border: 1px solid var(--gold-faint); background: rgba(0,0,0,.2); }
.shot { display: block; width: 100%; padding: 0; border: 0; background: none; cursor: zoom-in; }
.hero-shot img { width: 100%; height: auto; aspect-ratio: 4 / 5; object-fit: contain; padding: var(--mat-size); background: var(--mat); }
.closeups h2, .more h2 { font-size: 24px; margin: 0 0 10px; }
.swipe { list-style: none; margin: 0; padding: 0 0 6px; display: flex; gap: 10px; overflow-x: auto; scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch; scrollbar-width: thin; scrollbar-color: var(--gold-faint) transparent; }
.swipe li { flex: 0 0 72%; scroll-snap-align: start; }
@media (min-width: 640px) { .swipe li { flex-basis: 44%; } }
.swipe img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border: 1px solid var(--gold-faint); }
.hint { font-size: 14px; color: #9d937e; font-style: italic; margin: 4px 0 0; }
.details h1 { font-size: clamp(32px, 7vw, 48px); line-height: 1.05; margin: 0 0 14px; }
.details .the { display: block; font-size: .5em; font-style: italic; font-weight: 500; color: var(--ink-soft); letter-spacing: .08em; }
.details dl { margin: 0 0 22px; border-top: 1px solid var(--gold-faint); }
.details dl div { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--gold-faint); }
.details dt { font: 600 15px var(--serif); letter-spacing: .12em; text-transform: uppercase; color: var(--gold); }
.details dd { margin: 0; text-align: right; }
.fine { font-size: 14px; color: #9d937e; }
.more { margin-top: 20px; border-top: 1px solid var(--gold-faint); padding-top: 18px; }

/* lightbox */
.lightbox { position: fixed; inset: 0; z-index: 50; background: rgba(5, 9, 18, .96); }
.lightbox[hidden] { display: none; }
.lb-track { list-style: none; margin: 0; padding: 0; height: 100%; display: flex; overflow-x: auto; scroll-snap-type: x mandatory; }
.lb-track li { flex: 0 0 100%; scroll-snap-align: center; display: flex; align-items: center; justify-content: center; padding: 50px 12px 20px; }
.lb-track img { max-height: 100%; max-width: 100%; object-fit: contain; }
.lb-close { position: absolute; top: 8px; right: 12px; z-index: 2; font: 40px/1 var(--serif); color: var(--gold-light); background: none; border: 0; cursor: pointer; }

/* ---------- footer ---------- */
.site-footer { text-align: center; padding: 10px var(--gutter) 40px; }
.site-footer .rule { height: 1px; max-width: 360px; margin: 10px auto 20px; background: linear-gradient(90deg, transparent, var(--gold), transparent); }
.site-footer .etsy-link { display: inline-block; }

/* ---------- gentle fade-in ---------- */
.js .reveal { opacity: 0; transform: translateY(10px); transition: opacity .7s ease, transform .7s ease; }
.js .reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .js .reveal { opacity: 1; transform: none; transition: none; }
  * { scroll-behavior: auto !important; }
}
/* lightbox arrows + "3 / 10" (2026-11-01) */
.lb-prev, .lb-next { position: absolute; top: 50%; transform: translateY(-50%); z-index: 2; width: 54px; height: 54px;
  display: flex; align-items: center; justify-content: center; padding: 0 0 5px; border-radius: 50%;
  border: 1px solid var(--gold-faint); background: rgba(5, 9, 18, .65); color: var(--gold-light);
  font: 40px/1 var(--serif); cursor: pointer; }
.lb-prev { left: 14px; }
.lb-next { right: 14px; }
.lb-prev:hover, .lb-next:hover, .lb-prev:focus-visible, .lb-next:focus-visible { background: rgba(5, 9, 18, .9); border-color: var(--gold-light); }
.lb-prev[hidden], .lb-next[hidden] { display: none; }
.lb-count { position: absolute; top: 16px; left: 0; right: 0; margin: 0; text-align: center; pointer-events: none;
  color: var(--gold-light); font: 17px var(--serif); letter-spacing: .12em; }
@media (max-width: 640px) { .lb-prev, .lb-next { width: 44px; height: 44px; font-size: 32px; } .lb-prev { left: 6px; } .lb-next { right: 6px; } }
/* the "&" in the site name: a fancy gold italic between the Old English words (Roger, 2026-11-01) */
.brand-name .amp { font-family: "Cormorant Garamond", var(--serif), serif; font-style: italic; font-weight: 600;
  font-size: 1.2em; line-height: 0; color: var(--gold); margin: 0 .04em; }
