:root {
  --bg-deep: #0b0e16;
  --bg-mid: #12182a;
  --bg-panel: rgba(16, 22, 38, 0.72);
  --text: #e8e4dc;
  --text-muted: #a8a295;
  --gold: #d4a84b;
  --gold-soft: #f0d59a;
  --amber: #e08a3c;
  --line: rgba(212, 168, 75, 0.28);
  --white: #ffffff;
  --shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
  --radius: 4px;
  --header-h: 72px;
  --font-display: "Cinzel", "Noto Serif TC", "Noto Serif JP", "Noto Serif KR", serif;
  --font-body: "Source Sans 3", "Noto Sans TC", "Noto Sans JP", "Noto Sans KR", sans-serif;
  --max: 1120px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--text);
  background:
    radial-gradient(1200px 600px at 70% -10%, rgba(224, 138, 60, 0.18), transparent 60%),
    radial-gradient(900px 500px at 10% 20%, rgba(55, 78, 140, 0.25), transparent 55%),
    linear-gradient(180deg, #0a0d14 0%, var(--bg-deep) 40%, #0e1422 100%);
  background-attachment: fixed;
  line-height: 1.7;
  min-height: 100vh;
  overflow-x: hidden;
}

img,
video {
  max-width: 100%;
  display: block;
}

a {
  color: var(--gold-soft);
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover {
  color: var(--white);
}

button {
  font: inherit;
}

.container {
  width: min(100% - 2.5rem, var(--max));
  margin-inline: auto;
}

/* Header */
.site-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 100;
  height: var(--header-h);
  display: flex;
  align-items: center;
  transition: background 0.35s ease, backdrop-filter 0.35s ease, border-color 0.35s ease;
  border-bottom: 1px solid transparent;
}

.site-header.is-scrolled {
  background: rgba(8, 10, 18, 0.82);
  backdrop-filter: blur(14px);
  border-bottom-color: var(--line);
}

.header-inner {
  width: min(100% - 1.5rem, 1240px);
  margin-inline: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  color: var(--white);
  line-height: 0;
}

.brand-logo {
  width: auto;
  height: 40px;
  object-fit: contain;
  object-position: left center;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.site-nav a {
  color: var(--text);
  font-size: 0.95rem;
  letter-spacing: 0.04em;
  position: relative;
}

.site-nav a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -0.35rem;
  width: 100%;
  height: 1px;
  background: var(--gold);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s var(--ease);
}

.site-nav a:hover::after {
  transform: scaleX(1);
}

.lang-switch {
  display: flex;
  gap: 0.25rem;
  padding: 0.2rem;
  border: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.25);
}

.lang-switch button {
  border: 0;
  background: transparent;
  color: var(--text-muted);
  padding: 0.35rem 0.55rem;
  cursor: pointer;
  font-size: 0.8rem;
  letter-spacing: 0.02em;
}

.lang-switch button.is-active,
.lang-switch button:hover {
  color: var(--bg-deep);
  background: var(--gold);
}

.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.35);
  color: var(--text);
  cursor: pointer;
}

.nav-toggle span {
  display: block;
  width: 18px;
  height: 1.5px;
  margin: 4px auto;
  background: currentColor;
}

/* Hero */
.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: grid;
  align-items: end;
  overflow: hidden;
}

.hero-media {
  position: absolute;
  inset: 0;
}

.hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 35%;
  transform: scale(1.04);
  animation: heroDrift 18s var(--ease) infinite alternate;
}

@keyframes heroDrift {
  from {
    transform: scale(1.04) translate3d(0, 0, 0);
  }
  to {
    transform: scale(1.1) translate3d(-1.5%, -1%, 0);
  }
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(8, 10, 18, 0.35) 0%, rgba(8, 10, 18, 0.15) 35%, rgba(8, 10, 18, 0.82) 78%, var(--bg-deep) 100%),
    linear-gradient(90deg, rgba(8, 10, 18, 0.55) 0%, transparent 45%);
}

.hero-content {
  position: relative;
  z-index: 1;
  width: min(100% - 2.5rem, var(--max));
  margin: 0 auto 4.25rem;
  padding-top: calc(var(--header-h) + 1.5rem);
}

.hero-brand {
  margin: 0 0 1rem;
  opacity: 0;
  animation: riseIn 1s var(--ease) 0.15s forwards;
}

.hero-logo {
  width: min(280px, 52vw);
  height: auto;
  filter: drop-shadow(0 10px 32px rgba(0, 0, 0, 0.6));
}

.hero-tagline {
  margin: 0 0 1.75rem;
  max-width: 28ch;
  font-size: clamp(1.05rem, 2.2vw, 1.35rem);
  color: var(--gold-soft);
  opacity: 0;
  animation: riseIn 1s var(--ease) 0.32s forwards;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  opacity: 0;
  animation: riseIn 1s var(--ease) 0.48s forwards;
}

@keyframes riseIn {
  from {
    opacity: 0;
    transform: translateY(22px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 48px;
  padding: 0.75rem 1.35rem;
  border: 1px solid transparent;
  font-size: 0.95rem;
  letter-spacing: 0.04em;
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn-primary {
  background: linear-gradient(135deg, var(--gold) 0%, var(--amber) 100%);
  color: #1a1208;
  font-weight: 700;
}

.btn-primary:hover {
  color: #1a1208;
  filter: brightness(1.06);
}

.btn-ghost {
  background: rgba(0, 0, 0, 0.35);
  border-color: var(--line);
  color: var(--text);
  backdrop-filter: blur(8px);
}

.scroll-hint {
  position: absolute;
  left: 50%;
  bottom: 1.4rem;
  transform: translateX(-50%);
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
  color: var(--text-muted);
  font-size: 0.75rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  opacity: 0;
  animation: riseIn 1s var(--ease) 1s forwards;
}

.scroll-hint::after {
  content: "";
  width: 1px;
  height: 34px;
  background: linear-gradient(var(--gold), transparent);
  animation: pulseLine 1.8s ease-in-out infinite;
}

@keyframes pulseLine {
  0%,
  100% {
    opacity: 0.35;
    transform: scaleY(0.7);
  }
  50% {
    opacity: 1;
    transform: scaleY(1);
  }
}

/* Sections */
.section {
  position: relative;
  padding: clamp(4rem, 9vw, 7rem) 0;
}

.section-head {
  margin-bottom: 2rem;
}

.eyebrow {
  margin: 0 0 0.6rem;
  color: var(--gold);
  font-size: 0.85rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.section-title {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  font-weight: 600;
  letter-spacing: 0.04em;
  line-height: 1.2;
  color: var(--white);
}

.section-lead,
.prose p {
  margin: 0 0 1rem;
  color: var(--text-muted);
  font-size: 1.05rem;
  max-width: 65ch;
}

.prose p:last-child {
  margin-bottom: 0;
}

.about-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: clamp(1.5rem, 4vw, 3.5rem);
  align-items: center;
}

.about-visual {
  position: relative;
  min-height: 360px;
  overflow: hidden;
  isolation: isolate;
}

.about-visual img {
  width: 100%;
  height: 100%;
  min-height: 360px;
  object-fit: cover;
  object-position: center 30%;
}

.about-visual::after {
  content: "";
  position: absolute;
  inset: 0;
  border: 1px solid var(--line);
  pointer-events: none;
}

.about-visual::before {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 45%;
  background: linear-gradient(transparent, rgba(8, 10, 18, 0.85));
  z-index: 1;
}

/* Game */
.game-intro {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.08fr);
  gap: clamp(1.5rem, 4vw, 2.75rem);
  align-items: center;
}

.game-intro-copy {
  display: grid;
  gap: 0.85rem;
  min-width: 0;
}

.game-title-block {
  display: grid;
  gap: 0.65rem;
  margin-bottom: 0.35rem;
}

.game-logo {
  width: min(380px, 100%);
  margin-bottom: 0.25rem;
  filter: drop-shadow(0 10px 30px rgba(0, 0, 0, 0.45));
}

.game-name {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(1.55rem, 3.2vw, 2.35rem);
  color: var(--gold-soft);
  letter-spacing: 0.03em;
  line-height: 1.25;
}

.game-name-sub {
  margin: 0;
  color: var(--text-muted);
  letter-spacing: 0.08em;
}

.game-intro-copy .section-lead,
.game-intro-copy .prose p {
  max-width: none;
}

.steam-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 0.35rem;
}

.gameplay-embed {
  min-width: 0;
}

.gameplay-embed .eyebrow {
  margin-bottom: 0.85rem;
}

.yt-facade {
  position: relative;
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: #000;
  cursor: pointer;
  aspect-ratio: 16 / 9;
  overflow: hidden;
}

.yt-facade img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.45s var(--ease), filter 0.3s ease;
}

.yt-facade:hover img {
  transform: scale(1.03);
  filter: brightness(1.08);
}

.yt-facade-play {
  position: absolute;
  inset: 50% auto auto 50%;
  width: 68px;
  height: 48px;
  transform: translate(-50%, -50%);
  border-radius: 14px;
  background: #ff0033;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.45);
  transition: transform 0.2s ease, background 0.2s ease;
}

.yt-facade-play::before {
  content: "";
  position: absolute;
  left: 27px;
  top: 14px;
  border-style: solid;
  border-width: 10px 0 10px 16px;
  border-color: transparent transparent transparent #fff;
}

.yt-facade:hover .yt-facade-play {
  transform: translate(-50%, -50%) scale(1.06);
  background: #ff2244;
}

.feature {
  display: grid;
  grid-template-columns: 1fr 1.15fr;
  gap: clamp(1.25rem, 4vw, 3rem);
  align-items: center;
  padding: clamp(2.5rem, 6vw, 4.5rem) 0;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.feature:nth-child(even) {
  grid-template-columns: 1.15fr 1fr;
}

.feature:nth-child(even) .feature-copy {
  order: 2;
}

.feature:nth-child(even) .feature-media {
  order: 1;
}

.feature-title {
  margin: 0 0 1rem;
  font-family: var(--font-display);
  font-size: clamp(1.35rem, 2.8vw, 1.9rem);
  color: var(--white);
  letter-spacing: 0.03em;
}

.media-frame {
  position: relative;
  background: #000;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.media-frame video,
.media-frame img,
.media-frame iframe {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  background: #000;
  border: 0;
  display: block;
}

.media-frame video {
  cursor: pointer;
}

.media-frame--youtube iframe {
  object-fit: initial;
}

/* Screens */
.screen-rail {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(240px, 320px);
  gap: 1rem;
  overflow-x: auto;
  padding-bottom: 0.75rem;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
}

.screen-rail img {
  scroll-snap-align: start;
  border: 1px solid rgba(255, 255, 255, 0.08);
  aspect-ratio: 16 / 9;
  object-fit: cover;
  transition: transform 0.35s var(--ease), border-color 0.2s ease;
}

.screen-rail img:hover {
  transform: translateY(-4px);
  border-color: var(--line);
}

/* Community */
.community {
  text-align: center;
}

.community .section-lead {
  margin-inline: auto;
}

.social-links {
  margin-top: 2rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem;
}

.social-card {
  display: inline-flex;
  align-items: center;
  gap: 0.9rem;
  min-height: 56px;
  padding: 0.85rem 1.35rem;
  border: 1px solid var(--line);
  color: var(--white);
  transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.social-card:hover {
  transform: translateY(-2px);
  color: var(--white);
}

.social-card--discord {
  background: linear-gradient(135deg, rgba(88, 101, 242, 0.18), rgba(16, 22, 38, 0.65));
}

.social-card--discord:hover {
  border-color: rgba(88, 101, 242, 0.55);
}

.social-card--youtube {
  background: linear-gradient(135deg, rgba(255, 0, 0, 0.16), rgba(16, 22, 38, 0.65));
}

.social-card--youtube:hover {
  border-color: rgba(255, 0, 0, 0.45);
}

.social-icon {
  display: block;
  flex-shrink: 0;
  object-fit: contain;
}

/* Discord Symbol is wider than tall (~1.32:1) — never force a square */
.social-icon--discord {
  width: auto;
  height: 28px;
  aspect-ratio: auto;
}

.social-icon--youtube {
  width: 40px;
  height: 28px;
  color: #ff0033;
}

/* Footer */
.site-footer {
  padding: 2.5rem 0 3rem;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  color: var(--text-muted);
  font-size: 0.9rem;
  text-align: center;
}

/* Reveal */
[data-reveal] {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.8s var(--ease), transform 0.8s var(--ease);
}

[data-reveal].is-visible {
  opacity: 1;
  transform: translateY(0);
}

[data-reveal="left"] {
  transform: translateX(-28px);
}

[data-reveal="left"].is-visible {
  transform: translateX(0);
}

[data-reveal="right"] {
  transform: translateX(28px);
}

[data-reveal="right"].is-visible {
  transform: translateX(0);
}

/* Responsive */
@media (max-width: 900px) {
  .about-grid,
  .game-intro,
  .feature,
  .feature:nth-child(even) {
    grid-template-columns: 1fr;
  }

  .feature:nth-child(even) .feature-copy,
  .feature:nth-child(even) .feature-media {
    order: initial;
  }

  .brand-logo {
    height: 34px;
  }

  .nav-toggle {
    display: inline-block;
  }

  .site-nav {
    position: fixed;
    top: var(--header-h);
    right: 1rem;
    left: 1rem;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0.75rem;
    padding: 1rem;
    background: rgba(10, 13, 22, 0.96);
    border: 1px solid var(--line);
    backdrop-filter: blur(12px);
  }

  .site-nav.is-open {
    display: flex;
  }

  .lang-switch {
    justify-content: center;
  }

  .hero-content {
    margin-bottom: 3.5rem;
  }

  .hero-logo {
    width: min(220px, 56vw);
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .hero-media img,
  .hero-brand,
  .hero-tagline,
  .hero-actions,
  .scroll-hint,
  .scroll-hint::after,
  [data-reveal] {
    animation: none !important;
    transition: none !important;
    opacity: 1 !important;
    transform: none !important;
  }
}
