* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --universe-purple: #8d7ba8;
  --text-dark-purple: #3b2f4d;
  --accent-deep-purple: #1b0e36;
}

body, html {
  width: 100%;
  min-height: 100%;
  overflow-x: auto;   /* Allows horizontal scroll if viewport is narrower than min width */
  overflow-y: scroll; /* Always show vertical scrollbar to prevent layout shift */
  font-family: system-ui, -apple-system, sans-serif;
  color: var(--text-dark-purple);
  line-height: 1.5;
}

.page-wrapper {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  padding-top: var(--grid-top, 120px);
  padding-bottom: var(--grid-bottom, 24px);
}

/* Vertical stack of grid-snapped sections separated by 2 big pixels + grid lines */
.grid-stack {
  width: var(--shell-width, 1198px);
  margin-left: var(--shell-left, auto);
  display: flex;
  flex-direction: column;
  gap: var(--grid-gap, 14px);
}

/* 1. Navigation bar: grid-snapped height */
.box-nav {
  height: var(--nav-height, 34px);
  display: flex;
  flex-direction: row;
  align-items: stretch;
  justify-content: flex-start;
  gap: var(--btn-gap, 14px);
}

/* Borderless grid-snapped navigation buttons */
.retro-btn {
  width: var(--btn-width, 154px);
  flex: 0 0 var(--btn-width, 154px);
  height: 100%;
  background-color: var(--surface-bg, rgba(232, 232, 232));
  border: none;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-dark-purple);
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.retro-btn:hover,
.retro-btn.active {
  background-color: rgba(255, 255, 255);
  color: var(--universe-purple);
}

/* Push Login button to the far right edge of the grid shell */
.retro-btn-right {
  margin-left: auto;
}

/* 2. Main content surface framed purely by the background grid */
.box-main {
  width: 100%;
  padding: 28px 32px;
  background-color: var(--surface-bg, rgba(232, 232, 232));
  border: none;
  font-size: 16px;
  line-height: 1.6;
}

/* Headings in Universe Purple (#8d7ba8) */
.box-main h1,
.box-main h2,
.box-main h3 {
  color: var(--universe-purple);
  letter-spacing: -0.01em;
}

.box-main h1 {
  font-size: 30px;
  margin-bottom: 16px;
}

.box-main p {
  margin-bottom: 14px;
  max-width: 65ch;
}

.box-main p:last-child {
  margin-bottom: 0;
}

.inline-link {
  color: var(--universe-purple);
  font-weight: 600;
  text-decoration: none;
}

.inline-link:hover {
  color: var(--text-dark-purple);
  text-decoration: underline;
}

/* 3. Standalone footer container matching main surface color */
.box-footer {
  width: 100%;
  padding: 24px 32px 18px;
  background-color: var(--surface-bg, rgba(232, 232, 232));
  border: none;
  display: flex;
  flex-direction: column;
  gap: 20px;
  font-size: 13px;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 24px;
}

.footer-col {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.footer-heading {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-dark-purple);
  padding-bottom: 4px;
  border-bottom: 1px solid rgba(141, 123, 168, 0.35);
}

.footer-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.footer-list a {
  color: var(--universe-purple);
  text-decoration: none;
  font-weight: 600;
  display: inline-block;
  transition: color 0.15s ease;
}

.footer-list a::before {
  content: "(";
  font-weight: 400;
  opacity: 0.65;
}

.footer-list a::after {
  content: ")";
  font-weight: 400;
  opacity: 0.65;
}

.footer-list a:hover {
  color: var(--text-dark-purple);
  text-decoration: underline;
}

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 16px;
  padding-top: 12px;
  border-top: 1px solid rgba(141, 123, 168, 0.25);
  color: var(--universe-purple);
  font-size: 12px;
}

.footer-copy {
  font-weight: 600;
}

.footer-tagline {
  opacity: 0.85;
}

@media (max-width: 900px) {
  .footer-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 540px) {
  .footer-grid {
    grid-template-columns: 1fr;
  }
}


/* 4. Two-column landing page split & 2x2 retro showcase grid */
.home-split {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 32px;
}

.home-intro {
  flex: 1 1 auto;
  min-width: 0;
}

.home-showcase {
  flex: 0 0 auto;
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}

.showcase-card canvas {
  display: block;
  width: 359px;
  height: 299px;
  image-rendering: pixelated;
}

.showcase-card figcaption {
  font-size: 11px;
  font-weight: 600;
  color: var(--universe-purple);
}

@media (max-width: 960px) {
  .home-split {
    flex-direction: column;
  }
}

/* =========================================================
   Artwork Gallery Page (3-Column 1:1 Grid)
   ========================================================= */

/* Pagination controls matching site theme */
.pagination-controls {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 14px;
  margin-top: 24px;
  padding-top: 16px;
  border-top: 1px solid rgba(141, 123, 168, 0.25);
}

.pagination-controls .retro-btn {
  height: 34px;
  width: 130px;
  flex: 0 0 130px;
  background-color: #eceaf0;
  border: 1px solid rgba(141, 123, 168, 0.35);
}

.pagination-controls .retro-btn:hover:not(:disabled) {
  background-color: #ffffff;
  color: var(--universe-purple);
}

.pagination-controls .retro-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.pagination-info {
  font-size: 13px;
  font-weight: 600;
  color: var(--universe-purple);
  min-width: 100px;
  text-align: center;
}
   
.box-main.artwork-page {
  padding: 28px 24px;
}

.artwork-header {
  max-width: 780px;
  margin-bottom: 24px;
}

.artwork-header h1 {
  margin-bottom: 8px;
}

.artwork-header p {
  margin-bottom: 0;
}

.artwork-grid {
  display: grid;
  grid-template-columns: repeat(3, 369px);
  justify-content: space-between;
  gap: 14px;
}

.artwork-placeholder {
  width: 359px;
  height: 299px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background-color: #eceaf0;
  border: 1px dashed var(--universe-purple);
  color: var(--universe-purple);
  font-size: 13px;
  font-weight: 700;
}

.artwork-placeholder small {
  font-size: 11px;
  font-weight: 500;
  opacity: 0.85;
}

@media (max-width: 1180px) {
  .artwork-grid {
    grid-template-columns: repeat(auto-fit, minmax(369px, 369px));
    justify-content: center;
  }
}

/* =========================================================
   88x31 Buttons Page (50/50 Split)
   ========================================================= */
.buttons-88x31-split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 32px;
  align-items: start;
}

.buttons-88x31-intro {
  min-width: 0;
}

.buttons-88x31-farm {
  min-width: 0;
  padding-left: 32px;
  /*border-left: 1px solid rgba(141, 123, 168, 0.3); */
}

.buttons-88x31-farm h2 {
  font-size: 20px;
  margin-bottom: 12px;
}

@media (max-width: 820px) {
  .buttons-88x31-split {
    grid-template-columns: 1fr;
  }

  .buttons-88x31-farm {
    padding-left: 0;
    padding-top: 24px;
    border-left: none;
    border-top: 1px solid rgba(141, 123, 168, 0.3);
  }
}
