:root {
  color-scheme: light;
  --paper: #f5f2ec;
  --ink: #171513;
  --gutter: clamp(1rem, 5vw, 4.5rem);
  --content-width: 90rem;
  --bezel: clamp(4px, .75vw, 12px);
  --bezel-radius: clamp(.45rem, 1vw, .8rem);
  --scrollbar-track: #101010;
  --scrollbar-thumb: #b6aa9e;
  scrollbar-color: var(--scrollbar-thumb) var(--scrollbar-track);
  font-family: "DM Sans", Arial, sans-serif;
  color: var(--ink);
}

* {
  box-sizing: border-box;
}

.sections,
footer,
.masthead,
.nav-row {
  max-width: var(--content-width);
  margin: 0 auto;
  padding-inline: var(--gutter);
}

html {
  padding: var(--bezel);
  background: var(--scrollbar-track);
}

@supports not (scrollbar-color: auto) {
  ::-webkit-scrollbar {
    background: var(--scrollbar-track);
  }

  ::-webkit-scrollbar-thumb {
    background: var(--scrollbar-thumb);
    border: 3px solid var(--scrollbar-track);
    border-radius: 1rem;
  }

  ::-webkit-scrollbar-corner {
    background: var(--scrollbar-track);
  }
}

html::after {
  content: "";
  position: fixed;
  inset: var(--bezel);
  z-index: 3;
  border-radius: var(--bezel-radius);
  box-shadow: 0 0 0 100vmax #101010;
  pointer-events: none;
}

body::after {
  content: "";
  position: fixed;
  inset: var(--bezel);
  z-index: 2;
  border-radius: var(--bezel-radius);
  background: url("assets/paper-grain.svg") repeat;
  opacity: .09;
  pointer-events: none;
}

body {
  min-height: calc(100svh - 2 * var(--bezel));
  margin: 0;
  border-radius: var(--bezel-radius);
  background: #d65338;
}

main {
  position: relative;
  isolation: isolate;
}

main::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: .085;
  filter: blur(clamp(5px, .85vw, 12px));
  clip-path: inset(0);
  background:
    url("assets/art-023.webp") right -5rem top -4rem / clamp(16rem, 47vw, 44rem) auto no-repeat,
    url("assets/art-011.webp") left -6rem bottom -5rem / clamp(14rem, 38vw, 34rem) auto no-repeat;
}

@media (prefers-reduced-motion: no-preference) {
  main::before {
    background-position:
      right -5rem top calc(-4rem + var(--art-drift-slow, 0px)),
      left -6rem bottom calc(-5rem - var(--art-drift-fast, 0px));
  }
}

a {
  color: inherit;
}

img {
  display: block;
}

.site-header {
  container-type: inline-size;
  --expanded-nav-height: calc(clamp(3rem, 7vw, 5rem) + .8rem);
  border-radius: var(--bezel-radius) var(--bezel-radius) 0 0;
  background: var(--paper);
  color: var(--ink);
}

.nav-row {
  position: relative;
}

.nav-slot {
  min-height: var(--expanded-nav-height);
}

.site-header--compact .masthead {
  display: none;
}

.site-header--compact .nav-slot {
  min-height: 3.05rem;
}

main:focus {
  outline: none;
}

.nav-brand {
  display: none;
}

.nav-row.is-fixed,
.site-header--compact .nav-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .25rem;
  background: var(--paper);
}

.nav-row.is-fixed {
  position: fixed;
  inset: var(--bezel) var(--bezel) auto;
  z-index: 2;
  max-width: none;
  border-radius: var(--bezel-radius) var(--bezel-radius) 0 0;
  padding-inline: max(var(--gutter), calc((100% - var(--content-width)) / 2 + var(--gutter)));
}

.nav-row.is-fixed .nav-brand,
.site-header--compact .nav-brand {
  display: block;
  flex: 0 0 auto;
}

.nav-brand img {
  transform-origin: top left;
  width: clamp(5.75rem, 15vw, 6.5rem);
  height: auto;
}

.nav-row.is-fixed nav,
.site-header--compact nav {
  grid-template-columns: repeat(5, auto);
  padding-block: .15rem;
}

.nav-row.is-fixed nav a,
.site-header--compact nav a {
  min-height: 2.75rem;
  padding-inline: clamp(.3rem, 1.6vw, 1rem);
  font-size: clamp(.8rem, 2vw, 1rem);
}

@media (max-width: 24rem) {
  .nav-row.is-fixed nav a,
  .site-header--compact nav a {
    padding-inline: .3rem;
  }
}

nav a[aria-current] {
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: .2em;
}

.announcement {
  border-radius: inherit;
  display: flex;
  background: var(--ink);
  color: var(--paper);
  font-size: .875rem;
  text-transform: uppercase;
}

.announcement-window {
  flex: 1;
  min-width: 0;
  margin-inline-start: var(--gutter);
  overflow: hidden;
}

.announcement-track {
  display: flex;
  width: max-content;
  margin: 0;
}

.announcement-track span {
  min-width: 100vw;
  padding: .55rem 1rem .55rem 0;
  white-space: nowrap;
}

.announcement.is-moving .announcement-track {
  animation: announcement-scroll 16s linear infinite;
}

.announcement.is-paused .announcement-track {
  animation-play-state: paused;
}

.announcement:not(.is-moving) .announcement-track {
  width: auto;
}

.announcement:not(.is-moving) .announcement-track span {
  min-width: 0;
  white-space: normal;
}

.announcement:not(.is-moving) .announcement-track span[aria-hidden] {
  display: none;
}

.announcement-toggle {
  padding-inline: 1.1rem var(--gutter);
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  cursor: pointer;
}

@keyframes announcement-scroll {
  to { transform: translateX(-50%); }
}

.masthead > a {
  position: relative;
  display: inline-block;
}

.masthead {
  position: relative;
  padding-top: clamp(.6rem, 1.5vw, 1.25rem);
}

.masthead::before {
  --banner-overhang: max(0px, (100cqw - var(--content-width)) / 2);
  content: "";
  position: absolute;
  inset: 0 calc(-1 * var(--banner-overhang)) calc(-1 * var(--expanded-nav-height)) auto;
  width: calc(min(53%, 48rem) + var(--banner-overhang));
  background: url("assets/bhero1.webp") left 42% / 122% auto no-repeat;
  filter: blur(clamp(2px, .35vw, 6px));
  opacity: .25;
  mask-image: linear-gradient(to right, transparent, #000 clamp(1rem, 4vw, 3.5rem));
  clip-path: inset(0);
  pointer-events: none;
}

.masthead img {
  transform-origin: top left;
  width: min(64vw, 40rem);
  max-width: 100%;
  height: auto;
}

.site-header:has(.nav-row.is-fixed) .masthead img {
  visibility: hidden;
}

nav {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  padding-block: .4rem;
}

nav a {
  display: grid;
  place-items: center;
  min-height: clamp(3rem, 7vw, 5rem);
  font-size: clamp(1rem, 3.2vw, 2rem);
  text-decoration: none;
}

nav a:first-child { --tilt: -8deg; font-weight: 700; }
nav a:nth-child(2) { --tilt: 11deg; }
nav a:nth-child(3) { --tilt: 8deg; }
nav a:nth-child(4) { --tilt: -12deg; }
.bag-link { --tilt: 0deg; white-space: nowrap; }

nav a span {
  transform: translate(var(--x, 0px), var(--y, 0px))
    rotate(calc(var(--tilt) + var(--angle, 0rad)));
  pointer-events: none;
}

nav a:hover,
nav a:focus-visible {
  color: #a02b18;
}

nav a:focus-visible,
.announcement-toggle:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: -3px;
}

.sections {
  display: grid;
  gap: clamp(1.25rem, 3vw, 2.5rem);
  padding-block: clamp(.8rem, 2vw, 1.6rem);
}

.section-heading h1,
.sections > section > h1,
.sections > section > h2 {
  margin: 0 0 .65rem;
  font-size: clamp(1.75rem, 4vw, 3rem);
  line-height: 1.1;
  letter-spacing: -.04em;
}
.product-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(.55rem, 1.4vw, 1.25rem);
}

.product-image {
  aspect-ratio: 5 / 4;
  margin-bottom: .45rem;
}

img.product-image {
  width: 100%;
  height: auto;
  object-fit: contain;
}

.game-listing a {
  text-decoration: none;
}

.game-listing a:hover h2 {
  text-decoration: underline;
}

.wallmaster {
  background: var(--ink);
  color: var(--paper);
}

.game-hero {
  display: grid;
  grid-template-columns: 2fr 3fr;
  align-items: center;
  gap: clamp(1rem, 4vw, 3rem);
}

.game-hero h1 {
  font-size: clamp(2.65rem, 7vw, 7rem);
  letter-spacing: -.07em;
  line-height: .95;
  margin: .35em 0 .2em;
}

.game-rules-link {
  display: inline-block;
  margin-top: .9rem;
  text-underline-offset: .2em;
}

.game-cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: center;
  padding: clamp(1.5rem, 4vw, 4rem) 5%;
  background: #d65338;
  perspective: 650px;
}

:is(.game-cards, .rules-example) img {
  width: 100%;
  filter: drop-shadow(0 .55rem .5rem rgb(0 0 0 / .28)); /* taste-skill-ignore: floating cards */
  transform: translate(var(--card-x, 0px), var(--card-y, 0px))
    rotateX(var(--card-pitch, 0deg)) rotateY(var(--card-yaw, 0deg)) rotateZ(var(--card-roll, 0deg));
}

.game-cards img:first-child { --card-roll: -11deg; }
.game-cards img:last-child { --card-roll: 11deg; }

.game-availability {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 14rem), 1fr));
  gap: 1rem;
  margin: 0;
}

.wallmaster h3 {
  margin: 0 0 .35rem;
}

.game-availability > div {
  padding: .85rem;
  background: rgb(245 242 236 / .09);
}

.rules-guide {
  display: grid;
  gap: clamp(1rem, 2vw, 1.5rem);
}

.rules-heading {
  padding-block-end: .8rem;
}

.rules-heading h2 {
  margin: 0 0 .25rem;
  font-size: clamp(1.85rem, 5vw, 3rem);
}

.rules-heading p,
.rules-guide figcaption {
  color: #d4c9ba;
}

.rules-guide > section {
  max-width: 49rem;
}

.rules-guide > .rules-with-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(12rem, .65fr);
  align-items: start;
  gap: clamp(1.25rem, 3vw, 3rem);
  max-width: none;
}
.rules-guide h3 {
  font-size: clamp(1.2rem, 2vw, 1.6rem);
}

.rules-guide .rules-subheading {
  margin-top: 1.15rem;
}

.rules-guide p {
  max-width: 58ch;
}

.rules-guide :is(ol, ul) {
  display: grid;
  gap: .4rem;
  margin: .55rem 0 0;
  padding-inline-start: 1.25rem;
  line-height: 1.45;
}

.rules-guide figure {
  margin: .8rem 0 0;
}

.rules-lanes {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 3.25rem));
  gap: .3rem;
  margin-bottom: .5rem;
}

.rules-lanes--protection {
  grid-template-columns: repeat(4, minmax(0, 3.25rem));
}

.rules-lanes span {
  display: grid;
  place-items: center;
  aspect-ratio: 5 / 7;
  background: #292623;
  font-weight: 700;
}

.rules-lanes .wall-tile {
  background: #423a33;
}

.rules-lanes .commander-tile {
  background: #54493d;
  color: var(--paper);
}

.rules-lanes .exposed-tile {
  border: 2px dashed #ed8069;
  background: #6f3024;
}

.rules-guide .rules-example {
  perspective: 650px;
  width: min(100%, 16rem);
  margin: .35rem auto;
}

.rules-example a {
  display: block;
}

.rules-example img {
  --card-roll: 7deg;
  width: 100%;
  pointer-events: none;
}

.rules-guide figcaption {
  font-size: .9rem;
  line-height: 1.45;
}

@media (max-width: 48rem) {
  .game-hero,
  .rules-guide > .rules-with-card {
    grid-template-columns: 1fr;
  }

  .rules-guide .rules-example {
    width: min(72%, 14rem);
  }
}

.section-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: .35rem 1rem;
}

.section-heading h1 {
  margin: 0;
}

.section-heading {
  margin-bottom: .65rem;
}

.zine-panel-copy {
  display: grid;
  justify-items: start;
  gap: .55rem;
}

.zine-panel-copy :is(h1, h2) {
  margin: 0;
  font-size: clamp(1.8rem, 4vw, 4rem);
  line-height: 1;
  letter-spacing: -.045em;
}

.zine-panel-copy .feature-link {
  margin-top: .45rem;
}

.storefront .sections {
  gap: clamp(1.5rem, 3.5vw, 3.25rem);
}

.featured-game {
  display: grid;
  grid-template-columns: minmax(0, 4fr) minmax(0, 6fr);
  align-items: center;
  gap: clamp(1rem, 3vw, 3rem);
}

.featured-game h1 {
  margin: 0 0 .65rem;
  font-size: clamp(2.4rem, 6vw, 6.5rem);
  line-height: .94;
  letter-spacing: -.06em;
}

.featured-game p {
  font-size: clamp(1.125rem, 1.5vw, 1.35rem);
}

.feature-link {
  display: inline-flex;
  align-items: center;
  gap: 1rem;
  min-height: 44px;
  margin-top: 1rem;
  font-weight: 700;
  text-underline-offset: .2em;
}

.feature-link:hover {
  text-decoration-thickness: 2px;
}

.featured-game-art {
  display: block;
  padding: .6rem;
}

.featured-game-art img {
  width: 100%;
  height: auto;
  max-height: 21rem;
  object-fit: contain;
  transition: transform 250ms ease;
}

@media (prefers-reduced-motion: no-preference) {
  :is(.feature-link, .game-rules-link, .announcement-toggle, .rules-example a) {
    transition: scale 230ms cubic-bezier(.2, .8, .3, 1.35);
  }

  :is(.feature-link, .game-rules-link, .announcement-toggle, .rules-example a):active {
    scale: .96;
    transition-duration: 70ms;
  }

  .featured-game-art:active img {
    scale: .97;
  }

  .storefront :is(.featured-game-copy > *, .featured-game-art, .section-heading > *, .product-grid article) {
    animation: print-in 420ms ease-out backwards;
  }

  .storefront :is(.featured-game-copy > :nth-child(2), .section-heading > :nth-child(2), .product-grid article:nth-child(2)) {
    animation-delay: 70ms;
  }

  .storefront :is(.featured-game-copy > :nth-child(3), .featured-game-art, .product-grid article:nth-child(3)) {
    animation-delay: 140ms;
  }
}

@keyframes print-in {
  from {
    transform: translateY(16px);
    opacity: 0;
  }
}

.featured-game-art:is(:hover, :focus-visible) img {
  transform: rotate(-2deg);
}

.storefront .product-grid h3 {
  margin: .4rem 0 .15rem;
  font-size: clamp(1rem, 2vw, 1.35rem);
}

.storefront .product-grid {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 13rem), 1fr));
}

@media (max-width: 40rem) {
  .storefront .product-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 40rem) {
  .featured-game {
    grid-template-columns: 1fr;
  }
}

.product-grid h2 {
  margin: 0 0 .2rem;
  font-size: clamp(1rem, 2vw, 1.35rem);
}

.product-grid article > a {
  display: block;
  text-decoration: none;
}

.product-grid article > a:is(:hover, :focus-visible) :is(h2, h3) {
  text-decoration: underline;
  text-underline-offset: .16em;
}

.product-detail {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 3fr);
  align-items: start;
  gap: clamp(1rem, 4vw, 4rem);
}

.product-details-copy h1 {
  margin: 0 0 .65rem;
  font-size: clamp(2rem, 5vw, 5rem);
  line-height: .98;
  letter-spacing: -.055em;
}

.product-details-copy :is(.product-status, .product-colors) {
  margin-top: 1rem;
}

.product-colors {
  display: flex;
  flex-wrap: wrap;
  gap: .4rem .85rem;
}

.product-colors a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  text-underline-offset: .2em;
}

.product-colors a[aria-current] {
  font-weight: 700;
  text-decoration-thickness: 2px;
}

.preview-price span {
  font-size: .875rem;
}

.product-details-copy .preview-price {
  margin-top: .75rem;
}

.product-details-copy .preview-price strong {
  font-size: 1.5rem;
}

.product-availability,
.product-specs {
  margin-top: 1rem;
  padding: .85rem 1rem;
  background: rgb(23 21 19 / .09);
}

.product-specs summary {
  cursor: pointer;
  font-weight: 700;
}

.product-specs[open] summary {
  margin-bottom: .6rem;
}

.shop-controls:not([hidden]) {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .5rem .85rem;
  margin-bottom: 1rem;
}

.shop-controls select {
  min-height: 44px;
  padding-inline: .55rem;
  background: var(--paper);
  color: var(--ink);
  font: inherit;
}

.product-detail-gallery figure:not([hidden]):has(img) {
  min-width: 0;
}

.product-detail:has(.product-colors [aria-current]) .product-detail-gallery figure {
  grid-column: 1 / -1;
}

.product-detail-gallery {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .8rem;
}

.product-detail-gallery figure {
  margin: 0;
  scroll-margin-top: 4rem;
}

.product-detail-gallery figure:first-child {
  grid-column: 1 / -1;
}

.product-detail-gallery img {
  width: 100%;
  aspect-ratio: 5 / 4;
  object-fit: contain;
}

.product-detail-gallery figcaption {
  margin-top: .25rem;
}

.checkout-preview {
  display: grid;
  justify-items: start;
  gap: .85rem;
  margin-top: 1rem;
}

.checkout-preview label {
  display: flex;
  align-items: center;
  gap: .6rem;
}

.checkout-preview input {
  width: 4rem;
}

.store-back a,
.store-buy > a {
  text-underline-offset: .2em;
}

.store-price {
  font-weight: 700;
  font-size: 1.4rem;
}

.store-buy {
  display: grid;
  justify-items: start;
  gap: .8rem;
  margin-top: 1.25rem;
}

.store-buy label {
  display: grid;
  gap: .35rem;
  font-weight: 700;
}

.store-buy select,
.bag-line select {
  max-width: 100%;
  min-height: 44px;
  padding: .35rem .55rem;
  background: var(--paper);
  color: var(--ink);
  border: 0;
  font: inherit;
}

.store-button {
  min-height: 44px;
  padding: .55rem 1rem;
  border: 0;
  background: var(--ink);
  color: var(--paper);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.store-button:hover {
  background: #322b26;
}

.store-button:disabled {
  opacity: .65;
  cursor: wait;
}

.store-product-art {
  width: 100%;
  max-height: 34rem;
  object-fit: contain;
}

.bag-layout {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(15rem, 1fr);
  align-items: start;
  gap: clamp(1rem, 4vw, 3rem);
}

.bag-lines {
  display: grid;
  gap: 1rem;
}

.bag-line {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: .25rem .75rem;
  padding: .65rem;
  background: rgb(23 21 19 / .08);
}

.bag-line img {
  grid-row: span 2;
  width: clamp(3rem, 9vw, 7rem);
  aspect-ratio: 1;
  object-fit: contain;
}

.bag-line a {
  font-weight: 700;
}

.bag-line-actions {
  grid-column: 2 / -1;
  display: flex;
  gap: .6rem;
  align-items: center;
}

.bag-remove {
  min-height: 44px;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  text-decoration: underline;
  cursor: pointer;
}

.bag-summary {
  display: grid;
  justify-items: start;
  gap: .7rem;
  padding: clamp(1rem, 2vw, 1.5rem);
  background: var(--ink);
  color: var(--paper);
}

.bag-summary h2 {
  margin: 0;
}

.product-grid[hidden] {
  display: none;
}

.store-skeleton-block {
  display: grid;
  align-content: start;
  gap: .6rem;
}

.store-skeleton-block > div {
  min-height: .85rem;
  background: rgb(23 21 19 / .15);
}

.store-skeleton .skeleton-image { aspect-ratio: 5 / 4; }
.store-skeleton .skeleton-line { width: 68%; }
.store-skeleton .skeleton-short { width: 34%; }
.store-skeleton .skeleton-title { width: 80%; min-height: 2.3rem; }
.store-skeleton .skeleton-button { width: min(100%, 10rem); min-height: 44px; }
.store-skeleton .skeleton-row { min-height: 5.5rem; }

@media (prefers-reduced-motion: no-preference) {
  .store-skeleton-block {
    animation: skeleton-pulse 1.4s ease-in-out infinite alternate;
  }
}

@keyframes skeleton-pulse {
  from { opacity: .52; }
  to { opacity: 1; }
}

.bag-summary .store-button {
  background: var(--paper);
  color: var(--ink);
}

.bag-summary .store-button:hover {
  background: #e4dbd0;
}

#bag-view [role="status"]:not(:empty) {
  margin-bottom: .85rem;
}

@media (max-width: 42rem) {
  .bag-layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 24rem) {
  .nav-row.is-fixed,
  .site-header--compact .nav-row {
    gap: 0;
  }

  .nav-row.is-fixed nav a,
  .site-header--compact nav a {
    padding-inline: .22rem;
    font-size: .75rem;
  }
}

.checkout-preview :is(input, button) {
  min-height: 44px;
  font: inherit;
}

@media (max-width: 42rem) {
  .product-detail {
    grid-template-columns: 1fr;
  }
}

.sections p {
  max-width: 32ch;
  margin: 0;
  line-height: 1.5;
}

footer {
  padding-block: 1.25rem;
  font-size: .875rem;
}

@media (max-width: 42rem) {
  .product-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (prefers-reduced-motion: reduce) {
  .featured-game-art img {
    transition: none;
  }

  .featured-game-art:is(:hover, :focus-visible) img {
    transform: none;
  }
  nav a span {
    transform: rotate(var(--tilt));
  }
}
