/* ============================================================
   yanypeak.com 官网定制样式 (overrides Creative v7.0.7)
   ============================================================ */
:root {
  --c-primary: #7c3aed;
  --c-primary-rgb: 124, 58, 237;
  --c-blue: #3b82f6;
  --c-accent: #ec4899;
  --c-grad: linear-gradient(135deg, #7c3aed 0%, #3b82f6 55%, #06b6d4 120%);
  --c-grad-soft: linear-gradient(120deg, rgba(124, 58, 237, .10), rgba(236, 72, 153, .08));
  --c-text: #1e293b;
  --c-muted: #64748b;
  --bs-primary: #7c3aed;
  --bs-primary-rgb: 124, 58, 237;
  --bs-link-color: #7c3aed;
  --bs-link-hover-color: #6d28d9;
}

html {
  scroll-padding-top: 5rem;
}

body {
  font-family: "Merriweather Sans", -apple-system, "PingFang SC", "Microsoft YaHei", sans-serif;
  color: var(--c-text);
  background: #fff;
  font-size: 1rem;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

::selection {
  background: rgba(var(--c-primary-rgb), .18);
  color: inherit;
}

h1, h2, h3, .h1, .h2, .h3 {
  letter-spacing: -.01em;
}

h2 {
  font-weight: 800;
}

/* ---------- 通用配色覆盖 ---------- */
.text-primary { color: var(--c-primary) !important; }
.bg-primary { background: var(--c-primary) !important; }
.text-muted { color: var(--c-muted) !important; }

.btn {
  border-radius: 999px;
  font-weight: 700;
  letter-spacing: .02em;
  transition: transform .25s ease, box-shadow .25s ease, filter .25s ease;
}
.btn-primary {
  background: var(--c-grad);
  border: none;
  box-shadow: 0 10px 28px rgba(var(--c-primary-rgb), .35);
}
.btn-primary:hover,
.btn-primary:focus {
  background: var(--c-grad);
  filter: brightness(1.08);
  transform: translateY(-2px);
  box-shadow: 0 16px 36px rgba(var(--c-primary-rgb), .45);
}
.btn-light { background: #fff; color: var(--c-primary); }
.btn-light:hover {
  color: var(--c-primary);
  transform: translateY(-2px);
  box-shadow: 0 14px 30px rgba(0, 0, 0, .22);
}
.btn-xl { padding: 1.1rem 2.2rem; }

hr.divider {
  height: .24rem;
  max-width: 4.5rem;
  background: var(--c-grad);
  border-radius: 999px;
  opacity: 1;
}
hr.divider-light { background: #fff; }

/* ---------- 玻璃拟态导航栏 ---------- */
#mainNav {
  background: rgba(255, 255, 255, .72);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  box-shadow: 0 1px 20px rgba(15, 23, 42, .06);
  border-bottom: 1px solid rgba(15, 23, 42, .05);
}
#mainNav .navbar-brand {
  background: var(--c-grad);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  font-weight: 800;
  letter-spacing: .02em;
}
#mainNav .navbar-nav .nav-link {
  color: #334155;
  font-weight: 700;
  position: relative;
}
#mainNav .navbar-nav .nav-link:hover,
#mainNav .navbar-nav .nav-link.active {
  color: var(--c-primary) !important;
}
#mainNav .navbar-nav .nav-link:not(:last-child)::after {
  content: "";
  position: absolute;
  left: 1rem;
  right: 1rem;
  bottom: .2rem;
  height: 2px;
  border-radius: 999px;
  background: var(--c-grad);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .25s ease;
}
#mainNav .navbar-nav .nav-link:not(:last-child):hover::after,
#mainNav .navbar-nav .nav-link:not(:last-child).active::after {
  transform: scaleX(1);
}
#mainNav .navbar-nav .nav-link:last-child {
  border-radius: 999px;
  background: var(--c-grad);
  color: #fff !important;
  padding: .5rem 1.25rem !important;
  box-shadow: 0 6px 16px rgba(var(--c-primary-rgb), .3);
}
#mainNav .navbar-nav .nav-link:last-child:hover {
  filter: brightness(1.08);
  transform: translateY(-1px);
}
@media (min-width: 992px) {
  #mainNav { background: rgba(255, 255, 255, .72); }
  #mainNav .navbar-brand { color: #fff; -webkit-text-fill-color: transparent; }
  #mainNav.navbar-shrink { background: rgba(255, 255, 255, .85); box-shadow: 0 6px 24px rgba(15, 23, 42, .08); }
  #mainNav.navbar-shrink .navbar-brand,
  #mainNav.navbar-shrink .navbar-nav .nav-link { color: #334155; }
  #mainNav.navbar-shrink .navbar-nav .nav-link:hover { color: var(--c-primary) !important; }
}

/* ---------- 首屏 Hero ---------- */
header.masthead {
  position: relative;
  background:
    linear-gradient(135deg, rgba(76, 29, 149, .88) 0%, rgba(67, 56, 202, .78) 45%, rgba(8, 145, 178, .72) 100%),
    url("../assets/img/bg-masthead.jpg");
  background-position: center;
  background-size: cover;
  background-attachment: scroll;
  overflow: hidden;
}
header.masthead::before,
header.masthead::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  filter: blur(70px);
  opacity: .55;
  pointer-events: none;
}
header.masthead::before {
  width: 420px; height: 420px;
  top: -120px; left: -80px;
  background: radial-gradient(circle, #ec4899, transparent 70%);
  animation: orbFloat 12s ease-in-out infinite;
}
header.masthead::after {
  width: 480px; height: 480px;
  bottom: -160px; right: -100px;
  background: radial-gradient(circle, #22d3ee, transparent 70%);
  animation: orbFloat 16s ease-in-out infinite reverse;
}
@keyframes orbFloat {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(30px, -24px) scale(1.08); }
}
header.masthead h1 {
  font-weight: 800;
  font-size: 2.6rem;
  line-height: 1.25;
  letter-spacing: -.02em;
  text-shadow: 0 6px 30px rgba(0, 0, 0, .25);
  animation: heroIn .9s ease both;
}
header.masthead p {
  font-size: 1.1rem;
  line-height: 1.8;
  max-width: 46rem;
  margin-left: auto;
  margin-right: auto;
  animation: heroIn 1.1s .15s ease both;
}
header.masthead .btn {
  animation: heroIn 1.1s .3s ease both;
}
header.masthead .divider {
  animation: heroIn 1s .1s ease both;
}
header.masthead .btn-light {
  color: var(--c-primary);
  border: none;
}
header.masthead .btn-primary {
  background: rgba(255, 255, 255, .14);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, .55);
}
@media (max-width: 575.98px) {
  header.masthead .hero-cta { margin-left: 0 !important; margin-top: .6rem; }
}
@keyframes heroIn {
  from { opacity: 0; transform: translateY(26px); }
  to { opacity: 1; transform: none; }
}
@media (min-width: 992px) {
  header.masthead { height: 100vh; min-height: 42rem; }
  header.masthead h1 { font-size: 3.4rem; }
}

/* ---------- About 深色区块 ---------- */
#about {
  background:
    linear-gradient(135deg, rgba(76, 29, 149, .97), rgba(59, 130, 246, .92)),
    url("../assets/img/bg-masthead.jpg");
  background-size: cover;
  background-position: center;
  position: relative;
  overflow: hidden;
}
#about h2 { font-weight: 800; letter-spacing: -.01em; }

/* ---------- 数据统计带 ---------- */
.stats-band {
  background:
    linear-gradient(120deg, rgba(76, 29, 149, .96), rgba(59, 130, 246, .94) 60%, rgba(8, 145, 178, .96));
  padding: 3.6rem 0;
  color: #fff;
  position: relative;
  overflow: hidden;
}
.stats-band::before,
.stats-band::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, .12), transparent 70%);
  pointer-events: none;
}
.stats-band::before { width: 300px; height: 300px; top: -120px; right: -60px; }
.stats-band::after { width: 260px; height: 260px; bottom: -120px; left: -60px; }
.stats-band .stat-num {
  font-size: 2.6rem;
  font-weight: 800;
  line-height: 1;
  letter-spacing: .01em;
  text-shadow: 0 4px 18px rgba(0, 0, 0, .18);
}
.stats-band .stat-label {
  margin-top: .7rem;
  opacity: .9;
  font-weight: 600;
  letter-spacing: .08em;
  font-size: .9rem;
}

/* ---------- 服务卡片 ---------- */
.service-card {
  background: #fff;
  border: 1px solid #eef2f7;
  border-radius: 1.25rem;
  padding: 2.2rem 1.5rem;
  height: 100%;
  position: relative;
  transition: transform .3s ease, box-shadow .3s ease, border-color .3s ease;
}
.service-card::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 1.25rem;
  background: var(--c-grad-soft);
  opacity: 0;
  transition: opacity .3s ease;
  pointer-events: none;
}
.service-card:hover {
  transform: translateY(-10px);
  border-color: transparent;
  box-shadow: 0 24px 48px rgba(100, 116, 139, .16);
}
.service-card:hover::before { opacity: 1; }
.service-card > * { position: relative; }
.service-icon {
  width: 64px; height: 64px;
  margin: 0 auto 1.1rem;
  border-radius: 1.1rem;
  background: var(--c-grad);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  box-shadow: 0 10px 22px rgba(var(--c-primary-rgb), .35);
  transition: transform .3s ease;
}
.service-card:hover .service-icon { transform: rotate(-6deg) scale(1.06); }
.service-card h3 { font-weight: 700; color: var(--c-text); }
.service-card p { color: var(--c-muted); }

/* ---------- 能力展示 ---------- */
.portfolio-box { border-radius: 1rem; overflow: hidden; }
.portfolio-box img { transition: transform .6s ease; }
.portfolio-box:hover img { transform: scale(1.08); }
.portfolio-box .portfolio-box-caption { background: linear-gradient(135deg, rgba(124, 58, 237, .92), rgba(59, 130, 246, .92)); }

/* ---------- CTA ---------- */
.cta-grad {
  background:
    linear-gradient(135deg, rgba(76, 29, 149, .9), rgba(59, 130, 246, .86)),
    url("../assets/img/bg-masthead.jpg");
  background-size: cover;
  background-position: center;
  position: relative;
  overflow: hidden;
}
.cta-grad::before {
  content: "";
  position: absolute;
  width: 380px; height: 380px;
  border-radius: 50%;
  top: -140px; right: -80px;
  background: radial-gradient(circle, rgba(34, 211, 238, .3), transparent 70%);
  pointer-events: none;
}
.cta-grad h2 { font-weight: 800; letter-spacing: -.01em; }
.cta-grad > .container { position: relative; }

/* ---------- 联系卡片 ---------- */
.contact-item {
  background: #fff;
  border: 1px solid #eef2f7;
  border-radius: 1.1rem;
  padding: 2rem 1rem;
  height: 100%;
  transition: transform .3s ease, box-shadow .3s ease;
}
.contact-item:hover { transform: translateY(-6px); box-shadow: 0 16px 34px rgba(100, 116, 139, .15); }
.contact-item i { color: var(--c-primary); }
.contact-item .fw-bold { font-size: 1.05rem; margin-top: .4rem; }

/* ---------- 滚动显现 ---------- */
.reveal {
  opacity: 0;
  transform: translateY(34px);
  transition: opacity .7s ease, transform .7s ease;
}
.reveal.in-view { opacity: 1; transform: none; }
.reveal-delay-1 { transition-delay: .1s; }
.reveal-delay-2 { transition-delay: .2s; }
.reveal-delay-3 { transition-delay: .3s; }
.reveal-delay-4 { transition-delay: .4s; }

/* ---------- 返回顶部 ---------- */
#backToTop {
  position: fixed;
  right: 26px;
  bottom: 26px;
  width: 46px; height: 46px;
  border-radius: 50%;
  border: none;
  background: var(--c-grad);
  color: #fff;
  font-size: 1.2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 12px 28px rgba(var(--c-primary-rgb), .4);
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px);
  transition: opacity .3s ease, transform .3s ease, visibility .3s ease;
  z-index: 1080;
}
#backToTop.show { opacity: 1; visibility: visible; transform: none; }
#backToTop:hover { filter: brightness(1.08); }

/* ---------- 页脚 ---------- */
footer {
  border-top: 1px solid #eef2f7;
  background: linear-gradient(180deg, #fff 0%, #f8fafc 100%);
}
footer a { color: var(--c-muted); text-decoration: none; }
footer a:hover { color: var(--c-primary); }

/* ---------- 移动端适配 ---------- */
@media (max-width: 991.98px) {
  #mainNav .navbar-collapse {
    background: rgba(255, 255, 255, .96);
    border-radius: 1rem;
    margin-top: .75rem;
    padding: 1rem 1.25rem;
    box-shadow: 0 18px 40px rgba(15, 23, 42, .14);
  }
  #mainNav .navbar-nav .nav-link { padding: .65rem 0; }
  #mainNav .navbar-nav .nav-link:last-child { padding: .65rem 1.25rem !important; }
}
@media (max-width: 575.98px) {
  header.masthead h1 { font-size: 2.1rem; }
  header.masthead p { font-size: 1rem; }
  .stats-band .stat-num { font-size: 2rem; }
  .btn-xl { padding: .9rem 1.6rem; font-size: .8rem; }
  .page-section { padding: 5rem 0; }
}

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  header.masthead::before, header.masthead::after { animation: none; }
}
