/* ==========================================================================
   赢思派咨询 · 欢迎页
   设计稿：欢迎页面.psd （1920 × 1002）
   版式基准：.artboard 的 1em = 设计稿 72px（即宽度 1920 时 1em = 72px）
   ========================================================================== */

:root {
  --bg: #151515;
  --gold: #f3ca20;
  --gold-dim: rgba(243, 202, 32, .8);
  --gold-faint: rgba(243, 202, 32, .21);
  --line: #3b3b3b;
  --grid: rgba(0, 0, 0, .1);
  --ease-out: cubic-bezier(.22, .61, .36, 1);
}

* { box-sizing: border-box; }

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

body {
  background: #151515;
  background: var(--bg);
  color: #fff;
  font-family: "Helvetica Neue", Helvetica, Arial,
               "PingFang SC", "Microsoft YaHei", "Hiragino Sans GB",
               "Source Han Sans SC", "Noto Sans CJK SC", sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow: hidden;
  -webkit-tap-highlight-color: transparent;
}

/* ---------- 舞台 ---------- */

.splash {
  background: #151515;
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  overflow: hidden;
  background: var(--bg);
  transition: opacity .42s ease;
}

/* 背景的 8px 极细网格，还原设计稿的暗部纹理 */
.splash::before {
  content: "";
  position: absolute;
  top: 0; right: 0; bottom: 0; left: 0;
  pointer-events: none;
  background-image:
    repeating-linear-gradient(90deg, var(--grid) 0, var(--grid) 1px, transparent 1px, transparent 8px),
    repeating-linear-gradient(0deg,  var(--grid) 0, var(--grid) 1px, transparent 1px, transparent 8px);
}

/* 版面容器：等比缩放并居中，保持设计稿的构图比例 */
.artboard {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 100vw;
  height: 52.1875vw;          /* 1002 / 1920 */
  font-size: 3.75vw;          /* 72 / 1920  → 以下所有尺寸以 em 表达 */
  -webkit-transform: translate(-50%, -50%);
          transform: translate(-50%, -50%);
}

/* 支持 min() 的浏览器里，同时受高度限制，短屏也不会溢出 */
@supports (width: min(1vw, 1vh)) {
  .artboard {
    width: min(100vw, 191.62vh);
    height: calc(min(100vw, 191.62vh) * 0.521875);
    font-size: calc(min(100vw, 191.62vh) * 0.0375);
  }
}

/* ---------- 狮子线稿 ---------- */

.lion {
  position: absolute;
  left: 32.9167%;    /* 632 / 1920 */
  top: 16.1677%;     /* 162 / 1002 */
  width: 33.1771%;   /* 637 / 1920 */
  height: 62.8743%;  /* 630 / 1002 */
  display: block;
  overflow: visible;
}

.lion line {
  stroke: #3b3b3b;
  stroke: var(--line);
}

/* ---------- 文字 ---------- */

.brand__url,
.brand__cn {
  position: absolute;
  margin: 0;
  white-space: nowrap;
}

/* www. / inspirect. / com */
.brand__url {
  left: 32.7604%;    /* 629 / 1920 */
  top: 37.6250%;     /* 377 / 1002 */
  font-size: .98em;  /* 70.5 / 72 */
  line-height: .83;
  font-weight: 700;
  letter-spacing: -.032em;
  color: rgba(243, 202, 32, .21);
  color: var(--gold-faint);
  text-shadow: 0 0 .16em rgba(0, 0, 0, .9), 0 0 .5em rgba(0, 0, 0, .55);
}

.brand__line {
  display: block;
}

/* 赢思派咨询 */
.brand__cn {
  left: 32.5521%;    /* 625 / 1920 */
  top: 55.9880%;     /* 561 / 1002 */
  font-size: .65em;  /* 46.8 / 72 */
  line-height: 1;
  font-weight: 700;
  letter-spacing: -.03em;
  color: rgba(243, 202, 32, .8);
  color: var(--gold-dim);
  text-shadow: 0 0 .18em rgba(0, 0, 0, .95), 0 0 .55em rgba(0, 0, 0, .6);
}

/* Continue */
.enter {
  position: absolute;
  left: 39.6350%;    /* 761 / 1920 */
  top: 61.2777%;     /* 614 / 1002 */
  display: inline-block;
  padding: .55em .2em .55em 0;
  font-size: .3056em; /* 22 / 72 */
  line-height: 1.35;
  font-weight: 400;
  letter-spacing: .015em;
  color: #f3ca20;
  color: var(--gold);
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  border-radius: 2px;
}

.enter__text {
  display: inline-block;
  vertical-align: middle;
}

.enter__chev {
  color: #f3ca20;
  display: inline-block;
  width: .58em;
  height: .78em;
  margin-left: .34em;
  vertical-align: -.02em;
  color: var(--gold);
}

.enter__chev svg {
  display: block;
  width: 100%;
  height: 100%;
}

.enter:hover,
.enter:focus {
  color: #ffd93a;
  outline: none;
}

.enter:hover .enter__chev,
.enter:focus .enter__chev {
  color: #ffd93a;
}

.enter:focus-visible {
  box-shadow: 0 0 0 1px rgba(243, 202, 32, .55);
}

/* ---------- 入场动画 ---------- */

/* 确认可以播放动画时才先把元素藏起来：
   .motion 由 <head> 中的脚本在支持 CSS 动画且未开启“减弱动效”时添加，
   因此老浏览器 / 无脚本 / 减弱动效 三种情况都能直接看到完整画面 */
.motion .brand__line,
.motion .brand__cn,
.motion .enter {
  opacity: 0;
}

.motion .lion line {
  stroke-dasharray: var(--l) var(--l);
  stroke-dashoffset: var(--l);
  -webkit-animation: lionDraw .62s var(--ease-out) both;
          animation: lionDraw .62s var(--ease-out) both;
  -webkit-animation-delay: calc(80ms + var(--i) * 14ms);
          animation-delay: calc(80ms + var(--i) * 14ms);
}

.motion .brand__line,
.motion .brand__cn {
  -webkit-animation: riseIn .68s var(--ease-out) both;
          animation: riseIn .68s var(--ease-out) both;
}

.motion .brand__line--1 { animation-delay: .46s; -webkit-animation-delay: .46s; }
.motion .brand__line--2 { animation-delay: .58s; -webkit-animation-delay: .58s; }
.motion .brand__line--3 { animation-delay: .70s; -webkit-animation-delay: .70s; }
.motion .brand__cn      { animation-delay: .92s; -webkit-animation-delay: .92s; }

.motion .enter {
  -webkit-animation: riseIn .7s var(--ease-out) 1.18s both;
          animation: riseIn .7s var(--ease-out) 1.18s both;
}

/* 箭头轻轻向右“呼吸”，提示可点击（只动箭头，不影响文字位置） */
.motion .enter__chev {
  -webkit-animation: chevPulse 3.2s ease-in-out 2.6s infinite;
          animation: chevPulse 3.2s ease-in-out 2.6s infinite;
}

@-webkit-keyframes lionDraw {
  from { stroke-dashoffset: var(--l); }
  to   { stroke-dashoffset: 0; }
}
@keyframes lionDraw {
  from { stroke-dashoffset: var(--l); }
  to   { stroke-dashoffset: 0; }
}

@-webkit-keyframes riseIn {
  from { opacity: 0; -webkit-transform: translate3d(0, .17em, 0); transform: translate3d(0, .17em, 0); }
  to   { opacity: 1; -webkit-transform: translate3d(0, 0, 0);    transform: translate3d(0, 0, 0); }
}
@keyframes riseIn {
  from { opacity: 0; -webkit-transform: translate3d(0, .17em, 0); transform: translate3d(0, .17em, 0); }
  to   { opacity: 1; -webkit-transform: translate3d(0, 0, 0);    transform: translate3d(0, 0, 0); }
}

@-webkit-keyframes chevPulse {
  0%, 70%, 100% { -webkit-transform: translate3d(0, 0, 0); transform: translate3d(0, 0, 0); }
  85%           { -webkit-transform: translate3d(.22em, 0, 0); transform: translate3d(.22em, 0, 0); }
}
@keyframes chevPulse {
  0%, 70%, 100% { -webkit-transform: translate3d(0, 0, 0); transform: translate3d(0, 0, 0); }
  85%           { -webkit-transform: translate3d(.22em, 0, 0); transform: translate3d(.22em, 0, 0); }
}

/* 点击后：整页淡出再跳转 */
.is-leaving .splash {
  opacity: 0;
}
.is-leaving .artboard {
  -webkit-transform: translate(-50%, -50%) scale(1.012);
          transform: translate(-50%, -50%) scale(1.012);
  transition: -webkit-transform .42s ease, transform .42s ease;
}

/* ---------- 移动端 / 竖屏 ---------- */

@media (max-width: 820px), (max-aspect-ratio: 4/5) {
  /* 竖屏改为「线稿在上、文字在下」的居中竖排，随屏幕高度自动找平衡 */
  .artboard {
    left: 0;
    top: 0;
    width: 100vw;
    height: 100vh;
    font-size: 3.75vw;
    padding: 8vh 0 9vh;
    display: -webkit-flex;
    display: flex;
    -webkit-flex-direction: column;
            flex-direction: column;
    -webkit-align-items: center;
            align-items: center;
    -webkit-justify-content: center;
            justify-content: center;
    -webkit-transform: none;
            transform: none;
  }

  /* 移动端浏览器地址栏收起时用动态视口高度，避免留白 */
  @supports (height: 100dvh) {
    .artboard { height: 100dvh; }
  }

  .lion {
    position: static;
    width: 80vw;
    height: 79.1vw;   /* 630 / 637 */
    margin: 0 0 3vh;
  }

  .brand__url {
    position: static;
    text-align: center;
    font-size: 9vw;
    line-height: .84;
  }

  .brand__cn {
    position: static;
    margin-top: 4.2vh;
    text-align: center;
    font-size: 6.4vw;
  }

  .enter {
    position: static;
    margin-top: 3.2vh;
    font-size: 4vw;
    padding: .9em .6em;
  }

  .is-leaving .artboard {
    -webkit-transform: scale(1.02);
            transform: scale(1.02);
  }
}

@-webkit-keyframes riseInCenter {
  from { opacity: 0; -webkit-transform: translate3d(-50%, .6em, 0); transform: translate3d(-50%, .6em, 0); }
  to   { opacity: 1; -webkit-transform: translate3d(-50%, 0, 0);    transform: translate3d(-50%, 0, 0); }
}
@keyframes riseInCenter {
  from { opacity: 0; -webkit-transform: translate3d(-50%, .6em, 0); transform: translate3d(-50%, .6em, 0); }
  to   { opacity: 1; -webkit-transform: translate3d(-50%, 0, 0);    transform: translate3d(-50%, 0, 0); }
}

/* ---------- 无障碍 / 减弱动画 ---------- */

@media (prefers-reduced-motion: reduce) {
  .motion .lion line,
    .motion .brand__line,
  .motion .brand__cn,
  .motion .enter {
    -webkit-animation: none !important;
            animation: none !important;
    opacity: 1;
  }
  .splash, .artboard { transition: none !important; }
}

@media print {
  body { background: #151515; }
}
