:root {
  --page-max-width: 1440px;
  --page-min-height: 100svh;
  --text-primary: #0f0f14;
  --text-secondary: rgba(15, 15, 20, 0.58);
  --surface: #fafafa;
  --shadow-soft: 0 24px 80px rgba(92, 116, 214, 0.14);
  --font-rounded: "SF Pro Rounded", "Arial Rounded MT Bold", ui-rounded,
    "Hiragino Maru Gothic ProN", "Hiragino Sans", "Noto Sans TC",
    "PingFang TC", "Helvetica Neue", sans-serif;
}

* {
  box-sizing: border-box;
}

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

body {
  background: #eef1ff;
  color: var(--text-primary);
  font-family: var(--font-rounded);
}

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

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

.page-shell {
  position: relative;
  min-height: var(--page-min-height);
  overflow: hidden;
  isolation: isolate;
  background:
    linear-gradient(180deg, rgba(98, 122, 248, 0.98) 0%, rgba(196, 207, 255, 0.86) 44%, rgba(255, 255, 255, 0.97) 100%),
    url("./Assets.xcassets/BGHome.imageset/BG.png") center top / cover no-repeat;
}

.page-shell::before {
  content: "";
  position: absolute;
  inset: -20%;
  z-index: -2;
  background:
    radial-gradient(circle at 50% 38%, rgba(255, 255, 255, 0.7), transparent 26%),
    radial-gradient(circle at 18% 68%, rgba(255, 255, 255, 0.2), transparent 18%),
    radial-gradient(circle at 82% 18%, rgba(255, 255, 255, 0.22), transparent 18%);
  filter: blur(14px);
  transform: scale(1.08);
}

.noise-overlay {
  position: absolute;
  inset: 0;
  z-index: -1;
  opacity: 0.13;
  background-image:
    radial-gradient(rgba(255, 255, 255, 0.9) 0.7px, transparent 0.7px),
    radial-gradient(rgba(66, 76, 153, 0.25) 0.8px, transparent 0.8px);
  background-position: 0 0, 12px 14px;
  background-size: 18px 18px, 22px 22px;
  mix-blend-mode: screen;
  pointer-events: none;
}

.sky-stage {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 0;
}

.photo-rain {
  position: absolute;
  inset: 0;
}

.hero {
  width: min(100% - 144px, 880px);
  margin: 0 auto;
  min-height: calc(var(--page-min-height) - 132px);
  padding: 132px 0 164px;
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 30px;
  text-align: center;
}

.app-icon {
  width: clamp(172px, 18vw, 196px);
  aspect-ratio: 1;
  border-radius: 22%;
  box-shadow: 0 16px 40px rgba(50, 67, 156, 0.12);
}

h1 {
  margin: 0;
  max-width: none;
  font-family: var(--font-rounded);
  font-size: clamp(3rem, 5.56vw, 5rem);
  line-height: 1;
  letter-spacing: 0;
  font-weight: 700;
  white-space: nowrap;
}

.store-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 132px;
  min-height: 44px;
}

.store-button-badge {
  width: 132px;
  height: 44px;
}

.falling-photo {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 0;
  width: var(--photo-size, 110px);
  border: 6px solid rgba(238, 247, 255, 0.95);
  border-radius: 22px;
  object-fit: cover;
  box-shadow: var(--shadow-soft);
  will-change: transform, opacity;
}

.catcher-dog {
  position: absolute;
  left: 0;
  bottom: 112px;
  z-index: 1;
  transform: translateX(0);
  will-change: transform;
  opacity: 1;
  pointer-events: none;
}

.catcher-dog-face {
  display: inline-block;
  font-size: 4.6rem;
  line-height: 1;
  transform-origin: 50% 72%;
}

.catcher-dog-face.is-wiggling {
  animation: dog-rotate-bounce 260ms linear;
}

.dog-heart-burst {
  position: absolute;
  z-index: 4;
  font-size: 1.4rem;
  line-height: 1;
  pointer-events: none;
  text-shadow: 0 4px 12px rgba(255, 255, 255, 0.75);
}

.center-links {
  position: absolute;
  left: 50%;
  bottom: 30px;
  z-index: 3;
  display: flex;
  align-items: center;
  gap: 18px;
  color: var(--text-secondary);
  transform: translateX(-50%);
  white-space: nowrap;
}

.center-links a,
.social-link {
  transition: transform 160ms ease, opacity 160ms ease;
}

.center-links a {
  font-size: 1rem;
  line-height: 1.375;
  letter-spacing: 0.0125em;
  font-weight: 500;
}

.site-footer {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 24px 52px 28px;
  font-size: 1rem;
}

.footer-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex: 1 1 0;
  gap: 20px;
}

.copyright {
  font-size: 1.125rem;
  line-height: 1.56;
  letter-spacing: 0.01em;
  font-weight: 700;
  color: rgba(54, 54, 54, 1);
  white-space: nowrap;
}

.social-links {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex: 1 1 0;
  gap: 10px;
}

.social-link {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  opacity: 0.88;
}

.social-link img {
  width: 22px;
  height: 22px;
  object-fit: contain;
}

.social-link:first-child img {
  filter: grayscale(1) brightness(0.22);
}

.social-link-instagram img {
  filter: grayscale(1) brightness(0.28) contrast(1.05);
}

.center-links a:hover,
.social-link:hover,
.store-button:hover {
  transform: translateY(-1px);
}

@media (max-width: 860px) {
  .hero {
    width: min(100% - 32px, 358px);
    min-height: auto;
    padding: 162px 0 210px;
    gap: 38px;
  }

  h1 {
    max-width: 358px;
    font-size: 3rem;
    line-height: 1;
    white-space: normal;
    text-align: center;
  }

  .catcher-dog {
    bottom: 144px;
  }

  .catcher-dog-face {
    font-size: 3.8rem;
  }

  .center-links {
    bottom: 14px;
    width: min(100% - 32px, 358px);
    justify-content: space-between;
    gap: 16px;
  }

  .center-links a {
    font-size: 0.75rem;
    line-height: 1.33;
    letter-spacing: 0.0125em;
  }

  .site-footer {
    gap: 12px;
    padding: 16px;
    padding-bottom: 30px;
  }

  .footer-top {
    align-items: flex-end;
    gap: 14px;
  }

  .copyright {
    font-size: 0.875rem;
    line-height: 1.57;
  }

  .social-links {
    flex: 0 0 auto;
    gap: 8px;
  }

  .social-link {
    width: 24px;
    height: 24px;
  }

  .social-link img {
    width: 16px;
    height: 16px;
  }
}

@media (max-width: 375px) {
  .hero {
    width: min(100% - 24px, 340px);
    padding-top: 144px;
    gap: 32px;
  }

  .app-icon {
    width: 160px;
  }

  h1 {
    max-width: 320px;
    font-size: clamp(2.6rem, 8.8vw, 3rem);
    letter-spacing: 0;
  }

  .store-button,
  .store-button-badge {
    width: 120px;
    height: 40px;
    min-height: 40px;
  }

  .catcher-dog {
    bottom: 130px;
  }

  .catcher-dog-face {
    font-size: 3.35rem;
  }

  .center-links {
    bottom: 12px;
    width: min(100% - 24px, 340px);
  }

  .site-footer {
    padding-left: 12px;
    padding-right: 12px;
    padding-bottom: 28px;
  }

  .copyright {
    font-size: 0.8rem;
  }
}

@keyframes dog-heart-pop {
  0% {
    opacity: 0;
    transform: translate(0, 4px) scale(0.72);
  }

  18% {
    opacity: 1;
    transform: translate(-1px, -8px) scale(1);
  }

  55% {
    opacity: 1;
    transform: translate(4px, -16px) scale(1.02);
  }

  100% {
    opacity: 0;
    transform: translate(10px, -28px) scale(1.02);
  }
}

@keyframes dog-rotate-bounce {
  0% {
    transform: rotate(0deg);
  }

  20% {
    transform: rotate(-45deg);
  }

  40% {
    transform: rotate(45deg);
  }

  60% {
    transform: rotate(-45deg);
  }

  80% {
    transform: rotate(45deg);
  }

  100% {
    transform: rotate(0deg);
  }
}
