/* Pixelden — root homepage */

:root {
  --ink: #0a0908;
  --ink-2: #100e0b;
  --panel: #15120e;
  --line: #2b241d;
  --line-soft: rgba(242, 232, 215, 0.07);
  --paper: #f2e8d7;
  --dim: #a99c8b;
  --dim-2: #7c7165;
  --amber: #ffb057;
  --amber-2: #ffd8a6;
  --jade: #8fbfa3;
  --rust: #e0764e;
  --pixel: "Silkscreen", ui-monospace, monospace;
  --display: "Instrument Serif", "Noto Serif SC", Georgia, serif;
  --sans: "Noto Sans SC", "Helvetica Neue", Arial, sans-serif;
  --max: 1160px;
  --pad: clamp(20px, 5vw, 48px);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

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

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  background:
    radial-gradient(900px 520px at 12% -8%, rgba(255, 176, 87, 0.13), transparent 62%),
    radial-gradient(760px 480px at 92% 4%, rgba(143, 191, 163, 0.08), transparent 60%),
    radial-gradient(1100px 700px at 50% 108%, rgba(224, 118, 78, 0.09), transparent 62%),
    var(--ink);
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: 0.55;
  background-image:
    linear-gradient(to right, var(--line-soft) 1px, transparent 1px),
    linear-gradient(to bottom, var(--line-soft) 1px, transparent 1px);
  background-size: 72px 72px;
  -webkit-mask-image: radial-gradient(ellipse at 50% 28%, #000 18%, transparent 78%);
  mask-image: radial-gradient(ellipse at 50% 28%, #000 18%, transparent 78%);
}

a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; height: auto; }
ul { margin: 0; padding: 0; list-style: none; }
h1, h2, h3, h4, p { margin: 0; }

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

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

.skip {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 100;
  padding: 10px 16px;
  background: var(--amber);
  color: var(--ink);
  font-family: var(--pixel);
  font-size: 0.72rem;
}
.skip:focus { left: 16px; top: 16px; }

.wrap {
  width: min(100% - var(--pad) * 2, var(--max));
  margin-inline: auto;
}

/* ---------- top bar ---------- */

.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(10, 9, 8, 0.74);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line-soft);
}

.topbar__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding-block: 16px;
}

.brand { display: flex; align-items: center; gap: 10px; }

.brand__mark {
  width: 12px;
  height: 12px;
  background: var(--amber);
  box-shadow: 5px 5px 0 rgba(255, 176, 87, 0.25), -5px -5px 0 rgba(255, 176, 87, 0.14);
  transform: translate(-2px, -2px);
}

.brand__name {
  font-family: var(--pixel);
  font-size: 0.82rem;
  letter-spacing: 0.2em;
}

.brand__cn {
  padding-left: 10px;
  border-left: 1px solid var(--line);
  color: var(--dim-2);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
}

.topnav { display: flex; gap: 28px; }

.topnav a {
  padding-block: 6px;
  border-bottom: 1px solid transparent;
  color: var(--dim);
  font-family: var(--pixel);
  font-size: 0.64rem;
  letter-spacing: 0.16em;
  transition: color 0.25s ease, border-color 0.25s ease;
}
.topnav a:hover { color: var(--paper); border-color: var(--amber); }

.lang {
  display: flex;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 2px;
}
.lang a,
.lang .is-active {
  padding: 6px 10px;
  font-family: var(--pixel);
  font-size: 0.62rem;
  letter-spacing: 0.1em;
  color: var(--dim);
  transition: background 0.25s ease, color 0.25s ease;
}
.lang a:hover { color: var(--paper); background: rgba(242, 232, 215, 0.06); }
.lang .is-active { background: var(--paper); color: var(--ink); }

/* ---------- hero ---------- */

.hero {
  display: grid;
  grid-template-columns: 1.08fr 0.92fr;
  gap: clamp(32px, 5vw, 72px);
  align-items: center;
  padding-block: clamp(56px, 9vw, 110px) clamp(48px, 7vw, 88px);
}

.eyebrow {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--amber);
  font-family: var(--pixel);
  font-size: 0.64rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
}

.eyebrow__dot {
  width: 6px;
  height: 6px;
  background: var(--amber);
  border-radius: 50%;
  box-shadow: 0 0 0 0 rgba(255, 176, 87, 0.55);
  animation: pulse 2.6s ease-out infinite;
}

.hero h1 {
  margin-top: 22px;
  font-family: var(--display);
  font-size: clamp(3rem, 7.6vw, 6.6rem);
  font-weight: 400;
  line-height: 0.94;
  letter-spacing: -0.02em;
}

.hero h1 em { font-style: italic; color: var(--amber); }

.hero__lede {
  max-width: 46ch;
  margin-top: 26px;
  color: var(--dim);
  font-size: clamp(1rem, 1.4vw, 1.08rem);
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 34px;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 22px;
  border: 1px solid var(--amber);
  background: var(--amber);
  color: var(--ink);
  font-family: var(--pixel);
  font-size: 0.66rem;
  letter-spacing: 0.14em;
  transition: background 0.25s ease, transform 0.25s ease, color 0.25s ease, border-color 0.25s ease;
}
.btn:hover { background: var(--amber-2); transform: translateY(-2px); }

.btn--ghost { background: transparent; color: var(--paper); border-color: var(--line); }
.btn--ghost:hover { background: transparent; color: var(--amber); border-color: var(--amber); }

.hero__note {
  margin-top: 22px;
  color: var(--dim-2);
  font-size: 0.78rem;
  letter-spacing: 0.04em;
}

/* ---------- sigil ---------- */

.sigil {
  position: relative;
  display: grid;
  place-items: center;
  width: min(440px, 92%);
  aspect-ratio: 1;
  margin-inline: auto;
}

.sigil::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: radial-gradient(circle at 50% 50%, rgba(255, 176, 87, 0.18), transparent 62%);
  filter: blur(8px);
}

.sigil-ring {
  position: absolute;
  border: 1px dashed rgba(242, 232, 215, 0.16);
  border-radius: 50%;
}
.sigil-ring--outer { inset: 0; animation: spin 70s linear infinite; }
.sigil-ring--mid {
  inset: 14%;
  border-style: solid;
  border-color: rgba(255, 176, 87, 0.2);
  animation: spin 46s linear infinite reverse;
}

.sigil-orbit { position: absolute; inset: 0; animation: spin 30s linear infinite; }
.sigil-orbit--2 { inset: 14%; animation-duration: 38s; animation-direction: reverse; }

.sigil-dot {
  position: absolute;
  top: -5px;
  left: 50%;
  width: 10px;
  height: 10px;
  margin-left: -5px;
  background: var(--amber);
  box-shadow: 0 0 16px var(--amber);
}
.sigil-orbit--2 .sigil-dot { background: var(--jade); box-shadow: 0 0 16px var(--jade); }

.sigil-core {
  position: relative;
  display: grid;
  place-content: center;
  width: 52%;
  aspect-ratio: 1;
  border: 1px solid rgba(255, 176, 87, 0.35);
  border-radius: 50%;
  background: radial-gradient(circle at 50% 34%, #261c12, #0d0b09 72%);
  box-shadow: 0 0 64px rgba(255, 176, 87, 0.14), inset 0 0 44px rgba(255, 176, 87, 0.07);
  text-align: center;
}

.sigil-count {
  color: var(--paper);
  font-family: var(--pixel);
  font-size: clamp(2.4rem, 5vw, 3.6rem);
  line-height: 1;
}

.sigil-label {
  margin-top: 10px;
  color: var(--amber);
  font-family: var(--pixel);
  font-size: 0.6rem;
  letter-spacing: 0.3em;
}

.sigil-tick {
  position: absolute;
  bottom: -7%;
  color: var(--dim-2);
  font-family: var(--pixel);
  font-size: 0.56rem;
  letter-spacing: 0.32em;
}

/* ---------- ticker ---------- */

.ticker {
  overflow: hidden;
  border-block: 1px solid var(--line);
  background: rgba(255, 176, 87, 0.03);
}

.ticker__track {
  display: flex;
  width: max-content;
  gap: 2.5rem;
  padding-block: 13px;
  animation: marquee 34s linear infinite;
}

.ticker span {
  color: var(--dim);
  font-family: var(--pixel);
  font-size: 0.6rem;
  letter-spacing: 0.22em;
  white-space: nowrap;
}
.ticker b { color: var(--amber); font-weight: 400; }

/* ---------- sections ---------- */

.section { padding-block: clamp(56px, 8vw, 96px); }

.section__head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 42px;
}

.section__head h2 {
  margin-top: 12px;
  font-family: var(--display);
  font-size: clamp(2rem, 4.4vw, 3.4rem);
  font-weight: 400;
  letter-spacing: -0.01em;
  line-height: 1.05;
}

.section__note {
  color: var(--dim-2);
  font-family: var(--pixel);
  font-size: 0.58rem;
  letter-spacing: 0.16em;
}

/* ---------- game cards ---------- */

.games {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: clamp(18px, 2.4vw, 28px);
}

.game-card {
  position: relative;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--panel);
  transition: transform 0.5s cubic-bezier(0.2, 0.7, 0.2, 1), border-color 0.4s ease, box-shadow 0.5s ease;
}

.game-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  z-index: 3;
  height: 2px;
  background: var(--accent);
  opacity: 0.7;
}

.game-card:hover {
  transform: translateY(-6px);
  border-color: color-mix(in srgb, var(--accent) 55%, var(--line));
  box-shadow: 0 26px 60px -30px rgba(0, 0, 0, 0.95), 0 0 0 1px color-mix(in srgb, var(--accent) 20%, transparent);
}

.game-card__media {
  position: relative;
  aspect-ratio: 2 / 1;
  overflow: hidden;
  background: linear-gradient(135deg, #1b1510, #0d0b09);
}

.game-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(0.92) contrast(1.05);
  transition: transform 0.9s cubic-bezier(0.2, 0.7, 0.2, 1), filter 0.6s ease;
}

.game-card:hover .game-card__media img {
  transform: scale(1.045);
  filter: saturate(1.02) contrast(1.02);
}

.game-card__media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(10, 9, 8, 0.75), transparent 56%);
}

.game-card__badge,
.game-card__play {
  position: absolute;
  z-index: 2;
  font-family: var(--pixel);
  font-size: 0.58rem;
  letter-spacing: 0.14em;
}

.game-card__badge {
  top: 14px;
  left: 14px;
  padding: 6px 9px;
  border: 1px solid color-mix(in srgb, var(--accent) 45%, transparent);
  background: rgba(10, 9, 8, 0.62);
  color: var(--accent);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}

.game-card__play {
  right: 14px;
  bottom: 16px;
  padding: 7px 10px;
  background: var(--accent);
  color: var(--ink);
  transition: transform 0.3s ease;
}
.game-card:hover .game-card__play { transform: translate(2px, -2px); }

.game-card__body {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 14px;
  padding: clamp(20px, 3vw, 28px);
}

.game-card h3 {
  font-family: var(--display);
  font-size: clamp(1.5rem, 2.6vw, 2rem);
  font-weight: 400;
  line-height: 1.1;
}

.game-card h3 span {
  display: block;
  margin-top: 6px;
  color: var(--dim-2);
  font-family: var(--sans);
  font-size: 0.78rem;
  font-weight: 400;
  letter-spacing: 0.12em;
}

.game-card p { color: var(--dim); font-size: 0.94rem; }

.game-card__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  margin-top: auto;
  padding-top: 6px;
}

.game-card__meta li {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--dim-2);
  font-family: var(--pixel);
  font-size: 0.56rem;
  letter-spacing: 0.1em;
}

.game-card__meta li + li::before {
  content: "";
  width: 3px;
  height: 3px;
  background: var(--dim-2);
}

/* ---------- about ---------- */

.about {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: clamp(32px, 6vw, 80px);
  align-items: start;
  padding-block: clamp(56px, 8vw, 96px);
  border-top: 1px solid var(--line);
}

.about h2 {
  margin-top: 14px;
  font-family: var(--display);
  font-size: clamp(2rem, 4.2vw, 3.2rem);
  font-weight: 400;
  line-height: 1.02;
}

.about h2 em { font-style: italic; color: var(--jade); }

.about__copy p {
  max-width: 56ch;
  margin-bottom: 18px;
  color: var(--dim);
}
.about__copy p:last-of-type { margin-bottom: 0; }
.about__copy strong { color: var(--paper); font-weight: 500; }

.stats {
  display: flex;
  flex-wrap: wrap;
  gap: clamp(24px, 4vw, 56px);
  margin-top: 34px;
  padding-top: 26px;
  border-top: 1px solid var(--line);
}

.stats__num {
  display: block;
  color: var(--amber);
  font-family: var(--pixel);
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  line-height: 1;
}

.stats__label {
  display: block;
  margin-top: 8px;
  color: var(--dim-2);
  font-family: var(--pixel);
  font-size: 0.56rem;
  letter-spacing: 0.14em;
}

/* ---------- motto ---------- */

.motto {
  padding-block: clamp(40px, 6vw, 76px);
  border-top: 1px solid var(--line);
  text-align: center;
}

.motto p {
  font-family: var(--display);
  font-size: clamp(1.6rem, 3.4vw, 2.6rem);
  font-style: italic;
  line-height: 1.2;
}

.motto span {
  display: block;
  margin-top: 12px;
  color: var(--dim-2);
  font-family: var(--sans);
  font-size: 0.95rem;
  font-style: normal;
  letter-spacing: 0.08em;
}

/* ---------- footer ---------- */

.footer {
  border-top: 1px solid var(--line);
  background: var(--ink-2);
}

.footer__inner {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr;
  gap: 32px;
  padding-block: 56px;
}

.footer h4 {
  margin-bottom: 16px;
  color: var(--amber);
  font-family: var(--pixel);
  font-size: 0.58rem;
  font-weight: 400;
  letter-spacing: 0.2em;
}

.footer__brand p {
  max-width: 34ch;
  margin-top: 14px;
  color: var(--dim-2);
  font-size: 0.84rem;
}

.footer li + li { margin-top: 10px; }
.footer li a { color: var(--dim); font-size: 0.9rem; transition: color 0.25s ease; }
.footer li a:hover { color: var(--amber); }

.footer__base {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px 24px;
  padding-block: 20px;
  border-top: 1px solid var(--line);
  color: var(--dim-2);
  font-size: 0.76rem;
}

/* ---------- reveal ---------- */

.js [data-reveal] {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.9s cubic-bezier(0.2, 0.7, 0.2, 1), transform 0.9s cubic-bezier(0.2, 0.7, 0.2, 1);
  transition-delay: var(--d, 0s);
}
.js [data-reveal].is-in { opacity: 1; transform: none; }

/* ---------- motion ---------- */

@keyframes spin { to { transform: rotate(360deg); } }

@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(255, 176, 87, 0.5); }
  70% { box-shadow: 0 0 0 8px rgba(255, 176, 87, 0); }
  100% { box-shadow: 0 0 0 0 rgba(255, 176, 87, 0); }
}

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

/* ---------- responsive ---------- */

@media (max-width: 980px) {
  .hero { grid-template-columns: 1fr; padding-block: 48px 56px; }
  .sigil { order: -1; width: min(320px, 78%); }
  .games { grid-template-columns: 1fr; }
  .about { grid-template-columns: 1fr; }
  .footer__inner { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 640px) {
  .topnav { display: none; }
  .brand__cn { display: none; }
  .hero h1 { font-size: clamp(2.6rem, 11.5vw, 3.7rem); }
  .footer__inner { grid-template-columns: 1fr; }
  .footer__base { flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js [data-reveal] { opacity: 1; transform: none; transition: none; }
  .sigil-ring,
  .sigil-orbit,
  .ticker__track,
  .eyebrow__dot { animation: none; }
  .game-card:hover,
  .btn:hover { transform: none; }
  .game-card:hover .game-card__media img { transform: none; }
}
