:root {
  --bg: #00000F;
  --panel: rgba(18, 20, 45, .62);
  --line: rgba(155, 139, 250, 0.18);
  --text: #f7f7fb;
  --muted: #a1a0bb;
  --purple: #6961ff;
  --purple2: #97aaff;
  --shadow: 0 0 60px rgba(123, 97, 255, 0.05);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
  background: #00000F;
  color: var(--text);
}

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

img {
  max-width: 100%;
  display: block;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 22px 30px;
  background: rgba(5, 8, 22, .66);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid rgba(255, 255, 255, .06);
  height: 72px;
}

.brand img {
  width: 163px;
  height: 70px;
  margin-left: 0;
}

.nav {
  display: flex;
  gap: 36px;
  color: #e8e5f7;
  font-size: 15px;
  margin-left: auto;
  margin-right: 48px;
}

.nav a:hover {
  color: #fff;
}

.nav-more-icon {
  display: none; 
  width: 44px;
  height: 44px;
  cursor: pointer;
}

.nav-cta,
.btn {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 12px 20px;
}

.nav-cta {
  color: #fff;
  background: rgba(123, 97, 255, .12);
}

.section-shell,
.section {
  width: min(1180px, 92vw);
  margin: 0 auto;
}

.hero {
  position: relative;
  min-height: 760px;
  display: flex;        /* 改为 Flex 布局 */
  align-items: center;
  padding: 70px 0 40px;
}

.hero-copy {
  position: relative;
  z-index: 2;           /* 文本层级高于插图 */
  max-width: 60%;       /* 限制文本最大宽度，防止无限蔓延 */
}

.hero-art {
  position: absolute;   /* 绝对定位脱离文档流 */
  right: 0;
  z-index: 1;           /* 垫在底部 */
  width: 55%;           /* 占据右半侧 */
  max-width: 650px;
  height: auto;
}

.hero-art img {
  border-radius: 34px;
  opacity: .96;
  width: 100%;
  height: auto; /* 关键：高度设为自动，图片就会根据自身原始比例缩放 */
  object-fit: contain;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  border: 1px solid rgba(255, 255, 255, .08);
  background: rgba(255, 255, 255, .05);
  border-radius: 999px;
  color: #ddd7ff;
}

.eyebrow i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--purple);
  box-shadow: 0 0 18px var(--purple);
}

h1 {
  font-size: clamp(40px, 5vw, 66px);
  line-height: 1.12;
  margin: 30px 0 22px;
  letter-spacing: -.04em;
}

em {
  font-style: normal;
  color: var(--purple2);
  text-shadow: 0 0 30px rgba(123, 97, 255, .45);
}

.hero p,
.section-title p,
.contact p {
  color: var(--muted);
  font-size: 16px;
  line-height: 1.9;
}

.hero-copy p {
  width: 430px;
}

.actions {
  display: flex;
  gap: 18px;
  margin-top: 34px;
}

.btn.primary {
  background: linear-gradient(135deg, var(--purple), #9b6bff);
  box-shadow: 0 18px 45px rgba(123, 97, 255, .28);
}

.btn.ghost {
  background: rgba(255, 255, 255, .03);
}

main#top > section.hero > div.hero-copy > div.actions > a.btn:nth-child(1) {
  padding-top: 14px;
}

main#top > section.hero > div.hero-copy > div.actions > a.btn:nth-child(2) {
  padding-top: 14px;
}

/* 1. 移除 Hero 区域插图的投影 */
.hero-art {
  /* 去掉了之前的 filter: drop-shadow */
}

.hero-art img {
  border-radius: 34px;
  opacity: .96;
  width: 680px;
  height: 680px;
}

.section {
  padding: 90px 0;
}

.section-title {
  text-align: center;
  margin-bottom: 46px;
}

.section-title h2,
.contact h2 {
  font-size: clamp(32px, 4vw + 16px, 54px);
  margin: 0 0 16px;
}

.bento {
  display: grid;
  grid-template-columns: repeat(2, 1fr); /* 等同于 1fr 1fr */
  gap: 22px;
}

.service-card,
.values article,
.contact,
.footer {
  border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(15, 12, 43, 0.5), rgba(0, 0, 15, 0.7));
  box-shadow: var(--shadow);
  border-radius: 28px;
}

/* 2. 业务 Bento 卡片调整：将插图变为背景层 */
.service-card {
  min-height: 320px; /* 高度改为 320px */
  padding: 40px;
  position: relative; 
  display: flex;
  flex-direction: column;
  justify-content: center; /* 保持这个属性，确保内部文本容器上下居中 */
  overflow: hidden;
  background: #00000F;
}

.bento > .service-card:nth-child(1) {
  height: 320px;
  padding-top: 30px;
}

.bento > .service-card:nth-child(2) {
  height: 320px;
  padding-top: 30px;
}

.bento > .service-card:nth-child(3) {
  height: 320px;
  padding-top: 30px;
}

.bento > .service-card:nth-child(4) {
  height: 320px;
  padding-top: 30px;
}

.service-card > div {
  position: relative;
  z-index: 2; 
  width: 45%; 
}

.service-card h3,
.values h3 {
  font-size: 23px;
  margin: 0 0 14px; /* 去掉之前的 18px 顶部 margin */
}

.service-card p,
.values p {
  color: var(--muted);
  line-height: 1.85;
  margin: 0;
}

.service-card > img {
  position: absolute;
  right: 0;
  top: 0;
  height: 100%;
  width: 100%;          /* 关键：改为 100% 铺满整个容器 */
  object-fit: cover;
  object-position: right center;
  z-index: 1;
  pointer-events: none;
  /* 关键：使用遮罩将左侧 25% 变透明，平滑渐变消除生硬断层 */
  -webkit-mask-image: linear-gradient(to right, transparent 0%, transparent 25%, black 75%);
  mask-image: linear-gradient(to right, transparent 0%, transparent 25%, black 75%);
}

.icon {
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  border-radius: 16px;
  background: rgba(123, 97, 255, .18);
  border: 1px solid var(--line);
  color: #d8ccff;
  font-size: 24px;
}

.values {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

/* 1. 调整卡片高度、内边距与内容对齐方式（中间靠下） */
.values article {
  padding: 44px 36px 50px; 
  text-align: center;
  position: relative;
  overflow: hidden;
  z-index: 1;
  min-height: 390px; /* 关键修改：改为 390px */
  display: flex;
  flex-direction: column;
  justify-content: flex-end; 
}

/* 2. 背景图正常清晰显示 */
.values article::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background-size: cover;
  background-position: center;
  opacity: 1; /* 正常状态设为 1，完全显示背景图 */
  transition: opacity 0.3s ease;
}

/* 3. 鼠标悬浮时背景图变暗 */
.values article:hover::before {
  opacity: 0.4; /* 悬浮时降低透明度（变暗），让文字更凸显 */
}

/* 分别载入背景图（保留之前的设置不变） */
.value-yinsi::before {
  background-image: url('../images/image_yinsi.jpg');
}

.value-chuangxin::before {
  background-image: url('../images/image_chuangxin.jpg');
}

.value-kehu::before {
  background-image: url('../images/image_kehu.jpg');
}

/* 4. 调整标题与描述文本的间距为 12px */
.values h3 {
  font-size: 26px;
  margin: 0 0 12px; /* 去掉顶部 margin，底部间距严格设为 12px */
}

.values p {
  margin: 0; /* 清除默认 margin，确保受 h3 的 12px 严格控制 */
  color: var(--muted);
  line-height: 1.85;
}


/* 1. 联系方式容器调整：最小高度 540px，下内边距 50px */
.contact {
  position: relative;
  display: flex; 
  flex-direction: column;
  padding: 56px 56px 50px 56px;
  min-height: 540px;
  margin-bottom: 90px;
  overflow: hidden;
  background: #00000F !important; /* 将 #0A0716 改为 #00000F */
}

.contact-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 40px;
  margin-bottom: auto; /* 利用 flex 自动把底部的 contact-bar 推到底部 */
}

/* 3. 新的插图容器尺寸与样式 */
.contact-illustration {
  width: 600px;
  height: 400px;
  flex-shrink: 0; /* 保证容器无论如何都不会被文本挤压变形 */
  border-radius: 24px; /* 添加圆角让插画更好地融入卡片 */
  overflow: hidden;
}

.contact-illustration img {
  width: 100%;
  height: 100%;
  object-fit: cover; /* 保证图片铺满 600x400 不变形 */
}

.contact-bar {
  position: relative;
  z-index: 2;
  width: 100%;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  padding-top: 26px;
  border-top: 1px solid rgba(255, 255, 255, .08);
}

/* 2. 新增：各个联系子容器的水平 Flex 排版 */
.contact-item {
  display: flex;
  align-items: center;
  gap: 16px; 
  padding: 0 20px; /* 取消上下内边距，靠下面的 align-items 自动垂直居中 */
  height: 80px; /* 锁定高度为 80px */
  border-radius: 18px;
  
  /* 从 #0f0c2b 到 #0a081d 的从上到下渐变，50%不透明度 */
  background: linear-gradient(180deg, rgba(15, 12, 43, 0.5), rgba(0, 0, 15, 0.7));
  
  /* 0.5px 描边，#9d9ae0 颜色，50%不透明度 */
  border: 0.5px solid rgba(157, 154, 224, 0.12); 
  
  box-sizing: border-box; /* 确保边框计算在 80px 高度内 */
}

/* 3. 新增：锁定图标尺寸为 72x72 */
.contact-icon {
  width: 56px;
  height: 56px;
  flex-shrink: 0; /* 防止图标被 Flex 挤压缩小 */
  object-fit: contain;
}

.contact-info strong {
  display: block;
  margin-bottom: 2px; /* 间距改为 2px */
  line-height: 1; /* 收紧默认行高，让 2px 的间距在视觉上更精准 */
}

.contact-info span {
  color: var(--muted);
}

.footer {
  width: min(1180px, 92vw);
  margin: 0 auto 38px;
  padding: 60px;
}

.footer-inner {
  display: grid;
  grid-template-columns: 1.4fr repeat(3, 1fr);
  gap: 60px;
  width: auto;
  padding-left: 0;
  padding-right: 0;
}

.footer img {
  width: 165px;
}

.footer p,
.footer a,
.legal {
  color: var(--muted);
  line-height: 1.8;
}

.footer h4 {
  margin: 0 0 16px;
}

.footer a {
  display: block;
  margin: 9px 0;
}

.legal {
  border-top: 1px solid rgba(255, 255, 255, .08);
  margin-top: 34px;
  padding-top: 22px;
  display: flex;
  gap: 20px;
  justify-content: space-between;
  flex-wrap: wrap;
  font-size: 13px;
}

@media(max-width:880px) {
  /* 隐藏原有的文本导航和联系按钮 */
  .nav,
  .nav-cta {
    display: none;
  }

  /* 释放更多菜单图标 */
  .nav-more-icon {
    display: block;
  }

  /* 调整头部容器，确保右侧间距严格为 16px */
  .site-header {
    padding: 16px 16px 16px 5vw; /* 上 16，右 16，下 16，左 5vw */
  }

  .hero {
    flex-direction: column;
    align-items: flex-start; /* 关键：重置对齐方式，让内部元素自然舒展 */
    min-height: auto;
    padding-top: 40px;
  }

  .hero-copy {
    width: 100%;
    max-width: 100%; /* 核心魔法：彻底解除电脑端 60% 的紧箍咒 */
    padding: 0 4vw;  /* 用 4vw 的柔和内边距，保证左右留白恰到好处且绝不贴边 */
    box-sizing: border-box;
  }

  .hero-copy p {
    max-width: 100%; /* 取消上一轮加的 82% 限制，让文本重新呼吸 */
  }

  /* （下面的 .hero-art 保持上一轮的代码不变即可） */
  .hero-art {
    position: relative; 
    width: 90%; 
    margin: 30px auto 0; 
  }
  .hero-art img {
    width: 100%;
    height: auto;
    aspect-ratio: 4 / 3; 
    object-fit: cover; 
    border-radius: 20px;
  }

  /* 1. 调整大标题和板块描述文本的字号 */
  .section-title h2 {
    font-size: clamp(32px, 4vw + 16px, 54px);
    margin: 0 0 4px 0;
  }
  
  .section-title p {
    font-size: 14px; /* 板块描述文本改为 14px */
  }

  /* ==================== 
     业务范围卡片 - 移动端纯粹固定高度 + 底部插图层
  ==================== */
  .service-card {
    height: 320px;         /* 终于可以舒舒服服地写死你要的高度了 */
    min-height: 320px;     /* 覆盖掉 PC 端的 360px */
    padding: 24px 20px;    /* 设定文本的安全内边距 */
    display: flex;
    flex-direction: column;
    justify-content: flex-start; /* 文本牢牢靠顶对齐 */
    position: relative;    /* 为底层的插图提供定位锚点 */
    overflow: hidden;      /* 确保底层的插图不会超出卡片圆角 */
  }

  /* 文本容器：保证层级在图片上方 */
  .service-card > div {
    position: relative;
    z-index: 2;            /* 关键：让文本浮在图片上面 */
    width: 100%;
  }

  /* 插图容器：化身底层背景，牢牢吸附在底部 */
  .service-card > img {
    position: absolute;    /* 脱离文档流，不占空间 */
    bottom: 0;             /* 吸附在卡片最底端 */
    left: 0;
    width: 100%;           /* 宽度铺满卡片 */
    height: 100%;           /* 大约占据卡片底部 60% 的高度（根据实际视觉微调） */
    object-fit: cover;     /* 保证铺满且不变形，或者你也可以用 contain */
    object-position: bottom center; /* 保证狐狸的底部贴着卡片底部 */
    z-index: 1;            /* 垫在文本下面 */
    border-radius: 0;      /* 外层卡片有 overflow:hidden，这里不需要圆角了 */
  }

  /* 移动端专属图片替换（这个极客魔法依然保留） */
  .service-card:nth-child(1) > img { content: url('../images/service-app_mobile.jpg'); }
  .service-card:nth-child(2) > img { content: url('../images/service-tech_mobile.jpg'); }
  .service-card:nth-child(3) > img { content: url('../images/service-design_mobile.jpg'); }
  .service-card:nth-child(4) > img { content: url('../images/service-penguin_mobile.jpg'); }

  .service-card h3 {
    margin: 0 0 6px 0;    /* 下边距严格锁定为 12px */
  }

  .service-card p {
    font-size: 14px; 
    line-height: 1.6;      /* 稍微收紧一点行高，配合 240px 的精致小卡片 */
  }

  .bento,
  .values,
  .contact-bar,
  .footer-inner {
    grid-template-columns: 1fr;
  }

  /* 2. 手机端卡片文字满宽 */
  .service-card > div,
  .contact-copy {
    width: 100%;
  }

  /* 3. 手机端插图去掉虚化遮罩，铺满背景并降低透明度防遮挡 */
  .service-card > img,
  .contact {
    min-height: auto;
    /* 让“联系我们”外层大容器在手机端左右内边距变为 16px */
    padding: 40px 16px; 
  }

  .contact-top {
    flex-direction: column;
    align-items: center; 
  }

  .contact-copy {
    width: 100%;
    text-align: center; /* 确保标题和描述文本水平居中对齐 */
  }

  section#contact > div.contact-top > div.contact-copy > h2 {
    width: 100%; /* 和 p 一样宽度不超过父容器 */
    margin: 0 auto; /* 在父容器内居中 */
    text-align: center; /* 文本居中对齐 */
  }

  .contact-illustration {
    width: 100%;
    height: auto;
    aspect-ratio: 495 / 280;
    margin-top: 30px;
    margin-bottom: 10px; /* 配合下方分割线，留出呼吸空间 */
  }

  .contact-bar {
    grid-template-columns: 1fr; /* 让底部的三个联系方式垂直单列排布 */
    gap: 16px; 
  }

  .section {
    padding: 60px 0;
  }

  h1 {
    font-size: 40px;
  }

  .site-header {
    padding: 16px 5vw;
  }

  .nav-cta {
    display: none;
  }
}

/* ==================== 
     顶部导航与展开菜单（高度拉伸方案）
  ==================== */
  .nav,
  .nav-cta {
    display: none;
  }

  /* 1. Header 容器：取消内边距，靠最大高度来截断隐藏内部菜单 */
  .site-header {
    padding: 0; 
    height: auto; /* 覆盖掉 PC 端的定高 72px */
    max-height: 72px; /* 默认只显示顶部 72px 的区域 */
    overflow: hidden; /* 隐藏超出的部分 */
    flex-wrap: wrap;  /* 允许内部元素折行 */
    align-items: flex-start;
    transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  }

  /* 当激活展开状态时，拉高 Header */
  .site-header.expanded {
    max-height: 300px; 
  }

  /* 2. 锁定 Logo 和 图标的位置，保持 72px 高度且对齐 */
  .brand {
    height: 72px;
    display: flex;
    align-items: center;
    padding-left: 5vw; /* 还原 Logo 的左边距 */
  }

  .nav-more-icon {
    display: block;
    margin-top: 14px;  /* 让图标在 72px 空间内垂直居中 */
    margin-right: 16px;
    transition: transform 0.3s;
  }
  
  /* 选做小细节：展开时图标稍微旋转，增强交互感 */
  .site-header.expanded .nav-more-icon {
    transform: rotate(90deg);
  }

  /* 3. 菜单容器回归普通文档流，变成等宽的区块 */
  .mobile-menu {
    width: 100%;
    display: flex;
    flex-direction: column;
    border-top: 1px solid rgba(255, 255, 255, 0.08); /* 菜单与顶部的分割线 */
    
    /* 清除之前绝对定位/悬浮相关的属性 */
    position: static;
    background: transparent;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    border-radius: 0;
    border-bottom: none;
    box-shadow: none;
    opacity: 1; 
    pointer-events: auto;
    transform: none;
    transition: none;
  }

  /* 4. 将列表项做成通栏的按钮样式 */
  .mobile-menu a {
    display: block;
    padding: 20px;
    color: var(--text);
    font-size: 16px;
    text-align: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    background: rgba(255, 255, 255, 0.02); /* 给按钮一层微弱的底色凸显触控区 */
  }
  
  .mobile-menu a:last-child {
    border-bottom: none;
  }

  .mobile-menu a:active {
    background: rgba(123, 97, 255, 0.15); /* 按下时的紫光反馈 */
  }

section#services > div.bento > article.service-card:nth-child(1) > img {
  padding-top: 0px;
  padding-bottom: 0px;
  padding-left: 0px;
  padding-right: 0px;
}

section#services > div.bento > article.service-card:nth-child(2) > img {
  padding-top: 0px;
  padding-bottom: 0px;
  padding-left: 0px;
  padding-right: 0px;
}

section#services > div.bento > article.service-card:nth-child(3) > img {
  padding-top: 0px;
  padding-bottom: 0px;
  padding-left: 0px;
  padding-right: 0px;
}

section#services > div.bento > article.service-card:nth-child(4) > img {
  padding-top: 0px;
  padding-bottom: 0px;
  padding-left: 0px;
  padding-right: 0px;
}

section#contact > div.contact-top > div.contact-copy > h2 {
  font-size: clamp(32px, 4vw + 16px, 54px);
  width: auto;
}

section#contact > div.contact-bar {
  padding-left: 16px;
  padding-right: 16px;
}

section#contact > div.contact-bar > div.contact-item:nth-child(1) {
  height: 72px;
  padding-left: 16px;
}

section#contact > div.contact-bar > div.contact-item:nth-child(2) {
  height: 72px;
  padding-left: 16px;
}

section#contact > div.contact-bar > div.contact-item:nth-child(3) {
  height: 72px;
  padding-left: 16px;
}

section#contact > div.contact-bar > div.contact-item:nth-child(1) > div.contact-info > span {
  font-size: 14px;
}

section#contact > div.contact-bar > div.contact-item:nth-child(2) > div.contact-info > span {
  font-size: 14px;
}

section#contact > div.contact-bar > div.contact-item:nth-child(3) > div.contact-info > span {
  font-size: 14px;
}