/* ==========================================================================
   Modern Professional Yu-Gi-Oh! Homepage – 2026 Style
   ========================================================================== */

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Open Sans", sans-serif;
  line-height: 1.6;
  color: #1f2937;
  background-color: #f8fafc;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Header */
header {
  background-color: #ffffff;
  color: #111827;
  padding: 1rem 2rem;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
  position: sticky;
  top: 0;
  z-index: 1000;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.header-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 1400px;
  margin: 0 auto;
}

h1 {
  font-size: clamp(1.8rem, 5vw, 2.5rem);
  font-weight: 800;
  letter-spacing: -0.04em;
  color: #111827;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.5rem;
  border-radius: 0.75rem;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.22s ease;
}

.btn-primary {
  background: #3b82f6;
  color: white;
}

.btn-primary:hover,
.btn-primary:focus-visible {
  background: #2563eb;
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(59,130,246,0.3);
}

/* Main + Hero */
main {
  flex: 1;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0 1.5rem;
  background-image: url('../images/0.jpg');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-attachment: fixed;
}

main::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(0,0,0,0.5), rgba(0,0,0,0.7));
  z-index: 1;
}

main > * {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 1200px;
}

.hero {
  padding: 6rem 1rem 4rem;
  text-align: center;
  color: white;
}

.hero-content {
  max-width: 800px;
  margin: 0 auto;
}

.hero h2 {
  font-size: clamp(2.8rem, 7vw, 4.2rem);
  font-weight: 900;
  margin-bottom: 1rem;
  letter-spacing: -0.03em;
  text-shadow: 0 3px 12px rgba(0,0,0,0.7);
}

.hero p {
  font-size: 1.3rem;
  max-width: 640px;
  margin: 0 auto;
  opacity: 0.95;
}

/* Card Grid */
.card-grid-section {
  padding: 2rem 1rem 5rem;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.75rem;
  max-width: 1400px;
  margin: 0 auto;
}

.card-link {
  position: relative;
  display: block;
  aspect-ratio: 255 / 374;
  border-radius: 1.25rem;
  overflow: hidden;
  box-shadow: 0 12px 32px rgba(0,0,0,0.14);
  transition: all 0.32s ease;
  text-decoration: none;
  color: inherit;
  background: #ffffff;
}

.card-link:hover,
.card-link:focus-visible {
  transform: translateY(-12px) scale(1.035);
  box-shadow: 0 24px 48px rgba(0,0,0,0.22);
}

.card-link img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.45s ease;
}

.card-link:hover img {
  transform: scale(1.07);
}

/* Card Labels (appear on hover) */
.card-label {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.85), transparent);
  color: white;
  text-align: center;
  padding: 1.4rem 0.8rem 0.9rem;
  font-weight: 700;
  font-size: 1.15rem;
  text-shadow: 0 1px 4px rgba(0,0,0,0.9);
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

.card-link:hover .card-label,
.card-link:focus .card-label {
  opacity: 1;
}

/* Accessibility helper */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  border: 0;
}

/* Responsive */
@media (max-width: 1024px) {
  .card-grid {
    gap: 1.5rem;
  }
}

@media (max-width: 640px) {
  header {
    padding: 1rem;
  }
  .header-content {
    flex-direction: column;
    gap: 1rem;
    text-align: center;
  }
  .hero {
    padding: 4rem 1rem 3rem;
  }
  .hero h2 {
    font-size: clamp(2.2rem, 6vw, 3.2rem);
  }
  .card-grid {
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.25rem;
  }
  .card-link {
    aspect-ratio: 3 / 4.2;
  }
}