@import url("https://fonts.googleapis.com/css2?family=Inter:wght@500;600;700;800;900&family=Noto+Sans+JP:wght@500;600;700;800;900&family=Noto+Sans+SC:wght@500;600;700;800;900&display=swap");

:root {
  --bg: #071014;
  --bg-deep: #030608;
  --paper: #fff8e6;
  --ink: #f7f1df;
  --ink-dark: #11161a;
  --muted: rgba(247, 241, 223, 0.74);
  --muted-dark: rgba(17, 22, 26, 0.68);
  --line: rgba(255, 255, 255, 0.16);
  --line-dark: rgba(17, 22, 26, 0.12);
  --cyan: #10f5d2;
  --pink: #ff4f8b;
  --yellow: #ffd45a;
  --orange: #ff8a38;
  --panel: rgba(7, 15, 18, 0.78);
  --shadow: 0 28px 80px rgba(0, 0, 0, 0.34);
  --font-body: "Inter", "Noto Sans SC", "Noto Sans JP", "Microsoft YaHei UI", "Microsoft YaHei", "PingFang SC", "Hiragino Sans", "Segoe UI", Arial, sans-serif;
  --font-display: "Inter", "Noto Sans SC", "Noto Sans JP", "Microsoft YaHei UI", "Microsoft YaHei", "PingFang SC", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  font-family: var(--font-body);
  background:
    linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px),
    linear-gradient(115deg, rgba(16, 245, 210, 0.16) 0%, transparent 28%),
    linear-gradient(245deg, rgba(255, 79, 139, 0.14) 0%, transparent 25%),
    linear-gradient(180deg, #071014 0%, #030608 100%);
  background-size: 38px 38px, 38px 38px, auto, auto, auto;
}

html:lang(zh-CN),
html:lang(zh-CN) body {
  font-family: "Noto Sans SC", "Microsoft YaHei UI", "Microsoft YaHei", "PingFang SC", var(--font-body);
  font-weight: 500;
}

html:lang(ja),
html:lang(ja) body {
  font-family: "Noto Sans JP", "Yu Gothic", "Meiryo", "Hiragino Sans", var(--font-body);
  font-weight: 500;
}

html:lang(zh-CN) h1,
html:lang(zh-CN) h2,
html:lang(zh-CN) h3,
html:lang(ja) h1,
html:lang(ja) h2,
html:lang(ja) h3 {
  font-family: inherit;
  font-weight: 900;
}

:lang(zh-CN) h1,
:lang(ja) h1 {
  line-height: 1.04;
}

:lang(zh-CN) h2,
:lang(ja) h2 {
  line-height: 1.08;
}

:lang(zh-CN) .section-heading h2,
:lang(ja) .section-heading h2 {
  max-width: min(100%, 16em);
  font-size: clamp(36px, 4.7vw, 62px);
  word-break: keep-all;
  overflow-wrap: normal;
}

:lang(zh-CN) .intro-grid h2,
:lang(ja) .intro-grid h2 {
  max-width: 12em;
  font-size: clamp(36px, 4.7vw, 62px);
  word-break: keep-all;
  overflow-wrap: normal;
}

:lang(zh-CN) .page-hero h1,
:lang(ja) .page-hero h1 {
  max-width: 13ch;
  font-size: clamp(42px, 8vw, 96px);
}

body.nav-open {
  overflow: hidden;
}

a {
  color: inherit;
}

img {
  display: block;
  width: 100%;
  height: auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 16px 28px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(3, 6, 8, 0.78);
  backdrop-filter: blur(20px);
}

.brand,
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 18px;
  letter-spacing: 0.08em;
  text-decoration: none;
}

.brand-mark {
  width: 17px;
  height: 17px;
  border: 2px solid var(--cyan);
  border-radius: 50%;
  box-shadow: 0 0 18px rgba(16, 245, 210, 0.56), inset 0 0 10px rgba(16, 245, 210, 0.28);
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 18px;
}

.header-actions {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.language-switcher {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  padding: 4px;
  background: rgba(255, 255, 255, 0.06);
}

.language-switcher button {
  min-width: 34px;
  border: 0;
  border-radius: 999px;
  padding: 7px 9px;
  color: var(--muted);
  background: transparent;
  font-weight: 950;
  cursor: pointer;
}

.language-switcher button.is-active {
  color: #061013;
  background: var(--cyan);
}

.site-nav a,
.site-footer nav a {
  color: var(--muted);
  font-size: 14px;
  font-weight: 800;
  text-decoration: none;
  text-transform: uppercase;
}

.site-nav a:hover,
.site-footer nav a:hover,
.text-link:hover {
  color: var(--cyan);
}

.nav-toggle {
  display: none;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 9px 14px;
  color: var(--ink);
  background: transparent;
  font-weight: 900;
  text-transform: uppercase;
}

.hero {
  position: relative;
  min-height: calc(100svh - 69px);
  overflow: hidden;
  isolation: isolate;
}

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: -2;
  background:
    linear-gradient(90deg, rgba(3, 6, 8, 0.96) 0%, rgba(3, 6, 8, 0.76) 38%, rgba(3, 6, 8, 0.28) 100%),
    linear-gradient(180deg, rgba(3, 6, 8, 0.08), rgba(3, 6, 8, 0.88)),
    url("assets/site-art/hakurokudo-hero.png") center / cover no-repeat;
  filter: saturate(1.1);
}

.hero::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  z-index: -1;
  height: 34%;
  background: linear-gradient(180deg, transparent, var(--bg-deep));
}

.hero-inner {
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
  padding: clamp(72px, 11vw, 132px) 0 120px;
}

.eyebrow,
.section-kicker,
.status {
  color: var(--cyan);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

h1,
h2,
h3 {
  margin: 0;
}

h1,
h2 {
  font-family: var(--font-display);
  font-weight: 900;
  letter-spacing: 0;
}

h1 {
  max-width: 9em;
  margin-top: 14px;
  font-size: clamp(40px, 10vw, 128px);
  line-height: 0.86;
  text-transform: uppercase;
  text-shadow: 0 0 32px rgba(16, 245, 210, 0.24);
  overflow-wrap: normal;
  word-break: normal;
}

h2 {
  font-size: clamp(34px, 5vw, 64px);
  line-height: 1.02;
}

h3 {
  font-size: clamp(24px, 3vw, 38px);
  line-height: 1.05;
}

p {
  line-height: 1.74;
}

p,
li {
  font-weight: 500;
}

.hero-lede {
  max-width: 620px;
  margin: 24px 0 0;
  color: rgba(247, 241, 223, 0.88);
  font-size: clamp(17px, 2.1vw, 22px);
}

.hero-actions,
.action-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
  margin-top: 28px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 14px 20px;
  border-radius: 999px;
  font-weight: 950;
  text-decoration: none;
  text-transform: uppercase;
  transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease;
}

.button:hover,
.button:focus-visible {
  transform: translateY(-2px);
}

.button-primary {
  color: #061013;
  background: linear-gradient(135deg, var(--cyan), #66ffe9);
  box-shadow: 0 18px 44px rgba(16, 245, 210, 0.24);
}

.button-secondary {
  border: 1px solid rgba(255, 255, 255, 0.24);
  color: var(--ink);
  background: rgba(255, 255, 255, 0.055);
}

.hero-strip {
  position: absolute;
  right: 0;
  bottom: 24px;
  left: 0;
  display: flex;
  gap: 10px;
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
  overflow: auto;
  padding-bottom: 2px;
  scrollbar-width: none;
}

.hero-strip::-webkit-scrollbar {
  display: none;
}

.hero-strip span {
  flex: 0 0 auto;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  padding: 9px 14px;
  color: rgba(247, 241, 223, 0.8);
  background: rgba(3, 6, 8, 0.62);
  font-size: 13px;
  font-weight: 850;
}

.section {
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
  padding: clamp(54px, 9vw, 104px) 0;
}

.section-heading {
  max-width: 980px;
  margin-bottom: 30px;
}

.section-heading h2,
.studio-band h2 {
  margin-top: 10px;
}

.section-intro {
  padding-top: 68px;
}

.section-tools {
  padding-bottom: clamp(36px, 6vw, 72px);
}

.section-tools + .section-live {
  padding-top: clamp(36px, 6vw, 72px);
}

.section-actions {
  margin-top: 24px;
}

.intro-grid {
  display: grid;
  grid-template-columns: 0.9fr 1fr;
  gap: clamp(26px, 5vw, 70px);
  align-items: start;
}

.intro-grid p,
.studio-band p,
.article-body p,
.page-lede {
  color: var(--muted);
  font-size: 18px;
}

.feature-layout {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: stretch;
  gap: 22px;
}

.game-feature,
.game-card,
.guide-list a,
.article-card,
.contact-panel {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.055);
  box-shadow: var(--shadow);
}

.game-feature-primary {
  grid-row: auto;
}

.game-feature {
  display: flex;
  flex-direction: column;
}

.game-feature .image-link {
  aspect-ratio: 16 / 9;
}

.game-feature img {
  height: 100%;
  object-fit: cover;
}

.tool-highlight {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(320px, 0.95fr);
}

.tool-highlight .image-link {
  height: 100%;
  aspect-ratio: 16 / 9;
}

.tool-highlight img {
  height: 100%;
  object-fit: cover;
}

.tool-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
}

.tool-card .image-link {
  aspect-ratio: 16 / 9;
}

.tool-card img {
  height: 100%;
  object-fit: cover;
}

.image-link {
  display: block;
  overflow: hidden;
}

.image-link img,
.game-card img {
  transition: transform 260ms ease, filter 260ms ease;
}

.image-link:hover img,
.game-card:hover img {
  transform: scale(1.025);
  filter: saturate(1.12);
}

.game-copy,
.game-card > div,
.article-card,
.contact-panel {
  padding: 24px;
}

.game-copy {
  display: flex;
  flex: 1;
  flex-direction: column;
}

.game-copy .action-row {
  margin-top: auto;
  padding-top: 10px;
}

.game-copy h3,
.game-card h3,
.article-card h3 {
  margin-top: 9px;
}

.game-copy p,
.game-card p,
.article-card p,
.guide-list small {
  color: var(--muted);
}

.status {
  display: inline-flex;
  width: fit-content;
  border: 1px solid rgba(16, 245, 210, 0.28);
  border-radius: 999px;
  padding: 6px 9px;
  background: rgba(16, 245, 210, 0.08);
}

.status-live {
  color: #061013;
  background: var(--cyan);
}

.text-link {
  color: var(--yellow);
  font-weight: 950;
  text-decoration: none;
  text-transform: uppercase;
}

.game-grid,
.article-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.slate-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  margin-top: 24px;
}

.game-card {
  display: flex;
  flex-direction: column;
  min-height: 100%;
}

.game-card > div {
  display: flex;
  flex: 1;
  flex-direction: column;
}

.game-card .text-link {
  margin-top: auto;
}

.game-card img {
  aspect-ratio: 16 / 10;
  object-fit: cover;
}

.game-card h3 {
  overflow-wrap: anywhere;
}

.card-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.card-meta {
  margin-bottom: 10px;
}

.game-card-text {
  background:
    linear-gradient(135deg, rgba(255, 212, 90, 0.16), transparent 42%),
    linear-gradient(225deg, rgba(255, 79, 139, 0.18), transparent 44%),
    rgba(255, 255, 255, 0.055);
}

.guide-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.guide-list a {
  display: grid;
  gap: 8px;
  min-height: 180px;
  padding: 24px;
  text-decoration: none;
  transition: transform 160ms ease, border-color 160ms ease;
}

.guide-list a:hover {
  transform: translateY(-3px);
  border-color: rgba(16, 245, 210, 0.48);
}

.guide-list span {
  color: var(--pink);
  font-size: 12px;
  font-weight: 950;
  text-transform: uppercase;
}

.guide-list strong {
  font-size: clamp(22px, 3vw, 34px);
  line-height: 1.08;
}

.studio-band {
  display: grid;
  grid-template-columns: minmax(520px, 1fr) minmax(0, 0.95fr);
  gap: 18px 52px;
  align-items: center;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.studio-band > p {
  margin: 0;
}

.studio-band .button {
  grid-column: 2;
  justify-self: start;
}

:lang(zh-CN) .studio-band h2,
:lang(ja) .studio-band h2 {
  max-width: 11em;
  font-size: clamp(38px, 4.6vw, 58px);
  line-height: 1.08;
}

.site-footer {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
  padding: 34px 0 48px;
  border-top: 1px solid var(--line);
  color: var(--muted);
}

.site-footer p {
  margin: 10px 0 0;
}

.site-footer nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 14px;
}

.page-hero {
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
  padding: clamp(62px, 10vw, 116px) 0 clamp(36px, 6vw, 70px);
}

.page-hero h1 {
  max-width: 12ch;
  font-size: clamp(52px, 10vw, 118px);
  text-transform: none;
}

.page-lede {
  max-width: 760px;
  margin-top: 22px;
}

.media-hero {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 28px;
  align-items: center;
}

.media-hero img {
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.tool-page .page-hero h1 {
  max-width: 14ch;
  font-size: clamp(44px, 7.4vw, 98px);
  line-height: 0.94;
}

.tool-page .media-hero img {
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.tool-page .article-body strong {
  color: var(--ink);
}

.article-body {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 48px;
  width: min(1060px, calc(100% - 40px));
  margin: 0 auto;
  padding-bottom: 82px;
}

.article-body h2 {
  margin: 42px 0 12px;
  font-size: clamp(30px, 4vw, 48px);
}

.article-body ul,
.article-body ol {
  color: var(--muted);
  line-height: 1.75;
}

.side-panel {
  position: sticky;
  top: 92px;
  align-self: start;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 22px;
  background: rgba(255, 255, 255, 0.055);
}

.side-panel a {
  display: block;
  margin-top: 12px;
}

.side-panel code {
  display: inline-block;
  margin-top: 4px;
  color: var(--yellow);
  font-family: inherit;
  font-weight: 900;
  overflow-wrap: anywhere;
}

.legal-page,
.contact-page {
  width: min(860px, calc(100% - 40px));
  margin: 0 auto;
  padding-bottom: 80px;
}

.legal-page h2,
.contact-page h2 {
  margin-top: 38px;
  font-size: 34px;
}

.legal-page p,
.legal-page li,
.contact-page p {
  color: var(--muted);
  line-height: 1.75;
}

.contact-panel {
  margin-top: 28px;
}

.reveal {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 520ms ease, transform 520ms ease;
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 980px) {
  .feature-layout,
  .tool-highlight,
  .tool-grid,
  .intro-grid,
  .studio-band,
  .media-hero,
  .article-body,
  .game-grid,
  .slate-grid,
  .article-grid {
    grid-template-columns: 1fr;
  }

  .studio-band {
    align-items: start;
  }

  .studio-band .button {
    grid-column: auto;
  }
}

@media (max-width: 760px) {
  .site-header {
    gap: 10px;
    padding: 14px 12px;
  }

  .brand,
  .footer-brand {
    gap: 7px;
    font-size: 15px;
    letter-spacing: 0.04em;
  }

  .brand-mark {
    width: 15px;
    height: 15px;
  }

  .nav-toggle {
    display: inline-flex;
    padding: 8px 10px;
  }

  .site-nav {
    position: fixed;
    inset: 62px 14px auto;
    display: none;
    flex-direction: column;
    align-items: stretch;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 18px;
    background: rgba(3, 6, 8, 0.96);
  }

  body.nav-open .site-nav {
    display: flex;
  }

  .header-actions {
    margin-left: auto;
  }

  .language-switcher {
    padding: 3px;
  }

  .language-switcher button {
    min-width: 28px;
    padding: 7px 6px;
  }

  .site-nav a {
    padding: 10px 0;
  }

  .hero {
    min-height: calc(100svh - 61px);
  }

  .hero-bg {
    background:
      linear-gradient(180deg, rgba(3, 6, 8, 0.92), rgba(3, 6, 8, 0.78) 54%, rgba(3, 6, 8, 0.96)),
      url("assets/site-art/hakurokudo-hero.png") center / cover no-repeat;
  }

  .hero-strip {
    bottom: 16px;
    flex-wrap: wrap;
    width: min(100% - 28px, 1180px);
    overflow: visible;
  }

  .hero-strip span {
    padding: 8px 10px;
    font-size: 12px;
  }

  :lang(zh-CN) .section-heading h2,
  :lang(ja) .section-heading h2,
  :lang(zh-CN) .intro-grid h2,
  :lang(ja) .intro-grid h2 {
    max-width: 100%;
    font-size: clamp(34px, 9vw, 42px);
    word-break: normal;
    overflow-wrap: anywhere;
  }

  .hero-inner,
  .section,
  .page-hero,
  .site-footer,
  .article-body,
  .legal-page,
  .contact-page {
    width: min(100% - 28px, 1180px);
  }

  .hero-actions,
  .action-row,
  .site-footer,
  .site-footer nav,
  .guide-list,
  .slate-grid {
    align-items: stretch;
    flex-direction: column;
    grid-template-columns: 1fr;
  }

  .page-hero h1,
  :lang(zh-CN) .page-hero h1,
  :lang(ja) .page-hero h1 {
    max-width: 100%;
    font-size: clamp(36px, 9.6vw, 58px);
    line-height: 1.08;
    overflow-wrap: break-word;
    word-break: normal;
  }

  .button {
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition: none !important;
    animation: none !important;
  }
}
