:root {
  --home-ink: #fff2e8;
  --home-muted: #c8c5e8;
  --home-lilac: #c9a9ff;
  --home-blush: #ffc7dc;
  --home-starlight: #fff0bd;
  --home-line: rgba(211, 196, 255, 0.34);
  --home-deep: #05091b;
}

html {
  height: auto;
  min-height: 100%;
  overflow-x: hidden;
  overflow-y: auto;
  background: var(--home-deep);
  scroll-behavior: smooth;
}

body.home-page {
  display: block;
  height: auto;
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior-y: auto;
  color: var(--home-ink);
  background: var(--home-deep);
  cursor: url("/static/dist/assets/img/chicken.png") 16 16, auto;
  font-family: 'Noto Sans TC', sans-serif;
}

.home-page *,
.home-page *::before,
.home-page *::after {
  box-sizing: border-box;
}

.home-scene {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  background-color: var(--home-deep);
  background-image: url("../assets/img/home-observatory.png");
  background-position: center bottom;
  background-repeat: no-repeat;
  background-size: cover;
  pointer-events: none;
}

.home-starfield,
.sky-plane,
.star-stream,
.home-scene__veil {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.home-starfield {
  z-index: 1;
  display: block;
}

.sky-plane {
  z-index: 2;
  top: 27%;
  right: auto;
  bottom: auto;
  left: -16vw;
  width: clamp(42px, 5vw, 72px);
  height: auto;
  opacity: 0;
  object-fit: contain;
  filter: drop-shadow(0 0 10px rgba(171, 211, 255, 0.46));
  transform: translate3d(0, 0, 0) rotate(34deg);
  animation: sky-plane-pass 58s 8s linear infinite;
  will-change: transform, opacity;
}

.star-stream {
  z-index: 3;
  overflow: hidden;
}

.star-stream span {
  position: absolute;
  top: var(--stream-top);
  left: var(--stream-left);
  width: clamp(72px, 9vw, 140px);
  height: 2px;
  opacity: 0;
  background: linear-gradient(90deg, transparent 0%, rgba(204, 211, 255, 0.18) 54%, rgba(255, 245, 218, 0.82) 88%, #ffffff 100%);
  border-radius: 999px;
  box-shadow: 0 0 9px rgba(214, 195, 255, 0.36);
  transform: translate3d(0, 0, 0) rotate(var(--meteor-angle));
  transform-origin: right center;
  animation: meteor-pass var(--stream-duration) var(--stream-delay) cubic-bezier(0.16, 0.75, 0.25, 1) infinite;
  will-change: transform, opacity;
}

.star-stream span::after {
  content: "";
  position: absolute;
  top: 50%;
  right: -2px;
  width: 5px;
  height: 5px;
  background: #fff8dc;
  border-radius: 50%;
  box-shadow: 0 0 8px 3px rgba(255, 239, 188, 0.72);
  transform: translateY(-50%);
}

.star-stream span:nth-child(1) {
  --stream-top: 18%;
  --stream-left: 14%;
  --stream-delay: 3s;
  --stream-duration: 17s;
  --meteor-angle: 14deg;
  --meteor-travel-x: clamp(80px, 14vw, 180px);
  --meteor-travel-y: clamp(20px, 3.5vw, 45px);
}

.star-stream span:nth-child(2) {
  --stream-top: 42%;
  --stream-left: 58%;
  --stream-delay: 11s;
  --stream-duration: 23s;
  --meteor-angle: 18deg;
  --meteor-travel-x: clamp(72px, 12vw, 150px);
  --meteor-travel-y: clamp(23px, 3.9vw, 49px);
  width: clamp(64px, 8vw, 120px);
}

.star-stream span:nth-child(3) {
  --stream-top: 70%;
  --stream-left: 28%;
  --stream-delay: 18s;
  --stream-duration: 29s;
  --meteor-angle: 11deg;
  --meteor-travel-x: clamp(76px, 13vw, 165px);
  --meteor-travel-y: clamp(15px, 2.6vw, 32px);
  width: clamp(58px, 7vw, 105px);
}

.home-scene__veil {
  z-index: 4;
  background: rgba(3, 7, 27, 0.24);
}

.home-header,
main,
footer {
  position: relative;
  z-index: 3;
}

.home-header {
  display: flex;
  min-height: 29vh;
  padding: 112px 24px 10px;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  box-sizing: border-box;
  text-align: center;
  background: transparent;
  border: 0;
  box-shadow: none;
  backdrop-filter: none;
}

.fill-text {
  position: relative;
  margin: 0;
  color: var(--home-ink);
  font-size: 4.7rem;
  font-weight: 500;
  line-height: 1.08;
  letter-spacing: 0;
  text-shadow: 0 0 28px rgba(255, 214, 221, 0.2);
}

.brand-paw {
  position: absolute;
  top: 4px;
  right: -18px;
  color: var(--home-blush);
  font-size: 1.35rem;
  text-shadow: 8px -7px 0 var(--home-blush), 13px 1px 0 var(--home-blush);
}

.eyebrow {
  margin: 16px 0 0;
  color: var(--home-lilac);
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0;
}

main {
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 0;
  display: block;
}

.home-hero {
  display: flex;
  min-height: 54vh;
  padding: 18px 24px 12vh;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  box-sizing: border-box;
  text-align: center;
}

.hero-copy {
  margin: 12px 0 0;
  color: rgba(238, 236, 255, 0.78);
  font-size: 1.05rem;
  font-weight: 400;
  line-height: 1.9;
}

.hero-badge {
  margin-top: 18px;
  padding: 5px 10px;
  color: rgba(255, 239, 228, 0.8);
  border: 1px solid rgba(255, 199, 220, 0.26);
  border-radius: 999px;
  font-size: 0.74rem;
}

.star-navigation {
  position: relative;
  min-height: 100vh;
  margin-top: -6vh;
  padding: 18vh 24px 210px;
  box-sizing: border-box;
  background: linear-gradient(180deg, transparent 0%, rgba(5, 9, 31, 0.22) 9%, rgba(4, 8, 28, 0.68) 100%);
}

.journey-heading {
  width: min(760px, 100%);
  margin: 0 auto;
  text-align: center;
}

.journey-heading > span {
  color: var(--home-lilac);
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.18em;
}

.journey-heading h2 {
  margin: 16px 0 12px;
  color: rgba(255, 242, 232, 0.94);
  font-size: clamp(1.65rem, 4vw, 2.7rem);
  font-weight: 500;
  line-height: 1.35;
}

.journey-heading p {
  margin: 0;
  color: rgba(218, 216, 239, 0.66);
  font-size: 0.9rem;
  line-height: 1.8;
}

.primary-menu {
  position: relative;
  display: flex;
  width: min(1040px, 100%);
  margin: 48px auto 0;
  flex-direction: column;
}

.primary-menu::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 1px;
  background: linear-gradient(180deg, transparent, rgba(205, 185, 255, 0.26) 8%, rgba(205, 185, 255, 0.26) 92%, transparent);
  pointer-events: none;
}

.constellation-link {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  width: min(720px, calc(50% + 360px));
  min-height: 78vh;
  padding: 80px 50px;
  align-items: center;
  align-self: flex-start;
  gap: 34px;
  color: var(--home-ink);
  text-decoration: none;
  border-radius: 42px;
  transition: background 260ms ease, transform 260ms ease;
}

.constellation-link--tracker {
  align-self: flex-end;
}

.constellation-link:hover,
.constellation-link:focus-visible {
  color: #ffffff;
  text-decoration: none;
  background: linear-gradient(115deg, rgba(47, 39, 92, 0.22), rgba(10, 15, 48, 0.05));
  transform: translateY(-4px);
  outline: none;
}

.route-number {
  position: absolute;
  top: 22%;
  color: rgba(211, 196, 255, 0.22);
  font-size: clamp(4rem, 9vw, 7.5rem);
  font-weight: 500;
  line-height: 1;
  pointer-events: none;
}

.constellation-link:nth-child(odd) .route-number {
  right: 12%;
}

.constellation-link:nth-child(even) .route-number {
  left: 12%;
}

.constellation-icon {
  position: relative;
  display: grid;
  width: 82px;
  height: 82px;
  place-items: center;
  color: var(--home-starlight);
  background: rgba(23, 25, 68, 0.38);
  border: 1px solid rgba(219, 195, 255, 0.28);
  border-radius: 50%;
  box-shadow: 0 0 28px rgba(180, 145, 255, 0.14);
  font-size: 2.2rem;
  transition: border-color 180ms ease, box-shadow 180ms ease, scale 180ms ease;
}

.constellation-icon::after {
  content: "";
  position: absolute;
  inset: -9px;
  border: 1px solid rgba(226, 210, 255, 0.1);
  border-radius: 50%;
}

.constellation-link:hover .constellation-icon,
.constellation-link:focus-visible .constellation-icon {
  border-color: rgba(255, 211, 228, 0.64);
  box-shadow: 0 0 36px rgba(211, 158, 255, 0.34);
  scale: 1.06;
}

.constellation-icon--plane img {
  width: 38px;
  height: 38px;
  object-fit: contain;
  filter: sepia(0.18) saturate(0.7) hue-rotate(218deg) brightness(1.8) drop-shadow(0 0 8px rgba(255, 214, 228, 0.56));
  transform: rotate(-10deg);
}

.constellation-copy {
  display: flex;
  min-width: 0;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
}

.constellation-copy strong {
  font-size: clamp(2rem, 5vw, 3.8rem);
  font-weight: 500;
  line-height: 1.2;
}

.constellation-copy small,
.practice-hub small,
.practice-grid small {
  color: var(--home-lilac);
  font-size: 0.72rem;
  letter-spacing: 0;
  text-transform: uppercase;
}

.constellation-copy > span {
  max-width: 420px;
  color: rgba(222, 220, 242, 0.7);
  font-size: 0.95rem;
  line-height: 1.85;
}

.constellation-copy em {
  margin-top: 14px;
  color: rgba(255, 242, 232, 0.9);
  font-size: 0.82rem;
  font-style: normal;
  letter-spacing: 0.04em;
}

.constellation-copy em i {
  display: inline-block;
  margin-left: 8px;
  font-style: normal;
  transition: transform 180ms ease;
}

.constellation-link:hover .constellation-copy em i,
.constellation-link:focus-visible .constellation-copy em i {
  transform: translate(4px, -4px);
}

.journey-ready [data-journey-reveal] {
  opacity: 0;
  transform: translateY(54px);
  transition: opacity 800ms ease, transform 800ms cubic-bezier(0.2, 0.75, 0.25, 1);
}

.journey-ready [data-journey-reveal].is-visible {
  opacity: 1;
  transform: translateY(0);
}

.journey-ready .constellation-link.is-visible:hover,
.journey-ready .constellation-link.is-visible:focus-visible {
  transform: translateY(-4px);
}

.practice-hub {
  display: grid;
  grid-template-columns: 180px 1fr;
  width: min(860px, 100%);
  margin: 72px auto 0;
  padding: 42px 28px;
  gap: 30px;
  background: rgba(13, 18, 52, 0.28);
  border: 1px solid rgba(211, 196, 255, 0.16);
  border-radius: 26px;
}

.practice-hub__heading {
  display: flex;
  align-items: center;
  gap: 14px;
}

.practice-star {
  display: grid;
  width: 44px;
  height: 44px;
  flex: 0 0 44px;
  place-items: center;
  color: var(--home-blush);
  border: 1px solid rgba(255, 199, 220, 0.22);
  border-radius: 50%;
  box-shadow: 0 0 22px rgba(255, 190, 223, 0.12);
  font-size: 1.4rem;
}

.practice-hub h3 {
  margin: 0 0 4px;
  color: var(--home-ink);
  font-size: 1rem;
  font-weight: 500;
  letter-spacing: 0;
}

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

.practice-grid a {
  display: flex;
  min-width: 0;
  min-height: 58px;
  padding: 10px 12px;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  color: rgba(255, 244, 236, 0.86);
  text-decoration: none;
  border-bottom: 1px solid rgba(211, 196, 255, 0.16);
  transition: color 180ms ease, border-color 180ms ease, background 180ms ease;
}

.practice-grid a:hover,
.practice-grid a:focus-visible {
  color: #ffffff;
  background: rgba(80, 59, 125, 0.16);
  border-color: rgba(255, 199, 220, 0.54);
  outline: none;
}

.practice-grid a > span {
  overflow-wrap: anywhere;
  font-size: 0.86rem;
}

.dog-wrapper {
  position: fixed;
  inset: 0;
  z-index: 6;
  display: flex;
  width: 100vw;
  height: 100vh;
  padding-right: max(28px, 8vw);
  padding-bottom: max(92px, 11vh);
  align-items: flex-end;
  justify-content: flex-end;
  box-sizing: border-box;
  opacity: 0.98;
  pointer-events: none;
  filter: drop-shadow(0 14px 18px rgba(0, 0, 0, 0.32));
}

.home-page .dog {
  z-index: 1;
  scale: 1.25;
  transform-origin: center bottom;
}

.dog-trail-star {
  position: absolute;
  z-index: 0;
  width: var(--trail-size, 3px);
  height: var(--trail-size, 3px);
  background: var(--trail-color, #fff5db);
  border-radius: 50%;
  box-shadow: 0 0 8px 2px color-mix(in srgb, var(--trail-color, #fff5db) 72%, transparent);
  transform: translate(-50%, -50%);
  animation: dog-trail-fade 1.7s ease-out forwards;
  pointer-events: none;
  will-change: opacity, transform;
}

footer {
  padding: 20px 16px 112px;
  color: rgba(218, 216, 239, 0.56);
  text-align: center;
  font-size: 0.72rem;
  background: rgba(4, 8, 28, 0.64);
  border-top: 1px solid rgba(211, 196, 255, 0.1);
}

.hidden-icon {
  position: absolute;
  z-index: 999;
  width: 40px;
  height: 40px;
  background-repeat: no-repeat;
  background-size: contain;
  opacity: 0;
  pointer-events: auto;
  transition: opacity 0.3s;
}

.hidden-icon.reveal {
  opacity: 1;
}

.orange {
  background-image: url("../assets/img/orange.png");
}

.crown {
  background-image: url("../assets/img/crown.png");
}

.easter-transition {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: #050716;
  animation: fade-in 0.5s ease-in;
}

.transition-img {
  max-width: 80vw;
  max-height: 80vh;
  animation: pop 0.5s ease-out;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@keyframes meteor-pass {
  0%, 1.5% {
    opacity: 0;
    transform: translate3d(0, 0, 0) rotate(var(--meteor-angle));
  }
  2.5% {
    opacity: 0.28;
  }
  3.5% {
    opacity: 0.96;
  }
  4.7% {
    opacity: 0.58;
  }
  5.8% {
    opacity: 0.9;
  }
  9.5%, 100% {
    opacity: 0;
    transform: translate3d(var(--meteor-travel-x), var(--meteor-travel-y), 0) rotate(var(--meteor-angle));
  }
}

@keyframes sky-plane-pass {
  0%, 8% {
    opacity: 0;
    transform: translate3d(0, 0, 0) rotate(34deg);
  }
  12% {
    opacity: 0.74;
  }
  56% {
    opacity: 0.66;
  }
  63%, 100% {
    opacity: 0;
    transform: translate3d(132vw, -16vh, 0) rotate(34deg);
  }
}

@keyframes dog-trail-fade {
  0% {
    opacity: 0.88;
    transform: translate(-50%, -50%) scale(1);
  }
  100% {
    opacity: 0;
    transform: translate(calc(-50% + var(--trail-drift-x, 0px)), calc(-50% - 14px)) scale(0.25);
  }
}

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

@keyframes pop {
  0% { transform: scale(0.6); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .dog-trail-star,
  .sky-plane,
  .star-stream span {
    animation: none;
  }

  .constellation-link,
  .constellation-icon {
    transition: none;
  }

  .journey-ready [data-journey-reveal] {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

@media (max-width: 760px) {
  .home-scene {
    background-position: 48% bottom;
  }

  .home-header {
    min-height: 27vh;
    padding: 88px 18px 8px;
  }

  .fill-text {
    font-size: 3.1rem;
  }

  .eyebrow {
    margin-top: 12px;
    font-size: 0.66rem;
    letter-spacing: 0;
  }

  .home-hero {
    min-height: 54vh;
    padding: 12px 18px 11vh;
  }

  .hero-copy {
    font-size: 0.94rem;
  }

  .star-navigation {
    min-height: 100vh;
    margin-top: -5vh;
    padding: 15vh 18px 180px;
  }

  .journey-heading {
    text-align: left;
  }

  .journey-heading h2 {
    font-size: 1.7rem;
  }

  .primary-menu {
    margin-top: 30px;
  }

  .primary-menu::before {
    left: 37px;
    right: auto;
  }

  .constellation-link,
  .constellation-link--tracker {
    grid-template-columns: 58px minmax(0, 1fr);
    width: 100%;
    min-height: 72vh;
    padding: 64px 8px;
    align-items: center;
    align-self: stretch;
    gap: 18px;
    transform: none;
  }

  .constellation-link:hover,
  .constellation-link:focus-visible,
  .constellation-link--tracker:hover,
  .constellation-link--tracker:focus-visible {
    transform: translateX(4px);
  }

  .journey-ready .constellation-link.is-visible:hover,
  .journey-ready .constellation-link.is-visible:focus-visible {
    transform: translateX(4px);
  }

  .constellation-icon {
    width: 58px;
    height: 58px;
    margin: 0;
    font-size: 1.7rem;
  }

  .constellation-copy {
    align-items: flex-start;
    text-align: left;
  }

  .constellation-copy strong {
    font-size: clamp(1.9rem, 10vw, 2.8rem);
  }

  .constellation-copy > span {
    font-size: 0.88rem;
  }

  .route-number {
    top: 18%;
    right: 4% !important;
    left: auto !important;
    font-size: 4.2rem;
  }

  .practice-hub {
    grid-template-columns: 1fr;
    margin-top: 48px;
    padding: 30px 20px;
    gap: 18px;
  }

  .practice-grid {
    grid-template-columns: 1fr;
    gap: 2px;
  }

  .practice-grid a {
    min-height: 50px;
  }

  .dog-wrapper {
    padding-right: 30px;
    padding-bottom: 92px;
  }

  .home-page .dog {
    scale: 1.12;
  }

  footer {
    padding-bottom: 106px;
  }
}
