/* Home page (template_home.php). Everything is scoped to #homepage / .hp-* so the rest of the site is untouched. */

#homepage {
  --hp-bg: #0b0d1a;
  --hp-bg-alt: #111428;
  --hp-surface: #171b33;
  --hp-surface-2: #1d2240;
  --hp-line: rgba(255, 255, 255, .08);
  --hp-text: #eef0ff;
  --hp-muted: #a3a7c7;
  --hp-purple: #9834fe;
  --hp-purple-light: #c79bff;
  --hp-cyan: #2ee6ff;
  --hp-pink: #ff4fa3;
  --hp-display: "Inter", "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
  --hp-ease: cubic-bezier(.2, .8, .2, 1);
}

/* Full-bleed home page (the shared layout rules are in theme.css) */
#homepage.page { background: var(--hp-bg); }

.hp { color: var(--hp-text); }
.hp-wrap { max-width: 1200px; margin: 0 auto; padding: 0 24px; position: relative; }
.hp-sr { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.hp a { color: inherit; }
.hp a:hover { text-decoration: none; }
.hp h2, .hp h3, .hp-title { font-family: var(--hp-display); }

/* ---------- Buttons & links ---------- */
.hp-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 22px; border-radius: 999px; border: 1px solid transparent;
  font-family: var(--hp-display); font-weight: 700; font-size: 15px; letter-spacing: .01em;
  cursor: pointer; white-space: nowrap; transition: transform .25s var(--hp-ease), box-shadow .25s, background .25s, border-color .25s;
}
.hp-btn-primary { color: #fff !important; background: linear-gradient(135deg, #a64bff, #7b2cf5 55%, #5b2cf5); box-shadow: 0 8px 30px -8px rgba(152, 52, 254, .7), inset 0 1px 0 rgba(255,255,255,.25); }
.hp-btn-primary:hover { transform: translateY(-2px); box-shadow: 0 14px 40px -10px rgba(152, 52, 254, .9), inset 0 1px 0 rgba(255,255,255,.25); }
.hp-btn-ghost { color: var(--hp-text) !important; border-color: rgba(199, 155, 255, .35); background: rgba(152, 52, 254, .08); }
.hp-btn-ghost:hover { border-color: var(--hp-purple-light); background: rgba(152, 52, 254, .18); transform: translateY(-2px); }
.hp-link { color: var(--hp-purple-light) !important; font-weight: 600; white-space: nowrap; }
.hp-link span { display: inline-block; transition: transform .25s var(--hp-ease); }
.hp-link:hover span { transform: translateX(4px); }

/* ---------- Hero ---------- */
.hp-hero { position: relative; isolation: isolate; padding: 72px 0 0; background: radial-gradient(120% 80% at 50% 0%, #1a1240 0%, var(--hp-bg) 60%); overflow: hidden; }
/* clip-path (not just overflow) so the blurred blobs and the 3D grid can't paint outside the hero in any browser */
.hp-hero-bg { position: absolute; inset: 0; z-index: -1; pointer-events: none; clip-path: inset(0); }

.hp-blob { position: absolute; border-radius: 50%; filter: blur(80px); opacity: .55; will-change: transform; }
.hp-blob-1 { width: 520px; height: 520px; left: -120px; top: -160px; background: var(--hp-purple); animation: hp-drift-1 18s ease-in-out infinite alternate; }
.hp-blob-2 { width: 420px; height: 420px; right: -80px; top: 40px; background: #3b2cf5; opacity: .45; animation: hp-drift-2 22s ease-in-out infinite alternate; }
.hp-blob-3 { width: 360px; height: 360px; left: 40%; bottom: -160px; background: var(--hp-pink); opacity: .25; animation: hp-drift-3 20s ease-in-out infinite alternate; }
@keyframes hp-drift-1 { to { transform: translate(160px, 90px) scale(1.15); } }
@keyframes hp-drift-2 { to { transform: translate(-140px, 120px) scale(.9); } }
@keyframes hp-drift-3 { to { transform: translate(-180px, -60px) scale(1.2); } }

/* Synthwave floor: a perspective grid that scrolls towards the viewer */
.hp-grid {
  position: absolute; left: -50%; right: -50%; bottom: 0; height: 66%;
  background-image:
    linear-gradient(rgba(152, 52, 254, .5) 1px, transparent 1px),
    linear-gradient(90deg, rgba(152, 52, 254, .5) 1px, transparent 1px);
  background-size: 64px 64px;
  transform: perspective(500px) rotateX(62deg);
  transform-origin: 50% 100%;
  -webkit-mask-image: linear-gradient(to top, #000 0%, #000 30%, rgba(0,0,0,.6) 60%, transparent 92%);
  mask-image: linear-gradient(to top, #000 0%, #000 30%, rgba(0,0,0,.6) 60%, transparent 92%);
  animation: hp-grid 3s linear infinite;
}
@keyframes hp-grid { to { background-position: 0 64px, 0 0; } }
.hp-noise {
  position: absolute; inset: 0; opacity: .07; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

.hp-hero-inner { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); gap: 40px; align-items: center; min-height: 600px; }
.hp-hero-copy { position: relative; z-index: 2; padding-bottom: 88px; }

/* Staggered entrance (pure CSS, so it never depends on JavaScript) */
.hp-in { animation: hp-in .9s var(--hp-ease) both; animation-delay: calc(var(--d, 0) * 90ms + 100ms); }
@keyframes hp-in { from { opacity: 0; transform: translateY(24px); filter: blur(6px); } to { opacity: 1; transform: none; filter: none; } }

.hp-eyebrow {
  display: inline-flex; align-items: center; gap: 10px; margin: 0 0 22px; padding: 7px 14px 7px 12px;
  border-radius: 999px; border: 1px solid rgba(199, 155, 255, .25); background: rgba(152, 52, 254, .1);
  color: var(--hp-purple-light); font-size: 13px; letter-spacing: .02em; backdrop-filter: blur(8px);
}
.hp-live-dot { position: relative; display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: #3dffa2; box-shadow: 0 0 10px #3dffa2; flex: none; }
.hp-live-dot::after { content: ""; position: absolute; inset: 0; border-radius: 50%; background: #3dffa2; animation: hp-ping 1.8s cubic-bezier(0, 0, .2, 1) infinite; }
@keyframes hp-ping { 75%, 100% { transform: scale(3); opacity: 0; } }

.hp-title { margin: 0; color: #fff; }
.hp-title-kicker { display: block; font-size: 15px; font-weight: 700; letter-spacing: .18em; text-transform: uppercase; color: var(--hp-muted); margin-bottom: 14px; }
.hp-title-main { display: block; font-size: clamp(44px, 7.2vw, 92px); line-height: .95; font-weight: 900; letter-spacing: -.045em; }
.hp-gradient-text {
  background: linear-gradient(100deg, var(--hp-purple-light) 0%, var(--hp-purple) 30%, var(--hp-cyan) 55%, var(--hp-pink) 80%, var(--hp-purple-light) 100%);
  background-size: 250% 100%; -webkit-background-clip: text; background-clip: text; color: transparent;
  animation: hp-shine 6s linear infinite; padding-right: .06em;
}
@keyframes hp-shine { to { background-position: -250% 0; } }

/* "Copy their exact <word>": the words roll by vertically */
.hp-rotator-line { margin: 18px 0 0; font-family: var(--hp-display); font-size: clamp(22px, 2.6vw, 32px); font-weight: 700; color: #fff; letter-spacing: -.02em; display: flex; flex-wrap: wrap; align-items: baseline; gap: .3em; }
.hp-rotator { display: inline-block; height: 1.2em; line-height: 1.2em; overflow: hidden; vertical-align: bottom; }
.hp-rotator-track { display: flex; flex-direction: column; animation: hp-rotate 10s var(--hp-ease) infinite; }
.hp-rotator-track span { display: block; height: 1.2em; color: var(--hp-cyan); text-shadow: 0 0 24px rgba(46, 230, 255, .5); }
@keyframes hp-rotate {
  0%, 16% { transform: translateY(0); }
  20%, 36% { transform: translateY(-1.2em); }
  40%, 56% { transform: translateY(-2.4em); }
  60%, 76% { transform: translateY(-3.6em); }
  80%, 96% { transform: translateY(-4.8em); }
  100% { transform: translateY(-6em); }
}

.hp-lead { margin: 20px 0 28px; max-width: 560px; color: var(--hp-muted); font-size: 17px; line-height: 1.65; }
.hp-lead strong { color: #fff; font-weight: 600; }

/* Search */
.hp-search {
  position: relative; display: flex; align-items: center; max-width: 560px; padding: 6px 6px 6px 48px;
  border-radius: 999px; background: rgba(13, 15, 32, .75); border: 1px solid rgba(199, 155, 255, .25);
  box-shadow: 0 20px 60px -20px rgba(0,0,0,.8), 0 0 0 0 rgba(152, 52, 254, 0); backdrop-filter: blur(12px);
  transition: border-color .3s, box-shadow .3s;
}
.hp-search::before {
  content: ""; position: absolute; inset: -1px; border-radius: inherit; padding: 1px; pointer-events: none;
  background: conic-gradient(from var(--hp-angle, 0deg), transparent 0 70%, var(--hp-purple) 80%, var(--hp-cyan) 90%, transparent 100%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude;
  animation: hp-spin 4s linear infinite;
}
@property --hp-angle { syntax: "<angle>"; initial-value: 0deg; inherits: false; }
@keyframes hp-spin { to { --hp-angle: 360deg; } }
.hp-search:focus-within { border-color: var(--hp-purple-light); box-shadow: 0 20px 60px -20px rgba(0,0,0,.8), 0 0 0 4px rgba(152, 52, 254, .25); }
.hp-search-icon { position: absolute; left: 18px; width: 20px; height: 20px; fill: none; stroke: var(--hp-muted); stroke-width: 2; stroke-linecap: round; }
#homepage .hp-search input[type="search"] {
  flex: 1; min-width: 0; width: auto; padding: 12px 8px; border: 0; border-radius: 0; background: transparent; box-shadow: none;
  color: #fff; font-size: 16px; font-family: inherit; -webkit-box-sizing: border-box; box-sizing: border-box;
}
#homepage .hp-search input[type="search"]:focus { width: auto; background: transparent; border: 0; box-shadow: none; }
#homepage .hp-search input::placeholder { color: #7d82a8; }
.hp-kbd { margin-right: 10px; padding: 2px 8px; border-radius: 6px; border: 1px solid var(--hp-line); background: rgba(255,255,255,.04); color: var(--hp-muted); font-size: 12px; font-family: inherit; box-shadow: none; }
.hp-search .hp-btn { padding: 12px 22px; }
.hp-search .dropdown-menu { top: calc(100% + 8px) !important; left: 32px !important; border-radius: 14px; border: 1px solid var(--hp-line); background: #161a33; overflow: hidden; }

.hp-trending { margin: 18px 0 0; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 14px; }
.hp-trending-label { color: var(--hp-muted); margin-right: 2px; }
.hp-trending a { padding: 4px 12px; border-radius: 999px; background: rgba(255,255,255,.05); border: 1px solid var(--hp-line); color: #dfe1f5 !important; transition: background .2s, border-color .2s, transform .2s; }
.hp-trending a:hover { background: rgba(152, 52, 254, .2); border-color: rgba(199, 155, 255, .5); transform: translateY(-1px); }

.hp-stats { display: flex; flex-wrap: wrap; gap: 14px 36px; margin: 38px 0 0; }
.hp-stats > div { position: relative; padding-left: 16px; }
.hp-stats > div::before { content: ""; position: absolute; left: 0; top: 4px; bottom: 4px; width: 3px; border-radius: 3px; background: linear-gradient(var(--hp-purple), var(--hp-cyan)); }
.hp-stats dd { order: -1; margin: 0; font-family: var(--hp-display); font-size: 32px; font-weight: 800; line-height: 1.1; color: #fff; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.hp-stats dt { font-weight: 400; font-size: 13px; color: var(--hp-muted); }
.hp-stats > div { display: flex; flex-direction: column; }

/* Portrait wall: three tilted columns that scroll endlessly */
.hp-wall { position: relative; height: 640px; align-self: stretch; perspective: 1400px; margin: 0 calc(-24px - (100vw - min(100vw, 1200px)) / 2) 0 -80px; -webkit-mask-image: linear-gradient(to bottom, transparent, #000 14%, #000 80%, transparent); mask-image: linear-gradient(to bottom, transparent, #000 14%, #000 80%, transparent); }
.hp-wall-stage {
  position: absolute; inset: -60px 40px -60px 100px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px;
  transform: rotateX(18deg) rotateY(-16deg) rotateZ(6deg) translate3d(calc(var(--px, 0) * -14px), calc(var(--py, 0) * -14px), 0);
  transform-style: preserve-3d; transition: transform .6s var(--hp-ease);
  animation: hp-wall-in 1.4s var(--hp-ease) .3s both;
}
@keyframes hp-wall-in { from { opacity: 0; transform: rotateX(40deg) rotateY(-30deg) rotateZ(10deg) translateY(120px); } }
.hp-wall-col { overflow: hidden; }
.hp-wall-track { display: flex; flex-direction: column; gap: 16px; animation: hp-scroll-up 38s linear infinite; }
.hp-wall-col-1 .hp-wall-track { animation-name: hp-scroll-down; animation-duration: 44s; margin-top: -60px; }
.hp-wall-col-2 .hp-wall-track { animation-duration: 34s; margin-top: 40px; }
.hp-wall:hover .hp-wall-track { animation-play-state: paused; }
@keyframes hp-scroll-up { to { transform: translateY(calc(-50% - 8px)); } }
@keyframes hp-scroll-down { from { transform: translateY(calc(-50% - 8px)); } to { transform: translateY(0); } }
.hp-wall-card { position: relative; margin: 0; border-radius: 16px; overflow: hidden; background: var(--hp-surface); box-shadow: 0 20px 40px -18px rgba(0,0,0,.9), 0 0 0 1px rgba(255,255,255,.06); }
.hp-wall-card img { display: block; width: 100% !important; height: auto; aspect-ratio: 333 / 445; object-fit: cover; }
.hp-wall-card picture { display: block; }
.hp-wall-card figcaption { position: absolute; left: 0; right: 0; bottom: 0; padding: 26px 12px 10px; font-family: var(--hp-display); font-weight: 700; font-size: 14px; background: linear-gradient(transparent, rgba(5, 6, 15, .9)); }

/* Game name ticker under the hero */
.hp-marquee { position: relative; border-top: 1px solid rgba(199, 155, 255, .14); border-bottom: 1px solid rgba(199, 155, 255, .14); background: rgba(8, 9, 20, .35); overflow: hidden; padding: 16px 0; -webkit-mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent); mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent); }
.hp-marquee-track { display: flex; width: max-content; animation: hp-marquee 40s linear infinite; }
.hp-marquee span { font-family: var(--hp-display); font-weight: 800; font-size: 20px; text-transform: uppercase; letter-spacing: .06em; color: transparent; -webkit-text-stroke: 1px rgba(199, 155, 255, .55); white-space: nowrap; padding: 0 28px; position: relative; }
.hp-marquee span::after { content: "✦"; position: absolute; right: -8px; color: var(--hp-purple); -webkit-text-stroke: 0; font-size: 14px; top: 50%; transform: translateY(-50%); }
@keyframes hp-marquee { to { transform: translateX(-50%); } }

/* ---------- Sections ---------- */
.hp-section { position: relative; padding: 96px 0; }
.hp-section-alt { background: var(--hp-bg-alt); }
.hp-section-alt::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 1px; background: linear-gradient(90deg, transparent, rgba(152, 52, 254, .5), transparent); }
.hp-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 36px; }
.hp-head-center { justify-content: center; text-align: center; }
.hp-head h2 { margin: 0; font-size: clamp(28px, 3.6vw, 44px); font-weight: 800; letter-spacing: -.03em; line-height: 1.1; color: #fff; }
.hp-overline { margin: 0 0 10px; font-size: 13px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; background: linear-gradient(90deg, var(--hp-purple-light), var(--hp-cyan)); -webkit-background-clip: text; background-clip: text; color: transparent; display: inline-block; }
.hp-head-actions { display: flex; align-items: center; gap: 10px; }
.hp-arrow { width: 42px; height: 42px; border-radius: 50%; border: 1px solid var(--hp-line); background: var(--hp-surface); color: #fff; font-size: 18px; cursor: pointer; transition: background .2s, border-color .2s, transform .2s; }
.hp-arrow:hover { background: var(--hp-purple); border-color: var(--hp-purple); transform: scale(1.06); }
.hp-head-actions .hp-link { margin-left: 8px; }
.hp-h3 { display: flex; align-items: center; gap: 10px; margin: 0 0 18px; font-size: 18px; font-weight: 700; color: #fff; }

/* Scroll reveal: only hidden once home.js has started (html.hp-js), so content is always visible without JS */
.hp-js .hp-reveal { opacity: 0; transform: translateY(36px); transition: opacity .8s var(--hp-ease), transform .8s var(--hp-ease); transition-delay: calc(var(--i, 0) * 70ms); }
.hp-js .hp-reveal.is-visible { opacity: 1; transform: none; }

/* ---------- Trending rail ---------- */
/* The rail scrolls sideways, which also clips vertically: the top padding is headroom for the big rank numbers */
.hp-rail { display: grid; grid-auto-flow: column; grid-auto-columns: 220px; gap: 20px; margin: -28px -24px 0; padding: 48px 24px 28px; list-style: none; overflow-x: auto; scroll-snap-type: x mandatory; scroll-padding: 0 24px; scrollbar-width: thin; scrollbar-color: var(--hp-purple) transparent; }
.hp-rail::-webkit-scrollbar { height: 6px; }
.hp-rail::-webkit-scrollbar-thumb { background: var(--hp-purple); border-radius: 6px; }
.hp-rail-item { scroll-snap-align: start; padding-top: 34px; }
.hp-pro { position: relative; display: block; border-radius: 20px; background: var(--hp-surface); box-shadow: 0 0 0 1px var(--hp-line); transform-style: preserve-3d; transition: transform .5s var(--hp-ease), box-shadow .3s; }
.hp-pro:hover { box-shadow: 0 0 0 1px rgba(199, 155, 255, .6), 0 30px 60px -20px rgba(152, 52, 254, .55); }
.hp-pro-rank {
  position: absolute; z-index: 3; left: -6px; top: -42px; font-family: var(--hp-display); font-size: 84px; font-weight: 900; line-height: 1; letter-spacing: -.06em;
  color: transparent; -webkit-text-stroke: 2px rgba(199, 155, 255, .7); transform: translateZ(40px); pointer-events: none; transition: color .3s, -webkit-text-stroke-color .3s;
}
.hp-rail-item:nth-child(-n+3) .hp-pro-rank { -webkit-text-stroke-color: transparent; background: linear-gradient(180deg, #fff, var(--hp-purple-light) 50%, var(--hp-purple)); -webkit-background-clip: text; background-clip: text; filter: drop-shadow(0 4px 16px rgba(152, 52, 254, .6)); }
.hp-pro:hover .hp-pro-rank { -webkit-text-stroke-color: #fff; }
.hp-pro-img { display: block; border-radius: 20px 20px 0 0; overflow: hidden; }
.hp-pro-img picture { display: block; }
.hp-pro-img img { display: block; width: 100% !important; height: auto; aspect-ratio: 333 / 445; object-fit: cover; transition: transform .7s var(--hp-ease), filter .4s; filter: saturate(.9); }
.hp-pro:hover .hp-pro-img img { transform: scale(1.07); filter: saturate(1.15); }
.hp-pro-info { display: block; padding: 14px 16px 16px; }
.hp-pro-name { display: block; font-family: var(--hp-display); font-weight: 800; font-size: 18px; color: #fff; letter-spacing: -.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hp-pro-meta { display: flex; align-items: center; gap: 6px; margin-top: 4px; color: var(--hp-muted); font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hp-pro-meta img { width: 16px !important; height: auto; border-radius: 2px; }

/* Card glare following the cursor (set by home.js) */
.hp-tilt { --rx: 0deg; --ry: 0deg; transform: perspective(900px) rotateX(var(--rx)) rotateY(var(--ry)); }
.hp-glare { position: absolute; inset: 0; border-radius: inherit; pointer-events: none; opacity: 0; transition: opacity .3s; background: radial-gradient(circle at var(--gx, 50%) var(--gy, 50%), rgba(255,255,255,.22), transparent 55%); mix-blend-mode: overlay; z-index: 2; }
.hp-tilt:hover .hp-glare { opacity: 1; }

/* ---------- Gear bento ---------- */
.hp-bento { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.hp-bento-feature { grid-column: span 2; grid-row: span 2; }
.hp-bento-feature, .hp-bento-tile {
  position: relative; display: flex; flex-direction: column; gap: 8px; padding: 26px; border-radius: 22px; overflow: hidden;
  background: var(--hp-surface); border: 1px solid var(--hp-line); transition: transform .4s var(--hp-ease), border-color .3s;
}
.hp-bento-feature { justify-content: flex-end; min-height: 340px; background: radial-gradient(120% 100% at 100% 0%, rgba(152, 52, 254, .45), transparent 60%), radial-gradient(80% 80% at 0% 100%, rgba(46, 230, 255, .18), transparent 60%), var(--hp-surface); }
.hp-bento-feature .hp-btn { align-self: flex-start; margin-top: 12px; }
.hp-bento-art { position: absolute; right: 24px; top: 24px; width: 120px !important; height: auto; opacity: .9; filter: drop-shadow(0 10px 30px rgba(152, 52, 254, .6)); animation: hp-float 6s ease-in-out infinite; }
@keyframes hp-float { 50% { transform: translateY(-12px) rotate(-3deg); } }
.hp-bento-tag { align-self: flex-start; padding: 4px 10px; border-radius: 999px; font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--hp-cyan); background: rgba(46, 230, 255, .1); border: 1px solid rgba(46, 230, 255, .3); }
.hp-bento-title { font-family: var(--hp-display); font-weight: 800; font-size: 19px; color: #fff; letter-spacing: -.01em; }
.hp-bento-feature .hp-bento-title { font-size: clamp(26px, 3vw, 36px); line-height: 1.1; letter-spacing: -.03em; max-width: 420px; }
.hp-bento-text { color: var(--hp-muted); font-size: 14px; line-height: 1.5; }
.hp-bento-feature .hp-bento-text { font-size: 16px; max-width: 440px; }
.hp-bento-tile img { width: 48px !important; height: auto; margin-bottom: 10px; transition: transform .4s var(--hp-ease); }
.hp-bento-tile:hover img { transform: scale(1.15) rotate(-6deg); }
.hp-bento-feature:hover, .hp-bento-tile:hover { transform: translateY(-4px); border-color: rgba(199, 155, 255, .45); }
/* Spotlight that follows the cursor (--mx/--my from home.js) */
.hp-spot::after { content: ""; position: absolute; inset: 0; pointer-events: none; opacity: 0; transition: opacity .3s; background: radial-gradient(400px circle at var(--mx, 50%) var(--my, 50%), rgba(152, 52, 254, .22), transparent 45%); }
.hp-spot:hover::after { opacity: 1; }

/* ---------- Games ---------- */
.hp-games { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin: 0; padding: 0; list-style: none; }
.hp-game { position: relative; display: block; aspect-ratio: 16 / 10; border-radius: 18px; overflow: hidden; background: var(--hp-surface); border: 1px solid var(--hp-line); isolation: isolate; }
.hp-game img { position: absolute; inset: 0; width: 100% !important; height: 100% !important; object-fit: cover; transition: transform 1s var(--hp-ease), filter .5s; filter: saturate(.75) brightness(.75); z-index: -2; }
.hp-game::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, transparent 30%, rgba(8, 9, 20, .92)); transition: background .4s; }
.hp-game::after { content: ""; position: absolute; inset: 0; border-radius: inherit; box-shadow: inset 0 0 0 2px transparent; transition: box-shadow .3s; }
.hp-game:hover img { transform: scale(1.1); filter: saturate(1.2) brightness(.9); }
.hp-game:hover::after { box-shadow: inset 0 0 0 2px var(--hp-purple-light), inset 0 0 40px rgba(152, 52, 254, .5); }
.hp-game-name { position: absolute; left: 16px; right: 16px; bottom: 34px; font-family: var(--hp-display); font-weight: 800; font-size: 19px; color: #fff; line-height: 1.15; text-shadow: 0 2px 12px rgba(0,0,0,.7); }
.hp-game-count { position: absolute; left: 16px; bottom: 12px; font-size: 13px; color: var(--hp-purple-light); }
.hp-game-count::before { content: ""; display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--hp-cyan); margin-right: 6px; vertical-align: middle; box-shadow: 0 0 8px var(--hp-cyan); }

/* ---------- Fresh setups + feed ---------- */
.hp-split { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 40px; align-items: start; }
.hp-mini-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 12px; margin: 0 0 32px; padding: 0; list-style: none; }
.hp-mini { position: relative; display: block; border-radius: 14px; overflow: hidden; background: var(--hp-surface); box-shadow: 0 0 0 1px var(--hp-line); transition: transform .5s var(--hp-ease), box-shadow .3s; }
.hp-mini:hover { box-shadow: 0 0 0 1px rgba(199, 155, 255, .6), 0 20px 40px -16px rgba(152, 52, 254, .6); }
.hp-mini picture { display: block; }
.hp-mini img { display: block; width: 100% !important; height: auto; aspect-ratio: 333 / 445; object-fit: cover; }
.hp-mini > span:not(.hp-glare):not(.hp-new-badge) { position: absolute; left: 0; right: 0; bottom: 0; padding: 20px 8px 8px; font-size: 12px; font-weight: 600; text-align: center; color: #fff; background: linear-gradient(transparent, rgba(5, 6, 15, .92)); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hp-new-badge { position: absolute; z-index: 3; top: 8px; left: 8px; padding: 2px 8px; border-radius: 999px; font-size: 10px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: #0b0d1a; background: linear-gradient(90deg, var(--hp-cyan), #7df9ff); box-shadow: 0 0 12px rgba(46, 230, 255, .6); }

.hp-feed { padding: 28px; border-radius: 22px; background: linear-gradient(180deg, var(--hp-surface-2), var(--hp-surface)); border: 1px solid var(--hp-line); }
.hp-feed-list { position: relative; margin: 0 0 24px; padding: 0 0 0 22px; list-style: none; color: var(--hp-muted); font-size: 14px; line-height: 1.55; }
.hp-feed-list::before { content: ""; position: absolute; left: 4px; top: 8px; bottom: 8px; width: 2px; background: linear-gradient(var(--hp-purple), rgba(152, 52, 254, .05)); }
.hp-feed-list li { position: relative; padding: 0 0 18px; }
.hp-feed-list li::before { content: ""; position: absolute; left: -22px; top: 6px; width: 10px; height: 10px; border-radius: 50%; background: var(--hp-bg); border: 2px solid var(--hp-purple-light); }
.hp-feed-list li:first-child::before { background: var(--hp-purple); box-shadow: 0 0 0 4px rgba(152, 52, 254, .25), 0 0 14px var(--hp-purple); }
.hp-feed-list a { color: #fff !important; }
.hp-feed-list a:hover { color: var(--hp-purple-light) !important; }
.hp-feed-list strong { color: #fff; font-weight: 600; }
.hp-feed-who { font-weight: 700; }
.hp-feed-old { text-decoration: line-through; text-decoration-color: rgba(255, 79, 163, .7); }
.hp-feed-when { display: block; font-size: 12px; color: #6f7499; margin-top: 2px; }
.hp-js .hp-feed.is-visible .hp-feed-list li { animation: hp-feed-in .6s var(--hp-ease) both; animation-delay: calc(var(--i, 0) * 110ms + 200ms); }
@keyframes hp-feed-in { from { opacity: 0; transform: translateX(-14px); } }

/* ---------- Steps ---------- */
.hp-steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin: 0; padding: 0; list-style: none; counter-reset: none; }
.hp-step { position: relative; padding: 34px 28px 30px; border-radius: 22px; background: var(--hp-surface); border: 1px solid var(--hp-line); overflow: hidden; }
.hp-step::before { content: ""; position: absolute; inset: 0 0 auto; height: 3px; background: linear-gradient(90deg, var(--hp-purple), var(--hp-cyan)); transform: scaleX(0); transform-origin: left; transition: transform 1s var(--hp-ease) .3s; }
.hp-step.is-visible::before, html:not(.hp-js) .hp-step::before { transform: scaleX(1); }
.hp-step-num { position: absolute; right: 18px; top: 6px; font-family: var(--hp-display); font-size: 80px; font-weight: 900; letter-spacing: -.06em; color: transparent; -webkit-text-stroke: 1px rgba(199, 155, 255, .18); }
.hp-step img { width: 56px !important; height: auto; margin-bottom: 18px; }
.hp-step h3 { margin: 0 0 10px; font-size: 21px; font-weight: 800; color: #fff; }
.hp-step p { margin: 0; color: var(--hp-muted); line-height: 1.6; }

/* ---------- FAQ ---------- */
.hp-faq-wrap { max-width: 900px; }
.hp-faq details { border-bottom: 1px solid var(--hp-line); }
.hp-faq summary { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 22px 4px; cursor: pointer; list-style: none; }
.hp-faq summary::-webkit-details-marker { display: none; }
.hp-faq summary h3 { margin: 0; font-size: 19px; font-weight: 700; color: #fff; transition: color .2s; }
.hp-faq summary:hover h3 { color: var(--hp-purple-light); }
.hp-faq-icon { position: relative; flex: none; width: 32px; height: 32px; border-radius: 50%; border: 1px solid rgba(199, 155, 255, .35); transition: transform .4s var(--hp-ease), background .3s; }
.hp-faq-icon::before, .hp-faq-icon::after { content: ""; position: absolute; left: 50%; top: 50%; width: 12px; height: 2px; background: var(--hp-purple-light); transform: translate(-50%, -50%); }
.hp-faq-icon::after { transform: translate(-50%, -50%) rotate(90deg); transition: transform .4s var(--hp-ease); }
.hp-faq details[open] .hp-faq-icon { background: var(--hp-purple); transform: rotate(180deg); }
.hp-faq details[open] .hp-faq-icon::before, .hp-faq details[open] .hp-faq-icon::after { background: #fff; }
.hp-faq details[open] .hp-faq-icon::after { transform: translate(-50%, -50%) rotate(0deg); }
.hp-faq-body { padding: 0 4px 22px; color: var(--hp-muted); line-height: 1.7; font-size: 15px; }
.hp-faq details[open] .hp-faq-body { animation: hp-faq-open .5s var(--hp-ease); }
@keyframes hp-faq-open { from { opacity: 0; transform: translateY(-8px); } }
.hp-faq-body a { color: var(--hp-purple-light) !important; text-decoration: underline; }

/* ---------- CTA ---------- */
.hp-cta-section { padding-top: 40px; }
.hp-cta { position: relative; padding: 64px 32px; border-radius: 28px; text-align: center; overflow: hidden; background: radial-gradient(100% 140% at 50% 0%, rgba(152, 52, 254, .45), transparent 60%), var(--hp-surface); isolation: isolate; }
.hp-cta::before {
  content: ""; position: absolute; inset: 0; border-radius: inherit; padding: 1px; z-index: -1;
  background: conic-gradient(from var(--hp-angle, 0deg), var(--hp-purple), var(--hp-cyan), var(--hp-pink), var(--hp-purple));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude;
  animation: hp-spin 6s linear infinite;
}
.hp-cta h2 { margin: 0 0 12px; font-size: clamp(28px, 4vw, 48px); font-weight: 900; letter-spacing: -.035em; color: #fff; }
.hp-cta p { margin: 0 auto 28px; max-width: 520px; color: var(--hp-muted); font-size: 17px; }
.hp-cta-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; }

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
  .hp-mini-grid { grid-template-columns: repeat(3, 1fr); }
  .hp-split { grid-template-columns: 1fr; }
}
@media (max-width: 991px) {
  .hp-hero { padding-top: 48px; }
  .hp-hero-inner { grid-template-columns: minmax(0, 1fr); min-height: 0; gap: 0; }
  .hp-hero-copy { padding-bottom: 8px; }
  .hp-wall { height: 300px; margin: 0 -24px; -webkit-mask-image: linear-gradient(to bottom, transparent, #000 20%, #000 75%, transparent); mask-image: linear-gradient(to bottom, transparent, #000 20%, #000 75%, transparent); }
  .hp-wall-stage { inset: -40px 0; grid-template-columns: repeat(3, minmax(0, 160px)); justify-content: center; transform: rotateX(28deg) rotateZ(-8deg); }
  .hp-bento { grid-template-columns: repeat(2, 1fr); }
  .hp-games { grid-template-columns: repeat(3, 1fr); }
  .hp-steps { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .hp-wrap { padding: 0 16px; }
  .hp-section { padding: 64px 0; }
  .hp-title-main { font-size: 48px; }
  .hp-title-kicker { font-size: 12px; letter-spacing: .14em; }
  .hp-lead { font-size: 16px; }
  .hp-search { padding-left: 42px; }
  .hp-search-icon { left: 15px; }
  .hp-kbd { display: none; }
  .hp-search .hp-btn { padding: 11px 16px; font-size: 14px; }
  .hp-stats { gap: 14px 24px; }
  .hp-stats dd { font-size: 26px; }
  .hp-stats > div { flex: 1 1 40%; }
  .hp-wall-stage { grid-template-columns: repeat(3, minmax(0, 120px)); gap: 10px; }
  .hp-wall-track { gap: 10px; }
  .hp-head { flex-direction: column; align-items: flex-start; gap: 12px; }
  .hp-head-center { align-items: center; }
  .hp-arrow { display: none; }
  .hp-head-actions .hp-link { margin-left: 0; }
  .hp-rail { grid-auto-columns: 62%; gap: 14px; margin: -20px -16px 0; padding: 40px 16px 24px; scroll-padding: 0 16px; }
  .hp-pro-rank { font-size: 64px; top: -32px; }
  .hp-bento { grid-template-columns: 1fr 1fr; gap: 12px; }
  .hp-bento-feature { grid-column: 1 / -1; grid-row: auto; min-height: 300px; padding: 22px; }
  .hp-bento-art { width: 72px !important; right: 18px; top: 18px; }
  .hp-bento-feature .hp-bento-tag { margin-top: 64px; }
  .hp-bento-tile { padding: 18px; }
  .hp-bento-tile .hp-bento-text { display: none; }
  .hp-bento-title { font-size: 16px; }
  .hp-games { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .hp-game-name { font-size: 16px; }
  .hp-mini-grid { grid-template-columns: repeat(3, 1fr); gap: 10px; }
  .hp-feed { padding: 20px; }
  .hp-faq summary h3 { font-size: 17px; }
  .hp-cta { padding: 48px 20px; }
}

/* ---------- Reduced motion: keep the design, drop the movement ---------- */
@media (prefers-reduced-motion: reduce) {
  #homepage *, #homepage *::before, #homepage *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; transition-delay: 0s !important; }
  .hp-rotator-track { animation: none !important; }
  .hp-wall-track, .hp-marquee-track, .hp-grid, .hp-blob { animation: none !important; }
  .hp-js .hp-reveal { opacity: 1; transform: none; }
}
