:root {
  color-scheme: light;
  --title: #29286f;
  --subtitle: #6e6dae;
  --focus: #4338ca;
  --font-sans: "Microsoft YaHei", "PingFang SC", "Noto Sans CJK SC",
    "Source Han Sans SC", system-ui, sans-serif;
}

* {
  box-sizing: border-box;
}

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

body {
  overflow-x: hidden;
  background: #f4f3ff;
  font-family: var(--font-sans);
}

.portal {
  position: relative;
  display: grid;
  min-height: 100svh;
  overflow: hidden;
  place-items: center;
  isolation: isolate;
  background-image: url("assets/background-clean-1672x941.png");
  background-position: center;
  background-size: cover;
}

.portal::before {
  position: absolute;
  z-index: -1;
  inset: 0;
  content: "";
  background: linear-gradient(
    180deg,
    rgb(255 255 255 / 4%) 0%,
    transparent 70%,
    rgb(234 231 255 / 10%) 100%
  );
}

.portal__glow {
  position: absolute;
  z-index: -1;
  top: 5%;
  left: 50%;
  width: min(56rem, 82vw);
  height: min(44rem, 72vh);
  border-radius: 50%;
  background: radial-gradient(circle, rgb(255 255 255 / 52%), transparent 69%);
  transform: translateX(-50%);
  pointer-events: none;
}

.portal__content {
  display: flex;
  width: min(68rem, 92vw);
  margin-top: clamp(-5rem, -7vh, -2.5rem);
  align-items: center;
  flex-direction: column;
  text-align: center;
}

.brand-logo {
  width: clamp(8.4rem, 13vw, 12rem);
  height: auto;
  object-fit: contain;
  filter: drop-shadow(0 1rem 2.5rem rgb(67 64 152 / 12%));
  animation: enter-logo 720ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

.brand-copy {
  margin-top: clamp(-0.65rem, -0.7vw, -0.25rem);
  animation: enter-copy 720ms 90ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

.brand-copy h1 {
  margin: 0;
  color: var(--title);
  font-size: clamp(2.6rem, 5vw, 5rem);
  font-weight: 700;
  letter-spacing: 0.045em;
  line-height: 1.12;
  text-shadow: 0 0.5rem 1.8rem rgb(79 73 164 / 12%);
}

.brand-copy p {
  display: flex;
  margin: clamp(0.8rem, 1.4vw, 1.25rem) 0 0;
  align-items: center;
  justify-content: center;
  gap: clamp(1rem, 2vw, 1.7rem);
  color: var(--subtitle);
  font-size: clamp(0.82rem, 1.35vw, 1.3rem);
  font-weight: 400;
  letter-spacing: 0.38em;
  line-height: 1.5;
  white-space: nowrap;
}

.brand-copy p::before,
.brand-copy p::after {
  width: clamp(2rem, 5vw, 4.5rem);
  height: 1px;
  content: "";
  background: linear-gradient(90deg, transparent, rgb(126 121 198 / 55%));
}

.brand-copy p::after {
  transform: scaleX(-1);
}

.entry-list {
  display: flex;
  width: min(51rem, 88vw);
  margin-top: clamp(2rem, 4.6vh, 3.1rem);
  align-items: center;
  justify-content: center;
  gap: clamp(0.9rem, 2.5vw, 2.5rem);
  animation: enter-buttons 720ms 180ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

.entry {
  display: block;
  width: min(23rem, 43vw);
  border-radius: 999px;
  transition:
    transform 180ms ease,
    filter 180ms ease;
  -webkit-tap-highlight-color: transparent;
}

.entry img {
  display: block;
  width: 100%;
  height: auto;
}

.entry:hover {
  filter: brightness(1.035) saturate(1.04);
  transform: translateY(-4px) scale(1.012);
}

.entry:active {
  transform: translateY(-1px) scale(0.992);
}

.entry:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 5px;
}

.portal__footer {
  position: absolute;
  bottom: clamp(4.4rem, 10vh, 8.5rem);
  left: 50%;
  display: flex;
  margin: 0;
  align-items: center;
  gap: clamp(0.9rem, 2.6vw, 2.25rem);
  color: rgb(114 108 205 / 52%);
  font-size: clamp(0.67rem, 0.9vw, 0.92rem);
  font-style: normal;
  letter-spacing: 0.43em;
  white-space: nowrap;
  transform: translateX(-50%);
  animation: fade-in 900ms 320ms ease both;
}

.portal__footer i {
  font-style: normal;
}

@keyframes enter-logo {
  from {
    opacity: 0;
    transform: translateY(1rem) scale(0.96);
  }
}

@keyframes enter-copy {
  from {
    opacity: 0;
    transform: translateY(0.8rem);
  }
}

@keyframes enter-buttons {
  from {
    opacity: 0;
    transform: translateY(1rem);
  }
}

@keyframes fade-in {
  from {
    opacity: 0;
  }
}

@media (max-width: 700px) {
  .portal {
    background-position: center center;
  }

  .portal::after {
    position: absolute;
    z-index: -1;
    inset: 0;
    content: "";
    background: rgb(250 249 255 / 16%);
    backdrop-filter: blur(1px);
  }

  .portal__content {
    width: min(34rem, 92vw);
    margin-top: -2rem;
  }

  .brand-logo {
    width: clamp(7.6rem, 32vw, 10rem);
  }

  .brand-copy h1 {
    max-width: 100%;
    font-size: clamp(2.1rem, 10.2vw, 3rem);
    letter-spacing: 0.02em;
    white-space: nowrap;
  }

  .brand-copy p {
    max-width: 90vw;
    gap: 0.75rem;
    font-size: clamp(0.78rem, 3.5vw, 1rem);
    letter-spacing: 0.16em;
    white-space: normal;
  }

  .brand-copy p::before,
  .brand-copy p::after {
    width: 1.4rem;
    flex: 0 0 auto;
  }

  .entry-list {
    width: min(27rem, 88vw);
    margin-top: 1.9rem;
    flex-direction: column;
    gap: 0.35rem;
  }

  .entry {
    width: min(22rem, 88vw);
  }

  .portal__footer {
    bottom: max(2rem, env(safe-area-inset-bottom));
    gap: 0.55rem;
    font-size: 0.63rem;
    letter-spacing: 0.15em;
  }
}

@media (max-height: 700px) and (min-width: 701px) {
  .portal__content {
    margin-top: -1rem;
  }

  .brand-logo {
    width: 7.5rem;
  }

  .entry-list {
    margin-top: 1.25rem;
  }

  .portal__footer {
    bottom: 1.8rem;
  }
}

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