/* Home page — the hub that links out to every game. */

.hero {
  position: relative;
  padding: clamp(2.5rem, 8vw, 5rem) 0 clamp(2rem, 5vw, 3rem);
  text-align: center;
}

.hero h1 {
  font-size: clamp(2.4rem, 10vw, 4.4rem);
  margin: .35rem 0 .1rem;
}

.hero .mal {
  display: block;
  font-size: clamp(1.3rem, 5vw, 2rem);
  color: var(--green);
  margin-bottom: .9rem;
}

.hero p {
  max-width: 46ch;
  margin: 0 auto;
  color: var(--muted);
  font-size: clamp(.98rem, 2.6vw, 1.1rem);
}

/* Slowly turning pookalam behind the title. Decorative only. */
.hero__deco {
  position: absolute;
  top: -16%;
  left: 50%;
  width: min(420px, 92vw);
  translate: -50% 0;
  opacity: .34;
  z-index: -1;
  animation: slow-spin 120s linear infinite;
  /* Fades out behind the title so the words stay easy to read. */
  -webkit-mask-image: radial-gradient(circle, transparent 26%, #000 62%);
  mask-image: radial-gradient(circle, transparent 26%, #000 62%);
}
.hero__deco svg { display: block; width: 100%; height: auto; }
@keyframes slow-spin { to { rotate: 360deg; } }

.section-head {
  display: flex;
  align-items: baseline;
  gap: .75rem;
  margin: 0 0 1rem;
}
.section-head h2 { font-size: 1.35rem; }

.games-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(248px, 1fr));
  gap: 1rem;
  padding-bottom: 3rem;
  list-style: none;
  margin: 0;
}

.game-card {
  display: flex;
  flex-direction: column;
  gap: .3rem;
  height: 100%;
  padding: 1.35rem 1.25rem 1.15rem;
  border-radius: var(--radius);
  background: var(--paper);
  border: 1px solid rgba(192, 138, 30, .22);
  box-shadow: var(--shadow-sm);
  color: inherit;
  text-decoration: none;
  transition: transform .16s ease, box-shadow .2s ease, border-color .2s ease;
}
.game-card:hover,
.game-card:focus-visible {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: var(--gold);
  outline: none;
}

.game-card__icon {
  width: 62px;
  height: 62px;
  margin-bottom: .55rem;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--cream-deep);
  box-shadow: inset 0 0 0 2px rgba(192, 138, 30, .35);
}
.game-card__icon svg { width: 40px; height: 40px; }

.game-card h3 { font-size: 1.16rem; }
.game-card .mal { font-size: .92rem; color: var(--green); }
.game-card p {
  margin: .45rem 0 .9rem;
  font-size: .9rem;
  color: var(--muted);
  flex: 1;
}

.game-card__meta {
  display: flex;
  gap: .4rem;
  flex-wrap: wrap;
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--gold);
}
.game-card__meta span:not(:last-child)::after {
  content: " ·";
  color: var(--line);
}

.site-foot {
  padding: 2rem 0 3rem;
  text-align: center;
  color: var(--muted);
  font-size: .88rem;
  border-top: 1px solid var(--line);
}
.site-foot .mal { display: block; font-size: 1.15rem; color: var(--green); margin-bottom: .3rem; }

/* --- countdown (target date is set in the admin panel) -------------------- */

.countdown {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .55rem;
  margin: 1.6rem auto 0;
}
.countdown[hidden] { display: none; }

.countdown__label {
  margin: 0;
  font-size: .74rem;
  font-weight: 700;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--gold);
}

.countdown__units {
  display: flex;
  gap: .45rem;
}

.countdown__unit {
  min-width: 66px;
  padding: .5rem .4rem .45rem;
  border-radius: var(--radius-sm);
  background: var(--paper);
  box-shadow: var(--shadow-sm), inset 0 0 0 1px rgba(192, 138, 30, .3);
}
.countdown__unit b {
  display: block;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.7rem;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
}
.countdown__unit span {
  display: block;
  font-size: .62rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--muted);
}

.countdown__done {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(1.1rem, 4vw, 1.5rem);
  color: var(--green);
}

@media (max-width: 400px) {
  .countdown__unit { min-width: 0; flex: 1; }
  .countdown__unit b { font-size: 1.4rem; }
}

/* --- call to action under the hero ---------------------------------------- */

.hero__actions {
  display: flex;
  justify-content: center;
  gap: .5rem;
  flex-wrap: wrap;
  margin-top: 1.5rem;
}
