:root {
  color-scheme: dark;
  --page: #343434;
  --ink: #f5f2ed;
  --muted: #aaa8a3;
  --orange: #ff5a0a;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

* {
  box-sizing: border-box;
}

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  color: var(--ink);
  background:
    radial-gradient(circle at 50% -16%, rgba(255, 255, 255, 0.06), transparent 40rem),
    linear-gradient(180deg, #383838, var(--page));
  font-family:
    "Microsoft YaHei UI",
    "Microsoft YaHei",
    "PingFang SC",
    "Noto Sans CJK SC",
    "Segoe UI",
    sans-serif;
  -webkit-font-smoothing: antialiased;
}

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

::selection {
  color: #171717;
  background: #ff9c62;
}

a {
  color: inherit;
}

.page-grid {
  position: fixed;
  inset: 0;
  z-index: -3;
  pointer-events: none;
  opacity: 0.38;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px);
  background-size: 72px 72px;
  mask-image: linear-gradient(to bottom, black, transparent 82%);
}

.ambient {
  position: fixed;
  z-index: -2;
  width: 36rem;
  height: 36rem;
  pointer-events: none;
  border-radius: 50%;
  filter: blur(12px);
  opacity: 0.13;
}

.ambient--orange {
  top: -24rem;
  left: 12%;
  background: var(--orange);
}

.ambient--blue {
  right: -24rem;
  bottom: -25rem;
  background: #1d60f5;
}

.portal {
  width: min(calc(100% - 56px), 1180px);
  min-height: 100vh;
  margin-inline: auto;
  padding: clamp(76px, 10vw, 132px) 0 80px;
}

.page-heading {
  margin-bottom: clamp(52px, 7vw, 76px);
  text-align: center;
}

.page-heading h1 {
  margin: 0;
  color: var(--orange);
  font-size: clamp(52px, 7vw, 78px);
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.055em;
  text-shadow: 0 18px 48px rgba(255, 90, 10, 0.12);
  opacity: 0;
  animation: title-in 650ms var(--ease) forwards;
}

.tool-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}

.tool-card {
  --accent: #ff8d4a;
  --accent-rgb: 255, 141, 74;
  position: relative;
  display: flex;
  min-width: 0;
  min-height: 360px;
  overflow: hidden;
  color: var(--ink);
  text-decoration: none;
  background: #151515;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 22px;
  box-shadow:
    0 26px 70px rgba(0, 0, 0, 0.24),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
  transform: translateY(14px);
  opacity: 0;
  transition:
    transform 480ms var(--ease),
    border-color 260ms ease,
    box-shadow 260ms ease,
    opacity 500ms ease;
}

.is-ready .tool-card {
  opacity: 1;
  transform: translateY(0);
}

.is-ready .tool-card:nth-child(1) {
  transition-delay: 60ms;
}

.is-ready .tool-card:nth-child(2) {
  transition-delay: 130ms;
}

.is-ready .tool-card:nth-child(3) {
  transition-delay: 200ms;
}

.tool-card::after {
  position: absolute;
  top: 0;
  left: 12%;
  width: 76%;
  height: 1px;
  pointer-events: none;
  content: "";
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.42), transparent);
  opacity: 0.28;
}

.tool-card:hover {
  border-color: rgba(var(--accent-rgb), 0.44);
  box-shadow:
    0 32px 80px rgba(0, 0, 0, 0.34),
    0 0 0 1px rgba(var(--accent-rgb), 0.07);
  transform: translateY(-7px);
}

.tool-card:focus-visible {
  outline: 3px solid rgba(var(--accent-rgb), 0.82);
  outline-offset: 5px;
}

.tool-card--cooperation {
  --accent: #67e8ff;
  --accent-rgb: 103, 232, 255;
  background:
    radial-gradient(circle at 82% 12%, rgba(44, 158, 255, 0.3), transparent 36%),
    linear-gradient(150deg, #061427, #091d39 56%, #061b28);
}

.tool-card--bom {
  --accent: #79a1ff;
  --accent-rgb: 121, 161, 255;
  background:
    radial-gradient(circle at 88% 4%, rgba(82, 113, 255, 0.42), transparent 38%),
    linear-gradient(150deg, #101943, #102868 56%, #0d245f);
}

.tool-card--energy {
  --accent: #ff9b51;
  --accent-rgb: 255, 155, 81;
  background:
    radial-gradient(circle at 82% 0%, rgba(255, 143, 64, 0.2), transparent 35%),
    linear-gradient(150deg, #20201f, #292521 55%, #171717);
}

.card-art {
  position: absolute;
  inset: 0 0 28%;
  overflow: hidden;
}

.card-art::before {
  position: absolute;
  inset: 0;
  content: "";
  opacity: 0.14;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.26) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.26) 1px, transparent 1px);
  background-size: 36px 36px;
  mask-image: linear-gradient(to bottom, black, transparent 92%);
}

.card-art::after {
  position: absolute;
  inset: 37% 0 0;
  content: "";
  background: linear-gradient(180deg, transparent, rgba(15, 15, 15, 0.82) 62%, #111);
}

.card-content {
  position: absolute;
  right: 25px;
  bottom: 24px;
  left: 25px;
  z-index: 4;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.card-text h2 {
  margin: 0;
  font-size: clamp(24px, 2.2vw, 29px);
  font-weight: 680;
  line-height: 1.25;
  letter-spacing: -0.035em;
}

.card-text p {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

.card-arrow {
  display: grid;
  width: 38px;
  height: 38px;
  flex: 0 0 auto;
  place-items: center;
  color: #181818;
  background: var(--accent);
  border-radius: 50%;
  transform: translateX(5px) scale(0.9);
  opacity: 0;
  transition:
    opacity 220ms ease,
    transform 280ms var(--ease);
}

.card-arrow svg {
  width: 18px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

.tool-card:hover .card-arrow,
.tool-card:focus-visible .card-arrow {
  opacity: 1;
  transform: translateX(0) scale(1);
}

.art-orbit {
  position: absolute;
  border: 1px solid rgba(var(--accent-rgb), 0.18);
  border-radius: 50%;
}

.art-orbit--one {
  top: -95px;
  right: -42px;
  width: 310px;
  height: 310px;
}

.art-orbit--two {
  top: -42px;
  right: 18px;
  width: 205px;
  height: 205px;
}

.coop-icon {
  position: absolute;
  top: 78px;
  left: 50%;
  z-index: 2;
  width: 172px;
  height: 88px;
  transform: translateX(-50%);
}

.coop-person {
  position: absolute;
  z-index: 3;
  width: 46px;
  height: 46px;
  background:
    radial-gradient(circle at 50% 34%, #d9fbff 0 7px, transparent 8px),
    radial-gradient(ellipse at 50% 92%, #d9fbff 0 15px, transparent 16px),
    linear-gradient(145deg, rgba(73, 164, 255, 0.35), rgba(41, 91, 190, 0.2));
  border: 1px solid rgba(141, 237, 255, 0.35);
  border-radius: 50%;
  box-shadow:
    0 0 30px rgba(59, 204, 255, 0.18),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.coop-person--one {
  top: 0;
  left: 63px;
}

.coop-person--two {
  bottom: 0;
  left: 12px;
  transform: scale(0.82);
}

.coop-person--three {
  right: 12px;
  bottom: 0;
  transform: scale(0.82);
}

.coop-link {
  position: absolute;
  z-index: 1;
  height: 1px;
  background: linear-gradient(
    90deg,
    rgba(106, 228, 255, 0.12),
    rgba(106, 228, 255, 0.7),
    rgba(106, 228, 255, 0.12)
  );
  transform-origin: left;
}

.coop-link--one {
  top: 47px;
  left: 43px;
  width: 55px;
  transform: rotate(38deg);
}

.coop-link--two {
  top: 47px;
  left: 100px;
  width: 55px;
  transform: rotate(142deg);
}

.coop-check {
  position: absolute;
  top: 8px;
  right: -25px;
  z-index: 4;
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  color: #0b2530;
  font-size: 14px;
  font-weight: 800;
  background: #6ee7d1;
  border-radius: 50%;
  box-shadow: 0 0 24px rgba(110, 231, 209, 0.28);
}

.coop-lines {
  position: absolute;
  right: 24px;
  bottom: 18px;
  left: 24px;
  z-index: 2;
  display: grid;
  gap: 7px;
  opacity: 0.48;
}

.coop-lines span {
  height: 5px;
  background: linear-gradient(90deg, rgba(107, 220, 255, 0.58), rgba(107, 220, 255, 0.06));
  border-radius: 99px;
}

.coop-lines span:nth-child(2) {
  width: 76%;
}

.coop-lines span:nth-child(3) {
  width: 55%;
}

.bom-icon {
  position: absolute;
  top: 66px;
  left: 50%;
  z-index: 2;
  width: 190px;
  height: 130px;
  transform: translateX(-50%);
}

.bom-sheet {
  position: absolute;
  display: block;
  width: 132px;
  height: 88px;
  background: linear-gradient(150deg, rgba(111, 145, 255, 0.42), rgba(38, 63, 142, 0.36));
  border: 1px solid rgba(197, 216, 255, 0.32);
  border-radius: 13px;
  box-shadow: 0 18px 38px rgba(3, 12, 53, 0.3);
  backdrop-filter: blur(8px);
}

.bom-sheet--back {
  top: 24px;
  left: 2px;
  opacity: 0.46;
  transform: rotate(-9deg);
}

.bom-sheet--front {
  top: 12px;
  left: 35px;
  padding: 17px 16px;
  transform: rotate(3deg);
}

.bom-sheet i {
  display: block;
  width: 55%;
  height: 5px;
  margin-bottom: 7px;
  background: rgba(214, 226, 255, 0.24);
  border-radius: 99px;
}

.bom-sheet i:nth-child(2) {
  width: 78%;
}

.bom-sheet i:nth-child(3) {
  width: 38%;
}

.bom-sheet b {
  position: absolute;
  right: 13px;
  bottom: 9px;
  color: rgba(218, 229, 255, 0.78);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
}

.bom-node {
  position: absolute;
  z-index: 4;
  width: 12px;
  height: 12px;
  background: #b9ccff;
  border: 3px solid #476bd8;
  border-radius: 50%;
  box-shadow: 0 0 20px rgba(137, 168, 255, 0.65);
}

.bom-node--one {
  top: 9px;
  right: 6px;
}

.bom-node--two {
  right: 28px;
  bottom: 2px;
}

.bom-link {
  position: absolute;
  top: 33px;
  right: 14px;
  z-index: 1;
  width: 38px;
  height: 1px;
  background: rgba(184, 205, 255, 0.5);
  transform: rotate(53deg);
}

.energy-icon {
  position: absolute;
  top: 69px;
  left: 50%;
  z-index: 2;
  width: 205px;
  height: 118px;
  transform: translateX(-50%);
}

.energy-screen {
  position: absolute;
  top: 0;
  left: 50%;
  display: block;
  width: 190px;
  height: 104px;
  padding: 15px 13px 12px;
  overflow: hidden;
  background: linear-gradient(150deg, rgba(255, 255, 255, 0.08), rgba(255, 151, 73, 0.045));
  border: 1px solid rgba(255, 174, 100, 0.34);
  border-radius: 13px;
  box-shadow:
    0 20px 42px rgba(0, 0, 0, 0.27),
    inset 0 1px 0 rgba(255, 255, 255, 0.09);
  transform: translateX(-50%);
}

.energy-screen i {
  display: block;
  width: 46%;
  height: 4px;
  background: rgba(255, 255, 255, 0.18);
  border-radius: 99px;
}

.energy-screen svg {
  width: 100%;
  margin-top: 13px;
  overflow: visible;
}

.energy-screen path {
  fill: none;
  stroke: #ff9b51;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
  filter: drop-shadow(0 0 6px rgba(255, 155, 81, 0.5));
}

.energy-screen circle {
  fill: #ffd4b7;
}

.energy-stand {
  position: absolute;
  bottom: 7px;
  left: 50%;
  width: 1px;
  height: 15px;
  background: rgba(255, 174, 100, 0.36);
}

.energy-base {
  position: absolute;
  bottom: 5px;
  left: 50%;
  width: 62px;
  height: 2px;
  background: rgba(255, 174, 100, 0.4);
  border-radius: 99px;
  transform: translateX(-50%);
}

@keyframes title-in {
  from {
    opacity: 0;
    transform: translateY(13px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 980px) {
  .tool-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .tool-card:last-child {
    grid-column: 1 / -1;
    min-height: 330px;
  }

  .tool-card:last-child .card-art {
    right: 44%;
    bottom: 0;
  }
}

@media (max-width: 680px) {
  .portal {
    width: min(calc(100% - 36px), 1180px);
    padding-top: 72px;
    padding-bottom: 52px;
  }

  .page-heading {
    margin-bottom: 46px;
  }

  .page-heading h1 {
    font-size: clamp(48px, 14vw, 64px);
  }

  .tool-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .tool-card,
  .tool-card:last-child {
    grid-column: auto;
    min-height: 340px;
  }

  .tool-card:last-child .card-art {
    inset: 0 0 28%;
  }

  .card-arrow {
    opacity: 1;
    transform: none;
  }
}

@media (max-width: 420px) {
  .card-content {
    right: 21px;
    left: 21px;
  }

  .card-text h2 {
    font-size: 24px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
