.sg-main {
  --sg-green: #365229;
  --sg-green-dark: #22381b;
  --sg-terra: #b5654d;
  --sg-terra-dark: #934c39;
  --sg-cream: #fefaef;
  --sg-ink: #263322;
  --sg-muted: #5d6857;
  background: var(--sg-cream);
  color: var(--sg-ink);
  font-family: montserrat, Arial, Helvetica, sans-serif;
  min-height: 100vh;
  pointer-events: auto;
}

.sg-main * {
  box-sizing: border-box;
}

.sg-hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  min-height: 540px;
  padding: clamp(170px, 18vw, 238px) 48px 96px;
  background:
    radial-gradient(circle at 88% 18%, rgba(254, 250, 239, .13) 0 4px, transparent 5px),
    radial-gradient(circle at 82% 28%, rgba(254, 250, 239, .1) 0 2px, transparent 3px),
    radial-gradient(circle at 18% 76%, rgba(254, 250, 239, .08) 0 5px, transparent 6px),
    linear-gradient(128deg, var(--sg-green-dark), var(--sg-green) 58%, #557345);
  color: var(--sg-cream);
}

.sg-hero::after {
  content: "";
  position: absolute;
  z-index: -1;
  width: min(52vw, 720px);
  aspect-ratio: 1;
  right: -12vw;
  bottom: -68%;
  border: 1px solid rgba(254, 250, 239, .14);
  border-radius: 50%;
  box-shadow: 0 0 0 64px rgba(254, 250, 239, .035), 0 0 0 128px rgba(254, 250, 239, .025);
}

.sg-hero-inner,
.sg-gallery-inner {
  width: min(1240px, 100%);
  margin: 0 auto;
}

.sg-back {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 38px;
  color: var(--sg-cream);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .02em;
  text-decoration: none;
}

.sg-back svg {
  width: 18px;
  transition: transform .2s ease;
}

.sg-back:hover svg {
  transform: translateX(-3px);
}

.sg-eyebrow {
  margin: 0 0 16px;
  color: #efd1c5;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .15em;
  text-transform: uppercase;
}

.sg-title {
  max-width: 820px;
  margin: 0;
  color: var(--sg-cream);
  font-family: wfont_9e43ca_aeb151f5dfa24435807b6879b039b15f, wf_aeb151f5dfa24435807b6879b, orig_tan_ashford_bold, Georgia, serif;
  font-size: clamp(48px, 7.4vw, 94px);
  font-weight: 400;
  line-height: 1.25;
  letter-spacing: -.025em;
  text-wrap: balance;
}

.sg-intro {
  max-width: 680px;
  margin: 26px 0 0;
  color: rgba(254, 250, 239, .88);
  font-size: clamp(16px, 1.6vw, 20px);
  line-height: 1.65;
  text-wrap: pretty;
}

.sg-hero-meta {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-top: 34px;
  color: rgba(254, 250, 239, .76);
  font-size: 13px;
}

.sg-hero-meta strong {
  color: var(--sg-cream);
  font-size: 18px;
}

.sg-hero-meta span + span::before {
  content: "";
  display: inline-block;
  width: 4px;
  height: 4px;
  margin: 0 18px 3px 0;
  border-radius: 50%;
  background: var(--sg-terra);
}

.sg-gallery-section {
  padding: 64px 48px 100px;
}

.sg-toolbar {
  position: sticky;
  z-index: 20;
  top: 16px;
  display: grid;
  grid-template-columns: minmax(260px, 480px) 1fr;
  align-items: center;
  gap: 28px;
  margin-bottom: 42px;
  padding: 18px;
  border: 1px solid rgba(54, 82, 41, .13);
  border-radius: 22px;
  background: rgba(254, 250, 239, .93);
  box-shadow: 0 14px 40px rgba(34, 56, 27, .08);
  backdrop-filter: blur(14px);
}

.sg-search {
  position: relative;
}

.sg-search svg {
  position: absolute;
  top: 50%;
  left: 18px;
  width: 20px;
  color: var(--sg-green);
  transform: translateY(-50%);
  pointer-events: none;
}

.sg-search input {
  width: 100%;
  min-height: 54px;
  padding: 13px 48px;
  border: 1px solid rgba(54, 82, 41, .2);
  border-radius: 999px;
  outline: 0;
  background: #fff;
  color: var(--sg-ink);
  font: inherit;
  font-size: 15px;
  transition: border-color .2s ease, box-shadow .2s ease;
}

.sg-search input:focus {
  border-color: var(--sg-green);
  box-shadow: 0 0 0 4px rgba(54, 82, 41, .1);
}

.sg-search-clear {
  position: absolute;
  top: 50%;
  right: 10px;
  display: none;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--sg-muted);
  cursor: pointer;
  transform: translateY(-50%);
}

.sg-search-clear.on {
  display: grid;
  place-items: center;
}

.sg-toolbar-copy {
  justify-self: end;
  text-align: right;
}

.sg-count {
  margin: 0;
  color: var(--sg-green);
  font-size: 14px;
  font-weight: 700;
}

.sg-help {
  margin: 5px 0 0;
  color: var(--sg-muted);
  font-size: 12px;
  line-height: 1.5;
}

.sg-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 22px;
}

.sg-card {
  position: relative;
  overflow: hidden;
  min-width: 0;
  padding: 0;
  border: 0;
  border-radius: 18px;
  background: #e8e4d9;
  color: #fff;
  cursor: zoom-in;
  box-shadow: 0 8px 26px rgba(34, 56, 27, .1);
  aspect-ratio: 3 / 2;
  transform: translateZ(0);
}

.sg-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(22, 35, 18, .72), transparent 58%);
  opacity: .72;
  transition: opacity .25s ease;
}

.sg-card img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  transition: transform .45s cubic-bezier(.2, .65, .25, 1);
}

.sg-card:hover img,
.sg-card:focus-visible img {
  transform: scale(1.035);
}

.sg-card:hover::after,
.sg-card:focus-visible::after {
  opacity: 1;
}

.sg-card:focus-visible {
  outline: 4px solid var(--sg-terra);
  outline-offset: 4px;
}

.sg-card-copy {
  position: absolute;
  z-index: 2;
  right: 15px;
  bottom: 14px;
  left: 15px;
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 10px;
  text-align: left;
}

.sg-card-name {
  overflow: hidden;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sg-card-icon {
  display: grid;
  flex: 0 0 auto;
  width: 30px;
  height: 30px;
  place-items: center;
  border-radius: 50%;
  background: rgba(254, 250, 239, .92);
  color: var(--sg-green);
}

.sg-card-icon svg {
  width: 15px;
}

.sg-empty {
  display: none;
  padding: 80px 24px;
  border: 1px dashed rgba(54, 82, 41, .28);
  border-radius: 24px;
  text-align: center;
}

.sg-empty.on {
  display: block;
}

.sg-empty h2 {
  margin: 0;
  color: var(--sg-green);
  font-family: wfont_9e43ca_aeb151f5dfa24435807b6879b039b15f, wf_aeb151f5dfa24435807b6879b, orig_tan_ashford_bold, Georgia, serif;
  font-size: 32px;
  font-weight: 400;
}

.sg-empty p {
  margin: 12px 0 0;
  color: var(--sg-muted);
}

.sg-load-wrap {
  display: grid;
  justify-items: center;
  gap: 16px;
  margin-top: 48px;
}

.sg-load {
  min-width: 180px;
  min-height: 52px;
  padding: 13px 24px;
  border: 0;
  border-radius: 999px;
  background: var(--sg-terra);
  color: #fff;
  font: inherit;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: background .2s ease, transform .2s ease;
}

.sg-load:hover {
  background: var(--sg-terra-dark);
  transform: translateY(-1px);
}

.sg-load[hidden] {
  display: none;
}

.sg-sentinel {
  width: 1px;
  height: 1px;
}

.sg-lightbox[hidden] {
  display: none;
}

.sg-lightbox {
  position: fixed;
  z-index: 100000;
  inset: 0;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  padding: 18px;
  background: rgba(20, 30, 17, .96);
  color: var(--sg-cream);
}

.sg-lb-top,
.sg-lb-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  width: min(1200px, 100%);
  margin: 0 auto;
}

.sg-lb-top {
  padding-bottom: 14px;
}

.sg-lb-bottom {
  padding-top: 14px;
}

.sg-lb-close,
.sg-lb-nav,
.sg-download,
.sg-lb-open {
  border: 0;
  color: inherit;
  font: inherit;
  cursor: pointer;
}

.sg-lb-close,
.sg-lb-nav {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: rgba(254, 250, 239, .1);
}

.sg-lb-close:hover,
.sg-lb-nav:hover {
  background: rgba(254, 250, 239, .2);
}

.sg-lb-close svg,
.sg-lb-nav svg {
  width: 23px;
}

.sg-lb-position {
  color: rgba(254, 250, 239, .7);
  font-size: 13px;
}

.sg-lb-stage {
  position: relative;
  display: grid;
  min-height: 0;
  overflow: hidden;
  place-items: center;
}

.sg-lb-stage img {
  max-width: min(calc(100vw - 100px), 1180px);
  max-height: calc(100vh - 170px);
  max-height: calc(100dvh - 170px);
  border-radius: 10px;
  box-shadow: 0 20px 70px rgba(0, 0, 0, .35);
  object-fit: contain;
}

.sg-lb-prev,
.sg-lb-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
}

.sg-lb-prev { left: 4px; }
.sg-lb-next { right: 4px; }

.sg-lb-caption {
  overflow: hidden;
  margin: 0;
  font-size: 13px;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sg-lb-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.sg-download,
.sg-lb-open {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 42px;
  padding: 10px 17px;
  border-radius: 999px;
  background: var(--sg-terra);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  text-decoration: none;
}

.sg-lb-open {
  background: rgba(254, 250, 239, .1);
}

.sg-download svg,
.sg-lb-open svg {
  width: 16px;
}

.sg-download[aria-busy="true"] {
  opacity: .65;
  cursor: wait;
}

@media (max-width: 1000px) {
  .sg-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .sg-toolbar { grid-template-columns: 1fr auto; }
}

@media (max-width: 750px) {
  .sg-hero {
    min-height: 500px;
    padding: 150px 24px 72px;
  }
  .sg-back { margin-bottom: 30px; }
  .sg-gallery-section { padding: 40px 20px 72px; }
  .sg-toolbar {
    position: static;
    grid-template-columns: 1fr;
    gap: 15px;
    margin-bottom: 30px;
    border-radius: 20px;
  }
  .sg-toolbar-copy { justify-self: start; text-align: left; }
  .sg-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .sg-card { border-radius: 13px; }
  .sg-card-copy { right: 11px; bottom: 10px; left: 11px; }
  .sg-card-icon { width: 27px; height: 27px; }
  .sg-lightbox { padding: 12px; }
  .sg-lb-open { display: none; }
}

@media (max-width: 480px) {
  .sg-title { font-size: 48px; }
  .sg-intro { font-size: 15px; }
  .sg-hero-meta { align-items: flex-start; flex-direction: column; gap: 8px; }
  .sg-hero-meta span + span::before { display: none; }
  .sg-grid { grid-template-columns: 1fr; gap: 16px; }
  .sg-card { border-radius: 16px; }
  .sg-lb-bottom { align-items: flex-start; flex-direction: column; }
  .sg-lb-actions { width: 100%; }
  .sg-download { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  .sg-card img,
  .sg-back svg,
  .sg-load { transition: none; }
}
