/* FudliGames hub: the front door to four game pages.
 *
 * The hub keeps itself quiet (one dark ground, one type scale) so the colour
 * comes from the portals, each painted in its game's palette from
 * site/games/<id>/landing.css and minecraft.html. The scenes are CSS only:
 * a hint of the game's world, not a copy of its page.
 */
:root {
  --ink: #f3f1ea;
  --ink-soft: #b8b8ad;
  --bg: #0b0c0a;
  --line: rgba(243, 241, 234, 0.12);
  --maxw: 1120px;
  --display: "Bricolage Grotesque", "Inter Tight", system-ui, sans-serif;
  --sans: "Inter Tight", system-ui, -apple-system, "Segoe UI", sans-serif;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: var(--sans); color: var(--ink); background: var(--bg); line-height: 1.5; -webkit-font-smoothing: antialiased; }
a { color: inherit; }
.wrap { width: min(var(--maxw), 100% - 40px); margin-inline: auto; }

.nav { position: sticky; top: 0; z-index: 5; background: var(--bg); border-bottom: 1px solid var(--line); }
.nav-inner { display: flex; align-items: center; justify-content: space-between; min-height: 62px; gap: 16px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-family: var(--display); font-weight: 700; font-size: 19px; text-decoration: none; }
.nav-right { display: flex; align-items: center; gap: 18px; }
.txt-link { font-size: 14.5px; color: var(--ink-soft); text-decoration: none; }
.txt-link:hover { color: var(--ink); }
.btn { display: inline-flex; align-items: center; min-height: 40px; padding: 0 16px; border-radius: 10px; background: var(--ink); color: #121310; font-weight: 600; font-size: 14.5px; text-decoration: none; }
.btn:hover { background: #fff; }

.hero { padding: 72px 0 40px; max-width: 760px; margin-left: max(20px, (100% - var(--maxw)) / 2); }
.hero h1 { font-family: var(--display); font-size: clamp(36px, 6vw, 64px); line-height: 1.03; letter-spacing: -0.02em; }
.lead { margin-top: 18px; font-size: clamp(16.5px, 1.6vw, 19px); color: var(--ink-soft); max-width: 56ch; }

.portals { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; padding-bottom: 72px; }
.portal { position: relative; display: flex; flex-direction: column; min-height: 360px; border-radius: 22px; overflow: hidden; text-decoration: none; isolation: isolate; transition: transform .2s ease-out; }
.portal:hover { transform: translateY(-3px); }
.portal:focus-visible { outline: 3px solid var(--ink); outline-offset: 4px; }
.portal-scene { position: relative; flex: 1 1 auto; min-height: 170px; overflow: hidden; }
.portal-scene i { position: absolute; display: block; }
.portal-body { position: relative; display: grid; gap: 8px; padding: 22px 24px 24px; background: var(--card); color: var(--card-ink); }
.portal-body img { width: 40px; height: 40px; margin-top: -46px; }
.portal-body b { font-family: var(--display); font-size: 27px; line-height: 1.1; }
.portal-body span { font-size: 15.5px; max-width: 46ch; color: var(--card-soft); }
.portal-body small { font-size: 14px; font-weight: 600; color: var(--card-accent); }

/* Minecraft: midday over a voxel ridge, as on minecraft.html */
.portal-minecraft { --card: #12160e; --card-ink: #f5f0e1; --card-soft: #c9c6b6; --card-accent: #c4f53b; }
.portal-minecraft .portal-scene { background: #8fcdf0; }
.mc-block { width: 34%; aspect-ratio: 1; bottom: -18%; background: linear-gradient(#8bd23a 0 22%, #7a5534 22% 100%); box-shadow: inset -14px -14px 0 rgba(0,0,0,.14); }
.mc-a { left: -4%; } .mc-b { left: 30%; bottom: -2%; } .mc-c { left: 64%; bottom: -26%; }

/* Satisfactory: a belt under a ringed teal planet */
.portal-satisfactory { --card: #0b1b20; --card-ink: #f6efe4; --card-soft: #c3cbc6; --card-accent: #ffc233; }
.portal-satisfactory .portal-scene { background: #071521; }
.sf-planet { position: absolute; width: 46%; right: 6%; top: 8%; overflow: visible; }
/* The belt's rails are the outer box, the moving slats are the inner one, so
   only the slats animate. */
.sf-belt { left: 0; right: 0; bottom: 18px; height: 34px; padding: 4px 0; background: #ff8a2a; }
.sf-belt::before { content: ""; display: block; height: 100%; background: repeating-linear-gradient(90deg, #24383f 0 22px, #35505a 22px 26px); animation: belt 2.4s linear infinite; }
@keyframes belt { to { background-position: 26px 0; } }

/* Valheim: aurora over a fjord ridge */
.portal-valheim { --card: #0e1621; --card-ink: #eef3f8; --card-soft: #b4c2d0; --card-accent: #ffb257; }
.portal-valheim .portal-scene { background: #0a1424; }
.vh-sky { position: absolute; inset: 0; width: 100%; height: 100%; }

/* Palworld: a sunny sea with a flat sun */
.portal-palworld { --card: #fff7e6; --card-ink: #10303f; --card-soft: #2b4556; --card-accent: #b5401c; }
.portal-palworld .portal-scene { background: #a6def2; }
.pw-sun { width: 30%; aspect-ratio: 1; left: 12%; top: 16%; border-radius: 50%; background: #ffd34d; }
.pw-sea { left: 0; right: 0; bottom: 0; height: 34%; background: #149fc4; -webkit-mask: radial-gradient(18px 12px at 50% 0, transparent 98%, #000) 0 0 / 36px 100% repeat-x; mask: radial-gradient(18px 12px at 50% 0, transparent 98%, #000) 0 0 / 36px 100% repeat-x; }

.how { padding: 0 0 80px; }
.how h2 { font-family: var(--display); font-size: clamp(26px, 3.4vw, 36px); margin-bottom: 22px; }
.how-list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px; border-top: 1px solid var(--line); padding-top: 24px; }
.how-list dt { font-weight: 700; font-size: 17px; margin-bottom: 6px; }
.how-list dd { color: var(--ink-soft); font-size: 15.5px; max-width: 38ch; }

.footer { border-top: 1px solid var(--line); padding: 28px 0 40px; color: var(--ink-soft); font-size: 14px; }
.footer-inner { display: flex; flex-wrap: wrap; gap: 14px 28px; align-items: center; justify-content: space-between; }
.footer-brand { font-family: var(--display); font-weight: 700; color: var(--ink); }
.footer-links { display: flex; gap: 18px; }

@media (max-width: 760px) {
  .hero { padding: 44px 0 28px; margin-left: 20px; margin-right: 20px; }
  .portals { grid-template-columns: 1fr; gap: 14px; padding-bottom: 52px; }
  .portal { min-height: 0; }
  .portal-scene { min-height: 132px; flex: none; }
  .portal-body { padding: 20px; }
  .portal-body b { font-size: 24px; }
  .how-list { grid-template-columns: 1fr; gap: 18px; }
  .nav-right { gap: 12px; }
}
@media (prefers-reduced-motion: reduce) {
  .sf-belt::before { animation: none; }
  .portal { transition: none; }
  .portal:hover { transform: none; }
}
