:root {
  --ink: #06101f;
  --panel: #0d1b33;
  --line: #1e3558;
  --text: #e6eefc;
  --dim: #92a5c6;
  --orange: #ff8a2a;
  --cyan: #36f1e4;
  --mag: #ff2e93;
  --display: "Big Shoulders Display", "Noto Sans TC", sans-serif;
  --body: "Noto Sans TC", system-ui, sans-serif;
}
* {
  box-sizing: border-box;
  margin: 0;
}
html {
  background: var(--ink);
}
body {
  background: var(--ink);
  color: var(--text);
  font: 400 16px/1.75 var(--body);
  -webkit-font-smoothing: antialiased;
}
a {
  color: inherit;
  text-decoration: none;
}
:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 3px;
}
.wrap {
  width: min(1120px, 100%);
  margin-inline: auto;
  padding-inline: 20px;
}

/* Header */
.hdr {
  position: fixed;
  inset: 0 0 auto;
  z-index: 50;
  background: rgba(6, 16, 31, 0.6);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
  transition:
    transform 0.25s ease,
    background-color 0.25s ease;
}
.hdr.scrolled {
  background: rgba(6, 16, 31, 0.3);
}
.hdr.hide {
  transform: translateY(-100%);
}
.hdr .wrap {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 48px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font: 900 20px/1 var(--display);
  letter-spacing: 0.08em;
}
.brand img {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  object-fit: cover;
}
.nav {
  display: flex;
  gap: 28px;
}
.nav a {
  padding: 6px 0;
  font-size: 15px;
  font-weight: 700;
  color: var(--dim);
  transition: color 0.25s ease;
}
.nav a:hover,
.nav a:focus-visible,
.nav a[aria-current] {
  color: var(--text);
}

/* Hero */
.hero {
  min-height: 100svh;
  display: flex;
  align-items: center;
  padding: 120px 0 72px;
  background: url("images/In-game_screenshot/Environment_1.png") center/cover;
}
h1 {
  color: #fff;
  font: 900 clamp(44px, 13vw, 170px)/0.86 var(--display);
  letter-spacing: 0.01em;
  white-space: nowrap;
}

/* 區塊 */
.sec {
  padding: clamp(72px, 11vw, 128px) 0;
}
h2 {
  font: 900 clamp(28px, 4vw, 44px)/1.1 var(--display);
}
.sub {
  margin-top: 14px;
  max-width: 34em;
  color: var(--dim);
}
.grid {
  display: grid;
  gap: 20px;
  margin-top: 44px;
}
.social {
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
}
.card {
  position: relative;
  padding: 28px 24px;
  background: var(--panel);
  border: 1px solid var(--line);
  transition:
    transform 0.25s ease,
    box-shadow 0.25s ease,
    border-color 0.25s ease;
}
.card::before {
  content: "";
  position: absolute;
  top: -1px;
  left: -1px;
  width: 16px;
  height: 16px;
  border: 2px solid var(--orange);
  border-right: 0;
  border-bottom: 0;
}
.card:hover {
  transform: translateY(-4px);
  border-color: var(--cyan);
  box-shadow: 0 14px 32px rgba(0, 0, 0, 0.55);
}
.card h3 {
  font: 800 26px/1.2 var(--display);
  margin-bottom: 10px;
}
.card p {
  color: var(--dim);
}

/* 影片 */
.video {
  margin-top: 44px;
  aspect-ratio: 16/9;
  border: 1px solid var(--line);
  background: var(--panel);
}
.shots {
  grid-template-columns: repeat(2, 1fr);
}
/* 遊戲介紹：左文右圖，窄螢幕改上下 */
.intro {
  display: grid;
  grid-template-columns: 3fr 2fr;
  gap: 40px;
  align-items: start;
}
.intro .sub {
  max-width: none;
  font-size: 18px;
}
.intro img {
  display: block;
  width: 100%;
  margin-top: 20px; /* 對齊第一段文字頂端 */
  border: 1px solid var(--line);
}
@media (max-width: 760px) {
  .intro {
    grid-template-columns: 1fr;
  }
}
.shots img {
  display: block;
  width: 100%;
  aspect-ratio: 16/9;
  object-fit: cover;
  border: 1px solid var(--line);
}
.shots a {
  cursor: zoom-in;
}
/* dialog 撐滿整個視窗，圖片置中，按鈕貼在畫面左右兩側 */
.lightbox {
  width: 100vw;
  height: 100vh;
  max-width: none;
  max-height: none;
  padding: 0;
  border: 0;
  overflow: hidden;
  background: transparent;
}
.lightbox[open] {
  display: grid;
  place-items: center;
}
.lightbox::backdrop {
  background: rgba(0, 0, 0, 0.85);
}
.lightbox img {
  display: block;
  max-width: calc(100vw - 160px);
  max-height: 90vh;
}
.lightbox button {
  position: absolute;
  top: 50%;
  translate: 0 -50%;
  width: 48px;
  height: 72px;
  border: 0;
  font-size: 40px;
  color: var(--cyan);
  background: rgba(6, 16, 31, 0.6);
  cursor: pointer;
}
.lightbox button:hover,
.lightbox button:focus-visible {
  background: rgba(6, 16, 31, 0.9);
}
.lightbox [data-d="-1"] {
  left: 16px;
}
.lightbox [data-d="1"] {
  right: 16px;
}
.video iframe {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}
.play {
  position: relative;
  width: 100%;
  height: 100%;
  border: 0;
  cursor: pointer;
  background: var(--panel) center/cover;
}
.play span {
  position: absolute;
  inset: 0;
  margin: auto;
  width: 84px;
  height: 84px;
  border-radius: 50%;
  background: var(--orange);
  transition: transform 0.15s ease;
}
.play span::after {
  content: "";
  position: absolute;
  left: 33px;
  top: 26px;
  border: 16px solid transparent;
  border-left: 26px solid var(--ink);
  border-right: 0;
}
.play:hover span,
.play:focus-visible span {
  transform: translateY(-2px);
}

/* 社群 */
.soc {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px;
  border: 1px solid var(--line);
  background: var(--panel);
  transition:
    transform 0.15s ease,
    box-shadow 0.15s ease;
}
.soc b {
  flex: none;
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--orange);
  color: var(--ink);
}
.ico {
  width: 26px;
  height: 26px;
  fill: currentColor;
}
.soc span {
  font-weight: 700;
  line-height: 1.4;
}
.soc:hover,
.soc:focus-visible {
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(255, 138, 42, 0.2);
}

.foot {
  padding: 40px 0;
  border-top: 1px solid var(--line);
  color: var(--dim);
  font-size: 14px;
}

/* 桌機：內容左右留白加寬 */
@media (min-width: 900px) {
  .wrap {
    padding-inline: 40px;
  }
}
@media (max-width: 560px) {
  .shots {
    grid-template-columns: 1fr;
  }
  .brand span {
    display: none;
  }
  .nav {
    width: 100%;
    justify-content: space-between;
    gap: 8px;
  }
}

/* 動畫：只動 transform / opacity；偏好減少動態時整段不啟用 */
@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
  @keyframes up {
    from {
      opacity: 0;
      transform: translateY(var(--y, 16px));
    }
  }
  .hero-in > * {
    animation: up 0.7s ease backwards;
  }
  .js .reveal {
    --y: 20px;
  }
  .js .reveal:not(.in) {
    opacity: 0;
    transform: translateY(20px);
  }
  .js .reveal.in {
    animation: up 0.6s ease backwards;
    animation-delay: var(--d, 0s);
  }
}
