/* Home: moonlit night sky. */
body { background: radial-gradient(1200px 700px at 80% -10%, #16305e 0%, transparent 60%), var(--bg); }

.home-hero { background: radial-gradient(900px 600px at 75% 40%, rgba(140, 180, 255, .14), transparent 70%); }
.hero-grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: 40px; align-items: center; }
.aurora {
  position: absolute; inset: -20% -10% auto -10%; height: 70%; z-index: -1; filter: blur(60px); opacity: .55;
  background: conic-gradient(from 200deg at 60% 40%, transparent, #2f6fff44, #f2c46b26, transparent 60%);
  animation: drift 18s ease-in-out infinite alternate;
}
@keyframes drift { to { transform: translate3d(-6%, 4%, 0) rotate(8deg); } }

.moon-stage { position: relative; aspect-ratio: 1; width: min(100%, 440px); justify-self: center; }
.moon { width: 100%; height: 100%; filter: drop-shadow(0 0 60px rgba(243, 223, 178, .35)) drop-shadow(0 0 140px rgba(242, 196, 107, .3)); animation: float 7s ease-in-out infinite; }
@keyframes float { 50% { transform: translateY(-14px) rotate(-2deg); } }
.moon-ring { position: absolute; inset: -9%; border-radius: 50%; border: 1px dashed rgba(242, 196, 107, .3); animation: spin 60s linear infinite; }
.moon-ring::before { content: ""; position: absolute; top: 12%; left: 6%; width: 10px; height: 10px; border-radius: 50%; background: var(--accent-2); box-shadow: 0 0 18px var(--accent-2); }
@keyframes spin { to { transform: rotate(360deg); } }
/* Grandia's own battle item icons (16x16, from Shared Battle Sprites 1) circling the moon. Each ring carries one
   item around (.orbit spins) while the item tumbles on its own axis at its own pace (.orbit img), as if in free fall. */
.orbit { position: absolute; inset: var(--r, -6%); border-radius: 50%; animation: spin var(--t, 14s) linear infinite; animation-delay: var(--p, 0s); pointer-events: none; }
.orbit img { position: absolute; top: 0; left: 50%; width: 64px; height: 64px; max-width: none; margin: -32px 0 0 -32px; image-rendering: pixelated;
  filter: drop-shadow(0 0 10px rgba(242, 196, 107, .45)); animation: tumble var(--s, 6s) linear infinite; animation-delay: var(--p, 0s); }
.orbit--ccw { animation-name: spin-rev; }
.orbit--ccw img { animation-name: tumble-rev; }
.orbit--sword { --r: -8%; --t: 16s; --s: 5s; }
.orbit--axe { --r: -12%; --t: 21s; --p: -8s; --s: 7s; }
.orbit--boomerang { --r: -4%; --t: 12s; --p: -4s; --s: 2.4s; }
.orbit--shield { --r: -10%; --t: 19s; --p: -13s; --s: 9s; }
.orbit--chest { --r: 2%; --t: 25s; --p: -18s; --s: 11s; }
@keyframes spin-rev { to { transform: rotate(-360deg); } }
@keyframes tumble { to { transform: rotate(360deg); } }
@keyframes tumble-rev { to { transform: rotate(-360deg); } }
@media (max-width: 900px) { .orbit img { width: 48px; height: 48px; margin: -24px 0 0 -24px; } }
@media (prefers-reduced-motion: reduce) { .orbit, .orbit img { animation: none; } }

.shots-marquee { padding: 8px 0 24px; }
.shots-marquee img { height: 150px; width: auto; border-radius: 12px; border: 1px solid var(--border); opacity: .9; }

.tile .hover-video { opacity: 0; transition: opacity .5s; }
.tile:hover .hover-video { opacity: 1; }

.feature .frame { transform: rotate(1.2deg); }
.feature .frame:hover { transform: rotate(0); transition: transform .5s; }

.games-teaser { overflow: hidden; }
.teaser { position: relative; border-radius: 28px; overflow: hidden; border: 1px solid rgba(255, 138, 61, .35); min-height: 480px; display: flex; align-items: center; box-shadow: 0 40px 100px -40px rgba(255, 138, 61, .45); isolation: isolate; }
.teaser > img:first-child { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -1; filter: brightness(.65) hue-rotate(-15deg); transform: scale(1.04); transition: transform 6s ease; }
.teaser:hover > img:first-child { transform: scale(1.1); }
.teaser::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg, rgba(7, 17, 31, .95) 0%, rgba(7, 17, 31, .6) 50%, transparent 85%); }
.teaser-body { padding: clamp(28px, 5vw, 56px); max-width: 540px; }
.teaser-body .eyebrow { color: #6ff0ff; }
.teaser-body h2 { font-family: "Lilita One", sans-serif; font-weight: 400; color: #fff; text-shadow: 0 5px 0 #7a2e10, 0 0 30px rgba(255, 138, 61, .6); }
.teaser-body p { color: #f4e6d6; }
.teaser .btn { --b: #ff8a3d; --glow: rgba(255, 138, 61, .5); color: #2a1004; }
.teaser-cards { position: absolute; right: 26%; top: 50%; transform: translateY(-50%); display: flex; }
.teaser-cards img { width: 130px; border-radius: 14px; border: 3px solid #fff3; margin-left: -40px; box-shadow: 0 16px 30px rgba(0, 0, 0, .6); transform-origin: 50% 150%; animation: fan 5s ease-in-out infinite alternate; }
.teaser-cards img:nth-child(1) { --r: -14deg; } .teaser-cards img:nth-child(2) { --r: 0deg; animation-delay: -1.6s; } .teaser-cards img:nth-child(3) { --r: 14deg; animation-delay: -3.2s; }
@keyframes fan { from { transform: rotate(var(--r)); } to { transform: rotate(var(--r)) translateY(-14px); } }
.teaser-wizard { position: absolute; right: 4%; bottom: 0; width: 220px; filter: drop-shadow(0 0 24px rgba(255, 138, 61, .6)); }
@media (max-width: 900px) { .teaser-cards, .teaser-wizard { display: none; } }

.about-art { position: relative; min-height: 340px; border-radius: var(--radius); background: radial-gradient(circle at 50% 120%, #1d3a70 0%, #0c1a2e 60%); border: 1px solid var(--border); overflow: hidden; display: grid; place-items: end center; padding-bottom: 30px; }
.sprite-parade { display: flex; gap: 22px; align-items: flex-end; animation: parade 16s linear infinite; }
.sprite-parade img { height: 110px; width: auto; transform: scaleX(-1); }
@keyframes parade { from { transform: translateX(-60%); } to { transform: translateX(60%); } }
.about-art .carrion { position: absolute; top: 18px; right: 18px; width: 140px; opacity: .9; filter: drop-shadow(0 0 20px rgba(242, 196, 107, .25)); }

.support-strip {
  display: flex; align-items: center; gap: 20px; padding: 22px 26px; border-radius: 22px; text-decoration: none;
  background: linear-gradient(110deg, rgba(242, 196, 107, .12), rgba(243, 223, 178, .08)); border: 1px solid var(--border);
}
.support-strip div { flex: 1; display: grid; gap: 2px; }
.support-strip b { font: 600 1.1rem/1.2 var(--font-display); }
.support-strip span { color: var(--muted); }
.support-strip .btn { color: var(--text); }
.support-strip:hover img { transform: rotate(-12deg); }
.support-strip img { transition: transform .5s; }

@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; }
  .moon-stage { width: min(70%, 300px); order: -1; }
  .support-strip { flex-wrap: wrap; }
}

.home-hero .title-xl { font-size: clamp(2.3rem, 5vw, 4.2rem); }


/* the hero line is a full sentence, so it runs one pixel-font step (48px) below the other page titles */
@media (min-width: 481px) { body[data-page="home"] .home-hero .title-xl { font-size: 48px; } }

/* "See games": a greyed-out placeholder until the games page opens */
.btn--soon { flex-direction: column; justify-content: center; gap: 3px; padding-block: 7px; line-height: 1.1; opacity: .45; cursor: default; pointer-events: none; }
.btn--soon small { font-size: .68rem; font-weight: 500; letter-spacing: .04em; color: var(--muted); }

/* site.js runs the orbits as a physics toy: the rings stop spinning and each item is placed and turned from script */
.moon-stage.is-sim .orbit { animation: none; inset: 0; }
.moon-stage.is-sim .orbit img { top: 50%; animation: none; pointer-events: auto; cursor: pointer; touch-action: none; will-change: transform; }
.moon-stage.is-sim .orbit img:hover { filter: drop-shadow(0 0 14px rgba(255, 220, 140, .9)) brightness(1.15); }

/* "Who am I?": a stand-in portrait (an unused Saturn face from Grandia, 64x64 shown at 4x) until there's a photo */
.who-art { margin: 0; justify-self: center; width: min(100%, 340px); aspect-ratio: 1; border-radius: 50%; display: grid; place-items: center;
  background: radial-gradient(circle at 50% 40%, rgba(242, 196, 107, .22), rgba(12, 26, 46, .9) 62%); border: 1px solid var(--border);
  box-shadow: 0 0 80px rgba(242, 196, 107, .16); }
.who-art img { width: 256px; height: 256px; border-radius: 18px; image-rendering: pixelated; filter: drop-shadow(0 12px 24px rgba(0, 0, 0, .45)); }
@media (max-width: 480px) { .who-art img { width: 192px; height: 192px; } }
.about-text { max-width: 820px; }
