:root {
  --bg-top: #eaf4ff;
  --bg-bottom: #ffffff;
  --ink: #1e293b;
  --ink-soft: #64748b;
  --ink-faint: #94a3b8;
  --accent: #3b82f6;
  --accent-soft: #dbeafe;
  --warm: #ff6b5e;
  --card-bg: #ffffff;
  --line: #e2e8f0;
  --radius: 22px;
  --shadow: 0 18px 40px -18px rgba(59, 130, 246, 0.25);
  --shadow-hover: 0 26px 60px -20px rgba(59, 130, 246, 0.35);
  --font: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Segoe UI",
    system-ui, -apple-system, sans-serif;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font);
  color: var(--ink);
  background: linear-gradient(180deg, var(--bg-top) 0%, var(--bg-bottom) 42%);
  min-height: 100vh;
  line-height: 1.6;
  overflow-x: hidden;
  position: relative;
}

/* ---- 云朵装饰 ---- */
.clouds {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.cloud {
  position: absolute;
  display: block;
  width: 260px;
  height: 60px;
  background: rgba(255, 255, 255, 0.7);
  border-radius: 999px;
  filter: blur(1px);
  animation: drift 30s ease-in-out infinite;
}

.cloud::before,
.cloud::after {
  content: "";
  position: absolute;
  background: inherit;
  border-radius: 999px;
}

.cloud::before {
  width: 110px;
  height: 110px;
  top: -55px;
  left: 40px;
}

.cloud::after {
  width: 80px;
  height: 80px;
  top: -35px;
  right: 42px;
}

.cloud--1 {
  top: 12%;
  left: -10%;
  opacity: 0.7;
}

.cloud--2 {
  top: 30%;
  left: 55%;
  opacity: 0.5;
  transform: scale(0.8);
  animation-duration: 40s;
  animation-delay: -8s;
}

.cloud--3 {
  top: 64%;
  left: 20%;
  opacity: 0.45;
  transform: scale(0.6);
  animation-duration: 36s;
  animation-delay: -16s;
}

@keyframes drift {
  0% {
    transform: translateX(0);
  }
  50% {
    transform: translateX(60px);
  }
  100% {
    transform: translateX(0);
  }
}

/* ---- Hero ---- */
.hero {
  position: relative;
  z-index: 1;
  text-align: center;
  padding: 96px 24px 56px;
  max-width: 900px;
  margin: 0 auto;
}

.hero__eyebrow {
  display: inline-block;
  font-size: 0.8rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
  background: var(--accent-soft);
  padding: 6px 16px;
  border-radius: 999px;
  margin-bottom: 22px;
  font-weight: 600;
}

.hero__title {
  font-size: clamp(2.2rem, 6vw, 4rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  background: linear-gradient(120deg, #1e40af 0%, #3b82f6 45%, #ff6b5e 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  margin-bottom: 18px;
}

.hero__subtitle {
  font-size: clamp(1rem, 2.2vw, 1.2rem);
  color: var(--ink-soft);
  max-width: 620px;
  margin: 0 auto 40px;
}

.hero__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
}

.tag {
  appearance: none;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.8);
  color: var(--ink-soft);
  font-family: inherit;
  font-size: 0.9rem;
  padding: 8px 18px;
  border-radius: 999px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.tag:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.tag.is-active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
  box-shadow: 0 8px 20px -8px rgba(59, 130, 246, 0.6);
}

/* ---- 画廊 ---- */
.gallery {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
  max-width: 1180px;
  margin: 0 auto;
  padding: 16px 32px 80px;
}

/* ---- 卡片 ---- */
.card {
  background: var(--card-bg);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  border: 1px solid rgba(255, 255, 255, 0.6);
  transition: transform 0.3s ease, box-shadow 0.3s ease, opacity 0.5s ease;
  opacity: 0;
  transform: translateY(28px);
}

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

.card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-hover);
}

.card.is-hidden {
  display: none;
}

.card__media {
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: var(--accent-soft);
}

.card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  display: block;
  transition: transform 0.5s ease;
}

.card:hover .card__media img {
  transform: scale(1.04);
}

.card__body {
  padding: 24px 26px 26px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1;
}

.card__tag {
  align-self: flex-start;
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  color: var(--warm);
  background: rgba(255, 107, 94, 0.1);
  padding: 4px 12px;
  border-radius: 999px;
  font-weight: 600;
}

.card__title {
  font-size: 1.28rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.35;
}

.card__subtitle {
  color: var(--ink);
  font-weight: 500;
  font-size: 0.98rem;
}

.card__note {
  color: var(--ink-soft);
  font-size: 0.9rem;
  flex: 1;
}

.card__link {
  align-self: flex-start;
  margin-top: 6px;
  color: var(--accent);
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  border-bottom: 2px solid transparent;
  transition: border-color 0.2s ease, color 0.2s ease;
}

.card__link:hover {
  border-color: var(--accent);
}

/* ---- 页脚 ---- */
.footer {
  position: relative;
  z-index: 1;
  text-align: center;
  color: var(--ink-faint);
  font-size: 0.9rem;
  padding: 40px 24px 56px;
}

.footer strong {
  color: var(--ink-soft);
}

/* ---- 响应式 ---- */
@media (max-width: 1023px) {
  .gallery {
    grid-template-columns: repeat(2, 1fr);
    gap: 22px;
  }
}

@media (max-width: 767px) {
  .hero {
    padding: 72px 20px 44px;
  }

  .gallery {
    grid-template-columns: 1fr;
    padding: 8px 20px 64px;
    gap: 20px;
  }

  .card__body {
    padding: 20px 20px 22px;
  }
}

/* ---- 打印 / 导出 PDF ---- */
@media print {
  @page {
    size: 297mm 210mm;
    margin: 0;
  }

  html,
  body {
    background: #ffffff !important;
    overflow: visible !important;
    min-height: 0;
  }

  .clouds,
  .hero__tags,
  .tag,
  .card.is-hidden {
    display: none !important;
  }

  /* 封面页：独立一页 */
  .hero {
    page-break-after: always;
    height: 186mm;
    padding: 0 24px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    page-break-inside: avoid;
  }
  .hero__title {
    -webkit-text-fill-color: initial;
    background: none;
    color: #1e40af;
    font-size: 44pt;
    margin-bottom: 12mm;
  }
  .hero__subtitle {
    margin: 0 auto;
    color: #475569;
    font-size: 15pt;
    max-width: 160mm;
  }

  /* 画廊：逐张卡片独立一页 */
  .gallery {
    display: block;
    max-width: none;
    padding: 0;
    margin: 0;
  }

  .card {
    display: grid !important;
    grid-template-columns: 55% 45%;
    grid-template-rows: 186mm;
    page-break-after: always;
    page-break-inside: avoid;
    border-radius: 0;
    box-shadow: none;
    border: none;
    overflow: hidden;
    opacity: 1 !important;
    transform: none !important;
  }
  .card__media {
    aspect-ratio: auto;
    height: 100%;
  }
  .card__media img {
    object-position: top center;
  }
  .card__body {
    justify-content: center;
    padding: 20mm 16mm;
    gap: 7mm;
  }
  .card__title {
    font-size: 22pt;
    line-height: 1.3;
  }
  .card__subtitle {
    font-size: 13pt;
    line-height: 1.6;
  }
  .card__note {
    font-size: 11pt;
    line-height: 1.8;
  }
  .card__link {
    font-size: 12.5pt;
    color: #2563eb;
    text-decoration: underline;
    border-bottom: none;
  }

  /* 尾页：独立一页 */
  .footer {
    page-break-before: always;
    height: 120mm;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14pt;
    color: #64748b;
  }
}
