:root {
  --bg: #07060c;
  --bg-2: #100d18;
  --panel: #16111f;
  --line: rgba(200, 162, 74, 0.28);
  --gold: #c8a24a;
  --gold-2: #e8d5a3;
  --magic: #7ea0ff;
  --ink: #efe8d8;
  --muted: #9a9184;
  --danger: #d46a6a;
  --shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
  --serif: "Noto Serif SC", "Cinzel", "Songti SC", serif;
  --sans: "Noto Sans SC", "Source Han Sans SC", sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--sans);
  color: var(--ink);
  background: var(--bg);
  min-height: 100vh;
  line-height: 1.7;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font-family: inherit; }

.grain {
  pointer-events: none;
  position: fixed;
  inset: 0;
  z-index: 80;
  opacity: 0.07;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='140' height='140'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}

.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 16px 7vw;
  background: linear-gradient(to bottom, rgba(7,6,12,.92), rgba(7,6,12,.35) 70%, transparent);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid transparent;
}
.site-header.scrolled {
  background: rgba(7, 6, 12, 0.92);
  border-bottom-color: var(--line);
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 180px;
}
.brand-mark {
  width: 40px;
  height: 40px;
  object-fit: contain;
  display: block;
}
.brand-text { display: flex; flex-direction: column; line-height: 1.1; }
.brand-name { font-family: var(--serif); font-size: 18px; letter-spacing: 0.18em; }
.brand-en { font-size: 10px; letter-spacing: 0.42em; color: var(--gold); margin-top: 4px; }
.nav {
  display: flex;
  gap: 28px;
  font-size: 14px;
  letter-spacing: 0.16em;
}
.nav a { color: var(--muted); position: relative; padding: 6px 0; }
.nav a:hover, .nav a.active { color: var(--gold-2); }
.nav a.active::after,
.nav a:hover::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 1px;
  background: var(--gold);
}
.nav-toggle {
  display: none;
  width: 44px; height: 44px;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--gold-2);
  cursor: pointer;
}

.hero {
  position: relative;
  min-height: 100vh;
  display: grid;
  place-items: center;
  overflow: hidden;
  text-align: center;
  padding: 120px 7vw 80px;
}
.hero-bg {
  position: absolute;
  inset: -10%;
  background: url("../img/hero.webp") center/cover no-repeat;
  transform:
    translate(
      calc(var(--mx, 0px) * 0.018),
      calc(var(--parallax, 0px) + var(--my, 0px) * 0.018)
    )
    scale(1.1);
  filter: saturate(0.9) contrast(1.08);
  will-change: transform;
}
.hero-stars {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  mix-blend-mode: screen;
}
.hero-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 50% 40%, rgba(80, 40, 140, 0.18), transparent 50%),
    linear-gradient(to bottom, rgba(7,6,12,.35), rgba(7,6,12,.55) 55%, var(--bg));
}
.hero-inner { position: relative; z-index: 2; max-width: 860px; }
.kicker {
  display: inline-block;
  color: var(--gold);
  letter-spacing: 0.5em;
  font-size: 12px;
  margin-bottom: 18px;
}
.hero h1 {
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(40px, 7vw, 86px);
  line-height: 1.12;
  margin: 0 0 18px;
  text-shadow: 0 10px 40px rgba(0,0,0,.6);
}
.hero p {
  color: var(--muted);
  font-size: 18px;
  max-width: 560px;
  margin: 0 auto 36px;
}
.cta {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 28px;
  border: 1px solid var(--gold);
  color: var(--gold-2);
  letter-spacing: 0.22em;
  background: linear-gradient(180deg, rgba(200,162,74,.16), rgba(200,162,74,.02));
  box-shadow: 0 0 0 0 rgba(200,162,74,0);
  transition: transform .25s ease, box-shadow .25s ease, background .25s ease;
}
.cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 28px rgba(200,162,74,.35);
  background: linear-gradient(180deg, rgba(200,162,74,.28), rgba(200,162,74,.06));
}

.section { padding: 88px 7vw; }
.section-head {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 24px;
  margin-bottom: 36px;
}
.section h2 {
  font-family: var(--serif);
  font-size: clamp(28px, 4vw, 42px);
  margin: 0 0 8px;
}
.section .lede { color: var(--muted); margin: 0; max-width: 520px; }
.link-more { color: var(--gold); letter-spacing: 0.12em; font-size: 14px; }
.link-more:hover { text-decoration: underline; }

.game-grid, .news-grid, .value-grid, .partner-grid {
  display: grid;
  gap: 22px;
}
.game-grid { grid-template-columns: repeat(4, 1fr); }
.news-grid { grid-template-columns: repeat(3, 1fr); }
.value-grid { grid-template-columns: repeat(3, 1fr); }

.card {
  background: var(--panel);
  border: 1px solid var(--line);
  position: relative;
  overflow: hidden;
  cursor: pointer;
  transition: transform .28s ease, box-shadow .28s ease, border-color .28s ease;
}
.card::before {
  content: "";
  position: absolute;
  inset: 8px;
  border: 1px solid transparent;
  pointer-events: none;
}
.card:hover {
  transform: translateY(-8px);
  border-color: var(--gold);
  box-shadow: 0 0 0 1px rgba(200,162,74,.25), var(--shadow);
}
.card:hover::before { border-color: rgba(200,162,74,.4); }
.card-cover {
  aspect-ratio: 3 / 4;
  object-fit: cover;
  width: 100%;
  filter: saturate(.9);
}
.card-body { padding: 18px 18px 22px; }
.tags { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 10px; }
.tag {
  font-size: 11px;
  letter-spacing: 0.14em;
  color: var(--gold);
  border: 1px solid var(--line);
  padding: 2px 8px;
}
.tag-status { color: var(--magic); border-color: rgba(126, 160, 255, 0.4); }

.card-featured {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 1.15fr 1fr;
}
.card-featured .card-cover {
  aspect-ratio: 16 / 10;
  min-height: 280px;
  height: 100%;
}
.card-featured .card-body {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 36px 40px 40px;
}
.card-featured h3 { font-size: clamp(28px, 3.2vw, 40px); }
.card-featured p { font-size: 16px; max-width: 36em; }
.card-featured .ghost-btn { align-self: flex-start; }
.card h3 { font-family: var(--serif); margin: 0 0 8px; font-size: 22px; }
.card p { margin: 0 0 16px; color: var(--muted); font-size: 14px; }
.ghost-btn {
  display: inline-block;
  font-size: 13px;
  letter-spacing: 0.16em;
  color: var(--gold-2);
  border-bottom: 1px solid var(--gold);
  padding-bottom: 2px;
}

.value {
  padding: 32px 28px;
  background: linear-gradient(180deg, #171322, #110e18);
  border: 1px solid var(--line);
}
.value-icon {
  width: 42px; height: 42px;
  margin-bottom: 16px;
  color: var(--gold);
  transition: transform .3s ease, filter .3s ease;
}
.value:hover .value-icon {
  transform: rotate(-8deg);
  filter: drop-shadow(0 0 10px rgba(200,162,74,.6));
}
.value h3 { font-family: var(--serif); margin: 0 0 8px; }
.value p { margin: 0; color: var(--muted); }

.news-item .thumb {
  aspect-ratio: 16 / 10;
  object-fit: cover;
  width: 100%;
}
.news-item .meta { color: var(--gold); font-size: 12px; letter-spacing: 0.14em; }
.news-item h3 { font-size: 20px; }

.page-hero {
  padding: 140px 7vw 48px;
  background:
    linear-gradient(to bottom, rgba(7,6,12,.4), var(--bg)),
    url("../img/about.webp") center/cover;
}
.page-hero.plain {
  background: radial-gradient(ellipse at 20% 0%, rgba(80,40,140,.25), transparent 50%), var(--bg);
}
.page-hero h1 { font-family: var(--serif); font-size: clamp(36px, 6vw, 64px); margin: 0 0 12px; }
.page-hero p { color: var(--muted); max-width: 560px; margin: 0; }

.filters { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 28px; }
.filter {
  background: transparent;
  color: var(--muted);
  border: 1px solid var(--line);
  padding: 8px 14px;
  cursor: pointer;
  letter-spacing: 0.12em;
}
.filter.active, .filter:hover { color: var(--gold-2); border-color: var(--gold); }

.news-row {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 22px;
  padding: 18px 0;
  border-bottom: 1px solid rgba(200,162,74,.12);
  cursor: pointer;
}
.news-row img { width: 100%; height: 130px; object-fit: cover; }
.news-row h3 { margin: 6px 0 8px; font-family: var(--serif); }
.news-row p { margin: 0; color: var(--muted); }

.timeline { border-left: 1px solid var(--line); margin: 12px 0 0 8px; padding-left: 28px; }
.time-item { margin-bottom: 28px; position: relative; }
.time-item::before {
  content: "";
  position: absolute;
  left: -33px; top: 8px;
  width: 9px; height: 9px;
  background: var(--gold);
  box-shadow: 0 0 10px var(--gold);
}
.time-item strong { color: var(--gold); display: block; font-size: 13px; letter-spacing: 0.16em; }

.partner-grid { grid-template-columns: repeat(5, 1fr); }
.partner {
  border: 1px solid var(--line);
  min-height: 84px;
  display: grid;
  place-items: center;
  color: var(--muted);
  letter-spacing: 0.18em;
  font-size: 13px;
}

.contact-wrap {
  display: grid;
  grid-template-columns: 1.1fr .9fr;
  gap: 40px;
}
form { display: grid; gap: 14px; }
label { font-size: 13px; color: var(--muted); letter-spacing: 0.08em; }
input, select, textarea {
  width: 100%;
  background: #0c0a12;
  color: var(--ink);
  border: 1px solid var(--line);
  padding: 12px 14px;
  outline: none;
}
input:focus, select:focus, textarea:focus { border-color: var(--gold); }
textarea { min-height: 140px; resize: vertical; }
.form-ok {
  display: none;
  border: 1px solid var(--gold);
  color: var(--gold-2);
  padding: 16px;
  background: rgba(200,162,74,.08);
}
.contact-aside {
  border: 1px solid var(--line);
  padding: 28px;
  background: var(--panel);
}
.contact-aside dt { color: var(--gold); font-size: 12px; letter-spacing: 0.16em; margin-top: 16px; }
.contact-aside dd { margin: 4px 0 0; }

.modal {
  position: fixed;
  inset: 0;
  z-index: 70;
  display: none;
  place-items: center;
  padding: 24px;
  background: rgba(0,0,0,.72);
}
.modal.open { display: grid; }
.modal-card {
  width: min(980px, 100%);
  max-height: 90vh;
  overflow: auto;
  background: var(--bg-2);
  border: 1px solid var(--gold);
  box-shadow: var(--shadow);
}
.gallery {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 8px;
  width: 100%;
  background: #000;
}
.gallery img { width: 100%; height: 220px; object-fit: cover; object-position: center; }
.gallery img:first-child { grid-row: span 2; height: 448px; }
.gallery-wide {
  grid-template-columns: 1fr;
}
.gallery-wide img,
.gallery-wide img:first-child {
  grid-row: auto;
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}
.news-modal-cover {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  display: block;
}
.modal-body { padding: 28px; }
.modal-body .meta { color: var(--gold); font-size: 12px; letter-spacing: 0.14em; margin-bottom: 8px; }
.modal-bar {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  min-height: 44px;
  position: sticky;
  top: 0;
  z-index: 3;
  background: var(--bg-2);
  border-bottom: 1px solid var(--line);
}
.modal-close {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  background: none;
  border: 0;
  color: var(--gold-2);
  font-size: 22px;
  cursor: pointer;
}

.site-footer {
  border-top: 1px solid var(--line);
  padding: 48px 7vw 28px;
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr;
  gap: 32px;
  color: var(--muted);
  font-size: 14px;
}
.site-footer h4 { color: var(--gold-2); font-family: var(--serif); margin: 0 0 12px; }
.site-footer a:hover { color: var(--gold); text-decoration: underline; }
.copy { grid-column: 1 / -1; border-top: 1px solid rgba(200,162,74,.12); padding-top: 16px; font-size: 12px; }

@media (max-width: 1024px) {
  .game-grid { grid-template-columns: repeat(2, 1fr); }
  .partner-grid { grid-template-columns: repeat(3, 1fr); }
  .contact-wrap, .site-footer { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 768px) {
  .nav-toggle { display: grid; place-items: center; }
  .nav {
    display: none;
    position: absolute;
    top: 72px; left: 0; right: 0;
    flex-direction: column;
    gap: 0;
    background: rgba(7,6,12,.96);
    border-bottom: 1px solid var(--line);
    padding: 8px 7vw 16px;
  }
  .nav.open { display: flex; }
  .nav a { padding: 14px 0; }
  .section-head { flex-direction: column; align-items: start; }
  .news-grid, .value-grid, .game-grid, .partner-grid, .contact-wrap, .site-footer, .news-row, .gallery {
    grid-template-columns: 1fr;
  }
  .gallery img, .gallery img:first-child { height: 200px; grid-row: auto; }
  .gallery-wide img, .gallery-wide img:first-child { height: auto; }
  .news-row img { height: 180px; }
  .card-featured { grid-template-columns: 1fr; }
  .card-featured .card-cover { min-height: 220px; }
  .card-featured .card-body { padding: 22px 18px 26px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
  html { scroll-behavior: auto; }
}
