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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.55;
  color: var(--text);
  background: var(--bg);
  overflow-x: hidden;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

h1, h2, h3, h4, h5, h6,
.font-display {
  font-family: var(--font-display);
  color: var(--text);
  letter-spacing: -0.02em;
}

a {
  color: var(--brand);
  text-decoration: none;
  transition: color var(--transition);
}

a:hover {
  color: var(--brand-hover);
}

img {
  max-width: 100%;
  height: auto;
}

.text-muted {
  color: var(--muted) !important;
}

.page-content {
  flex: 1 0 auto;
  padding-top: var(--nav-height);
}

.page-content--with-cats {
  padding-top: calc(var(--nav-height) + var(--cat-nav-height));
}

.marketplace-container {
  max-width: var(--container);
}

.scroll-to-top-btn {
  position: fixed;
  right: 1.25rem;
  bottom: 1.25rem;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
  display: grid;
  place-items: center;
  box-shadow: var(--shadow-md);
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px);
  transition: opacity var(--transition), transform var(--transition);
  z-index: 1050;
}

.scroll-to-top-btn.is-visible {
  opacity: 1;
  pointer-events: auto;
  transform: none;
}

.scroll-to-top-btn:hover {
  background: var(--brand);
  border-color: var(--brand);
  color: #fff;
}

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