/* 成都泰拓科技有限公司 · 官网首页
   改主题色只需改 :root 里的 --accent。 */

:root {
  --paper:       #F2F1ED;
  --ink:         #121315;
  --ink-soft:    #2A2C30;
  --grey:        #5F6367;

  --accent:      #FF5A24;  /* 装饰用：中心光点、扫描光束、光晕 */
  --accent-text: #B8431A;  /* 文字用：亮底上 --accent 对比度不足，链接 hover 用这个 */

  --line-weak:   rgba(0, 0, 0, .11);
  --line:        rgba(0, 0, 0, .14);
  --line-strong: rgba(0, 0, 0, .24);

  --mx: 0px;   /* 鼠标视差，由 script.js 写入 */
  --my: 0px;
}

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

html, body { height: 100%; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
  -webkit-font-smoothing: antialiased;
}

h1, p { margin: 0; }

a { color: inherit; text-decoration: none; }

.mono,
.latin,
.tagline-en,
.hud,
.legal,
.clink { font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace; }

/* ── 画布 ───────────────────────────────────────────── */

.site {
  position: relative;
  height: 100vh;
  min-height: 600px;
  overflow: hidden;
  background: var(--paper);
}

/* ── 氛围层 ─────────────────────────────────────────── */

.atmos,
.scanlines,
.vignette,
.aperture {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.atmos { overflow: hidden; }

.haze {
  position: absolute;
  border-radius: 50%;
  animation: haze 26s ease-in-out infinite;
}

.haze--warm {
  left: 50%;
  top: 50%;
  width: 1200px;
  height: 1200px;
  margin: -600px 0 0 -600px;
  background: radial-gradient(closest-side, color-mix(in srgb, var(--accent) 11%, transparent), transparent 72%);
}

.haze--cool {
  left: 18%;
  top: 78%;
  width: 820px;
  height: 820px;
  margin: -410px 0 0 -410px;
  background: radial-gradient(closest-side, rgba(90, 125, 205, .1), transparent 70%);
  animation-duration: 34s;
  animation-direction: reverse;
}

.scanlines {
  background-image: repeating-linear-gradient(to bottom, rgba(0, 0, 0, .03) 0 1px, transparent 1px 4px);
  animation: scan 7s linear infinite;
}

.vignette {
  background: radial-gradient(125% 92% at 50% 44%, transparent 30%, rgba(255, 255, 253, .82) 100%);
}

/* ── 光圈装置 ───────────────────────────────────────── */

.aperture {
  display: flex;
  align-items: center;
  justify-content: center;
  transform: translate3d(var(--mx), var(--my), 0);
  transition: transform .9s cubic-bezier(.16, .84, .26, 1);
}

.aperture__inner {
  position: relative;
  width: min(780px, 138vw);
  height: min(780px, 138vw);
}

.dial,
.beam,
.ring {
  position: absolute;
  border-radius: 50%;
}

/* 放射刻度盘：一正一反极慢旋转 */
.dial--a {
  inset: 0;
  background: repeating-conic-gradient(from 0deg, var(--line) 0deg 0.34deg, transparent 0.34deg 6deg);
  -webkit-mask-image: radial-gradient(closest-side, transparent 64%, #000 68%, #000 83%, transparent 87%);
          mask-image: radial-gradient(closest-side, transparent 64%, #000 68%, #000 83%, transparent 87%);
  animation: spin 150s linear infinite;
}

.dial--b {
  inset: 26%;
  background: repeating-conic-gradient(from 0deg, var(--line-weak) 0deg 0.22deg, transparent 0.22deg 3deg);
  -webkit-mask-image: radial-gradient(closest-side, transparent 74%, #000 80%, #000 94%, transparent 98%);
          mask-image: radial-gradient(closest-side, transparent 74%, #000 80%, #000 94%, transparent 98%);
  animation: spin-rev 96s linear infinite;
}

/* 扫描光束 */
.beam {
  inset: 0;
  overflow: hidden;
  -webkit-mask-image: radial-gradient(closest-side, transparent 58%, #000 72%, transparent 92%);
          mask-image: radial-gradient(closest-side, transparent 58%, #000 72%, transparent 92%);
  animation: spin 24s linear infinite;
}

.beam__sweep {
  position: absolute;
  inset: 0;
  background: conic-gradient(from 0deg,
    transparent 0deg,
    transparent 274deg,
    color-mix(in srgb, var(--accent) 30%, transparent) 352deg,
    transparent 360deg);
}

.ring--a {
  inset: 0;
  border: 1px solid rgba(0, 0, 0, .12);
  animation: breathe 11s ease-in-out infinite;
}

.ring--b {
  inset: 13.2%;
  border: 1px dashed var(--line);
  animation: spin 74s linear infinite;
}

.ring--c {
  inset: 23.7%;
  border: 1px solid var(--line-strong);
  border-top-color: transparent;
  border-left-color: transparent;
  animation: spin-rev 28s linear infinite;
}

.ring--d {
  inset: 33.6%;
  border: 1px dashed var(--line-weak);
  animation: spin 46s linear infinite;
}

/* ── 中心内容 ───────────────────────────────────────── */

.stage {
  position: relative;
  z-index: 2;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 0 24px;
  transform: translate3d(calc(var(--mx) * -.34), calc(var(--my) * -.34), 0);
  transition: transform 1.1s cubic-bezier(.16, .84, .26, 1);
}

.core {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  animation: core 3.6s ease-in-out infinite;
}

.bigname {
  margin-top: 38px;
  font-size: clamp(86px, 15vw, 232px);
  line-height: .92;
  letter-spacing: -.03em;
  font-weight: 900;
  animation: track 2s cubic-bezier(.16, .84, .26, 1) .25s both;
}

.latin {
  margin-top: 30px;
  font-size: 11px;
  letter-spacing: .54em;
  text-indent: .54em;
  color: var(--grey);
  animation: up 1.2s cubic-bezier(.16, .84, .26, 1) 1.15s both;
}

.hairline {
  width: 72px;
  height: 1px;
  margin-top: 40px;
  background: rgba(0, 0, 0, .26);
  transform-origin: center;
  animation: wide 1.4s cubic-bezier(.16, .84, .26, 1) 1.4s both;
}

.tagline {
  margin-top: 40px;
  min-height: 36px;
  font-size: clamp(16px, 1.6vw, 21px);
  line-height: 1.8;
  letter-spacing: .22em;
  text-indent: .22em;
  font-weight: 300;
  color: var(--ink-soft);
  animation: fade 1.4s ease-out 1.6s both;
}

.tagline-en {
  margin-top: 24px;
  font-size: 11px;
  line-height: 1.7;
  letter-spacing: .42em;
  text-indent: .42em;
  color: var(--grey);
  animation: fade 1.8s ease-out 2.85s both;
}

/* ── 四角信息 ───────────────────────────────────────── */

.hud {
  position: absolute;
  z-index: 3;
  font-size: 11px;
  color: var(--grey);
  animation: fade 1.6s ease-out 2s both;
}

.hud--top {
  left: 0;
  right: 0;
  top: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  letter-spacing: .16em;
}

.caret {
  width: 6px;
  height: 12px;
  background: var(--grey);
  animation: blink 1.1s step-end infinite;
}

.hud--bl {
  left: 32px;
  bottom: 28px;
  letter-spacing: .14em;
}

.hud--br {
  right: 32px;
  bottom: 28px;
  display: flex;
  align-items: center;
  gap: 24px;
}

.clink {
  position: relative;
  font-size: 11px;
  letter-spacing: .2em;
  color: var(--ink);
  transition: color .4s;
}

.clink::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -5px;
  height: 1px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .5s cubic-bezier(.16, .84, .26, 1);
}

.clink:hover { color: var(--accent-text); }
.clink:hover::after { transform: scaleX(1); }

.legal {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 10px;
  letter-spacing: .06em;
  color: var(--grey);
}

.legal__dot {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: rgba(0, 0, 0, .28);
  flex: none;
}

.beian { transition: color .4s; }
.beian:hover { color: var(--ink); }

/* ── 动画 ───────────────────────────────────────────── */

@keyframes spin     { to { transform: rotate(360deg); } }
@keyframes spin-rev { to { transform: rotate(-360deg); } }
@keyframes blink    { 50% { opacity: 0; } }
@keyframes fade     { from { opacity: 0; } to { opacity: 1; } }
@keyframes scan     { to { background-position: 0 4px; } }
@keyframes wide     { from { transform: scaleX(0); } to { transform: scaleX(1); } }

@keyframes up {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: none; }
}

/* 字距从张开收紧 + 去模糊：首屏主动效 */
@keyframes track {
  from { opacity: 0; letter-spacing: .72em; filter: blur(16px); }
  to   { opacity: 1; letter-spacing: -.03em; filter: blur(0); }
}

@keyframes breathe {
  0%, 100% { transform: scale(1);    opacity: .5; }
  50%      { transform: scale(1.03); opacity: 1; }
}

@keyframes core {
  0%, 100% { opacity: .5; box-shadow: 0 0 0 0 transparent; }
  50%      { opacity: 1;  box-shadow: 0 0 30px 7px color-mix(in srgb, var(--accent) 38%, transparent); }
}

@keyframes haze {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50%      { transform: translate(3%, -4%) scale(1.14); }
}

/* ── 响应式 ─────────────────────────────────────────── */

@media (max-width: 760px) {
  .hud--top { top: 20px; }

  .hud--bl {
    left: 20px;
    bottom: 20px;
  }

  .hud--br {
    right: 20px;
    bottom: 20px;
    flex-direction: column;
    align-items: flex-end;
    gap: 10px;
  }

  .legal { font-size: 9.5px; }
  .tagline-en { letter-spacing: .34em; text-indent: .34em; }
}

@media (max-width: 420px) {
  .legal {
    flex-wrap: wrap;
    justify-content: flex-end;
  }
}

@media (prefers-reduced-motion: reduce) {
  .site *,
  .site *::after { animation: none !important; transition: none !important; }
}
