/* Neo-brutalist CSS for Acrobatic Arcade */

/* Base styles and variables */
:root {
  --primary: #ff3e3e;
  --secondary: #4f4fff;
  --accent: #ffde59;
  --background: #fffbeb;
  --text: #121212;
  --card-shadow: 5px 5px 0px rgba(0, 0, 0, 0.8);
  --border-thick: 3px solid #000;
  --rotate-amount: -1deg;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

body {
  background-color: var(--background);
  color: var(--text);
  padding: 2rem 1rem;
  max-width: 1400px;
  margin: 0 auto;
}

/* Typography */
.fluid {
  font-size: clamp(2.5rem, 5vw, 4.5rem);
  line-height: 1;
  margin-bottom: 0.5rem;
  font-weight: 900;
  letter-spacing: -0.02em;
  color: var(--primary);
  text-shadow: 3px 3px 0px black;
  transform: rotate(var(--rotate-amount));
}

#title-div {
  padding: 1.5rem;
  margin-bottom: 2rem;
  border: var(--border-thick);
  background-color: #e0fffd;
  box-shadow: var(--card-shadow);
  text-align: center;
  position: relative;
  overflow: hidden;
}

#subtitle {
  font-size: clamp(1rem, 2vw, 1.25rem);
  max-width: 600px;
  margin: 0 auto;
  line-height: 1.4;
}

/* Card Layout */
ul {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 2rem;
}

/* Card Styling */
article {
  position: relative;
  border: var(--border-thick);
  background-color: white;
  box-shadow: var(--card-shadow);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  height: 300px;
  overflow: hidden;
  cursor: pointer;
}

article:hover {
  transform: translateY(-5px);
  box-shadow: 8px 8px 0px rgba(0, 0, 0, 0.8);
}

/* Card Images */
article img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 1;
}

/* Card Content Overlay */
article h3, 
article p, 
article .play-link {
  position: relative;
  z-index: 2;
}

article::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(0deg, rgba(0,0,0,0.8) 0%, rgba(0,0,0,0.4) 50%, rgba(0,0,0,0.1) 100%);
  z-index: 1;
}

article h3 {
  position: absolute;
  top: 1rem;
  left: 1rem;
  color: white;
  font-size: 1.5rem;
  font-weight: 800;
  text-shadow: 2px 2px 0px black;
  max-width: 80%;
}

article p {
  position: absolute;
  bottom: 1.5rem;
  left: 1rem;
  color: white;
  font-size: 0.9rem;
  max-width: 90%;
}

/* Make the whole card clickable */
article a {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 3;
  text-decoration: none;
}

/* Footer Links */
#links-para {
  margin-top: 1rem;
  text-align: center;
  padding: 1rem;
}

.social-link {
  display: inline-block;
  color: var(--secondary);
  text-decoration: none;
  font-weight: bold;
  margin: 0 0.5rem;
  position: relative;
}

.social-link::after {
  content: '';
  position: absolute;
  bottom: -5px;
  left: 0;
  width: 100%;
  height: 3px;
  background-color: var(--primary);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s ease;
}

.social-link:hover::after {
  transform: scaleX(1);
}

/* Media Queries for Responsiveness */
@media (min-width: 768px) {
  body {
    padding: 1rem;
  }
  
  ul {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1200px) {
  ul {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 480px) {
  article {
    height: 250px;
  }
  
  .fluid {
    font-size: 2rem;
    text-shadow: 2px 2px 0px black;
  }
  
  #title-div {
    padding: 1rem;
  }
  
  article p {
    /* bottom: 4rem; */
    font-size: 0.8rem;
  }
}

/* Animation for Cards */
@keyframes cardPop {
  0% { transform: scale(0.95); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}

li {
  animation: cardPop 0.3s ease-out forwards;
}

li:nth-child(1) { animation-delay: 0.1s; }
li:nth-child(2) { animation-delay: 0.2s; }
li:nth-child(3) { animation-delay: 0.3s; }
li:nth-child(4) { animation-delay: 0.4s; }
li:nth-child(5) { animation-delay: 0.5s; }
li:nth-child(6) { animation-delay: 0.6s; }
li:nth-child(7) { animation-delay: 0.7s; }
li:nth-child(8) { animation-delay: 0.8s; }