/* CAP Aerotech — Coming Soon
   Type: Sora Bold (display) / Sora Light (text), per brand PSD.
   Chinese falls back to system CJK stack (Sora has no CJK glyphs). */

@font-face {
  font-family: 'Sora';
  font-weight: 700;
  src: url('/assets/fonts/Sora-Bold.woff2') format('woff2');
  font-display: swap;
}

@font-face {
  font-family: 'Sora';
  font-weight: 300;
  src: url('/assets/fonts/Sora-Light.woff2') format('woff2');
  font-display: swap;
}

:root {
  --ink: #ffffff;
  --ground: #16365c;
  --glow: rgba(235, 244, 255, .5);
  /* 整体缩放旋钮：1 = ver5 PSD 原始比例。字号与内容区宽度联动，
     改这一个数即可整体放大/缩小而不破坏三行文字的两端对齐 */
  --scale: 0.86;  /* 0.86 时标题=6.25vw，与原线上版本大小一致 */
}

html,
body {
  height: 100%;
  margin: 0;
}

body {
  font-family: 'Sora', 'PingFang SC', 'Noto Sans SC', 'Microsoft YaHei', system-ui, sans-serif;
  color: var(--ink);
  background: var(--ground);
  overflow: hidden;
}

.stage {
  position: fixed;
  inset: 0;
  overflow: hidden;
}

canvas#sky,
img#skyFallback {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

img#skyFallback {
  display: none;
}

/* 内容区宽度 = 标题第一行的实际渲染宽度（fit-content），水平居中。
   右边界因此天然等于第一行右端，Coming Soon（flex 右贴边）与地址行
   都对到这条线上 —— 对齐不再依赖字宽计算精度 */
.content {
  position: relative;
  height: 100dvh;
  box-sizing: border-box;
  width: fit-content;
  margin-inline: auto;    /* 整块严格水平居中 */
  display: grid;
  /* head | 弹性 | hero | 弹性 | contact：两个 1fr 等分剩余空间，
     大标题与上文（眉标）、下文（联系方式）间距严格一致 */
  grid-template-rows: auto 1fr auto 1fr auto;
}

.head {
  grid-row: 1;
  padding-top: 12.7vh;
}

.logo {
  width: 11.15vw;
  min-width: 118px;
  display: block;
}

.eyebrow {
  font-weight: 300;
  font-size: clamp(15px, calc(2.34vw * var(--scale)), 45px);
  letter-spacing: .01em;
  margin: 2.8vh 0 0;
}

.hero {
  grid-row: 3;
  margin: 0;
}

h1 {
  font-weight: 700;
  font-size: clamp(38px, calc(7.24vw * var(--scale)), 139px);
  line-height: 1.22;
  margin: 0;
  letter-spacing: .005em;
  text-shadow: 0 0 28px var(--glow), 0 0 90px rgba(235, 244, 255, .28);
}

.seg {
  display: inline;
  white-space: nowrap;
}

/* a headline segment never breaks internally */
/* desktop line 2: headline left, Coming Soon pushed to the right content edge,
   baselines aligned — both flush with the same guides as line 1 and the contact row */
.seg-last {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
}

.soon {
  font-weight: 300;
  font-size: clamp(17px, calc(2.3vw * var(--scale)), 44px);
  white-space: nowrap;
  color: rgba(255, 255, 255, .85);
}

.soon .dots {
  font-weight: 300;
}

/* PSD 中省略号为 Light 字重、放大字号 */
.soon-desktop .dots {
  font-size: 1.39em;
}

/* 61/44 */
.soon-mobile {
  display: none;
}

/* PC：两行结构 —— 第一行 Contact Address: + 完整地址，第二行 Email（per 设计稿）
   contain: inline-size 使其对 fit-content 内容区的宽度贡献为 0，
   长地址不会撑开内容区（否则大标题视觉左偏，Coming Soon 被甩到标题右缘之外） */
.contact {
  grid-row: 5;
  contain: inline-size;
  padding-bottom: 7.8vh;
  /* ver5: Email 行距底边 84/1080 */
  display: block;
  line-height: 1.4;
  /* ver5: 行距 43/31 */
  font-weight: 300;
  font-size: clamp(13px, calc(1.61vw * var(--scale)), 31px);
  color: rgba(255, 255, 255, .85);
  /* 比标题退后一层的柔和白 */
}

.contact-email {
  display: block;
}

.contact a {
  color: inherit;
  text-decoration: none;
  border-bottom: 1px solid rgba(255, 255, 255, .35);
}

.contact a:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 3px;
}

.only-m {
  display: none;
}

/* mobile-only content (per mobile PSD) */

/* mobile mirrors the 813x1759 mobile PSD proportions */
@media (max-width: 760px) {
  body {
    overflow: auto;
  }

  /* PSD margins are asymmetric: 13.4% left, 9% right — the headline needs that width */
  .content {
    width: auto;
    margin-inline: 0;
    padding: 14.2vh 9vw 0 13.4vw;
    min-height: 100svh;
    height: auto;
    display: flex;
    flex-direction: column;   /* 移动端沿用固定节奏排版，不做垂直居中 */
  }

  .head { padding-top: 0; }

  .logo {
    width: 21vw;
    min-width: 0;
  }

  .eyebrow {
    font-size: 3.9vw;
    margin-top: 2.3vh;
  }

  .hero {
    margin-top: 15.8vh;
    align-self: stretch;   /* 重置桌面端的垂直居中，移动端按固定节奏 */
  }

  h1 {
    font-size: 12.5vw;
    line-height: 1.22;
  }

  /* 移动 PSD：em≈103/813，行距 113/103 */
  .seg {
    display: block;
  }

  /* one headline segment per line */
  .soon-desktop {
    display: none;
  }

  .soon-mobile {
    display: block;
    margin: .5em 0 0;
    font-size: 4vw;
  }

  .soon-mobile .dots {
    font-weight: 700;
    font-size: 1.35em;
    letter-spacing: .08em;
  }

  /* 66/32，Light 字重继承自 .soon .dots */
  /* 沉底 + 距底边 7.9vh（= PSD 139/1759），顶部只留 5vh 保底间隙防极矮屏贴上文 */
  .contact {
    contain: none;      /* 取消桌面宽度隔离，flex 流式沉底 */
    padding-bottom: 0;  /* 底距用 margin-bottom，避免与桌面 padding 叠加 */
    display: block;
    line-height: 1.55;
    font-size: 3.4vw;
    margin-top: auto;
    padding-top: 5vh;
    margin-bottom: 7.9vh;
  }

  .contact span {
    display: inline;
    /* margin-right: .5em; */
  }

  .contact .contact-email {
    display: block;
    margin-right: 0;
    white-space: nowrap;
  }

  /* Email 独占一行，标签与地址永不分离 */
  .contact span {
    white-space: nowrap;
  }

  /* 必须写成 .contact .only-* 压过上面 .contact span 的 display 规则 */
  .contact .only-d {
    display: none;
  }

  .contact .only-m {
    display: inline;
  }

  /* 地址竖排：公司名/街道/邮编城市/国家 各一行 */
}