/*
Theme Name: ARCLIGHT GAMES
Theme URI: https://arclight.moyuzj.dev
Author: Arclight Games
Author URI: https://arclight.moyuzj.dev
Description: ARCLIGHT GAMES 独立游戏工作室官方 WordPress 主题。「心中有光，来日方长。」完整复刻并升级原站极简黑白瑞士网格设计、开场矢量动画、交互粒子光束画布、滚动视差叙事与像素海洋舞台，内置首页、关于我、作品、新闻四大独立页面，提供双栏瑞士网格文章阅读、全套古腾堡区块深度适配、通用新作展示区块及主题版本无损同步更新。
Version: 1.1.0
Requires at least: 6.0
Tested up to: 6.7
Requires PHP: 7.4
License: GPL-2.0-or-later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: arclight-games
Tags: dark, one-column, two-columns, custom-menu, featured-images, block-styles, editor-style, portfolio, blog
*/

:root {
  --bg: #000000;
  --fg: #ffffff;
  --dim: #9898a2;
  --dimmer: #8a8a95;
  --line: #24242c;
  --line-strong: #3e3e4a;
  --shell: clamp(20px, 5vw, 76px);
  --nav-h: 68px;
  --admin-offset: 0px;
  --ease-out: cubic-bezier(.16, .84, .30, 1);
  --ease-io: cubic-bezier(.65, 0, .35, 1);
  --sans: "Inter", -apple-system, BlinkMacSystemFont, "HarmonyOS Sans SC", "PingFang SC", "Noto Sans SC", "Source Han Sans SC", "Microsoft YaHei UI", "Microsoft YaHei", system-ui, sans-serif;
  --mono: ui-monospace, "SF Mono", "JetBrains Mono", "Roboto Mono", Menlo, Consolas, "PingFang SC", "Microsoft YaHei", "Noto Sans SC", monospace;
}

body.admin-bar {
  --admin-offset: 32px;
}

@media screen and (max-width: 782px) {
  body.admin-bar {
    --admin-offset: 46px;
  }
}

*, :after, :before {
  box-sizing: border-box;
}

:where(.app, .auth-modal, .loader) :where(button, input, select, textarea, .btn, .iconbtn, .framed, .navlink, .news-cat, .post-tag, .page-numbers, .comment-card, .comment-respond) {
  border-radius: 0;
}

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--fg);
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.72;
  letter-spacing: .01em;
  overflow-x: clip;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

html.is-locked,
html.is-drawer-open,
body.is-locked,
body.is-drawer-open {
  overflow: hidden;
}

::selection {
  background: #fff;
  color: #000;
}

a {
  text-decoration: none;
}

a, button {
  color: inherit;
}

button {
  font: inherit;
}

blockquote, figure, h1, h2, h3, h4, h5, h6, p {
  margin: 0;
}

:where(.nav, .foot, .principles, .horizon-cards, .vision, .works-index, .news-index, .comment-list, .cdw-cp__bar, .cdw-ch, .cdw-log__list) {
  margin: 0;
  padding: 0;
  list-style: none;
}

img, svg {
  display: block;
  max-width: 100%;
}

:focus-visible {
  outline: 1px solid var(--fg);
  outline-offset: 3px;
}

/* === Typography & Primitives === */
.eyebrow {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .34em;
  text-transform: uppercase;
  color: var(--dim);
}

.display {
  font-family: var(--sans);
  letter-spacing: .02em;
  line-height: .96;
  font-size: clamp(38px, 8.5vw, 132px);
  font-weight: 500;
  font-feature-settings: "halt" 1;
}

.h2 {
  font-family: var(--sans);
  font-weight: 500;
  letter-spacing: .05em;
  text-transform: uppercase;
  font-size: clamp(22px, 3.2vw, 40px);
  line-height: 1.4;
  font-feature-settings: "halt" 1;
}

.lede {
  font-family: var(--sans);
  font-size: clamp(15px, 1.3vw, 17px);
  line-height: 1.85;
  color: var(--dim);
  max-width: 60ch;
}

.mono-xs {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--dimmer);
  font-variant-numeric: tabular-nums;
}

.shell {
  width: 100%;
  max-width: 1600px;
  margin: 0 auto;
  padding-inline: var(--shell);
}

.section {
  position: relative;
  padding-block: clamp(90px, 13vh, 180px);
  border-top: 1px solid var(--line);
}

.rule {
  height: 1px;
  background: var(--line);
  width: 100%;
}

.framed {
  position: relative;
}

.framed:after,
.framed:before {
  content: "";
  position: absolute;
  width: 11px;
  height: 11px;
  border: 1px solid var(--line-strong);
  pointer-events: none;
}

.framed:before {
  top: -1px;
  left: -1px;
  border-right: 0;
  border-bottom: 0;
}

.framed:after {
  bottom: -1px;
  right: -1px;
  border-left: 0;
  border-top: 0;
}

/* === Buttons & Links === */
.btn {
  --btn-fg: #fff;
  --btn-bg: #000;
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 14px;
  padding: 15px 26px;
  border: 1px solid var(--fg);
  background: var(--btn-bg);
  color: var(--btn-fg);
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: .24em;
  text-transform: uppercase;
  cursor: pointer;
  overflow: hidden;
  isolation: isolate;
  transition: color .38s var(--ease-io), border-color .38s var(--ease-io);
}

.btn:before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: var(--fg);
  transform: scaleX(0);
  transform-origin: right center;
  transition: transform .44s var(--ease-io);
}

.btn:focus-visible,
.btn:hover {
  color: #000;
}

.btn:focus-visible:before,
.btn:hover:before {
  transform: scaleX(1);
  transform-origin: left center;
}

.btn--invert {
  --btn-bg: #fff;
  --btn-fg: #000;
  border-color: #fff;
}

.btn--invert:before {
  background: #000;
}

.btn--invert:focus-visible,
.btn--invert:hover {
  color: #fff;
}

.btn--ghost {
  border-color: var(--line-strong);
  color: var(--dim);
}

.btn--ghost:focus-visible,
.btn--ghost:hover {
  color: #000;
  border-color: #fff;
}

.btn__arrow {
  display: inline-block;
  transition: transform .44s var(--ease-io);
}

.btn:hover .btn__arrow {
  transform: translateX(5px);
}

.navlink {
  position: relative;
  display: inline-flex;
  align-items: center;
  height: 38px;
  padding: 0 15px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .24em;
  text-transform: uppercase;
  color: var(--dim);
  overflow: hidden;
  isolation: isolate;
  transition: color .34s var(--ease-io);
}

.navlink:before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: var(--fg);
  transform: scaleX(0);
  transform-origin: right center;
  transition: transform .4s var(--ease-io);
}

.navlink:focus-visible,
.navlink:hover {
  color: #000;
}

.navlink:focus-visible:before,
.navlink:hover:before {
  transform: scaleX(1);
  transform-origin: left center;
}

.navlink[data-active="true"] {
  color: var(--fg);
}

.navlink[data-active="true"]:focus-visible,
.navlink[data-active="true"]:hover {
  color: #000;
}

.navlink[data-active="true"]:after {
  content: "";
  position: absolute;
  left: 15px;
  right: 15px;
  bottom: 4px;
  height: 1px;
  background: var(--fg);
}

.navlink[data-active="true"]:focus-visible:after,
.navlink[data-active="true"]:hover:after {
  background: #000;
}

.iconbtn {
  position: relative;
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line-strong);
  background: transparent;
  color: var(--fg);
  cursor: pointer;
  flex-shrink: 0;
  overflow: hidden;
  isolation: isolate;
  transition: color .34s var(--ease-io), border-color .34s var(--ease-io);
}

.iconbtn:before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: var(--fg);
  transform: scaleX(0);
  transform-origin: right center;
  transition: transform .4s var(--ease-io);
}

.iconbtn:focus-visible,
.iconbtn:hover {
  color: #000;
  border-color: #fff;
}

.iconbtn:focus-visible:before,
.iconbtn:hover:before {
  transform: scaleX(1);
  transform-origin: left center;
}

/* === Reveal Animations === */
[data-reveal] {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity .72s var(--ease-out), transform .72s var(--ease-out);
  transition-delay: var(--d, 0s);
}

[data-reveal="in"] {
  opacity: 1;
  transform: none;
}

[data-reveal-x] {
  opacity: 0;
  transform: translateX(-22px);
  transition: opacity .7s var(--ease-out), transform .7s var(--ease-out);
  transition-delay: var(--d, 0s);
}

[data-reveal-x="in"] {
  opacity: 1;
  transform: none;
}

.drawline {
  height: 1px;
  background: var(--line-strong);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform .95s var(--ease-out);
  transition-delay: var(--d, 0s);
}

.drawline[data-reveal="in"] {
  transform: scaleX(1);
  opacity: 1;
}

.skip-link {
  position: fixed;
  top: calc(var(--admin-offset) + 10px);
  left: var(--shell);
  z-index: 10000;
  padding: 12px 20px;
  background: #fff;
  color: #000;
  font-family: var(--mono);
  font-size: 12px;
  transform: translateY(-180%);
}

.skip-link:focus {
  transform: none;
}

#top {
  scroll-margin-top: calc(var(--nav-h) + var(--admin-offset));
}

/* === Top Navigation Bar === */
.nav {
  position: fixed;
  top: var(--admin-offset);
  left: 0;
  right: 0;
  z-index: 9100;
  height: var(--nav-h);
  border-bottom: 1px solid transparent;
  transition: background .35s ease, border-color .35s ease;
}

.nav[data-solid="true"],
body.is-drawer-open .nav {
  background: rgba(0, 0, 0, .94);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom-color: var(--line-strong);
}

.nav__in {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.nav__mark {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
}

.nav__logo {
  display: block;
  width: 140px;
  height: auto;
}

.nav__right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav__links {
  display: flex;
  align-items: center;
  gap: 2px;
  white-space: nowrap;
}

.nav__sub-toggle {
  width: 26px;
  height: 38px;
  margin-left: -6px;
  display: inline-grid;
  place-items: center;
  background: transparent;
  border: 0;
  color: var(--dim);
  cursor: pointer;
  transition: color .24s ease, transform .24s ease;
}

.nav__sub-toggle:hover,
.nav__sub-toggle:focus-visible,
.nav__sub-toggle[aria-expanded="true"] {
  color: var(--fg);
}

.nav__sub-toggle[aria-expanded="true"] svg {
  transform: rotate(180deg);
}

.nav__controls {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-left: 6px;
}

.nav__burger {
  display: none;
}

.nav__progress {
  position: absolute;
  bottom: -1px;
  left: 0;
  height: 1px;
  width: 100%;
  background: #fff;
  transform: scaleX(0);
  transform-origin: left;
}

/* === Mobile Navigation Drawer === */
.mobile-drawer {
  position: fixed;
  top: calc(var(--nav-h) + var(--admin-offset));
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 9050;
  background: rgba(0, 0, 0, .97);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-top: 1px solid var(--line);
  overflow-y: auto;
  padding: 28px var(--shell) 48px;
}

.mobile-drawer[hidden] {
  display: none;
}

.mobile-drawer__list {
  list-style: none;
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--line);
}

.mobile-drawer__item {
  border-bottom: 1px solid var(--line);
}

.mobile-drawer__link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 56px;
  padding: 14px 4px;
  font-family: var(--sans);
  font-size: 18px;
  font-weight: 500;
  letter-spacing: .08em;
  color: var(--dim);
  transition: color .25s ease, padding-left .25s var(--ease-out);
}

.mobile-drawer__link:hover,
.mobile-drawer__link:focus-visible,
.mobile-drawer__link[data-active="true"] {
  color: var(--fg);
  padding-left: 10px;
}

.mobile-drawer__idx {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .2em;
  color: var(--dimmer);
  margin-right: 12px;
}

.mobile-drawer__sub {
  list-style: none;
  margin: 0 0 14px 28px;
  padding: 0 0 0 14px;
  border-left: 1px solid var(--line-strong);
}

.mobile-drawer__sub a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 44px;
  font-size: 14px;
  color: var(--dim);
}

.mobile-drawer__sub a:hover,
.mobile-drawer__sub a[data-active="true"] {
  color: var(--fg);
}

.mobile-drawer__foot {
  margin-top: 28px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

/* === Hero Canvas Wave === */
.wave {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  mask-image: linear-gradient(to bottom, transparent 0%, #000 8%, #000 80%, transparent 100%);
  -webkit-mask-image: linear-gradient(to bottom, transparent 0%, #000 8%, #000 80%, transparent 100%);
}

.wave + .hero__in::before {
  content: "";
  position: absolute;
  inset: -12% -30% -12% -40vw;
  z-index: -1;
  pointer-events: none;
  background: radial-gradient(closest-side, rgba(0, 0, 0, .55), transparent);
}

/* === Footer === */
.foot {
  border-top: 1px solid var(--line);
  padding-block: clamp(42px, 7vh, 82px) 34px;
}

.foot__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border: 1px solid var(--line);
}

.foot__cell {
  padding: 26px 24px;
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 12px;
  min-height: 118px;
}

.foot__cell:last-child {
  border-right: 0;
}

.foot__cell--link {
  position: relative;
  transition: background-color .3s ease, border-color .3s ease;
}

.foot__cell--link:hover,
.foot__cell--link:focus-visible {
  background: #08080c;
}

.foot__cell-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.foot__cell-arrow {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--dimmer);
  transition: transform .3s var(--ease-out), color .3s ease;
}

.foot__cell--link:hover .foot__cell-arrow,
.foot__cell--link:focus-visible .foot__cell-arrow {
  color: var(--fg);
  transform: translate(3px, -2px);
}

.foot__cell--act {
  justify-content: space-between;
  align-items: flex-start;
}

.foot__line {
  font-family: var(--sans);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: .12em;
  display: inline-flex;
  align-items: center;
  gap: 9px;
}

.foot .dot {
  width: 6px;
  height: 6px;
  background: #ffff21;
  box-shadow: 0 0 10px rgba(255, 255, 33, .5);
  display: inline-block;
  animation: blink 2.4s steps(1, end) infinite;
}

.foot .dot--dev {
  background: #e07b39;
  box-shadow: none;
}

@keyframes blink {
  0%, 58% { opacity: 1; }
  59%, 100% { opacity: .22; }
}

.foot__base {
  margin-top: 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px 24px;
  flex-wrap: wrap;
}

.foot__links {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px 18px;
}

.foot .up {
  display: inline-block;
}

.foot .btn--sm {
  padding: 12px 18px;
  font-size: 10px;
  letter-spacing: .22em;
}

.foot .btn--sm:hover .up {
  transform: translateY(-4px) translateX(0);
}

@media (max-width: 900px) {
  .foot__grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .foot__cell:nth-child(2) {
    border-right: 0;
  }
  .foot__cell:nth-child(-n+2) {
    border-bottom: 1px solid var(--line);
  }
}

@media (max-width: 760px) {
  .nav__logo {
    width: 112px;
  }
  .nav__links {
    display: none;
  }
  .nav__burger {
    display: grid;
  }
  .nav__controls {
    margin-left: 0;
  }
  .iconbtn {
    width: 42px;
    height: 42px;
  }
}

@media (min-width: 761px) {
  .mobile-drawer {
    display: none !important;
  }
}

@media (max-width: 520px) {
  .foot__grid {
    grid-template-columns: 1fr;
  }
  .foot__cell {
    border-right: 0;
    border-bottom: 1px solid var(--line);
    min-height: 0;
  }
  .foot__cell:last-child {
    border-bottom: 0;
  }
}

@media (max-width: 380px) {
  .nav__logo {
    width: 94px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *, :after, :before {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
  [data-reveal-x], [data-reveal] {
    opacity: 1 !important;
    transform: none !important;
  }
  .drawline {
    transform: scaleX(1) !important;
  }
}
