:root {
  --ink: #1b0702;
  --paper: #fff8dc;
  --gold: #ffc247;
  --bright-gold: #ffe06b;
  --red: #e31b16;
  --deep-red: #7e0b05;
  --jade: #39a935;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--paper);
  background:
    radial-gradient(circle at 24% 0%, rgba(227, 27, 22, 0.28), transparent 34%),
    linear-gradient(180deg, #260801 0%, var(--ink) 100%);
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  overflow-x: hidden;
}

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

.hero {
  position: relative;
  min-height: 92svh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  isolation: isolate;
}

.hero-image,
.shade {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.hero-image {
  object-fit: cover;
  object-position: 42% center;
  z-index: -3;
  transform: scale(1.02);
  filter: saturate(1.28) contrast(1.08) brightness(1.08);
}

.shade {
  z-index: -2;
  background:
    radial-gradient(circle at 88% 14%, rgba(255, 224, 107, 0.36), transparent 18%),
    radial-gradient(circle at 22% 54%, rgba(227, 27, 22, 0.24), transparent 32%),
    linear-gradient(90deg, rgba(25, 5, 1, 0.62) 0%, rgba(86, 12, 3, 0.28) 47%, rgba(255, 152, 33, 0.08) 100%),
    linear-gradient(0deg, rgba(27, 7, 2, 0.86) 0%, rgba(27, 7, 2, 0) 48%);
}

.nav {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 22px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.brand,
.links,
.actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand {
  font-weight: 900;
  letter-spacing: 0;
  font-size: 20px;
  text-shadow: 0 2px 18px rgba(0, 0, 0, 0.48), 0 0 18px rgba(255, 194, 71, 0.38);
}

.seal {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 2px solid rgba(246, 183, 76, 0.9);
  background: linear-gradient(145deg, var(--red), var(--deep-red));
  color: var(--bright-gold);
  font-family: "Ma Shan Zheng", serif;
  font-size: 28px;
  line-height: 1;
  box-shadow: 0 0 28px rgba(227, 27, 22, 0.5), inset 0 0 16px rgba(255, 224, 107, 0.22);
}

.links a,
.button {
  border: 1px solid rgba(255, 244, 213, 0.34);
  background: rgba(62, 13, 5, 0.52);
  backdrop-filter: blur(12px);
  min-height: 42px;
  padding: 0 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.24);
}

.links a:hover,
.button:hover {
  border-color: rgba(246, 183, 76, 0.95);
}

.hero-copy {
  width: min(1180px, calc(100% - 32px));
  margin: auto auto 96px;
}

.meta,
.kicker {
  margin: 0 0 12px;
  color: var(--gold);
  font-weight: 900;
  text-transform: uppercase;
  font-size: 14px;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  max-width: 760px;
  margin-bottom: 18px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  line-height: 0.9;
  font-size: clamp(72px, 11vw, 154px);
  letter-spacing: 0;
  text-shadow: 0 7px 32px rgba(0, 0, 0, 0.58), 0 0 34px rgba(255, 194, 71, 0.25);
}

.china {
  color: var(--bright-gold);
  font-family: "Ma Shan Zheng", serif;
  font-size: 0.7em;
  font-weight: 400;
  text-shadow: 0 0 24px rgba(255, 194, 71, 0.56), 0 4px 18px rgba(0, 0, 0, 0.55);
}

.tagline {
  max-width: 650px;
  margin-bottom: 28px;
  color: rgba(255, 244, 213, 0.9);
  font-size: clamp(21px, 3vw, 36px);
  font-weight: 800;
  line-height: 1.12;
  text-shadow: 0 4px 22px rgba(0, 0, 0, 0.48);
}

.button {
  min-width: 150px;
  min-height: 52px;
  font-size: 15px;
}

.button.primary {
  border-color: var(--bright-gold);
  background: linear-gradient(135deg, var(--bright-gold), #ff9f1c);
  color: var(--ink);
  box-shadow: 0 12px 30px rgba(255, 159, 28, 0.34), 0 0 26px rgba(255, 194, 71, 0.28);
}

.button.ghost {
  color: var(--paper);
  border-color: rgba(255, 224, 107, 0.55);
  background: rgba(126, 11, 5, 0.42);
}

.banner {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  align-items: center;
  min-height: 46px;
  color: var(--ink);
  background: linear-gradient(90deg, var(--bright-gold), #ff991f, var(--bright-gold));
  border-top: 4px solid #ff2b19;
  box-shadow: 0 -8px 30px rgba(227, 27, 22, 0.34);
  overflow: hidden;
  font-weight: 900;
  white-space: nowrap;
}

.banner-track {
  display: flex;
  flex: 0 0 max-content;
  gap: 32px;
  align-items: center;
  padding: 0 32px;
  animation: banner-marquee 22s linear infinite;
}

.banner-track span:nth-child(4n + 1) {
  font-family: "Ma Shan Zheng", serif;
  font-size: 27px;
  font-weight: 400;
}

@keyframes banner-marquee {
  from {
    transform: translateX(0);
  }

  to {
    transform: translateX(-100%);
  }
}

.story {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 66px 0;
  display: grid;
  grid-template-columns: 0.55fr 1.2fr 1fr;
  gap: 32px;
  align-items: center;
  position: relative;
}

.story::before {
  content: "";
  position: absolute;
  inset: 26px -22px auto auto;
  width: min(36vw, 360px);
  height: min(36vw, 360px);
  background: radial-gradient(circle, rgba(227, 27, 22, 0.28), transparent 68%);
  pointer-events: none;
}

.story-mark {
  color: var(--red);
  font-family: "Ma Shan Zheng", serif;
  font-size: clamp(86px, 12vw, 160px);
  line-height: 0.8;
  text-shadow: 0 0 24px rgba(227, 27, 22, 0.52);
}

h2 {
  margin-bottom: 0;
  font-size: clamp(34px, 5vw, 76px);
  line-height: 0.95;
}

.story p:last-child {
  margin-bottom: 0;
  color: rgba(255, 248, 220, 0.86);
  font-size: 20px;
  line-height: 1.45;
  font-weight: 700;
}

.lore,
.dynasty,
.timeline,
.scrolls {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 74px 0;
}

.section-head {
  max-width: 860px;
  margin-bottom: 34px;
}

.section-head.compact {
  max-width: 680px;
}

.section-head p:last-child {
  margin: 18px 0 0;
  color: rgba(255, 248, 220, 0.78);
  font-size: clamp(19px, 2.4vw, 28px);
  line-height: 1.28;
  font-weight: 800;
}

.lore-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.lore-card,
.steps article,
.rules div {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(255, 224, 107, 0.34);
  background:
    linear-gradient(145deg, rgba(126, 11, 5, 0.72), rgba(36, 8, 2, 0.82)),
    radial-gradient(circle at top right, rgba(255, 224, 107, 0.28), transparent 48%);
  padding: 26px;
  box-shadow: 0 18px 46px rgba(0, 0, 0, 0.26);
}

.lore-card.bright {
  background:
    linear-gradient(145deg, rgba(227, 27, 22, 0.82), rgba(126, 11, 5, 0.82)),
    radial-gradient(circle at top right, rgba(255, 224, 107, 0.4), transparent 50%);
}

.card-mark {
  display: inline-grid;
  place-items: center;
  width: 44px;
  height: 44px;
  margin-bottom: 34px;
  border: 1px solid rgba(255, 224, 107, 0.7);
  color: var(--bright-gold);
  font-family: "Ma Shan Zheng", serif;
  font-size: 28px;
  background: rgba(27, 7, 2, 0.42);
}

h3 {
  margin-bottom: 12px;
  color: var(--bright-gold);
  font-size: 24px;
  line-height: 1.05;
}

.lore-card p,
.steps p,
.rules p {
  margin-bottom: 0;
  color: rgba(255, 248, 220, 0.8);
  font-size: 17px;
  line-height: 1.42;
  font-weight: 700;
}

.dynasty {
  display: grid;
  grid-template-columns: 0.85fr 1.4fr;
  gap: 40px;
  align-items: start;
  border-top: 1px solid rgba(255, 224, 107, 0.2);
  border-bottom: 1px solid rgba(255, 224, 107, 0.2);
}

.rules {
  display: grid;
  gap: 14px;
}

.rules div {
  display: grid;
  grid-template-columns: 86px 1fr;
  gap: 18px;
  align-items: center;
  padding: 20px;
}

.rules strong,
.steps span {
  color: var(--bright-gold);
  font-size: 26px;
  font-weight: 900;
  text-shadow: 0 0 20px rgba(255, 194, 71, 0.34);
}

.steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}

.steps article {
  min-height: 250px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.steps span {
  display: block;
  margin-bottom: 34px;
  font-size: 14px;
  text-transform: uppercase;
}

.scrolls {
  margin-bottom: 34px;
  text-align: center;
  background:
    radial-gradient(circle at 50% 0%, rgba(255, 224, 107, 0.28), transparent 44%),
    linear-gradient(145deg, rgba(227, 27, 22, 0.3), rgba(126, 11, 5, 0.18));
}

.scrolls p {
  margin-bottom: 8px;
  color: var(--bright-gold);
  font-family: "Ma Shan Zheng", serif;
  font-size: clamp(58px, 10vw, 132px);
  line-height: 0.85;
  text-shadow: 0 0 34px rgba(255, 194, 71, 0.46);
}

.scrolls h2 {
  max-width: 860px;
  margin: 0 auto 28px;
}

@media (max-width: 760px) {
  .hero {
    min-height: 90svh;
  }

  .hero-image {
    object-position: 30% center;
  }

  .shade {
    background:
      radial-gradient(circle at 78% 18%, rgba(255, 224, 107, 0.28), transparent 22%),
      linear-gradient(0deg, rgba(27, 7, 2, 0.92) 0%, rgba(27, 7, 2, 0.18) 64%),
      linear-gradient(90deg, rgba(25, 5, 1, 0.58) 0%, rgba(86, 12, 3, 0.08) 100%);
  }

  .nav {
    align-items: flex-start;
  }

  .links {
    gap: 8px;
  }

  .links a {
    min-height: 38px;
    padding: 0 12px;
    font-size: 14px;
  }

  .links a[href="#lore"] {
    display: none;
  }

  .hero-copy {
    width: min(340px, calc(100% - 32px));
    margin: auto 16px 82px;
  }

  h1 {
    font-size: clamp(56px, 18vw, 74px);
  }

  .actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    width: 100%;
    gap: 10px;
  }

  .button {
    min-width: 0;
    padding: 0 8px;
    font-size: 13px;
    white-space: nowrap;
  }

  .tagline {
    max-width: 100%;
    font-size: 20px;
  }

  .story {
    grid-template-columns: 1fr;
    gap: 20px;
    padding: 48px 0;
  }

  .lore,
  .dynasty,
  .timeline,
  .scrolls {
    padding: 50px 0;
  }

  .lore-grid,
  .dynasty,
  .steps {
    grid-template-columns: 1fr;
  }

  .rules div {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .steps article {
    min-height: 210px;
  }
}
