:root { --wambion-content-width: clamp(1050px, 86vw, 1440px); }

.wvg {
  --ink: #fff1d2;
  --muted: #f6dfbb;
  --metal: #ffba75;
  --line: #a46436;
  --control-line: #a17a57;
  --black: #0a0908;
  color: var(--ink);
  font: 1rem/1.5 Georgia, 'Times New Roman', serif;
}
.wvg, .wvg *, .wvg *::before, .wvg *::after { box-sizing: border-box; }
.wvg [hidden] { display: none !important; }
.wvg a { color: var(--metal); }
.wvg button { font: inherit; color: inherit; cursor: pointer; }
.wvg :focus-visible { outline: 3px solid #ffcc8f; outline-offset: 4px; }
.wvg-header { padding: clamp(1.1rem, 4vw, 2.8rem) .65rem 1.35rem; text-align: center; }
.wvg-brand { display: block; color: var(--metal); font: 700 .8rem/1.4 Georgia, serif; letter-spacing: .35em; }
.wvg-heading {
  margin: .35em auto .2em;
  width: fit-content;
  max-width: 100%;
  border: 3px ridge var(--line);
  border-radius: 9px 3px;
  background: linear-gradient(#37241b, #111);
  padding: .24em .54em;
  box-shadow: 0 2px 8px #000;
  text-shadow: 0 2px 4px #000;
  color: var(--ink);
  font: 700 clamp(1.4rem, 5.5vw, 3.55rem)/.98 Georgia, serif;
  overflow-wrap: anywhere;
  text-transform: uppercase;
}
.wvg-header p { margin: .75rem 0 0; color: var(--muted); }
.wvg-filters { display: flex; justify-content: center; gap: .55rem; flex-wrap: wrap; margin: 0 0 1.5rem; }
.wvg button, .wvg-tile {
  min-height: 44px;
  border: 3px ridge var(--control-line);
  border-radius: 7px 2px;
  background: linear-gradient(#392418, #14100d);
  padding: .5em .9em;
  overflow-wrap: anywhere;
}
.wvg button:hover, .wvg button[aria-pressed="true"] { border-color: var(--metal); background: #492e20; }
.wvg-grid { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: clamp(.7rem, 2vw, 1.4rem); align-items: start; }
.wvg-card { margin: 0; min-width: 0; background: radial-gradient(ellipse at top, #372117, var(--black) 75%); border: 3px ridge var(--line); border-radius: 9px 3px; box-shadow: inset 0 0 15px #000, 0 3px 12px #0009; }
.wvg-card:focus-within { border-color: var(--metal); }
.wvg-card:first-child { grid-column: span 2; grid-row: span 2; }
.wvg-shot { display: block; position: relative; }
.wvg-shot img { display: block; width: 100%; height: auto; border-radius: 5px 1px 0 0; }
.wvg-open {
  position: absolute;
  bottom: .65rem;
  right: .65rem;
  background: #151210f2;
  color: var(--ink);
  border: 1px solid var(--control-line);
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  font-size: 1.3rem;
  transition: background .2s;
}
.wvg-shot:hover .wvg-open { background: #543522; }
.wvg-card figcaption { padding: .6rem .65rem; border-top: 2px ridge var(--line); overflow-wrap: anywhere; }
.wvg-category { display: block; color: var(--metal); font-size: .75rem; }
.wvg-dialog {
  color: var(--ink);
  background: #151210;
  border: 4px ridge var(--line);
  border-radius: 12px 4px;
  box-shadow: 0 0 28px #000;
  padding: .8rem;
  width: min(96vw, 70rem);
  max-height: 96dvh;
  overflow: auto;
}
.wvg-dialog::backdrop { background: #080605ed; }
.wvg-dialog-head, .wvg-dialog-nav { display: flex; justify-content: space-between; align-items: center; gap: .6rem; }
.wvg-dialog h2 { color: inherit; font: 700 clamp(1rem, 3vw, 1.5rem)/1.2 Georgia, serif; margin: 0; min-width: 0; overflow-wrap: anywhere; }
.wvg-dialog button { min-width: 44px; }
.wvg-dialog button:disabled { opacity: .55; cursor: default; }
.wvg-stage { margin: .7rem 0; background: #0d0b0a; touch-action: pan-y pinch-zoom; }
.wvg-stage img { display: block; width: 100%; height: auto; max-height: 70dvh; object-fit: contain; }
.wvg-tile { display: block; padding: 1rem 1.2rem; text-decoration: none; background: linear-gradient(115deg,#36251b,#171310); }
.wvg-tile strong { display: block; color: var(--ink); }
@media (max-width: 840px) {
  .wvg-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .wvg-card:first-child { grid-row: auto; grid-column: auto; }
}
@media (max-width: 500px) {
  .wvg-grid { gap: .45rem; }
  .wvg-card figcaption { padding: .45rem; font-size: .9rem; }
  .wvg-open { right: .3rem; bottom: .3rem; }
}
@media (prefers-reduced-motion: reduce) {
  .wvg-open { transition: none; }
}
.wvg-panel {
  width: min(100%, var(--wambion-content-width));
  margin-inline: auto;
  border: clamp(3px, .6vw, 6px) ridge #8b552c;
  border-radius: clamp(10px, 1.8vw, 19px);
  background: radial-gradient(ellipse at 50% 0%, #422518, #0a0908 35%);
  box-shadow: 0 0 0 1px #392217, 0 10px 38px #0009;
  padding: clamp(.45rem, 2vw, 1.35rem);
}
/* Match the independently styled WAMBION content area on the gallery page. */
.wp-site-blocks:has(> main .wvg-panel) > header.wp-block-template-part,
.wp-site-blocks:has(> main .wvg-panel) > footer.wp-block-template-part { display: none; }
.wp-site-blocks main:has(.wvg-panel) { margin-block-start: 0; box-sizing: border-box; background: #0a0908; color: #fff1d2; padding: clamp(.5rem, 2vw, 1.6rem); }
.wp-site-blocks main:has(.wvg-panel) .entry-content { margin-block-start: 0; box-sizing: border-box; width: min(100%, var(--wambion-content-width)); max-width: 100%; margin-inline: auto; padding-inline: 0; }
.wp-site-blocks main:has(.wvg-panel) .entry-content > .wvg-panel { max-width: var(--wambion-content-width); }
.wp-site-blocks main:has(.wvg-panel) > .wp-block-group:has(> .wp-block-post-title:only-child) {
  display: contents;
}
.wp-site-blocks main:has(.wvg-panel) .wp-block-post-title {
  position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap;
}
@media (min-width: 841px) {
  .wvg-card:nth-child(6):nth-last-child(2),
  .wvg-card:nth-child(n+7):last-child { grid-column: span 2; }
}
@media (prefers-reduced-motion: no-preference) {
  .wvg-dialog[open] { animation: wvg-enter .16s ease-out; }
  @keyframes wvg-enter { from { opacity: 0; } to { opacity: 1; } }
}


@media (min-width: 1222px) {
  .wp-site-blocks main .wh:has(.hero):has(.tiles) {
    max-width: var(--wambion-content-width);
  }
}

/* The six home shortcuts keep their existing artwork and framing. */
.wp-site-blocks main .wh:has(.hero) .tiles {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
@media (min-width: 1120px) {
  .wp-site-blocks main .wh:has(.hero) .tiles {
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }
  .wp-site-blocks main .wh:has(.hero) .tiles > a > strong {
    font-size: clamp(.9rem, 1.4vw, 1.25rem);
  }
}
@media (max-width: 650px) {
  .wp-site-blocks main .wh:has(.hero) .tiles {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .wp-site-blocks main .wh:has(.hero) .tiles > a {
    grid-template-columns: minmax(0, 1fr);
    justify-items: center;
    align-content: center;
    text-align: center;
    gap: .25rem;
    min-height: 110px;
    padding: .55rem .4rem;
  }
  .wp-site-blocks main .wh:has(.hero) .tiles > a > b {
    grid-row: auto;
    width: 42px;
  }
  .wp-site-blocks main .wh:has(.hero) .tiles > a > small {
    grid-column: auto;
    max-width: 100%;
    overflow-wrap: anywhere;
  }
}
