/* ==========================================================
   ztluo 毕业影像档案 · 全站样式
   浅色主题 / 紧凑布局 / 圆角卡片
   ========================================================== */

:root {
  --bg: #f7f5f1;
  --surface: #ffffff;
  --ink: #15171b;
  --ink-2: #43474f;
  --muted: #858a93;
  --line: #e9e4da;
  --accent: #b4633a;
  --accent-dark: #8f4a27;
  --accent-soft: #f7ece4;
  --radius-lg: 20px;
  --radius: 14px;
  --radius-sm: 10px;
  --shadow-sm: 0 2px 10px rgba(21, 23, 27, .04);
  --shadow-md: 0 14px 36px rgba(21, 23, 27, .08);
  --container: 1160px;
  --header-h: 68px;
}

*,
*::before,
*::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 12px);
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "PingFang SC", "HarmonyOS Sans SC", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  font-size: 15px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

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

h1, h2, h3 {
  margin: 0;
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.25;
}

p { margin: 0; }

ol, ul { margin: 0; padding: 0; list-style: none; }

code { font-family: "JetBrains Mono", Consolas, "Courier New", monospace; }

.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.container {
  width: min(var(--container), calc(100% - 40px));
  margin-inline: auto;
}

/* ---------- 按钮 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 46px;
  padding: 0 24px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color .2s ease, color .2s ease, border-color .2s ease, transform .2s ease, box-shadow .2s ease;
}

.btn:active { transform: translateY(1px); }

.btn-primary {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 8px 20px rgba(180, 99, 58, .22);
}

.btn-primary:hover {
  background: var(--accent-dark);
  box-shadow: 0 10px 24px rgba(143, 74, 39, .26);
}

.btn-ghost {
  background: var(--accent-soft);
  color: var(--accent-dark);
}

.btn-ghost:hover { background: #f1e1d5; }

.btn-line {
  background: transparent;
  color: var(--ink);
  border-color: var(--line);
}

.btn-line:hover {
  border-color: var(--ink);
  background: rgba(255, 255, 255, .6);
}

.btn-sm { height: 38px; padding: 0 18px; font-size: 14px; }

.btn-block { width: 100%; }

/* ---------- 顶部导航 ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  background: rgba(247, 245, 241, .82);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color .25s ease, box-shadow .25s ease;
}

.site-header.is-scrolled {
  border-bottom-color: var(--line);
  box-shadow: 0 8px 24px rgba(21, 23, 27, .05);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  height: var(--header-h);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.brand-mark {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: var(--accent);
  color: #fff;
  font-weight: 700;
  font-size: 18px;
  letter-spacing: 0;
}

.brand-text {
  display: flex;
  flex-direction: column;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.2;
}

.brand-text em {
  font-style: normal;
  font-size: 11px;
  font-weight: 500;
  color: var(--muted);
  letter-spacing: .04em;
}

.nav {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-left: auto;
}

.nav-link {
  position: relative;
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 14px;
  color: var(--ink-2);
  transition: color .2s ease, background-color .2s ease;
}

.nav-link:hover { color: var(--ink); background: rgba(21, 23, 27, .04); }

.nav-link.is-active { color: var(--accent-dark); background: var(--accent-soft); font-weight: 600; }

.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  padding: 0 9px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
  cursor: pointer;
}

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

.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); }

/* ---------- 首屏 ---------- */
.hero {
  position: relative;
  display: flex;
  align-items: flex-end;
  min-height: clamp(560px, 82vh, 760px);
  overflow: hidden;
  border-radius: 0 0 28px 28px;
  background: #1a1c21;
  color: #fff;
}

.hero-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(12, 14, 18, .30) 0%, rgba(12, 14, 18, .18) 35%, rgba(12, 14, 18, .78) 100%),
    linear-gradient(90deg, rgba(12, 14, 18, .55) 0%, rgba(12, 14, 18, 0) 62%);
}

.hero-inner {
  position: relative;
  z-index: 1;
  padding-top: 96px;
  padding-bottom: 52px;
}

.eyebrow {
  margin: 0 0 14px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .18em;
  color: rgba(255, 255, 255, .74);
  text-transform: uppercase;
}

.eyebrow-dark { color: var(--accent); }

.hero h1 {
  max-width: 14em;
  font-size: clamp(34px, 5.4vw, 58px);
  font-weight: 800;
  line-height: 1.16;
  letter-spacing: -0.02em;
}

.hero-desc {
  max-width: 40em;
  margin-top: 18px;
  font-size: 16px;
  color: rgba(255, 255, 255, .82);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.hero .btn-line {
  color: #fff;
  border-color: rgba(255, 255, 255, .45);
  background: rgba(255, 255, 255, .08);
  backdrop-filter: blur(6px);
}

.hero .btn-line:hover {
  border-color: #fff;
  background: rgba(255, 255, 255, .18);
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  margin: 44px 0 0;
  padding-top: 24px;
  border-top: 1px solid rgba(255, 255, 255, .18);
}

.hero-stats > div {
  padding-left: 20px;
  border-left: 1px solid rgba(255, 255, 255, .16);
}

.hero-stats > div:first-child { padding-left: 0; border-left: 0; }

.hero-stats dt {
  font-size: clamp(22px, 2.6vw, 30px);
  font-weight: 700;
  line-height: 1.1;
}

.hero-stats dt small {
  font-size: 56%;
  font-weight: 600;
  margin-left: 2px;
  color: rgba(255, 255, 255, .7);
}

.hero-stats dd {
  margin: 6px 0 0;
  font-size: 13px;
  color: rgba(255, 255, 255, .68);
}

/* ---------- 通用区块 ---------- */
.section { padding: 88px 0; }

.section-alt {
  background: #fff;
  border-block: 1px solid var(--line);
}

.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 40px;
  margin-bottom: 34px;
}

.section-head h2 {
  font-size: clamp(26px, 3.2vw, 36px);
}

.section-head .eyebrow { margin-bottom: 10px; }

.section-desc {
  max-width: 34em;
  font-size: 14px;
  color: var(--ink-2);
}

/* ---------- 筛选 ---------- */
.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 24px;
}

.filter-btn {
  height: 36px;
  padding: 0 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--ink-2);
  font-size: 13.5px;
  font-weight: 500;
  cursor: pointer;
  transition: all .2s ease;
}

.filter-btn:hover { border-color: #d6cec1; color: var(--ink); }

.filter-btn.is-active {
  background: var(--ink);
  border-color: var(--ink);
  color: #fff;
}

/* ---------- 照片网格 ---------- */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

.photo-card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  cursor: zoom-in;
  transition: transform .3s ease, box-shadow .3s ease, border-color .3s ease;
}

.photo-card:hover {
  transform: translateY(-3px);
  border-color: #ddd5c8;
  box-shadow: var(--shadow-md);
}

.photo-card img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  transition: transform .55s cubic-bezier(.2, .7, .3, 1);
}

.photo-card:hover img { transform: scale(1.045); }

.photo-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
}

.photo-title {
  font-size: 14px;
  font-weight: 600;
}

.photo-desc {
  margin-top: 2px;
  font-size: 12.5px;
  color: var(--muted);
}

.photo-tag {
  flex-shrink: 0;
  padding: 3px 9px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent-dark);
  font-size: 11.5px;
  font-weight: 600;
}

/* ---------- 班级相册 ---------- */
.album-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
}

.album-card {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--line);
  background: #1a1c21;
  transition: transform .3s ease, box-shadow .3s ease;
}

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

.album-card img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  opacity: .88;
  transition: transform .55s cubic-bezier(.2, .7, .3, 1), opacity .3s ease;
}

.album-card:hover img { transform: scale(1.05); opacity: 1; }

.album-info {
  position: absolute;
  inset: auto 0 0 0;
  padding: 40px 16px 14px;
  color: #fff;
  background: linear-gradient(180deg, rgba(12, 14, 18, 0) 0%, rgba(12, 14, 18, .82) 78%);
}

.album-info h3 { font-size: 16px; }

.album-info p {
  margin-top: 3px;
  font-size: 12px;
  color: rgba(255, 255, 255, .72);
}

.album-info .album-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 8px;
  font-size: 11.5px;
  color: rgba(255, 255, 255, .62);
}

/* ---------- 存储与下载 ---------- */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  margin-bottom: 22px;
}

.feature-card {
  padding: 24px 22px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.feature-no {
  display: inline-block;
  margin-bottom: 12px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .1em;
  color: var(--accent);
}

.feature-card h3 { font-size: 16.5px; }

.feature-card p {
  margin-top: 8px;
  font-size: 13.5px;
  color: var(--ink-2);
}

.download-panel {
  max-width: 680px;
}

.code-card {
  padding: 26px 24px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
}

.code-card h3 { font-size: 18px; }

.code-tip {
  margin-top: 8px;
  font-size: 13px;
  color: var(--muted);
}

.code-tip code {
  padding: 2px 6px;
  border-radius: 6px;
  background: var(--accent-soft);
  color: var(--accent-dark);
  font-size: 12.5px;
}

.code-form {
  display: flex;
  gap: 10px;
  margin-top: 18px;
}

.code-form input {
  flex: 1;
  min-width: 0;
  height: 46px;
  padding: 0 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fbfaf8;
  color: var(--ink);
  font-size: 14px;
  font-family: inherit;
  outline: none;
  transition: border-color .2s ease, box-shadow .2s ease;
}

.code-form input::placeholder { color: #a9adb5; }

.code-form input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(180, 99, 58, .12);
}

.code-result {
  min-height: 24px;
  margin-top: 14px;
  font-size: 13px;
  color: var(--ink-2);
}

.code-result.is-error { color: #b3372c; }

.code-result a {
  color: var(--accent-dark);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* ---------- 页脚 ---------- */
.site-footer {
  padding: 40px 0;
  background: #fff;
  border-top: 1px solid var(--line);
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  flex-wrap: wrap;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.footer-brand strong { font-size: 14.5px; }

.footer-brand p {
  margin-top: 2px;
  font-size: 12px;
  color: var(--muted);
}

.footer-nav {
  display: flex;
  gap: 20px;
  font-size: 13px;
  color: var(--ink-2);
}

.footer-nav a:hover { color: var(--accent); }

.footer-meta {
  text-align: right;
  font-size: 12px;
  color: var(--muted);
}

.footer-meta a { text-decoration: underline; text-underline-offset: 2px; }

/* ---------- 大图查看 ---------- */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 24px;
  background: rgba(10, 11, 14, .95);
  backdrop-filter: blur(6px);
  opacity: 0;
  transition: opacity .22s ease;
}

.lightbox[hidden] { display: none; }

.lightbox.is-visible { opacity: 1; }

.lb-figure {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  max-width: min(1100px, 100%);
  max-height: 100%;
  margin: 0;
}

.lb-figure img {
  max-width: 100%;
  max-height: calc(100vh - 170px);
  object-fit: contain;
  border-radius: 10px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, .5);
}

.lb-caption {
  display: flex;
  align-items: center;
  gap: 16px;
  color: rgba(255, 255, 255, .85);
  font-size: 14px;
}

.lb-caption .btn-line {
  color: #fff;
  border-color: rgba(255, 255, 255, .35);
  background: rgba(255, 255, 255, .08);
}

.lb-caption .btn-line:hover { border-color: #fff; background: rgba(255, 255, 255, .18); }

.lb-counter {
  font-size: 12.5px;
  color: rgba(255, 255, 255, .5);
}

.lb-close,
.lb-nav {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, .22);
  border-radius: 50%;
  background: rgba(255, 255, 255, .07);
  cursor: pointer;
  transition: background-color .2s ease, transform .2s ease;
}

.lb-close:hover,
.lb-nav:hover { background: rgba(255, 255, 255, .18); }

.lb-close {
  position: absolute;
  top: 22px;
  right: 22px;
}

.lb-nav { position: absolute; top: 50%; transform: translateY(-50%); }

.lb-prev { left: 20px; }
.lb-next { right: 20px; }

.lb-close svg,
.lb-nav svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: #fff;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

body.lb-open { overflow: hidden; }

/* ---------- 滚动出现动画 ---------- */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity .6s ease, transform .6s cubic-bezier(.2, .7, .3, 1);
}

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

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  * { animation-duration: .001ms !important; transition-duration: .001ms !important; }
}

/* ---------- 响应式 ---------- */
@media (max-width: 1024px) {
  .album-grid { grid-template-columns: repeat(2, 1fr); }
  .section-head { flex-direction: column; align-items: flex-start; gap: 12px; }
}

@media (max-width: 860px) {
  .nav {
    position: absolute;
    top: var(--header-h);
    left: 0;
    right: 0;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
    padding: 12px 20px 18px;
    margin: 0;
    background: var(--bg);
    border-bottom: 1px solid var(--line);
    box-shadow: 0 18px 30px rgba(21, 23, 27, .08);
  }

  .nav.is-open { display: flex; }

  .nav-link { padding: 11px 14px; border-radius: 10px; }

  .nav-toggle { display: flex; }

  .header-actions .btn-ghost { display: none; }

  .gallery-grid { grid-template-columns: repeat(2, 1fr); }
  .feature-grid { grid-template-columns: 1fr; }
  .hero-stats { grid-template-columns: repeat(2, 1fr); row-gap: 20px; }
  .hero-stats > div:nth-child(3) { padding-left: 0; border-left: 0; }
  .section { padding: 68px 0; }
}

@media (max-width: 600px) {
  .container { width: calc(100% - 28px); }
  .hero { min-height: 78vh; border-radius: 0 0 20px 20px; }
  .hero-inner { padding-top: 72px; padding-bottom: 34px; }
  .hero h1 { font-size: clamp(30px, 9vw, 40px); }
  .hero-desc { font-size: 14px; }
  .hero-actions .btn { flex: 1; }
  .gallery-grid { grid-template-columns: 1fr; }
  .album-grid { grid-template-columns: 1fr; }
  .code-form { flex-direction: column; }
  .code-form .btn { width: 100%; }
  .footer-inner { flex-direction: column; align-items: flex-start; gap: 18px; }
  .footer-meta { text-align: left; }
  .lb-nav { width: 38px; height: 38px; }
  .lb-prev { left: 8px; }
  .lb-next { right: 8px; }
  .lb-caption { flex-wrap: wrap; justify-content: center; }
}
