:root {
  color-scheme: dark;
  --background: #070809;
  --foreground: #f3f3f1;
  --muted: #a5a7a8;
  --line: rgba(243, 243, 241, 0.2);
  --accent: #f04421;
}

* { box-sizing: border-box; }

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

body {
  color: var(--foreground);
  font-family: "Microsoft YaHei", "PingFang SC", "Noto Sans CJK SC", Arial, sans-serif;
}

a { color: inherit; }

.hero {
  position: relative;
  min-height: 100dvh;
  overflow: hidden;
  isolation: isolate;
  background: var(--background);
}

.hero-visual,
.hero-scrim {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.hero-visual {
  z-index: -3;
  object-fit: cover;
  object-position: center;
}

.route-baked-mobile { display: none; }
.hero-visual.route-baked { object-position: center !important; }
.hero-visual.route-integrated {
  object-fit: fill;
  object-position: center;
}

.hero-scrim {
  z-index: -2;
  background:
    linear-gradient(90deg, rgba(7, 8, 9, 0.34) 0%, rgba(7, 8, 9, 0.02) 48%, rgba(7, 8, 9, 0.05) 100%),
    linear-gradient(180deg, rgba(7, 8, 9, 0.08) 68%, rgba(7, 8, 9, 0.62) 100%);
  pointer-events: none;
}

.site-header {
  position: relative;
  display: flex;
  height: 78px;
  align-items: center;
  justify-content: space-between;
  padding: 0 clamp(28px, 3.4vw, 58px);
}

.brand {
  display: block;
  width: clamp(170px, 13vw, 220px);
  line-height: 0;
}

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

.desktop-nav {
  display: flex;
  align-items: center;
  gap: clamp(36px, 4.3vw, 72px);
}

.desktop-nav a {
  position: relative;
  padding: 11px 0;
  color: #d8d9d7;
  font: 500 12px/1 Arial, sans-serif;
  letter-spacing: 0.12em;
  text-decoration: none;
}

.desktop-nav a::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: 3px;
  left: 0;
  height: 1px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 260ms cubic-bezier(0.16, 1, 0.3, 1);
}

.desktop-nav a:hover::after,
.desktop-nav a:focus-visible::after {
  transform: scaleX(1);
  transform-origin: left;
}

.desktop-nav a:focus-visible,
.direction-nav a:focus-visible,
.brand:focus-visible,
.mobile-menu summary:focus-visible {
  outline: 1px solid var(--accent);
  outline-offset: 6px;
}

.mobile-menu { display: none; }

.hero-copy {
  position: absolute;
  top: 38%;
  left: clamp(48px, 7.8vw, 132px);
  transform: translateY(-18%);
}

.hero-copy h1 {
  margin: 0;
  font-size: clamp(42px, 3.4vw, 58px);
  font-weight: 500;
  letter-spacing: 0.14em;
  line-height: 1.06;
}

.english-name {
  margin: 22px 0 0;
  font: 500 clamp(21px, 1.8vw, 29px)/1 Arial, sans-serif;
  letter-spacing: 0.26em;
}

.tagline { margin-top: clamp(44px, 5.5vh, 58px); }

.tagline p {
  margin: 0;
  color: #d0d1cf;
  font-size: clamp(17px, 1.3vw, 21px);
  font-weight: 400;
  letter-spacing: 0.1em;
}

.tagline p + p {
  margin-top: 14px;
  color: var(--muted);
  font: 400 clamp(13px, 1.05vw, 17px)/1.4 Arial, sans-serif;
  letter-spacing: 0.08em;
}

.direction-nav {
  position: absolute;
  right: clamp(42px, 5.2vw, 86px);
  bottom: clamp(48px, 7vh, 76px);
  left: clamp(42px, 5.2vw, 86px);
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  align-items: center;
  border-bottom: 1px solid var(--line);
}

.direction-nav a {
  position: relative;
  padding: 0 22px 20px 34px;
  color: #dcdddb;
  font-size: clamp(13px, 1vw, 16px);
  letter-spacing: 0.04em;
  text-decoration: none;
  transition: color 220ms ease, transform 220ms ease;
}

.direction-nav a::before {
  content: "";
  position: absolute;
  top: 1px;
  left: 18px;
  width: 1px;
  height: 17px;
  background: var(--accent);
  transition: height 220ms ease;
}

.direction-nav a:hover {
  color: var(--foreground);
  transform: translateY(-2px);
}

.direction-nav a:hover::before { height: 23px; }

@media (prefers-reduced-motion: no-preference) {
  .site-header { animation: reveal 700ms 80ms both; }
  .hero-copy { animation: reveal-copy 780ms 130ms both; }
  .direction-nav { animation: reveal 760ms 260ms both; }
  .hero-visual { animation: settle 1200ms both cubic-bezier(0.16, 1, 0.3, 1); }
}

@keyframes reveal {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes reveal-copy {
  from { opacity: 0; transform: translateY(calc(-18% + 16px)); }
  to { opacity: 1; transform: translateY(-18%); }
}

@keyframes settle {
  from { opacity: 0.72; transform: scale(1.018); }
  to { opacity: 1; transform: scale(1); }
}

@media (max-width: 760px) {
  .route-baked-desktop { display: none; }
  .route-baked-mobile { display: block; }

  .hero-visual {
    object-position: 72% center;
    opacity: 0.76;
  }

  .hero-scrim {
    background:
      linear-gradient(180deg, rgba(7, 8, 9, 0.84) 0%, rgba(7, 8, 9, 0.15) 31%, rgba(7, 8, 9, 0.36) 68%, rgba(7, 8, 9, 0.94) 100%),
      linear-gradient(90deg, rgba(7, 8, 9, 0.42), transparent 78%);
  }

  .site-header {
    height: 68px;
    padding-right: max(18px, env(safe-area-inset-right));
    padding-left: max(18px, env(safe-area-inset-left));
  }

  .brand { width: 148px; }
  .desktop-nav { display: none; }

  .mobile-menu {
    position: relative;
    display: block;
  }

  .mobile-menu summary {
    padding: 12px 0;
    font: 500 11px/1 Arial, sans-serif;
    letter-spacing: 0.16em;
    list-style: none;
    cursor: pointer;
  }

  .mobile-menu summary::-webkit-details-marker { display: none; }

  .mobile-menu nav {
    position: absolute;
    top: 38px;
    right: 0;
    display: grid;
    width: 160px;
    padding: 8px 16px;
    border: 1px solid rgba(243, 243, 241, 0.18);
    background: rgba(7, 8, 9, 0.94);
  }

  .mobile-menu nav a {
    padding: 12px 0;
    border-bottom: 1px solid rgba(243, 243, 241, 0.1);
    font: 500 11px/1 Arial, sans-serif;
    letter-spacing: 0.12em;
    text-decoration: none;
  }

  .mobile-menu nav a:last-child { border-bottom: 0; }

  .hero-copy {
    top: 20%;
    left: 24px;
    transform: none;
  }

  .hero-copy h1 {
    font-size: clamp(34px, 10vw, 42px);
    letter-spacing: 0.12em;
  }

  .english-name {
    margin-top: 14px;
    font-size: 18px;
  }

  .tagline { margin-top: 28px; }
  .tagline p { font-size: 16px; }
  .tagline p + p { margin-top: 10px; font-size: 12px; }

  .direction-nav {
    right: 20px;
    bottom: max(78px, calc(64px + env(safe-area-inset-bottom)));
    left: 20px;
    grid-template-columns: 1fr 1fr;
    border-bottom: 0;
    border-left: 1px solid var(--line);
  }

  .direction-nav a {
    min-height: 48px;
    padding: 7px 10px 9px 18px;
    border-bottom: 1px solid var(--line);
    font-size: 12px;
    line-height: 1.4;
  }

  .direction-nav a::before {
    top: 10px;
    left: 8px;
    height: 13px;
  }

  @keyframes reveal-copy {
    from { opacity: 0; transform: translateY(16px); }
    to { opacity: 1; transform: translateY(0); }
  }
}

@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;
  }
}
