@font-face {
  font-family: "Griffy";
  src: url("fonts/Griffy-Regular.woff2") format("woff2");
  font-display: swap;
}
@font-face {
  font-family: "Fredoka";
  src: url("fonts/Fredoka.woff2") format("woff2");
  font-weight: 300 700;
  font-display: swap;
}

:root {
  --night: #1a1030;
  --night-2: #2a1840;
  --panel: #2e1d48;
  --panel-edge: #47306a;
  --cream: #fbf1dc;
  --muted: #c7b8e0;
  --gold: #f5c96a;
  --pink: #ff8fc8;
  --violet: #b57cf0;
  --steam: #5aa7e0;
  color-scheme: dark;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  background: var(--night);
  color: var(--cream);
  font: 400 18px/1.55 "Fredoka", system-ui, sans-serif;
  overflow-x: hidden;
}

/* Night sky: gradient, faint moon, twinkling stars and slow drifting clouds, fixed behind everything. */
.sky {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  background:
    radial-gradient(60vmax 40vmax at 85% -5%, #4a2c7a 0%, transparent 70%),
    linear-gradient(180deg, var(--night) 0%, var(--night-2) 60%, var(--night) 100%);
}

/* Crescent: a transparent disc whose offset shadow is the moon, plus a soft halo. */
.moon {
  position: absolute;
  top: 9vh;
  right: 9vw;
  width: clamp(90px, 13vw, 170px);
  aspect-ratio: 1;
  border-radius: 50%;
  box-shadow: calc(clamp(90px, 13vw, 170px) * 0.2) calc(clamp(90px, 13vw, 170px) * -0.08) 0 0 #f5c96a;
  opacity: 0.22;
  transform: rotate(-12deg);
  animation: moon-glow 9s ease-in-out infinite alternate;
}
.moon::after {
  content: "";
  position: absolute;
  inset: -60%;
  border-radius: 50%;
  background: radial-gradient(closest-side, #f5c96a40, transparent 70%);
}
@keyframes moon-glow { from { opacity: 0.18; } to { opacity: 0.28; } }

.stars { position: absolute; inset: 0; }
.stars i, .stars .sparkle {
  position: absolute;
  animation: twinkle ease-in-out infinite alternate;
}
.stars i { border-radius: 50%; background: #fff; box-shadow: 0 0 4px #fff8; }
.stars .sparkle { fill: var(--gold); filter: drop-shadow(0 0 4px #f5c96a99); }
@keyframes twinkle {
  0% { opacity: 0.15; transform: scale(0.7); }
  60% { opacity: 0.9; transform: scale(1); }
  100% { opacity: 0.35; transform: scale(0.85); }
}

/* Clouds: flat, very faint, drifting left to right and bobbing a little. */
.cloud {
  position: absolute;
  left: 0;
  fill: #e9dcff;
  animation: drift linear infinite, bob ease-in-out infinite alternate;
}
.c1 { top: 14vh; width: 260px; height: 117px; opacity: 0.06; animation-duration: 140s, 7s; animation-delay: -20s, 0s; }
.c2 { top: 38vh; width: 180px; height: 81px; opacity: 0.045; animation-duration: 190s, 9s; animation-delay: -110s, -3s; }
.c3 { top: 62vh; width: 320px; height: 144px; opacity: 0.05; animation-duration: 230s, 11s; animation-delay: -60s, -5s; }
.c4 { top: 82vh; width: 220px; height: 99px; opacity: 0.04; animation-duration: 170s, 8s; animation-delay: -150s, -2s; }
.c5 { top: 4vh; width: 150px; height: 68px; opacity: 0.05; animation-duration: 210s, 10s; animation-delay: -170s, -6s; }
@keyframes drift { from { translate: -360px 0; } to { translate: calc(100vw + 40px) 0; } }
@keyframes bob { from { transform: translateY(-6px); } to { transform: translateY(6px); } }

a { color: var(--gold); }

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

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.55em;
  padding: 0.7em 1.4em;
  border-radius: 999px;
  font: 600 1rem/1 "Fredoka", sans-serif;
  text-decoration: none;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn:focus-visible, .shots button:focus-visible, .socials a:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 3px;
}
.btn-ghost {
  color: var(--cream);
  border: 2px solid var(--panel-edge);
  background: #ffffff0a;
}
.btn-ghost:hover { border-color: var(--violet); }
.btn-steam {
  font-size: 1.25rem;
  padding: 0.85em 1.7em;
  color: #241431;
  background: linear-gradient(180deg, #ffe39a, var(--gold));
  box-shadow: 0 6px 0 #b8893a, 0 10px 30px #f5c96a55;
}
.btn-steam:hover { box-shadow: 0 8px 0 #b8893a, 0 14px 36px #f5c96a77; }
.btn-steam:active { transform: translateY(3px); box-shadow: 0 3px 0 #b8893a; }
.steam-icon { width: 1.4em; height: 1.4em; fill: currentColor; }

/* Top bar */
.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 1180px;
  margin: 0 auto;
  padding: 18px 16px;
}
.studio {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--cream);
  text-decoration: none;
}
.studio-logo { width: 44px; height: 44px; }
.studio-name { font: 600 1.15rem/1 "Fredoka", sans-serif; letter-spacing: 0.02em; }

/* Hero */
.hero {
  text-align: center;
  padding: 8px 16px 0;
}
.game-title { margin: 0 auto; max-width: 760px; }
.game-title img { width: 100%; height: auto; margin: -2% auto -4%; }
.pitch {
  max-width: 34em;
  margin: 0 auto 28px;
  font-size: 1.2rem;
  color: var(--muted);
}
.cta {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}
.soon { font-size: 0.95rem; color: var(--muted); }
.skull-row {
  margin: 24px -16px 0;
  -webkit-mask-image: linear-gradient(180deg, transparent 0%, #000 22%, #000 82%, transparent 100%);
  mask-image: linear-gradient(180deg, transparent 0%, #000 22%, #000 82%, transparent 100%);
}
.skull-row img { width: 100%; max-width: 1800px; height: auto; margin: 0 auto; }

/* Features */
.features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 18px;
  max-width: 1080px;
  margin: 16px auto 0;
  padding: 0 16px;
}
.feature {
  background: var(--panel);
  border: 2px solid var(--panel-edge);
  border-radius: 22px;
  padding: 20px 22px;
}
.feature h2 {
  margin: 0 0 6px;
  font: 400 1.6rem/1.15 "Griffy", serif;
  color: var(--gold);
}
.feature p { margin: 0; color: var(--muted); }

/* Gallery */
.section-title {
  font: 400 clamp(2rem, 5vw, 2.8rem)/1.1 "Griffy", serif;
  color: var(--cream);
  text-shadow: 0 0 18px #b57cf099;
  margin: 0 0 18px;
}
.gallery {
  max-width: 1180px;
  margin: 72px auto 0;
  padding: 0 16px;
  text-align: center;
}
.shots {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 14px;
}
.shots button {
  display: block;
  width: 100%;
  padding: 0;
  border: 3px solid var(--panel-edge);
  border-radius: 16px;
  overflow: hidden;
  background: var(--panel);
  cursor: zoom-in;
  transition: transform 0.15s ease, border-color 0.15s ease;
}
.shots button:hover { transform: translateY(-3px) rotate(-0.4deg); border-color: var(--pink); }
.shots img { width: 100%; height: auto; }

/* Lightbox */
.lightbox {
  padding: 0;
  border: 0;
  background: transparent;
  max-width: min(1600px, 94vw);
  max-height: 92vh;
}
.lightbox::backdrop { background: #0d0718e6; }
.lightbox img { border-radius: 14px; max-height: 88vh; width: auto; cursor: zoom-out; }
.lightbox .close {
  position: fixed;
  top: 12px;
  right: 16px;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 50%;
  background: var(--panel);
  color: var(--cream);
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
}

/* Discord callout */
.discord {
  display: flex;
  align-items: center;
  gap: 28px;
  max-width: 1000px;
  margin: 88px auto 0;
  padding: 30px 34px;
  border-radius: 28px;
  background:
    radial-gradient(120% 140% at 0% 0%, #6d5cf233 0%, transparent 60%),
    linear-gradient(135deg, #3a2466, #2e1d48);
  border: 2px solid #7a63d8;
  box-shadow: 0 0 40px #7a63d84d;
}
.discord-badge {
  flex: none;
  display: grid;
  place-items: center;
  width: 88px;
  height: 88px;
  border-radius: 26px;
  background: #5865f2;
  box-shadow: 0 6px 0 #3c45b8;
  transform: rotate(-6deg);
}
.discord-icon { width: 54px; height: 54px; fill: #fff; }
.discord-text { flex: 1; }
.discord-text .section-title { margin-bottom: 8px; }
.discord-text p { margin: 0; color: var(--muted); }
.btn-discord {
  flex: none;
  font-size: 1.15rem;
  padding: 0.85em 1.5em;
  color: #fff;
  background: #5865f2;
  box-shadow: 0 6px 0 #3c45b8, 0 10px 30px #5865f255;
}
.btn-discord:hover { box-shadow: 0 8px 0 #3c45b8, 0 14px 36px #5865f277; }
.btn-discord:active { transform: translateY(3px); box-shadow: 0 3px 0 #3c45b8; }
.btn-icon { width: 1.35em; height: 1.35em; fill: currentColor; }
.soon a { color: var(--gold); }

/* About */
.about {
  display: flex;
  gap: 28px;
  align-items: center;
  max-width: 860px;
  margin: 88px auto 0;
  padding: 28px;
  background: var(--panel);
  border: 2px solid var(--panel-edge);
  border-radius: 28px;
}
.about-logo { width: 96px; height: 96px; flex: none; }
.about p { margin: 0 0 18px; color: var(--muted); }
.about .section-title { margin-bottom: 10px; }

/* Footer */
.footer {
  text-align: center;
  padding: 64px 16px 40px;
  color: var(--muted);
}
.footer p { margin: 8px 0; }
.socials {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-bottom: 18px;
}
.socials a {
  padding: 0.5em 1.1em;
  border-radius: 999px;
  border: 2px solid var(--panel-edge);
  color: var(--cream);
  text-decoration: none;
  font-weight: 500;
}
.socials a:hover { border-color: var(--pink); color: var(--pink); }
.small { font-size: 0.85rem; opacity: 0.8; }

@media (max-width: 900px) and (min-width: 641px) {
  .discord { flex-wrap: wrap; margin-left: 16px; margin-right: 16px; }
  .discord-text { flex-basis: calc(100% - 120px); }
  .btn-discord { margin-left: 116px; }
}

@media (max-width: 640px) {
  body { font-size: 17px; }
  .moon { top: 26vh; right: 6vw; }
  .studio-name { font-size: 1rem; }
  .pitch { font-size: 1.05rem; }
  .discord { flex-direction: column; text-align: center; margin: 64px 16px 0; padding: 26px 20px; gap: 18px; }
  .about { flex-direction: column; text-align: center; margin: 64px 16px 0; padding: 22px; }
  .gallery { margin-top: 56px; }
  .shots { grid-template-columns: repeat(2, 1fr); gap: 8px; }
  .shots button { border-width: 2px; border-radius: 10px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn, .shots button { transition: none; }
  .moon, .stars i, .stars .sparkle, .cloud { animation: none; }
  .cloud { translate: 20vw 0; }
  .c2 { translate: 70vw 0; } .c3 { translate: 45vw 0; } .c4 { translate: 5vw 0; } .c5 { translate: 55vw 0; }
}
