/* Figma: 中轉頁 — 843:66197 (H5) / 843:66249 (web) */

.relay-page {
  --relay-green: #03c75a;
  --relay-card-bg: #121212;
  --relay-card-border-w: 2px;
  --relay-route-h: 100px;
  --relay-route-radius: 16px;
  --relay-route-title: 28px;
  --relay-route-url: 24px;
  --relay-route-gap: 26px;
  --relay-email-text: 24px;
  --relay-social-gap: 75px;
  --relay-social-label: 20px;
  --relay-social-icon: 64px;
  --relay-footer-text: 20px;
  --relay-content-w: 660px;
  --relay-routes-w: 460px;
  --relay-banner-w: 400px;
  --relay-banner-gap: 20px;

  margin: 0;
  height: 100vh;
  height: 100dvh;
  background: #000;
  color: #fff;
  font-family: "PingFang SC", "PingFang HK", "Microsoft YaHei", sans-serif;
  font-size: 16px;
  line-height: 1.4;
  overflow: hidden;
}

/* 一屏适配容器：JS（relay-page.js fitRelayFrame）按可视高度算出缩放比例，
   对 .relay-frame 做等比 transform: scale()，保证任何窗口高度都不出现纵向滚动条，
   且中间内容各元素之间的比例始终与 Figma 原设计（843:66249 / 843:66197）保持一致 */
.relay-viewport {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

.relay-frame {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  transform-origin: top center;
}

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

.relay-page a {
  color: inherit;
  text-decoration: none;
}

.relay-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  background: #000;
}

/* Figma 843:66198 / 843:66282 整帧导出，已含报纸拼贴与 60% 照片层 */
.relay-bg-img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
}

.relay-main {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: min(100%, var(--relay-content-w));
  margin: 0 auto;
  padding: 256px 45px 32px;
  gap: 0;
}

.relay-banner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--relay-banner-gap);
  width: 100%;
  margin: 0 0 10px;
  padding: 34px 0 0;
}

.relay-banner-logo {
  display: block;
  width: min(100%, var(--relay-banner-w));
  height: auto;
}

.relay-banner-tagline {
  margin: 0;
  width: min(100%, 500px);
  font-size: 14px;
  font-weight: 500;
  line-height: 24px;
  letter-spacing: 0.02em;
  text-align: center;
  color: #b7b7b7;
}

.relay-routes {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--relay-route-gap);
  width: min(100%, var(--relay-routes-w));
  margin-bottom: 48px;
}

.relay-route-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: var(--relay-route-h);
  padding: 11px 16px;
  border: var(--relay-card-border-w) solid var(--relay-green);
  border-radius: var(--relay-route-radius);
  background: var(--relay-card-bg);
  text-align: center;
  transition: background 0.15s ease, transform 0.15s ease;
}

.relay-route-card:hover,
.relay-route-card:focus-visible {
  background: rgba(3, 199, 90, 0.08);
  transform: translateY(-1px);
}

.relay-route-card:focus-visible {
  outline: 2px solid var(--relay-green);
  outline-offset: 2px;
}

.relay-route-label {
  margin: 0;
  font-size: var(--relay-route-title);
  font-weight: 500;
  line-height: 1.4;
  color: #fff;
}

.relay-route-url {
  margin: 0;
  font-size: var(--relay-route-url);
  font-weight: 500;
  line-height: 1.4;
  color: var(--relay-green);
  word-break: break-all;
}

.relay-email {
  width: 100%;
  margin-bottom: 48px;
}

.relay-email-box {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: var(--relay-route-h);
  padding: 16px 24px;
  border-radius: var(--relay-route-radius);
  overflow: hidden;
  background: var(--relay-card-bg);
}

.relay-email-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
}

.relay-email-text {
  position: relative;
  z-index: 1;
  margin: 0;
  font-size: var(--relay-email-text);
  font-weight: 500;
  line-height: 1.42;
  text-align: center;
}

.relay-email-text p {
  margin: 0;
}

.relay-accent {
  color: var(--relay-green);
}

.relay-social {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: center;
  gap: 12px var(--relay-social-gap);
  width: 100%;
  max-width: 564px;
}

.relay-social-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  min-width: 80px;
  font-size: var(--relay-social-label);
  line-height: 1.4;
  text-align: center;
  color: #fff;
  transition: opacity 0.15s ease;
}

.relay-social-item:hover {
  opacity: 0.85;
}

.relay-social-icon {
  display: block;
  width: var(--relay-social-icon);
  height: var(--relay-social-icon);
  object-fit: contain;
}

.relay-footer {
  position: relative;
  z-index: 1;
  flex-shrink: 0;
  width: min(100%, 661px);
  margin: 24px auto 0;
  padding: 0 16px 32px;
  font-size: var(--relay-footer-text);
  line-height: 1.5;
  text-align: center;
  color: #fff;
}

.relay-footer p {
  margin: 0 0 8px;
}

/* 设计稿单行免责声明；窄屏缩小字号避免与上方社交区视觉重叠 */
.relay-footer-disclaimer {
  white-space: nowrap;
  font-size: clamp(11px, 2.6vw, var(--relay-footer-text));
  line-height: 1.5;
}

/* 桌面断点：尺寸 1:1 还原 Figma 843:66249（不再手动改数值），
   一屏适配交给 .relay-frame 的 JS 动态 scale 统一处理 */
@media (min-width: 801px) {
  .relay-page {
    --relay-card-border-w: 1px;
    --relay-route-h: 96px;
    --relay-route-radius: 8px;
    --relay-route-title: 24px;
    --relay-route-url: 20px;
    --relay-route-gap: 28px;
    --relay-email-text: 20px;
    --relay-social-gap: 24px;
    --relay-content-w: 563px;
    --relay-routes-w: 532px;
  }

  .relay-bg-img {
    object-position: center center;
  }

  .relay-main {
    padding: 66px 16px 24px;
    gap: 28px;
  }

  .relay-banner {
    margin-bottom: 0;
    padding-top: 0;
  }

  .relay-routes,
  .relay-email {
    margin-bottom: 0;
  }

  .relay-route-card {
    background: rgba(0, 0, 0, 0.4);
  }

  .relay-email-box {
    border-radius: 16px;
  }

  .relay-email-text {
    line-height: 1.8;
  }

  .relay-social {
    max-width: 563px;
    gap: 24px;
  }

  .relay-social-item {
    color: rgba(255, 255, 255, 0.8);
  }

  .relay-footer {
    margin-top: 28px;
    padding: 0 16px 38px;
  }
}

@media (max-width: 800px) {
  .relay-main {
    padding-top: clamp(180px, 34vw, 256px);
    padding-left: 45px;
    padding-right: 45px;
  }

  .relay-social {
    flex-wrap: nowrap;
    justify-content: space-between;
    gap: 12px;
    max-width: 564px;
    width: 100%;
  }

  .relay-social-item {
    width: auto;
    min-width: 0;
    flex: 0 1 auto;
    font-size: clamp(14px, 2.8vw, 20px);
  }

  .relay-social-icon {
    width: clamp(48px, 12vw, 64px);
    height: clamp(48px, 12vw, 64px);
  }
}

@media (max-width: 420px) {
  .relay-main {
    padding-left: 16px;
    padding-right: 16px;
  }

  .relay-social {
    flex-wrap: wrap;
    justify-content: center;
    gap: 16px 24px;
  }

  .relay-social-item {
    width: calc(50% - 12px);
  }
}
