:root {
  --sky: #3084c4;
  --sky-deep: #1d5a8c;
  --ink: #14324a;
  --ink-soft: #4d6d86;
  --cloud: #fdfbf6;
  --cloud-2: #f3efe4;
  --meadow: #7fbf86;
  --bamboo: #d8a251;
  --bamboo-deep: #b8802f;
  --shadow: 0 18px 40px rgba(20, 50, 74, .16);
  --shadow-sm: 0 8px 20px rgba(20, 50, 74, .12);
  --radius: 18px;
  --serif: "Source Han Serif SC", "Noto Serif SC", "Songti SC", "STSong", "SimSun", Georgia, serif;
  --sans: system-ui, -apple-system, "Segoe UI", "PingFang SC", "Microsoft YaHei", "Hiragino Sans GB", sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--cloud);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--sky-deep); }

:focus-visible {
  outline: 3px solid var(--bamboo);
  outline-offset: 3px;
  border-radius: 6px;
}

/* ---------- 顶栏 ---------- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 10px clamp(16px, 4vw, 48px);
  background: rgba(253, 251, 246, .9);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(20, 50, 74, .08);
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--ink);
}

.brand-mark {
  width: 36px;
  height: 36px;
  display: block;
  border-radius: 50%;
  box-shadow: var(--shadow-sm);
}

.brand-name {
  font-weight: 700;
  letter-spacing: .04em;
  white-space: nowrap;
}

.nav {
  display: flex;
  gap: 22px;
  margin-left: auto;
  font-size: 15px;
}

.nav a { color: var(--ink-soft); text-decoration: none; }

.nav a:hover { color: var(--sky-deep); }

.topbar .topbar-cta { font-size: 14px; padding: 9px 18px; }

/* ---------- 按钮 ---------- */
.btn {
  display: inline-block;
  padding: 13px 26px;
  border-radius: 999px;
  font-size: 16px;
  font-weight: 600;
  text-decoration: none;
  transition: transform .18s ease, box-shadow .18s ease, background-color .18s ease;
}

.btn-solid {
  background: var(--bamboo);
  color: #3a2a0d;
  box-shadow: 0 10px 22px rgba(184, 128, 47, .32);
}

.btn-solid:hover {
  background: var(--bamboo-deep);
  color: #fff8ec;
  transform: translateY(-2px);
}

.btn-ghost {
  border: 2px solid rgba(20, 50, 74, .22);
  color: var(--ink);
}

.btn-ghost:hover {
  border-color: var(--sky-deep);
  color: var(--sky-deep);
  transform: translateY(-2px);
}

/* ---------- 首屏（纯 CSS 画的天空 / 云 / 雨 / 草地）---------- */
.hero {
  position: relative;
  min-height: 86vh;
  display: grid;
  place-items: center;
  padding: clamp(48px, 9vw, 120px) 20px;
  overflow: hidden;
  isolation: isolate;
  background: #2a7cb8;
}

.scenery { position: absolute; inset: 0; z-index: -1; overflow: hidden; }

.sky {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, #1c6aa8 0%, #2f86c5 34%, #8fc7e8 66%, #d9ecf6 100%);
}

.glow {
  position: absolute;
  left: 64%;
  top: 4%;
  width: 52vmin;
  height: 52vmin;
  transform: translate(-50%, -50%);
  background: radial-gradient(closest-side, rgba(255, 247, 217, .95), rgba(255, 247, 217, 0));
}

.clouds {
  position: absolute;
  inset: -10% -6%;
  filter: blur(7px);
  background:
    radial-gradient(closest-side, rgba(255,255,255,.95), rgba(255,255,255,0)) 10% 20%/44% 32% no-repeat,
    radial-gradient(closest-side, rgba(255,255,255,.88), rgba(255,255,255,0)) 32% 6%/34% 24% no-repeat,
    radial-gradient(closest-side, rgba(255,255,255,.92), rgba(255,255,255,0)) 64% 24%/42% 28% no-repeat,
    radial-gradient(closest-side, rgba(255,255,255,.82), rgba(255,255,255,0)) 94% 8%/38% 26% no-repeat,
    radial-gradient(closest-side, rgba(255,255,255,.7), rgba(255,255,255,0)) 46% 38%/54% 20% no-repeat,
    radial-gradient(closest-side, rgba(255,255,255,.6), rgba(255,255,255,0)) 84% 40%/40% 18% no-repeat;
}

.rain {
  position: absolute;
  inset: -30% -14% -12% -14%;
  opacity: .45;
  background-image: repeating-linear-gradient(112deg,
    rgba(255, 255, 255, .5) 0 1px,
    rgba(255, 255, 255, 0) 1px 12px);
  animation: rain-fall 1.7s linear infinite;
}

@keyframes rain-fall {
  from { transform: translate3d(0, 0, 0); }
  to { transform: translate3d(-48px, 160px, 0); }
}

.meadow {
  position: absolute;
  left: -6%;
  right: -6%;
  bottom: -8%;
  height: 36%;
  background: linear-gradient(180deg, rgba(165, 220, 186, .96), #6cb27c);
  border-radius: 50% 50% 0 0 / 20% 20% 0 0;
}

.hero-inner {
  max-width: 760px;
  padding: clamp(28px, 4vw, 52px);
  text-align: center;
  background: rgba(253, 251, 246, .94);
  border-radius: 26px;
  box-shadow: var(--shadow);
}

.eyebrow {
  margin: 0 0 6px;
  font-size: 14px;
  letter-spacing: .34em;
  text-transform: uppercase;
  color: var(--sky);
  font-weight: 600;
}

.hero-title {
  margin: 0 0 18px;
  font-family: var(--serif);
  font-size: clamp(42px, 8vw, 76px);
  line-height: 1.12;
  letter-spacing: .02em;
}

.hero-lead {
  margin: 0 auto 30px;
  max-width: 34em;
  color: var(--ink-soft);
  font-size: clamp(16px, 2.2vw, 19px);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  justify-content: center;
}

.hero-meta {
  margin: 26px 0 0;
  font-size: 14px;
  color: var(--ink-soft);
  opacity: .85;
}

/* ---------- 通用区块 ---------- */
section { padding: clamp(64px, 9vw, 120px) clamp(16px, 5vw, 64px); }

.work, .features, .note, .about { max-width: 1180px; margin: 0 auto; }

.section-title {
  margin: 0 0 10px;
  font-family: var(--serif);
  font-size: clamp(28px, 4.4vw, 44px);
  line-height: 1.2;
}

.section-sub { margin: 0; color: var(--ink-soft); }

/* ---------- 作品 ---------- */
.work-head { text-align: center; margin-bottom: 34px; }

.work-panel {
  position: relative;
  overflow: hidden;
  max-width: 840px;
  margin: 0 auto;
  padding: clamp(36px, 5vw, 60px);
  text-align: center;
  background: #fff;
  border-radius: 26px;
  box-shadow: var(--shadow);
}

.rings { position: absolute; inset: 0; pointer-events: none; }

.rings span {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  border: 1px solid rgba(48, 132, 196, .14);
  border-radius: 50%;
}

.rings span:nth-child(1) { width: 260px; height: 260px; }
.rings span:nth-child(2) { width: 430px; height: 430px; }
.rings span:nth-child(3) { width: 600px; height: 600px; }

.work-lead {
  position: relative;
  font-size: clamp(17px, 2.3vw, 20px);
  margin: 0 0 26px;
}

.badges {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  padding: 0;
  margin: 0 0 32px;
  list-style: none;
}

.badges li {
  padding: 7px 16px;
  border-radius: 999px;
  background: var(--cloud-2);
  border: 1px solid rgba(20, 50, 74, .1);
  font-size: 14.5px;
}

.work-actions {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: center;
  justify-content: center;
}

.work-note { font-size: 14.5px; color: var(--ink-soft); }

/* ---------- 特色 ---------- */
.features .section-title { text-align: center; margin-bottom: 40px; }

.feature-grid {
  display: grid;
  gap: 22px;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.card {
  padding: 30px 28px 26px;
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  border-top: 4px solid var(--bamboo);
}

.card h3 {
  margin: 0 0 12px;
  font-size: 20px;
  font-family: var(--serif);
}

.card p { margin: 0 0 12px; color: var(--ink-soft); font-size: 15.5px; }

.card-list {
  font-size: 13.5px !important;
  color: var(--sky) !important;
  letter-spacing: .02em;
  margin-bottom: 0 !important;
}

/* ---------- 开发者的话 ---------- */
.quote {
  margin: 26px 0 0;
  padding: 8px 0 8px clamp(18px, 3vw, 32px);
  border-left: 4px solid var(--bamboo);
}

.quote p { margin: 0 0 16px; font-size: clamp(16px, 2.2vw, 18.5px); }

.quote cite {
  display: block;
  font-style: normal;
  color: var(--ink-soft);
  font-size: 15px;
}

/* ---------- 关于 ---------- */
.about {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: clamp(22px, 4vw, 48px);
  align-items: center;
}

.about-mark svg {
  display: block;
  width: clamp(96px, 14vw, 148px);
  height: auto;
  border-radius: 50%;
  box-shadow: var(--shadow);
}

.about-body p { margin: 0 0 18px; color: var(--ink-soft); }

.about-links {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  padding: 0;
  margin: 0;
  list-style: none;
  font-size: 15.5px;
}

/* ---------- 页脚 ---------- */
.footer {
  padding: 44px 20px 56px;
  text-align: center;
  background: var(--ink);
  color: #e8eef3;
  font-size: 15px;
}

.footer p { margin: 0; }

.footer-sub { margin-top: 8px !important; opacity: .62; font-size: 14px; }

/* ---------- 滚动入场（由 main.js 添加类；无 JS 时不生效也不影响阅读） ---------- */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity .6s ease, transform .6s ease;
}

.reveal.is-in { opacity: 1; transform: none; }

/* ---------- 响应式 ---------- */
@media (max-width: 860px) {
  .nav { display: none; }
  .topbar .topbar-cta { margin-left: auto; }
  .about { grid-template-columns: 1fr; justify-items: center; text-align: center; }
  .about-links { justify-content: center; }
  .hero-inner { padding: 30px 22px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .rain { animation: none; }
  * { transition: none !important; }
}
