/* =========================================================
   提宝工作室 TIBAO STUDIO
   A hand-built, dependency-free responsive site.
   ========================================================= */

@font-face {
  font-family: "Tibao Serif";
  src: url("../fonts/tibao-serif.woff2") format("woff2");
  font-weight: 300 700;
  font-style: normal;
  font-display: swap;
}

/* ---------- Tokens ---------- */
:root {
  --ink: #080b0a;
  --ink-soft: #0c1110;
  --ink-raised: #111816;
  --paper: #ece6d9;
  --paper-dim: #b8b2a4;
  --muted: #8b8d80;
  --amber: #e9b872;
  --amber-bright: #f6d29a;
  --amber-deep: #c99752;
  --sage: #8fb9a4;
  --line: rgba(236, 230, 217, 0.13);
  --line-soft: rgba(236, 230, 217, 0.075);
  --line-strong: rgba(236, 230, 217, 0.26);
  --sans: "Inter", "HarmonyOS Sans SC", "MiSans", "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  --serif: "Tibao Serif", "Noto Serif SC", "Source Han Serif SC", "Songti SC", "STSong", "SimSun", serif;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --container: 1280px;
  --gutter: clamp(20px, 5vw, 72px);
}

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

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

body {
  margin: 0;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

body.menu-open,
body.modal-open {
  overflow: hidden;
}

h1, h2, h3, h4, p, figure, blockquote, dl, dd {
  margin: 0;
}

h1, h2, h3, h4 {
  font-family: var(--serif);
  font-weight: 500;
}

ul, ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
}

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

img {
  height: auto;
}

::selection {
  background: var(--amber);
  color: var(--ink);
}

:focus-visible {
  outline: 2px solid var(--amber);
  outline-offset: 4px;
}

html {
  scrollbar-color: #2b332c var(--ink);
  scrollbar-width: thin;
}

::-webkit-scrollbar {
  width: 10px;
}
::-webkit-scrollbar-track {
  background: var(--ink);
}
::-webkit-scrollbar-thumb {
  background: #2b332c;
  border-radius: 99px;
  border: 3px solid var(--ink);
}

.svg-defs {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.sr-only {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 4000;
  padding: 10px 16px;
  border-radius: 999px;
  background: var(--paper);
  color: var(--ink);
  font-size: 12px;
  transform: translateY(-160%);
  transition: transform 0.3s var(--ease);
}
.skip-link:focus {
  transform: translateY(0);
}

/* ---------- Texture & progress ---------- */
.grain {
  position: fixed;
  inset: 0;
  z-index: 2500;
  pointer-events: none;
  opacity: 0.04;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='180' height='180' filter='url(%23n)' opacity='0.55'/%3E%3C/svg%3E");
  background-size: 180px 180px;
}

.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 200;
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, var(--amber-deep), var(--amber-bright));
  transform: scaleX(0);
  transform-origin: 0 50%;
  pointer-events: none;
}

/* ---------- Layout utilities ---------- */
.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.section {
  position: relative;
  padding-block: clamp(92px, 12vw, 170px);
  scroll-margin-top: 76px;
}

.section-head {
  margin-bottom: clamp(44px, 6vw, 80px);
}

.section-head-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(250px, 0.65fr);
  gap: clamp(24px, 4vw, 64px);
  align-items: end;
  margin-top: clamp(20px, 2.6vw, 30px);
}

.section-title {
  font-size: clamp(2.45rem, 5.2vw, 4.9rem);
  line-height: 1.14;
  letter-spacing: -0.015em;
  font-weight: 500;
}

.section-title em,
.contact-title em {
  font-style: normal;
  color: var(--amber);
  text-shadow: 0 0 70px rgba(233, 184, 114, 0.18);
}

.contact-break {
  display: none;
}

.section-intro {
  max-width: 370px;
  justify-self: end;
  padding-bottom: 8px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.95;
}

.eyebrow {
  display: flex;
  align-items: center;
  gap: 11px;
  font-family: var(--sans);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.22em;
  line-height: 1.4;
  text-transform: uppercase;
  color: var(--muted);
}

.eyebrow::after {
  content: "";
  width: 34px;
  height: 1px;
  margin-left: 4px;
  background: var(--line-strong);
}

.eyebrow-num {
  color: var(--amber);
  font-variant-numeric: tabular-nums;
}

.eyebrow-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--amber);
  box-shadow: 0 0 0 0 rgba(233, 184, 114, 0.5);
  animation: dotPulse 3s ease-out infinite;
}

.hero-eyebrow .sep {
  color: rgba(236, 230, 217, 0.28);
}

/* ---------- Buttons & links ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 50px;
  padding: 0 24px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-size: 12.5px;
  letter-spacing: 0.06em;
  white-space: nowrap;
  transition: background 0.4s var(--ease), color 0.4s var(--ease),
    border-color 0.4s var(--ease), transform 0.4s var(--ease);
}

.btn-primary {
  background: var(--paper);
  color: #101310;
}
.btn-primary:hover {
  background: var(--amber);
  transform: translateY(-2px);
}

.btn-line {
  border-color: var(--line-strong);
  color: var(--paper);
}
.btn-line:hover {
  border-color: var(--amber);
  color: var(--amber);
  background: rgba(233, 184, 114, 0.05);
  transform: translateY(-2px);
}

.btn .arrow {
  font-size: 14px;
  transition: transform 0.4s var(--ease);
}
.btn:hover .arrow {
  transform: translate(2px, -2px);
}

.text-link {
  display: inline-flex;
  align-items: center;
  align-self: flex-start;
  gap: 8px;
  padding-bottom: 3px;
  border-bottom: 1px solid var(--line-strong);
  color: var(--paper);
  font-size: 12.5px;
  letter-spacing: 0.04em;
  line-height: 1.6;
  transition: color 0.3s ease, border-color 0.3s ease;
}
.text-link span {
  font-size: 13px;
  transition: transform 0.35s var(--ease);
}
.text-link:hover {
  color: var(--amber);
  border-color: var(--amber);
}
.text-link:hover span {
  transform: translate(2px, -2px);
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}
.tags li {
  padding: 6px 11px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: #a8a898;
  font-size: 10px;
  letter-spacing: 0.05em;
  line-height: 1.5;
  white-space: nowrap;
}

/* ---------- Scroll reveal ---------- */
.js [data-reveal] {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 0.9s var(--ease), transform 0.9s var(--ease);
  transition-delay: var(--delay, 0ms);
}
.js [data-reveal].is-visible {
  opacity: 1;
  transform: none;
}

/* =========================================================
   Header
   ========================================================= */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  border-bottom: 1px solid transparent;
  transition: background 0.5s ease, border-color 0.5s ease,
    backdrop-filter 0.5s ease;
}

.site-header.is-scrolled {
  background: rgba(8, 11, 10, 0.78);
  border-bottom-color: var(--line-soft);
  -webkit-backdrop-filter: blur(18px);
  backdrop-filter: blur(18px);
}

.site-header.is-menu-open {
  background: linear-gradient(180deg, #070a09 0%, rgba(7, 10, 9, 0.9) 65%, rgba(7, 10, 9, 0) 100%);
  border-bottom-color: transparent;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  width: 100%;
  max-width: 1440px;
  height: 88px;
  margin-inline: auto;
  padding-inline: var(--gutter);
  transition: height 0.4s var(--ease);
}

.site-header.is-scrolled .header-inner {
  height: 72px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  flex: 0 0 auto;
  color: var(--paper);
}

.brand-mark {
  width: 34px;
  height: 34px;
  color: var(--amber);
  filter: drop-shadow(0 0 14px rgba(233, 184, 114, 0.25));
  transition: transform 0.7s var(--ease), filter 0.5s ease;
}

.brand:hover .brand-mark {
  transform: translateY(-2px) rotate(90deg);
  filter: drop-shadow(0 0 20px rgba(233, 184, 114, 0.45));
}

.brand-cn {
  display: block;
  font-size: 17px;
  font-weight: 600;
  letter-spacing: 0.16em;
  line-height: 1.1;
}

.brand-en {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 7.5px;
  letter-spacing: 0.28em;
  line-height: 1;
}

.primary-nav {
  display: flex;
  align-items: center;
  gap: clamp(18px, 2.6vw, 40px);
}

.primary-nav a {
  position: relative;
  padding: 8px 0;
  color: var(--paper-dim);
  font-size: 12.5px;
  letter-spacing: 0.13em;
  transition: color 0.3s ease;
}

.primary-nav a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 2px;
  height: 1px;
  background: var(--amber);
  transform: scaleX(0);
  transform-origin: 0 50%;
  transition: transform 0.4s var(--ease);
}

.primary-nav a:hover,
.primary-nav a.is-active {
  color: var(--paper);
}
.primary-nav a.is-active {
  color: var(--amber);
}
.primary-nav a:hover::after,
.primary-nav a.is-active::after {
  transform: scaleX(1);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 14px;
}

.header-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 17px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  color: var(--paper-dim);
  font-size: 11.5px;
  letter-spacing: 0.08em;
  transition: color 0.3s ease, border-color 0.3s ease,
    background 0.3s ease;
}
.header-cta span {
  font-size: 12px;
  transition: transform 0.35s var(--ease);
}
.header-cta:hover {
  color: var(--amber);
  border-color: var(--amber);
  background: rgba(233, 184, 114, 0.05);
}
.header-cta:hover span {
  transform: translate(2px, -2px);
}

.menu-toggle {
  display: none;
  align-items: center;
  gap: 10px;
  height: 42px;
  padding: 0 14px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  color: var(--paper-dim);
  font-size: 11px;
  letter-spacing: 0.1em;
  transition: border-color 0.3s ease, color 0.3s ease;
}

.menu-toggle:hover {
  color: var(--paper);
  border-color: var(--amber);
}

.menu-toggle-icon {
  position: relative;
  display: block;
  width: 17px;
  height: 10px;
}
.menu-toggle-icon i {
  position: absolute;
  left: 0;
  width: 100%;
  height: 1px;
  background: currentColor;
  transition: transform 0.4s var(--ease), top 0.4s var(--ease),
    opacity 0.3s ease;
}
.menu-toggle-icon i:first-child {
  top: 1px;
}
.menu-toggle-icon i:last-child {
  top: 8px;
}
.menu-toggle[aria-expanded="true"] .menu-toggle-icon i:first-child {
  top: 4.5px;
  transform: rotate(45deg);
}
.menu-toggle[aria-expanded="true"] .menu-toggle-icon i:last-child {
  top: 4.5px;
  transform: rotate(-45deg);
}

/* ---------- Mobile menu ---------- */
.mobile-menu {
  position: fixed;
  inset: 0;
  z-index: 90;
  padding: 112px var(--gutter) 40px;
  overflow-y: auto;
  visibility: hidden;
  opacity: 0;
  background: #070a09;
  background-image: radial-gradient(90% 70% at 80% 0%, rgba(233, 184, 114, 0.08), transparent 60%),
    radial-gradient(80% 60% at 0% 100%, rgba(143, 185, 164, 0.06), transparent 60%);
  transition: opacity 0.5s ease, visibility 0.5s ease;
}

.mobile-menu.is-open {
  visibility: visible;
  opacity: 1;
}

.mobile-menu-inner {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 60px;
  min-height: 100%;
  max-width: 680px;
  margin-inline: auto;
}

.mobile-menu nav a {
  display: flex;
  align-items: baseline;
  gap: 16px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line-soft);
  font-family: var(--serif);
  font-size: clamp(2rem, 8vw, 3rem);
  line-height: 1.3;
  color: var(--paper);
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.5s ease, transform 0.5s var(--ease), color 0.3s ease;
}

.mobile-menu.is-open nav a {
  opacity: 1;
  transform: none;
}
.mobile-menu nav a:hover {
  color: var(--amber);
}

.mobile-menu.is-open nav a:nth-child(1) { transition-delay: 0.06s; }
.mobile-menu.is-open nav a:nth-child(2) { transition-delay: 0.1s; }
.mobile-menu.is-open nav a:nth-child(3) { transition-delay: 0.14s; }
.mobile-menu.is-open nav a:nth-child(4) { transition-delay: 0.18s; }
.mobile-menu.is-open nav a:nth-child(5) { transition-delay: 0.22s; }
.mobile-menu.is-open nav a:nth-child(6) { transition-delay: 0.26s; }

.menu-num {
  width: 26px;
  color: var(--amber);
  font-family: var(--sans);
  font-size: 9px;
  letter-spacing: 0.2em;
}

.mobile-menu-foot {
  border-top: 1px solid var(--line);
  padding-top: 24px;
}
.mobile-menu-mail {
  display: inline-block;
  font-family: var(--serif);
  font-size: clamp(18px, 5vw, 24px);
  border-bottom: 1px solid var(--line-strong);
  padding-bottom: 4px;
}
.mobile-menu-mail:hover {
  color: var(--amber);
  border-color: var(--amber);
}
.mobile-menu-foot p {
  margin-top: 12px;
  color: var(--muted);
  font-size: 10px;
  letter-spacing: 0.14em;
}
.mobile-menu-foot .socials {
  margin-top: 22px;
}

/* =========================================================
   Hero
   ========================================================= */
.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  overflow: hidden;
  isolation: isolate;
}

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  background: var(--ink);
}

.hero-scene {
  width: 100%;
  height: 100%;
}

.hero-shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(6, 9, 8, 0.94) 0%, rgba(6, 9, 8, 0.72) 30%, rgba(6, 9, 8, 0.2) 60%, rgba(6, 9, 8, 0) 78%),
    linear-gradient(180deg, rgba(6, 9, 8, 0.68) 0%, transparent 20%, transparent 62%, rgba(8, 11, 10, 0.86) 92%, var(--ink) 100%);
  pointer-events: none;
}

.hero-fireflies {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}

.hero-ember {
  display: none;
  position: absolute;
  left: 70%;
  top: 79%;
  width: 5px;
  height: 8px;
  border-radius: 2px;
  background: linear-gradient(180deg, #ffe3b0, #e9b872);
  box-shadow:
    0 0 24px 9px rgba(233, 184, 114, 0.26),
    0 0 72px 34px rgba(233, 184, 114, 0.09);
  animation: emberFloat 6s ease-in-out infinite alternate,
    lanternFlicker 4.5s ease-in-out infinite;
  pointer-events: none;
}
.hero-ember::before {
  content: "";
  position: absolute;
  left: 50%;
  top: -7px;
  width: 11px;
  height: 10px;
  transform: translateX(-50%);
  border: 1px solid rgba(255, 215, 154, 0.5);
  border-bottom: 0;
  border-radius: 7px 7px 0 0;
}

.firefly {
  position: absolute;
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: #ffd9a0;
  box-shadow: 0 0 10px 2px rgba(233, 184, 114, 0.55);
  opacity: 0;
  animation: fireflyFloat var(--dur, 9s) ease-in-out var(--delay, 0s) infinite alternate;
}

.hero-inner {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100svh;
  padding-top: 150px;
  padding-bottom: 26px;
}

.hero-copy {
  margin-top: auto;
  max-width: min(920px, 72vw);
  padding-bottom: clamp(38px, 7vh, 76px);
}

.hero-eyebrow {
  margin-bottom: clamp(20px, 3vh, 32px);
  color: var(--paper-dim);
}

.hero-title {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(3.1rem, 8.4vw, 8rem);
  font-weight: 500;
  line-height: 1.08;
  letter-spacing: -0.03em;
}

.title-line {
  display: block;
  overflow: hidden;
  padding-bottom: 0.08em;
  margin-bottom: -0.08em;
}

.title-inner {
  display: block;
  transform: translateY(115%);
  animation: heroRise 1.15s var(--ease) 0.15s forwards;
}
.title-line:nth-child(2) .title-inner {
  animation-delay: 0.28s;
}

.hero-title em {
  font-style: normal;
  color: var(--amber);
  text-shadow: 0 0 90px rgba(233, 184, 114, 0.35);
}

.hero-lead {
  max-width: 580px;
  margin-top: clamp(24px, 3.4vh, 36px);
  color: #c6c0b2;
  font-size: clamp(14px, 1.15vw, 16.5px);
  line-height: 1.95;
  letter-spacing: 0.01em;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 13px;
  margin-top: 34px;
}

.hero-card {
  position: absolute;
  right: var(--gutter);
  bottom: 142px;
  width: 272px;
  padding: 22px;
  border: 1px solid rgba(236, 230, 217, 0.16);
  border-radius: 15px;
  background: rgba(9, 14, 12, 0.55);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.35);
  animation: fadeUp 1s var(--ease) 1.05s both;
}

.hero-card-top {
  display: flex;
  align-items: center;
  gap: 8px;
  padding-bottom: 14px;
  margin-bottom: 18px;
  border-bottom: 1px solid var(--line-soft);
  color: var(--muted);
  font-size: 8.5px;
  letter-spacing: 0.18em;
}

.status-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--amber);
  animation: dotPulse 2.6s ease-out infinite;
}

.hero-card-year {
  margin-left: auto;
  color: var(--paper-dim);
  letter-spacing: 0.1em;
}

.hero-card-title {
  font-family: var(--serif);
  font-size: 38px;
  line-height: 1;
  letter-spacing: 0.04em;
}

.hero-card-sub {
  margin: 9px 0 20px;
  color: var(--muted);
  font-size: 9.5px;
  letter-spacing: 0.13em;
}

.hero-card-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 14px;
  border-top: 1px solid var(--line-soft);
  color: var(--amber);
  font-size: 11.5px;
  letter-spacing: 0.04em;
}
.hero-card-link span {
  transition: transform 0.35s var(--ease);
}
.hero-card-link:hover span {
  transform: translate(3px, -3px);
}

.hero-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-top: auto;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.hero-facts {
  display: flex;
  gap: clamp(24px, 4vw, 58px);
}

.hero-facts dt {
  margin-bottom: 5px;
  color: var(--muted);
  font-size: 9px;
  letter-spacing: 0.2em;
}

.hero-facts dd {
  color: var(--paper-dim);
  font-size: 12px;
  letter-spacing: 0.05em;
  white-space: nowrap;
}

.scroll-cue {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--muted);
  font-size: 8.5px;
  letter-spacing: 0.26em;
  transition: color 0.3s ease;
}
.scroll-cue i {
  position: relative;
  display: block;
  width: 48px;
  height: 1px;
  overflow: hidden;
  background: var(--line-strong);
}
.scroll-cue i::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 16px;
  height: 1px;
  background: var(--amber);
  animation: scrollLine 2.4s var(--ease) infinite;
}
.scroll-cue:hover {
  color: var(--amber);
}

.scene-moon,
.cloud {
  transform-box: fill-box;
  transform-origin: center;
}
.moon-halo {
  transform-box: fill-box;
  transform-origin: center;
  animation: moonPulse 9s ease-in-out infinite;
}
.cloud-a {
  animation: mistDrift 24s ease-in-out infinite alternate;
}
.cloud-b {
  animation: mistDrift 32s ease-in-out -8s infinite alternate-reverse;
}
.lantern-glow {
  animation: lanternFlicker 4.5s ease-in-out infinite;
}
.star {
  animation: twinkle var(--dur, 5s) ease-in-out var(--delay, 0s) infinite;
}

/* =========================================================
   Marquee
   ========================================================= */
.marquee {
  overflow: hidden;
  padding: 19px 0;
  border-block: 1px solid var(--line-soft);
  background: rgba(255, 255, 255, 0.012);
}

.marquee-track {
  display: flex;
  width: max-content;
  animation: marquee 42s linear infinite;
  will-change: transform;
}
.marquee:hover .marquee-track {
  animation-play-state: paused;
}

.marquee-group {
  display: flex;
  align-items: center;
  gap: 38px;
  padding-right: 38px;
}

.marquee-group > span:not(.marquee-star) {
  color: #a7a294;
  font-family: var(--serif);
  font-size: clamp(15px, 1.7vw, 21px);
  letter-spacing: 0.06em;
  white-space: nowrap;
}

.marquee-star {
  color: var(--amber);
  font-size: 8px;
  opacity: 0.8;
}

/* =========================================================
   Work
   ========================================================= */
.work-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(18px, 2.2vw, 28px);
}

.game-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--line-soft);
  border-radius: 18px;
  background: var(--ink-soft);
  transition: border-color 0.55s ease, transform 0.55s var(--ease),
    background 0.55s ease;
}

.game-card:hover {
  border-color: rgba(236, 230, 217, 0.24);
  background: #0d1311;
  transform: translateY(-4px);
}

.game-card--feature {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: minmax(0, 1.28fr) minmax(0, 0.72fr);
}

.game-card--feature:hover {
  transform: none;
}

.game-media {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 16 / 11;
  overflow: hidden;
  background: #0a0f0d;
  color: inherit;
  text-align: left;
  cursor: pointer;
}
.game-media:focus-visible,
.journal-item:focus-visible {
  outline-offset: -4px;
}

.game-card--feature .game-media {
  min-height: 440px;
  aspect-ratio: auto;
}

.game-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 1.3s var(--ease), filter 0.8s ease;
}

.game-card--feature .game-media img {
  position: absolute;
  inset: 0;
}

.game-card:hover .game-media img {
  transform: scale(1.035);
  filter: saturate(1.06) brightness(1.04);
}

.game-media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(4, 7, 6, 0.18) 0%, transparent 32%, transparent 70%, rgba(4, 7, 6, 0.45) 100%);
  pointer-events: none;
}

.game-status {
  position: absolute;
  top: 18px;
  left: 18px;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 12px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  background: rgba(8, 11, 10, 0.6);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  color: #efe8d9;
  font-size: 9.5px;
  letter-spacing: 0.12em;
}
.game-status i {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--amber);
  animation: dotPulse 2.8s ease-out infinite;
}

.game-enter {
  position: absolute;
  right: 18px;
  bottom: 18px;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 50%;
  background: rgba(8, 11, 10, 0.34);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  color: var(--paper);
  font-size: 17px;
  transition: background 0.4s ease, color 0.4s ease, border-color 0.4s ease,
    transform 0.4s var(--ease);
}
.game-card:hover .game-enter {
  background: var(--amber);
  border-color: var(--amber);
  color: var(--ink);
  transform: scale(1.07);
}

.game-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  align-items: flex-start;
  padding: clamp(24px, 3vw, 36px);
}

.game-card--feature .game-body {
  justify-content: center;
  padding: clamp(28px, 3.4vw, 46px);
}

.game-topline {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  width: 100%;
  padding-bottom: 14px;
  margin-bottom: 22px;
  border-bottom: 1px solid var(--line-soft);
  color: var(--muted);
  font-size: 9px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.game-title {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 11px;
  margin-bottom: 15px;
  font-size: clamp(26px, 2.6vw, 36px);
  line-height: 1.2;
  letter-spacing: 0.01em;
}
.game-card--feature .game-title {
  font-size: clamp(32px, 3.2vw, 44px);
}
.game-title span {
  color: var(--muted);
  font-family: var(--sans);
  font-size: 8.5px;
  font-weight: 500;
  letter-spacing: 0.2em;
}

.game-desc {
  margin-bottom: 22px;
  color: var(--paper-dim);
  font-size: 13.5px;
  line-height: 1.9;
}

.game-card .tags {
  margin-bottom: 26px;
}

.game-card .text-link {
  margin-top: auto;
}

/* =========================================================
   Stats
   ========================================================= */
.stats {
  padding-block: clamp(48px, 6.5vw, 78px);
  border-block: 1px solid var(--line-soft);
  background: radial-gradient(60% 130% at 50% 0%, rgba(233, 184, 114, 0.045), transparent 70%);
}

.stats-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: clamp(30px, 4vw, 46px);
}

.stats-note {
  color: var(--muted);
  font-size: 10.5px;
  letter-spacing: 0.09em;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.stat {
  display: flex;
  flex-direction: column;
  padding-left: clamp(20px, 3vw, 42px);
  border-left: 1px solid var(--line-soft);
}
.stat:first-child {
  padding-left: 0;
  border-left: 0;
}

.stat-number {
  display: block;
  color: var(--paper);
  font-family: var(--serif);
  font-size: clamp(3rem, 5.2vw, 5.4rem);
  font-variant-numeric: tabular-nums;
  line-height: 1;
  letter-spacing: -0.03em;
}

.stat-infinity {
  color: var(--amber);
}

.stat-label {
  margin-top: 14px;
  color: var(--muted);
  font-size: 9.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

/* =========================================================
   About
   ========================================================= */
.about-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.82fr) minmax(0, 1.18fr);
  gap: clamp(40px, 8vw, 120px);
  align-items: start;
}

.about-sticky {
  position: sticky;
  top: 128px;
}

.about-sticky .section-title {
  margin-top: clamp(22px, 3vw, 30px);
  font-size: clamp(2.4rem, 4.2vw, 4.4rem);
}

.about-sign {
  margin-top: 28px;
  color: var(--muted);
  font-size: 11px;
  letter-spacing: 0.05em;
}

.about-story {
  max-width: 660px;
}

.about-lead {
  margin-bottom: 24px;
  color: var(--paper);
  font-family: var(--serif);
  font-size: clamp(18px, 1.7vw, 22px);
  line-height: 1.95;
}

.about-lead::first-letter {
  float: left;
  padding: 6px 12px 0 0;
  color: var(--amber);
  font-family: var(--serif);
  font-size: 3.4em;
  line-height: 0.84;
}

.about-story p + p {
  margin-top: 18px;
  color: var(--paper-dim);
  font-size: 13.5px;
  line-height: 2.05;
}

.values {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: clamp(46px, 6vw, 70px);
  border-top: 1px solid var(--line);
}

.value {
  padding: 26px 26px 28px 0;
  border-bottom: 1px solid var(--line-soft);
}
.value:nth-child(odd) {
  padding-right: 26px;
  border-right: 1px solid var(--line-soft);
}
.value:nth-child(even) {
  padding-left: 26px;
}

.value-num {
  color: var(--amber);
  font-size: 8.5px;
  letter-spacing: 0.18em;
}

.value h3 {
  margin: 10px 0 8px;
  font-size: 18px;
  letter-spacing: 0.02em;
}

.value p {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.85;
}

.timeline {
  margin-top: clamp(46px, 6vw, 66px);
}

.timeline-label {
  margin-bottom: 20px;
  color: var(--muted);
  font-size: 9.5px;
  letter-spacing: 0.18em;
}

.timeline ol {
  margin-left: 4px;
  border-left: 1px solid var(--line);
}

.timeline li {
  position: relative;
  display: grid;
  grid-template-columns: 74px minmax(0, 1fr);
  gap: 16px;
  padding: 0 0 26px 28px;
}
.timeline li:last-child {
  padding-bottom: 0;
}
.timeline li::before {
  content: "";
  position: absolute;
  top: 7px;
  left: -3px;
  width: 5px;
  height: 5px;
  border: 1px solid var(--amber);
  border-radius: 50%;
  background: var(--ink);
}

.timeline time {
  color: var(--amber);
  font-size: 10.5px;
  letter-spacing: 0.04em;
  line-height: 1.6;
}

.timeline h4 {
  margin-bottom: 5px;
  font-size: 15px;
  letter-spacing: 0.02em;
}

.timeline li p {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.75;
}

/* =========================================================
   Team
   ========================================================= */
.team-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(12px, 1.6vw, 20px);
}

.member {
  overflow: hidden;
  border: 1px solid var(--line-soft);
  border-radius: 16px;
  background: var(--ink-soft);
  transition: border-color 0.5s ease, transform 0.5s var(--ease);
}
.member:hover {
  border-color: var(--line-strong);
  transform: translateY(-4px);
}

.member:nth-child(2) { --delay: 70ms; }
.member:nth-child(3) { --delay: 140ms; }
.member:nth-child(4) { --delay: 210ms; }

.member-visual {
  position: relative;
  aspect-ratio: 3 / 4;
  overflow: hidden;
}
.member-visual::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 55%, rgba(8, 12, 10, 0.9) 100%);
  pointer-events: none;
}

.member-visual::before {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -28%;
  width: 92%;
  aspect-ratio: 1;
  transform: translateX(-50%);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(var(--tone-glow), 0.2), transparent 65%);
  filter: blur(10px);
  pointer-events: none;
}

.tone-a {
  --tone-glow: 233, 184, 114;
  background: radial-gradient(120% 100% at 25% 8%, #4b3a24 0%, #241d12 45%, #0c0f0d 100%);
}
.tone-b {
  --tone-glow: 143, 185, 164;
  background: radial-gradient(120% 100% at 25% 8%, #2f4b3f 0%, #16241f 45%, #0b0f0d 100%);
}
.tone-c {
  --tone-glow: 183, 154, 198;
  background: radial-gradient(120% 100% at 25% 8%, #3a314e 0%, #1c1828 45%, #0b0d0e 100%);
}
.tone-d {
  --tone-glow: 217, 150, 138;
  background: radial-gradient(120% 100% at 25% 8%, #4d2f35 0%, #27181b 45%, #0d0d0d 100%);
}

.member-char {
  position: absolute;
  left: 50%;
  bottom: -9%;
  z-index: 1;
  transform: translateX(-50%);
  color: rgba(255, 255, 255, 0.13);
  font-family: var(--serif);
  font-size: clamp(108px, 12vw, 168px);
  line-height: 1;
  letter-spacing: -0.06em;
  transition: transform 0.8s var(--ease), color 0.8s ease;
}
.member:hover .member-char {
  transform: translateX(-50%) translateY(-8px);
  color: rgba(255, 255, 255, 0.18);
}

.member-tag {
  position: absolute;
  top: 16px;
  left: 16px;
  z-index: 2;
  color: rgba(255, 255, 255, 0.4);
  font-size: 7.5px;
  letter-spacing: 0.2em;
}

.member-ring {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 68%;
  aspect-ratio: 1;
  transform: translate(-50%, -50%);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 50%;
}
.member-ring::before {
  content: "";
  position: absolute;
  inset: 15%;
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 50%;
}
.member-ring::after {
  content: "";
  position: absolute;
  top: 50%;
  left: -9%;
  width: 118%;
  height: 1px;
  background: rgba(255, 255, 255, 0.08);
}

.member-cross {
  position: absolute;
  right: 18px;
  bottom: 16px;
  z-index: 2;
  color: rgba(255, 255, 255, 0.32);
  font-size: 12px;
}

.member-info {
  padding: 18px 18px 22px;
}

.member-info h3 {
  margin-bottom: 4px;
  font-size: 22px;
  letter-spacing: 0.03em;
}

.member-role {
  color: var(--amber);
  font-size: 9px;
  letter-spacing: 0.12em;
}

.member-note {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--line-soft);
  color: var(--muted);
  font-size: 11.5px;
  line-height: 1.8;
}

.team-note {
  margin-top: 28px;
  color: var(--muted);
  font-size: 11px;
  letter-spacing: 0.04em;
  text-align: right;
}
.team-note span {
  color: var(--amber);
}

/* =========================================================
   Journal
   ========================================================= */
.journal-list {
  border-top: 1px solid var(--line);
}

.journal-item {
  position: relative;
  display: grid;
  grid-template-columns: 108px 74px minmax(0, 1fr) 30px;
  grid-template-areas: "date tag content arrow";
  gap: 22px;
  align-items: center;
  width: 100%;
  padding: 25px 8px 25px 0;
  border-bottom: 1px solid var(--line-soft);
  text-align: left;
  transition: background 0.4s ease, padding 0.4s var(--ease);
}

.journal-item:hover {
  padding-left: 12px;
  padding-right: 16px;
  background: rgba(255, 255, 255, 0.018);
}

.journal-date {
  grid-area: date;
  color: var(--muted);
  font-size: 10.5px;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.04em;
}

.journal-tag {
  grid-area: tag;
  justify-self: start;
  padding: 4px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--paper-dim);
  font-size: 9.5px;
  line-height: 1.5;
  white-space: nowrap;
}

.journal-content {
  grid-area: content;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.journal-title {
  color: var(--paper);
  font-family: var(--serif);
  font-size: clamp(17px, 1.6vw, 21px);
  line-height: 1.5;
  letter-spacing: 0.01em;
  transition: color 0.3s ease;
}

.journal-dek {
  color: var(--muted);
  font-size: 11.5px;
  line-height: 1.7;
}

.journal-arrow {
  grid-area: arrow;
  justify-self: end;
  color: var(--muted);
  font-size: 17px;
  transition: transform 0.4s var(--ease), color 0.4s ease;
}

.journal-item:hover .journal-title {
  color: var(--amber);
}
.journal-item:hover .journal-arrow {
  color: var(--amber);
  transform: translate(3px, -3px);
}

.journal-note {
  margin-top: 22px;
  color: var(--muted);
  font-size: 10.5px;
  letter-spacing: 0.06em;
  text-align: right;
}

/* =========================================================
   Careers
   ========================================================= */
.careers-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: clamp(40px, 7vw, 100px);
  align-items: start;
}

.careers-intro {
  position: sticky;
  top: 128px;
}

.careers-intro .section-title {
  margin-top: clamp(22px, 3vw, 30px);
  font-size: clamp(2.1rem, 3.3vw, 3.05rem);
  line-height: 1.22;
}

.careers-intro .section-intro {
  max-width: 360px;
  margin-top: 24px;
  padding-bottom: 0;
  justify-self: start;
  font-size: 13px;
  line-height: 1.95;
}

.careers-intro .text-link {
  margin-top: 28px;
}

.job-list {
  border-top: 1px solid var(--line);
}

.job {
  border-bottom: 1px solid var(--line-soft);
}

.job summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 24px 0;
  cursor: pointer;
  list-style: none;
}
.job summary::-webkit-details-marker {
  display: none;
}
.job summary:focus-visible {
  outline-offset: 6px;
}

.job-main {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.job-title {
  color: var(--paper);
  font-family: var(--serif);
  font-size: clamp(19px, 1.8vw, 24px);
  line-height: 1.4;
  letter-spacing: 0.02em;
  transition: color 0.3s ease;
}

.job-meta {
  color: var(--muted);
  font-size: 10px;
  letter-spacing: 0.08em;
}

.job-plus {
  position: relative;
  flex: 0 0 18px;
  width: 18px;
  height: 18px;
  transition: transform 0.45s var(--ease);
}
.job-plus::before,
.job-plus::after {
  content: "";
  position: absolute;
  background: var(--paper-dim);
  transition: background 0.3s ease;
}
.job-plus::before {
  top: 8.5px;
  left: 0;
  width: 18px;
  height: 1px;
}
.job-plus::after {
  top: 0;
  left: 8.5px;
  width: 1px;
  height: 18px;
}

.job[open] .job-plus {
  transform: rotate(135deg);
}
.job[open] .job-plus::before,
.job[open] .job-plus::after {
  background: var(--amber);
}
.job[open] .job-title {
  color: var(--amber);
}

.job-body {
  max-width: 640px;
  padding: 0 0 28px;
  animation: jobReveal 0.5s var(--ease);
}

.job-body p {
  color: var(--paper-dim);
  font-size: 13px;
  line-height: 1.9;
}

.job-body ul {
  display: grid;
  gap: 8px;
  margin: 16px 0 22px;
}

.job-body li {
  position: relative;
  padding-left: 16px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.8;
}
.job-body li::before {
  content: "—";
  position: absolute;
  left: 0;
  color: var(--amber);
}

.job-apply {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding-bottom: 2px;
  border-bottom: 1px solid transparent;
  color: var(--amber);
  font-size: 12px;
  letter-spacing: 0.04em;
  transition: border-color 0.3s ease;
}
.job-apply:hover {
  border-color: var(--amber);
}

/* =========================================================
   Contact
   ========================================================= */
.contact {
  position: relative;
  overflow: hidden;
  padding-top: clamp(110px, 14vw, 190px);
  padding-bottom: clamp(80px, 9vw, 130px);
  border-top: 1px solid var(--line-soft);
}

.contact-glow {
  position: absolute;
  top: -38%;
  right: -18%;
  width: min(900px, 90vw);
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(233, 184, 114, 0.1), transparent 62%);
  filter: blur(40px);
  pointer-events: none;
}

.contact-title {
  max-width: 1050px;
  margin-top: clamp(22px, 3vw, 32px);
  font-size: clamp(2.7rem, 6.8vw, 6.3rem);
  line-height: 1.12;
  letter-spacing: -0.02em;
}

.contact-sub {
  max-width: 560px;
  margin-top: 28px;
  color: var(--paper-dim);
  font-size: 13.5px;
  line-height: 1.95;
}

.contact-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  gap: 48px;
  margin-top: clamp(52px, 8vw, 96px);
  padding-top: 36px;
  border-top: 1px solid var(--line);
}

.contact-label {
  display: block;
  margin-bottom: 13px;
  color: var(--muted);
  font-size: 9px;
  letter-spacing: 0.18em;
}

.email-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
}

.email {
  padding-bottom: 6px;
  border-bottom: 1px solid var(--line-strong);
  font-family: var(--serif);
  font-size: clamp(21px, 3vw, 35px);
  line-height: 1.3;
  letter-spacing: -0.01em;
  transition: color 0.3s ease, border-color 0.3s ease;
}
.email:hover {
  color: var(--amber);
  border-color: var(--amber);
}

.copy-btn {
  padding: 7px 12px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  color: var(--muted);
  font-size: 9.5px;
  letter-spacing: 0.12em;
  transition: color 0.3s ease, border-color 0.3s ease;
}
.copy-btn:hover {
  color: var(--amber);
  border-color: var(--amber);
}

.contact-hint {
  display: block;
  margin-top: 16px;
  color: var(--muted);
  font-size: 10.5px;
}

.contact-secondary {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 26px;
  align-content: start;
}
.contact-secondary > div:nth-child(3) {
  grid-column: 1 / -1;
}

.contact-secondary a,
.contact-secondary p {
  color: var(--paper-dim);
  font-size: 12px;
  line-height: 1.8;
}
.contact-secondary a {
  transition: color 0.3s ease;
}
.contact-secondary a:hover {
  color: var(--amber);
}

.socials {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 22px;
  margin-top: 3px;
}

.social {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding-bottom: 2px;
  border-bottom: 1px solid transparent;
  color: var(--paper-dim);
  font-size: 11.5px;
  transition: color 0.3s ease, border-color 0.3s ease;
}
.social span {
  font-size: 10px;
}
.social:hover {
  color: var(--amber);
  border-color: var(--amber);
}

/* =========================================================
   Footer
   ========================================================= */
.site-footer {
  padding: 38px 0 30px;
  border-top: 1px solid var(--line-soft);
  background: #060908;
}

.footer-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  padding-bottom: 30px;
  border-bottom: 1px solid var(--line-soft);
}

.footer-top .brand-mark {
  width: 28px;
  height: 28px;
}

.footer-top .brand-cn {
  font-size: 15px;
}

.footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 22px;
}
.footer-nav a {
  color: var(--muted);
  font-size: 11px;
  letter-spacing: 0.08em;
  transition: color 0.3s ease;
}
.footer-nav a:hover {
  color: var(--paper);
}

.back-to-top {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--muted);
  font-size: 10px;
  letter-spacing: 0.1em;
  transition: color 0.3s ease;
}
.back-to-top span {
  font-size: 12px;
  transition: transform 0.35s var(--ease);
}
.back-to-top:hover {
  color: var(--amber);
}
.back-to-top:hover span {
  transform: translateY(-3px);
}

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding-top: 22px;
  color: #6f7169;
  font-size: 10px;
  letter-spacing: 0.04em;
}
.footer-bottom a {
  color: var(--paper-dim);
  border-bottom: 1px solid transparent;
  transition: color 0.3s ease, border-color 0.3s ease;
}
.footer-bottom a:hover {
  color: var(--amber);
  border-color: var(--amber);
}
.footer-made span {
  color: var(--amber);
}

/* =========================================================
   404 page
   ========================================================= */
.error-page {
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  background:
    radial-gradient(70% 60% at 80% 0%, rgba(233, 184, 114, 0.09), transparent 60%),
    radial-gradient(60% 50% at 0% 100%, rgba(143, 185, 164, 0.05), transparent 60%),
    var(--ink);
}

.error-header {
  padding-top: 26px;
}
.error-header .container {
  display: flex;
  align-items: center;
}

.error-main {
  position: relative;
  flex: 1;
  display: flex;
  align-items: center;
  overflow: hidden;
  padding-block: clamp(70px, 11vh, 130px);
}
.error-main::before {
  content: "";
  position: absolute;
  top: 8%;
  right: -12%;
  width: min(640px, 80vw);
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(233, 184, 114, 0.12), transparent 65%);
  filter: blur(40px);
  pointer-events: none;
}

.error-inner {
  position: relative;
  z-index: 1;
  max-width: 820px;
}

.error-code {
  margin: clamp(18px, 3vw, 30px) 0 -0.16em;
  color: rgba(233, 184, 114, 0.06);
  font-family: var(--serif);
  font-size: clamp(6rem, 17vw, 13rem);
  line-height: 0.8;
  letter-spacing: -0.06em;
  -webkit-text-stroke: 1px rgba(233, 184, 114, 0.24);
  user-select: none;
}

.error-title {
  font-size: clamp(2.6rem, 6vw, 5.6rem);
  line-height: 1.1;
  letter-spacing: -0.02em;
}

.error-text {
  max-width: 520px;
  margin-top: 22px;
  color: var(--paper-dim);
  font-size: 13.5px;
  line-height: 2;
}

.error-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 13px;
  margin-top: 34px;
}

.error-footer {
  padding: 26px 0 32px;
  border-top: 1px solid var(--line-soft);
  background: #060908;
}
.error-footer .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 18px;
  color: var(--muted);
  font-size: 10.5px;
  letter-spacing: 0.04em;
}
.error-footer a {
  color: var(--paper-dim);
  border-bottom: 1px solid transparent;
  transition: color 0.3s ease, border-color 0.3s ease;
}
.error-footer a:hover {
  color: var(--amber);
  border-color: var(--amber);
}

/* =========================================================
   Dialogs
   ========================================================= */
dialog {
  max-width: none;
  max-height: none;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--paper);
}
dialog::backdrop {
  background: rgba(4, 6, 5, 0.78);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
}

.game-dialog {
  width: min(1080px, calc(100vw - 40px));
  margin: auto;
}

.dialog-panel {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.08fr);
  overflow: hidden;
  max-height: calc(100svh - 40px);
  border: 1px solid var(--line-strong);
  border-radius: 20px;
  background: #0c1110;
  box-shadow: 0 40px 120px rgba(0, 0, 0, 0.7);
  animation: dialogIn 0.45s var(--ease);
}

.dialog-close {
  position: absolute;
  top: 16px;
  right: 16px;
  z-index: 5;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 50%;
  background: rgba(8, 11, 10, 0.55);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  color: var(--paper);
  font-size: 22px;
  line-height: 1;
  transition: transform 0.35s var(--ease), background 0.3s ease,
    color 0.3s ease;
}
.dialog-close:hover {
  transform: rotate(90deg);
  background: var(--amber);
  color: var(--ink);
}

.dialog-media {
  position: relative;
  min-height: 420px;
  background: #080b0a;
}
.dialog-media img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.dialog-content {
  overflow-y: auto;
  max-height: calc(100svh - 40px);
  padding: clamp(28px, 4vw, 52px);
}

.dialog-kicker {
  margin-bottom: 16px;
  color: var(--amber);
  font-size: 9px;
  letter-spacing: 0.2em;
}

.dialog-title-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
}

.dialog-title-row h2 {
  font-size: clamp(28px, 3vw, 42px);
  line-height: 1.2;
  letter-spacing: 0.01em;
}

.dialog-index {
  color: var(--muted);
  font-size: 10px;
  letter-spacing: 0.1em;
}

.dialog-en {
  margin: 6px 0 20px;
  color: var(--muted);
  font-size: 9px;
  letter-spacing: 0.2em;
}

.dialog-tags {
  margin-bottom: 24px;
}

.dialog-desc p {
  margin-bottom: 14px;
  color: var(--paper-dim);
  font-size: 13px;
  line-height: 1.95;
}

.dialog-features {
  display: grid;
  gap: 9px;
  margin: 24px 0;
}
.dialog-features li {
  display: flex;
  gap: 10px;
  color: #b8b2a4;
  font-size: 12px;
  line-height: 1.7;
}
.dialog-features li::before {
  content: "✦";
  margin-top: 4px;
  color: var(--amber);
  font-size: 8px;
}

.dialog-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 18px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}

.dialog-status {
  color: var(--muted);
  font-size: 10px;
  letter-spacing: 0.1em;
}

.dialog-foot .text-link {
  margin: 0;
}

/* ---------- Story dialog ---------- */
.story-dialog {
  position: fixed;
  inset: 0;
  width: min(720px, calc(100vw - 32px));
  height: fit-content;
  margin: auto;
}

.story-close {
  position: absolute;
  top: 14px;
  right: 14px;
}

.story-panel {
  position: relative;
  overflow-y: auto;
  max-height: calc(100svh - 40px);
  padding: clamp(28px, 5vw, 64px);
  border: 1px solid var(--line-strong);
  border-radius: 20px;
  background: #0c1110;
  box-shadow: 0 40px 120px rgba(0, 0, 0, 0.7);
  animation: dialogIn 0.45s var(--ease);
}

.story-meta {
  display: flex;
  gap: 16px;
  margin-bottom: 20px;
  color: var(--muted);
  font-size: 9.5px;
  letter-spacing: 0.1em;
}
.story-meta span:first-child {
  color: var(--amber);
}

.story-panel h2 {
  margin-bottom: 16px;
  font-size: clamp(25px, 3.4vw, 37px);
  line-height: 1.5;
  letter-spacing: 0.01em;
}

.story-dek {
  margin-bottom: 28px;
  padding-left: 16px;
  border-left: 1px solid var(--line-strong);
  color: var(--paper-dim);
  font-size: 12.5px;
  line-height: 1.85;
}

.story-body p {
  margin-bottom: 18px;
  color: #bdb6a8;
  font-size: 13.5px;
  line-height: 2.1;
}

.story-sign {
  margin-top: 32px;
  color: var(--muted);
  font-size: 10px;
  letter-spacing: 0.12em;
}
.story-sign span {
  color: var(--amber);
}

/* ---------- Toast ---------- */
.toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  z-index: 3000;
  max-width: calc(100vw - 32px);
  padding: 12px 20px;
  border-radius: 999px;
  background: var(--paper);
  color: #101310;
  font-size: 11.5px;
  letter-spacing: 0.02em;
  text-align: center;
  box-shadow: 0 16px 50px rgba(0, 0, 0, 0.45);
  opacity: 0;
  visibility: hidden;
  transform: translate(-50%, 14px);
  transition: opacity 0.4s var(--ease), transform 0.4s var(--ease),
    visibility 0.4s;
}
.toast.is-visible {
  opacity: 1;
  visibility: visible;
  transform: translate(-50%, 0);
}

/* =========================================================
   Keyframes
   ========================================================= */
@keyframes heroRise {
  from { transform: translateY(115%); }
  to { transform: translateY(0); }
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: none; }
}

@keyframes dotPulse {
  0% { box-shadow: 0 0 0 0 rgba(233, 184, 114, 0.45); }
  70%, 100% { box-shadow: 0 0 0 6px rgba(233, 184, 114, 0); }
}

@keyframes moonPulse {
  0%, 100% { opacity: 0.85; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.045); }
}

@keyframes mistDrift {
  from { transform: translateX(-26px); }
  to { transform: translateX(38px); }
}

@keyframes lanternFlicker {
  0%, 100% { opacity: 0.95; }
  38% { opacity: 0.68; }
  62% { opacity: 1; }
  78% { opacity: 0.8; }
}

@keyframes emberFloat {
  from { transform: translateY(4px); }
  to { transform: translateY(-9px); }
}

@keyframes twinkle {
  0%, 100% { opacity: var(--o, 0.5); }
  50% { opacity: 0.12; }
}

@keyframes fireflyFloat {
  0% {
    opacity: 0;
    transform: translate3d(0, 0, 0);
  }
  20% {
    opacity: 0.8;
  }
  60% {
    opacity: 0.35;
  }
  100% {
    opacity: 0;
    transform: translate3d(var(--dx, 14px), var(--dy, -56px), 0);
  }
}

@keyframes scrollLine {
  0% { transform: translateX(-100%); }
  60%, 100% { transform: translateX(300%); }
}

@keyframes marquee {
  to { transform: translateX(-50%); }
}

@keyframes jobReveal {
  from { opacity: 0; transform: translateY(-6px); }
  to { opacity: 1; transform: none; }
}

@keyframes dialogIn {
  from { opacity: 0; transform: translateY(16px) scale(0.99); }
  to { opacity: 1; transform: none; }
}

/* =========================================================
   Responsive
   ========================================================= */
@media (max-width: 1180px) {
  .hero-copy {
    max-width: 78vw;
  }
  .hero-card {
    display: none;
  }
  .team-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .member-visual {
    aspect-ratio: 4 / 3;
  }
  .member-char {
    font-size: clamp(120px, 17vw, 180px);
  }
}

@media (max-width: 1024px) {
  .section-head-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  .section-intro {
    justify-self: start;
    max-width: 480px;
    padding-bottom: 0;
  }
  .game-card--feature {
    grid-template-columns: 1fr;
  }
  .game-card--feature .game-media {
    min-height: 0;
    aspect-ratio: 16 / 9;
  }
  .game-card--feature .game-body {
    padding: clamp(24px, 4vw, 36px);
  }
  .about-grid {
    grid-template-columns: 1fr;
    gap: clamp(32px, 6vw, 56px);
  }
  .about-sticky,
  .careers-intro {
    position: static;
  }
  .about-sticky .section-title,
  .careers-intro .section-title {
    max-width: 700px;
  }
  .about-main {
    max-width: 760px;
  }
  .careers-grid {
    grid-template-columns: 1fr;
    gap: clamp(32px, 6vw, 56px);
  }
  .careers-intro .section-intro {
    max-width: 500px;
  }
  .contact-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }
  .contact-secondary {
    max-width: 620px;
  }
}

@media (orientation: portrait) and (max-width: 1200px) {
  .scene-moon {
    display: none;
  }
}

@media (max-width: 960px) {
  .primary-nav {
    display: none;
  }
  .menu-toggle {
    display: inline-flex;
  }
  .hero-title {
    font-size: clamp(3rem, 12.6vw, 6.4rem);
  }
  .hero-copy {
    max-width: 100%;
  }
  .stats-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    row-gap: 34px;
  }
  .stat:nth-child(3) {
    padding-left: 0;
    border-left: 0;
  }
  .stat:nth-child(3),
  .stat:nth-child(4) {
    padding-top: 26px;
    border-top: 1px solid var(--line-soft);
  }
  .stat:nth-child(4) {
    padding-left: clamp(20px, 3vw, 42px);
    border-left: 1px solid var(--line-soft);
  }
}

@media (max-width: 760px) {
  .section {
    padding-block: clamp(76px, 14vw, 100px);
  }
  .section-title {
    font-size: clamp(2.15rem, 8.6vw, 3.3rem);
  }
  .header-cta {
    display: none;
  }
  .hero-inner {
    padding-top: 128px;
    padding-bottom: 20px;
  }
  .hero-copy {
    padding-bottom: 42px;
  }
  .hero-title {
    font-size: clamp(2.95rem, 13.4vw, 5rem);
  }
  .hero-ember {
    display: block;
  }
  .hero-lead {
    font-size: 14px;
    line-height: 1.9;
  }
  .lead-break {
    display: none;
  }
  .contact-break {
    display: initial;
  }
  .hero-actions {
    width: 100%;
  }
  .hero-actions .btn {
    flex: 1;
    min-width: 0;
    padding-inline: 16px;
  }
  .hero-foot {
    padding-top: 16px;
  }
  .hero-facts {
    gap: 20px;
  }
  .hero-facts dd {
    font-size: 11px;
  }
  .scroll-cue {
    display: none;
  }
  .work-grid {
    grid-template-columns: 1fr;
  }
  .game-media {
    aspect-ratio: 16 / 10;
  }
  .game-card--feature .game-media {
    aspect-ratio: 16 / 10;
  }
  .game-card:hover {
    transform: none;
  }
  .stats-top {
    align-items: flex-start;
    flex-direction: column;
    gap: 12px;
  }
  .stats-grid {
    row-gap: 28px;
  }
  .stat-number {
    font-size: clamp(2.7rem, 12vw, 4rem);
  }
  .values {
    grid-template-columns: 1fr;
  }
  .value {
    padding: 22px 0 !important;
    border-right: 0 !important;
  }
  .timeline li {
    grid-template-columns: 1fr;
    gap: 3px;
    padding-left: 24px;
  }
  .journal-item {
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas:
      "date tag"
      "content arrow";
    gap: 10px 16px;
    padding: 22px 0;
  }
  .journal-date {
    grid-area: date;
  }
  .journal-tag {
    grid-area: tag;
    justify-self: end;
  }
  .journal-arrow {
    grid-area: arrow;
    align-self: end;
  }
  .journal-item:hover {
    padding-left: 8px;
    padding-right: 8px;
  }
  .team-grid {
    gap: 12px;
  }
  .member-info {
    padding: 15px 15px 18px;
  }
  .member-note {
    font-size: 11px;
  }
  .team-note,
  .journal-note {
    text-align: left;
  }
  .contact-title {
    font-size: clamp(2.45rem, 9.6vw, 4rem);
  }
  .contact-secondary {
    grid-template-columns: 1fr;
    gap: 22px;
  }
  .contact-secondary > div:nth-child(3) {
    grid-column: auto;
  }
  .footer-top {
    flex-wrap: wrap;
    gap: 22px;
  }
  .footer-nav {
    order: 3;
    width: 100%;
    gap: 18px;
  }
  .footer-bottom {
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
  }
  .game-dialog {
    width: calc(100vw - 24px);
  }
  .dialog-panel {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: 200px minmax(0, 1fr);
    overflow: hidden;
    max-height: calc(100svh - 24px);
  }
  .dialog-media {
    min-height: 0;
    height: auto;
  }
  .dialog-content {
    overflow-y: auto;
    max-height: none;
    padding: 26px 22px 30px;
  }
  .dialog-close {
    top: 10px;
    right: 10px;
    width: 36px;
    height: 36px;
  }
  .story-panel {
    padding: 48px 22px 30px;
  }
  .story-close {
    top: 10px;
    right: 10px;
    width: 36px;
    height: 36px;
  }
  .error-main {
    align-items: flex-start;
    padding-block: 64px 80px;
  }
  .error-code {
    margin-top: 26px;
    font-size: 7.5rem;
  }
  .error-title {
    font-size: clamp(2.35rem, 11vw, 3.6rem);
  }
  .error-footer .container {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }
}

@media (max-width: 520px) {
  .header-inner {
    height: 74px;
    gap: 14px;
  }
  .site-header.is-scrolled .header-inner {
    height: 66px;
  }
  .menu-toggle {
    padding: 0;
    width: 42px;
    justify-content: center;
  }
  .menu-toggle-label {
    display: none;
  }
  .hero-inner {
    padding-top: 112px;
  }
  .hero-eyebrow {
    font-size: 8.5px;
    letter-spacing: 0.15em;
    gap: 8px;
  }
  .hero-eyebrow::after {
    display: none;
  }
  .hero-title {
    font-size: clamp(2.85rem, 14.2vw, 4.4rem);
    letter-spacing: -0.04em;
  }
  .hero-actions {
    gap: 10px;
  }
  .hero-actions .btn {
    font-size: 11.5px;
    min-height: 46px;
    padding-inline: 12px;
  }
  .hero-facts {
    gap: 16px;
  }
  .hero-facts dt {
    font-size: 8px;
  }
  .hero-facts dd {
    font-size: 10.5px;
    letter-spacing: 0.02em;
  }
  .team-grid {
    grid-template-columns: 1fr;
  }
  .member-visual {
    aspect-ratio: 4 / 3;
  }
  .member-char {
    font-size: clamp(130px, 40vw, 190px);
  }
  .member-note {
    font-size: 11.5px;
  }
  .stats-grid {
    grid-template-columns: 1fr;
    row-gap: 0;
  }
  .stat {
    padding: 24px 0 !important;
    border-left: 0 !important;
    border-top: 1px solid var(--line-soft);
  }
  .stat:first-child {
    padding-top: 0 !important;
    border-top: 0;
  }
  .stat-number {
    font-size: clamp(3rem, 15vw, 4.2rem);
  }
  .stat-label {
    margin-top: 8px;
  }
  .contact-grid {
    margin-top: 42px;
    padding-top: 28px;
  }
  .email {
    font-size: 21px;
  }
  .email-row {
    gap: 12px;
  }
  .game-body {
    padding: 22px;
  }
  .game-card--feature .game-body {
    padding: 22px;
  }
  .game-title {
    font-size: 26px;
  }
  .game-card--feature .game-title {
    font-size: 30px;
  }
  .game-desc {
    font-size: 12.5px;
  }
  .game-enter {
    width: 40px;
    height: 40px;
    right: 14px;
    bottom: 14px;
    font-size: 15px;
  }
  .game-status {
    top: 14px;
    left: 14px;
  }
  .footer-top {
    align-items: flex-start;
  }
  .back-to-top {
    margin-left: auto;
  }
  .dialog-title-row {
    align-items: flex-start;
    flex-direction: column;
    gap: 6px;
  }
  .dialog-tags {
    margin-bottom: 18px;
  }
  .story-panel {
    border-radius: 16px;
  }
}

@media (max-width: 380px) {
  .hero-facts div:nth-child(3) {
    display: none;
  }
  .brand-en {
    display: none;
  }
  .hero-title {
    font-size: 2.8rem;
  }
  .hero-actions .btn {
    font-size: 10.5px;
  }
}

/* ---------- Preferences ---------- */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  .js [data-reveal] {
    opacity: 1;
    transform: none;
  }
  .title-inner {
    transform: none;
    animation: none;
  }
  .marquee-track {
    animation: none;
  }
  .firefly {
    display: none;
  }
  .hero-card {
    animation: none;
    opacity: 1;
  }
}
