/* =========================================================
   金华一中 102 班 · 班级主页
   设计：极简编辑风 —— 纯白底、发丝线、单一强调色、无背景图
   ========================================================= */

:root {
  --bg: #ffffff;
  --ink: #111111;
  --ink-2: #55554f;
  --muted: #9b9b95;
  --line: #e9e9e5;
  --line-2: #d6d6d1;
  --accent: #c8362b;
  --sans: "Inter", "Helvetica Neue", Helvetica, Arial,
          "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Source Han Sans SC", sans-serif;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas,
          "Liberation Mono", "Courier New", monospace;
  --pad: 40px;
  --maxw: 1120px;
  --ease: cubic-bezier(.22, .7, .2, 1);
}

* { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.7;
  font-feature-settings: "kern" 1;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

/* hidden 属性必须压过组件里的 display 设置 */
[hidden] { display: none !important; }

::selection { background: #f6dedb; color: var(--ink); }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.wrap {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 var(--pad);
}

/* ---------- scroll progress ---------- */
.progress {
  position: fixed;
  inset: 0 0 auto 0;
  height: 2px;
  z-index: 60;
  pointer-events: none;
}
.progress span {
  display: block;
  height: 100%;
  width: 0;
  background: var(--accent);
}

/* ---------- header ---------- */
.site-head {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, .88);
  backdrop-filter: saturate(180%) blur(12px);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--line);
}

.head-inner {
  height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}
.brand-mark {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 1px solid var(--ink);
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: -.02em;
  flex: none;
}
.brand-text { display: flex; flex-direction: column; min-width: 0; }
.brand-text strong {
  font-size: 14px;
  font-weight: 600;
  letter-spacing: .02em;
  white-space: nowrap;
}
.brand-text em {
  font-family: var(--mono);
  font-style: normal;
  font-size: 9.5px;
  letter-spacing: .16em;
  color: var(--muted);
  white-space: nowrap;
}

.nav {
  display: flex;
  align-items: center;
  gap: 24px;
}
.nav a {
  position: relative;
  font-size: 13px;
  color: var(--ink-2);
  padding: 4px 0;
  transition: color .2s var(--ease);
  white-space: nowrap;
}
.nav a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 1px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .3s var(--ease);
}
.nav a:hover { color: var(--ink); }
.nav a:hover::after,
.nav a.is-active::after { transform: scaleX(1); }
.nav a.is-active { color: var(--ink); }

/* ---------- hero ---------- */
.hero { padding: clamp(72px, 13vh, 140px) 0 clamp(56px, 8vh, 88px); }

.eyebrow {
  margin: 0;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .2em;
  color: var(--muted);
  text-transform: uppercase;
}

.hero-title {
  margin: 22px 0 0;
  display: flex;
  align-items: baseline;
  gap: 14px;
  line-height: .84;
}
.hero-num {
  font-size: clamp(76px, 17vw, 200px);
  font-weight: 600;
  letter-spacing: -.055em;
}
.hero-unit {
  font-size: clamp(20px, 3.6vw, 40px);
  font-weight: 500;
  letter-spacing: .06em;
  color: var(--ink-2);
}

.hero-sub {
  margin: 34px 0 0;
  max-width: 34ch;
  font-size: 15px;
  color: var(--ink-2);
}

.hero-foot {
  margin-top: clamp(36px, 6vh, 60px);
  padding-top: 20px;
  border-top: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.tag {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 7px 12px;
  border: 1px solid var(--line-2);
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: .14em;
  color: var(--ink-2);
}
.dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  flex: none;
}

.link-down {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .12em;
  color: var(--ink-2);
  border-bottom: 1px solid var(--line-2);
  padding-bottom: 2px;
  transition: color .2s var(--ease), border-color .2s var(--ease);
}
.link-down:hover { color: var(--accent); border-color: var(--accent); }

/* ---------- section caption ---------- */
.sec-head {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: baseline;
  gap: 16px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}
.sec-no {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--muted);
  letter-spacing: .1em;
}
.sec-head h2 {
  margin: 0;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: .08em;
}
.sec-en {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: .2em;
  color: var(--muted);
}

/* ---------- index ---------- */
.index { padding: 0 0 clamp(40px, 6vh, 64px); }

.idx-list { margin: 0; padding: 0; list-style: none; }

.idx-row {
  display: grid;
  grid-template-columns: 56px 1fr auto 28px;
  align-items: center;
  gap: 16px;
  padding: 21px 6px;
  border-bottom: 1px solid var(--line);
  transition: background-color .25s var(--ease), padding-left .25s var(--ease);
}
.idx-row:hover { background: #fafaf8; padding-left: 14px; }
.idx-no {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--muted);
}
.idx-title { font-size: 17px; font-weight: 500; letter-spacing: .01em; }
.idx-en {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: .18em;
  color: var(--muted);
}
.idx-arrow {
  font-size: 14px;
  color: var(--muted);
  justify-self: end;
  transform: translateX(-4px);
  transition: transform .25s var(--ease), color .25s var(--ease);
}
.idx-row:hover .idx-arrow { transform: translateX(0); color: var(--accent); }

/* ---------- blocks ---------- */
.block {
  padding: clamp(48px, 7vh, 72px) 0;
  border-top: 1px solid var(--line);
}

.panel {
  margin-top: 30px;
  border: 1px solid var(--line);
  padding: clamp(48px, 9vh, 76px) 28px;
  text-align: center;
  background: #fff;
}
.panel-title {
  margin: 0;
  font-family: var(--mono);
  font-size: clamp(17px, 3vw, 24px);
  letter-spacing: .24em;
  color: var(--ink);
}
.panel-title::before {
  content: "";
  display: block;
  width: 28px;
  height: 2px;
  background: var(--accent);
  margin: 0 auto 22px;
}
.panel-note {
  margin: 14px 0 0;
  font-size: 12px;
  letter-spacing: .34em;
  color: var(--muted);
}
.panel-desc {
  margin: 20px 0 0;
  font-size: 13px;
  color: var(--muted);
}

/* ---------- footer ---------- */
.site-foot {
  border-top: 1px solid var(--line);
  margin-top: clamp(24px, 5vh, 48px);
}
.foot-inner {
  padding: 38px var(--pad) 56px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}
.foot-inner p { margin: 0; }
.foot-strong { font-size: 14px; font-weight: 600; letter-spacing: .04em; }
.foot-dim {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: .08em;
  color: var(--muted);
  margin-top: 6px !important;
}
.foot-right { text-align: right; }
.foot-right .foot-dim:first-child { margin-top: 0 !important; }

/* ---------- auth（登录 / 注册 / 个人页） ---------- */
.auth { padding: clamp(44px, 8vh, 92px) 0 clamp(64px, 10vh, 110px); }
.auth-inner { max-width: 480px; }

.auth-title { margin: 0; font-size: clamp(30px, 4.4vw, 44px); font-weight: 600; letter-spacing: -.03em; line-height: 1.05; }
.auth-sub { margin: 14px 0 0; color: var(--ink-2); font-size: 14.5px; }

/* ---- 登录 / 注册：左右分栏，整屏高度 ---- */
.auth-split { padding: 0; }
.auth-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  max-width: 1440px;
  margin: 0 auto;
  min-height: calc(100vh - 68px);
}

.auth-brand {
  display: flex;
  align-items: center;
  background: #fafaf8;
  border-right: 1px solid var(--line);
}
.auth-brand-inner {
  width: 100%;
  max-width: 600px;
  margin-left: auto;
  padding: clamp(40px, 6vw, 76px) clamp(28px, 5vw, 76px);
}
.auth-brand-num {
  margin: 22px 0 0;
  font-size: clamp(72px, 9vw, 128px);
  font-weight: 600;
  letter-spacing: -.055em;
  line-height: .8;
}
.auth-brand-unit {
  font-size: clamp(18px, 2vw, 26px);
  font-weight: 500;
  letter-spacing: .08em;
  color: var(--ink-2);
  margin-left: 12px;
}
.auth-brand-note { margin: 28px 0 0; font-size: 14px; color: var(--ink-2); }
.auth-brand-meta { margin: 32px 0 0; padding: 0; list-style: none; border-top: 1px solid var(--line); }
.auth-brand-meta li {
  padding: 11px 0;
  border-bottom: 1px solid var(--line);
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: .13em;
  color: var(--muted);
}

.auth-panel { display: flex; align-items: center; }
.auth-panel-inner {
  width: 100%;
  max-width: 480px;
  margin-right: auto;
  padding: clamp(40px, 6vw, 76px) clamp(28px, 5vw, 76px);
  animation: panelIn .45s var(--ease) both;
}
@keyframes panelIn { from { transform: translateY(10px); } to { transform: none; } }

.auth-divider {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 30px 0 18px;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: .18em;
  color: var(--muted);
  text-transform: uppercase;
}
.auth-divider::before,
.auth-divider::after { content: ""; flex: 1; height: 1px; background: var(--line); }

.auth-foot { margin: 22px 0 0; font-family: var(--mono); font-size: 10.5px; letter-spacing: .1em; color: var(--muted); }
.auth-foot a:hover { color: var(--accent); }

/* ---- 表单 ---- */
.form { margin-top: 34px; }
.field { margin-bottom: 18px; }
.field > label {
  display: block;
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: .16em;
  color: var(--muted);
  text-transform: uppercase;
  margin-bottom: 9px;
}
.field input[type="text"],
.field input[type="password"] {
  width: 100%;
  height: 48px;
  padding: 0 14px;
  border: 1px solid var(--line-2);
  background: #fff;
  color: var(--ink);
  font: inherit;
  font-size: 14.5px;
  border-radius: 0;
  transition: border-color .18s var(--ease), box-shadow .18s var(--ease);
}
.field input[type="text"]:hover,
.field input[type="password"]:hover { border-color: #bfbfb8; }
.field input[type="text"]:focus,
.field input[type="password"]:focus {
  outline: none;
  border-color: var(--ink);
  box-shadow: 0 0 0 3px rgba(17, 17, 17, .06);
}
.field input::placeholder { color: #c2c2bc; }

/* 带操作按钮的输入框（显示 / 隐藏密码） */
.input-wrap { position: relative; }
.field .input-wrap input { padding-right: 64px; }
.input-action {
  position: absolute;
  right: 5px;
  top: 50%;
  transform: translateY(-50%);
  padding: 8px 11px;
  background: none;
  border: 0;
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: .12em;
  color: var(--muted);
  cursor: pointer;
  transition: color .18s var(--ease);
}
.input-action:hover { color: var(--ink); }

/* 表单说明文字：.field 内外的 .hint 都生效 */
.hint { margin-top: 7px; font-size: 11.5px; line-height: 1.6; color: var(--muted); }

.field-row { display: flex; gap: 14px; }
.field-row .field { flex: 1; }

.check {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 6px 0 22px;
  font-size: 13px;
  color: var(--ink-2);
  cursor: pointer;
  user-select: none;
}
.check input { width: 16px; height: 16px; accent-color: var(--ink); cursor: pointer; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 14px 22px;
  background: var(--ink);
  color: #fff;
  border: 1px solid var(--ink);
  font: inherit;
  font-size: 13.5px;
  letter-spacing: .06em;
  cursor: pointer;
  transition: background-color .2s var(--ease), border-color .2s var(--ease), transform .06s var(--ease);
}
.btn:hover { background: var(--accent); border-color: var(--accent); }
.btn:active { transform: translateY(1px); }
.btn[disabled] { opacity: .45; cursor: not-allowed; }
.btn-ghost { background: #fff; color: var(--ink); }
.btn-ghost:hover { background: #fafaf8; color: var(--ink); border-color: var(--ink); }
.btn-sm { width: auto; padding: 9px 15px; font-size: 12.5px; }
.btn-row { display: flex; gap: 10px; flex-wrap: wrap; }

.msg {
  display: none;
  margin-top: 18px;
  padding: 11px 14px;
  border: 1px solid var(--line);
  border-left-width: 2px;
  background: #fbfbfa;
  font-size: 13px;
  line-height: 1.6;
  color: var(--ink-2);
}
.msg.show { display: block; animation: msgIn .22s var(--ease) both; }
@keyframes msgIn { from { transform: translateY(-4px); } to { transform: none; } }
.msg.err { border-color: #e8b6b0; border-left-color: var(--accent); background: #fdf7f6; color: #8d2c22; }
.msg.ok { border-color: #b6d8c1; border-left-color: #3f8f5c; background: #f5fbf7; color: #256b3a; }

.auth-alt { margin-top: 26px; font-size: 13px; color: var(--ink-2); }
.auth-alt a { border-bottom: 1px solid var(--line-2); padding-bottom: 1px; }
.auth-alt a:hover { color: var(--accent); border-color: var(--accent); }

/* 服主（班委）金色徽章 */
.badge-owner {
  display: inline-flex;
  align-items: center;
  margin-left: 7px;
  padding: 1px 6px;
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: .1em;
  color: #6f5110;
  background: linear-gradient(180deg, #f8ecc0, #e8cf85);
  border: 1px solid #d0af5c;
  vertical-align: 1px;
}

/* 导航栏登录态 */
.nav-auth { display: inline-flex; align-items: center; gap: 18px; }
.nav-div { width: 1px; height: 14px; background: var(--line-2); display: inline-block; }
.nav-user { font-weight: 500; }

/* 个人页信息表 */
.kv { margin-top: 30px; border-top: 1px solid var(--line); }
.kv-row { display: grid; grid-template-columns: 140px 1fr; gap: 16px; padding: 15px 2px; border-bottom: 1px solid var(--line); font-size: 14px; }
.kv-row dt { font-family: var(--mono); font-size: 10.5px; letter-spacing: .14em; color: var(--muted); text-transform: uppercase; padding-top: 3px; }
.kv-row dd { margin: 0; word-break: break-all; }

/* 个人页：头像与分区标题 */
.section-sub {
  margin: 46px 0 0;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .08em;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}
.avatar-row { display: flex; align-items: center; gap: 16px; margin-top: 34px; }
.avatar-row .hint { margin: 0; }
.avatar-box {
  width: 68px;
  height: 68px;
  flex: none;
  border: 1px solid var(--line-2);
  background: #fafaf8;
  display: grid;
  place-items: center;
  font-size: 24px;
  font-weight: 600;
  color: var(--ink-2);
  overflow: hidden;
}
.avatar-box img { width: 100%; height: 100%; object-fit: cover; display: block; }
.avatar-box.lg { width: 88px; height: 88px; font-size: 30px; }

/* ---------- reveal ----------
   默认完整可见，只在进入视口时播放一次上浮动画；
   即使 JS 或 IntersectionObserver 失效，内容也不会被隐藏。 */
@keyframes rise {
  from { transform: translateY(14px); }
  to   { transform: none; }
}
[data-reveal].in { animation: rise .7s var(--ease) both; }

/* ---------- responsive ---------- */
@media (max-width: 860px) {
  :root { --pad: 26px; }
  .head-inner { height: 62px; }
  .nav {
    gap: 18px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding-right: 6px;
    -webkit-mask-image: linear-gradient(to right, #000 0, #000 calc(100% - 22px), transparent 100%);
    mask-image: linear-gradient(to right, #000 0, #000 calc(100% - 22px), transparent 100%);
  }
  .nav::-webkit-scrollbar { display: none; }
  .brand-text em { display: none; }
}

@media (max-width: 640px) {
  :root { --pad: 20px; }
  .hero-sub { font-size: 14px; }
  .idx-row { grid-template-columns: 38px 1fr 24px; padding: 18px 4px; }
  .idx-en { display: none; }
  .idx-title { font-size: 16px; }
  .foot-inner { flex-direction: column; padding-bottom: 44px; }
  .foot-right { text-align: left; }
  .foot-dim { letter-spacing: .04em; }
  .panel-desc { display: none; }
}

/* 登录 / 注册分栏在窄屏改为上下堆叠 */
@media (max-width: 900px) {
  .auth-grid { grid-template-columns: minmax(0, 1fr); min-height: 0; }
  .auth-brand { border-right: 0; border-bottom: 1px solid var(--line); }
  .auth-brand-inner { max-width: 560px; margin: 0 auto; padding: 34px 26px 30px; }
  .auth-brand-num { margin-top: 14px; font-size: 56px; }
  .auth-brand-note { margin-top: 16px; font-size: 13.5px; }
  .auth-brand-meta { display: none; }
  .auth-panel-inner { max-width: 560px; margin: 0 auto; padding: 34px 26px 60px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition-duration: .001ms !important; animation-duration: .001ms !important; }
  [data-reveal].in { animation: none; }
  .auth-panel-inner { animation: none; }
}
