/* ============ Tokens ============ */
:root {
  --bg: hsl(221 44% 7%);
  --surface: hsl(221 38% 11%);
  --fg: hsl(0 0% 96%);
  --fg-muted: hsl(0 0% 96% / 0.65);
  --border: hsl(221 35% 20%);

  --primary: hsl(11 100% 65%);   /* coral */
  --secondary: hsl(41 100% 65%); /* yellow */
  --accent: hsl(143 100% 61%);   /* mint */

  --font-heading: "Righteous", system-ui, sans-serif;
  --font-body: "DM Sans", system-ui, -apple-system, sans-serif;

  --radius: 1.5rem;
  --container: 72rem;
  --header-h: 4.5rem;
}

/* ============ Base ============ */
*,
*::before,
*::after { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: var(--header-h); }

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img { display: block; max-width: 100%; height: auto; }

h1, h2, h3 {
  margin: 0;
  font-family: var(--font-heading);
  font-weight: 400;
  line-height: 1.1;
}

p { margin: 0; }

a { color: inherit; }

:focus-visible {
  outline: 2px solid var(--secondary);
  outline-offset: 3px;
}

.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: 1.5rem;
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: -3rem;
  z-index: 100;
  padding: 0.5rem 1rem;
  border-radius: 0.5rem;
  background: var(--fg);
  color: var(--bg);
}
.skip-link:focus { top: 1rem; }

/* ============ Buttons ============ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.85rem 1.75rem;
  border-radius: 999px;
  border: 1.5px solid transparent;
  font-weight: 700;
  font-size: 0.9rem;
  text-decoration: none;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}
.btn:hover { transform: translateY(-2px); }

.btn--primary {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 0 24px hsl(11 100% 65% / 0.35);
}
.btn--primary:hover { box-shadow: 0 6px 32px hsl(11 100% 65% / 0.5); }

.btn--ghost {
  border-color: var(--border);
  color: var(--fg);
}
.btn--ghost:hover { border-color: var(--fg-muted); }

.btn--tone {
  border-color: color-mix(in srgb, var(--tone) 35%, transparent);
  background: color-mix(in srgb, var(--tone) 14%, transparent);
  color: var(--tone);
}

.btn--sm { padding: 0.55rem 1.2rem; font-size: 0.8rem; }

/* Non-interactive status label (e.g. unreleased games) */
.soon {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  margin-top: 0.75rem;
  color: var(--tone);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.soon::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}

/* ============ Header ============ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: hsl(221 44% 7% / 0.8);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid hsl(221 35% 20% / 0.6);
}

.header-inner {
  height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand img { height: 2.1rem; width: auto; }

.site-header nav { display: flex; gap: 1.75rem; }

.site-header nav a {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--fg-muted);
  text-decoration: none;
  transition: color 0.2s;
}
.site-header nav a:hover { color: var(--fg); }

/* ============ Hero ============ */
.hero {
  position: relative;
  overflow: hidden;
  padding-block: clamp(4rem, 10vw, 8rem);
}

.blob {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
  filter: blur(70px);
}
.blob--primary { width: 22rem; height: 22rem; top: 2rem; right: 6%; background: hsl(11 100% 65% / 0.2); }
.blob--accent { width: 16rem; height: 16rem; bottom: 0; left: 4%; background: hsl(143 100% 61% / 0.12); }

.hero-inner {
  position: relative;
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  align-items: center;
  gap: 3rem;
}

.hero-copy { display: flex; flex-direction: column; gap: 1.5rem; }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  width: fit-content;
  padding: 0.4rem 0.85rem;
  border-radius: 999px;
  border: 1px solid hsl(143 100% 61% / 0.3);
  background: hsl(143 100% 61% / 0.12);
  color: var(--accent);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.eyebrow .dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }

.hero h1 { font-size: clamp(2.75rem, 7vw, 4.75rem); }
.hero h1 .highlight { color: var(--primary); }

.lead { max-width: 32rem; font-size: 1.15rem; color: var(--fg-muted); }

.actions { display: flex; flex-wrap: wrap; gap: 1rem; padding-top: 0.5rem; }

.hero-art { display: flex; justify-content: center; }
.hero-art img {
  width: min(100%, 20rem);
  filter: drop-shadow(0 0 40px hsl(41 100% 65% / 0.35));
  animation: float 6s ease-in-out infinite;
}

@keyframes float {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-14px) rotate(3deg); }
}

/* ============ Sections ============ */
.section { padding-block: clamp(4rem, 9vw, 7rem); }

.section-head { margin-bottom: 3rem; }
.section-head h2 { font-size: clamp(2.25rem, 5vw, 3.25rem); max-width: 36rem; }

.label {
  margin-bottom: 0.75rem;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.label--primary { color: var(--primary); }
.label--accent { color: var(--accent); }

/* ============ Games ============ */
.games-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}

.game-card {
  --tone: var(--primary);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--surface);
  transition: border-color 0.25s, transform 0.25s;
}
.game-card:hover { transform: translateY(-4px); border-color: color-mix(in srgb, var(--tone) 50%, transparent); }

.game-card--featured { grid-row: span 2; }

.game-media {
  position: relative;
  height: 11rem;
  overflow: hidden;
}
.game-card--featured .game-media { height: auto; flex: 1; min-height: 16rem; }

.game-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}
.game-card:hover .game-media img { transform: scale(1.05); }

.game-media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, var(--surface), transparent 60%);
}

.tag {
  position: absolute;
  top: 1rem;
  left: 1rem;
  z-index: 1;
  padding: 0.25rem 0.75rem;
  border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--tone) 40%, transparent);
  background: hsl(221 44% 7% / 0.7);
  color: var(--tone);
  font-size: 0.75rem;
  font-weight: 700;
  backdrop-filter: blur(6px);
}

.game-body {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.5rem;
  padding: 1.25rem 1.5rem 1.5rem;
}
.game-body h3 { font-size: 1.4rem; }
.game-body p { color: var(--fg-muted); font-size: 0.95rem; }
.game-body .btn { margin-top: 0.75rem; }

.game-card--featured .game-body h3 { font-size: 1.9rem; }
.game-card--featured .game-body p { color: var(--primary); font-weight: 500; }

.coming-soon {
  grid-column: span 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 2rem;
  border-radius: var(--radius);
  border: 1px solid hsl(11 100% 65% / 0.25);
  background: hsl(11 100% 65% / 0.08);
}
.coming-soon .label { margin-bottom: 0.25rem; letter-spacing: 0.04em; text-transform: none; font-size: 0.85rem; }
.coming-soon h3 { font-size: 1.4rem; }
.coming-soon p:last-child { margin-top: 0.25rem; color: var(--fg-muted); font-size: 0.95rem; }
.coming-soon .btn { flex-shrink: 0; }

/* ============ Why Mala ============ */
.features {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}

.feature {
  position: relative;
  padding: 2rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--surface);
}
.feature-num {
  position: absolute;
  top: 1.5rem;
  right: 1.75rem;
  font-family: var(--font-heading);
  font-size: 2.5rem;
  line-height: 1;
  color: hsl(0 0% 96% / 0.08);
}
.feature-icon { display: block; font-size: 2rem; margin-bottom: 1.25rem; }
.feature h3 { font-size: 1.35rem; margin-bottom: 0.75rem; }
.feature p { color: var(--fg-muted); }

/* ============ Footer ============ */
.site-footer {
  border-top: 1px solid var(--border);
  padding-top: 3.5rem;
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-start;
  gap: 2rem;
}

.footer-brand { max-width: 24rem; }
.footer-brand img { height: 2rem; width: auto; margin-bottom: 1rem; }
.footer-brand p { color: var(--fg-muted); font-size: 0.9rem; }

.footer-links { display: flex; flex-wrap: wrap; align-items: center; gap: 0.75rem; }

.store,
.social {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--fg);
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 500;
  transition: border-color 0.2s, background-color 0.2s;
}
.store { padding: 0.6rem 1.1rem; }
.social { justify-content: center; width: 2.6rem; height: 2.6rem; }
.store:hover,
.social:hover { border-color: var(--fg-muted); background: hsl(0 0% 100% / 0.04); }

.store svg,
.social svg { width: 1.1rem; height: 1.1rem; fill: currentColor; }

.footer-bottom {
  margin-top: 3rem;
  padding-block: 1.5rem;
  border-top: 1px solid var(--border);
  color: var(--fg-muted);
  font-size: 0.8rem;
}

/* ============ Responsive ============ */
@media (max-width: 900px) {
  .hero-inner { grid-template-columns: 1fr; text-align: left; }
  .hero-art { order: -1; justify-content: flex-start; }
  .hero-art img { width: 8rem; }

  .games-grid { grid-template-columns: 1fr 1fr; }
  .game-card--featured { grid-column: span 2; grid-row: auto; }
  .game-card--featured .game-media { flex: none; height: 16rem; }

  .features { grid-template-columns: 1fr; }
}

@media (max-width: 600px) {
  .site-header nav { gap: 1.25rem; }
  .brand img { height: 1.75rem; }

  .games-grid { grid-template-columns: 1fr; }
  .game-card--featured,
  .coming-soon { grid-column: auto; }
  .coming-soon { flex-direction: column; align-items: flex-start; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
