:root {
  --ink: #112841;
  --blue: #388ee8;
  --green: #24ae72;
  --page-width: min(calc(100% - 40px), 1544px);
  font-family: "Noto Sans SC", "Microsoft YaHei", "PingFang SC", system-ui, sans-serif;
  color: var(--ink);
  text-rendering: optimizeLegibility;
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: 108px;
}

html,
body {
  scrollbar-width: none;
  -ms-overflow-style: none;
}

html::-webkit-scrollbar,
body::-webkit-scrollbar {
  display: none;
  width: 0;
  height: 0;
}

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  background:
    linear-gradient(180deg, rgba(237, 249, 255, 0.12), rgba(255, 255, 255, 0.06)),
    url("../assets/site-background.png") center top / cover fixed no-repeat,
    #dff3ff;
}

body.is-menu-open { overflow: hidden; }

a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
button { color: inherit; font: inherit; }

:focus-visible {
  outline: 3px solid rgba(47, 137, 235, 0.58);
  outline-offset: 4px;
}

.skip-link {
  position: fixed;
  top: 8px;
  left: 8px;
  z-index: 100;
  padding: 9px 14px;
  color: #fff;
  background: var(--ink);
  border-radius: 10px;
  transform: translateY(-150%);
}

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

.site-header {
  position: absolute;
  top: 14px;
  left: 50%;
  z-index: 20;
  display: flex;
  align-items: center;
  width: var(--page-width);
  height: 78px;
  padding: 0 56px 0 42px;
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid rgba(255, 255, 255, 0.98);
  border-radius: 24px;
  box-shadow: 0 10px 34px rgba(50, 101, 130, 0.11);
  backdrop-filter: blur(20px) saturate(1.2);
  transform: translateX(-50%);
}

.brand {
  margin-right: auto;
  font-size: 27px;
  font-weight: 900;
  letter-spacing: -0.055em;
}

.site-nav {
  display: flex;
  align-items: stretch;
  gap: 84px;
  height: 100%;
}

.site-nav__link {
  position: relative;
  display: grid;
  min-width: 76px;
  place-items: center;
  color: #1d2d40;
  font-size: 17px;
  font-weight: 750;
}

.site-nav__link::after {
  position: absolute;
  bottom: 10px;
  left: 50%;
  width: 26px;
  height: 3px;
  content: "";
  background: #3d8ef0;
  border-radius: 99px;
  opacity: 0;
  transform: translateX(-50%);
}

.site-nav__link:hover::after,
.site-nav__link.is-active::after { opacity: 1; }

.nav-toggle,
.mobile-nav { display: none; }

.products {
  width: min(calc(100% - 80px), 1506px);
  margin: 0 auto;
  padding-top: 160px;
}

.products__intro {
  margin: 0 auto 36px;
  text-align: center;
}

.eyebrow {
  margin: 0 0 17px;
  color: #4194e7;
  font-size: 12px;
  font-weight: 850;
  line-height: 1;
  letter-spacing: 0.42em;
  text-transform: uppercase;
}

.products__intro h1 {
  margin: 0;
  font-family: "Songti SC", "STSong", SimSun, serif;
  font-size: clamp(44px, 3.4vw, 54px);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.045em;
  text-shadow: 0 10px 28px rgba(38, 91, 125, 0.11);
  white-space: nowrap;
}

.title-rule {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-top: 15px;
  color: #82c7f1;
}

.title-rule i {
  width: 205px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(77, 166, 226, 0.55));
}

.title-rule i:last-child {
  background: linear-gradient(90deg, rgba(77, 166, 226, 0.55), transparent);
}

.title-rule span {
  font-size: 22px;
  line-height: 1;
}

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

.game-card {
  --pointer-x: 0;
  --pointer-y: 0;
  position: relative;
  height: clamp(450px, 54vh, 536px);
  overflow: visible;
  isolation: isolate;
  border-radius: 28px;
}

.game-card__scene::after {
  position: absolute;
  inset: 0;
  z-index: 5;
  pointer-events: none;
  content: "";
  border: 1px solid rgba(255, 255, 255, 0.52);
  border-radius: 26px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
}

.game-card__scene {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  isolation: isolate;
  border: 2px solid rgba(255, 255, 255, 0.84);
  border-radius: 28px;
  box-shadow: 0 18px 55px rgba(31, 88, 118, 0.18);
  transition: transform 450ms ease-out;
  will-change: transform;
}

.game-card--garden .game-card__scene {
  border-color: rgba(209, 255, 229, 0.94);
  transform: perspective(1600px) rotateY(11deg) scaleX(1.119);
  transform-origin: left center;
}

.game-card--guardian .game-card__scene {
  border-color: rgba(153, 196, 255, 0.9);
  transform: perspective(1600px) rotateY(-11deg) scaleX(1.119);
  transform-origin: right center;
}

.game-card__background {
  position: absolute;
  inset: -2%;
  z-index: -3;
  width: 104%;
  height: 104%;
  max-width: none;
  object-fit: cover;
  transform: translate(calc(var(--pointer-x) * -5px), calc(var(--pointer-y) * -4px)) scale(1.02);
  transition: transform 450ms ease-out;
}

.game-card--garden .game-card__background { object-position: 52% 52%; }
.game-card--guardian .game-card__background {
  object-position: 50% 34%;
  filter: saturate(1.35) contrast(1.08) brightness(1.02) sepia(0.06);
}

.game-card__wash {
  position: absolute;
  inset: 0;
  z-index: -1;
  border-radius: 26px;
}

.game-card--garden .game-card__wash {
  background:
    linear-gradient(180deg, transparent 38%, rgba(224, 255, 236, 0.12) 56%, rgba(222, 255, 229, 0.93) 100%),
    linear-gradient(90deg, rgba(230, 255, 242, 0.13), transparent 58%);
}

.game-card--guardian .game-card__wash {
  background:
    linear-gradient(180deg, rgba(5, 30, 66, 0.04) 25%, rgba(7, 35, 82, 0.18) 53%, rgba(8, 46, 108, 0.96) 100%),
    linear-gradient(90deg, rgba(7, 36, 78, 0.06), rgba(6, 28, 66, 0.2));
}

.game-card__role {
  position: absolute;
  z-index: 2;
  max-width: none;
  pointer-events: none;
  filter: drop-shadow(0 22px 26px rgba(10, 46, 64, 0.2));
  transform: translate(calc(var(--pointer-x) * 7px), calc(var(--pointer-y) * 4px));
  transition: transform 450ms ease-out;
  user-select: none;
}

.game-card__role--left {
  bottom: -52px;
  left: -125px;
  width: min(68%, 500px);
  clip-path: inset(0 0 52px 0);
}

.game-card__role--right {
  right: -2px;
  bottom: -168px;
  width: min(52%, 385px);
  clip-path: inset(0 0 168px 0);
}

.game-card__content {
  position: absolute;
  bottom: 34px;
  z-index: 3;
  width: 60%;
  text-align: center;
}

.game-card__content--right { right: 24px; }
.game-card__content--left { left: 24px; }

.game-card__title {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 13px;
  margin: 0 0 10px;
}

.game-card__icon {
  flex: 0 0 auto;
  width: 56px;
  height: 56px;
  object-fit: cover;
  border: 2px solid rgba(255, 255, 255, 0.72);
  border-radius: 15px;
  box-shadow: 0 8px 20px rgba(16, 63, 87, 0.2);
}

.game-card__content h2 {
  margin: 0;
  font-family: "Songti SC", "STSong", SimSun, serif;
  font-size: clamp(38px, 3.1vw, 50px);
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.05em;
}

.game-card--garden h2 {
  color: #16734e;
  text-shadow: 0 2px 0 rgba(255, 255, 255, 0.32);
}

.game-card--guardian h2 {
  color: #fff;
  text-shadow: 0 3px 16px rgba(0, 24, 74, 0.55);
}

.game-card__tags {
  display: inline-flex;
  align-items: center;
  margin: 0 0 13px;
  padding: 5px 15px;
  list-style: none;
  border: 1px solid currentColor;
  border-radius: 999px;
}

.game-card__tags li {
  position: relative;
  padding: 0 11px;
  font-size: 13px;
  font-weight: 750;
  line-height: 1.2;
}

.game-card__tags li + li::before {
  position: absolute;
  top: 50%;
  left: 0;
  width: 1px;
  height: 14px;
  content: "";
  background: currentColor;
  opacity: 0.58;
  transform: translateY(-50%);
}

.game-card--garden .game-card__tags { color: #2a9c68; background: rgba(236, 255, 242, 0.22); }
.game-card--guardian .game-card__tags { color: #dcecff; background: rgba(39, 112, 219, 0.2); }

.game-card__action {
  position: relative;
  z-index: 10;
  width: 200px;
  margin: 0 auto;
}

.game-card__cta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 52px;
  width: 200px;
  height: 42px;
  margin: 0;
  padding: 0;
  cursor: pointer;
  appearance: none;
  color: #fff;
  font-size: 16px;
  font-weight: 800;
  border: 1px solid rgba(255, 255, 255, 0.55);
  border-radius: 999px;
  box-shadow: 0 8px 22px rgba(20, 72, 103, 0.16);
}

.game-card--garden .game-card__cta { background: linear-gradient(90deg, #25ad70, #22a866); }
.game-card--guardian .game-card__cta { background: linear-gradient(90deg, #377edd, #3175e7); }

.game-card__cta b {
  font-size: 28px;
  font-weight: 400;
  line-height: 1;
}

.game-card__qr {
  position: absolute;
  bottom: calc(100% + 14px);
  left: 50%;
  z-index: 20;
  width: 150px;
  padding: 10px 10px 9px;
  visibility: hidden;
  background: rgba(255, 255, 255, 0.98);
  border: 1px solid rgba(255, 255, 255, 0.98);
  border-radius: 18px;
  box-shadow: 0 18px 42px rgba(13, 48, 73, 0.3);
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 10px) scale(0.94);
  transition: opacity 180ms ease, transform 180ms ease, visibility 180ms ease;
}

.game-card__qr::after {
  position: absolute;
  bottom: -7px;
  left: 50%;
  width: 14px;
  height: 14px;
  content: "";
  background: #fff;
  transform: translateX(-50%) rotate(45deg);
}

.game-card__qr img {
  width: 128px;
  height: 128px;
  object-fit: cover;
  border-radius: 12px;
}

.game-card__qr p {
  position: relative;
  z-index: 1;
  margin: 7px 0 0;
  color: #263b4f;
  font-size: 13px;
  font-weight: 750;
  line-height: 1.2;
}

.game-card__action:focus-within .game-card__qr,
.game-card__action.is-qr-open .game-card__qr {
  visibility: visible;
  opacity: 1;
  transform: translate(-50%, 0) scale(1);
}

@media (hover: hover) and (pointer: fine) {
  .game-card__action:hover .game-card__qr {
    visibility: visible;
    opacity: 1;
    transform: translate(-50%, 0) scale(1);
  }
}

.contact {
  width: min(calc(100% - 270px), 1312px);
  height: 84px;
  margin: 30px auto 0;
}

.contact__panel {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr);
  height: 100%;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.91);
  border: 1px solid rgba(255, 255, 255, 0.98);
  border-radius: 20px;
  box-shadow: 0 13px 36px rgba(41, 87, 113, 0.12);
  backdrop-filter: blur(18px);
}

.contact-item {
  display: flex;
  align-items: center;
  gap: 17px;
  min-width: 0;
  padding: 0 28px;
  font-size: 16px;
  font-weight: 650;
}

.contact-item + .contact-item { border-left: 1px solid rgba(45, 77, 102, 0.16); }

.contact-item__icon {
  display: grid;
  flex: 0 0 auto;
  width: 42px;
  height: 42px;
  place-items: center;
  color: #fff;
  border-radius: 13px;
}

.contact-item__icon--green { background: linear-gradient(135deg, #31bf7d, #1aab68); }
.contact-item__icon--blue { background: linear-gradient(135deg, #55a5f9, #347de7); }

.contact-item__icon svg {
  width: 24px;
  height: 24px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.contact-item address {
  min-width: 0;
  overflow-wrap: anywhere;
  font-style: normal;
}

.site-footer {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  min-height: 56px;
  margin-top: 28px;
  padding: 0 calc((100% - 1024px) / 2);
  color: rgba(255, 255, 255, 0.9);
  background: linear-gradient(90deg, #337ed4, #2e72d5 55%, #2768c7);
  font-size: 14px;
  box-shadow: 0 -8px 24px rgba(46, 111, 200, 0.1);
}

.site-footer p { margin: 0; text-align: center; }
.site-footer a { border-bottom: 1px solid rgba(255, 255, 255, 0.48); }

[data-reveal] {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 650ms ease, transform 650ms ease;
}

[data-reveal].is-visible { opacity: 1; transform: none; }
.game-card:nth-child(2)[data-reveal] { transition-delay: 80ms; }

@media (max-width: 1180px) {
  .products { width: calc(100% - 36px); }
  .products__intro h1 { white-space: normal; }
  .game-card__role--left { left: -10px; width: 43%; }
  .game-card__role--right { right: -38px; width: 50%; }
  .game-card__content { width: 64%; }
  .contact { width: calc(100% - 80px); }
  .site-footer { padding: 0 10%; }
}

@media (max-width: 820px) {
  html { scroll-padding-top: 86px; }
  body { background-attachment: scroll; }

  .site-header {
    position: fixed;
    top: 10px;
    width: calc(100% - 20px);
    height: 60px;
    padding: 0 14px 0 20px;
    border-radius: 18px;
  }

  .brand { font-size: 20px; }
  .site-nav { display: none; }

  .nav-toggle {
    display: grid;
    width: 40px;
    height: 40px;
    padding: 0;
    place-content: center;
    gap: 7px;
    background: #e6f4ff;
    border: 0;
    border-radius: 13px;
  }

  .nav-toggle span {
    display: block;
    width: 19px;
    height: 2px;
    background: var(--ink);
    border-radius: 9px;
    transition: transform 180ms ease;
  }

  .is-menu-open .nav-toggle span:first-child { transform: translateY(4.5px) rotate(45deg); }
  .is-menu-open .nav-toggle span:last-child { transform: translateY(-4.5px) rotate(-45deg); }

  .mobile-nav {
    position: absolute;
    top: calc(100% + 7px);
    right: 0;
    left: 0;
    display: grid;
    gap: 6px;
    padding: 9px;
    visibility: hidden;
    background: rgba(255, 255, 255, 0.97);
    border-radius: 17px;
    box-shadow: 0 16px 38px rgba(26, 72, 102, 0.18);
    opacity: 0;
    transform: translateY(-7px);
    transition: opacity 180ms ease, transform 180ms ease, visibility 180ms ease;
  }

  .is-menu-open .mobile-nav { visibility: visible; opacity: 1; transform: none; }
  .mobile-nav a { padding: 13px 15px; font-size: 14px; font-weight: 800; background: #f1f8fd; border-radius: 12px; }

  .products { width: calc(100% - 24px); padding-top: 112px; }
  .products__intro { margin-bottom: 30px; }
  .eyebrow { font-size: 9px; letter-spacing: 0.24em; }
  .products__intro h1 { font-size: clamp(34px, 10.8vw, 48px); line-height: 1.18; }
  .title-rule { margin-top: 12px; }
  .title-rule i { width: 62px; }
  .title-rule span { font-size: 18px; }

  .game-grid { grid-template-columns: 1fr; gap: 16px; }
  .game-card { height: 600px; border-radius: 26px; }
  .game-card--garden .game-card__scene,
  .game-card--guardian .game-card__scene { transform: none; transform-origin: center; }
  .game-card__role--left { bottom: -34px; left: -6px; width: 57%; clip-path: inset(0 0 34px 0); }
  .game-card__role--right { right: -12px; bottom: -64px; width: 64%; clip-path: inset(0 0 64px 0); }
  .game-card__content { bottom: 16px; width: 72%; }
  .game-card__content--right { right: 12px; }
  .game-card__content--left { left: 12px; }
  .game-card__title { gap: 9px; }
  .game-card__icon { width: 44px; height: 44px; border-radius: 12px; }
  .game-card__content h2 { font-size: 34px; }
  .game-card__tags { padding: 5px 8px; }
  .game-card__tags li { padding: 0 7px; font-size: 11px; }
  .game-card__action,
  .game-card__cta { width: 174px; }
  .game-card__cta { height: 38px; gap: 36px; font-size: 14px; }
  .game-card__qr { width: 144px; }
  .game-card__qr img { width: 122px; height: 122px; }

  .contact { width: calc(100% - 24px); height: auto; margin-top: 24px; }
  .contact__panel { grid-template-columns: 1fr; border-radius: 19px; }
  .contact-item { min-height: 78px; padding: 12px 16px; font-size: 12px; line-height: 1.55; }
  .contact-item + .contact-item { border-top: 1px solid rgba(45, 77, 102, 0.12); border-left: 0; }
  .contact-item__icon { width: 40px; height: 40px; }

  .site-footer {
    grid-template-columns: 1fr;
    gap: 8px;
    min-height: 118px;
    margin-top: 24px;
    padding: 24px 20px;
    font-size: 11px;
  }
}

@media (max-width: 390px) {
  .game-card { height: 570px; }
  .game-card__role--left { width: 61%; }
  .game-card__role--right { width: 68%; }
  .game-card__content { width: 78%; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
  [data-reveal] { opacity: 1; transform: none; }
}
