:root {
  color-scheme: light;
  --background: #f9f8f5;
  --ink: #211831;
  --muted: #62596c;
  --purple: #5931ba;
  --hero: #e7dffd;
  --line: #e2dce6;
  --white: #fff;
  --lime: #dff76e;
  font-family: Inter, "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  color: var(--ink);
  background: var(--background);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body, h1, h2, h3, p { margin: 0; }
img { display: block; max-width: 100%; }
a { color: inherit; }
button { font: inherit; color: inherit; cursor: pointer; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid #7347df; outline-offset: 4px; }
section[id], #contact { scroll-margin-top: 24px; }

.wrap { width: min(1280px, calc(100% - 96px)); margin-inline: auto; }
.skip-link { position: absolute; z-index: 5; top: 12px; left: 12px; padding: 12px; background: var(--white); transform: translateY(-160%); }
.skip-link:focus { transform: none; }

.site-header {
  min-height: 78px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 24px;
  position: relative;
  z-index: 2;
}
.brand { display: inline-flex; align-items: center; gap: 8px; width: max-content; font-size: 21px; font-weight: 850; text-decoration: none; white-space: nowrap; }
.brand span { color: var(--purple); font-size: 32px; line-height: 1; }
.site-nav { display: flex; align-items: center; gap: clamp(24px, 4vw, 64px); }
.site-nav a { font-size: 15px; font-weight: 700; text-decoration: none; white-space: nowrap; }
.site-nav a:hover, .footer-links a:hover { color: var(--purple); }
.header-contact { justify-self: end; }
.menu-toggle { display: none; }

.button {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 10px 22px;
  border: 0;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 750;
  color: var(--white);
  text-decoration: none;
  white-space: nowrap;
}
.button-dark { background: var(--ink); }
.button-purple, .button-dark:hover { background: var(--purple); }
.button-purple:hover { background: #492696; }

.hero {
  background: var(--hero);
  border-radius: 30px;
  overflow: hidden;
  display: grid;
  grid-template-columns: minmax(0, .93fr) minmax(0, 1.07fr);
  align-items: stretch;
}
.hero-copy {
  position: relative;
  z-index: 1;
  align-self: center;
  padding: clamp(28px, 4vw, 64px) 0 clamp(28px, 4vw, 64px) clamp(26px, 4.4vw, 66px);
}
.company-name { font-weight: 750; font-size: clamp(14px, 1.45vw, 21px); color: #3f2d5e; }
.hero h1 { margin-block: 20px 16px; font-size: clamp(36px, 5.45vw, 80px); font-weight: 900; line-height: 1.13; letter-spacing: -.045em; }
.hero-description { font-size: clamp(15px, 1.4vw, 19px); color: #4c3b62; line-height: 1.7; }
.hero .button { margin-top: 26px; min-height: 50px; padding-inline: 24px; }
.hero .button span { font-size: 19px; }
.hero-art { width: 100%; height: 100%; object-fit: cover; mask-image: linear-gradient(to right, transparent, #000 17%); }

.games-section { padding-block: clamp(40px, 5.5vw, 78px); }
.section-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin-bottom: 22px; }
.section-heading h2, .development h2, .studio h2 { font-size: clamp(31px, 4.2vw, 57px); font-weight: 900; line-height: 1.16; letter-spacing: -.04em; }
.section-heading p { color: var(--muted); font-size: 14px; white-space: nowrap; }
.game-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.game-card { display: flex; flex-direction: column; overflow: hidden; border: 1px solid var(--line); border-radius: 21px; background: var(--white); }
.game-art { aspect-ratio: 1.48; overflow: hidden; }
.game-art img { width: 100%; height: 100%; object-fit: cover; }
.game-art-commute { background: #eaddc6; }
.game-art-bubble { background: #9fddfc; }
.game-art-bubble img { object-position: center 32%; }
.game-art-puzzle { display: grid; place-items: center; background: radial-gradient(ellipse at 34% 22%, #fff7de, #f4df9f); }
.game-art-puzzle img { width: 91%; height: 86%; object-fit: contain; }
.game-info { display: flex; flex: 1; flex-direction: column; align-items: start; gap: 8px; padding: 20px 20px 16px; }
.game-genre { font-size: 13px; font-weight: 750; color: var(--purple); }
.game-info h3 { font-size: clamp(19px, 2vw, 26px); font-weight: 850; letter-spacing: -.035em; line-height: 1.35; }
.game-description { color: var(--muted); font-size: 14px; line-height: 1.65; flex: 1; }
.game-play {
  min-height: 40px;
  margin-top: 4px;
  padding: 2px 0;
  color: var(--purple);
  font-weight: 750;
  border: 0;
  border-bottom: 1px solid transparent;
  background: transparent;
}
.game-play:hover { border-bottom-color: currentColor; }
.game-play span { margin-left: 4px; }

.development {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  min-height: 214px;
  display: grid;
  align-items: center;
  padding: clamp(24px, 4vw, 60px);
  border-radius: 26px;
  color: #fffaff;
  background: #281c42;
}
.development-copy { position: relative; z-index: 1; }
.development h2 span { color: var(--lime); }
.development p { margin-top: 12px; font-size: 16px; line-height: 1.65; color: #ded4ed; }
.orbit { position: absolute; right: -1%; top: 50%; width: 40%; height: 69%; transform: translateY(-50%) rotate(-14deg); pointer-events: none; }
.orbit::before, .orbit::after { content: ""; position: absolute; inset: 20% 0; border: 1px solid #9871d5; border-radius: 50%; }
.orbit::after { transform: translate(24%, 27%) rotate(18deg); }
.orbit span { position: absolute; z-index: 1; border-radius: 100%; }
.orbit span:nth-child(1) { width: 9px; aspect-ratio: 1; left: 12%; top: 26%; background: #f5ebff; }
.orbit span:nth-child(2) { width: 22px; aspect-ratio: 1; left: 42%; bottom: 18%; background: #9566fb; }
.orbit span:nth-child(3) { width: 28px; aspect-ratio: 1; right: 24%; top: 34%; background: var(--lime); }

.studio { display: grid; grid-template-columns: 1.2fr 1fr; gap: clamp(24px, 7vw, 100px); align-items: start; padding-block: clamp(42px, 6vw, 84px); }
.studio h2 { font-size: clamp(26px, 3.3vw, 44px); }
.studio p { margin-top: 12px; color: var(--muted); font-size: 15px; line-height: 1.8; }
.studio h3 { font-size: 20px; font-weight: 820; }
.contact-actions { display: flex; flex-wrap: wrap; gap: 2px 14px; align-items: center; margin-top: 5px; }
.email-link { color: var(--purple); font-weight: 750; overflow-wrap: anywhere; text-underline-offset: 4px; }
.text-button { min-height: 40px; display: inline-flex; align-items: center; padding: 4px 0; background: transparent; border: 0; color: var(--purple); font-size: 14px; font-weight: 700; text-decoration: underline; text-underline-offset: 4px; }
.studio .copy-status { margin: 0; font-size: 13px; min-height: 1.8em; }

.site-footer { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 22px; min-height: 90px; padding-block: 18px; border-top: 1px solid var(--line); }
.site-footer .brand { font-size: 17px; }
.site-footer .brand span { font-size: 26px; }
.site-footer p, .footer-links a { font-size: 13px; color: var(--muted); }
.footer-links { display: flex; flex-wrap: wrap; gap: 10px 18px; margin-left: auto; }
.footer-links a { text-decoration: none; }

.play-dialog {
  position: fixed;
  width: min(400px, calc(100% - 28px));
  max-height: calc(100% - 28px);
  overflow: auto;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: var(--white);
  color: var(--ink);
  text-align: center;
}
.play-dialog::backdrop { background: rgba(33, 24, 49, .55); }
.play-dialog form { display: flex; justify-content: end; }
.dialog-close { min-width: 40px; min-height: 40px; padding: 0; border: 0; border-radius: 50%; background: #f0ebfa; font-size: 26px; line-height: 1; }
.play-dialog h2 { margin-top: 4px; font-size: 24px; line-height: 1.35; }
.play-dialog p { margin-top: 10px; color: var(--muted); font-size: 14px; line-height: 1.65; }
.game-code { width: min(204px, 100%); height: auto; margin: 10px auto 0; }
.play-dialog .copy-game { margin-top: 12px; }
.play-dialog .copy-game-status { min-height: 1.65em; }

.notice { width: min(760px, calc(100% - 48px)); margin: 60px auto; }
.notice h1 { margin-top: 34px; font-size: clamp(28px, 5vw, 42px); }
.notice h2 { margin-top: 24px; font-size: 20px; }
.notice p { margin-top: 10px; color: var(--muted); line-height: 1.9; }
.notice a { color: var(--purple); text-underline-offset: 4px; }
.notice footer { margin-top: 32px; border-top: 1px solid var(--line); padding-top: 16px; color: var(--muted); font-size: 13px; }

@media (max-width: 1000px) {
  .wrap { width: calc(100% - 54px); }
  .game-info { padding-inline: 14px; }
}

@media (max-width: 700px) {
  .wrap { width: calc(100% - 32px); }
  .site-header { min-height: 66px; grid-template-columns: 1fr auto auto; gap: 8px; }
  .brand { font-size: 18px; gap: 4px; }
  .brand span { font-size: 27px; }
  .header-contact { font-size: 13px; padding-inline: 13px; }
  .menu-toggle { display: grid; align-content: center; justify-content: center; gap: 5px; width: 44px; height: 44px; padding: 0; border-radius: 50%; border: 1px solid var(--line); background: var(--white); }
  .menu-toggle span { width: 16px; height: 2px; background: currentColor; border-radius: 4px; }
  .site-nav { display: none; position: absolute; top: calc(100% - 3px); left: 0; right: 0; padding: 8px; border: 1px solid var(--line); border-radius: 18px; background: var(--white); box-shadow: 0 10px 30px #21183112; }
  .site-nav.is-open { display: grid; gap: 0; }
  .site-nav a { padding: 13px 14px; }
  .hero { grid-template-columns: 1fr; border-radius: 24px; }
  .hero-copy { padding: 30px 23px 0; }
  .hero h1 { font-size: clamp(35px, 10.6vw, 61px); margin-block: 14px 9px; }
  .hero .button { margin-top: 18px; }
  .hero-art { height: auto; max-height: 390px; object-position: center 54%; mask-image: linear-gradient(to bottom, transparent, #000 16%); }
  .section-heading { margin-bottom: 16px; }
  .game-grid { grid-template-columns: 1fr; gap: 13px; }
  .game-info { padding: 16px 17px 12px; }
  .game-info h3 { font-size: 22px; }
  .development { min-height: 192px; border-radius: 22px; }
  .development h2 span { display: block; }
  .development p { font-size: 14px; }
  .orbit { width: 70%; right: -20%; opacity: .5; }
  .studio { grid-template-columns: 1fr; }
  .footer-links { margin-left: 0; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
