:root {
  color-scheme: dark;
  --night: #201630;
  --panel: #302142;
  --ink: #fff6fb;
  --dim: #dfcde8;
  --pink: #ffb6db;
  --mint: #bdffe3;
  --peach: #ffce9f;
  --hairline: #eac1ff32;
  --display: "Barlow Condensed", "Microsoft YaHei", "PingFang SC", sans-serif;
  --body: "Inter", "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  font-family: var(--body);
  background: var(--night);
  color: var(--ink);
}

@font-face {
  font-family: "Barlow Condensed";
  src: url("./assets/barlow-condensed-bold.woff2") format("woff2");
  font-weight: 700;
  font-display: swap;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-padding-top: 20px; }
body { margin: 0; background: radial-gradient(ellipse at 80% 38%, #3c2755, transparent 62%); }
a { color: inherit; text-decoration: none; }
button { font: inherit; }
[hidden] { display: none !important; }
img { display: block; max-width: 100%; }
h1, h2, h3, p { margin: 0; }
:focus-visible { outline: 2px solid var(--mint); outline-offset: 5px; }
.wrap { width: min(1408px, calc(100% - clamp(32px, 7vw, 108px))); margin-inline: auto; }
.skip { position: fixed; z-index: 10; inset: 12px auto auto 12px; padding: 10px 14px; background: var(--panel); border-radius: 9px; transform: translateY(-150%); }
.skip:focus { transform: none; }

.topbar { border-bottom: 1px solid var(--hairline); }
.topbar-inner { width: min(1408px, calc(100% - clamp(32px, 7vw, 108px))); margin: auto; min-height: 76px; display: flex; align-items: center; justify-content: space-between; gap: 22px; }
.brand { display: inline-flex; align-items: center; gap: 9px; font-weight: 750; font-size: 1.08rem; white-space: nowrap; }
.brand img { object-fit: contain; border-radius: 7px; mix-blend-mode: screen; }
.brand small { margin-inline-start: 5px; color: var(--pink); font-family: var(--display); font-size: 1.1rem; letter-spacing: .075em; }
.topbar nav { display: flex; gap: clamp(14px, 3.2vw, 49px); color: var(--dim); font-size: .94rem; }
.topbar nav a, .store-link { padding-block: 8px; }
.topbar nav a:hover, .store-link:hover, .link:hover { color: var(--mint); }
.store-link { padding-inline: 15px; border: 1px solid var(--hairline); border-radius: 999px; color: var(--pink); font-size: .875rem; font-weight: 700; white-space: nowrap; }

.hero {
  --glow-x: 50%;
  --glow-y: 45%;
  --pan-x: 0px;
  --pan-y: 0px;
  position: relative;
  isolation: isolate;
  display: grid;
  align-items: center;
  margin-block: 25px 0;
  min-height: clamp(520px, 49vw, 695px);
  border: 1px solid #d6aefa65;
  border-radius: clamp(23px, 3.6vw, 54px);
  overflow: hidden;
  background: #251a3a;
  box-shadow: 0 22px 78px #110a24a6, 0 0 41px #b675e52d;
}
.hero-art, .hero-art::after, .hero-light, .motes { position: absolute; inset: 0; }
.hero-art { overflow: hidden; z-index: -1; }
.hero-art > img { width: 100%; height: 100%; object-fit: cover; object-position: 56% 55%; transform: translate(var(--pan-x), var(--pan-y)) scale(1.026); transition: transform .35s ease-out; }
.hero-art::after {
  content: "";
  background: linear-gradient(90deg, #26193af6 0%, #26193ae8 15%, #26193abb 29%, #26193a40 51%, transparent 69%),
              linear-gradient(0deg, #1f142ee8 0%, transparent 23%);
}
.hero-light {
  background: radial-gradient(circle at var(--glow-x) var(--glow-y), #baf4ff5f, transparent 34%),
              linear-gradient(115deg, transparent 26%, #ffc0ee1f 48%, #e8a0fc2c 51%, transparent 72%);
  mix-blend-mode: screen;
  animation: light 8s ease-in-out infinite;
}
.motes { z-index: 1; pointer-events: none; }
.motes i { position: absolute; left: var(--x); top: var(--y); width: var(--size, 6px); aspect-ratio: 1; background: var(--mint); border-radius: 35%; box-shadow: 0 0 13px 3px #b7ffeab5; animation: drift 6s ease-in-out infinite; animation-delay: var(--delay); }
.motes i:nth-child(1) { --x: 43%; --y: 74%; --delay: -1s; }
.motes i:nth-child(2) { --x: 55%; --y: 23%; --delay: -2s; --size: 4px; }
.motes i:nth-child(3) { --x: 77%; --y: 63%; --delay: -4s; background: var(--peach); }
.motes i:nth-child(4) { --x: 87%; --y: 29%; --delay: -3s; --size: 4px; }
.motes i:nth-child(5) { --x: 68%; --y: 80%; --delay: -5s; background: var(--pink); }
@keyframes drift { 0%, 100% { opacity: .18; transform: translateY(9px) rotate(0); } 55% { opacity: .95; transform: translateY(-20px) rotate(75deg); } }
@keyframes light { 0%, 100% { opacity: .36; } 52% { opacity: .79; } }
.motion-off :is(.hero-light, .motes i) { animation: none; }
.motion-off .hero-art > img { transition: none; }
.hero-content { padding: 65px 0 108px clamp(30px, 6.5vw, 100px); max-width: 515px; }
.eyebrow { width: fit-content; margin-bottom: 26px; display: flex; align-items: center; gap: 8px; border: 1px solid #ffc8e86e; background: #69436b82; padding: 7px 13px; border-radius: 999px; color: #ffe5f3; font-size: .88rem; font-weight: 700; }
.eyebrow span { color: var(--peach); }
.hero h1 { font-size: clamp(4rem, 7.6vw, 7.45rem); font-weight: 850; letter-spacing: .01em; line-height: .98; color: #fff6ee; text-shadow: 0 5px 26px #25152d9e; }
.hero h1 span { display: block; margin-top: 9px; font-size: .51em; letter-spacing: .03em; color: var(--pink); }
.hero-text { max-width: 322px; margin-top: 24px; margin-bottom: 29px; color: #f4e5f4; font-size: 1.04rem; line-height: 1.8; text-wrap: pretty; }
.button { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 8px 18px; border-radius: 999px; font-size: .96rem; font-weight: 740; transition: background .2s ease-out, transform .2s ease-out; }
.button:hover { transform: translateY(-2px); }
.button-main { min-height: 51px; padding-inline: 24px; background: var(--mint); color: #291c3c; box-shadow: 0 6px 0 #7baaa4, 0 0 30px #b6fff64d; }
.button-main:hover { background: #e0ffef; }
.hero-end { position: absolute; inset: auto clamp(20px, 3vw, 43px) 19px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.art-caption { color: #f4dfee; font-size: .81rem; }
.art-caption:hover { color: var(--mint); text-decoration: underline; }
.motion, .play-actions button { border: 1px solid var(--hairline); border-radius: 999px; color: var(--ink); background: #2d1d40e8; padding: 7px 12px; cursor: pointer; font-size: .81rem; }
.motion:hover, .play-actions button:hover { background: #503265; }

.games { padding-block: 70px 60px; }
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 14px 28px; margin-bottom: 25px; }
.section-head h2, .studio h2 { color: var(--ink); font-size: clamp(1.9rem, 3.4vw, 3.05rem); line-height: 1.16; letter-spacing: .018em; }
.section-head p, .studio p, .game-copy > p:not(.genre) { color: var(--dim); line-height: 1.7; }
.game-list { display: grid; gap: clamp(14px, 2vw, 25px); grid-template-columns: repeat(3, minmax(0, 1fr)); }
.game-card { --accent: var(--pink); display: flex; flex-direction: column; min-width: 0; background: var(--panel); border: 1px solid var(--hairline); border-radius: 25px; overflow: hidden; box-shadow: 0 8px 34px #120b24ab; }
.game-card.magic { --accent: var(--peach); }
.game-card.merge { --accent: var(--mint); }
.cover { display: block; overflow: hidden; aspect-ratio: 16 / 9; background: #51386a; }
.cover img { width: 100%; height: 100%; object-fit: cover; transition: transform .35s ease; }
.game-card:focus-within .cover img, .game-card:hover .cover img { transform: scale(1.045); }
.game-copy { display: flex; flex: 1; flex-direction: column; align-items: flex-start; padding: 20px clamp(17px, 2vw, 27px) 24px; }
.genre { color: var(--accent); font-weight: 700; font-size: .85rem; margin-bottom: 7px; }
.game-copy h3 { font-size: clamp(1.38rem, 2.1vw, 1.83rem); line-height: 1.15; margin-bottom: 9px; }
.game-copy h3[lang="en"] { font-family: var(--display); letter-spacing: .04em; font-size: clamp(1.65rem, 2.5vw, 2.13rem); }
.game-copy > p:not(.genre) { flex: 1; margin-bottom: 19px; }
.game-button { color: #2a1d37; background: var(--accent); min-width: 104px; }
.game-button:hover { background: #fff2fc; }

.studio { display: grid; grid-template-columns: minmax(150px, 260px) minmax(0, 1fr); align-items: center; gap: clamp(28px, 6vw, 88px); padding: clamp(25px, 4vw, 52px); border: 1px solid var(--hairline); border-radius: 29px; background: radial-gradient(ellipse at left top, #49326d, #312142 70%); }
.studio-logo { max-width: 194px; border-radius: 24px; overflow: hidden; box-shadow: 0 10px 28px #1c102f78; border: 1px solid #d8bdf13c; }
.studio-logo img { width: 100%; height: auto; }
.studio-copy h2 { margin-bottom: 11px; }
.studio-copy p { max-width: 640px; margin-bottom: 16px; }
.link { color: var(--pink); border-bottom: 1px solid currentColor; padding-block: 3px; font-weight: 700; }
.footer { display: grid; grid-template-columns: 1fr auto; gap: 16px; align-items: center; padding-block: 41px 27px; }
.footer h2 { margin-bottom: 3px; font-size: 1.27rem; }
.footer p { color: var(--dim); font-size: .88rem; }
.company { grid-column: 1 / -1; margin-top: 5px; padding-top: 17px; border-top: 1px solid var(--hairline); }
.button-outline { border: 1px solid var(--hairline); color: var(--mint); background: #302141; }
.button-outline:hover { background: #4d3266; }

.play-page { min-height: 100vh; min-height: 100dvh; height: 100vh; height: 100dvh; display: grid; grid-template-rows: auto minmax(0, 1fr); background: #241935; }
.play-header { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 12px; padding: 10px clamp(12px, 3vw, 37px); border-bottom: 1px solid var(--hairline); }
.play-header h1 { color: var(--pink); font-size: clamp(.98rem, 2.1vw, 1.3rem); text-align: center; }
.play-back, .play-actions a { color: var(--mint); font-size: .88rem; width: fit-content; padding-block: 5px; }
.play-back:hover, .play-actions a:hover { text-decoration: underline; }
.play-actions { display: flex; align-items: center; justify-content: end; gap: 9px 15px; }
.player { position: relative; min-width: 0; min-height: 0; background: #241935; }
.player iframe { display: block; width: 100%; height: 100%; border: none; background: #34294a; }
.player-message, .player-noscript { position: absolute; z-index: 1; inset: 35% 16px auto; text-align: center; padding: 10px; color: var(--dim); pointer-events: none; }

@media (max-width: 900px) {
  .hero-content { max-width: 420px; }
  .game-list { gap: 12px; }
  .game-copy { padding-inline: 15px; }
}
@media (max-width: 690px) {
  .topbar-inner { min-height: 62px; gap: 10px; }
  .brand img { width: 36px; }
  .brand small { display: none; }
  .store-link { padding-inline: 10px; font-size: .8rem; }
  .topbar nav { gap: 13px; font-size: .86rem; }
  .hero { margin-top: 16px; display: flex; flex-direction: column; align-items: stretch; min-height: 0; }
  .hero-art { position: relative; height: clamp(231px, 61vw, 380px); min-height: 0; flex: none; }
  .hero-art > img { object-position: 56% 54%; }
  .hero-art::after { background: linear-gradient(0deg, #2b1d3e 0%, transparent 33%); }
  .hero-content { padding: 3px 24px 61px; background: linear-gradient(180deg, #2b1d3e, #382447); max-width: none; }
  .eyebrow { margin-bottom: 14px; }
  .hero h1 { font-size: clamp(3.3rem, 10vw, 4.75rem); }
  .hero h1 span { display: inline; margin-left: .15em; font-size: .46em; }
  .hero-text { margin-top: 14px; margin-bottom: 18px; }
  .hero-end { bottom: 11px; inset-inline: 20px; }
  .games { padding-block: 42px 32px; }
  .section-head { display: block; margin-bottom: 18px; }
  .section-head p { margin-top: 8px; }
  .game-list { grid-template-columns: 1fr; gap: 17px; }
  .game-copy { padding-inline: 19px; }
  .studio { grid-template-columns: 81px minmax(0, 1fr); gap: 16px; padding: 20px; }
  .studio-logo { align-self: center; border-radius: 13px; }
  .studio h2 { font-size: 1.55rem; }
  .studio p { font-size: .96rem; }
  .footer { align-items: start; grid-template-columns: 1fr; padding-block: 29px 23px; }
  .footer .button { justify-self: start; }
}
@media (max-width: 365px) {
  .topbar nav { gap: 9px; }
  .topbar-inner { width: calc(100% - 24px); }
  .hero h1 { font-size: 3.25rem; }
  .play-header { grid-template-columns: 1fr auto; }
  .play-header h1 { grid-row: 2; grid-column: 1 / -1; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
