:root {
  --bg-cream: #fef7e9;
  --bg-cream-2: #fef7e9;
  --surface: #fdf8ed;
  --border-soft: #feecd6;
  --text: #1a2332;
  --text-dim: #6e6457;
  --accent-orange: #f97316;
  --accent-orange-dark: #ea580c;

  /* Per-card colors. */
  --c-green:  #4caf50;
  --c-blue:   #3b9bea;
  --c-orange: #f59e0b;
  --c-purple: #8b5cf6;
  --c-red:    #ef4444;

  --shadow-sm: 0 4px 14px rgba(60, 40, 20, 0.06);
  --shadow-md: 0 10px 28px rgba(60, 40, 20, 0.10);
  --shadow-lg: 0 18px 48px rgba(60, 40, 20, 0.18);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: linear-gradient(180deg, var(--bg-cream-2) 0%, var(--bg-cream) 100%);
  background-attachment: fixed;
  color: var(--text);
  font-family: "Noto Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  min-height: 100vh;
  overflow-x: hidden;
}

/* Soft warm background blobs (very subtle now). */
body::before,
body::after {
  content: '';
  position: fixed;
  border-radius: 50%;
  filter: blur(100px);
  z-index: -1;
  opacity: 0.45;
  pointer-events: none;
}

body::before {
  width: 480px;
  height: 480px;
  background: radial-gradient(circle, #fcd9a8 0%, transparent 70%);
  top: -140px;
  left: -140px;
  animation: drift 22s ease-in-out infinite;
}

body::after {
  width: 540px;
  height: 540px;
  background: radial-gradient(circle, #fbe6c2 0%, transparent 70%);
  bottom: -180px;
  right: -160px;
  animation: drift 28s ease-in-out infinite reverse;
}

@keyframes drift {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50%      { transform: translate(40px, -50px) scale(1.08); }
}

/* Hero. */
.hero {
  max-width: 960px;
  margin: 0 auto;
  padding: 72px 16px 32px;
  display: flex;
  align-items: center;
  gap: 32px;
  position: relative;
}

.hero__copy {
  flex: 1 1 50%;
  min-width: 0;
}

.hero__title {
  margin: 0;
  font-size: clamp(40px, 6.5vw, 60px);
  font-weight: 800;
  letter-spacing: -2px;
  line-height: 1.05;
  display: flex;
  flex-direction: column;
}

.hero__title-1 { color: var(--text); }
.hero__title-2 { color: var(--accent-orange); }

.hero__sub {
  margin: 20px 0 0;
  color: var(--text-dim);
  font-size: 18px;
  font-weight: 500;
  line-height: 1.5;
}

/* Hero art. */
.hero__art {
  flex: 1 1 50%;
  position: relative;
  height: 320px;
  min-width: 0;
}

.hero__bulb {
  position: absolute;
  top: 24px;
  right: 24px;
  font-size: 264px;
  line-height: 1;
  filter: drop-shadow(0 10px 22px rgba(255, 209, 102, 0.45));
  animation: float-y 4s ease-in-out infinite;
}

@keyframes float-y {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-12px); }
}

.hero__tile {
  position: absolute;
  width: 64px;
  height: 64px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  color: #fff;
  font-size: 28px;
  letter-spacing: -1px;
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.18);
  animation: tile-bob 5s ease-in-out infinite;
}

.hero__tile--w {
  top: 100px;
  left: 30px;
  background: linear-gradient(135deg, #b25aff, #9b5de5);
  animation-delay: -1.2s;
}

.hero__tile--x {
  top: 220px;
  left: 70px;
  background: linear-gradient(135deg, #6dd99e, #3bb273);
  animation-delay: -2.5s;
}

.hero__tile--2048 {
  top: 230px;
  left: 220px;
  background: linear-gradient(135deg, #ffae5e, #ff8a3d);
  font-size: 18px;
  animation-delay: -0.8s;
}

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

.hero__block {
  position: absolute;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.16);
  animation: tile-bob 5s ease-in-out infinite;
}

.hero__block--blue {
  top: 40px;
  left: 90px;
  width: 38px;
  height: 38px;
  background: linear-gradient(135deg, #5ec5ff, #3a9ad9);
  animation-delay: -1.8s;
}

.hero__block--cyan {
  top: 160px;
  left: 180px;
  width: 56px;
  height: 56px;
  background: linear-gradient(135deg, #5ec5ff, #4ecdc4);
  animation-delay: -3.1s;
}

.hero__sparkle,
.hero__dot { position: absolute; pointer-events: none; }

.hero__sparkle {
  width: 14px;
  height: 14px;
  background: #ffd166;
  clip-path: polygon(50% 0, 60% 40%, 100% 50%, 60% 60%, 50% 100%, 40% 60%, 0 50%, 40% 40%);
  animation: twinkle 2.6s ease-in-out infinite;
}

.hero__sparkle--1 { top: 50px;  left: 200px; }
.hero__sparkle--2 { top: 140px; left: 60px;  animation-delay: -0.8s; }
.hero__sparkle--3 { top: 280px; left: 270px; animation-delay: -1.5s; }

.hero__dot { width: 10px; height: 10px; border-radius: 50%; }
.hero__dot--1 { top: 80px;  left: 250px; background: #ff5e9c; }
.hero__dot--2 { top: 270px; left: 30px;  background: #4ecdc4; }

@keyframes twinkle {
  0%, 100% { transform: scale(1);   opacity: 0.85; }
  50%      { transform: scale(1.3); opacity: 1;    }
}

@media (max-width: 720px) {
  .hero {
    flex-direction: column;
    padding: 56px 16px 16px;
    gap: 16px;
    text-align: center;
  }
  .hero__title { align-items: center; }
  .hero__art { width: 100%; height: 240px; }
  .hero__bulb { font-size: 210px; right: 12%; }
}

/* Game grid. */
.grid {
  max-width: 960px;
  margin: 0 auto;
  padding: 24px 16px 48px;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 24px;
}

.grid > .card,
.grid > .card--placeholder {
  flex: 1 1 240px;
  max-width: 300px;
}

/* Per-card color tokens. */
.card--green   { --card-color: var(--c-green);  --card-color-soft: #e9f7ea; }
.card--blue    { --card-color: var(--c-blue);   --card-color-soft: #e7f2fb; }
.card--orange  { --card-color: var(--c-orange); --card-color-soft: #fdf2dc; }
.card--purple  { --card-color: var(--c-purple); --card-color-soft: #f0eafd; }
.card--red     { --card-color: var(--c-red);    --card-color-soft: #fde8e8; }

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}

.card {
  background: var(--surface);
  border: 2.5px solid var(--card-color, var(--border-soft));
  border-radius: 22px;
  padding: 24px 22px 22px;
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  box-shadow: var(--shadow-sm);
  position: relative;
  transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1),
              box-shadow 0.4s ease;
  animation: fadeInUp 0.7s ease backwards;
}

.grid > *:nth-child(1) { animation-delay: 0.05s; }
.grid > *:nth-child(2) { animation-delay: 0.15s; }
.grid > *:nth-child(3) { animation-delay: 0.25s; }
.grid > *:nth-child(4) { animation-delay: 0.35s; }
.grid > *:nth-child(5) { animation-delay: 0.45s; }

.card:hover,
.card:focus-visible {
  transform: translateY(-8px);
  box-shadow: var(--shadow-lg);
  outline: none;
}

.card__badge {
  position: absolute;
  top: -14px;
  left: 18px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--card-color);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 16px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.18);
}

.card h2 {
  margin: 0 0 14px;
  font-size: 20px;
  font-weight: 800;
  color: var(--card-color);
  letter-spacing: -0.3px;
}

.card__hero {
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 12px;
  background: var(--card-color-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--card-color);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  margin-bottom: 14px;
  opacity: 0.85;
}

.card__hero--placeholder {
  font-size: 48px;
  font-weight: 800;
  text-transform: none;
  letter-spacing: 0;
  opacity: 0.6;
}

.card p {
  margin: 0 0 16px;
  color: var(--text-dim);
  font-size: 13px;
  line-height: 1.5;
}

.play-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 11px 30px;
  background: var(--card-color);
  color: #fff;
  border-radius: 999px;
  font-weight: 800;
  font-size: 14px;
  letter-spacing: 0.4px;
  margin-top: auto;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.12);
  transition: transform 0.3s ease, box-shadow 0.3s ease, filter 0.3s ease;
}

.play-btn::after {
  content: '→';
  font-size: 15px;
  transition: transform 0.3s ease;
}

.card:hover .play-btn,
.card:focus-visible .play-btn {
  transform: translateY(-2px) scale(1.04);
  filter: brightness(1.08);
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.18);
}

.card:hover .play-btn::after,
.card:focus-visible .play-btn::after {
  transform: translateX(4px);
}

.card--placeholder {
  opacity: 0.7;
  cursor: not-allowed;
}

.card--placeholder:hover,
.card--placeholder:focus-visible {
  transform: none;
  box-shadow: var(--shadow-sm);
}

/* Features pill. */
.features {
  max-width: 928px;
  width: calc(100% - 32px);
  margin: 8px auto 40px;
  padding: 26px 32px;
  background: var(--surface);
  border: 2px solid var(--border-soft);
  border-radius: 28px;
  display: flex;
  justify-content: space-around;
  align-items: center;
  gap: 24px;
  color: var(--text);
  box-shadow: var(--shadow-sm);
}

.feature {
  display: flex;
  align-items: center;
  gap: 14px;
  flex: 1;
  min-width: 0;
  position: relative;
}

.feature:not(:last-child)::after {
  content: '';
  position: absolute;
  right: -12px;
  top: 50%;
  transform: translateY(-50%);
  width: 2px;
  height: 60%;
  background: var(--border-soft);
}

.feature__icon {
  font-size: 44px;
  line-height: 1;
  flex-shrink: 0;
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.10));
  animation: bobble 3.5s ease-in-out infinite;
}

.feature:nth-child(2) .feature__icon { animation-delay: -1.1s; }
.feature:nth-child(3) .feature__icon { animation-delay: -2.2s; }

@keyframes bobble {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50%      { transform: translateY(-6px) rotate(-4deg); }
}

.feature__text {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.feature__text strong {
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.4px;
  color: var(--text);
}

.feature__text span {
  font-size: 13px;
  color: var(--text-dim);
  line-height: 1.45;
}

@media (max-width: 640px) {
  .features {
    flex-direction: column;
    align-items: flex-start;
    border-radius: 22px;
    padding: 22px 24px;
  }
  .feature:not(:last-child)::after { display: none; }
}

/* About. */
.about {
  max-width: 960px;
  margin: 8px auto 32px;
  padding: 0 16px;
}

.about__inner {
  background: var(--surface);
  border: 2px solid var(--border-soft);
  border-radius: 28px;
  padding: 44px 40px 56px;
  color: var(--text-dim);
  line-height: 1.7;
  box-shadow: var(--shadow-sm);
  position: relative;
  overflow: hidden;
}

.about h2 {
  margin: 0 0 18px;
  font-size: 28px;
  font-weight: 800;
  color: var(--accent-orange);
  letter-spacing: -0.5px;
}

.about p {
  margin: 0 0 14px;
  font-size: 15px;
  color: var(--text-dim);
}

.about p:last-child { margin-bottom: 0; }

/* Discord button. */
.discord-btn {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 100;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 20px;
  background: linear-gradient(135deg, #5865f2 0%, #7289da 100%);
  color: #fff;
  text-decoration: none;
  font-weight: 700;
  font-size: 14px;
  border-radius: 999px;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  box-shadow: 0 8px 22px rgba(88, 101, 242, 0.4);
}

.discord-btn:hover,
.discord-btn:focus-visible {
  transform: translateY(-2px) scale(1.05);
  box-shadow: 0 12px 30px rgba(88, 101, 242, 0.55);
  outline: none;
}

.discord-btn .icon {
  width: 20px;
  height: 20px;
  fill: currentColor;
}

/* Social row. */
.social {
  display: flex;
  justify-content: center;
  gap: 18px;
  padding: 36px 16px 8px;
}

.social a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--surface);
  border: 2px solid var(--border-soft);
  color: var(--text-dim);
  box-shadow: var(--shadow-sm);
  transition: background 0.3s ease, color 0.3s ease,
              transform 0.3s ease, box-shadow 0.3s ease,
              border-color 0.3s ease;
}

.social a:hover,
.social a:focus-visible {
  background: var(--accent-orange);
  border-color: var(--accent-orange);
  color: #fff;
  transform: translateY(-4px) scale(1.08);
  box-shadow: 0 10px 24px rgba(249, 115, 22, 0.4);
  outline: none;
}

.social svg {
  width: 22px;
  height: 22px;
  fill: currentColor;
}

/* Footer. */
footer {
  text-align: center;
  padding: 28px 16px 40px;
  color: var(--text-dim);
  font-size: 13px;
  line-height: 1.7;
}

footer p { margin: 0; }

footer a {
  color: var(--text-dim);
  text-decoration: none;
  transition: color 0.2s ease;
}

footer a:hover,
footer a:focus-visible {
  color: var(--accent-orange);
  outline: none;
}

footer .sep {
  margin: 0 10px;
  color: var(--text-dim);
  opacity: 0.5;
}

@media (prefers-reduced-motion: reduce) {
  body::before,
  body::after,
  .hero__bulb,
  .hero__tile,
  .hero__block,
  .hero__sparkle,
  .feature__icon,
  .card { animation: none; }

  .card:hover,
  .card:focus-visible { transform: translateY(-4px); }
}
