:root {
  --bg: #07070a;
  --bg-2: #0e0d12;
  --bg-3: #15141b;
  --gold: #d4b15b;
  --gold-2: #f3d78a;
  --gold-3: #8a6a2e;
  --fire: #c4451c;
  --fire-2: #e07a3d;
  --ink: #c9bfae;
  --text: #efe6d6;
  --muted: #9a9080;
  --line: rgba(212, 177, 91, 0.28);
  --danger: #c44;
  --serif: "Noto Serif CJK SC", "Source Han Serif SC", "Songti SC", "STSong", "SimSun", serif;
  --sans: "Noto Sans CJK SC", "Source Han Sans SC", "PingFang SC", "Microsoft YaHei", "Noto Sans", sans-serif;
  --nav-h: 72px;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
html, body { background: var(--bg); color: var(--text); font-family: var(--sans); }
body { overflow-x: hidden; }
img, video { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; border: 0; background: none; }
ul { list-style: none; }

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

/* Header */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  height: var(--nav-h);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 36px;
  background: linear-gradient(180deg, rgba(7,7,10,.92), rgba(7,7,10,.55) 70%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid transparent;
  transition: background .3s, border-color .3s;
}
.nav.scrolled {
  background: rgba(7,7,10,.92);
  border-bottom-color: var(--line);
}
.brand {
  display: flex; align-items: baseline; gap: 10px;
  font-family: var(--serif);
  letter-spacing: .22em;
  font-size: 20px;
  background: linear-gradient(180deg, #fff1c4, #d4b15b 60%, #8a5a1a);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.brand small { font-size: 11px; letter-spacing: .3em; color: var(--gold-3); -webkit-text-fill-color: var(--gold-3); }
.nav-links { display: flex; gap: 4px; align-items: center; }
.nav-links a {
  padding: 8px 12px; color: var(--ink); font-size: 14px; letter-spacing: .08em;
  border-bottom: 1px solid transparent;
}
.nav-links a:hover, .nav-links a.active { color: var(--gold-2); border-bottom-color: var(--gold); }
.nav-cta {
  margin-left: 12px;
  padding: 8px 16px;
  border: 1px solid var(--gold);
  color: var(--gold-2) !important;
  letter-spacing: .16em;
  font-size: 13px;
}
.nav-cta:hover { background: rgba(212,177,91,.15); }
.nav-toggle {
  display: none; width: 40px; height: 40px; position: relative;
}
.nav-toggle span, .nav-toggle span:before, .nav-toggle span:after {
  position: absolute; left: 10px; right: 10px; height: 1.5px; background: var(--gold);
  content: "";
}
.nav-toggle span { top: 50%; }
.nav-toggle span:before { top: -8px; }
.nav-toggle span:after { top: 8px; }

/* Hero */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex; align-items: center; justify-content: center;
  text-align: center;
  overflow: hidden;
}
.hero-video, .hero-poster {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; object-position: center 32%;
  transform: scale(1.2); transform-origin: center 40%;
  filter: saturate(1.05) contrast(1.05);
}
.hero-mask {
  position: absolute; inset: 0;
  background:
    radial-gradient(ellipse at center, transparent 20%, rgba(7,7,10,.35) 55%, rgba(7,7,10,.88) 100%),
    linear-gradient(180deg, rgba(7,7,10,.35) 0%, transparent 25%, transparent 60%, var(--bg) 100%);
}
.hero-content { position: relative; z-index: 2; padding: 120px 24px 80px; }
.hero-content::before {
  content: "";
  position: absolute; left: 50%; top: 16%;
  width: min(900px, 96%); height: 70%;
  transform: translateX(-50%);
  background: radial-gradient(ellipse at center, rgba(0,0,0,.58) 0%, rgba(0,0,0,.2) 55%, transparent 75%);
  z-index: -1; pointer-events: none;
}
.hero-content {
  text-shadow: 0 4px 24px rgba(0,0,0,.75), 0 1px 2px #000;
}
.eyebrow {
  font-size: 13px; letter-spacing: .46em; color: var(--gold);
  margin-bottom: 18px; text-indent: .46em;
}
.hero-title {
  font-family: var(--serif);
  font-weight: 700;
  font-size: clamp(56px, 10vw, 136px);
  line-height: 1;
  letter-spacing: .22em;
  text-indent: .22em;
  background: linear-gradient(180deg, #fff7d6 0%, #f0d078 28%, #c9a227 62%, #7a4a14 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 2px 0 #2a1606) drop-shadow(0 10px 28px rgba(196,69,28,.35));
}
.hero-slogan {
  margin-top: 22px;
  font-family: var(--serif);
  font-size: clamp(18px, 2.4vw, 28px);
  letter-spacing: .36em;
  text-indent: .36em;
  color: var(--gold-2);
}
.hero-sub {
  margin-top: 14px; color: var(--muted); letter-spacing: .18em; font-size: 13px;
}
.cta-row { margin-top: 40px; display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 180px; padding: 14px 28px;
  letter-spacing: .22em; font-size: 15px;
  border: 1px solid var(--gold);
  transition: background .2s, transform .2s, box-shadow .2s;
}
.btn-gold { background: linear-gradient(180deg, #e8c56a, #9a6b1e); color: #1a1006; font-weight: 700; }
.btn-gold:hover { box-shadow: 0 0 24px rgba(212,177,91,.35); transform: translateY(-1px); }
.btn-ghost { color: var(--gold-2); background: rgba(0,0,0,.35); }
.btn-ghost:hover { background: rgba(212,177,91,.12); }
.scroll-hint {
  position: absolute; bottom: 28px; left: 50%; transform: translateX(-50%);
  color: var(--gold-3); font-size: 12px; letter-spacing: .2em;
  animation: bob 2.2s ease-in-out infinite;
}
@keyframes bob { 50% { transform: translate(-50%, 8px); opacity: .6; } }

/* Sections */
.section { position: relative; padding: 96px 0 80px; scroll-margin-top: 88px; }
footer.footer { scroll-margin-top: 88px; }
.wrap { width: min(1200px, calc(100% - 48px)); margin: 0 auto; }
.sec-head { text-align: center; margin-bottom: 52px; }
.sec-head h2 {
  font-family: var(--serif); font-size: clamp(28px, 4vw, 42px);
  letter-spacing: .2em; text-indent: .2em;
  background: linear-gradient(180deg, #f8e7b0, #c9a227);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.sec-head p { margin-top: 12px; color: var(--muted); letter-spacing: .08em; }
.sec-head .rule {
  width: 72px; height: 1px; margin: 16px auto 0;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
}

/* Features */
.features { background: linear-gradient(180deg, var(--bg), #0c0b10 40%, var(--bg)); }
.feat-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 18px;
}
.feat-card {
  grid-column: span 2;
  position: relative; overflow: hidden;
  min-height: 280px;
  background: var(--bg-3);
  border: 1px solid var(--line);
}
.feat-card:nth-child(4), .feat-card:nth-child(5) { grid-column: span 3; }
.feat-card img { width: 100%; height: 180px; object-fit: cover; filter: saturate(.9); }
.feat-card .body { padding: 18px 20px 22px; }
.feat-card h3 { font-family: var(--serif); letter-spacing: .16em; color: var(--gold-2); font-size: 20px; margin-bottom: 8px; }
.feat-card p { color: var(--ink); font-size: 14px; line-height: 1.75; }
.feat-card:hover { border-color: var(--gold); box-shadow: 0 0 0 1px rgba(212,177,91,.2) inset; }

/* Classes */
.classes { background: #0a090d; }
.tabs { display: flex; justify-content: center; gap: 8px; margin-bottom: 28px; }
.tab {
  padding: 10px 28px;
  border: 1px solid var(--line);
  letter-spacing: .2em; color: var(--muted);
}
.tab.active, .tab:hover { border-color: var(--gold); color: var(--gold-2); background: rgba(212,177,91,.08); }
.class-pane { display: none; }
.class-pane.active { display: grid; grid-template-columns: 1.1fr .9fr; gap: 28px; align-items: start; }
.class-visual { position: relative; border: 1px solid var(--line); overflow: hidden; background: #000; }
.class-visual img, .class-visual video { width: 100%; height: 460px; object-fit: cover; }
.class-visual video { display: none; }
.class-visual.playing img { display: none; }
.class-visual.playing video { display: block; }
.play-skill {
  position: absolute; right: 16px; bottom: 16px;
  padding: 8px 14px; border: 1px solid var(--gold);
  background: rgba(0,0,0,.55); color: var(--gold-2); letter-spacing: .16em; font-size: 13px;
}
.class-info h3 { font-family: var(--serif); font-size: 32px; letter-spacing: .2em; color: var(--gold-2); }
.class-info .lead { margin: 12px 0 20px; color: var(--ink); line-height: 1.8; }
.skill-list { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 16px; }
.skill { padding: 10px 12px; border: 1px solid rgba(212,177,91,.14); background: rgba(255,255,255,.02); }
.skill b { display: block; color: var(--gold); font-weight: 600; letter-spacing: .08em; margin-bottom: 4px; font-size: 14px; }
.skill span { color: var(--muted); font-size: 12px; line-height: 1.5; }

/* Map */
.territory { background: linear-gradient(180deg, #0a090d, #101018); }
.map-layout { display: grid; grid-template-columns: 1fr 300px; gap: 28px; align-items: start; }
.svg-wrap {
  background:
    radial-gradient(ellipse at 50% 40%, rgba(196,69,28,.08), transparent 55%),
    #0b0c12;
  border: 1px solid var(--line);
  padding: 12px;
}
#map-svg { width: 100%; height: auto; display: block; }
#map-svg .city {
  fill: #1a1c26;
  stroke: #7a6230;
  stroke-width: 1.1;
  cursor: pointer;
  transition: fill .2s, stroke .2s, filter .2s;
}
#map-svg .city:hover, #map-svg .city.is-hover { fill: #3a2a12; stroke: #f0d78a; filter: drop-shadow(0 0 6px rgba(212,177,91,.4)); }
#map-svg .city.is-neighbor { fill: #241c14; stroke: #c9a227; }
#map-svg .city.is-active { fill: #5a3510; stroke: #fff1c4; }
#map-svg .label {
  font-family: var(--serif); font-size: 13px; fill: #e8d9b0;
  pointer-events: none; text-anchor: middle;
}
#map-svg .outline { fill: none; stroke: rgba(212,177,91,.35); stroke-width: 1.6; }
.map-panel {
  border: 1px solid var(--line);
  background: var(--bg-3);
  padding: 22px;
  min-height: 280px;
}
.map-panel h3 { font-family: var(--serif); color: var(--gold-2); letter-spacing: .16em; font-size: 24px; }
.map-panel .meta { margin: 10px 0 16px; color: var(--muted); font-size: 13px; line-height: 1.7; }
.map-panel .nbs { display: flex; flex-wrap: wrap; gap: 8px; }
.map-panel .nbs span {
  border: 1px solid var(--line); padding: 4px 10px; font-size: 12px; color: var(--gold);
  letter-spacing: .08em;
}
.map-legend { margin-top: 20px; color: var(--muted); font-size: 12px; line-height: 1.7; }

/* Gallery */
.gallery { background: var(--bg); }
.carousel { position: relative; }
.carousel-stage {
  position: relative; overflow: hidden;
  border: 1px solid var(--line); background: #000;
  aspect-ratio: 16/9;
}
.carousel-stage img { width: 100%; height: 100%; object-fit: cover; }
.carousel-cap {
  padding: 18px 8px 0;
  text-align: center;
}
.carousel-cap h3 { font-family: var(--serif); letter-spacing: .16em; font-size: 24px; color: var(--gold-2); }
.carousel-cap p { margin-top: 6px; color: var(--ink); font-size: 14px; }
.carousel-btn {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 44px; height: 64px;
  background: rgba(0,0,0,.45); border: 1px solid var(--line); color: var(--gold-2);
  font-size: 22px; z-index: 2;
}
.carousel-btn.prev { left: 12px; }
.carousel-btn.next { right: 12px; }
.carousel-btn:hover { background: rgba(212,177,91,.2); }
.dots { display: flex; justify-content: center; gap: 8px; margin-top: 16px; flex-wrap: wrap; }
.dots button {
  width: 8px; height: 8px; border-radius: 50%;
  background: #4a4030; border: 0;
}
.dots button.active { background: var(--gold); transform: scale(1.3); }

/* Battle videos */
.battle { background: #0b0a0f; }
.video-grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: 16px; }
.video-main, .video-card {
  position: relative; overflow: hidden; border: 1px solid var(--line); background: #000; cursor: pointer;
}
.video-main video, .video-card video, .video-main img, .video-card img { width: 100%; height: 100%; object-fit: cover; }
.video-main { aspect-ratio: 16/9; }
.side-stack { display: grid; gap: 16px; }
.video-card { aspect-ratio: 16/7; }
.v-label {
  position: absolute; left: 0; right: 0; bottom: 0;
  padding: 14px 16px;
  background: linear-gradient(transparent, rgba(0,0,0,.8));
  font-family: var(--serif); letter-spacing: .12em; color: var(--gold-2);
}
.play-ico {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%,-50%);
  width: 64px; height: 64px; border-radius: 50%;
  border: 1px solid var(--gold); background: rgba(0,0,0,.4);
  color: var(--gold-2); font-size: 22px;
  display: flex; align-items: center; justify-content: center;
}

/* News */
.news { background: linear-gradient(180deg, #0b0a0f, var(--bg)); }
.news-grid { display: grid; grid-template-columns: 1.2fr .8fr; gap: 24px; }
.news-list, .event-list { border: 1px solid var(--line); background: var(--bg-2); }
.block-title {
  padding: 16px 20px; border-bottom: 1px solid var(--line);
  font-family: var(--serif); letter-spacing: .2em; color: var(--gold);
}
.news-item, .event-item {
  display: grid; grid-template-columns: 108px 1fr; gap: 12px;
  padding: 16px 20px; border-bottom: 1px solid rgba(212,177,91,.1);
}
.news-item:hover h4, .event-item:hover h4 { color: var(--gold-2); }
.news-item time, .event-item time { color: var(--gold-3); font-size: 12px; letter-spacing: .06em; }
.news-item h4, .event-item h4 { font-size: 15px; font-weight: 500; margin-bottom: 4px; }
.news-item p, .event-item p { color: var(--muted); font-size: 13px; }
.tag { display: inline-block; font-size: 11px; letter-spacing: .08em; color: var(--fire-2); margin-right: 6px; }
.sample { color: var(--gold-3); font-size: 11px; }

/* Media */
.media { background: var(--bg); }
.media-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px;
}
.media-item {
  position: relative; aspect-ratio: 16/9; overflow: hidden;
  border: 1px solid var(--line); cursor: pointer; background: #000;
}
.media-item img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
.media-item:hover img { transform: scale(1.05); }
.media-item.is-video::after {
  content: "▶";
  position: absolute; right: 10px; bottom: 8px;
  color: var(--gold-2); font-size: 12px;
  background: rgba(0,0,0,.5); padding: 2px 8px; border: 1px solid var(--line);
}

/* Footer */
.footer {
  border-top: 1px solid var(--line);
  background: #050506;
  padding: 48px 0 28px;
  color: var(--muted); font-size: 12px; line-height: 1.9;
}
.footer h4 { color: var(--gold); letter-spacing: .16em; font-family: var(--serif); margin-bottom: 8px; font-size: 14px; }
.foot-grid { display: grid; grid-template-columns: 1.2fr 1fr; gap: 32px; margin-bottom: 28px; }
.foot-meta { text-align: center; border-top: 1px solid rgba(212,177,91,.12); padding-top: 18px; color: #6a6458; }
.warn { color: #c9bfae; }

/* Lightbox / modal */
.overlay {
  position: fixed; inset: 0; z-index: 70;
  background: rgba(0,0,0,.86);
  display: none; align-items: center; justify-content: center;
  padding: 24px;
}
.overlay.open { display: flex; }
.overlay .box {
  max-width: min(1100px, 100%);
  max-height: 90vh;
}
.overlay img, .overlay video { max-height: 82vh; max-width: 100%; margin: 0 auto; }
.overlay .cap { text-align: center; margin-top: 10px; color: var(--gold-2); letter-spacing: .1em; }
.overlay .close {
  position: absolute; top: 16px; right: 22px;
  font-size: 28px; color: var(--gold-2);
}
.modal {
  width: min(440px, 100%);
  background: #141218;
  border: 1px solid var(--gold);
  padding: 36px 28px 28px;
  text-align: center;
}
.modal h3 { font-family: var(--serif); letter-spacing: .2em; color: var(--gold-2); margin-bottom: 12px; font-size: 26px; }
.modal p { color: var(--ink); line-height: 1.8; margin-bottom: 22px; }

/* Reveal */
.reveal { opacity: 0; transform: translateY(22px); animation: none; }
.reveal.in { animation: rise .7s ease forwards; }
@keyframes rise { to { opacity: 1; transform: none; } }

@media (prefers-reduced-motion: reduce) {
  .reveal, .reveal.in, .scroll-hint { animation: none; opacity: 1; transform: none; }
  html { scroll-behavior: auto; }
}

@media (max-width: 980px) {
  .nav { padding: 0 16px; backdrop-filter: none; background: rgba(7,7,10,.96); overflow: visible; }
  .nav-links {
    display: none; position: fixed; top: var(--nav-h); left: 0; right: 0; bottom: 0;
    flex-direction: column; justify-content: flex-start;
    background: #07070a;
    padding: 24px 0 40px; border-bottom: 1px solid var(--line);
    z-index: 60;
  }
  .nav-links a { font-size: 16px; padding: 14px 12px; }
  .nav-links.open { display: flex; }
  .nav-toggle { display: block; }
  .feat-grid { grid-template-columns: 1fr; }
  .feat-card, .feat-card:nth-child(4), .feat-card:nth-child(5) { grid-column: span 1; }
  .class-pane.active, .map-layout, .video-grid, .news-grid, .foot-grid, .media-grid {
    grid-template-columns: 1fr;
  }
  .media-grid { grid-template-columns: 1fr 1fr; }
  .class-visual img, .class-visual video { height: 280px; }
  .skill-list { grid-template-columns: 1fr; }
  .hero-title { letter-spacing: .12em; text-indent: .12em; }
  .wrap { width: min(1200px, calc(100% - 28px)); }
}

.nowrap { white-space: nowrap; }
@media (max-width: 980px) {
  .hero-sub { letter-spacing: .08em; max-width: 18em; margin-left: auto; margin-right: auto; }
}


/* Client downloads */
.dl-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}
.dl-card {
  border: 1px solid var(--line);
  background: rgba(0,0,0,.35);
  padding: 28px 22px 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-height: 100%;
}
.dl-card h3 {
  font-family: var(--serif);
  color: var(--gold);
  letter-spacing: .12em;
  font-size: 20px;
}
.dl-card p { color: #c9c0b0; line-height: 1.7; font-size: 14px; }
.dl-card .size { color: #8a8276; font-size: 13px; }
.dl-card .btn { margin-top: auto; text-align: center; }
.dl-note { margin-top: 28px; color: #9a9284; line-height: 1.9; font-size: 14px; }
.dl-note code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12px;
  color: var(--gold-2);
  background: rgba(0,0,0,.35);
  padding: 1px 6px;
}
.dl-note a { color: var(--gold-2); text-decoration: underline; text-underline-offset: 3px; }
@media (max-width: 980px) {
  .dl-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
  .dl-grid { grid-template-columns: 1fr; }
}
