:root {
  --page-bg: #f7fcff;
  --ink: #171614;
  --body-text: #343434;
  --landmark-blue: #5679d0;
  --button-blue: #014fa4;
  --white: #ffffff;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  overflow-x: hidden;
  color: var(--ink);
  background: var(--page-bg);
  font-family: Arial, "Helvetica Neue", Helvetica, sans-serif;
}

button,
input {
  font: inherit;
}

button,
a,
input {
  -webkit-tap-highlight-color: transparent;
}

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

/* 整个页面 */

.landing-page {
  position: relative;
  min-height: 100svh;
  overflow: hidden;
  background: var(--page-bg);
}

/* 顶部导航 */

.site-header {
  position: relative;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding:
    clamp(1.75rem, 5.55vh, 4rem)
    clamp(3.5rem, 5.45vw, 7rem)
    0;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.9rem;
  color: var(--ink);
  font-size: clamp(1.55rem, 1.55vw, 2rem);
  font-weight: 700;
  letter-spacing: -0.04em;
  text-decoration: none;
}

.brand-mark {
  display: inline-grid;
  place-items: center;
  font-size: 1.75rem;
  line-height: 1;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 1.65rem;
}

/* 搜索框 */

.search-box {
  display: flex;
  align-items: center;
  width: clamp(17rem, 23vw, 29.5rem);
  height: clamp(3.5rem, 6.5vh, 4.65rem);
  padding: 0 2rem;
  border: 1.5px solid var(--ink);
  border-radius: 999px;
  background: transparent;
  transition:
    background-color 180ms ease,
    box-shadow 180ms ease;
}

.search-box:focus-within {
  background: var(--white);
  box-shadow: 0 0 0 4px rgb(86 121 208 / 16%);
}

.search-box svg {
  width: 1.22rem;
  height: 1.22rem;
  flex: 0 0 auto;
  margin-right: 0.85rem;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-width: 2;
}

.search-box input {
  width: 100%;
  min-width: 0;
  padding: 0;
  border: 0;
  outline: 0;
  color: var(--ink);
  background: transparent;
  font-size: clamp(1rem, 1.3vw, 1.55rem);
  font-weight: 600;
}

.search-box input::placeholder {
  color: var(--ink);
  opacity: 1;
}

.search-box input::-webkit-search-cancel-button {
  cursor: pointer;
}

/* 登录按钮 */

.login-button {
  width: clamp(7rem, 8.2vw, 10.5rem);
  height: clamp(3.5rem, 6.5vh, 4.65rem);
  border: 0;
  border-radius: 999px;
  color: var(--white);
  background: var(--ink);
  cursor: pointer;
  font-size: clamp(1rem, 1.2vw, 1.45rem);
  transition:
    transform 180ms ease,
    background-color 180ms ease;
}

.login-button:hover {
  transform: translateY(-2px);
  background: #2d2b28;
}

/* 首屏主体 */

.hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(32rem, 46%) minmax(0, 1fr);
  min-height: calc(100svh - clamp(6rem, 12vh, 8.7rem));
  padding:
    0
    clamp(3.5rem, 5.45vw, 7rem)
    clamp(2rem, 4vh, 4rem);
}

/* 左侧文字区域 */

.hero-copy {
  position: relative;
  z-index: 3;
  width: 100%;
  max-width: 46rem;
  margin: 0;
  padding-top: clamp(3.5rem, 11.6vh, 8.5rem);
}

.hero h1 {
  position: relative;
  z-index: 3;
  margin: 0;
  color: var(--ink);
  font-size: clamp(3.5rem, 4.45vw, 5.75rem);
  font-weight: 700;
  letter-spacing: -0.07em;
  line-height: 1.1;
}

.hero h1 span {
  display: block;
  white-space: nowrap;
}

.hero-copy p {
  width: min(45rem, 100%);
  margin: clamp(4rem, 15.7vh, 11.3rem) 0 0;
  color: var(--body-text);
  font-size: clamp(1.1rem, 1.48vw, 1.9rem);
  font-weight: 400;
  letter-spacing: -0.024em;
  line-height: 1.55;
}

/* Enter按钮 */

.enter-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 1.25rem;
  width: clamp(13rem, 13.8vw, 17.7rem);
  height: clamp(4rem, 7.3vh, 5.25rem);
  margin-top: clamp(2rem, 4.6vh, 3.3rem);
  border-radius: 999px;
  color: var(--white);
  background: var(--button-blue);
  font-size: clamp(1.2rem, 1.3vw, 1.65rem);
  font-weight: 600;
  text-decoration: none;
  transition:
    transform 200ms ease,
    box-shadow 200ms ease,
    background-color 200ms ease;
}

.enter-button:hover {
  transform: translateY(-3px);
  background: #075bb5;
  box-shadow: 0 14px 30px rgb(1 79 164 / 20%);
}

.enter-button:focus-visible,
.login-button:focus-visible,
.brand:focus-visible {
  outline: 3px solid var(--landmark-blue);
  outline-offset: 4px;
}

/* 按钮箭头 */

.arrow {
  position: relative;
  display: block;
  width: 2.9rem;
  height: 1.4rem;
}

.arrow::before,
.arrow::after {
  position: absolute;
  content: "";
}

.arrow::before {
  top: 50%;
  left: 0;
  width: 2.55rem;
  height: 0.18rem;
  border-radius: 999px;
  background: currentColor;
  transform: translateY(-50%);
}

.arrow::after {
  top: 50%;
  right: 0.05rem;
  width: 0.95rem;
  height: 0.95rem;
  border-top: 0.18rem solid currentColor;
  border-right: 0.18rem solid currentColor;
  transform: translateY(-50%) rotate(45deg);
}

/* 花朵 */

.flower {
  position: absolute;
  z-index: 1;
  display: block;
  height: auto;
  object-fit: contain;
  user-select: none;
  pointer-events: none;
}

.flower-solid {
  top: 1.4rem;
  left: clamp(-16rem, -13vw, -10rem);
  width: clamp(13rem, 15vw, 19rem);
  transform: rotate(-13deg);
}

.flower-outline {
  z-index: 2;
  top: 10rem;
  left: clamp(29rem, 28vw, 35rem);
  width: clamp(13rem, 14vw, 18rem);
  transform: rotate(16deg);
}

/* 右侧长沙地标路线 */

.city-journey {
  position: relative;
  z-index: 1;
  grid-column: 2;
  grid-row: 1;
  align-self: start;
  justify-self: end;
  width: min(calc(100% + 5vw), 75rem);
  height: auto;
  aspect-ratio: 1000 / 720;
  margin-top: clamp(1.5rem, 4.4vh, 3.2rem);
  margin-right: -5vw;
  pointer-events: none;
}

/* 路线曲线 */

.route-line {
  position: absolute;
  z-index: 1;
  top: 20%;
  left: 4%;
  width: 99%;
  height: 87%;
  overflow: visible;
}

.route-line path {
  fill: none;
  stroke: var(--landmark-blue);
  stroke-linecap: round;
  stroke-width: 4;
  vector-effect: non-scaling-stroke;
  stroke-dasharray: 2500;
  stroke-dashoffset: 2500;
  animation: draw-route 1.55s 0.15s ease-out forwards;
}

/* 地标图片 */

.landmark {
  position: absolute;
  z-index: 3;
  display: block;
  object-fit: contain;
  filter: drop-shadow(0 8px 16px rgb(86 121 208 / 4%));
}

.landmark-academy {
  top: 7.4%;
  right: 3.3%;
  width: 31.3%;
}

.landmark-museum {
  top: 26.3%;
  left: 0;
  width: 40%;
}

.landmark-arts {
  top: 63.9%;
  right: 9.3%;
  width: 65.3%;
}

/* 路线圆点 */

.route-point {
  position: absolute;
  z-index: 4;
  width: clamp(1rem, 1.5vw, 1.9rem);
  height: clamp(1rem, 1.5vw, 1.9rem);
  border: 3px solid var(--landmark-blue);
  border-radius: 50%;
  background: var(--page-bg);
}

.route-point::after {
  position: absolute;
  inset: 0.25rem;
  content: "";
  border-radius: inherit;
  background: var(--landmark-blue);
}

.point-academy {
  top: 45.2%;
  right: 18.7%;
}

.point-museum {
  top: 73.7%;
  left: 20.4%;
}

.point-arts {
  right: 34.7%;
  bottom: 6%;
}

/* 路线动画 */

@keyframes draw-route {
  to {
    stroke-dashoffset: 0;
  }
}

/* 中等电脑屏幕 */

@media (max-width: 1280px) {
  .site-header {
    padding-top: clamp(1.5rem, 4vh, 2.6rem);
  }

  .search-box {
    width: clamp(15rem, 25vw, 20rem);
    height: clamp(3.4rem, 8vh, 4rem);
  }

  .login-button {
    width: clamp(6.5rem, 10.6vw, 8.5rem);
    height: clamp(3.4rem, 8vh, 4rem);
  }

  .hero {
    min-height: calc(
      100svh - clamp(5.5rem, 13vh, 6.6rem)
    );
  }

  .hero-copy {
    padding-top: clamp(3.5rem, 9vh, 6rem);
  }

  .hero h1 {
    font-size: clamp(3.2rem, 5.5vw, 4.8rem);
  }

  .hero-copy p {
    margin-top: clamp(3.5rem, 12vh, 7.2rem);
    font-size: clamp(1.1rem, 1.7vw, 1.35rem);
  }

  .city-journey {
    width: min(calc(100% + 4vw), 65rem);
    margin-top: 2rem;
    margin-right: -4vw;
  }
}

/* 窄窗口和平板 */

@media (max-width: 1050px) {
  .landing-page {
    overflow-y: auto;
  }

  .site-header {
    align-items: flex-start;
    padding: 2rem 1.5rem 0;
  }

  .header-actions {
    gap: 0.75rem;
  }

  .search-box {
    width: 13.5rem;
    height: 3.4rem;
    padding: 0 1.15rem;
  }

  .search-box input {
    font-size: 1rem;
  }

  .login-button {
    width: 6.4rem;
    height: 3.4rem;
    font-size: 1rem;
  }

  .hero {
    grid-template-columns: minmax(0, 1fr);
    min-height: auto;
    padding: 0 1.5rem 3rem;
  }

  .hero-copy {
    grid-column: 1;
    grid-row: 1;
    width: min(100%, 46rem);
    margin: 0;
    padding-top: 6rem;
  }

  .hero h1 {
    font-size: clamp(3.6rem, 10vw, 5.2rem);
  }

  .hero-copy p {
    width: min(100%, 40rem);
    margin-top: 5rem;
    font-size: 1.2rem;
    line-height: 1.6;
  }

  .flower-solid {
    top: 1rem;
    left: -8rem;
    width: 13rem;
  }

  .flower-outline {
    top: 8rem;
    left: min(50vw, 24rem);
    width: 12rem;
  }

  .city-journey {
    grid-column: 1;
    grid-row: 2;
    width: min(100%, 62rem);
    height: auto;
    margin: 2rem auto 0;
    transform: none;
  }

  .enter-button {
    position: relative;
    z-index: 5;
  }
}

/* 手机屏幕 */

@media (max-width: 620px) {
  .site-header {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 1.35rem 0.75rem;
  }

  .brand {
    font-size: 1.35rem;
  }

  .brand-mark {
    font-size: 1.4rem;
  }

  .header-actions {
    display: contents;
  }

  .search-box {
    grid-column: 1 / -1;
    grid-row: 2;
    width: 100%;
  }

  .login-button {
    grid-column: 2;
    grid-row: 1;
  }

  .hero {
    min-height: auto;
    padding-right: 1.25rem;
    padding-bottom: 2rem;
    padding-left: 1.25rem;
  }

  .hero-copy {
    padding-top: 4.5rem;
  }

  .hero h1 {
    font-size: clamp(2.35rem, 12vw, 4.4rem);
    letter-spacing: -0.065em;
    line-height: 1.12;
  }

  .hero-copy p {
    margin-top: 3.7rem;
    font-size: 1.05rem;
  }

  .enter-button {
    width: 13rem;
    height: 4.4rem;
    margin-top: 2.3rem;
    font-size: 1.25rem;
  }

  .flower-outline {
    top: 5.8rem;
    left: 49vw;
    width: 9rem;
  }

  .flower-solid {
    top: -0.5rem;
    left: -7rem;
    width: 11rem;
  }

  .city-journey {
    width: 112%;
    margin-top: 1rem;
    margin-right: -6%;
    margin-left: -6%;
  }
}

/* 减少动画设置 */

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

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}