:root {
  color-scheme: dark;
  --ink: #050607;
  --paper: #f3f3f2;
  --muted: #96989a;
  --line: rgba(243, 243, 242, .42);
  --accent: #ff4a1f;
}

* { box-sizing: border-box; }

html,
body {
  margin: 0;
  min-width: 320px;
  min-height: 100%;
  background: var(--ink);
  color: var(--paper);
  font-family: "Microsoft YaHei", "PingFang SC", "Noto Sans CJK SC", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

body { overflow: hidden; }

.contact-slide {
  position: relative;
  isolation: isolate;
  width: 100%;
  min-height: 100dvh;
  overflow: hidden;
  background: var(--ink);
}

.scene {
  position: absolute;
  inset: 0;
  z-index: -3;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.route-baked-mobile { display: none; }
.scene.route-baked { object-position: center !important; }

.scene-shade {
  position: absolute;
  inset: 0;
  z-index: -2;
  background:
    linear-gradient(90deg, rgba(4, 5, 6, .96) 0%, rgba(4, 5, 6, .76) 22%, rgba(4, 5, 6, .10) 49%, rgba(4, 5, 6, .08) 82%, rgba(4, 5, 6, .34) 100%),
    linear-gradient(180deg, rgba(0, 0, 0, .20), transparent 40%, rgba(0, 0, 0, .34));
}

.title-block {
  position: absolute;
  z-index: 4;
  left: clamp(46px, 5.4vw, 92px);
  top: clamp(74px, 13.5vh, 134px);
  width: 390px;
}

.title-block h1,
.title-block h2,
.title-block p { margin: 0; }

.title-block h1 {
  font-size: clamp(44px, 3.2vw, 58px);
  font-weight: 500;
  line-height: 1.08;
  letter-spacing: .18em;
  white-space: nowrap;
}

.title-en {
  margin-top: 13px !important;
  color: #b8b9bb;
  font: 400 20px/1.2 Arial, sans-serif;
  letter-spacing: .18em;
}

.title-block h2 {
  margin-top: 54px !important;
  font-size: 22px;
  font-weight: 400;
  line-height: 1.55;
  letter-spacing: .13em;
}

.title-note {
  margin-top: 10px !important;
  color: var(--muted);
  font: 400 12px/1.55 Arial, sans-serif;
  letter-spacing: .08em;
}

.continuity-line {
  position: absolute;
  inset: 0;
  z-index: 3;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.continuity-line path {
  fill: none;
  stroke: var(--accent);
  stroke-width: 1.7;
  vector-effect: non-scaling-stroke;
  stroke-dasharray: 900;
  stroke-dashoffset: 900;
  animation: draw-path 1.1s cubic-bezier(.16, 1, .3, 1) forwards;
}

.continuity-line circle {
  fill: var(--accent);
  stroke: rgba(243, 243, 242, .78);
  stroke-width: .7;
  opacity: 0;
  animation: reveal-core .35s ease .82s forwards;
}

.contact-routes {
  position: absolute;
  z-index: 4;
  inset: 0;
}

.route {
  position: absolute;
  display: grid;
  gap: 7px;
  min-width: 218px;
  color: var(--paper);
  text-decoration: none;
  opacity: 0;
  transform: translateY(8px);
  animation: reveal-route .55s cubic-bezier(.16, 1, .3, 1) forwards;
}

.route::before {
  content: "";
  position: absolute;
  background: var(--line);
  transition: background .2s ease, transform .2s ease;
}

.route::after {
  content: "";
  position: absolute;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
}

.route strong { font-size: 14px; font-weight: 400; letter-spacing: .12em; }
.route span { color: var(--muted); font: 400 10px/1.2 Arial, sans-serif; letter-spacing: .08em; }
.route:hover::before { background: var(--accent); transform: scaleX(1.08); }
.route:focus-visible { outline: 1px solid var(--accent); outline-offset: 8px; }

.route-top {
  left: 58.3%;
  top: 13.5%;
  padding-left: 40px;
  animation-delay: .95s;
}

.route-top::before { left: 0; top: 8px; width: 26px; height: 1px; transform-origin: right; }
.route-top::after { left: 25px; top: 5px; }

.route-left {
  left: 34.2%;
  top: 72.5%;
  padding-right: 44px;
  text-align: right;
  animation-delay: 1.05s;
}

.route-left::before { right: 0; top: 8px; width: 30px; height: 1px; transform-origin: left; }
.route-left::after { right: 29px; top: 5px; }

.route-right {
  right: 3.8%;
  top: 72.5%;
  padding-left: 44px;
  animation-delay: 1.15s;
}

.route-right::before { left: 0; top: 8px; width: 30px; height: 1px; transform-origin: right; }
.route-right::after { left: 29px; top: 5px; }

.contact-entry {
  position: absolute;
  z-index: 4;
  left: clamp(46px, 5.4vw, 92px);
  bottom: 118px;
  width: 242px;
  padding: 20px 22px;
  border: 1px solid rgba(243, 243, 242, .68);
  color: var(--paper);
  text-decoration: none;
  transition: border-color .2s ease, background .2s ease, transform .2s ease;
}

.contact-entry:hover { border-color: var(--accent); background: rgba(255, 74, 31, .06); }
.contact-entry:active { transform: translateY(1px); }
.contact-entry:focus-visible { outline: 1px solid var(--accent); outline-offset: 4px; }
.contact-entry strong { display: block; font-size: 16px; font-weight: 400; letter-spacing: .14em; }
.contact-entry span { display: block; margin-top: 10px; color: #b5b7b9; font: 400 11px/1 Arial, sans-serif; letter-spacing: .1em; }

.slide-footer {
  position: absolute;
  z-index: 4;
  left: clamp(46px, 5.4vw, 92px);
  bottom: 42px;
  display: grid;
  gap: 8px;
}

.slide-footer p,
.slide-footer span { margin: 0; }
.slide-footer p { color: #c8c9ca; font-size: 11px; letter-spacing: .11em; }
.slide-footer span { color: #63666a; font: 400 9px/1 Arial, sans-serif; letter-spacing: .14em; }

@keyframes draw-path { to { stroke-dashoffset: 0; } }
@keyframes reveal-core { to { opacity: 1; } }
@keyframes reveal-route { to { opacity: 1; transform: translateY(0); } }

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

  body { overflow: auto; }
  .contact-slide { min-height: 100dvh; }
  .scene { object-position: 62% center; }
  .scene-shade { background: linear-gradient(180deg, rgba(4,5,6,.92), rgba(4,5,6,.30) 54%, rgba(4,5,6,.80)); }
  .title-block { top: 54px; left: 28px; width: calc(100% - 56px); }
  .title-block h1 { font-size: 40px; }
  .title-en { font-size: 15px; }
  .title-block h2 { margin-top: 28px !important; font-size: 18px; }
  .contact-routes { display: none; }
  .continuity-line { display: block; }
  .contact-entry { left: 28px; bottom: 96px; }
  .slide-footer { left: 28px; bottom: 30px; }
}

@media (max-width: 760px) {
  .contact-entry { bottom: max(146px, calc(132px + env(safe-area-inset-bottom))); }
  .slide-footer { bottom: max(82px, calc(68px + env(safe-area-inset-bottom))); }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after { animation-duration: .01ms !important; animation-delay: 0ms !important; transition-duration: .01ms !important; }
}
