/* ==========================================================================
   1. Design Tokens
   ========================================================================== */
:root {
  --grey-100: #F5F5F5;
  --grey-200: #EBEBEB;
  --grey-300: #E0E0E0;
  --grey-400: #C2C2C2;
  --grey-500: #A3A3A3;
  --grey-600: #858585;
  --grey-700: #666666;
  --grey-800: #474747;
  --grey-900: #292929;
  --grey-1000: #0A0A0A;

  --yellow: #F4C317;
  --yellow-lighter: #F6CE3C;
  --yellow-darker: #D6AA0A;

  --ease-stamp: cubic-bezier(0.2, 0.9, 0.3, 1.3);
}

/* ==========================================================================
   2. Reset & Base
   ========================================================================== */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .links a,
  .release-links a {
    transition: background-color 0.12s ease, color 0.12s ease, border-color 0.12s ease;
  }

  .links a:hover,
  .links a:focus-visible,
  .release-links a:hover,
  .release-links a:focus-visible,
  .links a:active,
  .release-links a:active {
    transform: none;
  }
  
  .release-card {
    transition: box-shadow 0.2s ease;
  }
  
  .release-card:hover,
  .release-card:hover .release-art img {
    transform: none;
  }
}

html {
  color-scheme: dark;
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  background-color: var(--grey-1000);
  color: var(--grey-100);
  font-family: 'Geist Mono', ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-feature-settings: "zero" 1;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: clamp(1.5rem, 4vw, 3.5rem) clamp(1rem, 3vw, 2rem) clamp(3rem, 6vw, 5rem);
  position: relative;
}

/* Full-screen procedural noise overlay */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1;
  opacity: 0.05;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='2.5' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Brand-matched text highlight color */
::selection {
  background-color: var(--yellow);
  color: var(--grey-1000);
}

/* ==========================================================================
   3. Page Layout
   ========================================================================== */
main {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 1200px;
  text-align: center;
}

/* Keep pre-release landing centered vertically until cards are rendered */
main:not(:has(.release-card)) {
  margin-block: auto;
}

.logo {
  width: 100%;
  height: auto;
  display: block;
  margin-bottom: clamp(1.75rem, 4vw, 3rem);
}

/* ==========================================================================
   4. Shared Icon Lists & Stamp Button Interaction
   ========================================================================== */
.links,
.release-links {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
}

.links a,
.release-links a {
  --btn-rot: -3.5deg;
  --btn-x: -1; /* -1 = leans up-left, 0 = straight up, 1 = leans up-right */

  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  border: 1.5px solid transparent;
  transition:
    transform 0.14s var(--ease-stamp),
    background-color 0.12s ease,
    color 0.12s ease,
    border-color 0.12s ease,
    box-shadow 0.14s var(--ease-stamp);
}

/* Pseudo-random variation across nav items & cards */
.links li:nth-child(2n) a,
.release-card:nth-child(2n) .release-links li:nth-child(1) a,
.release-card:nth-child(3n) .release-links li:nth-child(2) a {
  --btn-rot: 4deg;
  --btn-x: 1;
}

.links li:nth-child(3n) a,
.release-card:nth-child(2n + 1) .release-links li:nth-child(3) a {
  --btn-rot: -2deg;
  --btn-x: 0;
}

.links li:nth-child(4n) a,
.release-card:nth-child(3n + 1) .release-links li:nth-child(2) a {
  --btn-rot: 5deg;
  --btn-x: 1;
}

.links a:hover,
.links a:focus-visible,
.release-links a:hover,
.release-links a:focus-visible {
  color: var(--btn-hover-fg);
  background-color: var(--btn-hover-bg);
  border-color: var(--btn-border, transparent);
  box-shadow:
    calc(var(--btn-offset) * var(--btn-x) * -1)
    var(--btn-offset)
    0
    var(--btn-shadow);
  transform:
    translate(
      calc(var(--btn-offset) * var(--btn-x) * 0.66),
      calc(var(--btn-offset) * -0.66)
    )
    rotate(var(--btn-rot));
  outline: none;
}

.links a:active,
.release-links a:active {
  background-color: var(--btn-active-bg);
  box-shadow: 0 0 0 var(--btn-shadow);
  transform: translate(0, 1px) rotate(0deg);
  transition-duration: 0.05s;
}

.icon {
  fill: currentColor;
  display: block;
}


/* ==========================================================================
   5. Primary Navigation
   ========================================================================== */
.links {
  justify-content: center;
  gap: 1.55rem; /* Accounts for icon padding so visual spacing to dots stays ~32px */
}

.links li {
  display: inline-flex;
  align-items: center;
}

.links li:not(:last-child)::after {
  content: "•";
  color: var(--grey-700);
  font-size: 0.75rem;
  line-height: 1;
  margin-left: 1.55rem;
  user-select: none;
}

.links a {
  --btn-hover-fg: var(--grey-1000);
  --btn-hover-bg: var(--grey-100);
  --btn-border: var(--grey-1000);
  --btn-shadow: var(--yellow);
  --btn-active-bg: var(--yellow-lighter);
  --btn-offset: 3px;

  color: var(--yellow);
  padding: 0.45rem;
}

.links .icon {
  width: 24px;
  height: 24px;
}

/* ==========================================================================
   6. Releases Grid & Cards
   ========================================================================== */
.releases {
  width: 100%;
  margin-top: clamp(2.5rem, 5vw, 4rem);
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(1rem, 2.2vw, 1.75rem);
}

@media (max-width: 860px) {
  .releases {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 540px) {
  .releases {
    grid-template-columns: 1fr;
  }
}

.release-card {
  background-color: var(--grey-100);
  padding: clamp(0.75rem, 1.5vw, 1rem);
  display: flex;
  flex-direction: column;
  text-align: left;
  transition:
    transform 0.18s ease,
    box-shadow 0.18s ease;
}

.release-card:hover {
  transform: translate(-2px, -2px);
  box-shadow: 4px 4px 0 var(--grey-800);
}

.release-art {
  aspect-ratio: 1 / 1;
  overflow: hidden;
  background-color: var(--grey-1000);
}

.release-art img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.25s ease;
}

.release-card:hover .release-art img {
  transform: scale(1.015);
}

.release-info {
  padding-top: 0.75rem;
}

.release-title {
  font-size: clamp(0.9rem, 1.1vw, 1rem);
  font-weight: 700;
  color: var(--grey-900);
  line-height: 1.3;
  text-wrap: balance;
}

.release-meta {
  margin-top: 0.2rem;
  font-size: 0.8rem;
  font-weight: 400;
  color: var(--grey-700);
  font-variant-numeric: tabular-nums;
}

.release-links {
  margin-top: 0.55rem;
  gap: 0.45rem;
  margin-left: -0.3rem; /* Aligns first icon glyph flush with title edge */
}

.release-links a {
  --btn-hover-fg: var(--yellow);
  --btn-hover-bg: var(--grey-900);
  --btn-shadow: var(--yellow-darker);
  --btn-active-bg: var(--grey-1000);
  --btn-offset: 2px;

  color: var(--grey-900);
  padding: 0.3rem;
}

.release-links .icon {
  width: 16px;
  height: 16px;
}

/* ==========================================================================
   7. Footer
   ========================================================================== */
.site-footer {
  position: relative;
  z-index: 2;
  width: 100%;
  margin-top: auto;
  padding-top: clamp(2.5rem, 5vw, 4rem);
  text-align: center;
  font-size: 0.72rem;
  font-weight: 400;
  letter-spacing: 0.01em;
  color: var(--grey-700);
}

/* ==========================================================================
   8. Error Pages (403 / 404)
   ========================================================================== */
.logo-muted {
  opacity: 0.28;
  transition: opacity 0.2s ease;
}

.logo-muted:hover {
  opacity: 0.55;
}

.error-status {
  margin: 1.5rem 0 1.75rem;
  text-align: center;
}

.error-code {
  display: block;
  color: var(--yellow);
  font-size: clamp(4rem, 12vw, 8rem);
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  line-height: 1;
  margin-bottom: 0.5rem;
}

.error-message {
  color: var(--grey-500);
  font-size: 0.95rem;
  text-wrap: pretty;
}