/* =========================
   Homepage overrides
========================= */

@import url('/static/css/base.v1.css');

:root {
  --card-size: clamp(140px, 25vw, 200px);
}

/* Header */
h1 {
  text-align: center;
  font-size: clamp(2.2rem, 6vw, 3.6rem);
  margin: 8px 0 28px 0;
  color: white;
  text-shadow: var(--text-shadow-outline);
  letter-spacing: 2px;
  font-weight: 700;
}

/* Feed container – grid */
#hatch-feed {
  max-width: 540px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  padding: 0 16px;
}

/* Cards */
.hatch-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 24px 16px 20px;
  border-radius: var(--radius-card);
  background: var(--glass-bg);
  backdrop-filter: blur(8px) saturate(140%);
  -webkit-backdrop-filter: blur(8px) saturate(140%);
  border: 1.5px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
  text-decoration: none;
  color: white;
  transition: transform var(--transition-fast),
              box-shadow var(--transition-fast),
              border-color var(--transition-fast),
              background var(--transition-fast);
  min-height: var(--card-size);
}

.hatch-card:hover {
  transform: translateY(-6px) scale(1.01);
  border-color: rgba(100, 129, 166, 0.4);
  background: rgba(255, 255, 255, 0.12);
  box-shadow:
    0 12px 40px rgba(0, 0, 0, 0.4),
    0 0 60px rgba(100, 129, 166, 0.08);
}

/* Card icon */
.card-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
}

.card-icon img {
  width: clamp(80px, 18vw, 140px);
  height: auto;
  aspect-ratio: 1 / 1;
  object-fit: contain;
  filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.4));
  transition: transform var(--transition-fast), filter var(--transition-fast);
  image-rendering: pixelated;
}

.hatch-card:hover .card-icon img {
  transform: scale(1.06);
  filter: drop-shadow(0 6px 20px rgba(100, 129, 166, 0.25));
}

/* Card label */
.card-label {
  font-size: clamp(1rem, 1.5vw, 1.3rem);
  font-weight: 600;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.6);
  letter-spacing: 0.5px;
  text-align: center;
}

/* Footer */
.footer {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8rem;
  opacity: 0.5;
  color: white;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.5);
  z-index: 1000;
  white-space: nowrap;
}

.footer a {
  color: white;
  text-decoration: none;
  transition: opacity var(--transition-fast), text-shadow var(--transition-fast);
}

.footer a:hover {
  opacity: 1;
  text-shadow: 0 0 12px rgba(100, 129, 166, 0.3);
}

.footer .divider {
  opacity: 0.4;
}

/* Responsive */
@media (max-width: 480px) {
  #hatch-feed {
    gap: 14px;
    padding: 0 12px;
  }

  .hatch-card {
    padding: 18px 12px 16px;
    min-height: unset;
  }

  .card-icon img {
    width: 70px;
  }

  .card-label {
    font-size: 0.9rem;
  }

  .footer {
    font-size: 0.65rem;
    gap: 6px;
    bottom: 12px;
  }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  .hatch-card,
  .hatch-card:hover,
  .card-icon img,
  .hatch-card:hover .card-icon img {
    animation: none;
    transition: none;
    transform: none !important;
  }

  .hatch-card:hover {
    transform: none !important;
  }
}
