html,
body {
  min-height: 100%;
}

html {
  scrollbar-gutter: stable;
}

body {
  display: flex;
  min-height: 100vh;
  flex-direction: column;
  margin: 0;
  background: #000;
  color: #fff;
  font-family: "Helvetica Neue", Helvetica, sans-serif;
}

header {
  padding: 2rem 1rem 0;
  text-align: center;
}

header h1 {
  margin: 0;
  font-size: 1rem;
  font-weight: 100;
  letter-spacing: 0.08em;
  text-shadow: 0 0 16px rgb(242 193 78 / 20%);
}

nav {
  display: flex;
  justify-content: center;
  gap: 2rem;
  margin-top: 3.5rem;
  transform: translateY(0.5rem);
}

nav button {
  padding: 0.45rem 0.7rem;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: #aaa;
  font: inherit;
  font-size: 0.875rem;
  font-weight: 300;
  cursor: pointer;
}

nav button[aria-selected="true"] {
  background: transparent;
  color: #fff;
  font-weight: 300;
}

main {
  flex: 1;
}

#texture-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 1rem;
  padding: 2rem 2rem 3rem;
}

.texture-card {
  min-width: 0;
  color: #ccc;
  font-size: 0.75rem;
}

.texture-card img {
  display: block;
  width: 100%;
  aspect-ratio: 1;
  object-fit: contain;
  background: #111;
}

.texture-name {
  overflow-wrap: anywhere;
  color: #aaa;
  font-size: 0.6875rem;
  text-align: center;
}

.texture-metadata {
  margin: -0.5rem 0 0.75rem;
  color: #777;
  font-size: 0.625rem;
  text-align: center;
}

.texture-card a {
  color: #f2c14e;
  text-decoration: none;
}

.texture-card a:hover,
.texture-card a:focus-visible {
  text-decoration: underline;
}

@media (max-width: 520px) {
  nav {
    gap: 1.25rem;
  }

  #texture-gallery {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
    padding: 2rem 1rem;
  }
}

nav button {
  transition: color 160ms ease, border-color 160ms ease, opacity 160ms ease;
}

nav button:hover {
  background: transparent;
  color: #fff;
}

nav button:active {
  opacity: 0.55;
}

nav button:focus-visible,
.texture-card a:focus-visible {
  outline: 1px solid #fff;
  outline-offset: 5px;
}

#texture-gallery {
  animation: gallery-in 240ms ease both;
}

.texture-card {
  overflow: hidden;
  animation: card-in 280ms ease both;
}

.texture-card img {
  transition: transform 220ms ease, background-color 220ms ease;
}

.texture-card:hover img {
  transform: scale(1.025);
  background-color: #181818;
}

.texture-card a {
  display: block;
  text-align: center;
  transition: color 160ms ease, opacity 160ms ease;
}

.texture-card a:hover {
  color: #ffdc73;
}

.texture-card a:active {
  opacity: 0.6;
}

@keyframes gallery-in {
  from { opacity: 0.65; }
  to { opacity: 1; }
}

@keyframes card-in {
  from { opacity: 0; transform: translateY(5px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}


footer {
  padding: 1.5rem 1rem;
  color: #777;
  font-size: 0.75rem;
  font-weight: 300;
  text-align: center;
}



footer a {
  color: inherit;
  text-decoration: none;
  transition: color 160ms ease;
}

footer a:hover,
footer a:focus-visible {
  color: #fff;
}

.site-title {
  color: inherit;
  font-size: 1rem;
  font-weight: 100;
  letter-spacing: 0.08em;
  text-decoration: none;
}

.terms-page {
  width: min(40rem, calc(100% - 2rem));
  margin: 4rem auto;
  color: #ccc;
  line-height: 1.7;
  text-align: center;
}

.terms-page h1 {
  margin: 0 0 2rem;
  color: #fff;
  font-size: 1rem;
  font-weight: 300;
}


.terms-page section + section {
  margin-top: 2rem;
}

.terms-page h2 {
  margin: 0 0 0.5rem;
  color: #aaa;
  font-size: 0.75rem;
  font-weight: 400;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.terms-page p {
  margin: 0;
}

.terms-page section p {
  max-width: 34rem;
  margin-inline: auto;
  text-align: left;
}


header {
  position: relative;
  isolation: isolate;
  overflow: hidden;
}

.header-waves {
  position: absolute;
  z-index: -1;
  top: 0;
  left: 0;
  width: 100%;
  height: 7rem;
  overflow: visible;
  pointer-events: none;
  opacity: 0.62;
  filter: drop-shadow(0 0 8px rgb(242 193 78 / 25%));
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}

.wave-line {
  fill: none;
  stroke: url(#wave-gold);
  stroke-width: 0.8;
  vector-effect: non-scaling-stroke;
  animation: wave-drift 12s ease-in-out infinite alternate;
}

.wave-line-two {
  stroke-width: 0.65;
  animation-duration: 15s;
  animation-delay: -8s;
}

.wave-line-three {
  stroke-width: 0.55;
  animation-duration: 13s;
  animation-delay: -12s;
}

.wave-glow {
  fill: none;
  stroke-width: 1.1;
  stroke-linecap: round;
  vector-effect: non-scaling-stroke;
  opacity: 0;
  filter:
    drop-shadow(0 0 2px rgb(255 218 125 / 100%))
    drop-shadow(0 0 9px rgb(255 177 52 / 86%))
    drop-shadow(0 0 24px rgb(255 139 0 / 50%));
  pointer-events: none;
}

.wave-glow-one {
  stroke: url(#wave-glow-one);
  animation: line-glimmer 24s ease-in-out -5s infinite, wave-drift 12s ease-in-out infinite alternate;
}

.wave-glow-two {
  stroke: url(#wave-glow-two);
  stroke-width: 1px;
  animation: line-glimmer 29s ease-in-out -17s infinite, wave-drift 15s ease-in-out -8s infinite alternate;
}

.wave-glow-three {
  stroke: url(#wave-glow-three);
  stroke-width: 0.9px;
  animation: line-glimmer 26s ease-in-out -10s infinite, wave-drift 13s ease-in-out -12s infinite alternate;
}

@keyframes line-glimmer {
  0%, 68%, 100% { opacity: 0; }
  73% { opacity: 0.08; }
  77% { opacity: 0.95; }
  80% { opacity: 0.72; }
  84% { opacity: 0.12; }
  88% { opacity: 0; }
}

@keyframes wave-drift {
  from { transform: translate3d(-18px, 0, 0); }
  to { transform: translate3d(18px, 5px, 0); }
}


.main-header::after {
  content: "";
  position: absolute;
  z-index: -1;
  top: -55%;
  left: 50%;
  width: min(52rem, 90vw);
  height: 180%;
  transform: translateX(-50%);
  background: radial-gradient(ellipse, rgb(242 193 78 / 12%) 0%, rgb(242 193 78 / 4%) 38%, transparent 72%);
  filter: blur(18px);
  pointer-events: none;
}

@media (prefers-reduced-motion: reduce) {
  .wave-glow {
    animation: none;
    opacity: 0;
  }
}
