:root {
  color-scheme: dark;
  --bg-0: #05070d;
  --bg-1: #0b1122;
  --bg-2: #121d36;
  --text-strong: #f4f7ff;
  --text-soft: #9ca8c6;
  --line-soft: rgba(255, 255, 255, 0.14);
  --line-strong: rgba(255, 255, 255, 0.26);
  --accent-warm: #ff9f64;
  --accent-cool: #63d2ff;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  position: relative;
  min-height: 100svh;
  overflow-x: hidden;
  font-family: "Avenir Next", "Segoe UI Variable", "PingFang SC", "Hiragino Sans GB", "Noto Sans SC", sans-serif;
  color: var(--text-strong);
  background:
    radial-gradient(120% 90% at 10% 8%, rgba(44, 99, 180, 0.28), transparent 56%),
    radial-gradient(80% 65% at 88% 12%, rgba(255, 141, 74, 0.2), transparent 62%),
    radial-gradient(90% 70% at 52% 106%, rgba(67, 117, 216, 0.24), transparent 58%),
    linear-gradient(170deg, var(--bg-0), var(--bg-1) 48%, var(--bg-2));
}

body::before,
body::after {
  content: "";
  position: fixed;
  inset: -12vmax;
  pointer-events: none;
  z-index: 0;
}

body::before {
  background:
    radial-gradient(circle at 22% 34%, rgba(255, 173, 101, 0.16), transparent 40%),
    radial-gradient(circle at 74% 62%, rgba(93, 209, 255, 0.16), transparent 37%);
  filter: blur(22px);
  animation: backgroundDrift 24s ease-in-out infinite alternate;
}

body::after {
  background-image:
    radial-gradient(rgba(255, 255, 255, 0.06) 0.6px, transparent 0.6px),
    radial-gradient(rgba(255, 255, 255, 0.04) 0.6px, transparent 0.6px);
  background-position: 0 0, 24px 24px;
  background-size: 48px 48px;
  opacity: 0.32;
  mix-blend-mode: soft-light;
}

.ambient-dots {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
}

.ambient-dots span {
  position: absolute;
  left: var(--x);
  top: var(--y);
  width: calc(2px + var(--s) * 2px);
  height: calc(2px + var(--s) * 2px);
  border-radius: 50%;
  background: radial-gradient(circle at 40% 35%, rgba(255, 255, 255, 0.95), rgba(140, 220, 255, 0.35));
  box-shadow: 0 0 12px rgba(118, 207, 255, 0.48);
  opacity: 0.55;
  animation: twinkle 6s ease-in-out infinite;
  animation-delay: var(--d);
}

.landing {
  position: relative;
  z-index: 2;
  min-height: 100svh;
  display: grid;
  place-items: center;
  padding: clamp(1.6rem, 4vw, 3.2rem) 1.1rem 5.8rem;
}

.hero {
  width: min(920px, 100%);
}

.hero-shell {
  position: relative;
  border-radius: 28px;
  border: 1px solid var(--line-soft);
  background:
    linear-gradient(160deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.015)),
    rgba(8, 14, 28, 0.46);
  box-shadow:
    0 22px 72px rgba(0, 0, 0, 0.52),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  padding: clamp(1.4rem, 2.8vw, 2.2rem) clamp(1rem, 4vw, 3.2rem) clamp(1.5rem, 2.8vw, 2.4rem);
  text-align: center;
  overflow: hidden;
}

.hero-shell::before {
  content: "";
  position: absolute;
  inset: -20%;
  background:
    radial-gradient(ellipse at 16% 36%, rgba(104, 203, 255, 0.18), transparent 48%),
    radial-gradient(ellipse at 78% 64%, rgba(255, 163, 90, 0.2), transparent 44%);
  filter: blur(10px);
  opacity: 0.85;
  animation: shellGlow 14s ease-in-out infinite;
}

.hero-shell > * {
  position: relative;
  z-index: 1;
}

.kicker {
  margin: 0;
  letter-spacing: 0.32em;
  font-size: 0.74rem;
  color: rgba(226, 238, 255, 0.84);
}

h1 {
  margin: 0.9rem 0 0;
  font-size: clamp(2rem, 6vw, 4rem);
  line-height: 1.02;
  letter-spacing: 0.015em;
  color: var(--text-strong);
  text-wrap: balance;
}

.subtitle {
  margin: 0.72rem auto 0;
  max-width: 36ch;
  font-size: clamp(0.94rem, 1.5vw, 1.05rem);
  color: var(--text-soft);
}

.fox-stage {
  position: relative;
  width: min(72vw, 460px);
  margin: clamp(0.9rem, 2.6vw, 1.4rem) auto 0;
  aspect-ratio: 1;
}

.fox-stage::before,
.fox-stage::after {
  content: "";
  position: absolute;
  inset: 18%;
  border-radius: 50%;
  pointer-events: none;
}

.fox-stage::before {
  background: radial-gradient(circle at 50% 45%, rgba(255, 154, 81, 0.4), rgba(255, 154, 81, 0));
  filter: blur(16px);
  animation: haloBreathe 6.4s ease-in-out infinite;
}

.fox-stage::after {
  inset: 22%;
  border: 1px solid rgba(118, 219, 255, 0.22);
  box-shadow: 0 0 22px rgba(94, 200, 255, 0.22);
  animation: ringPulse 7s ease-in-out infinite;
}

.fox-visual {
  width: 100%;
  height: 100%;
  filter: drop-shadow(0 14px 30px rgba(0, 0, 0, 0.46));
  animation: foxFloat 8s ease-in-out infinite;
}

.aura-pulse {
  transform-origin: center;
  animation: auraPulse 6s ease-in-out infinite;
}

.orbit-trail {
  stroke-dasharray: 17 18;
  animation: orbitDrift 12s linear infinite;
}

.fox-core {
  transform-origin: center;
  animation: foxBreathe 5.8s ease-in-out infinite;
}

.spark {
  fill: #9fe8ff;
  opacity: 0.72;
  animation: sparkPulse 3.8s ease-in-out infinite;
}

.spark-b {
  animation-delay: 0.9s;
  fill: #ffd7a5;
}

.spark-c {
  animation-delay: 1.8s;
}

.spark-d {
  animation-delay: 2.6s;
  fill: #ffbe88;
}

.icp-footer {
  position: fixed;
  left: 0;
  right: 0;
  bottom: max(10px, env(safe-area-inset-bottom));
  z-index: 4;
  display: flex;
  justify-content: center;
  pointer-events: none;
}

.icp-footer a {
  pointer-events: auto;
  text-decoration: none;
  font-size: 0.86rem;
  letter-spacing: 0.02em;
  color: #aab4cf;
  background: rgba(5, 9, 20, 0.72);
  border: 1px solid rgba(169, 182, 214, 0.25);
  border-radius: 999px;
  padding: 0.4rem 0.9rem;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: border-color 180ms ease, color 180ms ease, transform 180ms ease;
}

.icp-footer a:hover,
.icp-footer a:focus-visible {
  border-color: var(--line-strong);
  color: #ecf2ff;
  transform: translateY(-1px);
}

@media (max-width: 768px) {
  .hero-shell {
    border-radius: 22px;
    padding: 1.35rem 1rem 1.35rem;
  }

  .kicker {
    letter-spacing: 0.26em;
  }

  .subtitle {
    max-width: 30ch;
  }

  .fox-stage {
    width: min(82vw, 360px);
  }

  .icp-footer a {
    font-size: 0.8rem;
  }
}

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

@supports not ((backdrop-filter: blur(8px)) or (-webkit-backdrop-filter: blur(8px))) {
  .hero-shell {
    background: rgba(9, 15, 29, 0.82);
  }

  .icp-footer a {
    background: rgba(8, 12, 24, 0.9);
  }
}

@keyframes backgroundDrift {
  from {
    transform: translate3d(-2%, -1%, 0) scale(1.01);
  }
  to {
    transform: translate3d(2%, 1.5%, 0) scale(1.04);
  }
}

@keyframes shellGlow {
  0%,
  100% {
    transform: translate3d(0, 0, 0) scale(1);
    opacity: 0.8;
  }
  50% {
    transform: translate3d(0.8%, -1%, 0) scale(1.03);
    opacity: 1;
  }
}

@keyframes twinkle {
  0%,
  100% {
    opacity: 0.26;
    transform: scale(0.9);
  }
  40% {
    opacity: 0.72;
    transform: scale(1.05);
  }
  70% {
    opacity: 0.45;
    transform: scale(0.95);
  }
}

@keyframes foxFloat {
  0%,
  100% {
    transform: translate3d(0, 0, 0);
  }
  50% {
    transform: translate3d(0, -7px, 0);
  }
}

@keyframes foxBreathe {
  0%,
  100% {
    transform: scale(0.992);
  }
  50% {
    transform: scale(1.015);
  }
}

@keyframes auraPulse {
  0%,
  100% {
    transform: scale(0.95);
    opacity: 0.72;
  }
  50% {
    transform: scale(1.05);
    opacity: 1;
  }
}

@keyframes haloBreathe {
  0%,
  100% {
    transform: scale(0.95);
    opacity: 0.4;
  }
  50% {
    transform: scale(1.08);
    opacity: 0.72;
  }
}

@keyframes ringPulse {
  0%,
  100% {
    transform: scale(0.96);
    opacity: 0.38;
  }
  50% {
    transform: scale(1.04);
    opacity: 0.82;
  }
}

@keyframes orbitDrift {
  from {
    stroke-dashoffset: 0;
  }
  to {
    stroke-dashoffset: -105;
  }
}

@keyframes sparkPulse {
  0%,
  100% {
    opacity: 0.34;
    transform: scale(0.9);
  }
  50% {
    opacity: 1;
    transform: scale(1.2);
  }
}
