@font-face {
  font-family: Pet Display;
  src: url("/assets/dx-burst-smooth.otf") format("opentype");
  font-display: swap;
}

@font-face {
  font-family: Pet Mono;
  src: url("/assets/home-video-regular.ttf") format("truetype");
  font-display: swap;
}

@font-face {
  font-family: Home Video;
  src: url("/assets/home-video-regular.ttf") format("truetype");
  font-display: swap;
}

.codexpets {
  --pet-ink: #eeeae1;
  --pet-muted: #b2ada4;
  --pet-line: #373531;
  --pet-orange: #ff6449;
  --pet-mono: "Pet Mono", ui-monospace, monospace;
  margin: 0;
  color: var(--pet-ink);
  background: #080808;
  font-family: Arial, sans-serif;
  color-scheme: dark;
}

.codexpets *,
.codexpets *::before,
.codexpets *::after {
  box-sizing: border-box;
}

.codexpets a {
  color: inherit;
}

.codexpets :focus-visible {
  outline: 2px solid var(--pet-orange);
  outline-offset: 4px;
}

.codexpets [hidden] {
  display: none;
}

.pets-skip {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 1;
  padding: 12px;
  background: #080808;
  transform: translateY(-180%);
}

.pets-skip:focus {
  transform: none;
}

.pets-shell {
  max-width: 1500px;
  margin: 0 auto;
  padding: 0 clamp(16px, 4vw, 62px) 56px;
}

.pets-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  min-height: 72px;
  border-bottom: 1px solid var(--pet-line);
  font: 12px var(--pet-mono);
  letter-spacing: .1em;
  text-transform: uppercase;
}

.pets-brand {
  display: inline-flex;
  gap: 12px;
  align-items: center;
  min-height: 44px;
  text-decoration: none;
}

.pets-brand span,
.pets-intro h1 span {
  color: var(--pet-orange);
}

.pets-header-label {
  color: var(--pet-muted);
  text-align: right;
}

.pets-intro {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(240px, min(42%, 460px));
  align-items: center;
  gap: clamp(20px, 4vw, 60px);
  padding: clamp(24px, 4vw, 44px) 0;
  border-bottom: 1px solid var(--pet-line);
}

.pets-kicker,
.pets-count {
  margin: 0;
  color: var(--pet-muted);
  font: 11px var(--pet-mono);
  letter-spacing: .12em;
  text-transform: uppercase;
}

.pets-kicker span {
  display: inline-block;
  width: 2px;
  height: 13px;
  margin-right: 8px;
  vertical-align: middle;
  background: var(--pet-orange);
}

.pets-intro h1 {
  margin: 9px 0 0;
  font: 700 clamp(52px, 9vw, 136px)/.92 "Pet Display", Arial, sans-serif;
  letter-spacing: -.055em;
}

.pets-intro-copy {
  max-width: 43ch;
  margin: 18px 0 0;
  color: var(--pet-muted);
  font: 18px/1.5 Georgia, serif;
}

.pets-showreel {
  min-width: 0;
  width: min(100%, 460px);
  margin: 0;
  border: 1px solid var(--pet-line);
  background: #121211;
}

.pets-showreel img {
  display: block;
  width: 100%;
  height: auto;
}

.pets-showreel-caption {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  padding: 4px 8px 4px 12px;
  border-top: 1px solid var(--pet-line);
  color: var(--pet-muted);
  font: 11px var(--pet-mono);
  letter-spacing: .04em;
  text-transform: uppercase;
}

.pets-showreel-toggle {
  min-height: 44px;
  padding: 4px 8px;
  border: 1px solid var(--pet-line);
  color: var(--pet-ink);
  background: #1d1b18;
  font: inherit;
  cursor: pointer;
}

.pets-showreel-toggle:hover {
  border-color: var(--pet-orange);
}

.pets-collection {
  padding-top: 24px;
  scroll-margin-top: 14px;
}

.pets-section-heading {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 16px;
}

.pets-section-heading h2 {
  margin: 0;
  font: 400 clamp(23px, 3vw, 34px)/1.15 Georgia, serif;
}

.pets-status {
  color: var(--pet-muted);
}

.pets-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 224px), 1fr));
  gap: 18px;
  list-style: none;
  padding: 0;
  margin: 0;
}

.pet-card {
  --pet-stage: #e9e2d4;
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding: 8px;
  background: #121211;
  border: 1px solid var(--pet-line);
}

.pet-card:nth-child(4n + 2) { --pet-stage: #ddd9ce; }
.pet-card:nth-child(4n + 3) { --pet-stage: #e5d9cc; }
.pet-card:nth-child(4n + 4) { --pet-stage: #d9dfd9; }

.pet-card:hover,
.pet-card:focus-within {
  border-color: #827568;
}

.pet-preview {
  display: grid;
  grid-template: minmax(0, 1fr) / minmax(0, 1fr);
  justify-items: center;
  align-items: center;
  position: relative;
  isolation: isolate;
  min-width: 0;
  width: 100%;
  min-height: 0;
  aspect-ratio: 1.06;
  overflow: hidden;
  padding: 4px 10px 29px;
  border: 0;
  color: #24211e;
  background:
    radial-gradient(circle, #3d383328 .75px, transparent 1px) 2px 2px / 13px 13px,
    var(--pet-stage);
  font: inherit;
  cursor: pointer;
}

.pet-still,
.pet-animation {
  display: block;
  grid-area: 1 / 1;
  width: min(100%, 192px);
  height: auto;
  max-height: 100%;
  object-fit: contain;
  pointer-events: none;
}

.pet-preview .pet-animation {
  display: none;
}

.pet-preview[data-animated="true"] .pet-animation {
  display: block;
}

.pet-preview[data-animated="true"] .pet-still {
  visibility: hidden;
}

.pet-preview-label {
  display: flex;
  align-items: center;
  gap: 4px;
  position: absolute;
  bottom: 7px;
  left: 7px;
  padding: 3px 6px 3px 4px;
  color: #f6f1e8;
  background: #24211e;
  font: 10px var(--pet-mono);
  letter-spacing: .03em;
}

.pet-preview-label svg {
  width: 14px;
  height: 14px;
}

.pet-preview .pet-pause-icon,
.pet-preview[aria-pressed="true"] .pet-play-icon {
  display: none;
}

.pet-preview[aria-pressed="true"] .pet-pause-icon {
  display: block;
}

.pet-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 12px 4px 4px;
}

.pet-name-row,
.pet-download {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}

.pet-name {
  margin: 0;
  font: 400 22px/1.1 Georgia, serif;
  overflow-wrap: anywhere;
}

.pet-number {
  color: var(--pet-muted);
  font: 10px var(--pet-mono);
}

.pet-description {
  margin: 0 0 4px;
  color: var(--pet-muted);
  font-size: 13px;
  line-height: 1.42;
}

.pet-motion {
  display: grid;
  gap: 4px;
  min-width: 0;
  margin-top: auto;
  color: var(--pet-muted);
  font: 10px var(--pet-mono);
  letter-spacing: .04em;
  text-transform: uppercase;
}

.pet-motion-select {
  width: 100%;
  min-width: 0;
  min-height: 44px;
  padding: 7px;
  border: 1px solid #665e52;
  border-radius: 0;
  color: var(--pet-ink);
  background: #1d1b18;
  font: 14px Arial, sans-serif;
}

.pet-price {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 8px;
  margin: 0;
  color: var(--pet-muted);
  font-size: 13px;
  line-height: 1.3;
}

.pet-price-label {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.pet-price strong {
  color: var(--pet-orange);
  font-size: 15px;
}

.codexpets .pet-download {
  min-height: 44px;
  padding: 8px 10px;
  background: #e9e2d4;
  color: #151413;
  text-decoration: none;
  font: 11px var(--pet-mono);
  letter-spacing: .02em;
}

.codexpets .pet-download:hover,
.codexpets .pet-download:focus-visible {
  background: var(--pet-orange);
}

.pet-download svg {
  width: 19px;
  height: 19px;
  flex-shrink: 0;
}

.pet-filetype {
  opacity: .72;
}

@media (max-width: 680px) {
  .pets-intro {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .pets-intro-copy {
    max-width: 36ch;
  }

  .pets-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  .pet-card {
    padding: 6px;
  }

  .pet-description {
    font-size: 12px;
  }

  .pet-preview {
    aspect-ratio: 1;
    padding: 4px 6px 27px;
  }

  .pet-info {
    padding: 9px 2px 2px;
  }
}

@media (max-width: 350px) {
  .pet-filetype {
    display: none;
  }
}
