/* ============================================================
   星空社 | 夜night —— 青色护眼主题
   ============================================================ */

:root {
  /* 配色 */
  --bg:            #eef5f5;   /* 页面底色：偏青的冷灰白 */
  --bg-alt:        #e3f0f1;   /* 交替区块底色 */
  --surface:       #ffffff;   /* 卡片 */
  --ink:           #050505;   /* 主文字 */
  --ink-soft:      rgba(5, 5, 5, 0.62);
  --ink-faint:     rgba(5, 5, 5, 0.40);
  --logo-blue:     #2997ff;   /* Logo 蓝 */
  --teal:          #0e9594;   /* 主强调色：深青 */
  --teal-strong:   #0b7c7b;
  --teal-soft:     #d5efef;   /* 高亮底色 */
  --muted:         #737a80;
  --line:          rgba(11, 124, 123, 0.14);

  /* 结构 */
  --radius:        30px;
  --radius-sm:     18px;
  --shadow-card:   0 10px 30px rgba(14, 149, 148, 0.10);
  --shadow-hover:  0 22px 43px rgba(14, 149, 148, 0.26);
  --font: -apple-system, BlinkMacSystemFont, "PingFang SC",
          "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue",
          Arial, sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
ul { list-style: none; }

.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

::selection { background: var(--teal-soft); color: var(--ink); }

/* ---------------- 顶部导航 ---------------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: blur(9px);
  -webkit-backdrop-filter: blur(9px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s, box-shadow 0.3s;
}

.site-header.is-scrolled {
  border-bottom-color: var(--line);
  box-shadow: 0 6px 24px rgba(14, 149, 148, 0.08);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}

.logo {
  font-size: 26px;
  font-weight: 800;
  letter-spacing: 0.06em;
  color: var(--logo-blue);
  line-height: 1;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-link {
  position: relative;
  padding: 8px 18px;
  font-size: 15px;
  color: var(--ink);
  border-radius: 100px;
  transition: color 0.25s, background 0.25s;
}

.nav-link::after {
  content: "";
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: 4px;
  height: 2px;
  border-radius: 2px;
  background: var(--teal);
  transform: scaleX(0);
  transform-origin: center;
  transition: transform 0.25s;
}

.nav-link:hover { color: var(--teal-strong); }
.nav-link:hover::after,
.nav-link.is-active::after { transform: scaleX(1); }

.nav-link.is-active { color: var(--teal-strong); font-weight: 600; }

/* 移动端汉堡按钮 */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 42px;
  height: 42px;
  padding: 9px;
  background: none;
  border: 1px solid var(--line);
  border-radius: 12px;
  cursor: pointer;
}

.nav-toggle span {
  display: block;
  height: 2px;
  border-radius: 2px;
  background: var(--ink);
  transition: transform 0.3s, opacity 0.3s;
}

.nav-toggle.is-open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.is-open span:nth-child(2) { opacity: 0; }
.nav-toggle.is-open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.nav-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 90;
  background: rgba(5, 5, 5, 0.35);
  opacity: 0;
  transition: opacity 0.3s;
}

.nav-overlay.is-show { display: block; opacity: 1; }

/* ---------------- 欢迎横幅 ---------------- */

.hero {
  position: relative;
  overflow: hidden;
  padding: 120px 0 110px;
  background:
    radial-gradient(640px 320px at 12% 8%, rgba(41, 151, 255, 0.10), transparent 70%),
    radial-gradient(720px 360px at 88% 90%, rgba(14, 149, 148, 0.14), transparent 70%),
    var(--bg);
}

.stars {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.star {
  fill: var(--teal);
  opacity: 0.35;
  animation: twinkle 3.6s ease-in-out infinite;
}

.star:nth-child(2n)   { animation-delay: 0.9s;  opacity: 0.22; }
.star:nth-child(3n)   { animation-delay: 1.7s;  opacity: 0.30; }
.star:nth-child(5n)   { animation-delay: 2.4s;  opacity: 0.18; }

@keyframes twinkle {
  0%, 100% { transform: scale(1);    opacity: 0.35; }
  50%      { transform: scale(1.55); opacity: 0.10; }
}

.hero-inner {
  position: relative;
  z-index: 1;
  text-align: center;
}

.hero-kicker {
  display: inline-block;
  padding: 6px 18px;
  margin-bottom: 26px;
  font-size: 14px;
  letter-spacing: 0.22em;
  color: var(--teal-strong);
  background: var(--teal-soft);
  border-radius: 100px;
}

.hero-slogan {
  font-size: clamp(30px, 5.2vw, 48px);
  font-weight: 800;
  line-height: 1.35;
  color: var(--ink);
}

.hero-welcome {
  margin-top: 22px;
  font-size: clamp(22px, 3.4vw, 36px);
  font-weight: 700;
  color: var(--ink);
}

/* 文字高亮：青色底衬 */
.hl {
  display: inline-block;
  padding: 0 10px;
  margin: 0 2px;
  background: var(--teal-soft);
  border-radius: 10px;
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
}

/* ---------------- 通用区块 ---------------- */

.section { padding: 90px 0; }

.section-alt { background: var(--bg-alt); }

.section-title {
  margin-bottom: 54px;
  font-size: 32px;
  font-weight: 800;
  text-align: center;
  color: var(--ink);
  position: relative;
}

.section-title::after {
  content: "";
  display: block;
  width: 56px;
  height: 4px;
  margin: 14px auto 0;
  border-radius: 4px;
  background: linear-gradient(90deg, var(--logo-blue), var(--teal));
}

/* ---------------- 资源下载卡片 ---------------- */

.res-list {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
  max-width: 1080px;
  margin: 0 auto;
}

.res-card { min-height: 100%; }

.res-card__inner {
  position: relative;
  display: block;
  height: 100%;
  padding: 44px 40px;
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
  overflow: hidden;
  transition: box-shadow 0.35s, transform 0.35s;
}

.res-card__inner:hover {
  box-shadow: var(--shadow-hover);
  transform: translateY(-4px);
}

/* 圆形下载图标 */
.res-card__inner::before {
  content: "";
  position: absolute;
  top: 50%;
  right: 28px;
  width: 64px;
  height: 64px;
  margin-top: -32px;
  border-radius: 50%;
  background-color: var(--teal);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 4v12M6 10l6 6 6-6M4 20h16'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
  background-size: 26px;
  transition: transform 0.35s, background-color 0.35s;
  z-index: 2;
}

.res-card__inner:hover::before {
  transform: rotate(-45deg);
  background-color: var(--teal-strong);
}

/* 展开填充圆 */
.res-card__inner::after {
  content: "";
  position: absolute;
  top: 50%;
  right: 28px;
  width: 63px;
  height: 63px;
  margin-top: -31px;
  border-radius: 100px;
  background: var(--teal);
  z-index: 0;
  transition: width 0.35s, height 0.35s, top 0.35s, right 0.35s,
              margin 0.35s, border-radius 0.35s;
}

.res-card__inner:hover::after {
  width: 100%;
  height: 100%;
  top: 0;
  right: 0;
  margin-top: 0;
  border-radius: 0;
}

.res-text {
  position: relative;
  z-index: 1;
  transition: color 0.35s;
  padding-right: 78px;
}

.res-title {
  margin-bottom: 14px;
  font-size: 20px;
  font-weight: 800;
  color: var(--ink);
  transition: color 0.35s;
}

.res-desc {
  font-size: 15px;
  line-height: 1.8;
  color: var(--ink-soft);
  transition: color 0.35s;
}

.res-card__inner:hover .res-title,
.res-card__inner:hover .res-desc { color: #ffffff; }

/* ---------------- 关于我们 ---------------- */

.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
}

.about-title {
  font-size: 32px;
  font-weight: 800;
  color: var(--ink);
  margin-bottom: 18px;
}

.about-hello {
  font-size: 20px;
  color: var(--ink-soft);
}

.about-contact {
  padding: 36px 40px;
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
  border-left: 5px solid var(--teal);
}

.contact-label {
  font-size: 15px;
  color: var(--ink-faint);
  margin-bottom: 10px;
}

.contact-mail {
  font-size: 19px;
  font-weight: 700;
  color: var(--teal-strong);
  overflow-wrap: anywhere;
  transition: color 0.25s;
}

.contact-mail:hover { color: var(--logo-blue); }

/* ---------------- 页脚 ---------------- */

.site-footer {
  padding: 36px 0;
  border-top: 1px solid var(--line);
}

.copyright {
  text-align: center;
  font-size: 14px;
  color: var(--muted);
}

/* ---------------- 返回顶部 ---------------- */

.back-top {
  position: fixed;
  right: 26px;
  bottom: 26px;
  z-index: 80;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  background: var(--teal);
  border: none;
  border-radius: 50%;
  box-shadow: 0 10px 24px rgba(14, 149, 148, 0.35);
  cursor: pointer;
  opacity: 0;
  transform: translateY(14px);
  pointer-events: none;
  transition: opacity 0.3s, transform 0.3s, background 0.3s;
}

.back-top.is-show {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.back-top:hover { background: var(--teal-strong); }

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

.reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ---------------- 响应式 ---------------- */

@media (max-width: 900px) {
  .res-list { grid-template-columns: 1fr; max-width: 560px; }
  .about-grid { grid-template-columns: 1fr; gap: 32px; }
  .section { padding: 64px 0; }
}

@media (max-width: 640px) {
  .nav-toggle { display: flex; }

  .main-nav {
    position: fixed;
    top: 0;
    right: 0;
    z-index: 95;
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
    width: 78%;
    max-width: 320px;
    height: 100vh;
    padding: 96px 24px 24px;
    background: var(--surface);
    box-shadow: -12px 0 40px rgba(14, 149, 148, 0.16);
    transform: translateX(100%);
    transition: transform 0.32s ease;
  }

  .main-nav.is-open { transform: translateX(0); }

  .nav-link {
    padding: 14px 18px;
    font-size: 17px;
    border-radius: var(--radius-sm);
  }

  .nav-link:hover { background: var(--teal-soft); }
  .nav-link::after { display: none; }

  .hero { padding: 84px 0 76px; }
  .res-card__inner { padding: 34px 26px; }
  .res-text { padding-right: 64px; }
  .about-contact { padding: 28px 24px; }
}
