:root {
  color-scheme: dark;
  --ink: #16281b;
  --ink-deep: #0b1710;
  --paper: #f8f4e9;
  --paper-soft: #efe8d8;
  --gold: #b39451;
  --line: rgba(22, 40, 27, .16);
  --shadow: 0 24px 64px rgba(17, 29, 19, .14);
}

* { box-sizing: border-box; }
html { background: var(--ink-deep); scroll-behavior: smooth; }
body {
  min-width: 320px;
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "DM Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
body::before {
  position: fixed;
  inset: 0;
  z-index: -1;
  background: radial-gradient(circle at 8% 0%, rgba(217, 184, 102, .13), transparent 26rem);
  content: "";
  pointer-events: none;
}
a { color: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 3px solid #7c995e; outline-offset: 4px; }

.resource-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 76px;
  padding: 18px clamp(20px, 5vw, 72px);
  background: var(--ink);
  border-bottom: 1px solid rgba(255,255,255,.1);
}
.resource-brand { display: inline-flex; align-items: center; width: min(220px, 58vw); }
.resource-brand img { display: block; width: 100%; height: auto; }
.back-link {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  color: rgba(248,244,233,.75);
  font-size: 13px;
  text-decoration: none;
  transition: color .2s ease;
}
.back-link:hover, .back-link:focus-visible { color: #fff; }

.resource-main { width: min(1440px, 100%); margin: 0 auto; padding: clamp(56px, 8vw, 116px) clamp(20px, 5vw, 72px) 96px; }
.resource-intro { max-width: 680px; }
.eyebrow { margin: 0 0 12px; color: var(--gold); font-size: 11px; font-weight: 600; letter-spacing: .2em; line-height: 1.4; text-transform: uppercase; }
h1, h2, p { margin-top: 0; }
h1 { margin-bottom: 18px; font-family: "EB Garamond", Georgia, serif; font-size: clamp(48px, 8vw, 92px); font-weight: 500; letter-spacing: -.035em; line-height: .95; }
.intro-copy { max-width: 600px; margin-bottom: 0; color: rgba(22,40,27,.7); font-size: clamp(16px, 1.5vw, 19px); line-height: 1.65; }
.resource-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 24px; margin: clamp(52px, 7vw, 88px) 0 24px; padding-bottom: 18px; border-bottom: 1px solid var(--line); }
.filter-group { display: flex; flex-wrap: wrap; gap: 8px; }
.filter-button {
  min-height: 38px;
  padding: 7px 14px;
  border: 1px solid rgba(22,40,27,.2);
  border-radius: 999px;
  background: transparent;
  color: rgba(22,40,27,.72);
  cursor: pointer;
  font: inherit;
  font-size: 13px;
  transition: color .2s ease, background-color .2s ease, border-color .2s ease;
}
.filter-button:hover, .filter-button:focus-visible { border-color: var(--ink); color: var(--ink); }
.filter-button.is-active { border-color: var(--ink); background: var(--ink); color: var(--paper); }
.resource-count { margin: 0; color: rgba(22,40,27,.52); font-size: 12px; letter-spacing: .08em; text-transform: uppercase; }

.store-gallery { columns: 3 280px; column-gap: clamp(16px, 2vw, 28px); }
.store-card { position: relative; display: inline-block; width: 100%; margin: 0 0 clamp(16px, 2vw, 28px); break-inside: avoid; vertical-align: top; }
.card-media { position: relative; overflow: hidden; background: var(--paper-soft); }
.card-preview { display: block; width: 100%; padding: 0; border: 0; background: transparent; cursor: zoom-in; }
.card-preview img { display: block; width: 100%; height: auto; aspect-ratio: auto; transition: transform .55s cubic-bezier(.22,1,.36,1), filter .35s ease; }
.store-card:hover .card-preview img { transform: scale(1.025); filter: saturate(1.03); }
.card-actions { position: absolute; right: 12px; bottom: 12px; z-index: 2; display: flex; gap: 6px; }
.card-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border: 1px solid rgba(255,255,255,.34);
  border-radius: 50%;
  background: rgba(11,23,16,.78);
  color: #fff;
  text-decoration: none;
  backdrop-filter: blur(9px);
  -webkit-backdrop-filter: blur(9px);
  transition: background-color .2s ease, color .2s ease, transform .2s ease;
}
.card-action:hover, .card-action:focus-visible { background: var(--paper); color: var(--ink); transform: translateY(-2px); }
.card-action svg { width: 16px; height: 16px; }
.card-caption { display: flex; align-items: baseline; justify-content: space-between; gap: 14px; padding: 10px 2px 0; }
.card-caption strong { font-family: "EB Garamond", Georgia, serif; font-size: 18px; font-weight: 600; line-height: 1.15; }
.card-caption span { flex: 0 0 auto; color: rgba(22,40,27,.5); font-size: 10px; letter-spacing: .07em; text-transform: uppercase; }

.resource-footer { display: flex; justify-content: space-between; gap: 20px; padding: 24px clamp(20px, 5vw, 72px) 32px; background: var(--ink); color: rgba(248,244,233,.55); font-size: 12px; }
.resource-footer a { color: rgba(248,244,233,.8); text-decoration: none; }
.resource-footer a:hover { color: #fff; }

.store-lightbox[hidden] { display: none; }
.store-lightbox { position: fixed; inset: 0; z-index: 20; display: grid; place-items: center; padding: 24px; background: rgba(7,14,9,.92); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); }
.lightbox-panel { display: grid; grid-template-rows: minmax(0, 1fr) auto; width: min(1220px, 100%); max-height: calc(100dvh - 48px); overflow: hidden; border: 1px solid rgba(255,255,255,.16); border-radius: 18px; background: #0f1e13; box-shadow: var(--shadow); }
.lightbox-stage { display: grid; place-items: center; min-height: 0; padding: 24px; }
.lightbox-stage img { display: block; width: auto; max-width: 100%; height: auto; max-height: min(72dvh, 800px); object-fit: contain; border-radius: 4px; user-select: none; }
.lightbox-details { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 18px 22px max(18px, env(safe-area-inset-bottom, 0px)); border-top: 1px solid rgba(255,255,255,.13); color: var(--paper); }
.lightbox-details .eyebrow { margin-bottom: 5px; color: #d9b866; }
.lightbox-details h2 { margin-bottom: 3px; font-family: "EB Garamond", Georgia, serif; font-size: 24px; font-weight: 500; line-height: 1.1; }
.lightbox-filename { margin: 0; color: rgba(248,244,233,.55); font-size: 11px; overflow-wrap: anywhere; }
.lightbox-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; }
.lightbox-action { display: inline-flex; align-items: center; justify-content: center; min-height: 40px; padding: 8px 14px; border: 1px solid rgba(248,244,233,.3); border-radius: 999px; color: var(--paper); font-size: 13px; font-weight: 600; text-decoration: none; white-space: nowrap; }
.lightbox-action:hover, .lightbox-action:focus-visible { border-color: #d9b866; color: #d9b866; }
.lightbox-action-primary { border-color: var(--paper); background: var(--paper); color: var(--ink); }
.lightbox-action-primary:hover, .lightbox-action-primary:focus-visible { border-color: #d9b866; background: #d9b866; color: var(--ink); }
.lightbox-close, .lightbox-nav { position: fixed; z-index: 2; display: grid; place-items: center; width: 48px; height: 48px; border: 1px solid rgba(255,255,255,.25); border-radius: 50%; background: rgba(11,23,16,.7); color: #fff; cursor: pointer; font: 400 28px/1 "DM Sans", sans-serif; transition: background-color .2s ease, color .2s ease; }
.lightbox-close { top: 20px; right: 20px; }
.lightbox-prev { top: 50%; left: 20px; transform: translateY(-50%); }
.lightbox-next { top: 50%; right: 20px; transform: translateY(-50%); }
.lightbox-close:hover, .lightbox-nav:hover, .lightbox-close:focus-visible, .lightbox-nav:focus-visible { background: var(--paper); color: var(--ink); }

@media (max-width: 760px) {
  .resource-header { align-items: flex-start; flex-direction: column; gap: 14px; }
  .back-link { order: 2; }
  .resource-toolbar { align-items: flex-start; flex-direction: column; gap: 14px; }
  .resource-count { order: -1; }
  .store-gallery { columns: 2 190px; column-gap: 14px; }
  .store-card { margin-bottom: 14px; }
  .card-actions { right: 8px; bottom: 8px; }
  .card-action { width: 36px; height: 36px; }
  .card-caption { display: block; }
  .card-caption span { display: block; margin-top: 4px; }
  .lightbox-panel { max-height: calc(100dvh - 32px); }
  .lightbox-stage { padding: 52px 14px 14px; }
  .lightbox-details { align-items: flex-start; flex-direction: column; gap: 14px; padding: 14px 16px max(16px, env(safe-area-inset-bottom, 0px)); }
  .lightbox-actions { justify-content: flex-start; width: 100%; }
  .lightbox-action { flex: 1 1 auto; }
  .lightbox-nav { display: none; }
  .lightbox-close { top: 12px; right: 12px; }
}
@media (max-width: 480px) {
  .store-gallery { columns: 1; }
  .resource-main { padding-top: 52px; }
  .resource-footer { align-items: flex-start; flex-direction: column; gap: 8px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; }
}
