:root {
  --paper: #f2eee4;
  --ink: #171914;
  --muted: #67685f;
  --line: rgba(23, 25, 20, 0.16);
  --lime: #cce94f;
  --coral: #f18669;
  --teal: #1b716b;
  --blue: #4b72d9;
  --card: #fbf9f3;
  --shadow: 0 24px 60px rgba(31, 29, 20, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  min-width: 320px;
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 85% 12%, rgba(204, 233, 79, 0.2), transparent 25rem),
    radial-gradient(circle at 5% 44%, rgba(241, 134, 105, 0.12), transparent 22rem),
    var(--paper);
  font-family: "Microsoft YaHei UI", "PingFang SC", "Noto Sans SC", sans-serif;
  -webkit-font-smoothing: antialiased;
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  content: "";
  opacity: 0.35;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 140 140' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.07'/%3E%3C/svg%3E");
}

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

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

.skip-link {
  position: fixed;
  top: 0.75rem;
  left: 0.75rem;
  z-index: 100;
  padding: 0.75rem 1rem;
  color: #fff;
  background: var(--ink);
  border-radius: 999px;
  transform: translateY(-180%);
}

.skip-link:focus {
  transform: translateY(0);
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: min(1180px, calc(100% - 2.5rem));
  margin: 0 auto;
  padding: 1.7rem 0;
  border-bottom: 1px solid var(--line);
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.8rem;
}

.logo-mark {
  display: grid;
  grid-template-columns: repeat(3, 0.38rem);
  align-items: end;
  gap: 0.18rem;
  width: 1.6rem;
  height: 1.6rem;
  padding: 0.35rem;
  background: var(--ink);
  border-radius: 0.45rem;
  transform: rotate(-5deg);
}

.logo-mark i {
  display: block;
  height: 65%;
  background: var(--lime);
  border-radius: 0.15rem;
}

.logo-mark i:nth-child(2) {
  height: 100%;
}

.logo-mark i:nth-child(3) {
  height: 45%;
}

.logo-copy {
  display: grid;
  gap: 0.1rem;
}

.logo-copy b {
  font-size: 1.1rem;
  letter-spacing: 0.06em;
}

.logo-copy small {
  color: var(--muted);
  font-size: 0.6rem;
  font-weight: 800;
  letter-spacing: 0.16em;
}

.free-chip {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0;
  padding: 0.55rem 0.8rem;
  color: #3f4a13;
  background: rgba(204, 233, 79, 0.35);
  border: 1px solid rgba(91, 110, 15, 0.22);
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 800;
}

.free-chip i,
.availability i {
  width: 0.46rem;
  height: 0.46rem;
  background: #759600;
  border-radius: 50%;
  box-shadow: 0 0 0 0.22rem rgba(117, 150, 0, 0.13);
}

main {
  width: min(1180px, calc(100% - 2.5rem));
  margin: 0 auto;
}

.hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(22rem, 0.82fr);
  align-items: center;
  min-height: 41rem;
  padding: 4.5rem 0 5.5rem;
}

.hero-copy {
  position: relative;
  z-index: 2;
}

.eyebrow,
.section-kicker,
.card-kicker {
  margin: 0;
  font-size: 0.7rem;
  font-weight: 900;
  letter-spacing: 0.13em;
}

.eyebrow {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  color: var(--muted);
}

.eyebrow span {
  display: inline-grid;
  width: 2rem;
  height: 2rem;
  place-items: center;
  color: var(--paper);
  background: var(--ink);
  border-radius: 50%;
  letter-spacing: 0;
}

.hero h1 {
  max-width: 760px;
  margin: 1.1rem 0 1.5rem;
  font-family: "Microsoft YaHei", "PingFang SC", sans-serif;
  font-size: clamp(4rem, 8.2vw, 7.7rem);
  font-weight: 900;
  line-height: 0.92;
  letter-spacing: -0.075em;
}

.hero h1 em {
  color: var(--teal);
  font-style: normal;
  white-space: nowrap;
}

.hero-lead {
  margin: 0;
  color: var(--muted);
  font-size: clamp(1rem, 1.6vw, 1.22rem);
  line-height: 1.85;
}

.hero-actions {
  display: flex;
  align-items: center;
  gap: 1.2rem;
  margin-top: 2.2rem;
}

.primary-action {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.2rem;
  min-width: 9.2rem;
  padding: 0.9rem 0.95rem 0.9rem 1.2rem;
  color: #fff;
  background: var(--ink);
  border-radius: 0.7rem;
  font-weight: 800;
  box-shadow: 0 0.65rem 0 var(--lime);
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.primary-action span {
  display: grid;
  width: 2rem;
  height: 2rem;
  place-items: center;
  color: var(--ink);
  background: var(--lime);
  border-radius: 50%;
}

.primary-action:hover,
.primary-action:focus-visible {
  box-shadow: 0 0.3rem 0 var(--lime);
  transform: translateY(0.34rem);
}

.hero-actions p {
  margin: 0;
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 700;
}

.hero-orbit {
  position: relative;
  width: min(34rem, 39vw);
  aspect-ratio: 1;
  justify-self: end;
}

.orbit-ring {
  position: absolute;
  border: 1px solid rgba(23, 25, 20, 0.22);
  border-radius: 50%;
}

.orbit-ring-one {
  inset: 8%;
  animation: orbit 24s linear infinite;
}

.orbit-ring-two {
  inset: 20%;
  border-style: dashed;
  animation: orbit 18s linear infinite reverse;
}

.orbit-ring-one::after,
.orbit-ring-two::after {
  position: absolute;
  top: -0.35rem;
  left: 50%;
  width: 0.7rem;
  height: 0.7rem;
  content: "";
  background: var(--coral);
  border-radius: 50%;
  box-shadow: 0 0 0 0.35rem var(--paper);
}

.orbit-ring-two::after {
  top: auto;
  right: 8%;
  bottom: 16%;
  left: auto;
  width: 0.45rem;
  height: 0.45rem;
  background: var(--blue);
}

.orbit-planet {
  position: absolute;
  display: block;
  border-radius: 50%;
  box-shadow: inset -0.9rem -1rem 0 rgba(0, 0, 0, 0.12);
}

.planet-one {
  top: 18%;
  left: 16%;
  width: 4.2rem;
  height: 4.2rem;
  background: var(--coral);
}

.planet-two {
  right: 4%;
  bottom: 26%;
  width: 7.2rem;
  height: 7.2rem;
  background: var(--teal);
}

.planet-three {
  bottom: 2%;
  left: 25%;
  width: 2.3rem;
  height: 2.3rem;
  background: var(--blue);
}

.hero-stamp {
  position: absolute;
  top: 50%;
  left: 50%;
  display: grid;
  width: 9.7rem;
  aspect-ratio: 1;
  place-items: center;
  color: var(--ink);
  background: var(--lime);
  border: 0.42rem solid var(--ink);
  border-radius: 50%;
  font-family: "Arial Black", "Microsoft YaHei", sans-serif;
  font-size: 1.75rem;
  font-weight: 900;
  line-height: 0.9;
  letter-spacing: -0.06em;
  text-align: center;
  transform: translate(-50%, -50%) rotate(9deg);
  box-shadow: 0.65rem 0.75rem 0 rgba(23, 25, 20, 0.13);
}

.hero-index {
  position: absolute;
  right: 0;
  bottom: 1.2rem;
  display: flex;
  align-items: center;
  gap: 0.7rem;
  color: var(--muted);
}

.hero-index span {
  color: var(--ink);
  font-family: Georgia, serif;
  font-size: 2.8rem;
  font-style: italic;
}

.hero-index i {
  width: 3.5rem;
  height: 1px;
  background: var(--line);
}

.hero-index p {
  margin: 0;
  font-size: 0.6rem;
  font-weight: 900;
  line-height: 1.35;
  letter-spacing: 0.12em;
}

@keyframes orbit {
  to {
    transform: rotate(1turn);
  }
}

.game-section {
  padding: 4.8rem 0 3.2rem;
  border-top: 1px solid var(--line);
}

.section-heading {
  display: grid;
  grid-template-columns: 0.65fr 1fr 1fr;
  align-items: end;
  gap: 2rem;
  margin-bottom: 2.6rem;
}

.section-kicker {
  color: var(--teal);
}

.section-heading h2,
.play-note h2 {
  margin: 0;
  font-size: clamp(2rem, 4vw, 3.5rem);
  line-height: 1;
  letter-spacing: -0.06em;
}

.section-heading > p:last-child {
  max-width: 28rem;
  justify-self: end;
  margin: 0;
  color: var(--muted);
  line-height: 1.75;
}

.game-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.25rem;
}

.game-card {
  overflow: hidden;
  background: var(--card);
  border: 1px solid rgba(23, 25, 20, 0.13);
  border-radius: 1.1rem;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.85) inset;
  transition: transform 220ms ease, box-shadow 220ms ease;
}

.game-card:hover {
  box-shadow: var(--shadow);
  transform: translateY(-0.4rem);
}

.game-card-wide {
  display: grid;
  grid-column: 1 / -1;
  grid-template-columns: minmax(0, 1.35fr) minmax(21rem, 0.65fr);
}

.card-art {
  position: relative;
  display: block;
  min-height: 22rem;
  overflow: hidden;
  background: #d8d0bb;
}

.game-card-wide .card-art {
  min-height: 30rem;
}

.card-art img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 600ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

.game-card:hover .card-art img {
  transform: scale(1.025);
}

.kart-art::after,
.dual-art::after {
  position: absolute;
  inset: 0;
  content: "";
  pointer-events: none;
  background: linear-gradient(180deg, rgba(23, 25, 20, 0.05), transparent 45%, rgba(23, 25, 20, 0.3));
}

.dual-art img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 155%;
  object-position: 50% 0;
}

.game-card:hover .dual-art img {
  transform: scale(1.025);
  transform-origin: 50% 0;
}

.number-badge {
  position: absolute;
  top: 1rem;
  left: 1rem;
  z-index: 2;
  display: grid;
  width: 2.65rem;
  height: 2.65rem;
  place-items: center;
  color: var(--paper);
  background: rgba(23, 25, 20, 0.86);
  border: 1px solid rgba(255, 255, 255, 0.34);
  border-radius: 50%;
  font-family: Georgia, serif;
  font-size: 1.05rem;
  font-style: italic;
  backdrop-filter: blur(0.6rem);
}

.play-orb {
  position: absolute;
  right: 1.15rem;
  bottom: 1.15rem;
  z-index: 2;
  display: grid;
  width: 3.8rem;
  height: 3.8rem;
  place-items: center;
  padding-left: 0.17rem;
  color: var(--ink);
  background: var(--lime);
  border-radius: 50%;
  font-size: 1rem;
  box-shadow: 0 0.65rem 1.8rem rgba(23, 25, 20, 0.24);
  transition: transform 220ms ease;
}

.game-card:hover .play-orb,
.card-art:focus-visible .play-orb {
  transform: scale(1.08) rotate(-8deg);
}

.card-copy {
  display: flex;
  flex-direction: column;
  padding: 1.65rem;
}

.game-card-wide .card-copy {
  justify-content: center;
  padding: clamp(1.7rem, 4vw, 3.1rem);
}

.card-topline {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
}

.availability {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin: 0;
  color: var(--muted);
  font-size: 0.66rem;
  font-weight: 800;
}

.availability i {
  width: 0.35rem;
  height: 0.35rem;
}

.card-kicker {
  color: var(--teal);
}

.card-copy h3 {
  margin: 1.4rem 0 0;
  font-size: clamp(2rem, 3vw, 3rem);
  line-height: 1;
  letter-spacing: -0.07em;
}

.card-subtitle {
  margin: 0.55rem 0 0;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
}

.card-description {
  margin: 1.3rem 0 0;
  color: #55574f;
  font-size: 0.9rem;
  line-height: 1.75;
}

.card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.42rem;
  margin-top: 1.3rem;
}

.card-tags span {
  padding: 0.36rem 0.58rem;
  color: #515447;
  background: #ede9dc;
  border: 1px solid rgba(23, 25, 20, 0.08);
  border-radius: 999px;
  font-size: 0.65rem;
  font-weight: 800;
}

.card-cta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 1.5rem;
  padding-top: 1.1rem;
  border-top: 1px solid var(--line);
  font-size: 0.82rem;
  font-weight: 900;
}

.card-cta span {
  font-size: 1.05rem;
  transition: transform 180ms ease;
}

.card-cta:hover span {
  transform: translate(0.15rem, -0.15rem);
}

.relic-art {
  isolation: isolate;
  background:
    linear-gradient(180deg, #e5f2e6 0%, #7eb4a3 66%, #274d44 66%, #172d28 100%);
}

.relic-sky {
  position: absolute;
  inset: 0 0 34%;
  z-index: -1;
  opacity: 0.75;
  background:
    radial-gradient(circle at 72% 28%, rgba(255, 247, 187, 0.85) 0 7%, transparent 7.5%),
    linear-gradient(180deg, #d5e9dd, #63a795);
}

.relic-sky::before,
.relic-sky::after {
  position: absolute;
  right: -6%;
  bottom: 0;
  left: -6%;
  height: 42%;
  content: "";
  background: #386d5b;
  clip-path: polygon(0 100%, 0 62%, 11% 42%, 20% 68%, 31% 20%, 42% 64%, 55% 36%, 64% 68%, 77% 13%, 87% 52%, 100% 30%, 100% 100%);
}

.relic-sky::after {
  bottom: 18%;
  height: 28%;
  background: rgba(20, 64, 54, 0.32);
  transform: scaleX(-1);
}

.relic-ground {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: 33%;
  background:
    linear-gradient(90deg, transparent 0 11%, rgba(255, 255, 255, 0.08) 11% 12%, transparent 12% 26%, rgba(0, 0, 0, 0.09) 26% 27%, transparent 27%),
    #284c3f;
  box-shadow: inset 0 0.6rem 0 #b67b48;
}

.relic-column {
  position: absolute;
  bottom: 23%;
  width: 3.1rem;
  height: 38%;
  background:
    linear-gradient(90deg, rgba(0, 0, 0, 0.18) 0 18%, transparent 18% 78%, rgba(0, 0, 0, 0.2) 78%),
    #76685a;
  border: 0.35rem solid #423b35;
  box-shadow: 0.7rem 0 0 rgba(17, 31, 27, 0.18);
}

.relic-column::before,
.relic-column::after {
  position: absolute;
  left: 50%;
  width: 5.5rem;
  height: 0.65rem;
  content: "";
  background: #9a8b77;
  border: 0.28rem solid #423b35;
  transform: translateX(-50%);
}

.relic-column::before {
  top: -0.75rem;
}

.relic-column::after {
  bottom: -0.75rem;
}

.relic-column-one {
  left: 12%;
}

.relic-column-two {
  right: 10%;
  height: 29%;
}

.relic-crystal {
  position: absolute;
  top: 25%;
  left: 50%;
  color: #8ff1e0;
  font-size: clamp(5rem, 11vw, 8rem);
  line-height: 1;
  text-shadow:
    0 0 1rem rgba(143, 241, 224, 0.8),
    0 0 3rem rgba(143, 241, 224, 0.45);
  filter: drop-shadow(0 0.35rem 0 #1e5655);
  transform: translateX(-50%);
  animation: crystal 2.8s ease-in-out infinite;
}

.relic-hero {
  position: absolute;
  bottom: 29%;
  left: 31%;
  width: 3.5rem;
  height: 3.5rem;
  background-image: url("games/relic-rush/assets/tilemap-characters_packed.png");
  background-repeat: no-repeat;
  background-size: 1100% 300%;
  background-position: 0 0;
  filter: drop-shadow(0.35rem 0.5rem 0 rgba(0, 0, 0, 0.26));
  image-rendering: pixelated;
  transform: scale(1.2);
  animation: hero-float 2s ease-in-out infinite;
}

@keyframes crystal {
  50% {
    text-shadow:
      0 0 1.5rem rgba(143, 241, 224, 0.95),
      0 0 4rem rgba(143, 241, 224, 0.55);
    transform: translate(-50%, -0.7rem) rotate(4deg);
  }
}

@keyframes hero-float {
  50% {
    transform: translateY(-0.35rem) scale(1.2);
  }
}

.play-note {
  display: grid;
  grid-template-columns: 0.8fr 1fr;
  gap: 3rem;
  margin: 4rem 0 5rem;
  padding: 2.8rem;
  color: #eef4df;
  background:
    radial-gradient(circle at 84% 18%, rgba(204, 233, 79, 0.24), transparent 13rem),
    var(--ink);
  border-radius: 1.1rem;
}

.play-note .section-kicker {
  margin-bottom: 1rem;
  color: var(--lime);
}

.note-columns {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.1rem;
}

.note-columns p {
  margin: 0;
  padding: 1.1rem;
  color: #b8bca9;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 0.75rem;
  font-size: 0.85rem;
  line-height: 1.7;
}

.note-columns b {
  display: block;
  margin-bottom: 0.4rem;
  color: #fff;
  font-size: 0.95rem;
}

footer {
  display: flex;
  justify-content: space-between;
  gap: 2rem;
  width: min(1180px, calc(100% - 2.5rem));
  margin: 0 auto;
  padding: 1.5rem 0 2.5rem;
  color: var(--muted);
  border-top: 1px solid var(--line);
  font-size: 0.72rem;
  line-height: 1.6;
}

footer p {
  margin: 0;
}

footer a {
  color: var(--ink);
  font-weight: 800;
  text-decoration: underline;
  text-underline-offset: 0.2rem;
}

@media (max-width: 900px) {
  .hero {
    grid-template-columns: 1fr;
    min-height: 0;
    padding-top: 3.6rem;
  }

  .hero-orbit {
    position: absolute;
    top: 3rem;
    right: -9rem;
    width: 25rem;
    opacity: 0.2;
  }

  .hero-copy {
    max-width: 39rem;
  }

  .hero-index {
    display: none;
  }

  .game-card-wide {
    grid-template-columns: minmax(0, 1.15fr) minmax(18rem, 0.85fr);
  }

  .game-card-wide .card-art {
    min-height: 25rem;
  }

  .section-heading {
    grid-template-columns: 1fr 1fr;
  }

  .section-heading > p:last-child {
    grid-column: 2;
    justify-self: start;
  }

  .play-note {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
}

@media (max-width: 700px) {
  .site-header,
  main,
  footer {
    width: min(100% - 1.25rem, 38rem);
  }

  .site-header {
    padding: 1.1rem 0;
  }

  .free-chip {
    padding: 0.48rem 0.64rem;
    font-size: 0.68rem;
  }

  .logo-copy small {
    display: none;
  }

  .hero {
    padding: 3.2rem 0 4rem;
  }

  .hero-orbit {
    display: none;
  }

  .hero h1 {
    margin-top: 1.3rem;
    font-size: clamp(3.25rem, 16vw, 5.5rem);
  }

  .desktop-break {
    display: none;
  }

  .hero-actions {
    align-items: flex-start;
    flex-direction: column;
    gap: 0.9rem;
  }

  .game-section {
    padding-top: 3.3rem;
  }

  .section-heading {
    display: block;
  }

  .section-heading h2 {
    margin-top: 0.55rem;
  }

  .section-heading > p:last-child {
    margin-top: 0.9rem;
  }

  .game-grid,
  .game-card-wide {
    display: block;
  }

  .game-card {
    margin-bottom: 1rem;
  }

  .card-art,
  .game-card-wide .card-art {
    min-height: 0;
    aspect-ratio: 16 / 10;
  }

  .card-copy,
  .game-card-wide .card-copy {
    padding: 1.35rem;
  }

  .card-topline {
    align-items: flex-start;
    flex-direction: column;
    gap: 0.4rem;
  }

  .card-copy h3 {
    margin-top: 1rem;
  }

  .play-note {
    margin: 2.8rem 0 3rem;
    padding: 1.5rem;
  }

  .note-columns {
    grid-template-columns: 1fr;
  }

  footer {
    align-items: flex-start;
    flex-direction: column;
    gap: 0.5rem;
  }
}

@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;
  }
}
